1import{B as u}from"./vendor-antd-DLTvu8QC.js";import{a as p,j as o}from"./vendor-react-CIe7BBPp.js";import{I as j,a as v,A as a}from"./index-DuLZZD6P.js";import{c as d,L as w}from"./vendor-router-D97L2d81.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-helpers-D6AZgMqr.js";import"./vendor-react-dom-t5F7FhZR.js";import"./vendor-resize-observer-polyfill-pFR5zza0.js";import"./vendor-stylis-BmaM3nay.js";import"./vendor-scroll-into-view-if-needed-D5b_oRbX.js";import"./vendor-compute-scroll-into-view-Bl8rNFhg.js";import"./vendor-throttle-debounce-CUWDS_la.js";import"./vendor-json2mq-CN42t7xi.js";import"./vendor-string-convert-Bhuo--sE.js";import"./vendor-copy-to-clipboard-DxQUb0mb.js";import"./vendor-toggle-selection-DGa8lynz.js";import"./vendor-prop-types-DNxwfY3H.js";import"./vendor-js-cookie-Cz0CWeBA.js";import"./vendor-redux-LH1zpDpA.js";import"./vendor-use-sync-external-store-f1cvjnMh.js";import"./vendor-immer-Bp5DpiZ6.js";import"./vendor-redux-thunk-ClJT1hhx.js";import"./vendor-react-helmet-async-CO3viEpT.js";import"./vendor-react-fast-compare-Dxl0Zvcn.js";import"./vendor-invariant-CCbxWKZF.js";import"./vendor-shallowequal-Ck_j7EqP.js";import"./vendor-axios-D2K41pGA.js";import"./vendor-remix-run-router-D1FRce34.js";const $=s=>(s==null?void 0:s.name)==="AbortError"||(s==null?void 0:s.name)==="CanceledError"||(s==null?void 0:s.code)==="ERR_CANCELED",Z=()=>{const[s,x]=p.useState(null),r=sessionStorage.getItem("id"),[c,b]=p.useState(1),g=d();p.useEffect(()=>{const e=new AbortController;return(async()=>{var t,l;try{const i=await v.post(a.CUSTOM_QBANK.CUSTOM_QBANK_HISTORY,{user_id:r,page_size:20,page_number:c},{signal:e.signal});if(e.signal.aborted)return;x((l=(t=i==null?void 0:i.data)==null?void 0:t.data)==null?void 0:l.record)}catch(i){$(i)||globalThis.__APP_LOGGER__.log(i)}})(),()=>e.abort()},[c]);const f=(e,n)=>{try{const t=screen.availWidth,l=screen.availHeight,h=`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=${t}, height=${l}, top=0, left=0`;e==1?window.open(`/exam-mode/${r}t${n}`,"_blank",h):window.open(`/reg-mode/${r}t${n}`,"_blank",h)}catch(t){globalThis.__APP_LOGGER__.log(t)}},_=(e,n)=>{try{const t=screen.availWidth,l=screen.availHeight,h=`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=${t}, height=${l}, top=0, left=0`;e==1?window.open(`/paused-exam-mode/${r}t${n}`,"_blank",h):window.open(`/paused-reg-mode/${r}t${n}`,"_blank",h)}catch(t){globalThis.__APP_LOGGER__.log(t)}},N=e=>{g(`/testresultcustom/${e}`)};return o.jsx("div",{className:"attemptHistory",children:o.jsxs("div",{className:"container",children:[o.jsx("div",{className:"row",children:s&&s.length>0?s.map(e=>{const n=(e==null?void 0:e.status)===null||(e==null?void 0:e.status)===0,t=(e==null?void 0:e.status)===1,l=()=>{n?f(e==null?void 0:e.mode,e==null?void 0:e.id):t?_(e==null?void 0:e.mode,e==null?void 0:e.id):N(e==null?void 0:e.id)};let i="Review",m="#007aff";return n?(i="Start",m="#08D002"):t&&(i="Resume",m="#FF9500"),o.jsx("div",{className:"col-12 col-sm-12 col-md-6 col-lg-6 col-xl-4",children:o.jsxs("div",{className:"historyBox",children:[o.jsx("div",{className:"boximg",children:o.jsx("div",{className:"boxenter",children:o.jsx("img",{src:`${j}/emdpublic/qbank/attempbook.svg`,alt:"attemp book"})})}),o.jsxs("div",{className:"attemptPeriod position-relative",children:[o.jsx("h1",{children:e==null?void 0:e.custom_qbank}),o.jsxs("h2",{children:[o.jsx("span",{className:"examModetext",children:(e==null?void 0:e.mode)==1?"Exam mode":"Regular"}),o.jsx("em",{className:"fa fa-circle"})," ",e==null?void 0:e.no_of_question," Questions"]}),o.jsxs("div",{className:"btnSet",children:[o.jsx(w,{to:`/topic-share/${e==null?void 0:e.id}`,children:o.jsx(u,{children:"Invite"})}),o.jsx(u,{onClick:l,style:{backgroundColor:m,color:"white"},children:i})]})]})]})},e.id)}):o.jsx("div",{className:"col-12 text-center",children:o.jsx("p",{children:"No data available"})})}),s&&s.length>0&&o.jsxs("div",{className:"bottomNextNew",children:[o.jsx("button",{className:"btn",onClick:()=>c>1&&b(c-1),disabled:c===1,children:"Prev"}),o.jsx("button",{className:"btn",onClick:()=>(s==null?void 0:s.length)>=10&&b(c+1),disabled:(s==null?void 0:s.length)<10,children:"Next"})]})]})})};export{Z 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.