1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49807],{54998:(e,t,s)=>{"use strict";s.d(t,{b:()=>i});let a={asyncEndpoint:"/api/v2/osce-async",asyncClaudeEndpoint:"/api/v2/osce-async-claude-fulltranscript",trainingEndpoint:"/api/v2/training",multipartInitEndpoint:"/api/v2/osce/multipart-init",multipartChunkEndpoint:"/api/v2/osce/multipart-chunk",multipartCompleteEndpoint:"/api/v2/osce/multipart-complete",queueStatusEndpoint:"/api/v2/osce/queue/status",queueStatusBatchEndpoint:"/api/v2/osce/queue/status-batch",adminErrorsEndpoint:"/api/v2/osce/admin/errors",adminRequeueEndpoint:"/api/v2/osce/admin/requeue",statusEndpoint:"/api/v2/osce/status",recordEndpoint:"/api/v2/osce/record"};function i(e){return{...a,...e||{}}}},71318:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>ek,default:()=>ew});var a=s(37876),i=s(14232),r=s(77328),n=s.n(r),l=s(31015),o=s(71538),d=s(660),c=s(90903),u=s(59899),m=s(19982),p=s(44734),h=s(42898),x=s(74015),g=s(8021),b=s(30339),f=s(46863),_=s(5002),y=s(12878),v=s(82168),A=s(14262),j=s(64675),C=s(89099),S=s(66810),k=s(85115),w=s(13868),I=s(77235),E=s(24549),N=s(29354),L=s(87173),P=s(63984),R=s(25926),$=s(71152),B=s(53460),T=s(86064),V=s(90724),z=s(54998),O=s(20072),F=s(96675),M=s(97685),D=s(21392),U=s(32937),q=s(65648),W=s(78163),Y=s(52563),G=s(12992),J=s(796),H=s(97384),K=s(51522),Q=s(77090),X=s(9846),Z=s(69257),ee=s(94870),et=s(10163),es=s(50634),ea=s(42922),ei=s(64243),er=s(38555),en=s(99795),el=s(19116),eo=s(56947),ed=s(88057),ec=s(66994),eu=s(13814),em=s(17455),ep=s(40137),eh=s(97544),ex=s(2769),eg=s(21961),eb=s(30997),ef=s(23647);let e_=["osce-module-lucy-dystocia","osce-module-turtle"],ey={"osce-module-lucy-dystocia":{name:"Lucy Dystocia Consultation (Research)",color:"#d84315",maxPoints:24},"osce-module-turtle":{name:"Slider Turtle Husbandry (Research)",color:"#4169E1",maxPoints:31}},ev={"osce-module-lucy-dystocia":"Lucy","osce-module-turtle":"Turtle"},eA=(e,t)=>{if("number"==typeof t&&t>0)return t;let s=e?ey[e]:void 0;return s?.maxPoints??31},ej=e=>{if(!e)return null;let t=e.toLowerCase();return t.includes("turtle")?"osce-module-turtle":t.includes("lucy")||t.includes("dystocia")||t.includes("rusk")?"osce-module-lucy-dystocia":e},eC=Object.keys(ey),eS=(0,z.b)({asyncEndpoint:"/api/v2/osce/research/async",asyncClaudeEndpoint:"/api/v2/osce/research/async-claude-fulltranscript",multipartInitEndpoint:"/api/v2/osce/research/multipart-init",multipartChunkEndpoint:"/api/v2/osce/research/multipart-chunk",multipartCompleteEndpoint:"/api/v2/osce/research/multipart-complete",queueStatusEndpoint:"/api/v2/osce/research/queue/status",queueStatusBatchEndpoint:"/api/v2/osce/research/queue/status-batch",adminErrorsEndpoint:"/api/v2/osce/research/admin/errors",adminRequeueEndpoint:"/api/v2/osce/research/admin/requeue",statusEndpoint:"/api/v2/osce/research/status",recordEndpoint:"/api/v2/osce/research/record"});var ek=!0;let ew=({user:e,userRole:t,department:s,isMasterUser:r,adminData:z,availableCampuses:ek})=>{let ew=(0,C.useRouter)(),[eI,eE]=(0,i.useState)(!0),[eN,eL]=(0,i.useState)([]),[eP,eR]=(0,i.useState)([]),[e$,eB]=(0,i.useState)(null),[eT,eV]=(0,i.useState)(null),[ez,eO]=(0,i.useState)(!1),[eF,eM]=(0,i.useState)(!1),[eD,eU]=(0,i.useState)(null),[eq,eW]=(0,i.useState)(null),[eY,eG]=(0,i.useState)(!1),eJ=(0,i.useMemo)(()=>{let e=[];return eC.forEach(t=>{try{let s=(0,V.cu)(t);if(!s)return;let a=ey[t]?.name||s.displayName||s.scenarioTitle||t;e.push({id:t,label:a,definition:s})}catch(e){}}),e},[]),eH=(0,i.useMemo)(()=>{let t=z?.email||e?.email||"",s=z?.auth_user_id||(z?.id?String(z.id):null)||e?.id||t,a=[z?.first_name,z?.last_name].filter(Boolean).join(" ");return{id:String(s),email:t,name:a||z?.display_name||z?.name||e?.user_metadata?.full_name||t}},[z,e]),eK=(0,i.useCallback)(async t=>{try{let{error:s}=await w.supabase.from("osce_research_grade_edit_log").insert({osce_grade_id:t.gradeId,admin_user_id:e?.id||eH.id,admin_email:eH.email,edit_type:t.editType,skill_key:t.skillKey||null,old_value:t.oldValue,new_value:t.newValue})}catch(e){}},[e?.id,eH.id,eH.email]),[eQ,eX]=(0,i.useState)(0),[eZ,e0]=(0,i.useState)(""),[e1,e2]=(0,i.useState)("all"),[e5,e6]=(0,i.useState)("name"),[e3,e8]=(0,i.useState)("asc"),[e4,e9]=(0,i.useState)({totalStudents:0,totalSubmissions:0,averageScore:0,averageMaxScore:0,passRate:0}),e7=(0,i.useCallback)(e=>{let t=new Set(e.map(e=>e.email||e.studentName||e.studentId)),s=e.length,a=e.reduce((e,t)=>
1e+t.pointsEarned,0),i=e.reduce((e,t)=>e+eA(t.moduleId,t.pointsPossible),0),r=e.filter(e=>e.percentage>=70).length;return{totalStudents:t.size,totalSubmissions:s,averageScore:s>0?a/s:0,averageMaxScore:s>0?i/s:0,passRate:s>0?r/s*100:0}},[]),[te,tt]=(0,i.useState)(new Set),[ts,ta]=(0,i.useState)(!1),[ti,tr]=(0,i.useState)(!1),[tn,tl]=(0,i.useState)(!1),[to,td]=(0,i.useState)(!1),[tc,tu]=(0,i.useState)(null),tm=eA(eT?ej(eT.module_id||eT.assignment_id||e$?.moduleId||eT.submission_id||eT.id)||e$?.moduleId||null:e$?.moduleId||null,eT?.points_possible??null),[tp,th]=(0,i.useState)([]),[tx,tg]=(0,i.useState)(!1),[tb,tf]=(0,i.useState)(null),[t_,ty]=(0,i.useState)(!1),[tv,tA]=(0,i.useState)(!1),[tj,tC]=(0,i.useState)(null),[tS,tk]=(0,i.useState)(!1),[tw,tI]=(0,i.useState)(null),[tE,tN]=(0,i.useState)({}),[tL,tP]=(0,i.useState)(!1),[tR,t$]=(0,i.useState)(null),[tB,tT]=(0,i.useState)(""),[tV,tz]=(0,i.useState)(null),tO=(0,i.useMemo)(()=>{let e=new Set;return Array.isArray(ek)&&ek.forEach(t=>{t&&e.add(String(t).trim().toUpperCase())}),z?.campus&&e.add(String(z.campus).trim().toUpperCase()),0===e.size&&e.add("GENI"),Array.from(e)},[ek,z?.campus]),tF=(0,i.useMemo)(()=>[...tO],[tO]),[tM,tD]=(0,i.useState)(tO[0]??"GENI");(0,i.useEffect)(()=>{tD(e=>{let t=(e??"").toString().trim().toUpperCase();return tO.includes(t)?t:tO[0]??"GENI"})},[tO]);let tU=(0,i.useMemo)(()=>{let e=(tM??"").toString().trim().toUpperCase();return e?[e]:[...tO]},[tM,tO]),tq=tO.length<=1,tW=(0,i.useMemo)(()=>{let e=(tM??"").toString().trim().toUpperCase();return"ALL"===e||"ALL CAMPUSES"===e||"ALL_CAMPUSES"===e},[tM]),tY=(0,i.useMemo)(()=>{let e=(e1??"").toString().trim().toLowerCase();return"all"===e||"all_modules"===e},[e1]),tG=(0,i.useMemo)(()=>!tW&&!tY,[tW,tY]);(0,i.useEffect)(()=>{tt(new Set),ta(!1),th([]),tf(null),tk(!1),tI(null)},[tM]);let tJ=(0,i.useMemo)(()=>tp.filter(e=>!e.is_grade_visible).map(e=>e.module_id),[tp]),tH=(0,i.useMemo)(()=>{if(0===te.size)return{modules:[],rowCount:0};let e=new Set(tJ),t=new Set,s=0;return eN.forEach(a=>{a.moduleId&&e.has(a.moduleId)&&te.has(a.osceId)&&(t.add(a.moduleId),s+=1)}),{modules:Array.from(t),rowCount:s}},[tJ,eN,te]).modules,tK=tJ.length>0,tQ=tH.length>0,tX=(0,i.useMemo)(()=>eP.filter(e=>te.has(e.osceId)),[eP,te]);(0,i.useEffect)(()=>{let e=tX.length;if(0===e)return void tT("");let t=eP.length>0&&e===eP.length;if(1===e){let e=tX[0];tT(`Release ${e.moduleId||"module"} for ${e.studentName||"student"}`);return}t?tT(`Release all ${e} rows currently shown by the filters`):tT(`Release ${e} selected rows only`)},[eP,tX]);let tZ=async(e,t)=>{try{if(!t)return null;let{data:e,error:s}=await w.supabase.from("osce_research_grades").select("*").eq("id",t).single(),a=e?.ai_feedback,i=e?.rubric_scores;if("string"==typeof e?.ai_feedback)try{a=JSON.parse(e.ai_feedback)}catch(e){}if("string"==typeof e?.rubric_scores)try{i=JSON.parse(e.rubric_scores)}catch(e){}if(s)return null;return{id:e.id,submission_id:e.submission_id,module_id:e.module_id,assignment_id:e.assignment_id,points_earned:e.points_earned,points_possible:e.points_possible,percentage:e.percentage,status:e.status,created_at:e.created_at,graded_at:e.graded_at,ai_feedback:a,rubric_scores:i,transcript_data:a}}catch(e){return null}},t0=(0,i.useCallback)(async()=>{tg(!0),tf(null);let e=(tM??"").toString().trim().toUpperCase();try{let t=Array.from(new Set(eN.map(e=>e.moduleId).filter(Boolean)));if(!e||0===t.length)return void th([]);let s=t.map(async t=>{if(!t)return null;let{data:s,error:a}=await (0,E.li)({p_module_id:t,p_year_level:"Second Year",p_campus:e});return a||!s?null:{module_id:s.module_id,year_level:"Second Year",campus:e,is_visible:s.is_visible_now||!1,is_grade_visible:s.is_grade_visible_now||!1,status_text:s.status_text||"unknown",release_at:s.release_at||null,close_at:s.close_at||null,grade_release_at:s.grade_release_at||null,release_at_local:s.release_at_local||null,close_at_local:s.close_at_local||null,grade_release_at_local:s.grade_release_at_local||null,countdown_text:s.countdown_text||null,assignment_id:null,notes:null}}),a=(await Promise.all(s)).filter(Boolean);th(a)}catch(e){tf(e.message)}finally{tg(!1)}},[eN,tM]),t1=(0,i.useCallback)(async(e=!1)=>{let t=tU.length>0?tU:[...tO];e||eE(!0);try{Date.now();let{data:e,error:s}=await w.supabase.from("osce_research_gradebook_admin_vw").select("year_level, campus").in("campus",t).limit(10);s||e&&e.length;let{data:a,error:i}=await w.supabase.from("osce_research_gradebook_admin_vw").select(` 2 osce_id, 3 grade_id, 4 student_id, 5 student_name, 6 email, 7 uin, 8 campus, 9 year_level, 10 assignment_id, 11 module_id, 12 points_earned, 13 points_possible, 14 percentage, 15 status, 16 osce_created_at, 17 graded_at, 18 grade_is_hidden 19 `).eq("year_level","Second Year").in("campus",t).order("osce_created_at",{ascending:!1}).limit(2e3);if(Date.now(),i)return;if(0===(a?.length||0)){let{data:e,error:s}=await w.supabase.from("osce_research_grades").select(` 20 *, 21 osce!inner( 22 id, 23 student_id, 24 module_id, 25 assignment_id, 26 created_at, 27 is_hidden 28 ) 29 `).in("module_id",eC).in("campus",t).order("created_at",{ascending:!1});if(e&&e.length>0)a=e.map(e=>({osce_id:e.osce?.id||e.submission_id,grade_id:e.id,student_id:e.student_id||e.osce?.student_id,student_name:"Student (Roster Pending)",email:"",uin:"",campus:e.campus||("ALL"===tM?"ALL":tM),year_level:"Second Year",assignment_id:e.assignment_id||e.osce?.assignment_id,module_id:e.module_id,points_earned:e.points_earned,points_possible:e.points_possible,percentage:e.percentage,status:e.status,osce_created_at:e.osce?.created_at||e.created_at,graded_at:e.graded_at,grade_is_hidden:e.is_hidden??null}));else try{let{data:e,error:s}=await w.supabase.from("osce_research_grades").select("*").in("module_id",eC).in("campus",t).order("created_at",{ascending:!1}),i=e||[];if(i.length>0){let e=Array.from(new Set(i.map(e=>
29e.submission_id).filter(Boolean))),t={};if(e.length>0){let{data:s,error:a}=await w.supabase.from("osce_research").select("id, student_id, module_id, assignment_id, created_at, is_hidden").in("id",e);a||(t=(s||[]).reduce((e,t)=>(e[t.id]=t,e),{}))}a=i.map(e=>{let s=t[e.submission_id];return{osce_id:s?.id||e.submission_id,grade_id:e.id,student_id:e.student_id||s?.student_id,student_name:"Student (Roster Pending)",email:"",uin:"",campus:e.campus||s?.campus||("ALL"===tM?"ALL":tM),year_level:"Second Year",assignment_id:e.assignment_id||s?.assignment_id,module_id:e.module_id||s?.module_id,points_earned:e.points_earned,points_possible:e.points_possible,percentage:e.percentage,status:e.status,osce_created_at:s?.created_at||e.created_at,graded_at:e.graded_at,grade_is_hidden:e.is_hidden??null}})}}catch(e){}}else(a||[]).slice(0,3).forEach((e,t)=>{});let r=(a||[]).map(e=>{let t=ej(e.module_id||e.assignment_id||e.osce_id)||null,s=eA(t,Number(e.points_possible));return{osceId:e.osce_id,gradeId:e.grade_id,studentId:e.student_id,studentName:e.student_name||"Unknown Student",email:e.email||"",uin:e.uin||"",campus:e.campus||"",assignmentId:e.assignment_id||null,moduleId:t,pointsEarned:Number(e.points_earned)||0,pointsPossible:s,percentage:Number(e.percentage)||0,status:e.status||"pending",createdAt:e.osce_created_at,gradedAt:e.graded_at||null,gradeIsHidden:e.grade_is_hidden??null}}),n=new Set(eC);r=r.filter(e=>!e.moduleId||n.has(e.moduleId));let l=Array.from(new Set(r.map(e=>e.studentId).filter(Boolean)));if(l.length>0){let{data:e,error:t}=await w.supabase.from("student_roster").select("auth_user_id, first_name, last_name, uin, campus, year_level").in("auth_user_id",l).eq("year_level","Second Year");if(!t&&e){let t=new Map(e.map(e=>[e.auth_user_id,e]));r=r.map(e=>{let s=t.get(e.studentId);if(!s)return{...e,campus:e.campus||"N/A",uin:e.uin||"N/A"};let a=[s.first_name,s.last_name].filter(Boolean).join(" ").trim();return{...e,studentName:a||e.studentName,campus:s.campus||e.campus||"N/A",uin:s.uin||e.uin||"N/A"}})}}let o=r,d=e=>{let t=e.createdAt?Date.parse(e.createdAt):NaN;if(!Number.isNaN(t))return t;let s=e.gradedAt?Date.parse(e.gradedAt):NaN;return Number.isNaN(s)?0:s},c=new Map;o.forEach(e=>{if(!e.studentId||!e.moduleId)return;let t=`${e.studentId}|${e.moduleId}`,s=c.get(t);if(s){let a=d(s);d(e)>a&&c.set(t,e)}else c.set(t,e)});let u=Array.from(c.values()),m=new Set(["[email protected]","[email protected]"]),p=o.filter(e=>{let t=(e.email||"").toLowerCase();return!!t&&!!m.has(t)&&"osce-module-chocolate-toxicity"===ej(e.moduleId)}),h=u;if(p.length>0){let e=new Set(p.map(e=>{let t=ej(e.moduleId);return e.studentId&&t?`${e.studentId}|${t}`:null}).filter(Boolean));h=[...u.filter(t=>{let s=ej(t.moduleId);return!t.studentId||!s||!e.has(`${t.studentId}|${s}`)}),...p]}eL(h),eR(h);let x=e7(h);e9(x)}catch(e){}finally{e||eE(!1),tl(!1)}},[tU,tO,tM,e7]);(0,i.useEffect)(()=>{t1()},[t1]),(0,i.useEffect)(()=>{if(0===eP.length)return void tN({});let e=(tM??"").toString().trim().toUpperCase();if(!e)return;let t=new Set(tJ),s=[],a=new Set;(eP.forEach(e=>{if(!e.studentId||!e.moduleId||!t.has(e.moduleId))return;let i=`${e.studentId}|${e.moduleId}`;a.has(i)||(a.add(i),s.push({studentId:e.studentId,moduleId:e.moduleId}))}),0===s.length)?tN({}):(async()=>{tP(!0),t$(null);try{let t=Array.from(new Set(s.map(e=>e.studentId))),a=Array.from(new Set(s.map(e=>e.moduleId))),{data:i,error:r}=await w.supabase.from("osce_research_grade_release_overrides").select("student_uuid,module_id,released_at,expires_at").in("student_uuid",t).in("module_id",a).eq("year_level","Second Year").eq("campus",e);if(r)throw r;let n=i||[],l=new Map,o=Array.from(new Set(n.map(e=>e.student_uuid).filter(e=>!!e)));if(o.length>0){let{data:e,error:t}=await w.supabase.from("student_roster").select("auth_user_id, first_name, last_name, tamu_email").in("auth_user_id",o).eq("year_level","Second Year");t||e&&(l=new Map(e.map(e=>[e.auth_user_id,{first_name:e.first_name??null,last_name:e.last_name??null,tamu_email:e.tamu_email??null}])))}let d={};n.forEach(e=>{let t=e.student_uuid,s=e.module_id;if(!t||!s)return;
29let a=l.get(t),i=a?[a.first_name,a.last_name].filter(Boolean).join(" ").trim():"";d[`${t}|${s}`]={studentId:t,moduleId:s,studentName:i||void 0,email:a?.tamu_email||void 0,releasedAt:e.released_at??null,expiresAt:e.expires_at??null}}),tN(d)}catch(e){t$(e.message||"Failed to load overrides")}finally{tP(!1)}})()},[eP,tJ,tM]),(0,i.useEffect)(()=>{eN.length>0&&t0()},[eN,t0]),(0,i.useEffect)(()=>{let e=[...eN];eZ&&(e=e.filter(e=>e.studentName.toLowerCase().includes(eZ.toLowerCase())||e.email.toLowerCase().includes(eZ.toLowerCase())||e.uin.includes(eZ))),"all"!==e1&&(e=e.filter(e=>e.moduleId===e1)),e.sort((e,t)=>{let s=0;switch(e5){case"name":s=e.studentName.localeCompare(t.studentName);break;case"score":s=e.pointsEarned-t.pointsEarned;break;case"date":s=new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()}return"asc"===e3?s:-s}),eR(e),e9(e7(e))},[eN,eZ,e1,e5,e3,e7]);let t2=async e=>{eB(e);{let t=await tZ(e.osceId,e.gradeId);t?eV(t):eV({id:e.osceId,submission_id:e.osceId,module_id:e.moduleId,assignment_id:e.assignmentId,points_earned:e.pointsEarned,points_possible:e.pointsPossible,percentage:e.percentage,status:e.status,created_at:e.createdAt,graded_at:e.gradedAt,ai_feedback:null,rubric_scores:null,transcript_data:null})}eO(!0),eX(0)},t5=()=>{eO(!1),eB(null),eV(null)},t6=async()=>{if(!te.size)return void tu({severity:"info",message:"Select at least one submission to reprocess."});let e=eN.filter(e=>te.has(e.osceId));if(!e.length)return void tu({severity:"warning",message:"Unable to locate the selected submissions in the current view."});let t=[],s=new Date().toISOString(),a=e.reduce((e,a)=>{let i=ej(a.moduleId);if(!i)return t.push(a.osceId),e;try{let t=(0,V.cu)(i);e.push({submissionId:a.osceId,moduleId:t.moduleId,assignmentId:a.assignmentId||t.assignmentId,notes:`Reprocessed via gradebook on ${s}`})}catch(e){t.push(a.osceId)}return e},[]);if(!a.length)return void tu({severity:"error",message:t.length?`Unable to reprocess: ${t.length} selected submission(s) are missing a recognized module assignment.`:"Unable to reprocess the selected submissions."});if(window.confirm(`Reprocess ${a.length} submission(s)? This will queue them for grading again and may overwrite existing scores.`)){td(!0),tu(null);try{let e,s="true"===String("true").toLowerCase(),i=await fetch(eS.adminRequeueEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({submissions:a,useClaudeFullTranscript:s})}),r=await i.json().catch(()=>({}));if(!i.ok)throw Error(r?.error||`Request failed with status ${i.status}`);let n=Array.isArray(r?.results)?r.results:[],l=n.filter(e=>"success"===e.status).map(e=>e.submissionId),o=n.filter(e=>"failure"===e.status);l.length&&(tl(!0),await t1(!0),tt(new Set),ta(!1));let d="info";if(l.length&&o.length?(d="warning",e=`Requeued ${l.length} submission(s); ${o.length} failed.`):l.length?(d="success",e=`Requeued ${l.length} submission(s).`):o.length?(d="error",e=o.map(e=>`${e.submissionId}: ${e.message}`).join(" ")||"Failed to requeue the selected submissions."):e="No submissions were requeued.",t.length){let s=` Skipped ${t.length} submission(s) with unknown module assignments.`;e+=s,"success"===d&&(d="warning")}tu({severity:d,message:e})}catch(e){tu({severity:"error",message:e.message||"Failed to reprocess submissions."})}finally{td(!1)}}},t3=[{skillName:"Introduction- Client Name",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Introduction- Patient Name",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Rapport-Building",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Open-Ended Questions",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Reflective Listening",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Empathy",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Nonverbal Skills",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Avoids Scientific Jargon",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Signposting",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Ask-Tell-Ask (First Ask)",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Ask-Tell-Ask (Second Ask)",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Chunk & Check",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Solicits Concerns",cbveCode:"CBVE 6.1",cbveNumeric:"6.1",outcome:"Solicits, respects, and integrates contributions from others",maxPoints:2},{skillName:"Negotiates Agenda",cbveCode:"CBVE 6.1",cbveNumeric:"6.1",outcome:"Solicits, respects, and integrates contributions from others",maxPoints:2},{skillName:"Utilization of Agenda",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:1}],t8=[{cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",skillNames:["Introduction- Client Name","Introduction- Patient Name","Open-Ended Questions","Reflective Listening","Avoids Scientific Jargon","Signposting","Ask-Tell-Ask (First Ask)","Chunk & Check"]},{cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",skillNames:["Rapport-Building","Empathy","Nonverbal Skills","Ask-Tell-Ask (Second Ask)","Utilization of Agenda"]},{cbveCode:"CBVE 6.1",cbveNumeric:"6.1",outcome:"Solicits, respects, and integrates contributions from others",skillNames:["Solicits Concerns","Negotiates Agenda"]}],t4=[{skillName:"Introduction- Self and Role",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Introduction- Client Name",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Introduction- Patient Name",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Open-Ended Questions",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Reflective Listening",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Avoids Scientific Jargon",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Signposting",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Ask-Tell-Ask (First Ask)",cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",maxPoints:2},{skillName:"Rapport-Building",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Empathy",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Ask-Tell-Ask (Second Ask)",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2},{skillName:"Recommendation",cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",maxPoints:2}],t9=[{cbveCode:"CBVE 5.1",cbveNumeric:"5.1",outcome:"Listens attentively and communicates professionally",skillNames:["Introduction- Self and Role","Introduction- Client Name","Introduction- Patient Name","Open-Ended Questions","Reflective Listening","Avoids Scientific Jargon","Signposting","Ask-Tell-Ask (First Ask)"]},{cbveCode:"CBVE 5.2",cbveNumeric:"5.2",outcome:"Adapts communication style to diverse audiences",skillNames:["Rapport-Building","Empathy","Ask-Tell-Ask (Second Ask)","Recommendation"]},{cbveCode:"CBVE 6.1",cbveNumeric:"6.1",outcome:"Solicits, respects, and integrates contributions from others",skillNames:[]}],t7=e=>"osce-module-lucy-dystocia"===ej(e)?{skillMetadata:t4,categoryDefinitions:t9}:{skillMetadata:t3,categoryDefinitions:t8},se=e=>`CATEGORIES/OUTCOMES/${e.cbveNumeric} ${e.outcome}`,st=(e,t,s)=>{let a=0,i=0,r=0;for(let n of t.skillNames){let t=s.find(e=>e.skillName===n),l=t?.maxPoints||2,o=e?sa(e,n):0;i+=l,a+=o,o>=l?r+=1:o>0&&(r+=.5)}let n=t.skillNames.length,l=n-r,o=n>0?r/n*100:0,d=i>0?a/i*100:0;return{numItems:n,numCorrect:r,percentCorrect:o.toFixed(2),numIncorrect:l,percentIncorrect:(n>0?l/n*100:0).toFixed(2),pointsAvailable:i,pointsEarned:a,percentPointsEarned:d.toFixed(6)}},ss=e=>{if(!e||""===e.trim())return{lastName:"",firstName:""};let t=e.trim().split(/\s+/);return 0===t.length?{lastName:"",firstName:""}:1===t.length?{lastName:t[0],firstName:""}:{lastName:t[t.length-1],firstName:t.slice(0,-1).join(" ")}},sa=(e,t)=>{if(!e||"object"!=typeof e)return 0;if(void 0!==e[t]){let s=e[t];if("number"==typeof s)return s;if("object"==typeof s&&null!==s)return s.score??s.awarded??s.points_awarded??0}let s=t.toLowerCase().replace(/[^a-z0-9]+/g,"");for(let[t,a]of Object.entries(e)){let e=t.toLowerCase().replace(/[^a-z0-9]+/g,"");if(e===s||e.includes(s)||s.includes(e)){if("number"==typeof a)return a;
29if("object"==typeof a&&null!==a)return a.score??a.awarded??a.points_awarded??0}}return 0},si=async()=>{if(!te.size)return;let e=eP.filter(e=>te.has(e.osceId)),t=[];for(let s of e){let{lastName:e,firstName:a}=ss(s.studentName),i=null;try{let e=await tZ(s.osceId,s.gradeId);e?.rubric_scores&&(i=e.rubric_scores)}catch(e){}let{skillMetadata:r,categoryDefinitions:n}=t7(s.moduleId);for(let l of n){let n=se(l),o=st(i,l,r),d=[`"${s.moduleId||""}"`,`"${s.uin}"`,`"${e}"`,`"${a}"`,`"${n}"`,o.numItems,o.numCorrect,o.percentCorrect,o.numIncorrect,o.percentIncorrect,o.pointsAvailable,o.pointsEarned,o.percentPointsEarned].join(",");t.push(d)}}let s=new Blob([["module-id,Student ID,last name,first name,category,# of items,# correct,% correct,# Incorrect,% Incorrect,Points Available,Points Earned,% Points Earned",...t].join("\n")],{type:"text/csv;charset=utf-8;"}),a=document.createElement("a"),i=URL.createObjectURL(s);a.setAttribute("href",i),a.setAttribute("download",`osce_cbve_category_Y2_${tM}_${new Date().toISOString().split("T")[0]}.csv`),a.style.visibility="hidden",document.body.appendChild(a),a.click(),document.body.removeChild(a)},sr=async()=>{try{let t=Array.from(te);if(0===t.length)return;let{data:s,error:a}=await w.supabase.rpc("move_osce_research_to_deleted",{osce_ids:t,deleted_by_user_id:e?.id||null,reason:`Deleted by admin from gradebook on ${new Date().toISOString()}`});if(a)return void alert("Failed to delete records. Please try again.");if(s&&s.length>0&&s[0].error_message)return void alert(`Failed to delete records: ${s[0].error_message}`);s&&s.length>0&&s[0];let i=eN.filter(e=>!te.has(e.osceId)),r=eP.filter(e=>!te.has(e.osceId));eL(i),eR(r);let n=e7(r);e9(n),tt(new Set),ta(!1),tr(!1)}catch(e){alert("An unexpected error occurred. Please try again.")}},sn=()=>{eM(!1),eU(null),eW(null)},sl=async()=>{await t1(),sn()},so=async()=>{await t1()},sd=e=>{if(!e)return"N/A";try{return new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:"America/Chicago"})}catch(t){return e}};(0,i.useMemo)(()=>{if(!tK||0===te.size)return[];let e=new Set(tJ),t=new Set;return eP.forEach(s=>{s.moduleId&&e.has(s.moduleId)&&te.has(s.osceId)&&t.add(ev[s.moduleId]||s.moduleId)}),Array.from(t)},[tK,te,eP,tJ]);let sc=(0,i.useMemo)(()=>{if(0===te.size)return"Release Grades";let e=eP.filter(e=>te.has(e.osceId));if(1===e.length){let t=(e[0].studentName||"Student").split(" ")[0];return`Release ${t}'s Grade`}return ts?"Release Selected Grades":`Release Selected Grades (${e.length})`},[te,eP,ts]),su=async()=>{if(!tV||0===tV.counts.modules&&0===tV.counts.overrides)return void tC("Nothing to release.");tA(!0),tC(null),tk(!1);try{let e=(tM??"").toString().trim().toUpperCase(),t=new Date().toISOString(),s=await (0,I.K)({yearLevel:"Second Year",campus:e,modules:tV.modules,overrides:tV.overrides,releaseAt:t,reason:"Released via research gradebook",research:!0});s.modulesReleased>0||s.overridesReleased>0?(tk(!0),ty(!1),tz(null),await t0(),await t1(!0)):tC("Nothing to release.")}catch(e){tC(e?.message||"Failed to release grades.")}finally{tA(!1)}},sm=async()=>{let e=te.size>0?eP.filter(e=>te.has(e.osceId)):eP,t=[];for(let s of e){let{lastName:e,firstName:a}=ss(s.studentName),i=null;try{let e=await tZ(s.osceId,s.gradeId);e?.rubric_scores&&(i=e.rubric_scores)}catch(e){}let{skillMetadata:r,categoryDefinitions:n}=t7(s.moduleId);for(let l of n){let n=se(l),o=st(i,l,r);t.push([s.moduleId||"",s.uin,e,a,n,o.numItems,o.numCorrect,o.percentCorrect,o.numIncorrect,o.percentIncorrect,o.pointsAvailable,o.pointsEarned,o.percentPointsEarned])}}let s="osce_cbve_category_Y2"+(te.size>0?"-selected":"")+"_"+tM+"_"+new Date().toISOString().split("T")[0]+".xlsx";(0,L.b)({filename:s,sheetName:"OSCE Grades",data:t,headers:["module-id","Student ID","last name","first name","category","# of items","# correct","% correct","# Incorrect","% Incorrect","Points Available","Points Earned","% Points Earned"],columnWidths:[25,12,15,15,70,10,10,10,10,10,15,15,15]})},sp=async()=>{let e=te.size>0?eP.filter(e=>te.has(e.osceId)):eP,t="demo_communication_research_student_grades_Y2"+(te.size>0?"-selected":"")+"_"+tM+"_"+new Date().toISOString().split("T")[0]+".xlsx";(0,P.pD)(e.map(e=>({studentName:e.studentName,studentId:e.studentId,email:e.email,moduleId:e.moduleId,assignmentId:e.assignmentId,yearLevel:"Second Year",campus:e.campus,pointsEarned:e.pointsEarned,pointsPossible:e.pointsPossible,source:"research"})),{filename:t})},sh=(0,a.jsx)(D.A,{variant:"contained",size:"small",onClick:()=>ew.push("/demo/administration/communications/second-year"),startIcon:(0,a.jsx)(v.A,{style:{fontSize:18}}),sx:{background:"#C8102E !important",color:"white !important",px:3,py:1,fontSize:"0.875rem",fontWeight:500,textTransform:"none",borderRadius:"6px",border:"none",boxShadow:"0 2px 4px rgba(0,0,0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1)","&:hover":{background:"linear-gradient(135deg, #000000 0%, #000000 50%, #000000 75%, #000000 85%, #000000 100%) !important",boxShadow:"0 4px 6px rgba(0,0,0, 0.3), 0 2px 3px rgba(0, 0, 0, 0.15)"},"&:active":{transform:"translateY(1px)",boxShadow:"0 1px 2px rgba(0,0,0, 0.2)"}
29,"&:focus":{outline:"2px solid #C8102E",outlineOffset:2},opacity:1,visibility:"visible"},"aria-label":"Back to Second Year",children:"Back to Second Year"});return eI?(0,a.jsxs)(k.A,{extraActions:sh,children:[(0,a.jsx)(n(),{children:(0,a.jsx)("title",{children:"OSCE Research Gradebook - Faculty View"})}),(0,a.jsx)(U.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh"},children:(0,a.jsx)(q.A,{size:60,sx:{color:"#C8102E"}})})]}):(0,a.jsxs)(k.A,{extraActions:sh,children:[(0,a.jsxs)(n(),{children:[(0,a.jsx)("title",{children:"OSCE Research Gradebook - Faculty View"}),(0,a.jsx)("style",{children:` 30 @keyframes spin { 31 from { transform: rotate(0deg); } 32 to { transform: rotate(360deg); } 33 } 34 .animate-spin { 35 animation: spin 1s linear infinite; 36 } 37 `})]}),(0,a.jsxs)(U.A,{sx:{p:3},children:[(0,a.jsxs)(W.A,{elevation:3,sx:{p:3,mb:3,background:"#C8102E",color:"white"},children:[(0,a.jsx)(Y.A,{variant:"h4",sx:{mb:3,fontWeight:"bold"},children:"OSCE Communication Research Gradebook"}),(0,a.jsxs)(G.Ay,{container:!0,spacing:3,children:[(0,a.jsx)(G.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,a.jsx)(J.A,{sx:{bgcolor:"rgba(255,255,255,0.1)",backdropFilter:"blur(10px)"},children:(0,a.jsx)(H.A,{children:(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",color:"white"},children:[(0,a.jsx)(o.A,{className:"w-5 h-5 mr-2"}),(0,a.jsxs)(U.A,{children:[(0,a.jsx)(Y.A,{variant:"h5",sx:{fontWeight:"bold"},children:e4.totalStudents}),(0,a.jsx)(Y.A,{variant:"body2",children:"Total Students"})]})]})})})}),(0,a.jsx)(G.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,a.jsx)(J.A,{sx:{bgcolor:"rgba(255,255,255,0.1)",backdropFilter:"blur(10px)"},children:(0,a.jsx)(H.A,{children:(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",color:"white"},children:[(0,a.jsx)(d.A,{className:"w-5 h-5 mr-2"}),(0,a.jsxs)(U.A,{children:[(0,a.jsx)(Y.A,{variant:"h5",sx:{fontWeight:"bold"},children:e4.totalSubmissions}),(0,a.jsx)(Y.A,{variant:"body2",children:"Total Submissions"})]})]})})})}),tG&&(0,a.jsx)(G.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,a.jsx)(J.A,{sx:{bgcolor:"rgba(255,255,255,0.1)",backdropFilter:"blur(10px)"},children:(0,a.jsx)(H.A,{children:(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",color:"white"},children:[(0,a.jsx)(c.A,{className:"w-5 h-5 mr-2"}),(0,a.jsxs)(U.A,{children:[(0,a.jsxs)(Y.A,{variant:"h5",sx:{fontWeight:"bold"},children:[e4.averageScore.toFixed(1),"/",e4.averageMaxScore.toFixed(0)]}),(0,a.jsx)(Y.A,{variant:"body2",children:"Class Average"})]})]})})})}),tG&&(0,a.jsx)(G.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,a.jsx)(J.A,{sx:{bgcolor:"rgba(255,255,255,0.1)",backdropFilter:"blur(10px)"},children:(0,a.jsx)(H.A,{children:(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",color:"white"},children:[(0,a.jsx)(u.A,{className:"w-5 h-5 mr-2"}),(0,a.jsxs)(U.A,{children:[(0,a.jsxs)(Y.A,{variant:"h5",sx:{fontWeight:"bold"},children:[e4.passRate.toFixed(0),"%"]}),(0,a.jsx)(Y.A,{variant:"body2",children:"Pass Rate (>=70%)"})]})]})})})})]})]}),(0,a.jsx)($.A,{modules:e_,cohortLabel:"Second-Year OSCE Research",campus:tM,apiEndpoints:{adminErrorsEndpoint:eS.adminErrorsEndpoint,adminRequeueEndpoint:eS.adminRequeueEndpoint}}),tb&&(0,a.jsxs)(K.A,{severity:"error",sx:{mb:3},children:["Failed to load module visibility status: ",tb]}),tS&&(0,a.jsxs)(K.A,{severity:"success",sx:{mb:3},children:["Grades released for the ","ALL"===tw?"shared ALL-campus schedule":`${tw??tM} campus`," modules. Students can now access their scores."]}),tc&&(0,a.jsx)(K.A,{severity:tc.severity,sx:{mb:3},children:tc.message}),(0,a.jsx)(W.A,{elevation:2,sx:{p:2,mb:3},children:(0,a.jsxs)(U.A,{sx:{display:"flex",gap:2,flexWrap:"wrap",alignItems:"center"},children:[(0,a.jsxs)(Q.A,{size:"small",sx:{minWidth:160},children:[(0,a.jsx)(X.A,{children:"Campus"}),(0,a.jsx)(Z.A,{value:tM,label:"Campus",onChange:e=>tD(String(e.target.value).toUpperCase()),disabled:tq,children:tF.map(e=>(0,a.jsx)(ee.A,{value:e,children:"ALL"===e?"All Campuses":e},e))})]}),(0,a.jsx)(et.A,{placeholder:"Search by name, email, or UIN...",value:eZ,onChange:e=>e0(e.target.value),size:"small",sx:{minWidth:300},InputProps:{startAdornment:(0,a.jsx)(m.A,{className:"w-4 h-4 mr-2 text-gray-500"})}}),(0,a.jsxs)(Q.A,{size:"small",sx:{minWidth:200},children:[(0,a.jsx)(X.A,{children:"Filter by Module"}),(0,a.jsxs)(Z.A,{value:e1,onChange:e=>e2(e.target.value),label:"Filter by Module",children:[(0,a.jsx)(ee.A,{value:"all",children:"All Modules"}),Object.entries(ey).map(([e,t])=>(0,a.jsxs)(ee.A,{value:e,children:[t.name," ",t.maxPoints&&`(${t.maxPoints} pts)`]},e))]})]}),(0,a.jsx)(es.A,{title:`Refresh ${tY?"all modules":ey[e1]?.name||"selected module"} data`,children:(0,a.jsx)(ea.A,{size:"medium",onClick:async()=>{tl(!0),await t1(!0)},disabled:tn||eI,sx:{ml:1},children:(0,a.jsx)(p.A,{size:20,className:tn?"animate-spin":""})})}
37),(0,a.jsx)(U.A,{sx:{flexGrow:1}}),te.size>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S.$,{variant:"outline",onClick:t6,disabled:to,style:{display:"flex",alignItems:"center",gap:"6px",marginRight:"8px",opacity:1,visibility:"visible"},children:[to?(0,a.jsx)(q.A,{size:16,color:"inherit"}):(0,a.jsx)(p.A,{size:16}),"Reprocess Selected (",te.size,")"]}),(0,a.jsxs)(S.$,{variant:"outline",onClick:si,style:{display:"flex",alignItems:"center",gap:"6px",marginRight:"8px",opacity:1,visibility:"visible"},children:[(0,a.jsx)(h.A,{size:16}),"Export CSV (",te.size,")"]}),(0,a.jsxs)(S.$,{variant:"outline",onClick:()=>{tr(!0)},style:{borderColor:"#d32f2f",color:"#d32f2f",display:"flex",alignItems:"center",gap:"6px",marginRight:"8px"},children:[(0,a.jsx)(x.A,{size:16}),"Delete Selected (",te.size,")"]})]}),(0,a.jsx)(es.A,{title:0===te.size?"Select one or more grades to release":tK?tQ?"Release grades for the selected hidden submissions":"Select hidden submissions to enable grade release":"All grades are currently visible. Select items to set specific release schedules.",children:(0,a.jsx)("span",{children:(0,a.jsxs)(S.$,{onClick:()=>{let e=eP.filter(e=>te.has(e.osceId));if(0===e.length){tC("Select at least one row."),ty(!0);return}let t=function(e,t){let s=new Set(t),a=[];for(let t of e)t.moduleId&&s.has(t.moduleId)&&a.push({studentId:t.studentId,moduleId:t.moduleId,studentName:t.studentName,email:t.email});let i=new Map;for(let e of a)i.set(`${e.studentId}|${e.moduleId}`,e);return{modules:[],overrides:Array.from(i.values()),counts:{modules:0,overrides:i.size,selectedRows:e.length}}}(e,tJ);if(0===t.counts.modules&&0===t.counts.overrides){tC("Nothing to release. (Selected items are already visible or have no module.)"),ty(!0);return}tC(null),tz(t),ty(!0)},disabled:tx||tv,style:{backgroundColor:te.size>0?"#006400":"#6b7280",color:"white",display:"flex",alignItems:"center",gap:"6px",padding:"6px 16px",border:te.size>0?"1px solid #004000":"1px solid #4b5563",opacity:0===te.size?.6:1,cursor:0===te.size?"not-allowed":"pointer"},title:tB||"Select items to release",children:[(0,a.jsx)(g.A,{size:16}),sc]})})}),(0,a.jsx)(D.A,{variant:"contained",onClick:()=>{eG(!0)},startIcon:(0,a.jsx)(b.A,{size:16}),style:{backgroundColor:"#0f766e",color:"white",marginRight:"8px"},children:"Upload Videos"}),(0,a.jsxs)(S.$,{variant:"outline",onClick:sm,style:{borderColor:"#C8102E",color:"#C8102E",display:"flex",alignItems:"center",gap:"6px",background:"transparent",transition:"all 0.3s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#C8102E",e.currentTarget.style.color="white",e.currentTarget.style.borderColor="transparent"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="#C8102E",e.currentTarget.style.borderColor="#C8102E"},children:[(0,a.jsx)(h.A,{size:16}),"Export CBVE"]}),(0,a.jsxs)(S.$,{variant:"outline",onClick:sp,style:{borderColor:"#0f766e",color:"#0f766e",display:"flex",alignItems:"center",gap:"6px",background:"transparent",transition:"all 0.3s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#0f766e",e.currentTarget.style.color="white",e.currentTarget.style.borderColor="transparent"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="#0f766e",e.currentTarget.style.borderColor="#0f766e"},children:[(0,a.jsx)(h.A,{size:16}),"Export Grades"]})]})}),!eI&&0===eN.length&&(0,a.jsxs)(W.A,{elevation:2,sx:{p:4,textAlign:"center",mb:3},children:[(0,a.jsx)(Y.A,{variant:"h6",sx:{mb:1},children:"No OSCE Data Found"}),(0,a.jsx)(Y.A,{variant:"body2",sx:{mb:2},children:"We didn't find any OSCE submissions for Second Year students."}),(0,a.jsxs)(U.A,{sx:{textAlign:"left",maxWidth:600,mx:"auto"},children:[(0,a.jsx)(Y.A,{variant:"subtitle2",sx:{mb:1},children:"Troubleshooting Checklist:"}),(0,a.jsxs)(U.A,{component:"ul",sx:{pl:"1.2rem",mt:0},children:[(0,a.jsxs)("li",{children:["Confirm the table name is ",(0,a.jsx)("code",{children:"osce"})," and contains rows."]}),(0,a.jsxs)("li",{children:["Verify rows have a ",(0,a.jsx)("code",{children:"student_id"})," that matches ",(0,a.jsx)("code",{children:"student_roster.auth_user_id"}),"."]}),(0,a.jsxs)("li",{children:["Ensure roster entries have ",(0,a.jsx)("code",{children:"year_level = 'Second Year'"}),"."]}),(0,a.jsx)("li",{children:"If using Row Level Security, confirm the policy allows SELECT for your role."}),(0,a.jsxs)("li",{children:["Open the browser console and run ",(0,a.jsx)("code",{children:"localStorage.setItem('OSCE_GRADEBOOK_DEBUG','true')"})," then refresh for verbose logs."]})]})]})]}),!eI&&eN.length>0&&0===eP.length&&(0,a.jsxs)(W.A,{elevation:2,sx:{p:4,textAlign:"center",mb:3},children:[(0,a.jsx)(Y.A,{variant:"h6",sx:{mb:1},children:"No Students Match Filters"}),(0,a.jsx)(Y.A,{variant:"body2",children:"Adjust your search or module filter to see results."})]}),eP.length>0&&(0,a.jsx)(ei.A,{component:W.A,elevation:2,children:(0,a.jsxs)(er.A,{children:[(0,a.jsx)(en.A,{children:(0,a.jsxs)(el.A,{sx:{bgcolor:"#f5f5f5"},children:[(0,a.jsx)(eo.A,{padding:"checkbox",children:(0,a.jsx)(ed.A,{checked:ts,indeterminate:te.size>0&&te.size<eP.length,onChange:e=>{var t;ta(t=e.target.checked),t?tt(new Set(eP.map(e=>e.osceId))):tt(new Set)}})}),(0,a.jsx)(eo.A,{children:(0,a.jsx)(ec.A,{active:"name"===e5,direction:"name"===e5?e3:"asc",onClick:()=>{"name"===e5?e8("asc"===e3?"desc":"asc"):(e6("name"),e8("asc"))},children:(0,a.jsx)("strong",{children:"Student Name"})})}),(0,a.jsx)(eo.A,{children:(0,a.jsx)("strong",{children:"UIN"})}),(0,a.jsx)(eo.A,{children:(0,a.jsx)("strong",{children:"Campus"})}),(0,a.jsx)(eo.A,{children:(0,a.jsx)("strong",{children:"Module"})}),(0,a.jsx)(eo.A,{align:"center",children:(0,a.jsx)(ec.A,{active:"score"===e5,direction:"score"===e5?e3:"asc",onClick:()=>{"score"===e5?e8("asc"===e3?"desc":"asc"):(e6("score"),e8("asc"))},children:(0,a.jsx)("strong",{children:"Score"})})}),(0,a.jsx)(eo.A,{align:"center",children:(0,a.jsx)("strong",{children:"Grade Visibility"})}),(0,a.jsx)(eo.A,{children:(0,a.jsx)(ec.A,{active:"date"===e5,direction:"date"===e5?e3:"asc",onClick:()=>{"date"===e5?e8("asc"===e3?"desc":"asc"):(e6("date"),e8("asc"))},children:(0,a.jsx)("strong",{children:"Time Submitted"})})}),(0,a.jsx)(eo.A,{align:"center",children:(0,a.jsx)("strong",{children:"Actions"})})]})}),(0,a.jsx)(eu.A,{children:eP.map(e=>(0,a.jsxs)(el.A,{hover:!0,children:[(0,a.jsx)(eo.A,{padding:"checkbox",children:(0,a.jsx)(ed.A,{checked:te.has(e.osceId),onChange:t=>{var s,a;let i;return s=e.osceId,a=t.target.checked,i=new Set(te),void(a?i.add(s):(i.delete(s),ta(!1)),tt(i),i.size===eP.length&&ta(!0))}})}),(0,a.jsx)(eo.A,{children:(0,a.jsxs)(U.A,{children:[(0,a.jsx)(Y.A,{variant:"body1",sx:{fontWeight:500,color:"#C8102E"},children:e.studentName}),(0,a.jsx)(Y.A,{variant:"caption",color:"textSecondary",children:e.email})]})}),(0,a.jsx)(eo.A,{children:e.uin||"N/A"}),(0,a.jsx)(eo.A,{children:e.campus||"N/A"}),(0,a.jsx)(eo.A,{children:(0,a.jsx)(em.A,{label:ey[e.moduleId||""]?.name||e.moduleId||"Unknown",size:"small",sx:{bgcolor:ey[e.moduleId||""]?.color||"#666",color:"white"}})}
37),(0,a.jsx)(eo.A,{align:"center",children:(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,a.jsxs)(Y.A,{variant:"body2",sx:{fontWeight:"bold"},children:[e.pointsEarned,"/",e.pointsPossible]}),(0,a.jsxs)(Y.A,{variant:"caption",color:"textSecondary",sx:{ml:1},children:["(",e.percentage.toFixed(0),"%)"]})]})}),(0,a.jsx)(eo.A,{align:"center",children:e.gradeIsHidden??!0?(0,a.jsx)(es.A,{title:"Grade is hidden from students (unreleased)",children:(0,a.jsx)(em.A,{size:"small",label:"Hidden",color:"warning",variant:"outlined",icon:(0,a.jsx)(j.A,{})})}):(0,a.jsx)(es.A,{title:"Grade is visible to students",children:(0,a.jsx)(em.A,{size:"small",label:"Visible",color:"success",variant:"outlined",icon:(0,a.jsx)(A.A,{})})})}),(0,a.jsx)(eo.A,{children:(0,a.jsx)(Y.A,{variant:"caption",children:sd(e.createdAt)})}),(0,a.jsx)(eo.A,{align:"center",children:(0,a.jsx)(U.A,{sx:{display:"flex",gap:.5},children:(0,a.jsx)(es.A,{title:"View Details",children:(0,a.jsx)(ea.A,{size:"small",onClick:()=>t2(e),children:(0,a.jsx)(f.A,{className:"w-4 h-4"})})})})})]},e.osceId))})]})}),(0,a.jsxs)(ep.A,{open:t_,onClose:()=>{tv||ty(!1)},maxWidth:"xs",fullWidth:!0,children:[(0,a.jsx)(eh.A,{children:"Confirm Grade Release"}),(0,a.jsxs)(ex.A,{dividers:!0,children:[(0,a.jsxs)(Y.A,{variant:"body1",sx:{mb:2},children:["This releases only the selected gradebook rows on the ",tM," campus. If you used the header checkbox, it means every row currently shown by the active filters."]}),(0,a.jsxs)(U.A,{component:"ul",sx:{mt:0,mb:1.5,pl:2.25,listStyleType:"disc"},children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:tV?.counts.selectedRows??0})," selected row(s)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:tV?.counts.overrides??0})," student-specific release(s)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:tV?.counts.modules??0})," whole-module release(s)"]})]}),(0,a.jsx)(Y.A,{variant:"body2",color:"text.secondary",children:"Unselected students stay hidden. This gradebook uses student-specific releases for row selections to avoid accidentally releasing an entire module."}),tj&&(0,a.jsx)(K.A,{severity:"error",sx:{mt:2},children:tj})]}),(0,a.jsxs)(eg.A,{children:[(0,a.jsx)(S.$,{onClick:()=>ty(!1),disabled:tv,children:"Cancel"}),(0,a.jsx)(S.$,{onClick:su,disabled:tv,style:{backgroundColor:"#006400",color:"white",border:"none"},children:tv?"Releasing...":"Release Grades"})]})]}),(0,a.jsx)(ep.A,{open:ez,onClose:t5,maxWidth:"lg",fullWidth:!0,children:e$&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eh.A,{sx:{background:"#C8102E",color:"white"},children:(0,a.jsxs)(U.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,a.jsxs)(U.A,{children:[(0,a.jsx)(Y.A,{variant:"h6",children:e$.studentName}),(0,a.jsxs)(Y.A,{variant:"caption",children:[e$.email," | UIN: ",e$.uin," | Campus: ",e$.campus||"N/A"]})]}),(0,a.jsx)(ea.A,{onClick:t5,sx:{color:"white"},children:(0,a.jsx)(_.A,{})})]})}),(0,a.jsxs)(ex.A,{sx:{p:0},children:[(0,a.jsxs)(U.A,{sx:{p:2,borderBottom:1,borderColor:"divider",bgcolor:"#f5f5f5"},children:[(0,a.jsxs)(Y.A,{variant:"subtitle2",sx:{color:"#666"},children:["Module: ",e$.moduleId?ey[e$.moduleId]?.name||e$.moduleId:"Unknown Module"]}),(0,a.jsxs)(Y.A,{variant:"subtitle2",sx:{color:"#666"},children:["Submitted: ",sd(e$.createdAt)]})]}),(0,a.jsxs)(eb.A,{value:eQ,onChange:(e,t)=>
37eX(t),sx:{borderBottom:1,borderColor:"divider"},children:[(0,a.jsx)(ef.A,{label:"Grade Summary"}),(0,a.jsx)(ef.A,{label:"Detailed Feedback"}),(0,a.jsx)(ef.A,{label:"Transcript"})]}),(0,a.jsxs)(U.A,{sx:{p:3},children:[0===eQ&&eT&&(0,a.jsxs)(l.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:[(0,a.jsx)(W.A,{elevation:1,sx:{p:3,mb:3,bgcolor:"#f5f5f5"},children:(0,a.jsx)(O.A,{label:"Total Score",value:eT.points_earned||0,maxValue:tm,type:"number",min:0,max:tm,onSave:async e=>{if(!eT?.id)return;let t=Number(e),s=tm>0?t/tm*100:0,a=(0,N.f_)(s);try{let{error:e}=await w.supabase.from("osce_research_grades").update({points_earned:t,percentage:s,letter_grade:a,updated_at:new Date().toISOString()}).eq("id",eT.id);if(e)throw e;await eK({gradeId:eT.id,editType:"total_score",oldValue:{score:eT.points_earned},newValue:{score:t,percentage:s,letterGrade:a}}),eV({...eT,points_earned:t,percentage:s,letter_grade:a}),M.Ay.success(`Score updated to ${t}/${tm} (${s.toFixed(1)}%)`),eL(e=>e.map(e=>e.gradeId===eT.id?{...e,pointsEarned:t,percentage:s}:e)),eR(e=>e.map(e=>e.gradeId===eT.id?{...e,pointsEarned:t,percentage:s}:e))}catch(e){throw M.Ay.error("Failed to update score. Please try again."),e}},displayClassName:"text-2xl text-green-600"})}),(0,a.jsx)(R.A,{scores:eT.rubric_scores||{},totalScore:eT.points_earned||0,feedback:{positive:[],improvements:[],overall:eT.ai_feedback?.feedback_statement||"",global_performance:eT.ai_feedback?.global_performance||"",skills_demonstrated_well:eT.ai_feedback?.skills_demonstrated_well||"",even_better_yet:eT.ai_feedback?.areas_for_growth||eT.ai_feedback?.even_better_yet||"",per_skill_feedback:eT.ai_feedback?.per_skill_feedback||{}},moduleId:eT.module_id||void 0,maxPoints:tm,showFeedbackSection:!1,editable:!0,onScoreUpdate:async(e,t)=>{if(eT?.id)try{let s={...eT.rubric_scores,[e]:{...eT.rubric_scores?.[e],score:t}},a=Object.values(s).reduce((e,t)=>e+(t?.score||0),0),i=tm>0?a/tm*100:0,r=(0,N.f_)(i),{error:n}=await w.supabase.from("osce_research_grades").update({rubric_scores:s,points_earned:a,percentage:i,letter_grade:r,updated_at:new Date().toISOString()}).eq("id",eT.id);if(n)throw n;let l=eT.rubric_scores?.[e]?.score;if(await eK({gradeId:eT.id,editType:"skill_score",skillKey:e,oldValue:{score:l},newValue:{score:t,newTotalScore:a,percentage:i}}),eV({...eT,rubric_scores:s,points_earned:a,percentage:i,letter_grade:r}),M.Ay.success(`${e} score updated: ${l??0} \xe2â â ${t}`),e$){let e={...e$,pointsEarned:a,percentage:i};eB(e),eL(t=>t.map(t=>t.osceId===e$.osceId?e:t)),eR(t=>t.map(t=>t.osceId===e$.osceId?e:t))}}catch(e){throw e}},onJustificationUpdate:async(e,t)=>{if(eT?.id)try{let s={...eT.rubric_scores,[e]:{...eT.rubric_scores?.[e],justification:t}},{error:a}=await w.supabase.from("osce_research_grades").update({rubric_scores:s,updated_at:new Date().toISOString()}).eq("id",eT.id);if(a)throw a;let i=eT.rubric_scores?.[e]?.justification;await eK({gradeId:eT.id,editType:"skill_feedback",skillKey:e,oldValue:{justification:i?.substring(0,200)+(i?.length>200?"...":"")},newValue:{justification:t.substring(0,200)+(t.length>200?"...":"")}}),eV({...eT,rubric_scores:s}),M.Ay.success(`Feedback updated for ${e.replace(/_/g," ")}`)}catch(e){throw M.Ay.error("Failed to update feedback. Please try again."),e}}})]}),1===eQ&&eT&&(0,a.jsx)(l.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,a.jsx)(U.A,{sx:{space:3},children:(()=>{let e=async(e,t)=>{if(eT?.id)try{let s={...eT.ai_feedback,[e]:t},{error:a}=await w.supabase.from("osce_research_grades").update({ai_feedback:s,updated_at:new Date().toISOString()}).eq("id",eT.id);if(a)throw a;let i=eT.ai_feedback?.[e];await eK({gradeId:eT.id,editType:"overall_feedback",skillKey:e,oldValue:{[e]:i?.substring(0,200)+(i?.length>200?"...":"")},newValue:{[e]:t.substring(0,200)+(t.length>200?"...":"")}}),eV({...eT,ai_feedback:s}),M.Ay.success(`${e.replace(/_/g," ")} updated successfully`);let r=await tZ(eT.submission_id||eT.id,eT.id);r&&eV(r)}catch(e){throw M.Ay.error("Failed to update feedback. Please try again."),e}};if(eT.ai_feedback?.global_performance||eT.ai_feedback?.skills_demonstrated_well||eT.ai_feedback?.areas_for_growth||eT.ai_feedback?.even_better_yet){let t=[];eT.ai_feedback?.global_performance&&t.push((0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(F.A,{title:"Overall Assessment",content:eT.ai_feedback.global_performance,icon:(0,a.jsx)(y.A,{className:"w-5 h-5",style:{color:"#9c27b0"}}),onSave:async t=>e("global_performance",t),bgColor:"#f3e5f5",borderColor:"#9c27b0",iconColor:"#9c27b0",titleColor:"#6a1b9a",minLength:120,maxLength:2e3})},"overall")),eT.ai_feedback?.skills_demonstrated_well&&t.push((0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(F.A,{title:"Skills Demonstrated Well",content:eT.ai_feedback.skills_demonstrated_well,icon:(0,a.jsx)(u.A,{className:"w-5 h-5",style:{color:"#4CAF50"}}),onSave:async t=>e("skills_demonstrated_well",t),bgColor:"#e8f5e9",borderColor:"#4CAF50",iconColor:"#4CAF50",titleColor:"#2e7d32",minLength:80,maxLength:1200})},"strengths"));let s=eT.ai_feedback?.areas_for_growth||eT.ai_feedback?.even_better_yet;
37return s&&t.push((0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(F.A,{title:"Even Better Yet",content:s,icon:(0,a.jsx)(g.A,{className:"w-5 h-5",style:{color:"#ff9800"}}),onSave:async t=>e("areas_for_growth",t),bgColor:"#fff3e0",borderColor:"#ff9800",iconColor:"#ff9800",titleColor:"#e65100",minLength:80,maxLength:1200})},"improvements")),t.length>0?t:(0,a.jsx)(K.A,{severity:"info",children:"No detailed feedback available."})}let t=eT.ai_feedback?.feedback_statement;if(!t)return(0,a.jsx)(K.A,{severity:"info",children:"No detailed feedback available."});let s=t.replace(/\\n/g,"\n").replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\\/g,"\\"),i=[],r=s.match(/^([\s\S]*?)(?=Even better yet|$)/i),n=s.match(/Even better yet[,:]?\s*([\s\S]*?)(?=Overall[,:]?\s|$)/i),l=s.match(/Overall[,:]?\s*([\s\S]*?)$/i);if(l?.[1]&&i.push((0,a.jsxs)(W.A,{elevation:1,sx:{p:3,mb:2,bgcolor:"#f3e5f5"},children:[(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",mb:2},children:[(0,a.jsx)(y.A,{className:"w-5 h-5 mr-2",style:{color:"#9c27b0"}}),(0,a.jsx)(Y.A,{variant:"h6",sx:{color:"#6a1b9a"},children:"Overall Assessment"})]}),(0,a.jsx)(Y.A,{variant:"body1",children:l[1].trim()})]},"overall")),r?.[1]&&!r[1].includes("Overall")){let e=r[1].trim();i.push((0,a.jsxs)(W.A,{elevation:1,sx:{p:3,mb:2,bgcolor:"#e8f5e9"},children:[(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",mb:2},children:[(0,a.jsx)(u.A,{className:"w-5 h-5 mr-2",style:{color:"#4CAF50"}}),(0,a.jsx)(Y.A,{variant:"h6",sx:{color:"#2e7d32"},children:"Skills Demonstrated Well"})]}),(0,a.jsx)(Y.A,{variant:"body1",children:e})]},"strengths"))}return n?.[1]&&i.push((0,a.jsxs)(W.A,{elevation:1,sx:{p:3,mb:2,bgcolor:"#fff3e0"},children:[(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",mb:2},children:[(0,a.jsx)(g.A,{className:"w-5 h-5 mr-2",style:{color:"#ff9800"}}),(0,a.jsx)(Y.A,{variant:"h6",sx:{color:"#e65100"},children:"Even Better Yet"})]}),(0,a.jsx)(Y.A,{variant:"body1",children:n[1].trim()})]},"improvements")),0===i.length&&i.push((0,a.jsx)(W.A,{elevation:1,sx:{p:3},children:(0,a.jsx)(Y.A,{variant:"body1",children:s})},"fallback")),i})()})}),2===eQ&&eT&&(0,a.jsx)(l.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,a.jsx)(W.A,{elevation:1,sx:{p:3,maxHeight:600,overflow:"auto"},children:(()=>{let e=eT.ai_feedback?.clean_transcript||eT.transcript_data?.clean_transcript;if(e&&Array.isArray(e))return(0,a.jsx)(U.A,{sx:{space:2},children:e.map((e,t)=>{let s=e.speaker?.toLowerCase().includes("student")||e.speaker?.toLowerCase().includes("vet");return(0,a.jsxs)(U.A,{sx:{mb:2,display:"flex",gap:2},children:[(0,a.jsx)(Y.A,{variant:"subtitle2",sx:{minWidth:80,color:s?"#1976d2":"#388e3c",fontWeight:"bold"},children:s?"Student:":"Client:"}),(0,a.jsx)(Y.A,{variant:"body2",children:e.text})]},t)})});let t=eT.ai_feedback?.transcript||eT.transcript_data?.transcript;if(t&&"string"==typeof t){let e=t.split(/\n+/);return(0,a.jsx)(U.A,{sx:{space:2},children:e.map((e,t)=>{if(!e.trim())return null;let s=e.indexOf(":");if(s>0){let i=e.substring(0,s).trim(),r=e.substring(s+1).trim(),n=i.toLowerCase().includes("student")||i.toLowerCase().includes("vet");return(0,a.jsxs)(U.A,{sx:{mb:2,display:"flex",gap:2},children:[(0,a.jsx)(Y.A,{variant:"subtitle2",sx:{minWidth:80,color:n?"#1976d2":"#388e3c",fontWeight:"bold"},children:n?"Student:":"Client:"}),(0,a.jsx)(Y.A,{variant:"body2",children:r})]},t)}return(0,a.jsx)(U.A,{sx:{mb:1},children:(0,a.jsx)(Y.A,{variant:"body2",children:e})},t)}).filter(Boolean)})}return(0,a.jsx)(K.A,{severity:"info",children:"No transcript available for this submission."})})()})})]})]})]})}),(0,a.jsxs)(ep.A,{open:ti,onClose:()=>tr(!1),maxWidth:"sm",fullWidth:!0,children:[(0,a.jsx)(eh.A,{sx:{bgcolor:"#d32f2f",color:"white"},children:(0,a.jsxs)(U.A,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,a.jsx)(x.A,{size:20}),"Delete Submissions"]})}),(0,a.jsxs)(ex.A,{sx:{pt:2},children:[(0,a.jsxs)(Y.A,{variant:"body1",sx:{mb:2},children:["Delete ",(0,a.jsx)("strong",{children:te.size})," selected submission(s)?"]}),(0,a.jsx)(Y.A,{variant:"body2",color:"textSecondary",children:"This will permanently delete the submissions from all gradebook views. The records remain in the database but will not appear in the gradebook unless manually restored by a database administrator."})]}),(0,a.jsxs)(eg.A,{children:[(0,a.jsx)(S.$,{onClick:()=>tr(!1),children:"Cancel"}),(0,a.jsx)(S.$,{onClick:sr,style:{backgroundColor:"#d32f2f",color:"white",border:"none"},onMouseOver:e=>{e.currentTarget.style.backgroundColor="#b71c1c"},onMouseOut:e=>{e.currentTarget.style.backgroundColor="#d32f2f"},children:"Delete Submissions"})]})]}),eF&&(0,a.jsx)(B.A,{open:eF,onClose:sn,adminUser:eH,student:eD?{id:eD.studentId,name:eD.studentName,email:eD.email,uin:eD.uin}:null,moduleDefinition:eq,assignmentId:eD?.assignmentId??null,courseId:eq?.courseId??null,moduleOptions:eJ,studentYearLevels:["Second Year"],onUploadComplete:sl,apiEndpoints:{statusEndpoint:eS.statusEndpoint,recordEndpoint:eS.recordEndpoint,asyncEndpoint:eS.asyncEndpoint,asyncClaudeEndpoint:eS.asyncClaudeEndpoint,trainingEndpoint:eS.trainingEndpoint,multipartInitEndpoint:eS.multipartInitEndpoint,multipartChunkEndpoint:eS.multipartChunkEndpoint,multipartCompleteEndpoint:eS.multipartCompleteEndpoint}}),eY&&(0,a.jsx)(T.A,{open:eY,onClose:()=>{eG(!1)},moduleOptions:eJ,courseId:"communication-course-2025",campusYear:"second-year",onUploadComplete:so,apiEndpoints:eS,gradebookPath:"/demo/administration/communications/second-year/osce-gradebook-research"})]})]})}},75164:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/demo/administration/communications/second-year/osce-gradebook-research",function(){return s(71318)}])}},e=>{e.O(0,[41022,48230,54587,7417,69229,31154,47251,49121,61225,45154,31015,51522,48003,45336,60420,59778,72297,47198,10163,82832,50634,98619,60777,44887,38480,4222,3113,25926,63984,64076,19841,90636,46593,38792],()=>e(e.s=75164)),_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.