1import{r as i,i as Xe,d as u,j as e,H as Ye,b as S}from"./app-7HBJ1Apf.js";import{S as Ze}from"./super-admin-layout-CS6NPVk1.js";import{u as et}from"./use-global-institute-filter-DRlmb2K0.js";import{B as p}from"./button-x9iCiHwy.js";import{I as b}from"./input-BKIYy12E.js";import{L as A}from"./label-UWbOryIJ.js";import{D as te,f as tt,a as se,b as ae,c as ie,d as ne,e as st}from"./dialog-o65iHwZw.js";import{S as Q,a as M,b as U,c as R,d as h}from"./select-k7kpKpKU.js";import{D as at,a as it,b as nt,c as f,C as rt}from"./dropdown-menu-B1PUnwcf.js";import{b as lt,C as ot,c as ct,d as dt,a as pt}from"./card-D8QYfN0a.js";import{T as mt}from"./toast-BXJoIwj2.js";import{C as ut}from"./chapter-link-dialog-CjzOS37W.js";import{initialForm as re,SeriesForm as ht}from"./series-form-D5h_6LyB.js";import{D as xt}from"./download-Cae-RyuO.js";import{U as ft}from"./upload-nt3wWHi-.js";import{P as gt}from"./plus-D1PjzTNm.js";import{S as jt}from"./search-DmizD6rg.js";import{E as yt}from"./ellipsis-vertical-Do4Jb0KP.js";import{E as St}from"./eye-Bdy3tE7L.js";import{S as le}from"./square-pen-C0-bV3Jl.js";import{L as Nt}from"./link-2-DOaGzGCs.js";import{F as vt}from"./file-up-DPgUgvVe.js";import{F as _t}from"./file-text-CznOadTM.js";import{C as oe}from"./copy-CSqAbUh-.js";import{A as Ct}from"./arrow-right-left-CC_j3AOz.js";import{T as wt}from"./trash-2-Bv8tA-25.js";import{C as kt,a as bt}from"./chevrons-right-Yo9-Xicu.js";import{C as Tt}from"./chevron-left-0KHFfh7L.js";/* empty css */import"./nav-main-DAd6sXcd.js";import"./createLucideIcon-B-GenWB7.js";import"./sheet-DOKt16Rx.js";import"./index-5SrjSmjN.js";import"./check-DwUTHKzP.js";import"./index-C8WrhDd4.js";import"./index-D70aP5MW.js";import"./x-Vl-l8R5q.js";import"./index-BqjgvoQR.js";import"./use-mobile-navigation-Cs1LY7kG.js";import"./app-logo-icon-vD8jXHxq.js";import"./nav-footer-OztTASvz.js";import"./user-C11W5xqZ.js";import"./institute-admin-app-sidebar-layout-CDfA9CGh.js";import"./users-TfVkPDFO.js";import"./graduation-cap-BzAjWGD_.js";import"./book-open-CekbENE4.js";import"./ticket-WN-C8Icz.js";import"./theme-toggle-C2xQe2Ub.js";import"./sun-BOBLWgeB.js";import"./user-check-A5wfCfeC.js";import"./credit-card-BcqAkj9j.js";import"./school-CcsSJsKd.js";import"./video-BTh5zbtm.js";import"./circle-help-Bx96xs2_.js";import"./bell-Di2hbogt.js";import"./message-square-BXeYCRQ8.js";import"./chevron-down-DSrXABT6.js";import"./circle-play-BBpk1hrR.js";import"./target-CV5Gf0K7.js";import"./sparkles-cElY-yTv.js";import"./settings-CNeQIGts.js";import"./shield-check-B-NQhW7f.js";import"./index-BIyNxQqj.js";import"./index-Cdjj24pt.js";import"./circle-check-big-oqKdYS3K.js";import"./circle-alert-B7oQDflj.js";import"./checkbox-BPvB84DI.js";import"./textarea-D04awu4t.js";import"./ellipsis-_ejmEmuI.js";function Vs({mode:a,title:j}){const m=a==="main"?"/super-admin/main-tests":"/super-admin/practice-tests",ce=[{title:"CMS",href:"#"},{title:j}],[B,de]=i.useState([]),[pe,V]=i.useState(!1),[z,H]=i.useState(!1),[o,me]=i.useState({currentPage:1,lastPage:1,total:0,from:0,to:0}),{selectedInstituteId:N}=Xe(),[_,ue]=i.useState(""),[C,he]=i.useState("all"),[P,xe]=i.useState(""),[D,fe]=i.useState(""),[F,ge]=i.useState("all"),[y,je]=i.useState(N?N.toString():"all"),[ye,L]=i.useState(!1),[Se,$]=i.useState(!1),[Ne,T]=i.useState(!1),[I,K]=i.useState(!1),[q,G]=i.useState(null),[ve,_e]=i.useState([]),[Ce,we]=i.useState([]),[J,W]=i.useState([]),[ke,X]=i.useState(!1),[g,w]=i.useState({institute_id:N?String(N):"",file:null,chapterFile:null}),[n,v]=i.useState(re),[be,E]=i.useState({}),[Y,l]=i.useState(null);et(y,t=>je(t===null?"all":t.toString()));const x=async(t=1)=>{V(!0);try{const s=await u.get(`${m}/data`,{params:{page:t,per_page:10,search:_,status:C,institute:y,...a==="main"?{start_date:P||void 0,end_date:D||void 0,exam_state:F}:{}}});de(s.data.data),me({currentPage:s.data.meta.current_page,lastPage:s.data.meta.last_page,total:s.data.meta.total,from:s.data.meta.from||0,to:s.data.meta.to||0})}catch{l({type:"danger",message:`Failed to load ${j.toLowerCase()}`})}finally{V(!1)}};i.useEffect(()=>{const t=setTimeout(()=>x(1),250);return()=>clearTimeout(t)},[_,C,P,D,F,y,a]),i.useEffect(()=>{a==="practice"&&u.get("/super-admin/test-series/institutes").then(t=>_e(t.data||[])).catch(()=>l({type:"danger",message:"Failed to load institutes"}))},[a]);const Z=()=>{v({...re,institute_id:N?String(N):""}),E({})},Te=()=>{v(t=>({...t,sections:[...t.sections,{title:`Section ${t.sections.length+1}`,instructions:"",min_questions_to_answer:"0",max_questions_to_answer:"0",questions:[]}]}))},Pe=t=>{v(s=>({...s,sections:s.sections.filter((r,c)=>c!==t)}))}
1,De=(t,s,r)=>{v(c=>({...c,sections:c.sections.map((d,k)=>k===t?{...d,[s]:r}:d)}))},Fe=(t,s,r,c)=>{v(d=>({...d,sections:d.sections.map((k,We)=>We!==t?k:{...k,questions:k.questions.map(O=>O.question_id===s?{...O,[r]:c}:O)})}))},Le=()=>({institute_id:Number(n.institute_id),title:n.title,description:n.description||null,syllabus:n.syllabus||null,general_instructions:n.instructions||null,auto_generation_rules:{...n.auto_generation_rules||{},duration_type:n.duration_type},duration_minutes:Number(n.duration_minutes||0),total_marks:Number(n.total_marks||0),passing_marks:n.passing_marks?Number(n.passing_marks):null,attempts_allowed:n.attempts_allowed?Number(n.attempts_allowed):null,shuffle_questions:n.shuffle_questions,shuffle_options:n.shuffle_options,status:n.status,start_at:a==="main"&&n.start_at||null,end_at:a==="main"&&n.duration_type==="end_time"&&n.end_at||null,hide_solutions_until_end:n.hide_solutions_until_end,allow_retake:n.allow_retake,sections:n.sections.map((t,s)=>({title:t.title,instructions:t.instructions||null,sort_order:s+1,min_questions_to_answer:t.min_questions_to_answer?Number(t.min_questions_to_answer):null,max_questions_to_answer:t.max_questions_to_answer?Number(t.max_questions_to_answer):null,questions:t.questions.map((r,c)=>({question_id:r.question_id,positive_marks:Number(r.positive_marks||0),negative_marks:Number(r.negative_marks||0),sort_order:c+1,is_mandatory:r.is_mandatory}))}))}),$e=async()=>{H(!0),E({});try{const t=await u.post(m,Le());l({type:"success",message:t.data.message||`${j} created successfully`}),L(!1),x(1),Z()}catch(t){if(t.response?.status===422&&t.response?.data?.errors){const s=t.response.data.errors;E(s);const r=Object.entries(s).flatMap(([,d])=>d).slice(0,3),c=r.length>0?r.join(" ⢠"):"Please fix validation errors";l({type:"danger",message:c})}else l({type:"danger",message:t.response?.data?.message||`Failed to save ${j.toLowerCase()}`})}finally{H(!1)}},Ie=t=>{if(a==="main"){S.visit(`/super-admin/main-tests/${t.id}/edit-page`);return}S.visit(`/super-admin/practice-tests/${t.id}/edit-page`)},qe=t=>{S.visit(`${m}/${t.id}/preview`)},Ee=t=>{S.visit(`${m}/${t.id}/bulk-upload-questions`)},Oe=t=>{S.visit(`${m}/${t.id}/bulk-upload-pdf`)},Ae=t=>{t.test_paper_pdf_url&&window.open(t.test_paper_pdf_url,"_blank","noopener,noreferrer")},Qe=t=>{S.visit(`${m}/${t.id}/bulk-upload-keys`)},Me=async t=>{if(a==="practice"){G(t);try{const[s,r]=await Promise.all([u.get("/super-admin/test-series/chapters",{params:{institute_id:t.institute?.id||void 0}}),u.get(`/super-admin/practice-tests/${t.id}
1/chapters`)]);we(s.data||[]),W(r.data?.chapter_ids||[]),$(!0)}catch{l({type:"danger",message:"Failed to load chapter links"})}}},Ue=async()=>{if(q){X(!0);try{const t=await u.patch(`/super-admin/practice-tests/${q.id}/chapters`,{chapter_ids:J});l({type:"success",message:t.data.message||"Practice test chapters updated successfully"}),$(!1),G(null)}catch(t){const s=t.response?.data?.errors?.chapter_ids?.[0]||t.response?.data?.message||"Failed to update chapter links";l({type:"danger",message:s})}finally{X(!1)}}},Re=async t=>{try{const s=await u.patch(`${m}/${t.id}/toggle-status`);l({type:"success",message:s.data.message||"Status updated successfully"}),x(o.currentPage)}catch{l({type:"danger",message:"Failed to update status"})}},Be=async t=>{try{const s=await u.post(`${m}/${t.id}/duplicate`);l({type:"success",message:s.data.message||"Test duplicated successfully"}),x(1)}catch{l({type:"danger",message:"Failed to duplicate test"})}},Ve=async t=>{const s=a==="main"?"Practice":"Main",r=a==="main"?"/super-admin/practice-tests":"/super-admin/main-tests",c=a==="main"?"clone-as-practice":"clone-as-main";if(window.confirm(`Clone "${t.title}" as a ${s} Test? The new test will be created as a draft.`))try{const d=await u.post(`${m}/${t.id}/${c}`);l({type:"success",message:d.data.message||`Test cloned as a ${s} Test.`}),S.visit(r)}catch(d){l({type:"danger",message:d.response?.data?.message||`Failed to clone as a ${s} Test.`})}},ze=async t=>{if(window.confirm("Delete this test series?"))try{const s=await u.delete(`${m}/${t.id}`);l({type:"success",message:s.data.message||"Test deleted successfully"}),x(1)}catch{l({type:"danger",message:"Failed to delete test"})}},He=()=>{const t=new URLSearchParams;_&&t.append("search",_),C!=="all"&&t.append("status",C),y!=="all"&&t.append("institute_id",y),window.location.href=`${m}/export?${t.toString()}`},Ke=async()=>{if(!g.institute_id){l({type:"danger",message:"Please select an institute"});return}if(!g.file&&!g.chapterFile){l({type:"danger",message:"Please choose a practice test SQL file or a chapter link SQL file"});return}K(!0);try{const t=new FormData;t.append("institute_id",g.institute_id),g.file&&t.append("sql_file",g.file),g.chapterFile&&t.append("chapter_sql_file",g.chapterFile);const s=await u.post("/super-admin/practice-tests/import-sql",t,{headers:{"Content-Type":"multipart/form-data"}});l({type:"success",message:s.data?.message||"Practice tests imported successfully"}),T(!1),w(r=>({...r,file:null,chapterFile:null})),x(1)}catch(t){l({type:"danger",message:t?.response?.data?.message||"Failed to import practice tests from SQL"})}finally{K(!1)}},Ge=t=>t==="active"?e.jsx("span",{className:"inline-flex rounded-full bg-green-50 px-2 py-1 text-xs font-medium text-green-700",children:"active"}):t==="draft"?e.jsx("span",{className:"inline-flex rounded-full bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-700",children:"draft"}):e.jsx("span",{className:"inline-flex rounded-full bg-gray-100 px-2 py-1 text-xs font-medium text-gray-700",children:"inactive"}),ee=t=>{if(!t)return"-";const s=new Date(t);return Number.isNaN(s.getTime())?"-":s.toLocaleString()},Je=t=>{if(!t.start_at)return"Not Scheduled";const s=new Date,r=new Date(t.start_at);if(Number.isNaN(r.getTime()))return"Not Scheduled";const c=t.end_at?new Date(t.end_at):null;return s<r?s.toDateString()===r.toDateString()?"Scheduled Today":"Scheduled":c&&!Number.isNaN(c.getTime())&&s>c?"Finished":"Ongoing"};return e.jsxs(Ze,{breadcrumbs:ce,children:[e.jsx(Ye,{title:j}),e.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-4",children:[Y&&e.jsx(mt,{toast:Y,onClose:()=>l(null)}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold",children:j}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create sectional tests and attach question-level marking."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(p,{variant:"outline",onClick:He,children:[e.jsx(xt,{className:"mr-2 h-4 w-4"}),"Export"]}),a==="practice"&&e.jsxs(p,{variant:"outline",onClick:()=>{w(t=>({...t,institute_id:y!=="all"?y:t.institute_id,file:null,chapterFile:null})),T(!0)},children:[e.jsx(ft,{className:"mr-2 h-4 w-4"}),"Upload SQL"]}),e.jsxs(te,{open:ye,onOpenChange:t=>{L(t),t&&Z()},children:[e.jsx(tt,{asChild:!0,children:e.jsxs(p,{children:[e.jsx(gt,{className:"mr-2 h-4 w-4"}),"Create ",a==="main"?"Main":"Practice"," Test"]})}),e.jsxs(se,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[1080px]",children:[e.jsxs(ae,{children:[e.jsxs(ie,{children:["Create ",j]}),e.jsx(ne,{children:"Configure metadata, sections, and per-question marks."})]}),e.jsx(ht,{formData:n,setFormData:v,addSection:Te,removeSection:Pe,updateSectionField:De,updateQuestionMapping:Fe,errors:be,mode:a,isEdit:!1}),e.jsxs(st,{children:[e.jsx(p,{variant:"outline",type:"button",onClick:()=>L(!1),children:"Cancel"}),e.jsx(p,{type:"button",disabled:z,onClick:()=>
1$e(),children:z?"Saving...":"Create"})]})]})]}),a==="practice"&&e.jsx(te,{open:Ne,onOpenChange:T,children:e.jsxs(se,{className:"sm:max-w-[560px]",children:[e.jsxs(ae,{children:[e.jsx(ie,{children:"Upload Practice Tests SQL"}),e.jsx(ne,{children:"Import old practice tests and link them to chapters from old SQL exports."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(A,{children:"Institute *"}),e.jsxs(Q,{value:g.institute_id,onValueChange:t=>w(s=>({...s,institute_id:t})),children:[e.jsx(M,{children:e.jsx(U,{placeholder:"Select institute"})}),e.jsx(R,{children:ve.map(t=>e.jsx(h,{value:String(t.id),children:t.name},t.id))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(A,{children:"Practice tests SQL file"}),e.jsx(b,{type:"file",accept:".sql,.txt",onChange:t=>w(s=>({...s,file:t.target.files?.[0]||null}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The importer reads `INSERT INTO practice_tests` rows. Each question triplet is mapped as question ID, positive mark, and negative mark."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(A,{children:"Chapter links SQL file"}),e.jsx(b,{type:"file",accept:".sql,.txt",onChange:t=>w(s=>({...s,chapterFile:t.target.files?.[0]||null}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The importer reads `INSERT INTO chapter_tests` rows and links old `testid` values to old `chapterid` values."})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(p,{type:"button",variant:"outline",onClick:()=>T(!1),disabled:I,children:"Cancel"}),e.jsx(p,{type:"button",onClick:Ke,disabled:I,children:I?"Importing...":"Import Practice Tests"})]})]})]})})]})]}),e.jsxs(lt,{children:[e.jsxs(ot,{children:[e.jsxs(ct,{children:[j," List"]}),e.jsx(dt,{children:"Search and manage test configurations."})]}),e.jsxs(pt,{children:[e.jsxs("div",{className:"mb-4 grid gap-4 md:grid-cols-6",children:[e.jsxs("div",{className:"relative md:col-span-2",children:[e.jsx(jt,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(b,{className:"pl-10",value:_,onChange:t=>ue(t.target.value),placeholder:"Search by title..."})]}),e.jsxs(Q,{value:C,onValueChange:he,children:[e.jsx(M,{children:e.jsx(U,{placeholder:"Status"})}),e.jsxs(R,{children:[e.jsx(h,{value:"all",children:"All Status"}),e.jsx(h,{value:"draft",children:"Draft"}),e.jsx(h,{value:"active",children:"Active"}),e.jsx(h,{value:"inactive",children:"Inactive"})]})]}),a==="main"&&e.jsxs(e.Fragment,{children:[e.jsx(b,{type:"date",value:P,onChange:t=>xe(t.target.value),placeholder:"Start Date"}),e.jsx(b,{type:"date",value:D,onChange:t=>fe(t.target.value),placeholder:"End Date"}),e.jsxs(Q,{value:F,onValueChange:ge,children:[e.jsx(M,{children:e.jsx(U,{placeholder:"Exam State"})}),e.jsxs(R,{children:[e.jsx(h,{value:"all",children:"All States"}),e.jsx(h,{value:"ongoing",children:"Ongoing"}),e.jsx(h,{value:"finished",children:"Finished"}),e.jsx(h,{value:"scheduled_today",children:"Scheduled Today"}),e.jsx(h,{value:"scheduled",children:"Scheduled"}),e.jsx(h,{value:"not_scheduled",children:"Not Scheduled"})]})]})]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"border-b bg-muted/50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"ID"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Title"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Institute"}),a==="main"&&e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Start"}),a==="main"&&e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"End"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Total Attended"}),a==="main"&&e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Exam State"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Duration"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Status"}),e.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y",children:pe?e.jsx("tr",{children:e.jsx("td",{colSpan:a==="main"?10:
17,className:"px-4 py-8 text-center text-muted-foreground",children:"Loading..."})}):B.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:a==="main"?10:7,className:"px-4 py-8 text-center text-muted-foreground",children:"No records found"})}):B.map(t=>e.jsxs("tr",{className:"hover:bg-muted/50",children:[e.jsx("td",{className:"px-4 py-3",children:t.id}),e.jsx("td",{className:"px-4 py-3 font-medium",children:t.title}),e.jsx("td",{className:"px-4 py-3",children:t.institute?.name||"-"}),a==="main"&&e.jsx("td",{className:"px-4 py-3",children:ee(t.start_at)}),a==="main"&&e.jsx("td",{className:"px-4 py-3",children:ee(t.end_at)}),e.jsx("td",{className:"px-4 py-3",children:t.total_attended??0}),a==="main"&&e.jsx("td",{className:"px-4 py-3",children:Je(t)}),e.jsxs("td",{className:"px-4 py-3",children:[t.duration_minutes," min"]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("button",{type:"button",onClick:()=>Re(t),className:"cursor-pointer",children:Ge(t.status)})}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsxs(at,{children:[e.jsx(it,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"sm",children:e.jsx(yt,{className:"h-4 w-4"})})}),e.jsxs(nt,{align:"end",children:[e.jsxs(f,{onClick:()=>qe(t),children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Preview"]}),e.jsxs(f,{onClick:()=>Ie(t),children:[e.jsx(le,{className:"mr-2 h-4 w-4"}),"Edit"]}),a==="practice"&&e.jsxs(f,{onClick:()=>Me(t),children:[e.jsx(Nt,{className:"mr-2 h-4 w-4"}),"Link Chapters"]}),e.jsxs(f,{onClick:()=>Ee(t),children:[e.jsx(le,{className:"mr-2 h-4 w-4"}),"Bulk Upload Questions"]}),e.jsxs(f,{onClick:()=>Oe(t),children:[e.jsx(vt,{className:"mr-2 h-4 w-4"}),"Upload Questions from PDF"]}),e.jsxs(f,{onClick:()=>Ae(t),disabled:!t.test_paper_pdf_url,children:[e.jsx(_t,{className:"mr-2 h-4 w-4"}),"View Test Paper PDF"]}),e.jsxs(f,{onClick:()=>Qe(t),children:[e.jsx(oe,{className:"mr-2 h-4 w-4"}),"Bulk Upload Keys"]}),e.jsxs(f,{onClick:()=>Be(t),children:[e.jsx(oe,{className:"mr-2 h-4 w-4"}),"Duplicate"]}),e.jsxs(f,{onClick:()=>Ve(t),children:[e.jsx(Ct,{className:"mr-2 h-4 w-4"}),"Clone as ",a==="main"?"Practice":"Main"," Test"]}),e.jsxs(f,{className:"text-red-600 focus:text-red-600",onClick:()=>ze(t),children:[e.jsx(wt,{className:"mr-2 h-4 w-4"}),"Delete"]})]})]})})]},t.id))})]})}),o.lastPage>1&&e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",o.from," to ",o.to," of ",o.total," results"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{variant:"outline",size:"sm",onClick:()=>x(1),disabled:o.currentPage===1,title:"First Page",children:e.jsx(kt,{className:"h-4 w-4"})}),e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>x(o.currentPage-1),disabled:o.currentPage===1,children:[e.jsx(Tt,{className:"h-4 w-4"}),"Previous"]}),e.jsxs("span",{className:"text-sm",children:["Page ",o.currentPage," of ",o.lastPage]}),e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>x(o.currentPage+1),disabled:o.currentPage===o.lastPage,children:["Next",e.jsx(rt,{className:"h-4 w-4"})]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>x(o.lastPage),disabled:o.currentPage===o.lastPage,title:"Last Page",children:e.jsx(bt,{className:"h-4 w-4"})})]})]})]})]}),e.jsx(ut,{open:Se,onOpenChange:$,title:`Link Chapters: ${q?.title||"Practice Test"}`,description:"Select chapters to link with this practice test.",chapters:Ce,selectedIds:J,onSelectedIdsChange:W,onSave:Ue,saving:ke})]})]})}export{Vs 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.