(()=>{var a={};a.id=71024,a.ids=[71024],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},14647:(a,b,c)=>{"use strict";c.d(b,{B:()=>e,J:()=>f});var d=c(48249);function e({disabled:a}){return(0,d.jsx)("button",{type:"button",disabled:a,onClick:()=>window.print(),className:"inline-flex min-h-[40px] items-center justify-center rounded-md bg-primary-700 px-4 py-2 text-sm font-medium text-white hover:bg-primary-800 disabled:opacity-50 print:hidden",children:"Print / Save PDF"})}function f({letterhead:a,title:b,subtitle:c,meta:f,children:g,actions:h}){return(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 print:hidden",children:[h,(0,d.jsx)(e,{})]}),(0,d.jsxs)("div",{id:"sms-print-report",className:"overflow-hidden rounded-lg border border-slate-200 bg-white shadow-sm print:border-0 print:shadow-none",children:[(0,d.jsxs)("div",{className:"border-b border-slate-200 bg-slate-50 px-5 py-5 text-center sm:px-8",children:[(0,d.jsx)("p",{className:"text-xl font-bold tracking-tight text-slate-900 sm:text-2xl",children:a?.academyName||"School"}),a?.tagline?(0,d.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:a.tagline}):null,(0,d.jsx)("p",{className:"mt-3 text-base font-semibold uppercase tracking-wide text-slate-800",children:b}),c?(0,d.jsx)("p",{className:"mt-1 text-sm text-slate-600",children:c}):null,f?(0,d.jsx)("p",{className:"mt-1 text-xs text-slate-500",children:f}):null]}),(0,d.jsx)("div",{className:"px-4 py-5 sm:px-8 sm:py-6",children:g}),(0,d.jsx)("div",{className:"border-t border-slate-100 px-5 py-4 text-xs text-slate-400 sm:px-8",children:"Generated for school records \xb7 Use Print / Save PDF for a paper copy"})]}),(0,d.jsx)("style",{children:`
        @media print {
          body * { visibility: hidden !important; }
          #sms-print-report, #sms-print-report * { visibility: visible !important; }
          #sms-print-report {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            border: none !important;
            box-shadow: none !important;
          }
        }
      `})]})}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31885:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/admin/sms/reports/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/admin/sms/reports/page.tsx","default")},33873:a=>{"use strict";a.exports=require("path")},36417:(a,b,c)=>{Promise.resolve().then(c.bind(c,31885))},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},49569:(a,b,c)=>{Promise.resolve().then(c.bind(c,99895))},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},60292:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>C.a,__next_app__:()=>K,handler:()=>M,routeModule:()=>L});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(63747),o=c(24235),p=c(23938),q=c(261),r=c(66758),s=c(77243),t=c(26713),u=c(37527),v=c(22820),w=c(88216),x=c(47929),y=c(79551),z=c(89125),A=c(86439),B=c(95547),C=c.n(B),D=c(61287),E=c(81494),F=c(70722),G=c(70753),H=c(43954),I={};for(let a in D)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(I[a]=()=>D[a]);c.d(b,I);let J={children:["",{children:["admin",{children:["sms",{children:["reports",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,31885)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/admin/sms/reports/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,38876)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/admin/layout.tsx"],template:[()=>Promise.resolve().then(c.bind(c,84260)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/admin/template.tsx"],loading:[()=>Promise.resolve().then(c.bind(c,75144)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/admin/loading.tsx"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,46055))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,80321)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/layout.tsx"],template:[()=>Promise.resolve().then(c.bind(c,40640)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/template.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.bind(c,37548)),"/Users/reeyabasnet/dplms/launchPadLms-frontend/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,46055))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,K={require:c,loadChunk:()=>Promise.resolve()},L=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/admin/sms/reports/page",pathname:"/admin/sms/reports",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:J},distDir:".next",relativeProjectDir:""});async function M(a,b,d){var B;L.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let I=!!(0,h.getRequestMeta)(a,"minimalMode"),N="/admin/sms/reports/page";"/index"===N&&(N="/");let O=await L.prepare(a,b,{srcPage:N,multiZoneDraftMode:!1});if(!O)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:P,query:Q,params:R,pageIsDynamic:S,buildManifest:T,nextFontManifest:U,reactLoadableManifest:V,serverActionsManifest:W,clientReferenceManifest:X,subresourceIntegrityManifest:Y,prerenderManifest:Z,isDraftMode:$,resolvedPathname:_,revalidateOnlyGenerated:aa,routerServerContext:ab,nextConfig:ac,parsedUrl:ad,interceptionRoutePatterns:ae,deploymentId:af}=O,ag=(0,q.normalizeAppPath)(N),{isOnDemandRevalidate:ah}=O,ai=ac.experimental.ppr&&!ac.cacheComponents&&(0,H.isInterceptionRouteAppPath)(_)?null:L.match(_,Z),aj=!!Z.routes[_],ak=a.headers["user-agent"]||"",al=(0,t.getBotType)(ak),am=(0,p.isHtmlBotRequest)(a),an=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ao=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],ap=(0,r.getIsPossibleServerAction)(a),aq=(0,m.checkIsAppPPREnabled)(ac.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&aq&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let ar=aq&&(null==(B=Z.routes[ag]??Z.dynamicRoutes[ag])?void 0:B.renderingMode)==="PARTIALLY_STATIC",as=!1,at=!1,au=ar?(0,h.getRequestMeta)(a,"postponed"):void 0,av=ar&&ao&&!an;I&&(av=av&&!!au);let aw=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ax=(!am||!ar)&&(!ak||(0,p.shouldServeStreamingMetadata)(ak,ac.htmlLimitedBots)),ay=!!((ai||aj||Z.routes[ag])&&!(am&&ar)),az=ar&&!0===ac.cacheComponents,aA=!0===L.isDev||!ay||"string"==typeof au||(az&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?av&&!I:av),aB=am&&ar,aC=null;$||!ay||aA||ap||au||av||(aC=_);let aD=aC;!aD&&L.isDev&&(aD=_),L.isDev||$||!ay||!ao||av||(0,k.d)(a.headers);let aE={...D,tree:J,GlobalError:C(),handler:M,routeModule:L,__next_app__:K};W&&X&&(0,o.setManifestsSingleton)({page:N,clientReferenceManifest:X,serverActionsManifest:W});let aF=a.method||"GET",aG=(0,g.getTracer)(),aH=aG.getActiveScopeSpan(),aI=async()=>((null==ab?void 0:ab.render404)?await ab.render404(a,b,ad,!1):b.end("This page could not be found"),null);try{let f=L.getVaryHeader(_,ae);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return L.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aG.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aF} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aF} ${N}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:Q,params:R,page:ag,sharedContext:{buildId:P},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aE,Component:(0,j.T)(aE),params:R,routeModule:L,page:N,postponed:f,shouldWaitOnAllReady:aB,serveStreamingMetadata:ax,supportsDynamicResponse:"string"==typeof f||aA,buildManifest:T,nextFontManifest:U,reactLoadableManifest:V,subresourceIntegrityManifest:Y,setCacheStatus:null==ab?void 0:ab.setCacheStatus,setIsrStatus:null==ab?void 0:ab.setIsrStatus,setReactDebugChannel:null==ab?void 0:ab.setReactDebugChannel,sendErrorsToBrowser:null==ab?void 0:ab.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),L.relativeProjectDir),isDraftMode:$,botType:al,isOnDemandRevalidate:ah,isPossibleServerAction:ap,assetPrefix:ac.assetPrefix,nextConfigOutput:ac.output,crossOrigin:ac.crossOrigin,trailingSlash:ac.trailingSlash,images:ac.images,previewProps:Z.preview,deploymentId:af,enableTainting:ac.experimental.taint,htmlLimitedBots:ac.htmlLimitedBots,reactMaxHeadersLength:ac.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ac.cacheLife,basePath:ac.basePath,serverActions:ac.experimental.serverActions,...as||at?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:as}:{},cacheComponents:!!ac.cacheComponents,experimental:{isRoutePPREnabled:ar,expireTime:ac.expireTime,staleTimes:ac.experimental.staleTimes,dynamicOnHover:!!ac.experimental.dynamicOnHover,inlineCss:!!ac.experimental.inlineCss,authInterrupts:!!ac.experimental.authInterrupts,clientTraceMetadata:ac.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ac.experimental.clientParamParsingOrigins},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>L.onRequestError(a,b,d,e,ab),err:(0,h.getRequestMeta)(a,"invokeError"),dev:L.isDev}};as&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=as),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,ay&&(null==p?void 0:p.revalidate)===0&&!L.isDev&&!ar){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${_}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:n,headers:q,rscData:o.flightData,postponed:o.postponed,status:o.statusCode,segmentData:o.segmentData},cacheControl:p}},p=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===L.isDev,q=c||b.writableEnded;if(ah&&aa&&!f&&!I)return(null==ab?void 0:ab.render404)?await ab.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ai&&(k=(0,v.parseFallbackField)(ai.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(ak)&&(!ar||am)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ah=!0),ah&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!I&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aD&&!q&&!$&&S&&(l||!aj)){if((l||ai)&&k===v.FallbackMode.NOT_FOUND){if(ac.experimental.adapterPath)return await aI();throw new A.NoFallbackError}if(ar&&(ac.cacheComponents?!av:!ao)){let b=l&&"string"==typeof(null==ai?void 0:ai.fallback)?ai.fallback:ag,c=l&&(null==ai?void 0:ai.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(ai.fallbackRouteParams):at?(0,n.getFallbackRouteParams)(ag,L):null,f=await L.handleResponse({cacheKey:b,req:a,nextConfig:ac,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:Z,isRoutePPREnabled:ar,responseGenerator:async()=>o({span:i,postponed:void 0,fallbackRouteParams:c,forceStaticRender:!1}),waitUntil:d.waitUntil,isMinimalMode:I});if(null===f)return null;if(f)return delete f.cacheControl,f}}let r=ah||g||!au?void 0:au;if(az&&!I&&m&&av&&!j){let b=await m.get(_,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,G.scheduleOnNextTick)(async()=>{let b=L.getResponseCache(a);try{await b.revalidate(_,m,ar,!1,a=>p({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if(as&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=l&&(null==ai?void 0:ai.fallbackRouteParams)&&(0,h.getRequestMeta)(a,"renderFallbackShell")?(0,n.createOpaqueFallbackRouteParams)(ai.fallbackRouteParams):at?(0,n.getFallbackRouteParams)(ag,L):null;return o({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},q=async c=>{var f,g,i,j,k;let l,m=await L.handleResponse({cacheKey:aC,responseGenerator:a=>p({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ah,isRoutePPREnabled:ar,req:a,nextConfig:ac,prerenderManifest:Z,waitUntil:d.waitUntil,isMinimalMode:I});if($&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!m){if(aC)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;ay&&!av&&(!n||an)&&(I||b.setHeader("x-nextjs-cache",ah?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=m;if(au)l={revalidate:0,expire:void 0};else if(av)l={revalidate:0,expire:void 0};else if(!L.isDev)if($)l={revalidate:0,expire:void 0};else if(ay){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??ac.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof aw&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];I&&ay&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(aw);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=az?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(q.headers){let a={...q.headers};for(let[c,d]of(I&&ay||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=q.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(I&&ay&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||ao&&ar||(b.statusCode=q.status),!I&&q.status&&E.RedirectStatusCode[q.status]&&ao&&(b.statusCode=200),n&&!av&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ao&&!$){if(void 0===q.rscData){if(q.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(ac.cacheComponents)return b.statusCode=404,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new F.InvariantError(`Expected RSC response, got ${q.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:q.html,cacheControl:m.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(q.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=q.html;if(!n||I||ao)return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:m.cacheControl});if(as)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.push(A.readable),o({span:c,postponed:q.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aH)return await aG.withPropagatedContext(a.headers,()=>aG.trace(i.BaseServerSpan.handleRequest,{spanName:`${aF} ${N}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aF,"http.target":a.url}},q));await q(aH)}catch(b){throw b instanceof A.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:N,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:ay,isOnDemandRevalidate:ah})},!1,ab),b}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},81630:a=>{"use strict";a.exports=require("http")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91415:(a,b,c)=>{"use strict";c.d(b,{f:()=>j});var d=c(48249),e=c(60932),f=c(40433),g=c(14113),h=c(17060);let i=[{href:f.bw.SMS_ADMIN.REPORTS_ATTENDANCE,label:"Attendance",match:a=>a===f.bw.SMS_ADMIN.REPORTS||a===f.bw.SMS_ADMIN.REPORTS_ATTENDANCE},{href:f.bw.SMS_ADMIN.REPORTS_PROGRESS_CARD,label:"Progress card",match:a=>a.startsWith(f.bw.SMS_ADMIN.REPORTS_PROGRESS_CARD)},{href:f.bw.SMS_ADMIN.REPORTS_MARK_SHEET,label:"Mark sheet",match:a=>a.startsWith(f.bw.SMS_ADMIN.REPORTS_MARK_SHEET)},{href:f.bw.SMS_ADMIN.REPORTS_MERIT_LIST,label:"Merit list",match:a=>a.startsWith(f.bw.SMS_ADMIN.REPORTS_MERIT_LIST)},{href:f.bw.SMS_ADMIN.REPORTS_STUDENT,label:"Student",match:a=>a.startsWith(f.bw.SMS_ADMIN.REPORTS_STUDENT)},{href:f.bw.SMS_ADMIN.REPORTS_CLASS,label:"Class",match:a=>a.startsWith(f.bw.SMS_ADMIN.REPORTS_CLASS)},{href:f.bw.SMS_ADMIN.REPORTS_FEES,label:"Fees statement",match:a=>a.startsWith(f.bw.SMS_ADMIN.FEES_STATEMENT)}];function j(){let a=(0,h.sK)()??"";return(0,d.jsx)("nav",{className:"flex gap-1 overflow-x-auto rounded-lg border border-slate-200 bg-slate-50/80 p-1 scrollbar-none print:hidden","aria-label":"School reports sections",children:i.map(b=>{let c=b.match(a);return(0,d.jsx)(e.u,{href:b.href,className:(0,g.xW)("inline-flex shrink-0 items-center gap-1.5 rounded-md px-3 py-2 text-sm font-medium transition-all duration-200 ease-out motion-reduce:transition-none",c?"bg-white text-primary-800 shadow-sm ring-1 ring-slate-200/80":"text-slate-600 hover:bg-white hover:text-slate-900 hover:shadow-sm"),"aria-current":c?"page":void 0,children:b.label},b.href)})})}},94735:a=>{"use strict";a.exports=require("events")},99895:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(84466),g=c(82697),h=c(91415),i=c(14647),j=c(81152),k=c(91115);function l(){let[a,b]=(0,e.useState)([]),[c,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(!1),u=(0,e.useCallback)(async()=>{if(c){t(!0);try{r(await (0,j.Wh)({schoolClassId:c,from:m||void 0,to:o||void 0}))}catch(a){(0,k.Qg)(a instanceof Error?a.message:"Failed to load report"),r(null)}finally{t(!1)}}},[c,m,o]);return(0,d.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,d.jsx)(f.wc,{title:"Attendance report",description:"Present, absent, and late counts per student — printable for the office."}),(0,d.jsx)(h.f,{}),(0,d.jsxs)(g.r7,{children:[(0,d.jsx)(g.yB,{label:"Class",className:"min-w-0 flex-1 sm:min-w-[12rem]",children:(0,d.jsxs)(g.Kd,{value:c,onChange:a=>l(a.target.value),children:[(0,d.jsx)("option",{value:"",children:"Select class"}),a.map(a=>(0,d.jsx)("option",{value:a.id,children:a.displayName},a.id))]})}),(0,d.jsx)(g.yB,{label:"From",className:"min-w-0 flex-1 sm:min-w-[10rem]",children:(0,d.jsx)(g.IM,{value:m,onChange:a=>n(a.target.value)})}),(0,d.jsx)(g.yB,{label:"To",className:"min-w-0 flex-1 sm:min-w-[10rem]",children:(0,d.jsx)(g.IM,{value:o,onChange:a=>p(a.target.value)})}),(0,d.jsx)(g.bE,{children:(0,d.jsx)(g.kL,{type:"button",onClick:()=>void u(),disabled:!c||s,children:s?"Loading…":"Generate"})})]}),q?(0,d.jsx)(i.J,{title:"Attendance report",subtitle:q.schoolClass.displayName,meta:`${q.totalSessions} session(s)${m||o?` \xb7 ${m||"…"} to ${o||"…"}`:""}`,children:(0,d.jsx)(g.T7,{children:(0,d.jsxs)(g.cR,{minWidth:"36rem",children:[(0,d.jsx)(g.K_,{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:`${g.aB} font-medium`,children:"Student"}),(0,d.jsx)("th",{className:`${g.aB} font-medium`,children:"Roll"}),(0,d.jsx)("th",{className:`${g.aB} font-medium text-center`,children:"Present"}),(0,d.jsx)("th",{className:`${g.aB} font-medium text-center`,children:"Late"}),(0,d.jsx)("th",{className:`${g.aB} font-medium text-center`,children:"Absent"}),(0,d.jsx)("th",{className:`${g.aB} font-medium text-center`,children:"%"})]})}),(0,d.jsx)("tbody",{children:0===q.students.length?(0,d.jsx)(g.tU,{colSpan:6,children:"No attendance data for this range."}):q.students.map(a=>(0,d.jsxs)("tr",{className:"border-t border-slate-100",children:[(0,d.jsx)("td",{className:`${g.Cl} font-medium text-slate-900`,children:a.fullName}),(0,d.jsx)("td",{className:g.Cl,children:a.rollNumber||"—"}),(0,d.jsx)("td",{className:`${g.Cl} text-center`,children:a.present}),(0,d.jsx)("td",{className:`${g.Cl} text-center`,children:a.late}),(0,d.jsx)("td",{className:`${g.Cl} text-center`,children:a.absent}),(0,d.jsxs)("td",{className:`${g.Cl} text-center font-medium`,children:[a.attendancePercent??"—","%"]})]},a.userId))})]})})}):null]})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[3445,24751,36934,65573,47473,41421,56693,54313,26659,72118,7450,86175,30993,82697,65236,72394,33682,81152],()=>b(b.s=60292));module.exports=c})();