1/*! For license information please see 4150.ef9ce114.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkthescope360_app=self.webpackChunkthescope360_app||[]).push([[4150,6099,8480],{4150(e,s,a){a.r(s),a.d(s,{default:()=>y});var r=a(89379),t=a(65043),l=a(45029),c=a(55472),n=a(91729),d=a(8729),o=a(76833),i=a(76245),x=a(56099),p=a(65469),m=a(92382),h=a(15711),u=a(64830),b=a(50516),g=a(70579);function y(){const{attemptID:e}=(0,l.g)(),s=(0,l.Zp)(),{currentUser:a,isAdmin:y}=(0,d.A)(),[f,j]=(0,t.useState)(!0),[k,w]=(0,t.useState)(null),[v,N]=(0,t.useState)([]),[A,M]=(0,t.useState)(null),[C,z]=(0,t.useState)(null);(0,t.useEffect)(()=>{(async()=>{if(e&&null!==a&&void 0!==a&&a.uid)try{const l=(0,c.doc)(n.db,"examAttempts",e),d=await(0,c.getDoc)(l);if(!d.exists())return void s("/learner/my-courses");const o=d.data();if(!y&&o.userId!==a.uid)return void s("/learner/my-courses");const i=(0,c.rJ)(n.db,"examAttempts",e,"questions"),x=await(0,c.GG)(i),p=[...x.docs.map(e=>e.data())].sort((e,s)=>(e.order||0)-(s.order||0));w((0,r.A)({id:d.id},o)),N(p);try{const s=(0,c.P)((0,c.rJ)(n.db,"generatedCourses"),(0,c._M)("userId","==",a.uid),(0,c._M)("attemptId","==",e),(0,c.AB)(1)),t=await(0,c.GG)(s);t.empty||z((0,r.A)({id:t.docs[0].id},t.docs[0].data()))}catch(t){}}catch(l){console.error("Load error:",l)}finally{j(!1)}})()},[e,a]);const G=(0,t.useMemo)(()=>{if(!v.length||null===k||void 0===k||!k.answers)return null;const e={domains:{},groups:{},score:0};let s=0;return v.forEach(a=>{const r=k.answers[a.questionId]===a.correctAnswer;r&&s++,e.domains[a.domain]||(e.domains[a.domain]={c:0,t:0}),e.domains[a.domain].t++,r&&e.domains[a.domain].c++;const t=a.processGroup||"General";e.groups[t]||(e.groups[t]={c:0,t:0}),e.groups[t].t++,r&&e.groups[t].c++}),e.score=Math.round(s/v.length*100),e},[v,k]),I=(0,t.useMemo)(()=>{if(!G)return"Developing";const e=G.score;return e>=95?"Executive":e>=90?"Senior Lead":e>=85?"Lead":e>=75?"Senior":e>=65?"Professional":"Developing"},[G]);if(f||!G)return(0,g.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-transparent",children:(0,g.jsx)(b.A,{className:"animate-spin h-8 w-8 text-yellow-500"})});const q=v.length,S=v.filter(e=>k.answers[e.questionId]===e.correctAnswer).length,L=q-S;return(0,g.jsxs)("div",{className:"max-w-6xl mx-auto px-4 py-8 space-y-8 bg-transparent text-sm font-bold",children:[(0,g.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h1",{className:"text-3xl font-black uppercase tracking-tight",children:"Question-by-Question Review"}),(0,g.jsx)("p",{className:"text-sm mt-1 opacity-60",children:"Detailed breakdown of your assessment performance"})]}),(0,g.jsxs)("div",{className:"flex gap-3",children:[(0,g.jsxs)("button",{onClick:()=>s("/assessments/".concat(e,"/analysis")),className:"flex items-center gap-2 px-5 py-2.5 rounded-xl border border-gray-300 dark:border-gray-700 bg-transparent text-xs font-black uppercase tracking-widest hover:border-yellow-500 transition-all",children:[(0,g.jsx)(p.A,{size:14}),"Back to Results"]}),C?(0,g.jsxs)("button",{onClick:()=>s("/learner/generated-course/".concat(C.id)),className:"flex items-center gap-2 px-6 py-2.5 rounded-xl bg-emerald-500 text-black font-black text-xs uppercase tracking-widest hover:bg-emerald-400 transition-all shadow-lg",children:[(0,g.jsx)(u.A,{size:14}),C.progress>0?"Resume My Course":"Start My Course"]}):(0,g.jsxs)("button",{onClick:()=>s("/assessments/".concat(e,"/course-preview")),className:"flex items-center gap-2 px-6 py-2.5 rounded-xl bg-yellow-400 text-black font-black text-xs uppercase tracking-widest hover:bg-yellow-300 transition-all shadow-lg",children:[(0,g.jsx)(x.A,{size:14}),"Generate My Course"]})]})]}),(0,g.jsx)("section",{className:"rounded-3xl border border-gray-300 dark:border-gray-700 bg-transparent p-8 shadow-sm",children:(0,g.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[(0,g.jsxs)("div",{className:"flex items-center gap-6",children:[(0,g.jsx)("div",{className:"flex items-center justify-center h-20 w-20 rounded-full bg-yellow-500/10 border-4 border-yellow-500",children:(0,g.jsxs)("span",{className:"text-3xl font-black text-yellow-500",children:[G.score,"%"]})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"text-2xl font-black mb-1",children:I}),(0,g.jsx)("p",{className:"text-sm opacity-70",children:"Performance Level"})]})]}),(0,g.jsxs)("div",{className:"flex gap-8",children:[(0,g.jsxs)("div",{className:"text-center",children:[(0,g.jsx)("div",{className:"text-3xl font-black text-emerald-500",children:S}),(0,g.jsx)("div",{className:"text-xs uppercase tracking-widest opacity-60 mt-1",children:"Correct"})]}),(0,g.jsxs)("div",{className:"text-center",children:[(0,g.jsx)("div",{className:"text-3xl font-black text-red-500",children:L}),(0,g.jsx)("div",{className:"text-xs uppercase tracking-widest opacity-60 mt-1",children:"Incorrect"})]}),(0,g.jsxs)("div",{className:"text-center",children:[(0,g.jsx)("div",{className:"text-3xl font-black opacity-60",children:q}),(0,g.jsx)("div",{className:"text-xs uppercase tracking-widest opacity-60 mt-1",children:"Total"})]})]})]})}),(0,g.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,g.jsxs)("div",{className:"rounded-3xl border border-gray-300 dark:border-gray-700 bg-transparent p-6 shadow-sm",children:[(0,g.jsx)("h3",{className:"text-xs font-black uppercase tracking-widest opacity-60 mb-4",children:"Domain Performance"}),(0,g.jsx)("div",{className:"space-y-3",children:Object.entries(G.domains).map(e=>{let[s,a]=e;const r=Math.round(a.c/a.t*100);return(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsxs)("div",{className:"flex justify-between items-center text-xs",children:[(0,g.jsx)("span",{className:"font-bold opacity-70",children:s}),(0,g.jsxs)("span",{className:"font-black",children:[r,"%"]})]}),(0,g.jsx)("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:(0,g.jsx)("div",{className:"h-full transition-all ".concat(r>=80?"bg-emerald-500":r>=60?"bg-yellow-500":"bg-red-500"),style:{width:"".concat(r,"%")}})})]},s)})})]}),(0,g.jsxs)("div",{className:"rounded-3xl border border-gray-300 dark:border-gray-700 bg-transparent p-6 shadow-sm",children:[(0,g.jsx)("h3",{className:"text-xs font-black uppercase tracking-widest opacity-60 mb-4",children:"Process Group Performance"}),(0,g.jsx)("div",{className:"space-y-3",children:Object.entries(G.groups).map(e=>{let[s,a]=e;const r=Math.round(a.c/a.t*100);return(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsxs)("div",{className:"flex justify-between items-center text-xs",children:[(0,g.jsx)("span",{className:"font-bold opacity-70",children:s}),(0,g.jsxs)("span",{className:"font-black",children:[r,"%"]})]}),(0,g.jsx)("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:(0,g.jsx)("div",{className:"h-full transition-all ".concat(r>=80?"bg-emerald-500":r>=60?"bg-yellow-500":"bg-red-500"),style:{width:"".concat(r,"%")}})})]},s)})})]})]}),(0,g.jsxs)("section",{className:"space-y-4",children:[(0,g.jsx)("h2",{className:"text-lg font-black uppercase tracking-tight",children:"Question Breakdown"}),v.map((e,s)=>{var a;const r=null===(a=k.answers)||void 0===a?void 0:a[e.questionId],t=r===e.correctAnswer,l=A===s;return(0,g.jsxs)("div",{className:"rounded-2xl border border-gray-300 dark:border-gray-700 bg-transparent transition-all ".concat(l?"ring-2 ring-yellow-500/30":""),children:[(0,g.jsxs)("button",{onClick:()=>M(l?null:s),className:"w-full text-left p-5 flex justify-between items-start gap-4 hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:[(0,g.jsxs)("div",{className:"flex-1 space-y-3",children:[(0,g.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,g.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-1 rounded bg-indigo-500/10 text-indigo-500 tracking-wider border border-indigo-500/20",children:e.domain}),(0,g.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-1 rounded bg-emerald-500/10 text-emerald-500 tracking-wider border border-emerald-500/20",children:e.processGroup}),(0,g.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-1 rounded tracking-wider border ".concat(t?"bg-emerald-500/10 text-emerald-500 border-emerald-500/20":"bg-red-500/10 text-red-500 border-red-500/20"),children:t?"Correct":"Incorrect"})]}),(0,g.jsxs)("h3",{className:"font-bold text-base leading-snug",children:["Question ",s+1,": ",e.questionText]})]}),(0,g.jsxs)("div",{className:"flex items-center gap-3",children:[t?(0,g.jsx)(o.A,{className:"text-emerald-500 flex-shrink-0",size:20}):(0,g.jsx)(i.A,{className:"text-red-500 flex-shrink-0",size:20}),l?(0,g.jsx)(h.A,{className:"text-yellow-500 flex-shrink-0",size:18}):(0,g.jsx)(m.A,{className:"opacity-40 flex-shrink-0",size:18})]})]}),l&&(0,g.jsxs)("div",{className:"px-5 pb-6 space-y-4 border-t border-gray-300 dark:border-gray-700 pt-4",children:[(0,g.jsx)("div",{className:"space-y-2",children:Object.entries(e.options).map(s=>{let[a,t]=s;const l=r===a,c=e.correctAnswer===a;return(0,g.jsx)("div",{className:"p-3 rounded-xl border transition-all ".concat(c?"border-emerald-500/50 bg-emerald-500/5":l?"border-red-500/50 bg-red-500/5":"border-gray-300 dark:border-gray-700 bg-transparent"),children:(0,g.jsxs)("div",{className:"flex items-start gap-2",children:[(0,g.jsxs)("span",{className:"font-black text-xs ".concat(c?"text-emerald-500":l?"text-red-500":"opacity-60"),children:[a,"."]}),(0,g.jsx)("span",{className:"text-sm flex-1 ".concat(c?"text-emerald-500 font-bold":l?"text-red-500 font-bold":"opacity-70"),children:t})]})},a)})}),e.explanation&&(0,g.jsxs)("div",{className:"p-4 rounded-xl bg-yellow-500/5 border border-yellow-500/20",children:[(0,g.jsx)("p",{className:"text-xs font-black uppercase text-yellow-500 mb-2 tracking-widest",children:"Explanation"}),(0,g.jsx)("p",{className:"text-sm leading-relaxed opacity-90",children:e.explanation})]})]})]},e.questionId)})]}),(0,g.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 pt-6",children:[C?(0,g.jsxs)("button",{onClick:()=>s("/learner/generated-course/".concat(C.id)),className:"flex-1 flex items-center justify-center gap-3 px-8 py-4 rounded-2xl font-black text-sm bg-emerald-500 text-black hover:bg-emerald-400 transition-all uppercase tracking-widest shadow-lg",children:[(0,g.jsx)(u.A,{size:20}),(0,g.jsx)("span",{children:C.progress>0?"Resume My Course":"Start My Course"})]}):(0,g.jsxs)("button",{onClick:()=>s("/assessments/".concat(e,"/course-preview")),className:"flex-1 flex items-center justify-center gap-3 px-8 py-4 rounded-2xl font-black text-sm bg-yellow-400 text-black hover:bg-yellow-300 transition-all uppercase tracking-widest shadow-lg",children:[(0,g.jsx)(x.A,{size:20}),(0,g.jsx)("span",{children:"Generate My Personalized Course"})]}),(0,g.jsx)("button",{onClick:()=>s("/assessments/".concat(e,"/analysis")),className:"flex-1 px-8 py-4 rounded-2xl font-black text-sm border-2 border-gray-300 dark:border-gray-700 bg-transparent hover:border-yellow-500 transition-all uppercase tracking-widest",children:"Back to Analysis"})]})]})}},15711(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},56099(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},64830(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},65469(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},76245(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},76833(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},92382(e,s,a){a.d(s,{A:()=>r});const r=(0,a(77784).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])}}]); 3//# sourceMappingURL=4150.ef9ce114.chunk.js.map
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.