1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="738e5e2d-90c4-4111-9843-0da5470fbbdd",e._sentryDebugIdIdentifier="sentry-dbid-738e5e2d-90c4-4111-9843-0da5470fbbdd")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4012],{24012:(e,t,r)=>{r.r(t),r.d(t,{PracticeTest:()=>M});var s=r(10940),n=r(57128),a=r(24027),i=r(47924),l=r(49e3),c=r(35182),o=r(62544),d=r(18969),u=r(5442),x=r(16254),m=r(11222),f=r(40652),h=r(29979),g=r(28579),p=r(66451),b=r(18044),v=r.n(b),k=r(35247),y=r.n(k),j=r(72438),q=r(45392),w=r(67508),N=r(68179),C=r(96261),I=r(78638),_=r(63831),A=r(42861),S=r(12832);function R(){return{selectedChoice:null,checkedChoices:{},firstChoice:null}}function T(){return{partResponses:{},currentPartIndex:0,firstChecks:{},latestChecks:{}}}function Q(e){var t,r,s,n,a,i;if(!e)return{currentQuestionIndex:0,isSubmitted:!1,mcq:{},frq:{},timer:null};let l="questionsState"in e?e.questionsState:void 0;return{currentQuestionIndex:null!=(t=e.currentQuestionIndex)?t:0,isSubmitted:null!=(r=e.isSubmitted)&&r,mcq:null!=(n=null!=(s=e.mcq)?s:l)?n:{},frq:null!=(a=e.frq)?a:{},timer:null!=(i=e.timer)?i:null}}function F(e,t){var r,s,n,a,i;switch(t.type){case"loadSession":return Q(t.progress);case"reset":return Q();case"setTimer":e.timer=t.timer;return;case"goToQuestion":e.currentQuestionIndex=t.questionIndex;return;case"submitTest":e.isSubmitted=!0;return;case"selectChoice":{let s=null!=(r=e.mcq[t.questionIndex])?r:R();s.selectedChoice=t.choiceIndex,e.mcq[t.questionIndex]=s;return}case"checkMCQ":{let r=null!=(s=e.mcq[t.questionIndex])?s:R();null===r.firstChoice&&(r.firstChoice={index:t.choiceIndex,correct:t.correct}),r.checkedChoices[t.choiceIndex]=!0,e.mcq[t.questionIndex]=r;return}case"checkFRQ":{let r=null!=(n=e.frq[t.questionIndex])?n:T();r.firstChecks||(r.firstChecks={}),r.latestChecks||(r.latestChecks={}),Object.hasOwn(r.firstChecks,t.subIndex)||(r.firstChecks[t.subIndex]=t.check),r.latestChecks[t.subIndex]=t.check,e.frq[t.questionIndex]=r;return}case"setFRQAnswer":{let r=null!=(a=e.frq[t.questionIndex])?a:T();r.partResponses[t.subIndex]=t.value,e.frq[t.questionIndex]=r;return}case"setFRQSubIndex":{let r=null!=(i=e.frq[t.questionIndex])?i:T();r.currentPartIndex=t.subIndex,e.frq[t.questionIndex]=r;return}default:return(0,m.Z)(t)}}v().extend(y());let M=e=>{var t,r;let{message:b,disableStickyHeader:k}=e,{t:y}=(0,f.Bd)(),{calculator:R}=(0,o.useContext)(n.A),{setArtifactViewState:T}=(0,x.cM)(),{parsedPracticeTest:M,error:E}=function(e){return(0,o.useMemo)(()=>{try{var t,r,s,n,a;let i=JSON.parse(e),l=null!=(a=null==(r=i.practice_test)||null==(t=r.questions)?void 0:t.map(e=>(0,_.a4)(e)?(0,_.V5)(e):e))?a:[];return{parsedPracticeTest:{...i,practice_test:{questions:l,timer:null==(s=i.practice_test)?void 0:s.timer,calculator_enabled:null==(n=i.practice_test)?void 0:n.calculator_enabled}},error:null}}catch(e){return{parsedPracticeTest:null,error:"Failed to parse: ".concat(e instanceof Error?e.message:String(e))}}},[e])}(b.content),z=null==M?void 0:M.practice_test,{session:O,session:{mcq:P,frq:$,currentQuestionIndex:B,isSubmitted:J,timer:U},goToQuestion:G,submitTest:L,resetSession:H,setTimer:K,selectChoice:W,checkMCQ:Z,getFRQAnswer:V,setFRQAnswer:X,getFRQSubIndex:Y,setFRQSubIndex:ee,checkFRQ:et,getLatestFRQCheck:er,needsImmediateSave:es,testResults:en}=function(e){var t,r,s;let{practiceTest:n}=e,a=null!=(r=null==n?void 0:n.progress)?r:void 0,i=null!=(s=null==n||null==(t=n.practice_test)?void 0:t.questions)?s:[],[l,c]=(0,S.A)(F,a,Q),d=(0,o.useRef)(!1),u=(0,o.useRef)(!1);(0,o.useEffect)(()=>{!u.current&&a&&(u.current=!0,c({type:"loadSession",progress:a}))},[a]);let x=Object.keys(l.mcq).length>0||Object.keys(l.frq).length>0,m=(0,o.useMemo)(()=>{let e=0,t=0,r=0;for(let[c,o]of i.entries()){var s,n,a;if((0,_.a4)(o)){r+=1;let s=null==(n=l.mcq[c])?void 0:n.firstChoice;if(!s)continue;t+=1,s.correct&&(e+=1);continue}if(!(0,_.IT)(o)||!Array.isArray(o.subquestions))continue;let i=null!=(a=null==(s=l.frq[c])?void 0:s.firstChecks)?a:{};for(let[s,n]of o.subquestions.entries()){r+=n.criteria.reduce((e,t)=>
1e+t.maxPoints,0);let a=i[s];if(!a)continue;let l=n.criteria.reduce((e,t)=>e+t.maxPoints,0),c=a.criteria.reduce((e,t)=>e+t.pointsAwarded,0);t+=l,e+=c}}let c=r>0?Math.round(e/r*100):0;return{pointsEarned:e,pointsAttempted:t,percentage:c}},[l.mcq,l.frq,i]);return{session:l,dispatch:c,hasTestStarted:x,goToQuestion:e=>{c({type:"goToQuestion",questionIndex:e})},submitTest:()=>{c({type:"submitTest"}),d.current=!0},resetSession:()=>{c({type:"reset"}),d.current=!0},setTimer:e=>{c({type:"setTimer",timer:e}),d.current=!0},selectChoice:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.currentQuestionIndex;c({type:"selectChoice",questionIndex:t,choiceIndex:e})},checkMCQ:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.currentQuestionIndex;c({type:"checkMCQ",questionIndex:r,choiceIndex:e,correct:t}),d.current=!0},getFRQAnswer:(e,t)=>{var r,s;return null!=(s=null==(r=l.frq[e])?void 0:r.partResponses[t])?s:""},setFRQAnswer:(e,t,r)=>{c({type:"setFRQAnswer",questionIndex:e,subIndex:t,value:r})},getFRQSubIndex:e=>{var t,r;return null!=(r=null==(t=l.frq[e])?void 0:t.currentPartIndex)?r:0},setFRQSubIndex:(e,t)=>{c({type:"setFRQSubIndex",questionIndex:e,subIndex:t})},checkFRQ:(e,t,r)=>{c({type:"checkFRQ",questionIndex:e,subIndex:t,check:r}),d.current=!0},getLatestFRQCheck:(e,t)=>{var r,s;return null==(s=l.frq[e])||null==(r=s.latestChecks)?void 0:r[t]},needsImmediateSave:()=>{let e=d.current;return d.current=!1,e},testResults:m}}({practiceTest:M}),{secondsRemaining:ea,isPaused:ei,togglePaused:el}=function(e){let{duration:t,timer:r,onTimerChange:s}=e,n=void 0!==t?1e3*t:null,[a,i]=(0,o.useState)(()=>Date.now());(0,o.useEffect)(()=>{if(r||null===n)return;let e=Date.now();s({endAt:e+n,pausedRemainingMs:null}),i(e)},[r,n]),(0,o.useEffect)(()=>{if(!r||null===r.endAt)return;let e=setInterval(()=>i(Date.now()),500);return()=>clearInterval(e)},[null==r?void 0:r.endAt]);let l=(null==r?void 0:r.pausedRemainingMs)!=null,c=r?null!==r.endAt?r.endAt-a:r.pausedRemainingMs:n;return{secondsRemaining:null!==c?Math.max(0,Math.ceil(c/1e3)):null,isPaused:l,togglePaused:()=>(e=>{if(!r)return;let t=Date.now();e&&null!==r.endAt?(s({endAt:null,pausedRemainingMs:Math.max(0,r.endAt-t)}),i(t)):e||null===r.pausedRemainingMs||(s({endAt:t+r.pausedRemainingMs,pausedRemainingMs:null}),i(t))})(!l)}}({duration:null==z?void 0:z.timer,timer:U,onTimerChange:K}),{getResult:ec,gradeSubquestion:eo,invalidateResult:ed,resetResults:eu}=(0,A.L)(),ex=(e,t)=>{let r=ec(e,t),s=er(e,t);return(null==r?void 0:r.status)==="invalidated"?{status:"invalidated",result:s}:r||(s?{status:"done",result:s}:{status:"idle"})},em=async(e,t,r)=>{var s;let n=V(e,t);if(!n.trim()||!r.subquestions||!(null==(s=r.question)?void 0:s.text))return;let a=await eo(e,t,r,n);a&&et(e,t,a)},{saveProgress:ef}=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500,{isSignedIn:s}=(0,c.As)(),{state:{isArtifactCurrentlyStreaming:d}}=(0,o.useContext)(n.A),u=(0,a.G3)(),x=null!=(t=null==u?void 0:u.isStreaming)&&t,[m,f]=(0,o.useState)("idle"),h=(0,o.useRef)(null),g=(0,o.useRef)(null),p=(0,o.useCallback)(function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!u||!e||d||x)return;f("unsaved");let c={...u,messages:u.messages.map(r=>{if(r.id!==e||"tool"!==r.role||!("artifact_type"in r)||"string"!=typeof r.content)return r;if(r.artifact_type===l.FR.APUnit){let e=JSON.parse(r.content),s={...e,practiceTest:{...e.practiceTest,data:{...e.practiceTest.data,progress:t}}};return{...r,content:JSON.stringify(s)}}let s=JSON.parse(r.content);return{...r,content:JSON.stringify({...s,progress:t})}})};a.Pk.getState().patchConversation(c.id,c),h.current&&clearTimeout(h.current);let o=()=>{f("saving"),(0,i.dy)({conversation:c,isSignedIn:!!s}).catch(e=>{console.error("Failed to save practice test progress",e),f("failed")}).then(()=>{f("saved")})};n?(g.current=null,o()):(g.current=o,h.current=setTimeout(()=>{g.current=null,o()},r))},[u,e,d,s]);return(0,o.useEffect)(()=>()=>{h.current&&clearTimeout(h.current);let e=g.current;g.current=null,e&&e()},[]),{saveProgress:p,saveState:m}}(b.id),eh=(0,o.useRef)(!0);(0,o.useEffect)(()=>
1{if(b.id){var e;let t=null==z||null==(e=z.questions)?void 0:e[B];if(t){let e=(0,_.a4)(t)?P[B]:$[B];T({type:l.FR.PracticeTest,question:t,questionIndex:B,questionState:e})}}},[B,P,$,null==z?void 0:z.questions]),(0,o.useEffect)(()=>{if(z){if(eh.current){eh.current=!1;return}ef(O,es())}},[O]);let eg=()=>{var e,t,r;let s=null==z||null==(e=z.questions)?void 0:e[B];if((null==s?void 0:s.type)==="free_response"){let e=null!=(r=null==(t=s.subquestions)?void 0:t.length)?r:1,n=Y(B);if(n<e-1)return void ee(B,n+1)}G(B+1)},ep=(0,o.useMemo)(()=>{let e=B+1;if(!(null==z?void 0:z.questions))return y("artifacts.practice.test.motivation.start");let t=e/z.questions.length*100;if(J)return y("artifacts.practice.test.motivation.completed");if(1===e)return y("artifacts.practice.test.motivation.start");if(e===z.questions.length)return y("artifacts.practice.test.motivation.almostDone");if(t>0&&t<=25)return y("artifacts.practice.test.motivation.onARoll");if(t>25&&t<50)return y("artifacts.practice.test.motivation.remaining",{count:z.questions.length-e});else if(50===t)return y("artifacts.practice.test.motivation.halfway");else if(t>50&&t<=75)return y("artifacts.practice.test.motivation.remaining",{count:z.questions.length-e});else if(t>75&&t<=85)return y("artifacts.practice.test.motivation.youGotThis");else if(t>85&&t<=100)return y("artifacts.practice.test.motivation.almostDone");else return y("artifacts.practice.test.motivation.start")},[B,null==z?void 0:z.questions,J,y]);if(E)return(0,s.jsx)(h.w,{error:E});if(!z||!Array.isArray(null==z?void 0:z.questions))return null;let eb=z.questions[B];if(!eb)return(0,s.jsx)("div",{className:"w-full min-h-full"});let ev=(0,_.IT)(eb),ek=Y(B),ey=ev&&null!=(r=null==(t=eb.subquestions)?void 0:t.length)?r:1,ej=P[B],eq=ev?y("artifacts.practice.partLabel",{letter:(0,_.Tx)(ek)}):null;return(0,s.jsxs)("div",{className:"w-full min-h-full flex flex-col",children:[(0,s.jsxs)("div",{className:(0,m.cn)("flex px-4 flex-col bg-white dark:bg-dark-bg",!k&&"sticky left-0 top-0 z-20"),children:[(0,s.jsxs)("div",{className:"flex flex-col pb-4 border-b border-gray-200 dark:border-dark-border mb-5",children:[(0,s.jsx)("h2",{className:"text-md dark:text-dark-text-primary",children:ep}),(0,s.jsx)("div",{className:"flex gap-2 mt-4",children:z.questions.map((e,t)=>{var r,n;let a=t<=B;if((0,_.a4)(e))return(0,s.jsx)("div",{className:(0,m.cn)("w-16 h-1 rounded-full transition-all cursor-pointer",a?"bg-blue-primary":"bg-gray-200 dark:bg-dark-border"),onClick:()=>G(t)},t);let i="free_response"===e.type&&null!=(n=null==(r=e.subquestions)?void 0:r.length)?n:1,l=Y(t);return(0,s.jsx)("div",{className:"w-16 flex gap-px",children:Array.from({length:i}).map((e,r)=>{let n=t<B||t===B&&r<=l;return(0,s.jsx)("div",{className:(0,m.cn)("flex-1 h-1 rounded-full transition-all cursor-pointer",n?"bg-blue-primary":"bg-gray-200 dark:bg-dark-border"),onClick:()=>{G(t),ee(t,r)}},r)})},t)})}),(0,s.jsx)("div",{className:"w-full flex flex-col items-start justify-between mt-2",children:(0,s.jsxs)("div",{className:"w-full flex items-center justify-between flex-wrap gap-2 mt-2",children:[(0,s.jsx)("p",{className:"text-sm text-gray-500 dark:text-dark-text-secondary",children:(0,s.jsx)(f.x6,{i18nKey:"artifacts.practice.test.pointsEarned",count:en.pointsAttempted,values:{earned:en.pointsEarned},components:{earned:(0,s.jsx)("span",{className:"font-medium text-green-500"}),attempted:(0,s.jsx)("span",{className:"font-medium"})}})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(null==z?void 0:z.calculator_enabled)&&(0,s.jsx)(d.$,{variant:"outline",size:"sm",className:"shrink-0 text-xs font-normal px-2 py-0 h-8 text-gray-700 dark:text-dark-text-primary hover:text-gray-800 dark:hover:text-dark-text-primary rounded-[10px] hover:bg-gray-100 dark:hover:bg-dark-hover bg-white dark:bg-dark-card border border-gray-200 dark:border-dark-border gap-0.5 ".concat(R.isOpen?"bg-gray-100":""),onClick:()=>{R.setIsOpen(!R.isOpen)},children:(0,s.jsx)(j.A,{size:16,strokeWidth:2})}),null!==ea&&(0,s.jsx)(u.Bc,{children:(0,s.jsxs)(u.m_,{delayDuration:0,children:[(0,s.jsx)(u.k$,{asChild:!0,children:(0,s.jsxs)(d.$,{variant:"ghost",className:"w-auto h-8 hover:bg-transparent px-2 py-0 flex items-center gap-1 text-sm dark:text-dark-text-secondary","data-testid":"toggle-test-timer",onClick:el,children:[ei?(0,s.jsx)(q.A,{size:16}):(0,s.jsx)(w.A,{size:16}),(0,s.jsx)("span",{className:"tabular-nums",children:v().duration(ea,"seconds").format("HH:mm:ss")})]})}),(0,s.jsx)(u.ZI,{side:"top",className:"text-xs",children:(0,s.jsx)("p",{children:ei?y("artifacts.practice.test.timer.resume"):y("artifacts.practice.test.timer.pause")})})]})})]})]})}),J&&(0,s.jsxs)("div",{className:"flex mt-2 justify-between items-center",children:[(0,s.jsx)("p",{className:"text-sm text-gray-500 dark:text-dark-text-secondary","data-testid":"test-score",children:(0,s.jsx)(f.x6,{i18nKey:"artifacts.practice.test.score",values:{percentage:en.percentage},components:{score:(0,s.jsx)("b",{className:(0,m.cn)(en.percentage>=50?"text-green-500":"text-red-500")})}})}),(0,s.jsxs)(d.$,{variant:"ghost",size:"sm",className:"gap-1 text-sm h-auto py-1 hover:bg-gray-50 dark:hover:bg-dark-hover","data-testid":"reset-test",onClick:()=>{H(),eu()},children:[(0,s.jsx)(N.A,{size:16}),y("artifacts.practice.test.reset")]})]})]}),!J&&(0,s.jsxs)("div",{className:"flex justify-between items-center py-2 w-full mx-auto max-w-[600px] shadow-white dark:shadow-dark-bg shadow-xl",children:[(0,s.jsx)(d.$,{variant:"ghost",className:"w-auto h-auto -ml-1 text-gray-600 dark:text-dark-text-secondary hover:text-gray-900 dark:hover:text-dark-text-primary",size:"icon",onClick:()=>{var e;let t=null==z||null==(e=z.questions)?void 0:e[B];if((null==t?void 0:t.type)==="free_response"){let e=Y(B);if(e>0)return void ee(B,e-1)}G(B-1)},disabled:0===B&&(!ev||0===ek),children:(0,s.jsx)(C.A,{})}),(0,s.jsxs)("span",{className:"text-[#919090] dark:text-dark-text-secondary text-sm select-none",children:[y("artifacts.practice.test.questionNumber",{number:B+1}),eq&&" (".concat(eq,")")]}),(0,s.jsx)(d.$,{variant:"ghost",className:"w-auto h-auto ml-1 text-gray-600 dark:text-dark-text-secondary hover:text-gray-900 dark:hover:text-dark-text-primary",size:"icon",onClick:eg,disabled:B===z.questions.length-1&&(!ev||e
1k===ey-1),children:(0,s.jsx)(I.A,{})})]})]}),J?(0,s.jsx)("div",{className:"bg-white dark:bg-dark-bg p-4 w-full flex-1 flex justify-center",children:(0,s.jsx)("div",{className:"w-full max-w-[600px] flex flex-col ",children:z.questions.map((e,t)=>{var r,n,a,i;let l={},c=null==P||null==(n=P[t])||null==(r=n.firstChoice)?void 0:r.index;null!=c&&(l[c]=!0);let o=(0,_.a4)(e)?(null==P||null==(i=P[t])||null==(a=i.firstChoice)?void 0:a.correct)?"correct":"incorrect":((e,t,r)=>{var s,n,a;if((0,_.a4)(t))return null!==(null!=(a=null==(n=e.mcq[r])?void 0:n.firstChoice)?a:null);let i=null==(s=e.frq[r])?void 0:s.firstChecks;return!!i&&Object.keys(i).length>0})(O,e,t)?void 0:"not_attempted";return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-[#0D0D0D] dark:text-[#F3F3F3]",children:y("artifacts.practice.test.questionProgress",{current:t+1,total:z.questions.length})}),o&&(0,s.jsx)(D,{value:o})]}),(0,_.a4)(e)?(0,s.jsx)(p.e,{practiceQuestion:e,selectedChoice:null,checkedChoices:l,hideCheckButton:!0,highlightCorrectAnswer:!0}):(0,s.jsx)(g.C4,{frq:e,partStates:e.subquestions.map((e,r)=>({answer:V(t,r),gradingState:ex(t,r)}))}),t!==z.questions.length-1&&(0,s.jsx)("div",{className:"my-10 w-full h-[1px] bg-gray-200 dark:bg-dark-border"})]},t)})})}):(0,s.jsx)("div",{className:"p-4 w-full flex-1 bg-white dark:bg-dark-bg flex justify-center pt-0",children:(0,s.jsx)("div",{className:"w-full max-w-[600px] mt-3",children:(0,_.a4)(eb)?(0,s.jsx)(p.e,{practiceQuestion:eb,selectedChoice:null==ej?void 0:ej.selectedChoice,onSelect:W,checkedChoices:(null==ej?void 0:ej.checkedChoices)||{},onCheck:Z,onNext:eg,showSubmitTestButton:B===z.questions.length-1,onSubmit:L},B):(0,s.jsx)(g.cW,{frq:eb,currentSubIndex:ek,answer:V(B,ek),onAnswerChange:e=>((e,t,r)=>{X(e,t,r),ed(e,t)})(B,ek,e),onCheck:()=>em(B,ek,eb),gradingState:ex(B,ek),showSubmitTestButton:B===z.questions.length-1&&ek===ey-1,onSubmit:L})})})]})},D=e=>{let{value:t}=e,{t:r}=(0,f.Bd)();return(0,s.jsx)("span",{className:(0,m.cn)("text-xs px-3 py-1 rounded-full border","correct"===t?"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-700 text-green-600 dark:text-green-400":"incorrect"===t?"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-700 text-red-600 dark:text-red-400":"bg-gray-50 dark:bg-dark-hover border-gray-200 dark:border-dark-border text-gray-900 dark:text-dark-text-primary"),children:r("correct"===t?"artifacts.practice.test.status.correct":"incorrect"===t?"artifacts.practice.test.status.incorrect":"artifacts.practice.test.status.notAttempted")})}},66451:(e,t,r)=>{r.d(t,{e:()=>f});var s=r(10940),n=r(7581),a=r(82462),i=r(9265),l=r(18969),c=r(63184),o=r(11222),d=r(28574),u=r(12670),x=r(62544),m=r(40652);let f=e=>{var t,r,f,h,g,p;let{practiceQuestion:b,selectedChoice:v,onSelect:k,checkedChoices:y,onCheck:j,onNext:q,showSubmitTestButton:w,onSubmit:N,hideCheckButton:C,highlightCorrectAnswer:I}=e,{t:_}=(0,m.Bd)(),[A,S]=(0,x.useState)(!1),[R,T]=(0,x.useState)(!1),Q=(0,x.useMemo)(()=>Object.keys(y).some(e=>{var t,r;return(null==b||null==(r=b.choices)||null==(t=r[Number(e)])?void 0:t.correct)===!0}),[y,null==b?void 0:b.choices]),F=null==v||!!y[v];return(0,s.jsxs)("div",{className:"w-full",children:[(null==b||null==(t=b.question)?void 0:t.text)?(0,s.jsx)(a.U,{enableReplySelection:!0,text:b.question.text,className:"[&_img]:max-h-[320px] [&_img]:w-auto [&_img]:max-w-full [&_img]:mx-auto [&_img]:my-4 [&_img]:object-contain"}):(0,s.jsx)(c.E,{className:"h-6 bg-gray-200 dark:bg-dark-hover rounded-lg"}),(null==(r=b.question)?void 0:r.graph)&&(0,s.jsx)("div",{className:"mt-6 w-full px-20 h-72 md:h-96",children:(0,s.jsx)(n.A,{equations:b.question.graph.equations,axis:b.question.graph.axis,points:b.question.graph.points,perspective:"G"})}),(0,s.jsx)("div",{className:"flex flex-col gap-3 mt-6",children:(null==b?void 0:b.choices)&&(null==(f=b.choices)?void 0:f.length)>0?null==(h=b.choices)?void 0:h.map((e,t)=>{let r=v===t,n=e.correct,i=!!n&&!!I||y[t];return(0,s.jsxs)("div",{className:(0,o.cn)("p-4 rounded-lg border transition-all flex flex-row gap-3 items-center overflow-x-auto",i&&n&&"bg-green-50 dark:bg-green-900/20 border-green-400 dark:border-green-700",i&&!n&&"bg-red-50 dark:bg-red-900/20 border-red-400 dark:border-red-700",r&&!i&&"border-[#3490DC] bg-[#EBF8FF] dark:bg-blue-900/20",!r&&!i&&"border-gray-200 dark:border-dark-border bg-white dark:bg-dark-card",i?"items-start":"items-center",k&&!i&&!r&&"hover:bg-gray-50 dark:hover:bg-dark-hover cursor-pointer"),onClick:()=>{k&&(i||k(t))},children:[(0,s.jsx)("div",{className:"h-6 flex items-center justify-center",children:(0,s.jsxs)("div",{className:(0,o.cn)("w-5 h-5 rounded-full border-2 flex items-center justify-center",i&&n&&"border-green-400 dark:border-green-600",i&&!n&&"border-red-400 dark:border-red-600",r&&!i&&"border-[#3490DC]",!r&&!i&&"border-gray-300 dark:border-dark-border"),children:[r&&!i&&(0,s.jsx)("div",{className:"w-2.5 h-2.5 rounded-full bg-[#3490DC]"}),i&&n&&(0,s.jsx)(d.A,{size:14,className:"text-green-500 dark:text-green-400"}),i&&!n&&(0,s.jsx)(u.A,{size:14,className:"text-red-500 dark:text-red-400"})]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(a.U,{text:e.content||"",className:"[&_img]:max-h-[320px] [&_img]:w-auto [&_img]:max-w-full [&_img]:mx-auto [&_img]:my-4 [&_img]:object-contain",wrapperClassName:"overflow-visible"}),i&&e.clue&&(0,s.jsx)(a.U,{text:e.clue||"",className:"[&_img]:max-h-[320px] [&_img]:w-auto [&_img]:max-w-full [&_img]:mx-auto [&_img]:my-4 [&_img]:object-contain"})]})]},t)}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.E,{className:"h-14 bg-gray-200 dark:bg-dark-hover rounded-lg"}),(0,s.jsx)(c.E,{className:"h-14 bg-gray-200 dark:bg-dark-hover rounded-lg"}),(0,s.jsx)(c.E,{className:"h-14 bg-gray-200 dark:bg-dark-hover rounded-lg"})]})}),(0,s.jsxs)("div",{className:"mt-6 flex flex-row gap-3",children:[Q&&w&&N?(0,s.jsx)(l.$,{size:"sm",className:"px-6",variant:"primary","data-testid":"submit-test",onClick:N,children:_("artifacts.practice.submitTest")}):Q&&q?(0,s.jsx)(l.$,{size:"sm",className:"px-6",variant:"primary","data-testid":"next-question",onClick:q,children:_("artifacts.practice.nextQuestion")}):C?null:(0,s.jsx)(l.$,{size:"sm",className:(0,o.cn)("px-6",F&&"disabled:opacity-100 bg-gray-300 dark:bg-dark-border text-gray-500 dark:text-dark-text-secondary cursor-not-allowed border-none hover:bg-gray-300 dark:hover:bg-dark-border"),variant:"primary","data-testid":"check-answer",onClick:()=>{var e;if(null==v)return;let t=null==b||null==(e=b.choices)?void 0:e[v];t&&j&&(j(v,!!t.correct),!1===t.correct?T(!0):T(!1))},disabled:F,children:R?_("artifacts.practice.checkAgain"):_("artifacts.practice.check")}),(0,s.jsx)(l.$,{size:"sm",variant:"ghost",className:(0,o.cn)("text-blue-primary dark:text-blue-400 hover:text-blue-primary dark:hover:text-blue-300 rounded-full",C&&"-ml-2"),disabled:!(null==b||null==(g=b.steps)?void 0:g.length),onClick:()=>{S(!A)}
1,children:A?_("artifacts.practice.hideSteps"):_("artifacts.practice.showSteps")})]}),A&&(0,s.jsx)(i.nD,{className:"mt-4 bg-white dark:bg-transparent",type:"multiple",children:null==(p=b.steps)?void 0:p.map((e,t)=>(0,s.jsxs)(i.As,{value:"step-".concat(t),className:"cursor-pointer hover:bg-gray-50 dark:hover:bg-transparent border-b border-gray-200 dark:border-dark-border last:border-b-0",children:[(0,s.jsx)(i.$m,{className:"p-4 dark:text-dark-text-primary",children:_("artifacts.practice.step",{number:t+1})}),(0,s.jsx)(i.ub,{className:"px-4",children:(0,s.jsx)(a.U,{text:e})})]},t))})]})}}}]);
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.