1import{r as C,Z as e,a3 as o,a2 as v,a5 as w,d8 as P,bj as T,a4 as k}from"./vendor-mui-D5pLRgDb.js";import{c4 as I,X as E}from"./index-BSFWpFMK.js";import{L as B}from"./LearningContest-BYK0PEAI.js";import"./__commonjsHelpers__-BosuxZz1.js";import"./vendor-sweetalert2-CokzRhbv.js";import"./Constant-ChAz5tWE.js";import"./vendor-ace-CwHVNqeR.js";const $="_labTestsContainer_1unr7_2",y="_info_1unr7_10",M="_nextButtonContainer_1unr7_14",S="_next_problem__btn_1unr7_21",j="_testContainer_1unr7_46",R="_testUnit_1unr7_52",U="_test_1unr7_46",L="_loadingIcon_1unr7_67",V="_idle_1unr7_70",A="_success_1unr7_73",D="_failed_1unr7_76",O="_testExplanation_1unr7_79",Y="_dark_1unr7_99",t={labTestsContainer:$,info:y,nextButtonContainer:M,next_problem__btn:S,testContainer:j,testUnit:R,test:U,loadingIcon:L,idle:V,success:A,failed:D,testExplanation:O,dark:Y};function K(u){const{tests:l,testsVerdicts:a,testsExplanations:c,isSolutionRunning:_,setShowTransition:m,isAssessmentContest:i=!1}=u,{state:s}=C.useContext(B),p=window.location.pathname.split("/")[1]==="practice",r=window.location.pathname.split("/")[1]==="review",d=r?"review":`${p?"practice":"learn"}/course/${s?.syllabusData?.slug}`,b=e("div",{className:t.info,children:_?"Running tests...":a?.length?"Test results":"Test Cases"}),h=n=>_?e(w,{className:t.loadingIcon,size:"18px"}):a?.length?a[Number(n)]?.status==="15"?e(T,{className:t.success}):e(k,{className:t.failed}):e(P,{className:t.idle}),x=()=>{s?.problemNavigation?.current_problem_position===s?.problemNavigation?.total_problems?i||r?window.location.href=`/skill-test/${s.parent_contest_code}`:m(!0):window.location.href=`/${i&&!r?"skill-test":d}/${s.contest_code}/problems/${s?.problemNavigation?.next}`},f=()=>(i||r)&&s?.problemNavigation?.current_problem_position===s?.problemNavigation?.total_problems?"View Summary":"Move to next problem",N=o("div",{className:t.nextButtonContainer,ref:n=>{n&&n.scrollIntoView({behavior:"smooth"})},children:[o("p",{children:["Congratulations"," ",I.PARTY," ","You have solved the problem!!"]}),e("button",{type:"button",className:t.next_problem__btn,onClick:x,children:e("p",{className:t.btn__text,children:f()})})]});return o("div",{className:E(t.labTestsContainer,t.dark),children:[b,e("div",{className:t.testContainer,children:l.length?o(v,{children:[Object.entries(l).map(([n,g])=>o("div",{className:t.testUnit,children:[o("div",{className:t.test,children:[e("p",{children:h(n)}),e("p",{children:g})]}),c[Number(n)]?.explanation?e("div",{className:t.testExplanation,children:e("pre",{children:c[Number(n)]?.explanation})}):null]}))," "]}):"No tests are present"}),a.length>0&&a.every(n=>n.status==="15")?N:null]})}export{K as default};
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.