PageSourceSearch

https://careerplatform.io/assets/mock-interview-DvJhQdue.js

js careerplatform.io collected 2026-09-24 15:05:47 UTC 34,169 bytes, 4 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jspdf.es.min-C1mM0ctz.js","assets/index-DNidg_Qc.js"])))=>i.map(i=>d[i]);
2import{c as $e,bp as Xe,a as G,r as a,t as n,j as e,L as ee,E as ze,a3 as Re,B as f,b as z,b8 as Ze,b9 as es,ba as Te,bb as Ee,aZ as xe,S as ss,A as Le,X as ts,al as rs}from"./index-DNidg_Qc.js";import{m as as,e as is}from"./career.functions-CPuccMWX.js";import{s as ns,t as os,C as ls,P as Pe}from"./tts.functions-qe4uOKtD.js";import{T as cs}from"./tool-shell-Ca_pGYsK.js";import{S as ds}from"./StepIndicator-CI4cK_FC.js";import{P as ms}from"./PlanGate-Dn5rCudQ.js";import{I as De}from"./input-70YvsUaZ.js";import{L as Q}from"./label-Bhudjdxi.js";import{R as us}from"./resume-upload-button-D77qLtgT.js";import{R as ps}from"./resume-drop-zone-CkctDbNH.js";import{M as xs}from"./MultiColumnWarningBanner-aVccz4D4.js";import{L as hs}from"./LoadSavedResume-NpzK-0VW.js";import{U as fs,R as gs}from"./UseResumeProfileButton-B9aqLXeo.js";import{U as bs}from"./UseTailoredVersionButton-XBoihEM_.js";import{P as js}from"./ai-processing-notice-DjDAPzb1.js";import{u as vs}from"./useToolRemaining-D3wJXDRJ.js";import{L as ys}from"./LinkedApplicationBanner-XULYa-Rs.js";import{A as ws}from"./AutoSelectedResumeChip-Cr5aCXqa.js";import{s as Ns}from"./interview-library.functions-DCVFNI0Q.js";import{S as Ss}from"./ShareToLinkedInButton-GLoGR4Oe.js";import{M as ks,a as Is}from"./MicroTip-BclhUOIG.js";import{S as Cs}from"./shield-check-DVO32LZ7.js";import{M as he}from"./mic-UwRtLMQn.js";import{V as Ae}from"./volume-2-soNJL1HB.js";import{B as Ms}from"./book-marked-CM7jbOgf.js";import{D as zs}from"./download-DvVzbS_i.js";import{C as fe}from"./circle-check-big-DjEcvWDG.js";import{C as Rs}from"./circle-alert-Bw878CKd.js";import{L as Ts}from"./lightbulb-5U240Hvw.js";import"./calendar-range-DtWa0rnV.js";import"./dollar-sign-DLC6ZiSK.js";import"./camera-CYuBMNZh.js";import"./message-square-tEJuq6-U.js";import"./linkedin-DeuNArME.js";import"./mail-DIM7-Uur.js";import"./file-text-BlHcyHb-.js";import"./target-BIU4lc4B.js";import"./ToolAllowanceChip-DpV-q-mI.js";import"./usage.functions-EBSqWXJF.js";import"./DemoVideo-CwAl5Odk.js";import"./dialog-B1BXKzKU.js";import"./index-D324aKeF.js";import"./index-Bk7P141l.js";import"./tool-demos-DgraiMJb.js";import"./check-DWkmcDeA.js";import"./useSubscription-C5ij1Ie9.js";import"./stripe-BL9TlFig.js";import"./useIsAdmin-_vVIyJqR.js";import"./lock-DY_q9bUw.js";import"./resume-source-hygiene-BnELtta6.js";import"./upload--hJlow_J.js";import"./index-D-fQwQV1.js";import"./index-CPuSwFTH.js";import"./folder-open-CvvqG1yO.js";import"./resume-profile.functions-Ce4qxuzL.js";import"./extension-auth-B_JeSTLN.js";import"./resume-tailor-versions.functions-CuykLTlY.js";import"./resume-tailor-version-arJFjEhY.js";import"./sparkles-BLWsg7Fk.js";import"./info-DBwFhE5P.js";import"./tracked-applications.functions-D9ru-dy2.js";import"./briefcase-Bth-ssxz.js";const Es=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],Ls=$e("mic-off",Es);const Ps=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],Ds=$e("volume-x",Ps),ge=600,As=600,$s=d=>{const u=Math.max(0,Math.floor(d)),g=Math.floor(u/60),w=u%60;return`${g}:${String(w).padStart(2,"0")}`},_s=d=>new Promise((u,g)=>{const w=new FileReader;w.onloadend=()=>u(String(w.result).split(",")[1]??""),w.onerror=g,w.readAsDataURL(d)}),qs=()=>{if(!(typeof MediaRecorder>"u"))return["audio/webm;codecs=opus","audio/webm","audio/mp4"].find(d=>MediaRecorder.isTypeSupported(d))};function Fs(){const d=[{role:"assistant",content:"Hello, I'm Sarah - your AI interviewer today. I've reviewed your resume and the job description for Customer Success Manager at Brightline Analytics. Let's get started. Walk me through a rollout that didn't land the adoption you expected. What did you do next?"},{role:"user",content:"Sure - at my last company I built a dashboard for our customer support team. We thought it would reduce ticket response time, but adoption was flat for the first two weeks. So I shadowed three agents for a day, realized the UI was too dense, stripped it to four KPIs, and saw daily active users jump from 12% to 78% within ten days."},{role:"assistant",content:"Great story. Follow-up: you mentioned stripping the UI down. How did you decide what to cut versus what to keep?"},{role:"user",content:"I ranked every widget by usage from our analytics and cut anything below 5% interaction. Then I validated the shortlist with the team lead before shipping."}];return e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs("div",{className:"rounded-xl border border-midnight/40 bg-card text-card-foreground overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap border-b border-midnight px-3 sm:px-4 py-2.5 bg-muted/30",children:[e.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground",children:"Sample session - no mic required"}),e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"♀ Sarah · 2 min read"})]}),e.jsx("div",{className:"p-5 space-y-3 max-h-[340px] overflow-y-auto",children:d.map((u,g)=>e.jsx("div",{className:`flex ${u.role==="user"?"justify-end":"justify-start"}`,children:e.jsx("div",{className:`max-w-[85%] rounded-lg px-3.5 py-2.5 text-sm leading-relaxed ${u.role==="user"?"bg-primary text-primary-foreground":"bg-muted border border-midnight/40"}`,children:u.content})},g))}),e.jsxs("div",{className:"border-t border-midnight p-5 bg-muted/20",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(fe,{className:"size-4 text-emerald-500"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-emerald-600",children:"Session scorecard preview"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-emerald-200/60 bg-emerald-50/40 p-2.5",children:[e.jsx(fe,{className:"size-4 text-emerald-500 shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold text-emerald-800",children:"STAR structure"}),e.jsx("div",{className:"text-[11px] text-emerald-700/80",children:"Clear situation → task → action → result framing."})]})]}),e.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-200/60 bg-amber-50/40 p-2.5",children:[e.jsx(Rs,{className:"size-4 text-amber-500 shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold text-amber-800",children:"Metric specificity"}),e.jsx("div",{className:"text-[11px] text-amber-700/80",children:'Mentioned "78%" but could strengthen with baseline comparison.'})]})]}),e.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-emerald-200/60 bg-emerald-50/40 p-2.5",children:[e.jsx(fe,{className:"size-4 text-emerald-500 shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold text-emerald-800",children:"Follow-up depth"}),e.jsx("div",{className:"text-[11px] text-emerald-700/80",children:"Showed prioritization framework and stakeholder validation."})]})]})]}),e.jsxs("div",{className:"mt-4 flex items-start gap-2 rounded-lg border border-blue-200/60 bg-blue-50/40 p-3",children:[e.jsx(Ts,{className:"size-4 text-blue-500 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-[11px] text-blue-800 leading-relaxed",children:"In a real session, Sarah adapts follow-ups to your answers, pushes on vague claims, and builds a full scorecard across clarity, structure, and substance. Your actual transcript gets scored line by line."})]})]})]})})}function Ot(){const{applicationId:d}=Xe.useSearch(),u=vs("mock_interview"),g=G(as),w=G(is),_e=G(ns),qe=G(os),[x,se]=a.useState(""),[N,te]=a.useState(""),[h,A]=a.useState(""),[I,S]=a.useState(""),[Fe,R]=a.use
2State(null),[Ve,re]=a.useState(!1),[k,ae]=a.useState("female"),[m,ie]=a.useState(),[l,$]=a.useState([]),[ne,_]=a.useState(null),[Y,q]=a.useState(null),[be,je]=a.useState(!1),[o,F]=a.useState(!1),[oe,ve]=a.useState(!1),[C,T]=a.useState(!1),[b,E]=a.useState(!1),[V,ye]=a.useState(!1),[L,Be]=a.useState(!0),[we,B]=a.useState(!1),H=a.useRef(null),M=a.useRef(null),O=a.useRef(null),K=a.useRef(null),[J,le]=a.useState(ge),X=a.useRef(!1),He=G(Ns),[Z,W]=a.useState("idle"),[ce,Ne]=a.useState(null),[Se,de]=a.useState("scorecard"),[We,ke]=a.useState(!1);a.useEffect(()=>{try{ke(localStorage.getItem("mockInterviewMicHintDismissed")==="1")}catch{}},[]),a.useEffect(()=>{o||(W("idle"),Ne(null),de("scorecard"))},[o,m]),a.useEffect(()=>{o&&de("scorecard")},[o]);const Ue=async()=>{const s=l[l.length-1];if(!s||s.role!=="assistant"){n.error("No scorecard available to save");return}W("saving");try{const r=await He({data:{role:x,company:N||null,applicationId:d??null,scorecard:s.content,messages:l}});Ne(r.id),W("saved")}catch(r){W("idle"),n.error(r instanceof Error?r.message:"Could not save scorecard")}};a.useEffect(()=>{try{const s=sessionStorage.getItem("mockInterviewHandoff");if(!s)return;const r=JSON.parse(s);if(!r.ts||Date.now()-r.ts>1800*1e3){sessionStorage.removeItem("mockInterviewHandoff");return}r.role&&se(r.role),r.company&&te(r.company),r.jobDescription&&A(r.jobDescription),r.resume&&S(r.resume),sessionStorage.removeItem("mockInterviewHandoff"),n.success("Loaded from Interview Prep")}catch{}},[]),a.useEffect(()=>()=>{try{H.current?.stop()}catch{}try{K.current?.pause()}catch{}M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),a.useEffect(()=>{O.current&&(O.current.scrollTop=O.current.scrollHeight)},[l,C]),a.useEffect(()=>{if(!m||o)return;const s=window.setInterval(()=>{le(r=>r>0?r-1:0)},1e3);return()=>window.clearInterval(s)},[m,o]),a.useEffect(()=>{J>0||!m||o||X.current||(X.current=!0,n.warning("Time's up - wrapping up your interview"),Ie(!0))},[J,m,o]);const P=()=>{try{K.current?.pause(),K.current=null}catch{}B(!1)},me=async s=>{if(L){P();try{B(!0);const r=await _e({data:{text:s,voice:k}}),t=new Audio(`data:audio/mpeg;base64,${r.audio}`);K.current=t,t.onended=()=>B(!1),t.onerror=()=>B(!1),t.readyState<4&&await new Promise((c,i)=>{t.addEventListener("canplaythrough",()=>c(),{once:!0}),t.addEventListener("error",()=>i(new Error("Audio failed to load")),{once:!0})}),await t.play()}catch(r){B(!1),n.error(r instanceof Error?r.message:"Voice playback failed")}}},Ge=async()=>{if(!navigator.mediaDevices?.getUserMedia){n.error("Microphone access isn't available in this browser or connection.");return}if(typeof MediaRecorder>"u"){n.error("Voice recording isn't supported in this browser.");return}if(b){try{H.current?.stop()}catch{}return}P();try{const s=await navigator.mediaDevices.getUserMedia({audio:!0}),r=[],t=qs(),c=new MediaRecorder(s,t?{mimeType:t}:void 0);c.ondataavailable=i=>{i.data.size>0&&r.push(i.data)},c.onerror=()=>{s.getTracks().forEach(i=>i.stop()),E(!1),n.error("Microphone recording failed. Please try again.")},c.onstop=async()=>{if(s.getTracks().forEach(i=>i.stop()),M.current!==null&&(window.clearTimeout(M.current),M.current=null),E(!1),!!r.length)try{ye(!0);const i=new Blob(r,{type:c.mimeType||"audio/webm"});if(i.size<2048){n.error("No audio was captured. Check that this site has microphone access and that the right microphone is selected, then try again.");return}const U=await _s(i),D=((await qe({data:{audioBase64:U,mimeType:i.type}})).text??"").trim();console.info(`[mock-interview] recorded ${i.size} bytes (${i.type}) → ${D.length} chars transcribed`);const p=D.replace(/\([^)]*\)/g,"").replace(/\[[^\]]*\]/g,"").replace(/\*[^*]*\*/g,"").replace(/\s+/g," ").trim(),ue=p.replace(/[^a-zA-Z]/g,"");if(!D||!p||ue.length<3||p.split(/\s+/).length<2){n.error("I couldn't hear a clear response. Please try answering again.");return}await Ye(p)}catch(i){n.error(i instanceof Error?i.message:"Could not transcribe your answer")}finally{ye(!1)}},H.current=c,c.start(),E(!0),M.current=window.setTimeout(()=>{try{c.state==="recording"&&(n.warning("Answer capped at 10 minutes - wrapping up"),c.stop())}catch(i){}},As*1e3)}catch(s){E(!1);const r=s instanceof DOMException?s.name:"";r==="NotAllowedError"||r==="SecurityError"?n.error("Microphone blocked. Allow mic access in your browser settings and try again."):r==="NotFoundError"?n.error("No microphone was detected."):r==="NotReadableError"?n.error("Microphone is in use by another app. Close it and try again."):n.error("Could not start microphone.")}},Qe=async()=>
2{if(!x.trim())return n.error("Enter a role to interview for");if(!h.trim())return n.error("Job description is required");if(!I.trim())return n.error("Your resume is required");T(!0);const s=performance.now();console.info("[mock-interview] start: requesting opener");try{const r=g({data:{role:x,company:N,jobDescription:h,resume:I,voice:k,applicationId:d,messages:[{role:"user",content:"Let's begin. Please introduce yourself and ask me the first question."}]}}),t=await Promise.race([r,new Promise((i,U)=>setTimeout(()=>U(new Error("Setup timed out after 35s - please try again.")),35e3))]);console.info(`[mock-interview] opener received in ${Math.round(performance.now()-s)}ms`),ie(t.sessionId),_(t.questionsRemaining),q(t.maxQuestions),F(!1),le(ge),X.current=!1;const c={role:"assistant",content:t.reply};$([{role:"user",content:"Let's begin."},c]),me(t.reply)}catch(r){console.error(`[mock-interview] opener failed after ${Math.round(performance.now()-s)}ms`,r),n.error(r instanceof Error?r.message:"Failed")}finally{T(!1)}},Ye=async s=>{if(!s.trim())return;if(b){try{H.current?.stop()}catch{}E(!1)}const r=[...l,{role:"user",content:s}];$(r),T(!0);try{const t=await g({data:{sessionId:m,role:x,company:N,jobDescription:h,resume:I,voice:k,messages:r,applicationId:d}});ie(t.sessionId),_(t.questionsRemaining),q(t.maxQuestions),F(t.ended??!1),$([...r,{role:"assistant",content:t.reply}]),t.ended||me(t.reply)}catch(t){n.error(t instanceof Error?t.message:"Failed")}finally{T(!1)}},Ie=async(s=!1)=>{if(!(!m||o||oe)&&!(!s&&!confirm("End the interview now and get your scorecard?"))){if(b){try{H.current?.stop()}catch{}E(!1)}P(),ve(!0),T(!0);try{const r=await g({data:{sessionId:m,role:x,company:N,jobDescription:h,resume:I,voice:k,messages:l,endNow:!0,applicationId:d}});_(r.questionsRemaining),q(r.maxQuestions),F(!0),$([...l,{role:"assistant",content:r.reply}])}catch(r){n.error(r instanceof Error?r.message:"Could not end interview")}finally{T(!1),ve(!1)}}},Oe=async()=>{if(m){je(!0);try{const s=await w({data:{sessionId:m}});_(s.questionsRemaining),q(s.maxQuestions),F(!1),le(ge),X.current=!1,n.success("Interview extended - 5 more questions unlocked")}catch(s){n.error(s instanceof Error?s.message:"Failed to extend")}finally{je(!1)}}},Ce=s=>{P(),me(s)},Ke=async()=>{const{jsPDF:s}=await rs(async()=>{const{jsPDF:v}=await import("./jspdf.es.min-C1mM0ctz.js").then(y=>y.j);return{jsPDF:v}},__vite__mapDeps([0,1])),r=new s({unit:"pt",format:"letter"}),t=r.internal.pageSize.getWidth(),c=r.internal.pageSize.getHeight(),i=54,U=t-i*2;let j=i;const D=v=>{j+v>c-i&&(r.addPage(),j=i)},p=(v,y)=>{r.setFont("helvetica",y.bold?"bold":"normal"),r.setFontSize(y.size),r.setTextColor(...y.color??[20,20,20]);const pe=r.splitTextToSize(v,U),Me=y.size*1.35;for(const Je of pe)D(Me),r.text(Je,i,j),j+=Me;j+=y.gap??6};p("Mock Interview Transcript",{size:18,bold:!0,gap:10}),p(`Role: ${x}`,{size:11,color:[80,80,80],gap:2}),N&&p(`Company: ${N}`,{size:11,color:[80,80,80],gap:2}),p(`Date: ${new Date().toLocaleString()}`,{size:11,color:[80,80,80],gap:14}),r.setDrawColor(220),D(20),r.line(i,j,t-i,j),j+=16;for(const v of l){const y=v.role==="user"?"You":"Interviewer",pe=v.role==="user"?[30,80,160]:[20,20,20];p(y,{size:11,bold:!0,color:pe,gap:2}),p(v.content,{size:11,gap:12})}const ue=x.replace(/[^a-z0-9]+/gi,"-").toLowerCase()||"interview";r.save(`mock-interview-${ue}-${Date.now()}.pdf`)};return e.jsxs(cs,{toolKey:"mock-interview",title:"Mock Interview Simulator",description:"Practice a role-specific mock interview using your target job description and resume. Answer questions out loud, get feedback, and see what to improve before the real interview.",whatYouGet:["Role-specific interview questions","Voice-based practice","Per-answer feedback","Final scorecard"],children:[e.jsx(ys,{applicationId:d,onLoaded:s=>{x||se(s.job_title),N||te(s.company),!h&&s.job_description&&A(s.job_description),!I&&s.resume?.content&&(S(s.resume.content),R({id:s.resume.id,title:s.resume.title,source:s.resume.source}))}}),e.jsxs("div",{className:"mb-4 rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 px-3 py-2 flex items-center gap-2 text-xs",children:[e.jsx(Cs,{className:"size-3.5 shrink-0"}),e.jsxs("span",{className:"leading-snug",children:[e.jsx("span",{className:"font-semibold",children:"Practice tool."})," CareerPlatform helps you prepare before the interview. We do not assist during live interviews."," ",e.jsx(ee,{to:"/ethical-ai",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-emerald-900 dark:hover:text-emerald-100",children:"Read our ethics pledge"})]})]}),!m&&e.jsx(ds,{steps:["Add job details","Choose interviewer voice","Start practice and get feedback"]}),e.jsx(ms,{tool:"mock_interview",preview:e.jsx(Fs,{}),children:m?e.jsxs("div",{className:`border border-midnight/40 bg-card text-card-foreground rounded-lg flex flex-col ${o&&Se==="scorecard"?"min-h-[70vh]":"h-[70vh]"}`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap border-b border-midnight px-3 sm:px-4 py-2 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-2 min-w-0 flex-1 sm:flex-none",children:[we&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-primary animate-pulse",children:[e.jsx(Ae,{className:"size-3"})," Interviewer speaking…"]}),V&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-amber-400 animate-pulse",children:[e.jsx(z,{className:"size-3 animate-spin"})," Transcribing…"]}),b&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-emerald-400 animate-pulse",children:[e.jsx(he,{className:"size-3"})," Listening… speak your answer"]}),!we&&!b&&!V&&e.jsx("span",{className:"truncate",children:"Press the mic to speak your answer"})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:[Y!==null&&ne!==null&&e.jsxs("span",{className:"px-2 text-xs text-muted-foreground",children:["Q ",Y-ne,"/",Y]}),!o&&e.jsx("span",{className:`px-2 text-xs font-mono tabular-nums ${J<=60?"text-destructive font-semibold":"text-muted-foreground"}`,title:"Session auto-ends at 0:00",children:$s(J)}),!o&&e.jsxs(f,{type:"button",variant:"ghost",size:"sm",onClick:()=>Ie(!1),disabled:oe||C||l.filter(s=>s.role==="user").length<2,className:"h-7 gap-1 text-destructive hover:text-destructive px-2",title:"End interview now and get your scorecard",children:[oe?e.jsx(z,{className:"size-3 animate-spin"}):e.jsx(ls,{className:"size-3"}),e.jsx("span",{className:"hidden sm:inline",children:"End interview"}),e.jsx("span",{className:"sm:hidden",children:"End"})]}),e.jsx(f,{type:"button",variant:"ghost",size:"sm",onClick:()=>ae(k==="female"?"male":"female"),className:"h-7 gap-1 px-2",title:"Switch voice",children:k==="female"?"♀ Sarah":"♂ George"}),e.jsxs(f,{type:"button",variant:"ghost",size:"sm",onClick:()=>{L&&P(),Be(!L)},className:"h-7 gap-1 px-2",title:L?"Voice on - tap to mute":"Voice off - tap to enable",children:[L?e.jsx(Ae,{className:"size-3"}):e.jsx(Ds,{className:"size-3"}),e.jsx("span",{className:"hidden sm:inline",children:L?"Voice on":"Voice off"})]})]})]}),o?e.jsxs(Ze,{value:Se,onValueChange:s=>de(s),className:"flex-1 flex flex-col min-h-0",children:[e.jsx("div",{className:"border-b border-midnight px-3 sm:px-4 pt-3",children:e.jsxs(es,{children:[e.jsx(Te,{value:"scorecard",children:"Scorecard"}),e.jsx(Te,{value:"transcript",children:"Transcript"})]})}),e.jsx(Ee,{value:"scorecard",className:"flex-1 p-6 mt-0",children:(()=>{const s=l[l.length-1],r=s&&s.role==="assistant"?s.content:"";return e.jsx("div",{className:"max-w-3xl mx-auto text-sm leading-relaxed space-y-3",children:e.jsx(xe,{components:{h1:({children:t})=>e.jsx("h1",{className:"text-xl font-bold mt-4 mb-2",children:t}),h2:({children:t})=>e.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground mt-6 mb-2 border-b border-midnight/40 pb-1",children:t}),h3:({children:t})=>e.jsx("h3",{className:"text-base font-semibold mt-4 mb-1.5",children:t}),p:({children:t})=>e.jsx("p",{className:"my-2",children:t}),ul:({children:t})=>e.jsx("ul",{className:"list-disc pl-5 my-2 space-y-1.5",children:t}),ol:({children:t})=>e.jsx("ol",{className:"list-decimal pl-5 my-2 space-y-1.5",children:t}),li:({children:t})=>e.jsx("li",{className:"leading-relaxed",children:t}),strong:({children:t})=>e.jsx("strong",{className:"font-semibold text-foreground",children:t}),em:({children:t})=>e.jsx("em",{className:"italic",children:t})},children:r})})})()}),e.jsx(Ee,{value:"transcript",className:"flex-1 overflow-y-auto p-6 space-y-4 mt
2-0",children:l.map((s,r)=>e.jsx("div",{className:`flex ${s.role==="user"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[80%] rounded-lg px-4 py-2.5 text-sm ${s.role==="user"?"bg-primary text-primary-foreground whitespace-pre-wrap":"bg-card text-card-foreground border border-midnight/40 relative group"}`,children:[s.role==="assistant"?e.jsx("div",{className:"text-sm leading-relaxed space-y-2",children:e.jsx(xe,{components:{h2:({children:t})=>e.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground mt-4 mb-1.5",children:t}),p:({children:t})=>e.jsx("p",{className:"my-1.5",children:t}),ul:({children:t})=>e.jsx("ul",{className:"list-disc pl-5 my-1.5 space-y-1",children:t}),ol:({children:t})=>e.jsx("ol",{className:"list-decimal pl-5 my-1.5 space-y-1",children:t}),li:({children:t})=>e.jsx("li",{className:"leading-relaxed",children:t}),strong:({children:t})=>e.jsx("strong",{className:"font-semibold text-foreground",children:t})},children:s.content})}):s.content,s.role==="assistant"&&r!==l.length-1&&e.jsx("button",{type:"button",onClick:()=>Ce(s.content),className:"absolute -right-8 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded-md hover:bg-muted",title:"Replay",children:e.jsx(Pe,{className:"size-3 text-primary"})})]})},r))})]}):e.jsxs("div",{ref:O,className:"flex-1 overflow-y-auto p-6 space-y-4",children:[l.map((s,r)=>e.jsx("div",{className:`flex ${s.role==="user"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[80%] rounded-lg px-4 py-2.5 text-sm ${s.role==="user"?"bg-primary text-primary-foreground whitespace-pre-wrap":"bg-card text-card-foreground border border-midnight/40 relative group"}`,children:[s.role==="assistant"?e.jsx("div",{className:"text-sm leading-relaxed space-y-2",children:e.jsx(xe,{components:{h1:({children:t})=>e.jsx("h1",{className:"text-base font-semibold mt-3 mb-1.5",children:t}),h2:({children:t})=>e.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground mt-4 mb-1.5",children:t}),h3:({children:t})=>e.jsx("h3",{className:"text-sm font-semibold mt-3 mb-1",children:t}),p:({children:t})=>e.jsx("p",{className:"my-1.5",children:t}),ul:({children:t})=>e.jsx("ul",{className:"list-disc pl-5 my-1.5 space-y-1",children:t}),ol:({children:t})=>e.jsx("ol",{className:"list-decimal pl-5 my-1.5 space-y-1",children:t}),li:({children:t})=>e.jsx("li",{className:"leading-relaxed",children:t}),strong:({children:t})=>e.jsx("strong",{className:"font-semibold text-foreground",children:t}),em:({children:t})=>e.jsx("em",{className:"italic",children:t}),code:({children:t})=>e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs font-mono",children:t}),a:({href:t,children:c})=>e.jsx("a",{href:t,className:"text-primary underline underline-offset-2",target:"_blank",rel:"noreferrer",children:c})},children:s.content})}):s.content,s.role==="assistant"&&!(o&&r===l.length-1)&&e.jsx("button",{type:"button",onClick:()=>Ce(s.content),className:"absolute -right-8 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded-md hover:bg-muted",title:"Replay",children:e.jsx(Pe,{className:"size-3 text-primary"})})]})},r)),C&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsx(z,{className:"size-3 mr-1 inline animate-spin"}),"Thinking…"]})]}),o||ne===0?e.jsxs("div",{className:"border-t border-midnight p-4 space-y-3 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:o?"Interview ended. Your full scorecard is in the Scorecard tab above. Continue for 1 credit to unlock 5 more questions, or start a new interview.":`You've completed all ${Y} questions in this interview. Continue for 1 additional credit to unlock 5 more.`}),o&&e.jsxs("div",{className:"rounded-md border border-primary/30 bg-primary/5 p-3 flex flex-wrap items-center justify-between gap-2 text-left",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold",children:"Review Interview Prep"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Generate fresh STAR answer guidance based on the gaps surfaced in your scorecard."})]}),e.jsx(f,{asChild:!0,size:"sm",variant:"outline",children:e.jsx(ee,{to:"/tools/interview-prep",children:"Generate Interview Prep"})})]}
2),o&&Z!=="dismissed"&&e.jsx("div",{className:"rounded-md border border-amber-300/60 bg-amber-50/60 p-3 flex flex-wrap items-center justify-between gap-3 text-left",children:Z==="saved"?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-emerald-700",children:[e.jsx(ss,{className:"size-4 fill-emerald-500 text-emerald-500"}),e.jsx("span",{children:"Saved to your Interview Library ✓"}),e.jsxs(ee,{to:ce?"/dashboard/interview-library/$id":"/dashboard/interview-library",params:ce?{id:ce}:void 0,className:"text-primary font-semibold hover:underline inline-flex items-center gap-1",children:["View library ",e.jsx(Le,{className:"size-3"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(Ms,{className:"size-4 text-amber-700 shrink-0"}),e.jsx("p",{className:"text-sm font-semibold text-amber-900",children:"Save this scorecard to your Interview Library?"})]}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsx(f,{size:"sm",onClick:Ue,disabled:Z==="saving",children:Z==="saving"?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"size-3.5 mr-1.5 animate-spin"}),"Saving…"]}):"Save to library"}),e.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-2",onClick:()=>W("dismissed"),children:"Dismiss"})]})]})}),e.jsxs("div",{className:"flex justify-center gap-2 flex-wrap",children:[e.jsxs(f,{variant:"secondary",onClick:Ke,className:"flex-1 sm:flex-none min-w-0",children:[e.jsx(zs,{className:"size-4 mr-2"}),e.jsx("span",{className:"truncate",children:"Download transcript"})]}),e.jsx(Ss,{defaultText:`Just finished a mock interview on CareerPlatform.io - full scorecard on clarity, structure, and substance. 🎤
3
4If you've got interviews coming up, practising out loud changes everything.`}),e.jsx(f,{onClick:Oe,disabled:be,className:"flex-1 sm:flex-none min-w-0",children:be?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"size-4 mr-2 animate-spin"}),"Extending…"]}):e.jsxs("span",{className:"truncate",children:[e.jsx("span",{className:"hidden sm:inline",children:"Continue (1 credit, +5 questions)"}),e.jsx("span",{className:"sm:hidden",children:"+5 questions (1 credit)"})]})}),e.jsx(f,{variant:"outline",onClick:()=>{P(),ie(void 0),$([]),_(null),q(null),F(!1)},className:"flex-1 sm:flex-none min-w-0",children:e.jsxs("span",{className:"truncate",children:[e.jsx("span",{className:"hidden sm:inline",children:"Start new interview"}),e.jsx("span",{className:"sm:hidden",children:"New interview"})]})})]}),e.jsx(ks,{toolKey:"mock",tips:[...Is.mock],resultKey:m})]}):e.jsx("div",{className:"border-t border-midnight p-4 flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(f,{type:"button",onClick:Ge,disabled:C||V,variant:b?"default":"outline",className:`h-14 w-14 rounded-full ${b?"animate-pulse":""}`,title:b?"Stop recording":V?"Transcribing answer":"Start voice input",children:V?e.jsx(z,{className:"size-6 animate-spin"}):b?e.jsx(Ls,{className:"size-6"}):e.jsx(he,{className:"size-6"})}),e.jsx("p",{className:"hidden sm:block text-xs text-muted-foreground",children:"Click to start speaking · Click again to send your answer."}),!We&&e.jsxs("div",{className:"sm:hidden flex items-center gap-1.5 rounded-full bg-primary/10 px-3 py-1.5 text-[11px] text-primary",children:[e.jsx("span",{children:"Click to speak, click again to send."}),e.jsx("button",{type:"button","aria-label":"Dismiss hint",className:"inline-flex items-center justify-center rounded-full p-0.5 hover:bg-primary/20",onClick:()=>{ke(!0);try{localStorage.setItem("mockInterviewMicHintDismissed","1")}catch{}},children:e.jsx(ts,{className:"size-3"})})]})]})})]}):e.jsxs("div",{className:"grid lg:grid-cols-2 gap-6 items-stretch",children:[e.jsxs("div",{className:"border border-midnight/40 bg-card text-card-foreground rounded-lg p-6 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsxs(Q,{htmlFor:"role",className:"flex items-center gap-1",children:["Role",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(De,{id:"role",value:x,onChange:s=>se(s.target.value),placeholder:"Customer Success Manager",maxLength:200})]}),e.jsxs("div",{children:[e.jsx(Q,{htmlFor:"company",className:"flex items-center gap-1",children:"Company (optional)"}),e.jsx(De,{id:"company",value:N,onChange:s=>te(s.target.value),placeholder:"e.g. Northwind Analytics",maxLength:200})]})]}),e.jsxs("div",{children:[e.jsxs(Q,{htmlFor:"jd",className:"mb-1 flex items-center gap-1",children:["Target job description",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ze,{id:"jd",value:h,onChange:s=>A(s.target.value),placeholder:"Paste the full target job description - required for tailored questions and answers",rows:6,maxLength:Re.jobDescription,required:!0}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[h.length,"/8000 - the more detail, the more tailored your questions."]})]}),e.jsxs("div",{children:[e.jsxs(Q,{htmlFor:"res",className:"flex items-center gap-1",children:["Your resume",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5 mb-2",children:[e.jsx(us,{onText:s=>{S(s),R(null)},onMultiColumn:re}),e.jsx(hs,{onLoad:s=>{S(s),R(null)},onLoadJd:s=>{h.trim()||A(s)}}),e.jsx(fs,{onLoad:s=>{S(s),R(null)}}),e.jsx(bs,{applicationId:d,onLoad:(s,r,t)=>{S(s),R(null),t&&!h.trim()&&A(t)}}),e.jsx(gs,{className:"ml-1"})]}),e.jsx(ws,{meta:Fe,onDismiss:()=>R(null)}),e.jsx(xs,{show:Ve,onDismiss:()=>re(!1)}),e.jsx(ps,{onText:S,onMultiColumn:re,children:e.jsx(ze,{id:"res",value:I,onChange:s=>S(s.target.value),placeholder:"Paste, upload, or drop your resume (PDF, DOCX, TXT)",rows:10,maxLength:Re.resume,required:!0})})]})]}),e.jsxs("div",{className:"border border-midnight/40 bg-card text-card-foreground rounded-lg p-6 flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx(Q,{className:"mb-2 block",children:"Interviewer voice"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>ae("female"),className:`text-left rounded-md border p-3 transition-colors ${k==="female"?"border-primary bg-primary/10":"border-midnight hover:border-primary/50"}`,children:[e.jsx("div",{className:"text-sm font-semibold",children:"Sarah"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Warm and conversational"})]}),e.jsxs("button",{type:"button",onClick:()=>ae("male"),className:`text-left rounded-md border p-3 transition-colors ${k==="male"?"border-primary bg-primary/10":"border-midnight hover:border-primary/50"}`,children:[e.jsx("div",{className:"text-sm font-semibold",children:"George"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Direct and structured"})]})]})]}),e.jsxs("div",{className:"mt-auto space-y-3",children:[e.jsx(f,{onClick:Qe,className:"w-full bg-blue-600 text-white hover:bg-blue-700 font-semibold",disabled:C||!x||!h.trim()||!I.trim(),size:"lg",children:C?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"size-4 mr-2 animate-spin"}),"Starting…"]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"size-4 mr-2"}),"Start Interview"]})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Your mock interview may take a moment to prepare. Keep this page open while CareerPlatform creates your session."})]})]}),e.jsx(js,{loading:C&&l.length===0,defaultMessage:"Setting up your interview...",steps:[{label:"Reading resume and job description"},{label:"Generating interview questions",estimate:"~20 sec"},{label:"Setting up your session",estimate:"~10 sec"}]})]})}),u!==null&&u<=2&&e.jsxs("div",{className:"mt-6 rounded-lg border border-border bg-muted/20 p-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Need more interview prep 
4sessions? The Interview Prep Pack gives you 20 prep sessions and 4 mock interviews for $15.99 - no subscription."}),e.jsxs(ee,{to:"/pricing",className:"mt-2 inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",children:["View Interview Prep Pack",e.jsx(Le,{className:"size-3.5"})]})]})]})}export{Ot as component};

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.