PageSourceSearch

https://app.quikhyr.ai/assets/MockInterview-Bcl36sKB.js

js quikhyr.ai collected 2026-10-05 14:49:03 UTC 23,442 bytes, 5 lines download raw bytes

1import{r as s,u as $e,j as e,B as L,A as l}from"./index-BLI-TREN.js";import{T as Be}from"./Topbar-Bk5k6Cnd.js";import{g as ge,s as i,F as We,a as ze,b as Ke,c as Ve,H as Ye,I as qe,p as pe,d as Je,e as He,f as Qe}from"./InterviewVoiceController-DkUTyWcL.js";import{M as we}from"./Modal-Dd4RMCil.js";import{a as Ge}from"./https-oznZdOmm.js";import{i as Xe}from"./iconClose-fCyzlgUl.js";import"./queries-Dbg1i5zy.js";import"./useQuery-72BRYT7H.js";import"./useMutation-BDX76ceh.js";import"./jobs.service-_ASu3uGO.js";import"./NotificationBell-DpunGe8e.js";import"./iconInfo-CbZjW3hq.js";import"./userDisplay-CJc4ppz1.js";function Ze(){try{const p=localStorage.getItem("qh_jobseeker_user");return p?JSON.parse(p):{}}catch{return{}}}const et=p=>{if(!p)return pe;const w=p.toLowerCase();return w.includes("india")||w==="in"?Je:w.includes("canada")||w==="ca"?He:w.includes("south africa")||w.includes("southafrica")||w==="za"?Qe:pe};function gt(){const p=Ze(),w=p.userId||p.id||"",O=p.country||p.location||"",[te,re]=s.useState([]),[se,q]=s.useState(!1),[U,b]=s.useState(!1),[R,N]=s.useState(!1),[ne,E]=s.useState(!1),[be,ae]=s.useState(!1),[v,ve]=s.useState(!0),[F,ye]=s.useState(!0),[_,ie]=s.useState(!1),[h,ce]=s.useState(!1),[oe,M]=s.useState(""),[tt,$]=s.useState(""),[rt,je]=s.useState(""),[Ne,B]=s.useState(!1),[Te,le]=s.useState(0),[Se,d]=s.useState(!1),[W,I]=s.useState({title:"",message:"",type:"danger"}),m=s.useRef(null),o=s.useRef(null),ue=s.useRef(""),T=s.useRef(!1),J=s.useRef(!1),z=s.useRef(!1),H=s.useRef(!1),S=s.useRef(!1),de=s.useRef(0),me=s.useRef(0),fe=s.useRef(0),he=s.useRef(0),ke=s.useRef(0),Ce=s.useRef(0),Q=$e(),u=s.useRef(null),G=s.useRef(null),Re=s.useRef(null),f=s.useRef(null),A=s.useRef(null),K=s.useRef(null),V=s.useRef(null),a=s.useRef(null),y=s.useRef(null),X=et(O),[j,Ee]=s.useState({face_count:0,concentration:0,expression:"",emoji:""});s.useEffect(()=>{O&&ge&&ge.setLanguageByCountry(O)},[O]),s.useEffect(()=>{const t=document.querySelector("[data-pallavi-video]");t&&(R?t.play?.().catch(()=>{}):(t.pause?.(),t.currentTime!==void 0&&(t.currentTime=0)))},[R]),s.useEffect(()=>{(async()=>{try{await i.initialize(),i.onStart(()=>{b(!0),E(!1),M("")}),i.onSpeaking(n=>E(n)),i.onEnd(()=>{i.isWaitingForIntent||(b(!1),E(!1),M(""))}),i.onError(n=>{E(!1),M(""),(n.error==="not-allowed"||n.error==="audio-capture")&&l.confirm({title:"Microphone Error",message:n.message||"Could not access microphone. Please check permissions.",confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1})}),i.onInterim(n=>M(n)),G.current=i;const r=new qe(i,{maxRetries:2,voiceOnlyMode:!0,pausePromptText:"Did you finish? Say continue to keep answering, or next to move on."});r.setCallbacks({onAnswerUpdated:Ae,onSilenceRetry:()=>{},onMaxTimeout:n=>$(n.currentAnswer),onIntentDetected:()=>{},onAnswerSubmitted:Le,onError:n=>{l.confirm({title:"Microphone Error",message:n.message||"Speech recognition error",confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1})},onBotSpeaking:n=>{N(n),n?(b(!1),M("")):b(!0)},onIntentResponseReceived:()=>{clearTimeout(m.current),T.current&&(m.current=setTimeout(()=>{m.current=null,T.current&&o.current&&o.current.handleNext()},2e4))}}),o.current=r}catch(r){console.error("Failed to initialize speech service:",r),l.confirm({title:"Speech Recognition Error",message:"Could not initialize speech recognition. Please refresh the page.",confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1})}})()},[]),s.useEffect(()=>()=>{if(a.current&&(a.current.pause(),a.current=null),o.current&&(o.current.cleanup(),o.current=null),G.current)try{i.cleanup()}catch{}u.current?.close(),A.current&&(A.current.getTracks().forEach(t=>t.stop()),A.current=null),y.current&&(y.current.getTracks().forEach(t=>t.stop()),y.current=null),clearTimeout(K.current),clearInterval(V.current)},[]),s.useEffect(()=>{h&&f.current&&A.current&&(f.current.srcObject=A.current)},[h]);const Ie=(t,r="audio/mp3")=>{const n=atob(t);return new Blob([Uint8Array.from(n,x=>x.charCodeAt(0))],{type:r})},xe=()=>new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),Ae=t=>{if($(t.currentAnswer),t.status==="paused-for-prompt")clearTimeout(m.current),T.current=!0,m.current=setTimeout(()=>{m.current=null,T.current&&o.current&&o.current.handleNext()},2e4);else if(t.status==="resumed")T.current=!1,clearTimeout(m.current),m.current=null;else if(t.status==="repeat-requested"){T.current=!1,clearTimeout(m.current),m.current=null,$("");const r=ue.current;r&&o.current?o.current.replayQuestionAndListen(r):u.current?.readyState===WebSocket.OPEN&&u.current.send(JSON.stringify({action:"repeat_question"}))}},Le=t=>{u.current?.readyState===WebSocket.OPEN&&(u.current.send(JSON.stringify({text:t.answer||"(No answer)"})),re(r=>[...r,{role:"you",text:t.answer||"(No answer)",time:xe()}]),ae(!0)),b(!1),$(""),clearTimeout(m.current),m.current=null,T.current=!1},k=(t=!1)=>{J.current=!0,z.current=!1,a.current&&(a.current.pause(),a.current=null),u.current?.close(),o.current&&(o.current.cleanup(),o.current=null);try{i.stop(),i.abort()}catch{}if(f.current&&(f.current.srcObject=null),y.current&&(y.current.getTracks().forEac
1h(r=>r.stop()),y.current=null),clearTimeout(K.current),clearInterval(V.current),window.removeEventListener("keydown",Z),window.removeEventListener("blur",Y),document.removeEventListener("visibilitychange",ee),ce(!1),b(!1),N(!1),E(!1),d(!1),B(!1),clearTimeout(m.current),m.current=null,T.current=!1,l.clearAll(),t){setTimeout(()=>Q("/jobseeker/interview/feedback"),100);return}l.confirm({title:"Interview Ended",message:"Thank you for completing the mock interview. Please provide your feedback.",confirmText:"Continue to Feedback",cancelText:"",tone:"success",dismissible:!1}).then(()=>{d(!1),B(!1),l.clearAll(),Q("/jobseeker/interview/feedback")})},Oe=()=>{V.current=setInterval(()=>le(t=>t+1),1e3),B(!0),le(0),u.current=Ge.ws("interview",{type:"mock",userId:w,country:O||null}),u.current.onopen=()=>{clearInterval(V.current),B(!1),Me(),window.addEventListener("keydown",Z),window.addEventListener("blur",Y),document.addEventListener("visibilitychange",ee)},u.current.onerror=()=>{l.confirm({title:"Connection Error",message:"Lost connection to interview server. Please check your internet and try again.",confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1})},u.current.onclose=()=>{if(window.removeEventListener("keydown",Z),window.removeEventListener("blur",Y),document.removeEventListener("visibilitychange",ee),z.current&&!J.current){try{i.stop(),i.abort()}catch{}b(!1),E(!1),a.current&&!a.current.paused?H.current=!0:(a.current&&(a.current.pause(),a.current=null),N(!1),d(!0),I({title:"Interview Completed",message:"Your mock interview has been completed successfully. You will be redirected to feedback in 5 seconds.",type:"success"}),setTimeout(()=>{d(!1),k(!0)},5e3))}},u.current.onmessage=async t=>{try{const r=JSON.parse(t.data);if(r.error){J.current=!0,z.current=!1,u.current?.close(),a.current&&(a.current.pause(),a.current=null),o.current&&(o.current.cleanup(),o.current=null);try{i.stop(),i.abort()}catch{}l.confirm({title:"Interview Already Completed",message:"You have already completed this interview. Please go back to the dashboard to start a new mock interview.",confirmText:"Go to Overview",cancelText:"",tone:"info",dismissible:!1}).then(()=>{Q("/jobseeker/overview")});return}if(r.response_text&&(re(x=>[...x,{role:"bot",text:r.response_text,time:xe()}]),je(r.response_text),ue.current=r.response_text,ae(!1)),r.response_audio_base64){a.current&&(a.current.pause(),a.current.currentTime=0,a.current=null);try{const x=Ie(r.response_audio_base64),g=URL.createObjectURL(x),c=new Audio(g);c.playbackRate=1.25,c.preservesPitch=!0,c.mozPreservesPitch=!0,c.webkitPreservesPitch=!0,a.current=c,N(!0);let P=!1;const C=()=>
1{if(!P){if(P=!0,N(!1),a.current=null,URL.revokeObjectURL(g),H.current){H.current=!1,d(!0),I({title:"Interview Completed",message:"Your mock interview has been completed successfully. You will be redirected to feedback in 5 seconds.",type:"success"}),setTimeout(()=>{d(!1),k(!0)},5e3);return}v&&D()}};c.onended=C,c.onpause=()=>{c.currentTime>=c.duration&&c.duration>0&&C()},c.onerror=()=>{N(!1),a.current=null,URL.revokeObjectURL(g),v&&D()},c.onloadedmetadata=()=>{c.duration&&!isNaN(c.duration)&&setTimeout(()=>{!P&&a.current===c&&C()},(c.duration+1)*1e3)},c.play().catch(()=>{N(!1),a.current=null,URL.revokeObjectURL(g),v&&setTimeout(()=>D(),100)})}catch{N(!1),v&&setTimeout(()=>D(),100)}}else r.response_text&&!r.response_audio_base64&&v&&D();const n=Date.now();if(r.face_count===0&&n-fe.current>=5e3){de.current+=1;const g=de.current;fe.current=n,(async()=>{if(g>=3){d(!0),I({title:"Interview Terminated",message:"You have violated the interview rules 3 times. The interview will be terminated.",type:"danger"}),setTimeout(()=>{d(!1),k(!0)},3e3);return}await l.confirm({title:"No Face Detected",message:`Please ensure your face is visible to the camera. Warning ${g} of 3.`,confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1})})()}if(r.face_count>1&&n-he.current>=5e3){me.current+=1;const g=me.current;he.current=n,(async()=>{if(g>=3){d(!0),I({title:"Interview Terminated",message:"You have violated the interview rules 3 times. The interview will be terminated.",type:"danger"}),setTimeout(()=>{d(!1),k(!0)},3e3);return}await l.confirm({title:"Multiple Faces Detected",message:`Only one person should be visible. Warning ${g} of 3.`,confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1})})()}(r.face_count!==void 0||r.concentration!==void 0)&&Ee({face_count:r.face_count||0,concentration:Math.round(r.concentration||0),expression:r.expression||"",emoji:r.emoji||""})}catch(r){console.error("Error processing WebSocket message:",r)}}},Fe=async()=>{try{const t=await navigator.mediaDevices.getUserMedia({video:!0,audio:!0});A.current=t,f.current&&(f.current.srcObject=t,await new Promise(r=>{f.current.readyState>=2?r():f.current.onloadedmetadata=()=>r()}))}catch(t){console.error("Unable to start video preview:",t)}},Me=()=>{navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{y.current=t;const r=document.createElement("video");r.srcObject=t,r.play();const n=document.createElement("canvas"),x=n.getContext("2d"),c=setInterval(()=>{if(u.current?.readyState===WebSocket.OPEN){n.width=r.videoWidth||640,n.height=r.videoHeight||480,x.drawImage(r,0,0,n.width,n.height);const C=n.toDataURL("image/jpeg",.7);u.current.send(JSON.stringify({frame:C.replace(/^data:image\/jpeg;base64,/,"")}))}},500),P=()=>{clearInterval(c),y.current&&(y.current.getTracks().forEach(C=>C.stop()),y.current=null)};u.current.addEventListener("close",P,{once:!0})}).catch(()=>{})},D=async()=>{if(!(!G.current||!v))try{if(o.current)await o.current.startListening();else{if(U)return;try{i.stop()}catch{}clearTimeout(K.current);try{await i.start()}catch{b(!1)}K.current=setTimeout(()=>{try{i.stop()}catch{}b(!1)},6e4)}}catch{b(!1)}},De=async()=>{if(!w){await l.confirm({title:"Session Error",message:"User ID not found. Please log in again.",confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1});return}if(q(!0),!await l.confirm({title:"Allow Camera & Microphone?",message:"This mock interview requires access to your camera and microphone.",confirmText:"Allow",cancelText:"Deny",tone:"success"})){await l.confirm({title:"Permission Denied",message:"You must allow camera and mic access to proceed with the mock interview.",confirmText:"Retry",cancelText:"",tone:"danger",dismissible:!1}),q(!1);return}try{await navigator.mediaDevices.getUserMedia({video:!0,audio:!0})}catch{await l.confirm({title:"Access Failed",message:"Could not access your camera/microphone. Please check browser permissions.",confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1}),q(!1);return}await Fe(),ce(!0),z.current=!0,Oe()},Pe=()=>{const t=f.current?.srcObject?.getAudioTracks();if(t?.length){const r=!v;if(t.forEach(n=>n.enabled=r),ve(r),!r&&U)try{i.stop()}catch{}}},Ue=()=>{const t=f.current?.srcObject;if(!t)return;const r=t.getVideoTracks();if(r?.length){const n=!F;r.forEach(x=>x.enabled=n),ye(n)}},_e=["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","AudioVolumeUp","AudioVolumeDown","AudioVolumeMute","BrightnessUp","BrightnessDown"],Z=t=>{_e.includes(t.key)||(t.preventDefault(),!S.current&&(S.current=!0,(async()=>{const r=++ke.current;if(r>=3){S.current=!1,d(!0),I({title:"Interview Terminated",message:"You have violated the interview rules 3 times. The interview will be terminated.",type:"danger"}),setTimeout(()=>{d(!1),k(!0)},3e3);return}await l.confirm({title:"Keyboard Restricted",message:`You pressed "${t.key}" - Only function keys are allowed!
2
3Warning ${r} of 3.`,confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1}),S.current=!1})()))},Y=()=>{S.current||(S.current=!0,(async()=>{const t=++Ce.current;if(t>=3){S.current=!1,d(!0),I({title:"Interview Terminated",message:"You have violated the interview rules 3 times. The interview will be terminated.",type:"danger"}),setTimeout(()=>{d(!1),k(!0)},3e3);return}await l.confirm({title:"Focus Lost",message:`You switched tabs or minimized the window!
4
5Warning ${t} of 3.`,confirmText:"OK",cancelText:"",tone:"danger",dismissible:!1}),S.current=!1})())},ee=()=>{document.visibilityState==="hidden"&&Y()};return e.jsxs("div",{className:"flex flex-col h-screen bg-[#F8FAFB]",children:[e.jsx(Be,{variant:"simple"}),e.jsx(we,{isOpen:Ne,onClose:()=>{},closeOnEsc:!1,closeOnOverlay:!1,showCloseButton:!1,size:"sm",children:e.jsxs("div",{className:"text-center py-6",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Connecting Mock Interview..."}),e.jsx("p",{className:"text-gray-600 mb-4",children:"Please wait, connecting to interview servers"}),e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#009D83]"}),e.jsxs("span",{className:"text-2xl font-bold text-[#009D83]",children:[Te,"s"]}
5)]})]})}),e.jsx(we,{isOpen:Se,onClose:()=>{},closeOnEsc:!1,closeOnOverlay:!1,showCloseButton:!1,size:"sm",className:"z-[9000]",children:e.jsxs("div",{className:"text-center py-6 relative z-[9000]",children:[e.jsx("div",{className:"mb-4",children:(()=>{const t=W?.type==="success";return e.jsx("div",{className:`w-16 h-16 ${t?"bg-green-100":"bg-red-100"} rounded-full flex items-center justify-center mx-auto`,children:t?e.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):e.jsx("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})})()}),e.jsx("h2",{className:"text-xl font-semibold mb-2 text-gray-900",children:W.title}),e.jsx("p",{className:"text-gray-600 mb-4",children:W.message}),e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:`animate-spin rounded-full h-6 w-6 border-b-2 ${W?.type==="success"?"border-green-600":"border-red-600"}`}),e.jsx("span",{className:"text-sm text-gray-500",children:"Redirecting..."})]})]})}),e.jsxs("div",{className:"flex flex-1 flex-col md:flex-row overflow-hidden",children:[e.jsxs("div",{className:"flex-1 relative flex flex-col bg-[#313131]",children:[e.jsxs("div",{className:"relative flex-1 flex items-center justify-center bg-[#556360] rounded-xl m-2 overflow-hidden",children:[!h&&!se&&e.jsx("video",{ref:f,className:"w-full h-full object-cover rounded-xl scale-x-[-1]",autoPlay:!0,muted:!0}),U&&e.jsxs("div",{className:"absolute top-4 left-1/2 transform -translate-x-1/2 bg-green-500/90 text-white px-6 py-3 rounded-full shadow-lg flex items-center gap-2 animate-pulse",children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-1 h-4 bg-white rounded-full animate-pulse",style:{animationDelay:"0s"}}),e.jsx("div",{className:"w-1 h-6 bg-white rounded-full animate-pulse",style:{animationDelay:"0.1s"}}),e.jsx("div",{className:"w-1 h-4 bg-white rounded-full animate-pulse",style:{animationDelay:"0.2s"}})]}),e.jsx("span",{className:"font-semibold",children:"Listening..."})]}),h&&e.jsxs("div",{className:"absolute top-4 left-4 flex flex-col gap-2 text-xs md:text-sm z-20",children:[e.jsx("div",{className:"bg-white/95 backdrop-blur-sm text-gray-800 px-4 py-2 rounded-lg shadow-lg border border-gray-200",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-gray-600",children:"Face Count:"}),e.jsx("span",{className:`font-bold ${j.face_count===1?"text-green-600":"text-red-600"}`,children:j.face_count})]})}),e.jsx("div",{className:"bg-white/95 backdrop-blur-sm text-gray-800 px-4 py-2 rounded-lg shadow-lg border border-gray-200",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-gray-600",children:"Concentration:"}),e.jsxs("span",{className:`font-bold ${j.concentration>70?"text-green-600":j.concentration>40?"text-yellow-600":"text-red-600"}`,children:[j.concentration,"%"]})]})}),j.expression&&e.jsx("div",{className:"bg-white/95 backdrop-blur-sm text-gray-800 px-4 py-2 rounded-lg shadow-lg border border-gray-200",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-gray-600",children:"Expression:"}),e.jsxs("span",{className:"font-bold capitalize text-gray-800",children:[j.emoji&&`${j.emoji} `,j.expression]})]})})]}),e.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[R&&e.jsx("div",{className:"absolute w-64 h-64 rounded-full border-4 border-teal-500 animate-ping opacity-75"}),R&&e.jsx("div",{className:"absolute w-72 h-72 rounded-full border-4 border-teal-400 animate-pulse"}),e.jsxs("div",{className:`relative transition-transform ${R?"scale-110":"scale-100"}`,children:[e.jsx("img",{src:X,alt:"AI Interviewer",className:"w-40 h-40 rounded-full object-cover object-top border-4 border-teal-500 relative z-10"}),R&&e.jsx("div",{className:"absolute bottom-0 left-1/2 transform -translate-x-1/2 translate-y-12 flex gap-1",children:[0,.1,.2,.3,.4,.5,.6].map((t,r)=>e.jsx("div",{className:"w-2 bg-teal-500 rounded-full animate-pulse",style:{height:`${[32,48,64,40,56,48,32][r]}px`,animationDelay:`${t}s`,animationDuration:["0.6s","0.5s","0.7s","0.6s","0.5s","0.7s","0.6s"][r]}},r))})]})]}),h&&e.jsxs("div",{className:`absolute bottom-5 right-5 w-48 h-32 md:w-64 md:h-44 bg-black rounded-2xl overflow-hidden shadow-2xl transition-all ${ne?"border-4 border-green-500 ring-4 ring-green-500/50":"border-4 border-white"} ${F?"":"hidden"}`,children:[e.jsx("video",{ref:f,className:"w-full h-full object-cover scale-x-[-1]",autoPlay:!0,muted:!0}
5),ne&&e.jsx("div",{className:"absolute bottom-2 left-2 flex gap-1",children:[0,.1,.2,.3,.4].map((t,r)=>e.jsx("div",{className:"w-1 bg-green-500 rounded-full animate-pulse",style:{height:`${[12,16,20,16,12][r]}px`,animationDelay:`${t}s`}},r))})]}),U&&oe&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-[#1e1e1ecc] px-4 py-3 z-10",children:e.jsxs("div",{className:"max-w-2xl mx-auto text-center text-white text-[14px] leading-relaxed opacity-90",children:[oe,e.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-green-400 ml-1 align-middle animate-pulse"})]})})]}),e.jsx("div",{className:"flex items-center justify-center gap-4 bg-[#313131] py-4",children:se?e.jsxs(e.Fragment,{children:[e.jsx(L,{onClick:Ue,disabled:h,className:`p-4 rounded-full shadow-lg transition ${h?"bg-gray-400 cursor-not-allowed opacity-50":`hover:opacity-80 ${F?"bg-[#E91E63]":"bg-gray-500"}`}`,title:h?"Camera controls disabled during interview":F?"Turn off camera":"Turn on camera",children:F?e.jsx(We,{className:"text-white text-xl"}):e.jsx(ze,{className:"text-white text-xl"})}),e.jsx(L,{onClick:Pe,disabled:h,className:`p-4 rounded-full shadow-lg transition ${h?"bg-gray-400 cursor-not-allowed opacity-50":`hover:opacity-80 ${v?"bg-gray-600":"bg-gray-500"}`}`,title:h?"Microphone controls disabled during interview":v?"Mute microphone":"Unmute microphone",children:v?e.jsx(Ke,{className:"text-white text-xl"}):e.jsx(Ve,{className:"text-white text-xl"})}),e.jsx(L,{onClick:()=>ie(!_),className:`p-4 rounded-full shadow-lg hover:opacity-80 transition ${_?"bg-gray-600":"bg-gray-500"}`,title:_?"Hide transcript":"Show transcript",children:e.jsx(Ye,{className:"text-white text-xl"})}),e.jsx(L,{onClick:k,className:"p-4 rounded-full bg-[#DC2626] text-white shadow-lg hover:bg-red-700 transition",title:"End interview",children:e.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M6.62 10.79a15.053 15.053 0 006.59 6.59l2.2-2.2a1 1 0 011.11-.27c1.12.45 2.33.69 3.57.69a1 1 0 011 1V20a1 1 0 01-1 1A17 17 0 013 4a1 1 0 011-1h3.5a1 1 0 011 1c0 1.24.24 2.45.69 3.57a1 1 0 01-.27 1.11l-2.2 2.2z"})})})]}):e.jsx(L,{onClick:De,className:"px-6 py-3 rounded-full bg-[#009D83] text-white font-semibold shadow hover:bg-[#00b896] transition",children:"Start Mock Interview"})})]}),_&&e.jsxs("div",{className:"w-full sm:w-full md:w-[40%] lg:w-[30%] xl:w-[25%] bg-[#2C2C2C] flex flex-col h-[50vh] md:h-full",children:[e.jsx("div",{className:"bg-[#2C2C2C] px-4 py-3 border-b border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-white font-semibold text-lg",children:"Transcript"}),e.jsx(L,{onClick:()=>ie(!1),className:"text-gray-400 hover:text-white transition p-2 bg-transparent border-none",title:"Close transcript",children:e.jsx("img",{src:Xe,alt:"Close",className:"w-5 h-5"})})]})}),e.jsxs("div",{ref:Re,className:"flex-1 overflow-y-auto p-2 sm:p-3 md:p-4 space-y-2 sm:space-y-3 md:space-y-4 bg-[#2C2C2C] [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:[te.length===0?e.jsx("div",{className:"text-center text-gray-500 mt-8",children:e.jsx("p",{children:"Interview transcript will appear here"})}):te.map((t,r)=>e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-600 flex items-center justify-center overflow-hidden",children:t.role==="bot"?e.jsx("img",{src:X,alt:"AI",className:"w-full h-full object-cover"}):e.jsx("div",{className:"text-white text-sm font-semibold",children:"You"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"bg-[#3A3A3A] text-white px-4 py-3 rounded-2xl rounded-tl-none",children:e.jsx("p",{className:"text-sm leading-relaxed",children:t.text})}),t.time&&e.jsx("span",{className:"text-xs text-gray-500 mt-1 block",children:t.time})]})]},r)),be&&e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-600 flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:X,alt:"AI",className:"w-full h-full object-cover"})}),e.jsx("div",{className:"bg-[#3A3A3A] px-4 py-3 rounded-2xl rounded-tl-none",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),e.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),e.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]})]})]})]})}export{gt 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.