1void 0===Promise.withResolvers&&(Promise.withResolvers=function(){let e,t;return{promise:new Promise((s,a)=>{e=s,t=a}),resolve:e,reject:t}}),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13831],{97857:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ai_interview",function(){return s(7185)}])},15860:function(e,t,s){"use strict";var a=s(85893);t.Z=e=>{let{className:t}=e;return(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,a.jsx)("path",{d:"M4 12H20M20 12L14 6M20 12L14 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}},55963:function(e,t,s){"use strict";var a=s(85893);t.Z=e=>{let{className:t}=e;return(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,a.jsx)("circle",{opacity:"0.5",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M8.5 12.5L10.5 14.5L15.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},13310:function(e,t,s){"use strict";var a=s(85893);t.Z=e=>{let{className:t}=e;return(0,a.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,a.jsx)("path",{d:"M7.61416 6.14062L10.6659 9.2229C11.0626 9.58911 11.0626 10.1995 10.6659 10.5657L9.99453 11.2371C9.62832 11.6338 9.01797 11.6338 8.65176 11.2371L5.6 8.1853L2.51772 11.2371C2.15151 11.6338 1.54116 11.6338 1.17495 11.2371L0.503564 10.5657C0.106836 10.1995 0.106836 9.58911 0.503564 9.2229L3.55532 6.14062L0.503564 3.08887C0.106836 2.72266 0.106836 2.1123 0.503564 1.74609L1.17495 1.07471C1.54116 0.677979 2.15151 0.677979 2.51772 1.07471L5.6 4.12646L8.65176 1.07471C9.01797 0.677979 9.62832 0.677979 9.99453 1.07471L10.6659 1.74609C11.0626 2.1123 11.0626 2.72266 10.6659 3.08887L7.61416 6.14062Z",fill:"white"})})}},23477:function(e,t,s){"use strict";var a=s(85893);t.Z=e=>{let{className:t}=e;return(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,a.jsx)("circle",{opacity:"0.5",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M14.5 9.50002L9.5 14.5M9.49998 9.5L14.5 14.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}},13473:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});var a=s(85893),r=s(93790),n=s(67294);function i(e){let{children:t}=e,[s,i]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{i(!0)}),!s)return null;let{className:l}=(0,r.DY)();return(0,a.jsx)("div",{className:"".concat(l),children:t})}},94217:function(e,t,s){"use strict";s.r(t);var a=s(85893),r=s(13310),n=s(89121),i=s(46320),l=s(67294);t.default=e=>{let{isOpen:t,setIsOpen:s}=e,[o,c]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{c(!0)},[]),o)?(0,a.jsx)(n.u,{appear:!0,show:t,as:l.Fragment,children:(0,a.jsxs)(i.V,{as:"div",open:t,onClose:()=>s(!1),children:[(0,a.jsx)(n.u.Child,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black/60"})}),(0,a.jsx)("div",{className:"fixed inset-0 z-[999] px-4",children:(0,a.jsx)("div",{className:"flex min-h-screen items-start justify-center px-4",children:(0,a.jsxs)(i.V.Panel,{className:"panel my-8 w-full max-w-lg overflow-hidden rounded-lg border-0 p-0 text-black dark:text-white-dark",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between bg-[#fbfbfb] px-5 py-3 dark:bg-[#121c2c]",children:[(0,a.jsx)("h5",{className:"text-lg font-bold",children:"Alert"}),(0,a.jsx)("button",{type:"button",onClick:()=>s(!1),className:"text-white-dark hover:text-dark",children:(0,a.jsx)(r.Z,{})})]}),(0,a.jsxs)("div",{className:"p-5",children:[(0,a.jsx)("p",{children:"Face is not visible, Please move your face in front of the camera."}),(0,a.jsx)("div",{className:"mt-8 flex items-center justify-end",children:(0,a.jsx)("button",{type:"button",onClick:()=>s(!1),className:"btn btn-primary ltr:ml-4 rtl:mr-4",children:"Retry"})})]})]})})})]})}):null}},7185:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var a,r,n,i,l=s(85893);s(40645);var o=s(30178);s(89195);var c=s(15860);s(55963),s(26609),s(23477);var d=s(13473),u=s(88057),m=s(94217),h=s(93790),x=s(23287),p=s(96521),f=s.n(p),g=s(49837),w=s.n(g),v=s(70372),y=s(14213),b=s(1779),j=s(87066),N=s(47041),k=s(90341),S=s(80893),_=s(11163),C=s(67294),E=s(42968);(a=n||(n={}))[a.WELCOME=0]="WELCOME",a[a.QUESTIONSTYPE=1]="QUESTIONSTYPE",a[a.INSTRUCTIONS=2]="INSTRUCTIONS",a[a.QUESTIONS=3]="QUESTIONS",(r=i||(i={}))[r.HR=0]="HR",r[r.TECHNICAL=1]="TECHNICAL",r[r.HIRING=2]="HIRING";let I=()=>{var e;let t=(0,_.useRouter)(),s=t.query.selectedPage?parseInt(null===(e=t.query)||void 0===e?void 0:e.selectedPage):-1,a=(e,s)=>{s?t.replace({pathname:t.pathname,query:{...t.query,selectedPage:e}},void 0,{shallow:!0}):t.push({pathname:t.pathname,query:{...t.query,selectedPage:e}})};(0,C.useEffect)(()=>{t&&t.isReady&&(void 0===s||-1===s)&&a(1,!0)},[t,t.isReady,s]);let[r,n]=(0,C.useState)(0);(0,C.useEffect)(()=>
1{if(!(null==t?void 0:t.isReady))return;let e="";switch(r){case 0:e="HR";break;case 1:e="TECHNICAL";break;case 2:e="HIRING"}t.replace({pathname:t.pathname,query:{...t.query,questionType:e||void 0}},void 0,{shallow:!0})},[t.isReady,r]);let[i,c]=(0,C.useState)(""),[d,m]=(0,C.useState)(null),[h,p]=(0,C.useState)(""),f=(0,C.useRef)(null),[g,w]=(0,C.useState)([]),v=(0,_.useRouter)(),[y,k]=(0,C.useState)([]),[S,E]=(0,C.useState)([]),[I,T]=(0,C.useState)(!0);(0,x.CG)(e=>e.userData);let A=async e=>{e.target.files&&e.target.files.length>0&&m(e.target.files[0]);let[t,s]=await (0,b.oc)(e);if(s){var a;let e=null!==(a=null==s?void 0:s.message)&&void 0!==a?a:"Resume upload failed";(0,o.CF)("error",e);return}p(t)},R=async()=>{try{T(!0);let e=await j.default.get("".concat(u._n,"/ai/hr_sets"),{headers:{}}),t=await j.default.get("".concat(u._n,"/ai/tech_sets"),{headers:{}});k(e.data||[]),E(t.data||[])}catch(e){console.log("Error fetching data:",e)}finally{T(!1)}};(0,C.useEffect)(()=>{R()},[]);let P=S.map(e=>e.name);if((0,N.getCookie)("token"),I)return(0,l.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,l.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-b-2 border-blue-600"}),(0,l.jsx)("p",{className:"text-gray-600",children:"Loading interview questions..."})]})});if(0===s)v.back();else if(1===s)return(0,l.jsx)(B,{handleFileChange:A,setSelectedQuestionType:n,selectedCategory:i,onChooseFile:()=>{var e;null===(e=f.current)||void 0===e||e.click()},setSelectedCategory:c,technicalCategories:P,selectedQuestionType:r,fileInputRef1:f,selectedFile1:d,setSelectedPage:a,hrQuestions:y,techQuestions:S});else if(3===s)return(0,l.jsx)(L,{setSelectedPage:a,questions:g});else return(0,l.jsx)(q,{resumeText:h,selectedFile:d,setQuestions:w,setSelectedPage:a,selectedCategory:i,selectedQuestionType:r})};I.getLayout=e=>(0,l.jsx)(d.Z,{children:e});var T=I;let q=e=>{let{selectedFile:t,selectedCategory:s,selectedQuestionType:a,resumeText:r,setSelectedPage:n,setQuestions:i}=e,d=(0,_.useRouter)(),m=d.query.cta_id,h=d.query.cta_attachment_id,[x,p]=(0,C.useState)(null),[g,w]=(0,C.useState)(!0),[v,y]=(0,C.useState)(!1),[b,N]=(0,C.useState)(!1),[k,S]=(0,C.useState)(null),[E,I]=(0,C.useState)(["",!1]);async function T(e){try{let t="".concat(u._n,"/aiinterview?ai_interview_id=").concat(e),s=await j.default.get(t,{headers:{}});if(200==s.status){let e=s.data[0].Questions;if(e){let t=e.map(e=>e.question);i(t)}else(0,o.CF)("error","No questions found")}}catch(a){var t,s;let e=(null==a?void 0:null===(s=a.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||"An unexpected error occurred. Please try again.";(0,o.CF)("error",e)}finally{w(!1)}}async function q(e,t){try{if(2===t){let e=await j.default.post("".concat(u._n,"/ai/hiring"),{resume:r},{headers:{}});if(200===e.status){let t=e.data.data;i(t)}else{let t=e.data.message||"Could not fetch questions";(0,o.CF)("error",t+" You will be redirected to welcome page"),setTimeout(()=>{window.location.reload()},500)}}}catch(t){let e=t.message||"Could not fetch questions";(0,o.CF)("error",e+" You will be redirected to welcome page"),setTimeout(()=>{window.location.reload()},500)}finally{w(!1)}}return(0,C.useEffect)(()=>{if(d&&d.isReady){if(h)T(h);else{let e=localStorage.getItem("selectedMockInterview");e&&p(JSON.parse(e))}}},[d,d.isReady,m]),(0,C.useEffect)(()=>{x&&(2===a?q(s,a):(null==x?void 0:x.questions)&&(i(x.questions),w(!1)))},[x,s,a,r]),g?(0,l.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-brand"}),(0,l.jsx)("p",{className:"text-brand",children:2===a?"Generating personalized questions from your resume...":"Preparing your interview questions..."})]})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"relative flex w-full justify-center",children:[(0,l.jsx)("div",{className:"absolute top-2 flex w-full flex-row justify-evenly text-lg font-extrabold leading-relaxed tracking-wide text-brand",children:"AI INTERVIEWER"}),(0,l.jsx)("div",{className:"absolute left-2 top-1 lg:top-2",children:(0,l.jsxs)("button",{onClick:()=>{d.back()},className:" flex w-fit cursor-pointer items-center justify-start gap-2 rounded-full bg-gray-100 px-4 py-2.5 text-sm transition-all ",children:[(0,l.jsx)(c.Z,{className:"rotate-180 "})," Back"]})}),(0,l.jsxs)("div",{className:"mx-4 mt-16 max-w-5xl text-left text-[#404040]",children:[(0,l.jsx)("h1",{className:"mb-2 flex text-start text-3xl font-bold",children:"Instructions"}),(0,l.jsxs)("ul",{className:"".concat(f().listDecimal," list-decimal space-y-1 pl-4.5"),children:[(0,l.jsxs)("li",{children:["Allow access to ",(0,l.jsx)("span",{className:"font-bold",children:"video and microphone"})," in the permission popups."]}),(0,l.jsxs)("li",{children:["Be ",(0,l.jsx)("span",{className:"font-bold",children:"well groomed"})," from head to toe, as you would for a face-to-face interview."]}),(0,l.jsxs)("li",{children:["Ensure you have an ",(0,l.jsx)("span",{className:"font-bold",children:"active internet connection"})," during the interview."]}),(0,l.jsxs)("li",{children:["Give the interview in a ",(0,l.jsx)("span",{className:"font-bold",children:"noise-free environment"}),"."]}),(0,l.jsxs)("li",{children:["Some questions may require answers in ",(0,l.jsx)("span",{className:"font-bold",children:"video format"}),". Confirm your webcam and microphone are working properly."]}),(0,l.jsxs)("li",{children:["You will have only ",(0,l.jsx)("span",{className:"font-bold",children:"2 minutes before each question"})," to understand and prepare your response."]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-bold",children:"Do not close or refresh"})," your browser while the test is in progress."]})]}),(0,l.jsx)("div",{className:"relative ",children:(0,l.jsx)(R,{loading:g,setSelectedPage:n,isUsedForInstruction:!0,onVideoReady:()=>{N(!0)},onCameraStatusChange:e=>{y(e)}})})]})]})})},A=e=>{let{className:t}=e,s=(0,C.useRef)(null);return(0,C.useEffect)(()=>{let e,t,a;let r=s.current;if(!r)return;let n=r.getContext("2d");if(n)return(async()=>{try{e=new(window.AudioContext||window.webkitAudioContext);let s=await navigator.mediaDevices.getUserMedia({audio:!0}),i=e.createMediaStreamSource(s);t=e.createAnalyser(),i.connect(t),t.fftSize=2048;let l=t.frequencyBinCount,o=new Uint8Array(l),c=()=>
1{if(!t||!n)return;a=requestAnimationFrame(c),t.getByteTimeDomainData(o),n.clearRect(0,0,r.width,r.height),n.lineWidth=2;let e=n.createLinearGradient(0,0,r.width,0);e.addColorStop(0,"#1f243c"),e.addColorStop(1,"#1f243c"),n.strokeStyle=e,n.beginPath();let s=1*r.width/l,i=0;for(let e=0;e<l;e++){let t=o[e]/128*r.height/2;0===e?n.moveTo(i,t):n.lineTo(i,t),i+=s}n.lineTo(r.width,r.height/2),n.stroke()};c()}catch(e){console.error("Error accessing microphone:",e)}})(),()=>{a&&cancelAnimationFrame(a),e&&e.close()}},[]),(0,l.jsx)("canvas",{ref:s,className:t,width:200,height:20})},L=e=>{let{setSelectedPage:t,questions:s}=e,{name:a}=(0,h.DY)(),[r,n]=(0,C.useState)(120),[i,o]=(0,C.useState)(60),[c,d]=(0,C.useState)(!0),[m,p]=(0,C.useState)(0),[f,g]=(0,C.useState)(!1),{startRecording:b,stopRecording:N,recordingBlob:k}=(0,E.I)(),[S,I]=(0,C.useState)(!1),[T,q]=(0,C.useState)(null),[L,B]=(0,C.useState)(!1),P=(0,C.useRef)(0),O=(0,C.useRef)(null),[F,M]=(0,C.useState)([]),[D,V]=(0,C.useState)(!1),[J,G]=(0,C.useState)([]),[U,W]=(0,C.useState)(!1),[H,Z]=(0,C.useState)(!0);(0,C.useEffect)(()=>{s&&0!==s.length||Y.back()},[s]);let Q=()=>{try{let e=localStorage.getItem("local_reviews"),t=localStorage.getItem("final_answers"),s=localStorage.getItem("questions"),a=e?JSON.parse(e):[],r=t?JSON.parse(t):[],n=s?JSON.parse(s):[];(n.length!==r.length||n.length!==a.length)&&console.error("Array length mismatch:",{questions:n.length,answers:r.length,reviews:a.length});let i=n.map((e,t)=>{var s,n;return{ques:e,ans:r[t]||"",rating:(null===(s=a[t])||void 0===s?void 0:s.rating)||"",review:(null===(n=a[t])||void 0===n?void 0:n.feedback)||""}});M(i);let l=localStorage.getItem("profile_review");if(l){let e=JSON.parse(l);es(e)}}catch(e){console.error("Error parsing data from localStorage:",e)}},Y=(0,_.useRouter)(),{cta_id:z,topic_id:K,cta_attachment_id:X,questionType:$,interviewType:ee}=Y.query,[et,es]=(0,C.useState)(),ea=(0,x.CG)(e=>e.userData),er=async(e,t,s)=>{try{if((await j.default.post("".concat(u._n,"/company/my_test"),{ctaa_user_id:ea.user_id,ctaa_topic_id:K,ctaa_topic_attachment_id:z,ctaa_attachment_attempt_id:e.toString(),ctaa_round_type:"INTERVIEW",ctaa_percentage:t,ctaa_accuracy:s,ctaa_campus_id:ea.school_id},{headers:{}})).status<=299)return!0;return!1}catch(e){return console.error("Error creating attachment attempt:",e),!1}};async function en(){try{var e;let t=localStorage.getItem("questions"),s=localStorage.getItem("final_answers"),a=localStorage.getItem("profile_review"),r=localStorage.getItem("profile_image"),n=null==r?void 0:r.split(",")[1],i=JSON.parse(null!==(e=localStorage.getItem("userFormData"))&&void 0!==e?e:"{}"),l=(e=>{if(!e||!Array.isArray(e)||0===e.length)return null;let t=e.map(e=>e.rating),s=t.reduce((e,t)=>e+t,0)/t.length;return Math.round(s/10*1e4)/100})(ei),o={user_id:ea.user_id,name:i.name,college:i.lastInstitute,mobile:i.mobile,pass_year:i.passYear,email:ea.email,questions:JSON.stringify(t),results:JSON.stringify(s),questions_review:JSON.stringify(J),presentaion_review:JSON.stringify(a),overall_review:JSON.stringify(ei),profile:n,percentage:l};if(!X){let e=new Date(Date.now()),t=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=parseInt("".concat(t).concat(s));o.ai_interview_type=null!=ee?ee:"",o.ai_interview_date_key=a,o.ai_interview_module_type=null!=$?$:""}X&&(o.ai_interview_id=X);let c=await j.default.post("".concat(u._n,"/ai/save_interview_result"),o,{headers:{}});if(200===c.status){let e=c.data.data,t=(e=>{try{let t=JSON.parse(JSON.parse(e.questions)),s=JSON.parse(e.questions_review);if(!t.length||!s.length)return 0;return s.filter(e=>e.rating>0).length/t.length*100}catch(e){return console.error("Error calculating interview accuracy:",e),0}})(e);X&&await er(e.id,e.percentage,t),window.location.href="/ai_interview/result?id=".concat(e.id,"&cta_id=").concat(z,"&round_type=INTERVIEW")}}catch(e){console.error("Error while saving result",e)}}(0,C.useEffect)(()=>{(async()=>{if(F&&F.length>0)try{let e=F.map(e=>e.ques),t=F.map(e=>e.ans),s=["Energy","Stress","Engagement","Creativity","Communication","Confidence","Overall feedback summary"].map(s=>eo(e.toString(),t.toString(),s));await Promise.all(s).then(()=>{V(!0)})}catch(e){console.error("Error during askCurie calls:",e)}})()},[F]);let[ei,el]=(0,C.useState)([]);async function eo(e,t,s){try{let a=await j.default.post("".concat(u._n,"/ai/askpadmaa"),{question:e,answer:t,element:s},{headers:{}});if(200===a.status){let e=a.data.choices[0].message.content;el(t=>[...t,JSON.parse(e)])}}catch(e){}}(0,C.useEffect)(()=>{D&&ei&&(en(),V(!1))},[D,ei]),(0,C.useEffect)(()=>{localStorage.removeItem("final_answers"),localStorage.removeItem("questions"),localStorage.removeItem("topic_results"),localStorage.removeItem("local_reviews"),localStorage.setItem("questions",JSON.stringify(s))},[]),(0,C.useEffect)(()=>{let e,t;return U&&c&&r>0?e=setInterval(()=>{n(e=>e-1)},1e3):U&&c&&0===r&&ed(),()=>{e&&clearInterval(e),clearTimeout(t)}},[r,c,U]),(0,C.useEffect)(()=>{k&&ey(k,s[P.current])},[k,s]),(0,C.useEffect)(()=>{let e;return f&&i>0?e=setInterval(()=>{o(e=>e-1)},1e3):f&&0===i&&eu(),()=>{e&&clearInterval(e)}},[i,f]);let ec=c?r:i,ed=()=>{ex(),eh(),I(!1),d(!1),g(!0),b(),o(60)},eu=()=>{N(),P.current=m,g(!1),d(!0),n(120),o(60),m<s.length-1?p(m+1):B(!0)},em=(0,C.useRef)(null),eh=()=>{em.current&&(em.current.pause(),em.current.currentTime=0)},ex=()=>{O.current&&(O.current.pause(),O.current.currentTime=0)};(0,C.useEffect)(()=>{U&&s[m]&&!S&&ew(s[m])},[m,U]);let ep=async e=>{try{if(S)return;O.current&&(O.current.pause(),O.current=null),eh();let t=new Audio(e);O.current=t,t.preload="auto",I(!0);let s=em.current;if(!s)return;s.currentTime=0,s.playbackRate=.95;let a=!1,r=()=>{!a&&(a=!0,t.removeEventListener("ended",r),t.removeEventListener("error",r),t.removeEventListener("timeupdate",n),I(!1),s&&(s.pause(),s.currentTime=0))},n=()=>{!a&&t.duration-t.currentTime<=.75&&r()};await new Promise((e,a)=>{let n=async()=>{t.removeEventListener("canplaythrough",n),t.removeEventListener("error",i);try{s.currentTime=0,s.pause(),await Promise.all([t.play(),s.play()]),e()}catch(e){console.error("Audio/Video playback error:",e),r(),a(e)}},i=e=>{t.removeEventListener("canplaythrough",n),t.removeEventListener("error",i),console.error("Audio error:",e),r(),a(e)};t.addEventListener("canplaythrough",n),t.addEventListener("error",i),t.readyState>=4&&n()}),t.addEventListener("ended",r),t.addEventListener("error",r),t.addEventListener("timeupdate",n),s.onended=()=>{a||t.paused||t.ended||(s.currentTime=0,s.play().catch(()=>{}))}}catch(e){console.error("Error Playing Video : ",e),em.current&&(em.current.pause(),em.current.currentTime=0,em.current.style.display="none")}},ef=async()=>new Promise(e=>{if(!("speechSynthesis"in window)){e(!1);return}let t=window.speechSynthesis.getVoices(),s=()=>{t.length>0?e(t.some(e=>
1e.name.includes("HiuGaai")||e.name.includes("Google UK English Female")||e.name.toLowerCase().includes("sin-ji")||e.name.toLowerCase().includes("sinji")||e.name.includes("Zira"))||t.length>0):e(!1)};t.length?s():(window.speechSynthesis.onvoiceschanged=()=>{t=window.speechSynthesis.getVoices(),s()},setTimeout(()=>e(!1),2e3))}),eg=async e=>{try{if(S)return;if(!("speechSynthesis"in window)){console.error("Speech synthesis not supported in this browser.");return}eh(),I(!0);let t=em.current;if(!t)return;t.currentTime=0,t.playbackRate=1;let s=!1,a=()=>{!s&&(s=!0,I(!1),t&&(t.onended=null,t.pause(),t.currentTime=0))},r=new SpeechSynthesisUtterance(e),n=await new Promise(async e=>{let t=await window.speechSynthesis.getVoices(),s=()=>{let e=t.find(e=>e.name.includes("HiuGaai"));return e||(e=t.find(e=>e.name.includes("Google UK English Female"))),e||(e=t.find(e=>e.name.includes("Zira"))),e||(e=t.find(e=>e.name.includes("Female"))),e||null};t.length?e(s()):window.speechSynthesis.onvoiceschanged=()=>{t=window.speechSynthesis.getVoices(),e(s())}});n&&(r.voice=n),(null==n?void 0:n.name)=="Google UK English Female"?(r.rate=.8,r.pitch=1):(r.pitch=1.05,r.rate=1),r.onstart=async()=>{try{t.currentTime=0,await t.play()}catch(e){console.error("Video playback error:",e)}},r.onend=a,r.onerror=a,window.speechSynthesis.cancel(),window.speechSynthesis.speak(r),t.onended=()=>{!s&&window.speechSynthesis.speaking&&(t.currentTime=0,t.play().catch(()=>{}))}}catch(e){console.error("Error Playing Video with Speech:",e),em.current&&(em.current.pause(),em.current.currentTime=0,em.current.style.display="none")}};async function ew(e){try{if(await ef())await eg(e);else{console.log("No voices available, using API-based TTS");let t=await j.default.post("".concat(u._n,"/ai/voiceGen"),{msg:e},{headers:{"Content-Type":"application/json"}});if(200===t.status){let e=t.data.path;e!==T&&(q(e),await ep(e))}}}catch(t){console.error("VoiceGen failed, trying API fallback:",t);try{let t=await j.default.post("".concat(u._n,"/ai/voiceGen"),{msg:e},{headers:{"Content-Type":"application/json"}});if(200===t.status){let e=t.data.path;e!==T&&(q(e),await ep(e))}}catch(e){console.error("Both TTS methods failed:",e)}}}let ev=e=>{let t;let s="final_answers";try{t=JSON.parse(localStorage.getItem(s)||"[]"),Array.isArray(t)||(t=[])}catch(e){console.error("Error parsing answers from localStorage:",e),t=[]}t.push(e),localStorage.setItem(s,JSON.stringify(t))};async function ey(e,t){try{let a=new File([e],"recorded_audio.webm",{type:"audio/webm"}),r=new FormData;r.append("file",a,"recording.webm"),r.append("model","whisper-1"),r.append("language","en");let n=await j.default.post("".concat(u._n,"/ai/wisper"),r,{headers:{"Content-Type":"multipart/form-data"}});if(200===n.status){ev(n.data.text);let e=await eb(t,n.data.text),a=e.data.rating,r=e.data.review,i={rating:a,feedback:r};G(e=>[...e,i]),P.current===s.length-1&&(B(!0),Q())}}catch(e){}}async function eb(e,t){try{let s=await j.default.post("".concat(u._n,"/ai/analyzer"),{question:e,answer:t},{headers:{"Content-Type":"application/json"}});if(200===s.status)return s.data}catch(e){}}return L?(0,l.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,l.jsx)("span",{className:"h-8 w-8 animate-spin rounded-full border-[3px] border-transparent border-l-black"})}):(0,l.jsxs)("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-100 px-2 sm:px-4",children:[(0,l.jsx)("div",{className:"absolute top-0 flex w-full flex-row justify-evenly overflow-hidden",children:Array.from({length:8},(e,t)=>(0,l.jsx)("span",{className:"\n ".concat(t%2==0?"text-brand2":"text-brand","\n xs:text-xs mx-0.5 my-1 whitespace-nowrap text-[10px]\n font-extrabold\n sm:text-sm\n md:text-base \n lg:text-lg\n xl:text-xl\n "),children:"AI INTERVIEW"},t))}),(0,l.jsxs)("div",{className:"mt-6 flex w-full flex-col gap-2 px-2 sm:mt-8 sm:flex-row sm:justify-between sm:gap-4 sm:px-4",children:[(0,l.jsx)("span",{className:"select-none rounded-lg bg-brand px-2 py-2 text-sm font-bold shadow-md sm:rounded-r-lg sm:text-base lg:text-lg",children:(0,l.jsxs)("span",{className:"tracking-wide text-brand3 sm:tracking-widest",children:[(0,l.jsx)("span",{className:"".concat("tsuniv"===a&&"hidden"),children:"PADMA | "}),(0,l.jsxs)("span",{className:"text-white",children:["The AI Interviewer by ",v.R[a]]})]})}),(0,l.jsxs)("span",{className:"select-none rounded-lg bg-brand2 px-2 py-2 text-sm font-bold text-brand shadow-md sm:rounded-l-lg sm:text-base lg:text-lg",children:[c?"Waiting Time":"Answering Time"," | ","".concat(Math.floor(ec/60).toString().padStart(2,"0"),":").concat((ec%60).toString().padStart(2,"0"))]})]}),(0,l.jsx)("audio",{ref:O,style:{display:"none"}}),(0,l.jsxs)("div",{className:"mx-2 my-6 flex flex-col items-center justify-center sm:mx-4 sm:my-8 md:mx-8 lg:mx-16 xl:mx-32",children:[(0,l.jsxs)("div",{className:"grid w-full max-w-6xl grid-cols-1 place-content-center place-items-center gap-4 sm:gap-6 lg:grid-cols-2 lg:gap-8 xl:gap-10",children:[H&&(0,l.jsx)("div",{className:"".concat(w().pulseAnother," col-span-1 flex h-48 w-full max-w-sm select-none items-center justify-center rounded-lg border-4 border-gray-300 bg-gray-200 shadow-md transition duration-300 hover:shadow-lg sm:h-56 sm:max-w-md md:h-64 md:max-w-lg lg:h-72 lg:w-[450px] lg:max-w-none xl:h-[360px] xl:w-[500px]"),children:(0,l.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,l.jsx)("span",{className:"h-6 w-6 animate-spin rounded-full border-[3px] border-transparent border-l-brand sm:h-8 sm:w-8"}),(0,l.jsx)("span",{className:"text-sm font-semibold text-brand sm:text-base",children:"Loading Interview..."})]})}),(0,l.jsx)("video",{ref:em,controls:!1,loop:!0,muted:!0,preload:"auto",src:y.d[a],onLoadedData:()=>{W(!0),Z(!1)},onLoadStart:()=>{Z(!0),W(!1)},onError:()=>{Z(!1),W(!1)},className:"".concat(w().pulseAnother," col-span-1 h-48 w-full max-w-sm select-none rounded-lg border-4 border-gray-300 object-cover shadow-md transition duration-300 hover:shadow-lg sm:h-56 sm:max-w-md md:h-64 md:max-w-lg lg:h-72 lg:w-[450px] lg:max-w-none xl:h-[360px] xl:w-[500px] ").concat(U?"":"hidden")}),(0,l.jsxs)("div",{className:"relative w-full max-w-sm sm:max-w-md md:max-w-lg lg:w-[450px] lg:max-w-none xl:w-[500px] ".concat(w().pulseAnother),children:[(0,l.jsx)(R,{setSelectedPage:t,isUsedForInstruction:!1,onCameraStatusChange:()=>{},className:"h-48 w-full rounded-lg border-4 border-gray-300 object-cover shadow-md transition duration-300 hover:shadow-lg sm:h-56 md:h-64 lg:h-72 xl:h-[360px]"}),!S&&c&&U&&(0,l.jsx)("div",{onClick:ed,className:"absolute bottom-3 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full bg-white p-1 shadow-lg transition-transform hover:scale-105 sm:bottom-4 lg:bottom-6",children:(0,l.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-red-500 text-xs font-semibold text-white sm:h-9 sm:w-9 lg:h-10 lg:w-10",children:"Start"})}),f&&i<55&&(0,l.jsx)("div",{onClick:eu,className:"absolute bottom-3 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full bg-white p-1.5
1shadow-lg transition-transform hover:scale-105 sm:bottom-4 sm:p-2 lg:bottom-6",children:(0,l.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-red-500 text-xs font-semibold text-white sm:h-8 sm:w-8",children:"Next"})})]})]}),(0,l.jsx)("div",{children:(0,l.jsx)(A,{className:"my-6"})}),(0,l.jsxs)("div",{className:"text-xl font-bold text-gray-700 underline sm:text-2xl md:text-3xl",children:["Question ",m+1," of ",s.length]}),(0,l.jsx)("div",{className:"mt-4 px-4 text-center text-base font-semibold text-gray-600 sm:text-lg md:text-xl",children:(0,l.jsx)("span",{children:s[m]})})]})]})},R=e=>{let{isUsedForInstruction:t,loading:s,onCameraStatusChange:a,className:r,onVideoReady:n,setSelectedPage:i}=e,[o,c]=(0,C.useState)(null),[d,h]=(0,C.useState)(null),[x,p]=(0,C.useState)(null),[f,g]=(0,C.useState)(!1),[v,y]=(0,C.useState)(null),b=(0,C.useRef)(null),[N,S]=(0,C.useState)(!1),[_,E]=(0,C.useState)(!1),I=(0,C.useRef)(null),[T,q]=(0,C.useState)(null),L=async()=>{try{let e=await navigator.permissions.query({name:"camera"}),t=await navigator.permissions.query({name:"microphone"});return{camera:"granted"===e.state?"granted":"denied"===e.state?"denied":"prompt"===e.state?"blocked":"unknown",microphone:"granted"===t.state?"granted":"denied"===t.state?"denied":"prompt"===t.state?"blocked":"unknown"}}catch(e){return{camera:"unknown",microphone:"unknown"}}},R=(e,t)=>{c("granted"===e||"denied"===e&&"blocked"),h("granted"===t||"denied"===t&&"blocked"),"denied"===e||"denied"===t?p("blocked"):"granted"===e&&"granted"===t?p(!0):p(!1)};(0,C.useEffect)(()=>{let e;return null!==T&&T>0?e=setInterval(()=>{q(e=>null!==e?e-1:null)},1e3):0===T&&(async()=>{try{let e=await L();"granted"!==e.camera||"granted"!==e.microphone?(R(e.camera,e.microphone),a(!1),q(null)):P()}catch(e){a(!1),q(null)}})(),()=>{e&&clearInterval(e)}},[T]),(0,C.useEffect)(()=>(S(!0),async function(){let e=await L();if("denied"===e.camera||"denied"===e.microphone){R(e.camera,e.microphone),S(!1),a(!1);return}try{let e=await navigator.mediaDevices.getUserMedia({video:!0});y(e),p(!0),c(!0),h(!0),S(!1),a(!0)}catch(t){let e=await L();R(e.camera,e.microphone),S(!1),a(!1)}}(),()=>{v&&v.getTracks().forEach(e=>e.stop())}),[]),(0,C.useEffect)(()=>{b.current&&v&&(n&&n(),b.current.srcObject=v)},[v]);let B=async()=>{let e=await L();if("denied"===e.camera||"denied"===e.microphone){R(e.camera,e.microphone);return}v&&(v.getTracks().forEach(e=>e.stop()),y(null)),S(!0);try{let e=await navigator.mediaDevices.getUserMedia({video:!0});y(e),p(!0),c(!0),h(!0),S(!1),a(!0)}catch(t){let e=await L();R(e.camera,e.microphone),S(!1),a(!1)}},P=()=>{if(E(!0),b.current&&I.current){let e=I.current.getContext("2d");if(e){I.current.width=b.current.videoWidth,I.current.height=b.current.videoHeight,e.drawImage(b.current,0,0,I.current.width,I.current.height);let t=I.current.toDataURL("image/jpeg");localStorage.setItem("profile_image",t);let s=t.split(",")[1];t&&O(s).then(e=>{if(e){let t=JSON.stringify(e);localStorage.setItem("profile_review",t),E(!1),g(!1),i(3)}else g(!0),q(null)})}}};async function O(e){try{let t=await j.default.post("".concat(u._n,"/ai/image_analyzer"),{image:e},{headers:{Accept:"application/json","Content-Type":"application/json"}});if(t.data)return t.data;return{}}catch(e){}}let F=()=>{let e=[],t=[];return("blocked"===o&&e.push("Camera"),"blocked"===d&&t.push("Microphone"),!1===o&&t.push("Camera"),!1===d&&t.push("Microphone"),e.length>0)?"".concat(e.join(" and ")," access ").concat(e.length>1?"are":"is"," blocked"):t.length>0?"".concat(t.join(" and ")," permission ").concat(t.length>1?"were":"was"," denied"):"Permission was denied"};return"blocked"===x?(0,l.jsxs)("div",{className:"mt-8 flex flex-col items-center justify-center gap-4 roun
1ded-2xl border border-red-200 bg-red-50 p-6 shadow-md",children:[(0,l.jsx)("p",{className:"text-center text-lg font-medium text-red-800",children:F()}),(0,l.jsxs)("p",{className:"text-normal text-center text-red-600",children:["To enable ","blocked"===o&&"blocked"===d?"camera and microphone":"blocked"===o?"camera":"microphone"," access:"]}),(0,l.jsxs)("div",{className:"text-normal space-y-1 text-left text-red-600",children:[(0,l.jsxs)("p",{children:[(0,l.jsx)("strong",{children:"Chrome:"})," Click the info icon in the address bar â Allow ","blocked"===o?"Camera":""," ","blocked"===o&&"blocked"===d?"and ":"","blocked"===d?"Microphone":""," Access"]}),(0,l.jsxs)("p",{children:[(0,l.jsx)("strong",{children:"Edge:"})," Click the info icon â ","blocked"===o?"Camera":""," ","blocked"===o&&"blocked"===d?"/ ":"","blocked"===d?"Microphone":""," â Allow"]}),(0,l.jsxs)("p",{children:[(0,l.jsx)("strong",{children:"Firefox:"})," Click the shield icon â Turn off blocking for ","blocked"===o?"camera":""," ","blocked"===o&&"blocked"===d?"and ":"","blocked"===d?"microphone":""]}),(0,l.jsxs)("p",{children:[(0,l.jsx)("strong",{children:"Safari:"})," Safari menu â Settings â Websites â ","blocked"===o?"Camera":""," ","blocked"===o&&"blocked"===d?"/ ":"","blocked"===d?"Microphone":""," â Allow"]})]}),(0,l.jsx)("button",{onClick:()=>window.location.reload(),className:"rounded-xl bg-red-600 px-5 py-2 text-white shadow transition hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-400",children:"Refresh Page"})]}):!1===x?(0,l.jsxs)("div",{className:"mt-8 flex flex-col items-center justify-center gap-4 roun
1ded-2xl border border-gray-200 bg-white p-6 shadow-md",children:[(0,l.jsx)("p",{className:"text-center text-lg font-medium text-gray-800",children:F()}),(0,l.jsx)("p",{className:"text-center text-sm text-gray-600",children:"We need both camera and microphone permissions to proceed."}),(0,l.jsxs)("button",{onClick:B,className:"rounded-xl bg-brand px-5 py-2 text-white shadow transition hover:scale-105 focus:outline-none focus:ring-2 focus:ring-blue-400",children:["Request ",!1===o&&!1===d?"Permissions":!1===o?"Camera Permission":"Microphone Permission"]})]}):null===x||N?(0,l.jsx)("div",{className:"mt-24 flex items-center justify-center",children:(0,l.jsx)("span",{className:"h-8 w-8 animate-spin rounded-full border-[3px] border-transparent border-l-black"})}):(0,l.jsxs)("div",{className:"relative ".concat(t&&w().pulse," flex items-center justify-center"),children:[(0,l.jsx)("video",{ref:b,autoPlay:!0,playsInline:!0,className:null!=r?r:"w-96 rounded-md border-2"}),(0,l.jsx)("canvas",{ref:I,className:"hidden"}),t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"absolute -top-10 flex items-center gap-2",children:[(0,l.jsx)("div",{className:"-ml-9 text-xs font-bold text-gray-500",children:"Testing Camera and Mic"}),(0,l.jsx)(A,{className:""})]}),(0,l.jsx)("button",{disabled:s,onClick:null===T?()=>{(async()=>{try{let e=await L();"granted"!==e.camera||"granted"!==e.microphone?(R(e.camera,e.microphone),a(!1),q(null)):q(3)}catch(e){a(!1),q(null)}})()}:void 0,className:"absolute bottom-4 left-1/2 -translate-x-1/2 cursor-pointer select-none rounded-full bg-white px-4 py-2 text-center disabled:cursor-not-allowed disabled:opacity-45",children:s?"Loading...":null===T?(0,l.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[" ",(0,l.jsx)(k.Z,{}),"Capture"]}):"Capturing in ".concat(T,"...")}),null===T&&(0,l.jsx)("span",{className:"absolute -bottom-10 text-sm font-bold text-blue-500",children:"Click on Capture and wait for 3 seconds"}),!0===f&&(0,l.jsx)(m.default,{isOpen:f,setIsOpen:g})]})]})},B=e=>{let{setSelectedCategory:t,selectedCategory:s,onChooseFile:a,setSelectedQuestionType:r,handleFileChange:n,technicalCategories:i,selectedQuestionType:o,selectedFile1:d,fileInputRef1:u,setSelectedPage:m,hrQuestions:h,techQuestions:p}=e,f=(0,_.useRouter)(),g=(0,x.CG)(e=>e.userData),[w,v]=(0,C.useState)(0);(0,C.useEffect)(()=>{if(0===o){let e=h[0];f.replace({pathname:f.pathname,query:{...f.query,interviewType:e.type}})}else if(1===o){let e=p.find(e=>e.name===i[0]),t=null==e?void 0:e.sets[0];f.replace({pathname:f.pathname,query:{...f.query,interviewType:t.type}})}},[]);let y=!!(0,N.getCookie)("token"),b=()=>{let e=[];
1if(0===o)e=h;else if(1===o){let t=p.find(e=>e.name===s);t&&t.sets&&(e=t.sets.map(e=>({title:e.title,data:e.data,type:e.type})))}return e.filter(e=>null!=e.title&&""!==e.title.trim()&&Array.isArray(e.data)&&e.data.length>0&&e.data.every(e=>null!=e&&""!==e.trim()))},j=(0,_.useRouter)(),[k,E]=(0,C.useState)({name:(null==g?void 0:g.user_name)||"",email:(null==g?void 0:g.email)||"",lastInstitute:"",passYear:"",referenceSource:"",mobile:""}),I=e=>{if(r(e),v(0),1===e&&t(i[0]),0===e){let e=h[0];f.replace({pathname:f.pathname,query:{...f.query,interviewType:e.type}})}else if(1===e){let e=p.find(e=>e.name===i[0]),t=null==e?void 0:e.sets[0];f.replace({pathname:f.pathname,query:{...f.query,interviewType:t.type}})}else f.replace({pathname:f.pathname,query:{...f.query,interviewType:"Communication"}})},T=()=>(0,l.jsxs)("div",{className:"flex h-full flex-col items-center justify-center space-y-4",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-gray-200"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-12 w-12 animate-spin rounded-full border-4 border-brand border-t-transparent"})]}),(0,l.jsx)("p",{className:"font-medium text-brand",children:"Loading questions..."})]}),q=()=>(0,l.jsxs)("div",{className:"flex h-full flex-col items-center justify-center space-y-6 px-8",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,l.jsx)("div",{className:"rounded-full bg-gray-200 p-6",children:(0,l.jsx)(S.Z,{className:"text-brand size-8"})}),(0,l.jsx)("h3",{className:"text-center text-xl font-bold text-brand",children:"Login Required"}),(0,l.jsx)("p",{className:"max-w-md text-center text-gray-600",children:"Please login to access our AI interview features and start practicing with hundreds of questions from top tech companies."})]}),(0,l.jsx)("button",{onClick:()=>j.push("/"),className:"flex cursor-pointer items-center justify-center rounded-full bg-brand px-8 py-3 text-white transition-all hover:scale-105",children:"Login to Continue"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm text-gray-600",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-brand"}),(0,l.jsx)("span",{children:"Access to HR and Technical questions"})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-brand"}),(0,l.jsx)("span",{children:"AI-powered resume interviews"})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-brand"}),(0,l.jsx)("span",{children:"Track your interview progress"})]})]})]}),A=()=>{if(!y||2===o)return!1;if(0===o)return!h||0===h.length;if(1===o){let e=b();return!p||0===p.length||0===e.length}return!0};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2",children:[(0,l.jsxs)("div",{className:"relative flex min-w-full items-center justify-center bg-white py-16 md:col-span-1 md:min-h-screen md:py-10",children:[(0,l.jsx)("div",{className:"absolute top-0 flex w-full flex-row justify-center gap-2 overflow-hidden py-2 md:gap-2 lg:gap-6",children:(0,l.jsxs)("div",{className:"flex w-full items-start gap-2 px-4 md:mb-8 md:flex-col md:gap-1 lg:gap-3",children:[(0,l.jsx)("span",{className:" hidden font-extrabold text-brand md:block md:text-base lg:text-lg xl:text-lg",children:"AI INTERVIEWER"}),window.history.length>0&&(0,l.jsxs)("button",{onClick:()=>{f.back()},className:" flex w-fit cursor-pointer items-center justify-start gap-2 rounded-full bg-gray-100 px-4 py-2.5 text-sm transition-all ",children:[(0,l.jsx)(c.Z,{className:"rotate-180 "})," Back"]})]})}),(0,l.jsxs)("div",{className:"mx-12 flex flex-col items-start justify-start gap-y-4 md:mx-0 md:w-3/4",children:[(0,l.jsx)("span",{className:"text-3xl font-extrabold text-brand",children:"Select a question type"}),(0,l.jsx)("span",{className:"my-2 text-brand",children:"We have hundreds of questions from top tech companies. Choose a type to get started."}),(0,l.jsxs)("button",{onClick:e=>{e.preventDefault(),I(0)},className:"flex w-full cursor-pointer flex-row justify-between rounded-lg border-2 p-3 text-start shadow-lg ".concat(0===o?"border-brand":"border-gray-200"),children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"text-sm font-bold text-brand",children:"HR (Human Resourse)"}),(0,l.jsx)("span",{className:"text-sm font-extralight text-gray-500",children:"From LinkedIn, Amazon, Adobe "})]}),(0,l.jsxs)("div",{className:"flex flex-col items-end",children:[(0,l.jsxs)("svg",{className:"h-full w-[16px]",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{y:"13.1309",width:"6",height:"11",rx:"1",fill:"#4E7BBA"}),(0,l.jsx)("rect",{x:"8",y:"8.13086",width:"6",height:"16",rx:"1",fill:"#E1E1E1"}),(0,l.jsx)("rect",{x:"16",y:"0.130859",width:"6",height:"24",rx:"1",fill:"#E1E1E1"})]}),"Easy"]})]}),(0,l.jsxs)("button",{onClick:e=>{e.preventDefault(),I(1)},className:"flex w-full cursor-pointer flex-row justify-between rounded-lg border-2 p-3 text-start shadow-lg ".concat(1===o?"border-brand":"border-gray-200"),children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"text-sm font-bold text-brand",children:"Technical"}),(0,l.jsx)("span",{className:"text-sm font-extralight text-gray-500",children:"From Google, Meta, and Apple "})]}),(0,l.jsxs)("div",{className:"flex flex-col items-end",children:[(0,l.jsxs)("svg",{className:"h-full w-[16px]",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{y:"13.1309",width:"6",height:"11",rx:"1",fill:"#4E7BBA"}),(0,l.jsx)("rect",{x:"8",y:"8.13086",width:"6",height:"16",rx:"1",fill:"#4E7BBA"}),(0,l.jsx)("rect",{x:"16",y:"0.130859",width:"6",height:"24",rx:"1",fill:"#E1E1E1"})]}),"Medium"]})]}),(0,l.jsxs)("button",{onClick:e=>{e.preventDefault(),I(2)},className:"flex w-full cursor-pointer flex-row justify-between rounded-lg border-2 p-3 text-start shadow-lg ".concat(2===o?"border-brand":"border-gray-200"),children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"text-sm font-bold text-brand",children:"Hiring"}),(0,l.jsx)("span",{className:"text-sm font-extralight text-gray-500",children:"AI interview based on your CV "})]}),(0,l.jsxs)("div",{className:"flex flex-col items-end",children:[(0,l.jsxs)("svg",{className:"h-full w-[16px]",viewBox:"0 0 22 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{y:"13.1309",width:"6",height:"11",rx:"1",fill:"#4E7BBA"}),(0,l.jsx)("rect",{x:"8",y:"8.13086",width:"6",height:"16",rx:"1",fill:"#4E7BBA"}),(0,l.jsx)("rect",{x:"16",y:"0.130859",width:"6",height:"24",rx:"1",fill:"#4E7BBA"})]}),"Hard"]})]})]})]}),(0,l.jsxs)("div",{className:"flex min-w-full flex-col bg-gray-100 py-10 md:col-span-1 md:min-
1h-screen",children:[(()=>{if(!y)return(0,l.jsx)(q,{});if(A())return(0,l.jsx)(T,{});if(2===o)return(0,l.jsxs)("div",{className:"flex h-full flex-col items-center justify-center space-y-6 px-8",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,l.jsx)("div",{className:"rounded-full bg-gray-200 p-6",children:(0,l.jsx)("svg",{className:"h-12 w-12 text-brand",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,l.jsx)("h3",{className:"text-center text-xl font-bold text-brand",children:"AI-Powered Resume Interview"}),(0,l.jsx)("p",{className:"max-w-md text-center text-gray-600",children:"Upload your resume and our AI will generate personalized interview questions based on your experience, skills, and background."})]}),(0,l.jsxs)("div",{className:"w-full max-w-md",children:[(0,l.jsx)("div",{className:"mb-2 font-semibold text-brand",children:"Upload your CV/Resume"}),(0,l.jsxs)("div",{onClick:()=>a(),className:"flex cursor-pointer",children:[(0,l.jsx)("input",{onChange:n,type:"file",ref:u,accept:"application/pdf",className:"hidden"}),(0,l.jsx)("div",{className:"form-input flex-1 rounded-none rounded-l-md border border-gray-300 px-3 py-2 pr-10 text-sm font-normal",children:(null==d?void 0:d.name)||"Choose PDF file..."}),(0,l.jsx)("div",{className:"flex items-center justify-center rounded-r-md border border-gray-300 bg-gray-200 px-4 text-sm transition-colors hover:bg-gray-300",children:"Browse"})]}),d&&(0,l.jsx)("p",{className:"mt-2 text-sm text-green-600",children:"â Resume uploaded successfully"})]}),(0,l.jsxs)("div",{className:"space-y-3 text-sm text-gray-600",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-brand"}),(0,l.jsx)("span",{children:"Questions tailored to your experience"})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-brand"}),(0,l.jsx)("span",{children:"Skills-based technical questions"})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-brand"}),(0,l.jsx)("span",{children:"Career progression inquiries"})]})]})]});let e=b();return(0,l.jsxs)("div",{className:"mx-8 flex h-full flex-col justify-center",children:[1===o&&(0,l.jsx)("div",{className:"flex h-fit max-h-fit flex-1 items-start",children:(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)("h3",{className:"mb-4 text-lg font-bold text-brand",children:"Select Category"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,l.jsx)("button",{onClick:()=>{t(e);let s=p.find(t=>t.name===e).sets[0];f.replace({pathname:f.pathname,query:{...f.query,interviewType:s.type}}),v(0)},className:"rounded-full px-4 py-2 text-sm shadow-sm ".concat(s===e?"bg-brand text-white":"bg-white text-brand"),children:e},e))})]})}),1===o&&(0,l.jsxs)("div",{className:"flex-1 items-center justify-center",children:[(0,l.jsx)("h3",{className:"mb-4 text-lg font-bold text-brand",children:"Choose Interview Set"}),e.length>0?(0,l.jsx)("div",{className:"grid max-h-[45vh] grid-cols-2 gap-4 overflow-y-auto px-2",children:e.map((e,t)=>(0,l.jsx)("button",{onClick:()=>{v(t),f.replace({pathname:f.pathname,query:{...f.query,interviewType:e.type}})},className:"cursor-pointer rounded-lg border-2 p-3 text-sm shadow-sm ".concat(w===t?"border-brand bg-brand text-white":"border-gray-200 bg-white text-brand"),children:e.title},t))}):(0,l.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,l.jsx)("p",{className:"text-gray-500",children:"No mock interviews available for this selection."})})]}),0===o&&(0,l.jsxs)("div",{className:"flex-1 items-center justify-center",children:[(0,l.jsx)("h3",{className:"mb-4 text-lg font-bold text-brand",children:"Choose Interview Set"}),e.length>0?(0,l.jsx)("div",{className:"grid max-h-[72vh] grid-cols-2 gap-4 overflow-y-auto px-2",children:e.map((e,t)=>(0,l.jsx)("button",{onClick:()=>{v(t),f.replace({pathname:f.pathname,query:{...f.query,interviewType:e.type}})},className:"cursor-pointer rounded-lg border-2 p-3 text-sm shadow-sm ".concat(w===t?"border-brand bg-brand text-white":"border-gray-200 bg-white text-brand"),children:e.title},t))}):(0,l.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,l.jsx)("p",{className:"text-gray-500",children:"No mock interviews available for this selection."})})]})]})})(),y&&!A()&&(2!==o||d)&&(0,l.jsx)("div",{className:"mt-5 flex justify-end px-8",children:(0,l.jsxs)("button",{disabled:2===o&&null==d,onClick:()=>
1{if(2===o)localStorage.setItem("selectedMockInterview",JSON.stringify({questionType:o,category:s,mockInterviewIndex:null,mockInterviewTitle:"AI Resume Interview",questions:[]}));else{var e,t;let a=b(),r={questionType:o,category:s,mockInterviewIndex:w,mockInterviewTitle:null===(e=a[w])||void 0===e?void 0:e.title,questions:(null===(t=a[w])||void 0===t?void 0:t.data)||[]};localStorage.setItem("selectedMockInterview",JSON.stringify(r))}m(2)},className:"ml-4 flex cursor-pointer items-center justify-center rounded-full bg-brand px-6 py-2.5 text-sm text-white transition-all hover:scale-105 disabled:bg-brand-85",children:["Continue ",(0,l.jsx)(c.Z,{className:"ml-2"})]})})]})]})})}},14213:function(e,t,s){"use strict";s.d(t,{d:function(){return a},w:function(){return r}});let a={gu:"/gu/video_1.mp4",niilm:"/niilm/video_1.mp4",bestiu:"/interview/common/video_1.mp4",geu:"/interview/common/video_1.mp4",jnu:"/interview/common/video_1.mp4",sam:"/interview/common/video_1.mp4",srisriuniversity:"/interview/common/video_1.mp4",jkuai:"/interview/common/video_1.mp4",prathamai:"/interview/common/video_1.mp4",tsuniv:"/interview/common/video_1.mp4",sanskriti:"/interview/common/video_1.mp4",jguni:"/interview/common/video_1.mp4",gokuluniversity:"/interview/common/video_1.mp4",raiuniversity:"/interview/common/video_1.mp4",vidhyadeepuni:"/interview/common/video_1.mp4",bmusurat:"/interview/common/video_1.mp4",madhavuniversity:"/interview/common/video_1.mp4",pimpri:"/interview/common/video_1.mp4"},r={gu:"/assets/saha/gu/talk.webm",niilm:"/assets/saha/niilm/talk.webm",bestiu:"/assets/saha/bestiu/talk.webm",geu:"/assets/saha/geu/talk.webm",jnu:"/assets/saha/jnu/talk.webm",sam:"/assets/saha/sam/talk.webm",srisriuniversity:"/assets/saha/srisri/talk.webm",jkuai:"/assets/saha/jku/talk.webm",prathamai:"/assets/saha/prathamai/talk.webm",sanskriti:"/assets/saha/sanskriti/talk.webm",jguni:"/assets/saha/jguni/talk.webm",gokuluniversity:"/assets/saha/gokuluniversity/talk.webm",raiuniversity:"/assets/saha/raiuniversity/talk.webm",vidhyadeepuni:"/assets/saha/vidhyadeepuni/talk.webm",bmusurat:"/assets/saha/bmusurat/talk.webm",madhavuniversity:"/assets/saha/madhavuniversity/talk.webm",pimpri:"/assets/saha/pimpri/talk.webm",tsuniv:""}},96521:function(e){e.exports={formBox:"AnimatedBorder_formBox__6_cIh",cardContainer:"AnimatedBorder_cardContainer__VSvud",card:"AnimatedBorder_card__Wb2AG",bg:"AnimatedBorder_bg__IJatY",blob:"AnimatedBorder_blob__KLUtu","blob-bounce":"AnimatedBorder_blob-bounce__VCtYf",btn:"AnimatedBorder_btn__DM5sL",outerdiv:"AnimatedBorder_outerdiv__gPx_6","border-move":"AnimatedBorder_border-move__pAnwp",listDecimal:"AnimatedBorder_listDecimal__cqSxB",fadeIn:"AnimatedBorder_fadeIn___OCGJ"}},49837:function(e){e.exports={pulse:"BorderPulse_pulse__3wY2k",pulseAnother:"BorderPulse_pulseAnother__aj3qV"}}},function(e){e.O(0,[93021,49613,92888,49774,40179],function(){return e(e.s=97857)}),_N_E=e.O()}]);
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.