"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16053,38434,49302],{38434:(e,t,a)=>{let s,r;a.d(t,{l$:()=>ee,Ay:()=>et,oR:()=>P});var o,i=a(12115);let l={data:""},n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,d=/\/\*[^]*?\*\/|  +/g,c=/\n+/g,u=(e,t)=>{let a="",s="",r="";for(let o in e){let i=e[o];"@"==o[0]?"i"==o[1]?a=o+" "+i+";":s+="f"==o[1]?u(i,o):o+"{"+u(i,"k"==o[1]?"":t)+"}":"object"==typeof i?s+=u(i,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=i&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=u.p?u.p(o,i):o+":"+i+";")}return a+(t&&r?t+"{"+r+"}":r)+s},p={},m=e=>{if("object"==typeof e){let t="";for(let a in e)t+=a+m(e[a]);return t}return e};function f(e){let t,a,s=this||{},r=e.call?e(s.p):e;return((e,t,a,s,r)=>{var o;let i=m(e),l=p[i]||(p[i]=(e=>{let t=0,a=11;for(;t<e.length;)a=101*a+e.charCodeAt(t++)>>>0;return"go"+a})(i));if(!p[l]){let t=i!==e?e:(e=>{let t,a,s=[{}];for(;t=n.exec(e.replace(d,""));)t[4]?s.shift():t[3]?(a=t[3].replace(c," ").trim(),s.unshift(s[0][a]=s[0][a]||{})):s[0][t[1]]=t[2].replace(c," ").trim();return s[0]})(e);p[l]=u(r?{["@keyframes "+l]:t}:t,a?"":"."+l)}let f=a&&p.g?p.g:null;return a&&(p.g=p[l]),o=p[l],f?t.data=t.data.replace(f,o):-1===t.data.indexOf(o)&&(t.data=s?o+t.data:t.data+o),l})(r.unshift?r.raw?(t=[].slice.call(arguments,1),a=s.p,r.reduce((e,s,r)=>{let o=t[r];if(o&&o.call){let e=o(a),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":u(e,""):!1===e?"":e}return e+s+(null==o?"":o)},"")):r.reduce((e,t)=>Object.assign(e,t&&t.call?t(s.p):t),{}):r,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||l})(s.target),s.g,s.o,s.k)}f.bind({g:1});let h,g,y,b=f.bind({k:1});function x(e,t){let a=this||{};return function(){let s=arguments;function r(o,i){let l=Object.assign({},o),n=l.className||r.className;a.p=Object.assign({theme:g&&g()},l),a.o=/ *go\d+/.test(n),l.className=f.apply(a,s)+(n?" "+n:""),t&&(l.ref=i);let d=e;return e[0]&&(d=l.as||e,delete l.as),y&&d[0]&&y(l),h(d,l)}return t?t(r):r}}var v=(e,t)=>"function"==typeof e?e(t):e,w=(s=0,()=>(++s).toString()),j=()=>{if(void 0===r&&"u">typeof window){let e=matchMedia("(prefers-reduced-motion: reduce)");r=!e||e.matches}return r},C="default",E=(e,t)=>{let{toastLimit:a}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,a)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:s}=t;return E(e,{type:+!!e.toasts.find(e=>e.id===s.id),toast:s});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+o}))}}},N=[],k={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},$={},L=(e,t=C)=>{$[t]=E($[t]||k,e),N.forEach(([e,a])=>{e===t&&a($[t])})},D=e=>Object.keys($).forEach(t=>L(e,t)),I=(e=C)=>t=>{L(t,e)},A={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},O=e=>(t,a)=>{let s,r=((e,t="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...a,id:(null==a?void 0:a.id)||w()}))(t,e,a);return I(r.toasterId||(s=r.id,Object.keys($).find(e=>$[e].toasts.some(e=>e.id===s))))({type:2,toast:r}),r.id},P=(e,t)=>O("blank")(e,t);P.error=O("error"),P.success=O("success"),P.loading=O("loading"),P.custom=O("custom"),P.dismiss=(e,t)=>{let a={type:3,toastId:e};t?I(t)(a):D(a)},P.dismissAll=e=>P.dismiss(void 0,e),P.remove=(e,t)=>{let a={type:4,toastId:e};t?I(t)(a):D(a)},P.removeAll=e=>P.remove(void 0,e),P.promise=(e,t,a)=>{let s=P.loading(t.loading,{...a,...null==a?void 0:a.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let r=t.success?v(t.success,e):void 0;return r?P.success(r,{id:s,...a,...null==a?void 0:a.success}):P.dismiss(s),e}).catch(e=>{let r=t.error?v(t.error,e):void 0;r?P.error(r,{id:s,...a,...null==a?void 0:a.error}):P.dismiss(s)}),e};var _=1e3,z=b`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,R=b`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,S=b`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,T=x("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${z} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${R} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${S} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,F=b`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,M=x("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${F} 1s linear infinite;
`,B=b`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,G=b`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,H=x("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${B} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${G} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,U=x("div")`
  position: absolute;
`,q=x("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,W=b`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,Q=x("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${W} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,Y=({toast:e})=>{let{icon:t,type:a,iconTheme:s}=e;return void 0!==t?"string"==typeof t?i.createElement(Q,null,t):t:"blank"===a?null:i.createElement(q,null,i.createElement(M,{...s}),"loading"!==a&&i.createElement(U,null,"error"===a?i.createElement(T,{...s}):i.createElement(H,{...s})))},Z=x("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`,J=x("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,K=i.memo(({toast:e,position:t,style:a,children:s})=>{let r=e.height?((e,t)=>{let a=e.includes("top")?1:-1,[s,r]=j()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[`
0% {transform: translate3d(0,${-200*a}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${-150*a}%,-1px) scale(.6); opacity:0;}
`];return{animation:t?`${b(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${b(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},o=i.createElement(Y,{toast:e}),l=i.createElement(J,{...e.ariaProps},v(e.message,e));return i.createElement(Z,{className:e.className,style:{...r,...a,...e.style}},"function"==typeof s?s({icon:o,message:l}):i.createElement(i.Fragment,null,o,l))});o=i.createElement,u.p=void 0,h=o,g=void 0,y=void 0;var V=({id:e,className:t,style:a,onHeightUpdate:s,children:r})=>{let o=i.useCallback(t=>{if(t){let a=()=>{s(e,t.getBoundingClientRect().height)};a(),new MutationObserver(a).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,s]);return i.createElement("div",{ref:o,className:t,style:a},r)},X=f`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,ee=({reverseOrder:e,position:t="top-center",toastOptions:a,gutter:s,children:r,toasterId:o,containerStyle:l,containerClassName:n})=>{let{toasts:d,handlers:c}=((e,t="default")=>{let{toasts:a,pausedAt:s}=((e={},t=C)=>{let[a,s]=(0,i.useState)($[t]||k),r=(0,i.useRef)($[t]);(0,i.useEffect)(()=>(r.current!==$[t]&&s($[t]),N.push([t,s]),()=>{let e=N.findIndex(([e])=>e===t);e>-1&&N.splice(e,1)}),[t]);let o=a.toasts.map(t=>{var a,s,r;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(a=e[t.type])?void 0:a.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(s=e[t.type])?void 0:s.duration)||(null==e?void 0:e.duration)||A[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}});return{...a,toasts:o}})(e,t),r=(0,i.useRef)(new Map).current,o=(0,i.useCallback)((e,t=_)=>{if(r.has(e))return;let a=setTimeout(()=>{r.delete(e),l({type:4,toastId:e})},t);r.set(e,a)},[]);(0,i.useEffect)(()=>{if(s)return;let e=Date.now(),r=a.map(a=>{if(a.duration===1/0)return;let s=(a.duration||0)+a.pauseDuration-(e-a.createdAt);if(s<0){a.visible&&P.dismiss(a.id);return}return setTimeout(()=>P.dismiss(a.id,t),s)});return()=>{r.forEach(e=>e&&clearTimeout(e))}},[a,s,t]);let l=(0,i.useCallback)(I(t),[t]),n=(0,i.useCallback)(()=>{l({type:5,time:Date.now()})},[l]),d=(0,i.useCallback)((e,t)=>{l({type:1,toast:{id:e,height:t}})},[l]),c=(0,i.useCallback)(()=>{s&&l({type:6,time:Date.now()})},[s,l]),u=(0,i.useCallback)((e,t)=>{let{reverseOrder:s=!1,gutter:r=8,defaultPosition:o}=t||{},i=a.filter(t=>(t.position||o)===(e.position||o)&&t.height),l=i.findIndex(t=>t.id===e.id),n=i.filter((e,t)=>t<l&&e.visible).length;return i.filter(e=>e.visible).slice(...s?[n+1]:[0,n]).reduce((e,t)=>e+(t.height||0)+r,0)},[a]);return(0,i.useEffect)(()=>{a.forEach(e=>{if(e.dismissed)o(e.id,e.removeDelay);else{let t=r.get(e.id);t&&(clearTimeout(t),r.delete(e.id))}})},[a,o]),{toasts:a,handlers:{updateHeight:d,startPause:n,endPause:c,calculateOffset:u}}})(a,o);return i.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...l},className:n,onMouseEnter:c.startPause,onMouseLeave:c.endPause},d.map(a=>{let o,l,n=a.position||t,d=c.calculateOffset(a,{reverseOrder:e,gutter:s,defaultPosition:t}),u=(o=n.includes("top"),l=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{},{left:0,right:0,display:"flex",position:"absolute",transition:j()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${d*(o?1:-1)}px)`,...o?{top:0}:{bottom:0},...l});return i.createElement(V,{id:a.id,key:a.id,onHeightUpdate:c.updateHeight,className:a.visible?X:"",style:u},"custom"===a.type?v(a.message,a):r?r(a):i.createElement(K,{toast:a,position:n}))}))},et=P},67869:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var s=a(95155),r=a(12115),o=a(73321),i=a(55368),l=a(30313),n=a(88541),d=a(90927),c=a(2581);function u({title:e,children:t}){return(0,s.jsx)(l.cP,{title:e,children:t})}function p(){let e=(0,o.useParams)(),t="string"==typeof e?.studentUserId?e.studentUserId:"",[a,p]=(0,r.useState)(null),[m,f]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(!t)return;let e=!1;return(0,n.BT)(t).then(t=>{e||p(t)}).catch(t=>{e||(0,c.Qg)(t instanceof Error?t.message:"Failed to load details")}).finally(()=>{e||f(!1)}),()=>{e=!0}},[t]);let h=a?.user,g=a?.profile,y=a?.enrollment,b=y?.schoolClass?.displayName,x=(0,d.oG)(h?.profileImage),v=(h?.fullName||"?").split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()).join("");return(0,s.jsx)(i.R,{title:m?"Student details":h?.fullName||"Student details",description:"Admission and contact information on file with the school.",children:m?(0,s.jsxs)("div",{className:"space-y-4 animate-pulse",children:[(0,s.jsx)("div",{className:"h-28 rounded-lg bg-slate-100"}),(0,s.jsx)("div",{className:"h-40 rounded-lg bg-slate-100"})]}):a?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg border border-slate-100 bg-white p-5 shadow-sm sm:flex-row sm:items-center",children:[(0,s.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary-50 text-lg font-semibold text-primary-800",children:h?.profileImage&&x?(0,s.jsx)("img",{src:x,alt:"",className:"h-full w-full object-cover"}):v}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xl font-semibold text-slate-900",children:h?.fullName}),(0,s.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:[b,h?.studentCode?`ID ${h.studentCode}`:null,y?.rollNumber?`Roll ${y.rollNumber}`:null].filter(Boolean).join(" \xb7 ")||h?.email})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsxs)(u,{title:"Class & admission",children:[(0,s.jsx)(l.CL,{label:"Class",value:b}),(0,s.jsx)(l.CL,{label:"Roll number",value:y?.rollNumber}),(0,s.jsx)(l.CL,{label:"Admission number",value:g?.admissionNumber}),(0,s.jsx)(l.CL,{label:"Admission date",value:g?.admissionDate}),(0,s.jsx)(l.CL,{label:"Category",value:g?.category?.name}),(0,s.jsx)(l.CL,{label:"Group",value:g?.group?.name})]}),(0,s.jsxs)(u,{title:"Personal",children:[(0,s.jsx)(l.CL,{label:"Date of birth",value:g?.dateOfBirth}),(0,s.jsx)(l.CL,{label:"Gender",value:g?.gender}),(0,s.jsx)(l.CL,{label:"Blood group",value:g?.bloodGroup}),(0,s.jsx)(l.CL,{label:"Address",value:g?.address}),(0,s.jsx)(l.CL,{label:"City",value:g?.city})]}),(0,s.jsxs)(u,{title:"Parents & guardian",children:[(0,s.jsx)(l.CL,{label:"Father",value:g?.fatherName}),(0,s.jsx)(l.CL,{label:"Father phone",value:g?.fatherPhone}),(0,s.jsx)(l.CL,{label:"Mother",value:g?.motherName}),(0,s.jsx)(l.CL,{label:"Mother phone",value:g?.motherPhone}),(0,s.jsx)(l.CL,{label:"Guardian",value:g?.guardianName})]})]})]}):(0,s.jsx)(l.i0,{title:"Could not load record",description:"This child may not be linked to your account or enrolled in school."})})}},88541:(e,t,a)=>{a.d(t,{BT:()=>l,CP:()=>f,OI:()=>c,W6:()=>o,WR:()=>u,hi:()=>d,kN:()=>i,mk:()=>n,n9:()=>m,xw:()=>p});var s=a(76541);function r(e){if(!e.data.success||void 0===e.data.data)throw Error(e.data.message||"Request failed");return e.data.data}async function o(){return r(await s.uE.get("/school/parent/home"))}async function i(e){return r(await s.uE.get(`/school/parent/children/${e}/overview`))}async function l(e){return r(await s.uE.get(`/school/parent/children/${e}/details`))}async function n(e){return r(await s.uE.get(`/school/parent/children/${e}/notices`))}async function d(e){return r(await s.uE.get(`/school/parent/children/${e}/homework`))}async function c(e,t){return r(await s.uE.get(`/school/parent/children/${e}/attendance`,{params:t}))}async function u(e){return r(await s.uE.get(`/school/parent/children/${e}/fees`))}async function p(e){return r(await s.uE.get(`/school/parent/children/${e}/exams`))}async function m(e,t){return r(await s.uE.get(`/school/parent/children/${e}/exam-result`,{params:{examId:t}}))}async function f(){return r(await s.uE.get("/school/parent/holidays"))}}}]);