1import{a as Ve,a2 as Xe,u as Ze,b as he,c as s,ce as et,w as be,ca as tt,j as e,a7 as ge,i as rt}from"./index-B9q78oLf.js";import{b as at,d as nt}from"./mockInterviewApi-Blq3nKMM.js";import{c as _e}from"./mockInterviewDashboardUtils-BtKpAHUU.js";const E=289,st=80,lt=5e3,ot=36,ve=[{key:"introduction",label:"Introduction"},{key:"technical",label:"Technical"},{key:"behavioral",label:"Behavioural"}],ye=[{value:"irrelevant",label:"Irrelevant:",desc:"The answer didn't address my question or intent."},{value:"unclear",label:"Unclear:",desc:"The explanation was vague, confusing, or hard to follow."},{value:"generic",label:"Generic:",desc:"The answer was too broad or lacked depth for my use case."},{value:"incomplete",label:"Incomplete:",desc:"The answer missed important details or only partially covered the question."},{value:"other",label:"",desc:"Other reasons"}],we=({flipped:t=!1}={})=>e.jsx("svg",{className:"w-[1em] h-[1em] align-middle",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:t?{transform:"scaleY(-1)"}:void 0,children:e.jsx("path",{d:"M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm3.5 0 4.09-8.18a1 1 0 0 1 1.32-.46l.14.08A2.5 2.5 0 0 1 17 3.62V9h3.5a2 2 0 0 1 1.98 2.3l-1.29 8A2 2 0 0 1 19.2 21H10.5z"})}),V=t=>{if(!t)return null;const a=String(t).split(/\s[ââ-]\s/);return a.length>=2?e.jsxs(e.Fragment,{children:[e.jsx("b",{children:a[0]})," â ",a.slice(1).join(" â ")]}):t},je=({color:t})=>e.jsx("span",{className:"mir-list-bullet mt-[8px] shrink-0 rounded-full",style:{display:"inline-block",width:6,height:6,backgroundColor:t},"aria-hidden":!0}),it=t=>{if(!t||String(t).startsWith("0001-01-01"))return null;try{const a=new Date(t);if(Number.isNaN(a.getTime()))return null;const l=a.toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}),i=a.toLocaleTimeString("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1});return{datePart:l,timePart:i}}catch{return null}},Ne=t=>{if(!t||Number.isNaN(t))return"0:00";const a=Math.floor(t/60),l=Math.floor(t%60);return`${a}:${l<10?"0":""}${l}`},ct=()=>typeof document>"u"?"":Array.from(document.styleSheets).map(t=>{try{return Array.from(t.cssRules||[]).map(a=>a.cssText).join(` 2`)}catch{return""}}).join(` 3`),dt=t=>String(t||"candidate").trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"_")||"candidate",xt=async(t,a)=>{const l=navigator.userAgent||"",i=/Android|iPhone|iPad|iPod/i.test(l),p=/iPad|iPhone|iPod/i.test(l);if(i&&typeof navigator.canShare=="function")try{const d=new File([t],a,{type:"application/pdf"});if(navigator.canShare({files:[d]})){await navigator.share({files:[d],title:a});return}}catch(d){if(d?.name==="AbortError")return}const f=URL.createObjectURL(t);try{if(p&&window.open(f,"_blank","noopener,noreferrer"))return;const d=document.createElement("a");d.href=f,d.download=a,d.rel="noopener",document.body.appendChild(d),d.click(),d.remove()}finally{setTimeout(()=>URL.revokeObjectURL(f),p?6e4:2e3)}},pt=t=>{const a=t.cloneNode(!0);return a.querySelectorAll("[data-pdf-hide]").forEach(l=>l.remove()),`<!DOCTYPE html> 4<html lang="en"> 5<head> 6 <meta charset="UTF-8" /> 7 <meta name="viewport" content="width=820" /> 8 <title>Interview report</title> 9 <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet" /> 10 <style> 11 ${ct()} 12 html, body { background: #fff; margin: 0; } 13 body { width: 820px; margin: 0 auto; font-family: Poppins, sans-serif; } 14 .mir-list-bullet { 15 display: inline-block !important; 16 width: 6px !important; 17 height: 6px !important; 18 border-radius: 999px !important; 19 flex-shrink: 0 !important; 20 -webkit-print-color-adjust: exact !important; 21 print-color-adjust: exact !important; 22 } 23 </style> 24</head> 25<body> 26 ${a.outerHTML} 27</body> 28</html>`};function ut(t){const a=String(t||"").trim();if(!a)return"?";const l=a.split(/\s+/);return l.length===1?l[0].charAt(0).toUpperCase():(l[0].charAt(0)+l[l.length-1].charAt(0)).toUpperCase()}const X=t=>{if(t==null)return null;const a=t<=10?t*10:t;return a>=80?"Senior":a>=60?"Mid level":a>=40?"Junior":"Inexperienced"},ft=t=>t>=80?{label:"Proficient",isPass:!0}:t>=60?{label:"Intermediate",isPass:!0}:t>=40?{label:"Junior",isPass:!1}:{label:"Inexperienced",isPass:!1},mt=t=>t<40?"text-[#ef4444]":t<60?"text-[#ca8a04]":t<80?"text-[#6366f1]":"text-[#059669]",ht=t=>{const a=(_e(t)||"").toLowerCase();return a.includes("proficient")?{bar:"bg-[#0a7d59]",text:"text-[#0a7d59]"}:a.includes("intermediate")?{bar:"bg-[#6d28d9]",text:"text-[#6d28d9]"}:a.includes("junior")?{bar:"bg-[#a8690d]",text:"text-[#a8690d]"}:a.includes("inexperienced")?{bar:"bg-[#867e94]",text:"text-[#867e94]"}:{bar:"bg-[#aaa2b6]",text:"text-[#1f1933]"}},ke=(t="")=>{const a=t.toLowerCase();return a.includes("salary")||a.includes("notice period")||a.includes("location")||a.includes("current location")},bt=t=>{const a=X(t);return a==="Senior"?"bg-[#eaf5ef] text-[#0a7d59]":a==="Mid level"?"bg-[#f4eefc] text-[#6d28d9]":a==="Junior"?"bg-[#f9f1e2] text-[#a8690d]":"bg-[#f6f5f9] text-[#867e94]"},gt=t=>!t||typeof t!="object"?!1:["introduction","technical","situational","behavioral_cultural_fit"].some(a=>Array.isArray(t[a])&&t[a].length>0),Se=t=>t?t.data&&(t.msg==="success"||t.msg==="successfully fetched"||t.msg==="Success")?t.data:t.full_name||t.report||t.qa_metadata||t.ai_ans_meta_data?t:null:null,Z=t=>!Array.isArray(t)||t.length===0?null:{introduction:t.map(a=>({question:a?.question||a?.ques||"",answer:a?.answer||a?.ans||"",reason:a?.reason||a?.feedback||"",score:a?.score}))},Te=t=>{if(!t)return null;const a=t.report&&!Array.isArray(t.report)&&typeof t.report=="object"?t.report:null,l=a?.report||(Array.isArray(t.report)?t.report:[]),i=Array.isArray(l)?l:[],p=Math.round(a?.overall_percentage??t.overall_percentage??t.overall_score??0),f=a?.strengths??t.strengths??[],d=a?.weaknesses??t.weaknesses??[],h=a?.report_summary??t.report_summary??a?.overall_feedback??t.overall_feedback??"";return{fullName:t.full_name||"Candidate",jobTitle:t.job_title?.t
28itle||t.job_title||"",experienceYears:t.years_of_experience||t.experience_years||null,reportGeneratedAt:a?.report_generated_at??t.report_generated_at??t.interview_taken_at,overallPercentage:p,overallAssessment:_e(p),percentile:t.percentile_rank||t.candidate_percentile||null,summary:h,strengths:Array.isArray(f)?f:[],weaknesses:Array.isArray(d)?d:[],metrics:i.map(m=>({name:m.metric||m.name||"Metric",score:Math.round((m.score<=10?m.score*10:m.score)||0),reason:m.reason||""})),qaMetadata:t.qa_metadata||Z(t.ai_ans_meta_data),audioPath:t.conv_interview_audio||null,location:t.location||t.current_location||null,noticePeriod:t.notice_period||null,currentSalary:t.current_salary||null,expectedSalary:t.expected_salary||null,interviewDuration:t.interview_duration||t.duration||null}},vt=(t,a)=>{if(!t)return{lead:a.length?"Interview completed â see strengths and areas to probe below.":"Your interview report is ready.",leadSub:""};const l=t.match(/[^.!?]+[.!?]+/g)||[t];return l.length>=2?{lead:l[0].trim(),leadSub:l.slice(1).join(" ").trim()}:a.length?{lead:t.trim(),leadSub:typeof a[0]=="string"?a[0]:""}:{lead:t.trim(),leadSub:""}},M=t=>t?[...t.situational||[],...t.behavioral_cultural_fit||[]]:[],yt=async(t,a)=>{try{const l=await at(t,a),i=Se(l);if(i&&$(i))return i}catch{}return null},wt=async(t,a)=>{try{const l=await nt(t,a),i=Se(l)||l?.data;if(i&&$(i))return i}catch{}return null},$=t=>{const a=Te(t);return a?a.metrics.length>0||a.overallPercentage>0||!!a.summary||a.strengths.length>0||a.weaknesses.length>0||gt(a.qaMetadata)||Array.isArray(t.ai_ans_meta_data)&&t.ai_ans_meta_data.length>0:!1};function jt({score:t,animated:a}){const[l,i]=s.useState(0),p=s.useRef(null);return s.useEffect(()=>{if(!a){i(t),p.current&&(p.current.style.strokeDashoffset=`${E*(1-t/100)}`);return}const f=p.current;f&&requestAnimationFrame(()=>{f.style.transition="stroke-dashoffset 1.2s cubic-bezier(.2,.7,.2,1)",f.style.strokeDashoffset=`${E*(1-t/100)}`});const d=performance.now(),h=m=>{const N=Math.min(1,(m-d)/1100);i(Math.round(t*N)),N<1&&requestAnimationFrame(h)};requestAnimationFrame(h)},[t,a]),e.jsxs("div",{className:"relative w-[116px] h-[116px]",children:[e.jsxs("svg",{width:"116",height:"116",viewBox:"0 0 116 116",children:[e.jsx("circle",{cx:"58",cy:"58",r:"46",fill:"none",stroke:"#e9eef0",strokeWidth:"9"}),e.jsx("circle",{ref:p,cx:"58",cy:"58",r:"46",fill:"none",stroke:"url(#mir-sg)",strokeWidth:"9",strokeLinecap:"round",strokeDasharray:E,strokeDashoffset:E,transform:"rotate(-90 58 58)"}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:"mir-sg",x1:"0",y1:"0",x2:"1",y2:"1",children:[e.jsx("stop",{offset:"0",stopColor:"#34d399"}),e.jsx("stop",{offset:"1",stopColor:"#0a7d59"})]})})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsx("b",{className:"font-poppins text-[36px] font-semibold leading-[0.8] text-[#0a7d59]",children:l}),e.jsx("small",{className:"text-[11px] text-[#aaa2b6] font-semibold mt-[3px]",children:"/100"})]})]})}function St(){const{interview_room_id:t}=Ve(),a=Xe(),l=Ze(),i=he(r=>r.auth.token),p=he(r=>r.applicantProfile?.data),f=[p?.first_name,p?.last_name].filter(Boolean).join(" ").trim()||p?.name?.trim()||"",d=ut(f),h=a.state?.jobTitle||"",m=a.state?.useLegacyFallback===!0,[N,q]=s.useState(null),[Ce,b]=s.useState(!0),[Ae,k]=s.useState(!1),[ee,F]=s.useState(null),[_,g]=s.useState("introduction"),[S,I]=s.useState(!1),[Pe,Re]=s.useState(""),[Me,te]=s.useState(!1),[Fe,B]=s.useState(!1),[z,re]=s.useState(!1),[Ie,ae]=s.useState(0),[Le,De]=s.useState(0),w=s.useRef(null),U=s.useRef(null),T=s.useRef(0),C=s.useRef(null),[L,ne]=s.useState(!1),[Ee,se]=s.useState(null),[A,le]=s.useState(""),[G,O]=s.useState(""),[$e,qe]=s.useState(!1),[v,oe]=s.useState(!1),[ie,W]=s.useState(""),n=s.useMemo(()=>Te(N),[N]),P=n?.jobTitle||h||"Interview",{lead:Be,leadSub:ce}=s.useMemo(()=>vt(n?.summary,n?.weaknesses||[]),[n]),ze=s.useMemo(()=>Array.from({length:56},(r,o)=>18+Math.abs(Math.sin(o*.5))*65+Math.random()*12),[]),H=s.useMemo(()=>n?.qaMetadata?ve.filter(({key:r})=>r==="behavioral"?M(n.qaMetadata).length>0:(n.qaMetadata[r]||[]).length>0):[],[n]),j=s.useCallback((r,o)=>Array.isArray(o)?o.map(u=>({...u||{},__sectionKey:r})):[],[]),de=s.useMemo(()=>n?.qaMetadata?_==="behavioral"?j("behavioral",M(n.qaMetadata)):j(_,n.qaMetadata[_]||[]):[],[n,_,j]),xe=s.useMemo(()=>n?.qaMetadata?ve.flatMap(({key:r})=>r==="behavioral"?j("behavioral",M(n.qaMetadata)):j(r,n.qaMetadata[r]||[])):[],[n,j]),pe=s.useMemo(()=>{const r=[];return n?.location&&r.push({label:"Location",value:n.location}),n?.noticePeriod&&r.push({label:"Notice",value:n.noticePeriod}),n?.currentSalary&&r.push({label:"Current",value:n.currentSalary}),n?.expectedSalary&&r.push({label:"Expected",value:n.expectedSalary}),r},[n]),Y=it(n?.reportGeneratedAt),Q=n?.audioPath?`https://dblwo5lro9gr9.cloudfront.net${n.audioPath}`:null,y=s.useCallback(r=>{Re(r),te(!0),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>te(!1),1800)},[]),Ue=s.useCallback(()=>{se(null),le(""),O(""),W("")},[]),ue=s.useCallback(({type:r,reasonValue:o=null,otherText:u=""}={})=>{let c=null;return r==="up"?c="Thumbs up":o==="other"?c=(u||"").trim()||"Other reasons":o&&(c=ye.filter(x=>x.value===o).map(x=>`${x.value} ${x.desc}`.trim()).join(", ")),{feedback:c||"Thumbs up",rating:r==="up"?5:3,source:"mock_interview_report",source_id:i||"",interview_room_id:t}},[t,i]),fe=s.useCallback(async({type:r,reasonValue:o=null,otherText:u=""}={})=>
28{if(!i){y("Please login to share feedback.");return}oe(!0),W("");try{const c=ue({type:r,reasonValue:o,otherText:u});await et(c),qe(!0)}catch(c){console.error("Failed to submit feedback:",c),W("Could not submit feedback. Please try again.")}finally{oe(!1)}},[ue,y,i]),[Ge,Oe]=s.useState(0),me=s.useCallback(async()=>!i||!t?null:yt(i,t),[i,t]),We=s.useCallback(()=>{T.current=0,F(null),b(!0),k(!1),q(null),Oe(r=>r+1)},[]);s.useEffect(()=>{if(!t){b(!1),F("Invalid interview report link.");return}if(!i)return;let r=!1,o=null;const u=async()=>{T.current===0&&(b(!0),F(null));const c=await me();if(!r){if(c&&$(c)){q(c),k(!1),b(!1);const x=c.qa_metadata||Z(c.ai_ans_meta_data);x?.introduction?.length?g("introduction"):x?.technical?.length?g("technical"):M(x).length&&g("behavioral");return}if(T.current<ot){k(!0),b(!1),T.current+=1,o=setTimeout(u,lt);return}if(m){const x=await wt(i,t);if(!r&&x&&$(x)){q(x),k(!1),b(!1);const R=x.qa_metadata||Z(x.ai_ans_meta_data);R?.introduction?.length?g("introduction"):R?.technical?.length?g("technical"):M(R).length&&g("behavioral");return}}k(!1),b(!1),F("Report is still being generated. Please check back shortly from your dashboard.")}};return T.current=0,u(),()=>{r=!0,o&&clearTimeout(o)}},[me,i,t,Ge,m]),s.useEffect(()=>{if(!n)return;const r=setTimeout(()=>B(!0),150);return()=>clearTimeout(r)},[n]),s.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const He=()=>{if(!w.current){y("No recording available");return}z?w.current.pause():w.current.play(),re(!z)},Ye=s.useCallback(async()=>{if(!/Android|iPhone|iPad|iPod/i.test(navigator.userAgent||"")){be.flushSync(()=>B(!0)),window.print();return}if(L)return;if(!i){y("Please login to download the report.");return}const o=S;ne(!0),y("Generating PDF reportâ¦");try{if(be.flushSync(()=>{I(!0),B(!0)}),!U.current)throw new Error("Report is not ready to download.");const u=pt(U.current),c=await tt.post("/applicant/external/v1/html-to-pdf",u,{headers:{Authorization:`Bearer ${i}`,"Content-Type":"text/html",Accept:"application/pdf"},responseType:"blob"});if(c?.status!==200||!c.data)throw new Error("PDF generation failed");const x=new Blob([c.data],{type:"application/pdf"}),R=`${dt(n?.fullName)}_avua_mock_interview_report.pdf`;await xt(x,R)}catch(u){console.error("Error downloading mock interview report:",u),y("Could not download the PDF. Please try again.")}finally{o||I(!1),ne(!1)}},[L,i,S,n?.fullName,y]),Qe=r=>{if(ke(r.question))return"screening";const o=X(r.score);return!o||o==="Senior"?"senior":"screening"},Ke=(r,o)=>{const c=Qe(r)==="screening"&&ke(r.question),x=r?.__sectionKey==="technical";return e.jsxs("div",{className:"py-[22px] border-b border-[#ebe7f1] last:border-b-0",children:[e.jsxs("div",{className:"flex items-start gap-3 max-[640px]:flex-col max-[640px]:gap-2",children:[e.jsx("span",{className:"flex-1 text-[15px] font-semibold leading-[1.45]",children:r.question}),x?e.jsx("span",{className:`shrink-0 text-[11px] font-bold py-[3px] px-[10px] rounded-full max-[640px]:self-start ${c?"bg-[#f6f5f9] text-[#867e94]":bt(r.score)}`,children:c?"Screening":X(r.score)||"Senior"}):null]}),c?e.jsx("p",{className:"mt-3 text-[13.5px] text-[#544c63] [&_b]:text-[#1f1933] [&_b]:font-semibold",children:r.answer}):e.jsxs(e.Fragment,{children:[r.answer?e.jsxs("p",{className:"text-[14px] text-[#544c63] leading-[1.6] mt-3",children:["â",r.answer,"â"]}):null,r.reason?e.jsx("p",{className:"text-[13px] text-[#867e94] mt-[10px] leading-[1.55] pl-[14px] border-l-2 border-[#ebe7f1] [&_b]:text-[#544c63] [&_b]:font-semibold",children:V(r.reason)||e.jsxs(e.Fragment,{children:["AI note: ",e.jsx("b",{children:r.reason})]})}):null]})]},`${r.question}-${o}`)},D="box-border font-poppins bg-[#f6f5f9] text-[#1f1933] antialiased leading-[1.6] min-h-screen pb-[50px] print:bg-white print:pb-0",K="min-h-[60vh] flex flex-col items-center justify-center gap-4 text-[#544c63] [&>p]:text-[15px] [&>p]:font-semibold",J="flex items-center gap-[7px] text-[13px] font-bold text-white bg-[#6d28d9] py-[9px] px-[15px] rounded-[10px] transition-[transform,box-shadow] duration-150 hover:-translate-y-px hover:shadow-[0_6px_16px_rgba(109,40,217,0.25)] curs
28or-pointer border-none";if(Ce)return e.jsx("div",{className:D,children:e.jsxs("div",{className:K,children:[e.jsx(ge,{strokeColor:"#6d28d9",width:"48"}),e.jsx("p",{children:"Loading your interview reportâ¦"})]})});if(Ae)return e.jsx("div",{className:D,children:e.jsxs("div",{className:K,children:[e.jsx(ge,{strokeColor:"#6d28d9",width:"48"}),e.jsx("p",{children:"Generating your reportâ¦"}),e.jsx("p",{className:"!text-[13px] !font-medium !text-[#867e94]",children:"This usually takes less than a minute."})]})});if(ee||!n)return e.jsx("div",{className:D,children:e.jsxs("div",{className:K,children:[e.jsx("p",{children:ee||"Report not found."}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{type:"button",className:J,onClick:We,children:"Try again"}),e.jsx("button",{type:"button",className:`${J} !bg-white !text-[#6d28d9] !border !border-[#6d28d9] hover:!shadow-none hover:!translate-y-0`,onClick:()=>{window.scrollTo(0,0),l("/dashboard/mock-ai-interview")},children:"Back to dashboard"})]})]})});const Je=ft(n.overallPercentage);return e.jsxs("div",{className:D,children:[e.jsx("style",{children:` 29 @media print { 30 .mir-score-bar-track { 31 display: block !important; 32 -webkit-print-color-adjust: exact; 33 print-color-adjust: exact; 34 background-color: #efeaf6 !important; 35 } 36 .mir-score-bar-fill { 37 width: var(--mir-bar-width, 0%) !important; 38 transition: none !important; 39 -webkit-print-color-adjust: exact; 40 print-color-adjust: exact; 41 } 42 .mir-list-bullet { 43 display: inline-block !important; 44 -webkit-print-color-adjust: exact !important; 45 print-color-adjust: exact !important; 46 } 47 } 48 `}),e.jsxs("div",{className:"bg-white border-b border-[#ebe7f1] print:hidden",children:[e.jsxs("div",{className:"max-w-[820px] mx-auto px-6 flex items-center h-[58px] gap-[18px] max-[640px]:h-auto max-[640px]:flex-wrap max-[640px]:px-4 max-[640px]:py-3 max-[640px]:gap-x-3 max-[640px]:gap-y-2",children:[e.jsx("img",{src:rt.CommonHeader.avua_header_logo,alt:"avua",className:"h-[18px] cursor-pointer shrink-0",onClick:()=>{window.scrollTo(0,0),l("/dashboard/mock-ai-interview",{state:a.state?.refetchInterviews?{refetchInterviews:!0}:{}})}}),e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 max-[640px]:order-3 max-[640px]:basis-full",children:[e.jsxs("div",{className:"min-w-0 flex-1 max-w-[420px] max-[640px]:max-w-[calc(100%-150px)]",children:[e.jsxs("p",{className:"text-[13px] text-[#867e94] truncate max-[640px]:hidden",title:`${P} · ${n.fullName}`,children:[P," ",e.jsxs("b",{className:"text-[#1f1933] font-semibold",children:["· ",n.fullName]})]}),e.jsxs("div",{className:"hidden max-[640px]:flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-[13px] text-[#867e94] truncate",title:P,children:P}),e.jsx("b",{className:"text-[13px] text-[#1f1933] font-semibold truncate",title:n.fullName,children:n.fullName})]})]}),e.jsxs("button",{type:"button",className:`${J} ml-auto shrink-0 relative z-10 disabled:opacity-60 disabled:cursor-not-allowed disabled:hover:translate-y-0 disabled:hover:shadow-none`,onClick:Ye,disabled:L,children:[e.jsx("svg",{className:"w-[15px] h-[15px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:e.jsx("path",{d:"M12 3v12m0 0 4-4m-4 4-4-4M5 21h14"})}),L?"Generatingâ¦":"Download PDF"]})]}),e.jsx("div",{className:"w-8 h-8 rounded-full bg-[#EDE9FD] text-[#6941C6] text-[13px] font-semibold flex items-center justify-center shrink-0 max-[640px]:order-2 max-[640px]:ml-auto",title:f||void 0,children:d})]}),e.jsx("div",{className:"w-full text-center px-3 py-1.5 text-[12px] font-bold bg-[#f9f1e2] text-[#a8690d]",children:"â Contains some AI-generated content. Kindly verify."})]}),e.jsxs("div",{ref:U,className:"max-w-[820px] mx-auto px-6 print:max-w-none",children:[e.jsxs("div",{className:"flex bg-white border border-[#ebe7f1] rounded-[18px] shadow-[0_1px_2px_rgba(31,25,51,0.04),0_10px_30px_rgba(31,25,51,0.06)] overflow-hidden mt-[34px] animate-mir-rise print:mt-[6px] print:shadow-none max-[640px]:flex-col",children:[e.jsxs("div",{className:"flex-1 py-7 px-8",children:[e.jsxs("div",{className:"text-[11px] font-bold tracking-[1px] uppercase text-[#aaa2b6]",children:["AI Interview",Y?` · ${Y.datePart} · ${Y.timePart}`:""]}),e.jsx("div",{className:"font-poppins text-[32px] font-semibold tracking-[-0.5px] leading-[1.05] mt-2",children:n.fullName}),e.jsxs("div",{className:"text-[14.5px] text-[#544c63] font-semibold mt-1",children:[P,n.experienceYears?` · ${n.experienceYears} years`:""]}),e.jsx("p",{className:"text-[17px] font-semibold text-[#1f1933] leading-[1.45] mt-[18px] max-w-[52ch]",children:Be}),ce?e.jsx("p",{className:"text-[14px] text-[#544c63] leading-[1.5] mt-[7px] max-w-[56ch]",children:ce}):null,pe.length>0?e.jsx("div",{className:"flex mt-[22px] pt-[18px] border-t border-[#f3f0f7] flex-wrap gap-y-[14px]",children:pe.map(r=>e.jsxs("div",{className:"pr-[26px] [&:not(:first-child)]:pl-[26px] [&:not(:first-child)]:border-l [&:not(:first-child)]:border-[#f3f0f7]",children:[e.jsx("span",{className:"block text-[10px] font-bold tracking-[0.5px] uppercase text-[#aaa2b6]",children:r.label}),e.jsx("span",{className:"block font-poppins text-[15px] font-bold text-[#1f1933] mt-[3px]",children:r.value})]},r.label))}):null]}),e.jsxs("div",{className:"w-[224px] shrink-0 bg-gradient-to-b from-[#fbfbfd] to-[#f7f8fa] border-l border-[#ebe7f1] flex flex-col items-center justify-center gap-3 p-6 max-[640px]:w-auto max-[640px]:flex-row max-[640px]:justify-start max-[640px]:gap-[18px] max-[640px]:border-l-0 max-[640px]:border-t max-[640px]:border-[#ebe7f1]",children:[e.jsx(jt,{score:n.overallPercentage,animated:!0}),e.jsx("div",{className:`text-[14px] font-bold ${mt(n.overallPercentage)}`,children:n.overallAssessment||Je.label}),n.percentile?e.jsxs("div",{className:"text-[11px] font-bold text-[#544c63] bg-white border border-[#ebe7f1] py-1 px-[11px] rounded-full whitespace-nowrap",children:["Top ",n.percentile,"% of candidates"]}):null]})]}),(n.strengths.length>0||n.weaknesses.length>0)&&e.jsxs("div",{className:"mt-11 animate-mir-rise print:animate-none",children:[e.jsx("div",{className:"font-poppins text-[20px] font-semibold mb-[18px]",children:"What stood out"}),e.jsxs("div",{className:"grid grid-cols-2 gap-[34px] max-[620px]:grid-cols-1 max-[620px]:gap-[26px]",children:[n.strengths.length>0?e.jsxs("div",{children:[e.jsx("h4",{className:"text-[12px] font-bold tracking-[0.4px] uppercase mb-3 flex items-center gap-[7px] text-[#0a7d59]",children:"Strengths"}),e.jsx("ul",{children:n.strengths.map((r,o)=>e.jsxs("li",{className:"flex items-start gap-[12px] list-none text-[14px] text-[#544c63] leading-[1.55] py-[7px] [&_b]:text-[#1f1933] [&_b]:font-semibold",children:[e.jsx(je,{color:"#0a7d59"}),e.jsx("span",{children:V(r)})]},o))})]}):null,n.weaknesses.length>0?e.jsxs("div",{children:[e.jsx("h4",{className:"text-[12px] font-bold tracking-[0.4px] uppercase mb-3 flex items-center gap-[7px] text-[#a8690d]",children:"Worth probing"}),e.jsx("ul",{children:n.weaknesses.map((r,o)=>e.jsxs("li",{className:"flex items-start gap-[12px] list-none text-[14px] text-[#544c63] leading-[1.55] py-[7px] [&_b]:text-[#1f1933] [&_b]:font-semibold",children:[e.jsx(je,{color:"#a8690d"}),e.jsx("span",{children:V(r)})]},o))})]}):null]})]}),n.metrics.length>0&&e.jsxs("div",{className:"mt-11 animate-mir-rise print:animate-none",children:[e.jsx("div",{className:"font-poppins text-[20px] font-semibold mb-[18px]",children:"How they scored"}),e.jsx("div",{className:"flex flex-col gap-[2px]",children:n.metrics.map(r=>{const o=ht(r.score);return e.jsxs("div",{className:"grid grid-cols-[160px_1fr_38px] items-center gap-4 py-[9px] max-[560px]:grid-cols-[120px_1fr_34px] max-[560px]:gap-3",children:[e.jsx("span",{className:"text-[14px] font-semibold text-[#544c63] max-[560px]:text-[13px]",children:r.name}),e.jsx("span",{className:"mir-score-bar-track h-[9px] rounded-full bg-[#efeaf6] overflow-hidden",children:e.jsx("span",{className:`mir-score-bar-fill block h-full rounded-full w-0 transition-[width] duration-1000 ease-[
48cubic-bezier(0.2,0.7,0.2,1)] print:transition-none ${o.bar}`,style:{"--mir-bar-width":`${r.score}%`,width:Fe?`${r.score}%`:"0%"}})}),e.jsx("span",{className:`font-poppins text-[14px] font-bold text-right ${o.text}`,children:r.score})]},r.name)})}),e.jsxs("p",{className:"text-[12.5px] text-[#867e94] mt-[14px]",children:["Measured against the Senior bar (",st,"). Bar color reflects proficiency level for each metric."]})]}),(Q||H.length>0)&&e.jsxs("div",{className:"mt-11 animate-mir-rise print:animate-none print:hidden",id:"interview",children:[e.jsx("div",{className:"font-poppins text-[20px] font-semibold mb-[18px]",children:"The interview"}),Q?e.jsxs("div",{"data-pdf-hide":!0,children:[e.jsx("audio",{ref:w,src:Q,onTimeUpdate:()=>ae(w.current?.currentTime||0),onLoadedMetadata:()=>De(w.current?.duration||0),onEnded:()=>{re(!1),ae(0)}}),e.jsxs("div",{className:"bg-white border border-[#ebe7f1] rounded-[14px] py-[14px] px-[18px] flex items-center gap-[15px]",children:[e.jsx("button",{type:"button",className:"w-[42px] h-[42px] rounded-full bg-[#6d28d9] text-white grid place-items-center shrink-0 transition-[transform] duration-150 hover:scale-105 border-none cursor-pointer",onClick:He,"aria-label":"Play recording",children:z?e.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:[e.jsx("rect",{x:"6",y:"5",width:"4",height:"14"}),e.jsx("rect",{x:"14",y:"5",width:"4",height:"14"})]}):e.jsx("svg",{className:"w-4 h-4 ml-0.5",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 5v14l11-7z"})})}),e.jsx("div",{className:"flex-1 flex items-center gap-[3px] h-[30px]",children:ze.map((r,o)=>e.jsx("span",{className:"flex-1 bg-[#e0d6f0] rounded-[2px] min-h-[4px]",style:{height:`${r}%`}},o))}),e.jsxs("span",{className:"font-poppins text-[12px] text-[#867e94]",children:[Ne(Ie)," /"," ",Ne(Le||n.interviewDuration)]})]})]}):null,H.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex gap-[18px] mt-[22px] mb-1 text-[13.5px] font-semibold flex-wrap","data-pdf-hide":!0,children:H.map(({key:r,label:o})=>e.jsx("button",{type:"button",className:`pb-2 border-b-2 bg-transparent cursor-pointer ${_===r&&!S?"text-[#6d28d9] border-[#6d28d9]":"text-[#867e94] border-transparent"}`,onClick:()=>{I(!1),g(r)},children:o},r))}),e.jsx("div",{id:"qa",children:(S?xe:de).map(Ke)}),xe.length>de.length?e.jsx("p",{className:"mt-6 text-[13.5px]","data-pdf-hide":!0,children:e.jsx("button",{type:"button",className:"text-[#6d28d9] font-semibold bg-transparent border-none cursor-pointer font-poppins text-[13.5px]",onClick:()=>I(r=>!r),children:S?"Show section view â":"Read the full transcript â"})}):null]}):null]}),e.jsx("div",{className:"mt-[44px] bg-[#fff] border border-[#ebe7f1] rounded-[16px] p-[26px_28px] text-center print:hidden",id:"fb","data-pdf-hide":!0,children:$e?e.jsx("div",{children:e.jsx("div",{className:"font-poppins font-semibold text-[20px] text-[#1f1933]",children:"Thank you for your feedback!"})}):e.jsx(e.Fragment,{children:Ee?e.jsxs("div",{children:[e.jsx("div",{className:"font-poppins font-semibold text-[16px] mb-[14px] text-[#1f1933]",children:"Tell us what went wrong:"}),e.jsxs("div",{className:"text-left max-w-[480px] mx-auto flex flex-col gap-[2px]",children:[ye.map(r=>e.jsxs("label",{className:"flex items-start gap-[10px] py-[9px] px-[4px] text-[14px] text-[#544c63] cursor-pointer leading-[1.45]",children:[e.jsx("input",{type:"radio",name:"fbReason",value:r.value,checked:A===r.value,onChange:()=>{le(r.value),r.value!=="other"&&O("")},disabled:v,className:"mt-[3px] shrink-0"}),e.jsxs("span",{children:[r.label?e.jsx("b",{className:"text-[#1f1933] font-semibold",children:r.label}):null," ",e.jsx("span",{className:"text-[#544c63]",children:r.desc||""})]})]},r.value)),A==="other"?e.jsx("textarea",{className:"w-full max-w-[480px] mt-[6px] p-[10px_12px] border border-[#ebe7f1] rounded-[10px] text-[13.5px] resize-y min-h-[64px]",placeholder:"Tell us more...",value:G,onChange:r=>O(r.target.value),disabled:v}):null]}),ie?e.jsx("div",{className:"mt-[10px] text-[13px] font-semibold text-[#a8690d]",children:ie}):null,e.jsxs("div",{className:"flex justify-center gap-[10px] mt-[20px] max-[480px]:flex-col-reverse",children:[e.jsx("button",{type:"button",className:"px-[20px] py-[10px] rounded-[10px] text-[14px] font-semibold !bg-[#fff] !border !border-[#ebe7f1] text-[#544c63] max-[480px]:w-full disabled:opacity-60 disabled:cursor-not-allowed",disabled:v,onClick:Ue,children:"Cancel"}),e.jsx("button",{type:"button",className:"px-[20px] py-[10px] rounded-[10px] text-[14px] font-semibold !bg-[#1f1933] !text-white max-[480px]:w-full disabled:opacity-60 disabled:cursor-not-allowed",disabled:v||!A||A==="other"&&!G.trim(),onClick:()=>fe({type:"down",reasonValue:A,otherText:G}),children:v?"Submitting...":"Submit feedback"})]})]}):e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"font-poppins font-semibold text-[20px] mb-[12px] text-[#1f1933]",children:"Do you find the report useful?"}),e.jsxs("div",{className:"flex justify-center gap-[14px]",children:[e.jsx("button",{type:"button",className:"w-[46px] h-[46px] rounded-full !border !border-[#ebe7f1] grid place-items-center text-[#544c63] transition hover:!bg-[#f4eefc] hover:!border-[#6d28d9] hover:text-[#6d28d9] disabled:opacity-60 disabled:cursor-not-allowed","aria-label":"Thumbs up",disabled:v,onClick:()=>fe({type:"up"}),children:e.jsx(we,{})}),e.jsx("button",{type:"button",className:"w-[46px] h-[46px] rounded-full !border !border-[#ebe7f1] grid place-items-center text-[#544c63] transition hover:!bg-[#f4eefc] hover:!border-[#6d28d9] hover:text-[#6d28d9] disabled:opacity-60 disabled:cursor-not-allowed","aria-label":"Thumbs down",disabled:v,onClick:()=>se("down"),children:e.jsx(we,{flipped:!0})})]})]})})})]}),e.jsx("div",{className:`fixed bottom-7 left-1/2 -translate-x-1/2 bg-[#1f1933] text-white text-[13px] font-semibold py-[11px] px-[19px] rounded-[11px] transition-[opacity,transform] duration-300 z-[60] pointer-events-none print:hidden ${Me?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:Pe})]})}
48export{St as default}; 49//# sourceMappingURL=ConversationalMockInterviewReport-DeszUWwF.js.map
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.