1"use strict";(self["webpackChunkloopcv_dashboard"]=self["webpackChunkloopcv_dashboard"]||[]).push([[399],{70399:(e,t,i)=>{i.r(t),i.d(t,{default:()=>It});var s=i(20641),n=i(90033),r=i(43312),o=i(55494),a=i(99311),l=i(62082),c=i(11332),d=i(82877),u=i(50852),p=i(92613),h=i(3019),v=i(73603),m=i(10726),w=i(52939),g=i(26861),f=i(97209),b=i(34461);const _={key:0,class:"ip-interview"},y={class:"ip-interview__topbar"},k={class:"ip-interview__topbar-left"},I={class:"ip-interview__position"},S={class:"ip-interview__topbar-center"},L={key:1,class:"ip-interview__preparing-label"},P={class:"ip-interview__topbar-right"},x={class:"ip-interview__body"},T={class:"ip-interview__question-panel"},F={class:"ip-interview__ai-header"},$={class:"ip-interview__ai-avatar"},C={class:"ip-interview__ai-label"},E={class:"ip-interview__waveform ip-interview__waveform--idle"},W={class:"ip-interview__question-text ip-interview__question-text--muted"},A={class:"ip-interview__waveform"},R={class:"ip-interview__question-label"},q={class:"ip-interview__question-text"},M=["src"],Q={class:"ip-interview__waveform"},z={class:"ip-interview__question-text"},X={key:3,class:"ip-interview__mic-indicator"},N={class:"ip-interview__transcript"},U={class:"ip-interview__transcript-header"},D={ref:"transcriptScroll",class:"ip-interview__transcript-body"},j={class:"ip-interview__msg-role"},B={class:"ip-interview__msg-text"},V={key:0,class:"ip-interview__msg ip-interview__msg--you"},K={class:"ip-interview__msg-role"},O={key:0,class:"ip-interview__submit-bar"},G={key:1,class:"ip"},Y={class:"ip-grid"},H={class:"ip-sessions"},J={class:"ip-card"},Z={key:0,class:"ip-sessions__remaining"},ee={class:"ip-sessions__remaining-label"},te={class:"ip-sessions__header"},ie={class:"ip-card__title ip-card__title--no-mb"},se={key:1},ne={class:"ip-sessions__list"},re=["onClick"],oe={class:"ip-session-item__date"},ae={class:"ip-session-item__type"},le={key:2,class:"ip-sessions__empty"},ce={class:"ip-sessions__empty-icon"},de={class:"ip-audio"},ue={class:"ip-card ip-card--flex"},pe={class:"ip-card__title"},he={class:"ip-audio__stage"},ve={class:"ip-mic-circle ip-mic-circle--off"},me={class:"ip-audio__hint mt-4"},we={class:"ip-mic-circle ip-mic-circle--ready"},ge={class:"ip-audio__hint mt-3"},fe={class:"ip-mic-circle ip-mic-circle--review"},be={class:"text-body-1 font-weight-medium mt-4"},_e={class:"ip-audio__hint mt-1"},ye={class:"ip-mic-circle ip-mic-circle--review"},ke={class:"text-body-1 font-weight-medium mt-4"},Ie={class:"ip-audio__hint mt-1"},Se={class:"ip-audio__hint"},Le={key:0,class:"mt-5 audio-player-wrapper"},Pe=["src"],xe={class:"ip-mic-circle ip-mic-circle--done"},Te={class:"text-body-1 font-weight-medium mt-4"},Fe={class:"ip-audio__hint mt-1"},$e={class:"ip-right"},Ce={key:0,class:"ip-card ip-card--scroll"},Ee={class:"ip-card__title"},We={class:"ip-score-bar"},Ae={class:"ip-metric"},Re={class:"ip-metric__label"},qe={class:"ip-gauge"},Me={class:"ip-gauge__track"},Qe={class:"ip-metric"},ze={class:"ip-metric__label"},Xe={class:"ip-gauge"},Ne={class:"ip-gauge__track"},Ue={class:"ip-feedback__title"},De={key:0,class:"ip-feedback__empty"},je={class:"ip-feedback-section"},Be={class:"ip-feedback-badge ip-feedback-badge--green"},Ve={class:"ip-feedback-list text-body-2 mt-1"},Ke={class:"ip-feedback-section mt-3"},Oe={class:"ip-feedback-badge ip-feedback-badge--amber"},Ge={class:"ip-feedback-list text-body-2 mt-1"},Ye={key:1,class:"ip-card ip-card--flex"},He={class:"ip-card__title"},Je={class:"ip-setup"},Ze={class:"ip-setup__field"},et={key:0,class:"ip-position-selected"},tt={class:"ip-position-selected__text"},it={class:"ip-setup__field ip-setup__field--row"},st={class:"ip-setup__field"},nt={class:"ip-setup__field"},rt={class:"ip-setup__field"},ot={class:"ip-setup__action"};function at(e,t,i,at,lt,ct){const dt=(0,s.g2)("app-header"),ut=(0,s.g2)("router-link");return(0,s.uX)(),(0,s.CE)(s.FK,null,[(0,s.bF)(dt),(0,s.bF)(u.p,{modelValue:lt.showSessionLimitDialog,"onUpdate:modelValue":t[1]||(t[1]=e=>lt.showSessionLimitDialog=e),width:"520"},{default:(0,s.k6)((()=>[(0,s.bF)(o.J,null,{default:(0,s.k6)((()=>[(0,s.bF)(a.r,{class:"text-h6"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.limitReached.title")),1)])),_:1}),(0,s.bF)(l.O,{class:"text-body-2"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.limitReached.description",{max:lt.maxSessionsPerUser})),1)])),_:1}),(0,s.bF)(c.S,null,{default:(0,s.k6)((()=>[(0,s.bF)(w.h),(0,s.bF)(r.D,{variant:"text",onClick:t[0]||(t[0]=e=>lt.showSessionLimitDialog=!1)},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.limitReached.close")),1)])),_:1}),(0,s.bF)(r.D,{color:"primary",variant:"flat",to:"/profile/pricing"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.limitReached.seePlans")),1
1)])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"]),"preparing"===lt.sessionState||"recording"===lt.sessionState?((0,s.uX)(),(0,s.CE)("div",_,[(0,s.Lk)("div",y,[(0,s.Lk)("div",k,[(0,s.bF)(g.w,{size:"18",color:"grey-darken-1",class:"mr-1"},{default:(0,s.k6)((()=>t[6]||(t[6]=[(0,s.eW)("md:work")]))),_:1}),(0,s.Lk)("span",I,[(0,s.eW)((0,n.v_)(lt.jobInfo.jobTitle||e.$t("InterviewPrep.common.interview")),1),lt.jobInfo.companyName?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)(" â "+(0,n.v_)(lt.jobInfo.companyName),1)],64)):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",S,["recording"===lt.sessionState?((0,s.uX)(),(0,s.Wv)(d.x,{key:0,color:"error",size:"small",variant:"flat",pill:""},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:"",size:"11"},{default:(0,s.k6)((()=>t[7]||(t[7]=[(0,s.eW)("md:fiber_manual_record")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(ct.formattedDuration),1)])),_:1})):((0,s.uX)(),(0,s.CE)("span",L,(0,n.v_)(e.$t("InterviewPrep.preparingInterview")),1))]),(0,s.Lk)("div",P,["recording"===lt.sessionState?((0,s.uX)(),(0,s.Wv)(r.D,{key:0,color:"error",variant:"flat",size:"small",rounded:"lg",onClick:ct.stopRecording},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:"",size:"16"},{default:(0,s.k6)((()=>t[8]||(t[8]=[(0,s.eW)("md:stop")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.endInterview")),1)])),_:1},8,["onClick"])):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",x,[(0,s.Lk)("div",T,[(0,s.Lk)("div",F,[(0,s.Lk)("div",$,[(0,s.bF)(g.w,{size:"28",color:"white"},{default:(0,s.k6)((()=>t[9]||(t[9]=[(0,s.eW)("md:smart_toy")]))),_:1})]),(0,s.Lk)("span",C,(0,n.v_)(e.$t("InterviewPrep.aiInterviewer")),1)]),"preparing"===lt.sessionState?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("div",E,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(20,(e=>(0,s.Lk)("span",{key:e,class:"ip-interview__bar"}))),64))]),(0,s.Lk)("p",W,(0,n.v_)(e.$t("InterviewPrep.generatingQuestions")),1)],64)):lt.currentQuestions.length?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("div",A,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(20,(e=>(0,s.Lk)("span",{key:e,class:"ip-interview__bar"}))),64))]),(0,s.Lk)("p",R,(0,n.v_)(e.$t("InterviewPrep.questionLabel",{current:lt.currentQuestionIndex+1,total:lt.currentQuestions.length})),1),(0,s.Lk)("p",q,(0,n.v_)(lt.currentQuestions[lt.currentQuestionIndex].text),1),lt.currentQuestions[lt.currentQuestionIndex].audioUrl?((0,s.uX)(),(0,s.CE)("audio",{key:0,src:lt.currentQuestions[lt.currentQuestionIndex].audioUrl,autoplay:"",class:"ip-interview__audio-player"},null,8,M)):(0,s.Q3)("",!0)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("div",Q,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(20,(e=>(0,s.Lk)("span",{key:e,class:"ip-interview__bar"}))),64))]),(0,s.Lk)("p",z,(0,n.v_)(e.$t("InterviewPrep.micRecordingHint")),1)],64)),"recording"===lt.sessionState?((0,s.uX)(),(0,s.CE)("div",X,[t[11]||(t[11]=(0,s.Lk)("div",{class:"ip-interview__mic-pulse"},null,-1)),(0,s.bF)(g.w,{size:"16",color:"error"},{default:(0,s.k6)((()=>t[10]||(t[10]=[(0,s.eW)("md:mic")]))),_:1}),(0,s.Lk)("span",null,(0,n.v_)(e.$t("InterviewPrep.listening")),1)])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",N,[(0,s.Lk)("div",U,[(0,s.bF)(g.w,{size:"16",class:"mr-1"},{default:(0,s.k6)((()=>t[12]||(t[12]=[(0,s.eW)("md:subtitles")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.common.transcript")),1)]),(0,s.Lk)("div",D,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(lt.transcriptMessages,((e,t)=>((0,s.uX)(),(0,s.CE)("div",{key:t,class:(0,n.C4)(["ip-interview__msg","ip-interview__msg--"+e.role])},[(0,s.Lk)("span",j,(0,n.v_)(ct.roleLabel(e.role)),1),(0,s.Lk)("p",B,(0,n.v_)(e.text),1)],2)))),128)),"recording"===lt.sessionState?((0,s.uX)(),(0,s.CE)("div",V,[(0,s.Lk)("span",K,(0,n.v_)(e.$t("InterviewPrep.common.you")),1),t[13]||(t[13]=(0,s.Lk)("p",{class:"ip-interview__msg-text ip-interview__msg-text--typing"},[(0,s.Lk)("span"),(0,s.Lk)("span"),(0,s.Lk)("span")],-1))])):(0,s.Q3)("",!0)],512),"recording"===lt.sessionState?((0,s.uX)(),(0,s.CE)("div",O,[(0,s.bF)(r.D,{color:"primary",variant:"flat",rounded:"lg",size:"large",block:"",loading:lt.submittingAnswer,onClick:ct.submitCurrentAnswer},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:"",size:"18"},{default:(0,s.k6)((()=>t[14]||(t[14]=[(0,s.eW)("md:check_circle")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(ct.isLastQuestion?e.$t("InterviewPrep.submitEndInterview"):e.$t("InterviewPrep.submitAnswer",{number:lt.currentQuestionIndex+1})),1)])),_:1},8,["loading","onClick"])])):(0,s.Q3)("",!0)])])])):((0,s.uX)(),(0,s.CE)("div",G,[(0,s.Lk)("div",Y,[(0,s.Lk)("aside",H,[(0,s.Lk)("div",J,[null!==lt.remainingSessions&&void 0!==lt.remainingSessions?((0,s.uX)(),(0,s.CE)("div",Z,[(0,s.Lk)("span",ee,(0,n.v_)(e.$t("InterviewPrep.remainingSessionsLabel")),1),(0,s.bF)(d.x,{size:"x-small",color:"primary",variant:"tonal"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(lt.remainingSessions),1)])),_:1})])):(0,s.Q3)("",!0),(0,s.Lk)("div",te,[(0,s.Lk)("h3",ie,(0,n.v_)(e.$t("InterviewPrep.common.sessions")),1),ct.showNewSessionButton?((0,s.uX)(),(0,s.Wv)(r.D,{key:0,size:"small",color:"primary",variant:"flat",rounded:"lg",onClick:ct.resetSession},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.newSession")),1)])),_:1},8,["onClick"])):(0,s.Q3)("",!0)]),lt.sessions.length?((0,s.uX)(),(0,s.CE)("div",se,[(0,s.Lk)("div",ne,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ct.visibleSessions,(e=>((0,s.uX)(),(0,s.CE)("button",{key:e._id||e.id,class:(0,n.C4)(["ip-session-item",{"ip-session-item--active":lt.selectedSession&&(lt.selectedSession._id||lt.selectedSession.id)===(e._id||e.id)}]),onClick:t=>ct.selectSession(e)},[(0,s.Lk)("span",oe,(0,n.v_)(ct.formatSessionDate(e.createdAt||e.date)),1),(0,s.Lk)("span",ae,(0,n.v_)(ct.interviewTypeLabel(e.interviewType||e.type)),1)],10,re)))),128))]),ct.showSessionsToggle?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"ip-sessions__toggle",type:"button",onClick:t[2]||(t[2]=(...e)=>ct.toggleSessions&&ct.toggleSessions(...e))},[(0,s.Lk)("span",null,(0,n.v_)(lt.sessionsExpanded?e.$t("InterviewPrep.sessions.showLess"):e.$t("InterviewPrep.sessions.showMore")),1),(0,s.bF)(g.w,{size:"20"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(lt.sessionsExpanded?"md:expand_less":"md:expand_more"),1)])),_:1})])):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("div",le,[(0,s.Lk)("div",ce,[(0,s.bF)(g.w,{size:"32",color:"grey-lighten-1"},{default:(0,s.k6)((()=>t[15]||(t[15]=[(0,s.eW)("md:mic_none")]))),_:1})]),(0,s.Lk)("p",null,[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.noSessions")),1),t[16]||(t[16]=(0,s.Lk)("br",null,null,-1)),(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.startNewSession")),1)])]))])]),(0,s.Lk)("main",de,[(0,s.Lk)("div",ue,[(0,s.Lk)("h3",pe,(0,n.v_)(lt.selectedSession?e.$t("InterviewPrep.recordingTitle"):e.$t("InterviewPrep.audioTitle")),1),(0,s.Lk)("div",he,["idle"!==lt.sessionState||lt.microphoneEnabled?"idle"===lt.sessionState&<.microphoneEnabled?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("div",we,[(0,s.bF)(g.w,{size:"40",color:"white"},{default:(0,s.k6)((()=>t[19]||(t[19]=[(0,s.eW)("md:mic")]))),_:1})]),(0,s.bF)(d.x,{color:"success",size:"small",variant:"flat",class:"mt-4",pill:""},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:"",size:"14"},{default:(0,s.k6)((()=>t[20]||(t[20]=[(0,s.eW)("md:check_circle")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.microphoneReady")),1)])),_:1}),(0,s.Lk)("p",ge,(0,n.v_)(e.$t("InterviewPrep.configureSessionStart")),1)],64)):"analyzing"===lt.sessionState?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("div",fe,[(0,s.bF)(f.x,{indeterminate:"",color:"white",size:"32"})]),(0,s.Lk)("p",be,(0,n.v_)(e.$t("InterviewPrep.analyzingPerformance")),1),(0,s.Lk)("p",_e,(0,n.v_)(e.$t("InterviewPrep.aiGeneratingFeedback")),1)],64)):"reviewing"===lt.sessionState?((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[(0,s.Lk)("div",ye,[(0,s.bF)(g.w,{size:"36",color:"white"},{default:(0,s.k6)((()=>t[21]||(t[21]=[(0,s.eW)("md:headphones")]))),_:1})]),(0,s.Lk)("p",ke,(0,n.v_)(ct.interviewTypeLabel(lt.selectedSession.interviewType)),1),(0,s.Lk)("p",Ie,(0,n.v_)(ct.formatSessionDate(lt.selectedSession.createdAt||lt.selectedSession.date)),1),(0,s.Lk)("p",Se,(0,n.v_)(e.$t("InterviewPrep.common.duration"))+": "+(0,n.v_)(ct.formatDuration(lt.selectedSession.duration)),1),lt.selectedSession.audioUrl?((0,s.uX)(),(0,s.CE)("div",Le,[(0,s.Lk)("audio",{src:lt.selectedSession.audioUrl,controls:"",class:"ip-audio-player"},null,8,Pe)])):(0,s.Q3)("",!0)],64)):"completed"===lt.sessionState?((0,s.uX)(),(0,s.CE)(s.FK,{key:4},[(0,s.Lk)("div",xe,[(0,s.bF)(g.w,{size:"40",color:"white"},{default:(0,s.k6)((()=>t[22]||(t[22]=[(0,s.eW)("md:check")]))),_:1})]),(0,s.Lk)("p",Te,(0,n.v_)(e.$t("InterviewPrep.sessionCompleted")),1),(0,s.Lk)("p",Fe,(0,n.v_)(e.$t("InterviewPrep.common.duration"))+": "+(0,n.v_)(ct.formattedDuration),1)],64)):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("div",ve,[(0,s.bF)(g.w,{size:"40",color:"grey-darken-1"},{default:(0,s.k6)((()=>t[17]||(t[17]=[(0,s.eW)("md:mic_off")]))),_:1})]),(0,s.bF)(r.D,{class:"mt-5",variant:"tonal",color:"primary",rounded:"pill",loading:lt.microphoneEnabling,disabled:lt.microphoneEnabling,onClick:ct.enableMicrophone},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:"",size:"18"},{default:(0,s.k6)((()=>t[18]||(t[18]=[(0,s.eW)("md:mic")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.enableMicrophone")),1)])),_:1},8,["loading","disabled","onClick"]),(0,s.Lk)("p",me,(0,n.v_)(e.$t("InterviewPrep.configureSessionStart")),1)],64))])])]),(0,s.Lk)("aside",$e,["reviewing"===lt.sessionState||"completed"===lt.sessionState?((0,s.uX)(),(0,s.CE)("div",Ce,[(0,s.Lk)("h3",Ee,(0,n.v_)(e.$t("InterviewPrep.overallPerformance")),1),(0,s.Lk)("div",{class:(0,n.C4)(["ip-perf-score","ip-perf-score--"+ct.currentPerformance.level])},[(0,s.bF)(g.w,{size:"20"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(ct.performanceIcon),1)])),_:1}),(0,s.Lk)("span",null,(0,n.v_)(ct.currentPerformance.label),1)],2),(0,s.Lk)("div",We,[(0,s.Lk)("div",{class:"ip-score-bar__fill",style:(0,n.Tr)({width:ct.currentPerformance.score+"%"})},null,4)]),(0,s.Lk)("div",Ae,[(0,s.Lk)("span",Re,[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.wordsPerMinute"))+": ",1),(0,s.Lk)("strong",null,(0,n.v_)(ct.currentPerformance.wpm),1)]),(0,s.Lk)("div",qe,[(0,s.Lk)("div",Me,[t[23]||(t[23]=(0,s.Lk)("div",{class:"ip-gauge__zone"},null,-1)),(0,s.Lk)("div",{class:"ip-gauge__marker",style:(0,n.Tr)({left:ct.wpmPosition+"%"})},null,4)]),t[24]||(t[24]=(0,s.Lk)("div",{class:"ip-gauge__labels"},[(0,s.Lk)("span",null,"0"),(0,s.Lk)("span",null,"100"),(0,s.Lk)("span",null,"200"),(0,s.Lk)("span",null,"300")],-1))])]),(0,s.Lk)("div",Qe,[(0,s.Lk)("span",ze,[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.secondsPerResponse"))+": ",1),(0,s.Lk)("strong",null,(0,n.v_)(ct.formatDuration(ct.currentPerformance.secondsPerResponse)),1)]),(0,s.Lk)("div",Xe,[(0,s.Lk)("div",Ne,[t[25]||(t[25]=(0,s.Lk)("div",{class:"ip-gauge__zone"},null,-1)),(0,s.Lk)("div",{class:"ip-gauge__marker",style:(0,n.Tr)({left:ct.sprPosition+"%"})},null,4)]),t[26]||(t[26]=(0,s.Lk)("div",{class:"ip-gauge__labels"},[(0,s.Lk)("span",null,"0:00"),(0,s.Lk)("span",null,"1:36"),(0,s.Lk)("span",null,"3:12"),(0,s.Lk)("span",null,"5:00")],-1))])]),t[27]||(t[27]=(0,s.Lk)("div",{class:"ip-divider"},null,-1)),(0,s.Lk)("h4",Ue,(0,n.v_)(e.$t("InterviewPrep.feedback")),1),0===ct.feedbackItems.length?((0,s.uX)(),(0,s.CE)("div",De,(0,n.v_)(e.$t("InterviewPrep.noFeedbackAvailable")),1)):((0,s.uX)(),(0,s.Wv)(p.$,{key:1,variant:"accordion",class:"ip-feedback-panels"},{default:(0,s.k6)((()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ct.feedbackItems,((t,i)=>((0,s.uX)(),(0,s.Wv)(h.c,{key:i,elevation:"0"},{default:(0,s.k6)((()=>[(0,s.bF)(v.w,{class:"text-body-2 font-weight-medium"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(t.question),1)])),_:2},1024),(0,s.bF)(m.T,null,{default:(0,s.k6)((()=>[(0,s.Lk)("div",je,[(0,s.Lk)("div",Be,(0,n.v_)(e.$t("InterviewPrep.strengths")),1),(0,s.Lk)("ul",Ve,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.strengths,((e,t)=>((0,s.uX)(),(0,s.CE)("li",{key:t},(0,n.v_)(e),1)))),128))])]),(0,s.Lk)("div",Ke,[(0,s.Lk)("div",Oe,(0,n.v_)(e.$t("InterviewPrep.improvement")),1),(0,s.Lk)("ul",Ge,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.improvement,((e,t)=>
1((0,s.uX)(),(0,s.CE)("li",{key:t},(0,n.v_)(e),1)))),128))])])])),_:2},1024)])),_:2},1024)))),128))])),_:1}))])):((0,s.uX)(),(0,s.CE)("div",Ye,[(0,s.Lk)("h3",He,(0,n.v_)(e.$t("InterviewPrep.setUp")),1),(0,s.Lk)("div",Je,[(0,s.Lk)("div",Ze,[lt.jobInfo.matchId?((0,s.uX)(),(0,s.CE)("div",et,[(0,s.Lk)("span",tt,(0,n.v_)(lt.jobInfo.jobTitle)+" â "+(0,n.v_)(lt.jobInfo.companyName),1),(0,s.bF)(ut,{to:"/matches",class:"ip-position-selected__change"},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.change")),1)])),_:1})])):((0,s.uX)(),(0,s.Wv)(r.D,{key:1,variant:"tonal",color:"primary",size:"small",rounded:"lg",to:"/matches"},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:"",size:"15"},{default:(0,s.k6)((()=>t[28]||(t[28]=[(0,s.eW)("md:open_in_new")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.selectFromMatches")),1)])),_:1}))]),(0,s.Lk)("div",it,[(0,s.Lk)("label",null,[(0,s.bF)(g.w,{size:"15"},{default:(0,s.k6)((()=>t[29]||(t[29]=[(0,s.eW)("md:category")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.meetingType")),1)]),(0,s.bF)(d.x,{size:"small",variant:"tonal",color:"primary",pill:""},{default:(0,s.k6)((()=>[(0,s.eW)((0,n.v_)(e.$t("InterviewPrep.common.interview")),1)])),_:1})]),(0,s.Lk)("div",st,[(0,s.Lk)("label",null,[(0,s.bF)(g.w,{size:"15"},{default:(0,s.k6)((()=>t[30]||(t[30]=[(0,s.eW)("md:auto_awesome")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.interviewType")),1)]),(0,s.bF)(b.d4,{modelValue:lt.setup.interviewType,"onUpdate:modelValue":t[3]||(t[3]=e=>lt.setup.interviewType=e),items:ct.interviewTypeOptions,variant:"solo-filled",density:"compact",flat:"","hide-details":"",rounded:"lg"},null,8,["modelValue","items"])]),(0,s.Lk)("div",nt,[(0,s.Lk)("label",null,[(0,s.bF)(g.w,{size:"15"},{default:(0,s.k6)((()=>t[31]||(t[31]=[(0,s.eW)("md:quiz")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.questions")),1)]),(0,s.bF)(b.d4,{modelValue:lt.setup.questionCount,"onUpdate:modelValue":t[4]||(t[4]=e=>lt.setup.questionCount=e),items:ct.questionCountOptions,variant:"solo-filled",density:"compact",flat:"","hide-details":"",rounded:"lg"},null,8,["modelValue","items"])]),(0,s.Lk)("div",rt,[(0,s.Lk)("label",null,[(0,s.bF)(g.w,{size:"15"},{default:(0,s.k6)((()=>t[32]||(t[32]=[(0,s.eW)("md:language")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.language")),1)]),(0,s.bF)(b.d4,{modelValue:lt.setup.locale,"onUpdate:modelValue":t[5]||(t[5]=e=>lt.setup.locale=e),items:ct.languageOptions,variant:"solo-filled",density:"compact",flat:"","hide-details":"",rounded:"lg",disabled:"recording"===lt.sessionState||"preparing"===lt.sessionState||"analyzing"===lt.sessionState},null,8,["modelValue","items","disabled"])])]),(0,s.Lk)("div",ot,[(0,s.bF)(r.D,{ref:"startBtn",block:"",color:"primary",size:"large",variant:"flat",rounded:"lg",class:"ip-start-btn",disabled:"recording"===lt.sessionState||"preparing"===lt.sessionState||"analyzing"===lt.sessionState,onClick:ct.startInterview},{default:(0,s.k6)((()=>[(0,s.bF)(g.w,{start:""},{default:(0,s.k6)((()=>t[33]||(t[33]=[(0,s.eW)("md:play_arrow")]))),_:1}),(0,s.eW)(" "+(0,n.v_)(e.$t("InterviewPrep.startPracticeInterview")),1)])),_:1},8,["disabled","onClick"])])]))])])]))],64)}var lt=i(69716);async function ct({matchId:e,interviewType:t,questionCount:i,locale:s}){return(0,lt.A)({}).post("/dashboard/interview-prep/sessions",{matchId:e,interviewType:t,questionCount:i,locale:s})}async function dt(){return(0,lt.A)({}).get("/dashboard/interview-prep/sessions")}async function ut(e){return(0,lt.A)({}).get(`/dashboard/interview-prep/sessions/${e}`)}async function pt({sessionId:e,questionId:t,questionText:i,audioBlob:s}){const n=new FormData;return n.append("questionId",t),n.append("question",i),n.append("audio",s,"answer.webm"),(0,lt.A)({}).post(`/dashboard/interview-prep/sessions/${e}/answers`,n)}async function ht({questionText:e}){return(0,lt.A)({}).post("/dashboard/interview-prep/sessions/playtts/",{question:e},{responseType:"blob"})}async function vt(e,{locale:t}={}){return(0,lt.A)({}).post(`/dashboard/interview-prep/sessions/${e}/complete`,{locale:t})}var mt=i(88192),wt=i(5252);const{posthog:gt}
1=(0,mt.s)(),ft="interviewPrep.locale",bt=["en","el"],_t={name:"InterviewPrep",data(){return{isUnmounted:!1,sessionState:"idle",microphoneEnabled:!1,microphoneEnabling:!1,microphoneStream:null,duration:0,durationInterval:null,selectedSession:null,activeSessionId:null,currentQuestions:[],currentQuestionIndex:0,transcriptMessages:[],pollInterval:null,mediaRecorder:null,audioChunks:[],recorderMimeType:"",submittingAnswer:!1,ttsAudio:null,ttsAudioUrl:null,ttsPausedRecorder:!1,startBtnFontSize:14,stopLocaleWatch:null,jobInfo:{matchId:null,jobTitle:"",companyName:""},sessions:[],remainingSessions:null,sessionsExpanded:!1,isMobile:!1,mobileSessionsLimit:3,maxSessionsPerUser:10,showSessionLimitDialog:!1,setup:{interviewType:"Initial Screen",questionCount:5,locale:null},fallbackPerformance:{label:"",level:"poor",score:0,wpm:0,secondsPerResponse:0,feedback:[]}}},watch:{"setup.locale"(e){const t=this.getIso6391FromLocale(e);if(t&&bt.includes(t)){try{localStorage.setItem(ft,t)}catch{}(0,wt.d5)(t)}}},computed:{formattedDuration(){return this.formatDuration(this.duration)},interviewTypeOptions(){return[{title:this.$t("InterviewPrep.interviewTypes.initialScreen"),value:"Initial Screen"},{title:this.$t("InterviewPrep.interviewTypes.technical"),value:"Technical"},{title:this.$t("InterviewPrep.interviewTypes.workCulture"),value:"Work Culture"},{title:this.$t("InterviewPrep.interviewTypes.behavioral"),value:"Behavioral"},{title:this.$t("InterviewPrep.interviewTypes.other"),value:"Other"}]},questionCountOptions(){const e=[3,5,10,15];return e.map((e=>({title:this.$t("InterviewPrep.questionCount",e,{count:e}),value:e})))},languageOptions(){const e=bt.filter((e=>(wt.zi||[]).includes(e)));return e.map((e=>({title:this.getLocaleDisplayName(e),value:e})))},currentPerformance(){const e=this.selectedSession;if(!e)return{...this.fallbackPerformance,label:this.getPerformanceLabel("poor")};const t=e&&"object"===typeof e?e.performance||e.feedback||e.results||e:{},i=t.score??t.overallScore??t.totalScore??0,s="number"===typeof i?i:Number(i),n=Number.isFinite(s)?s:0,r=["great","good","average","poor"],o="string"===typeof t.level?t.level.trim().toLowerCase():"",a=n>=80?"great":n>=60?"good":n>=40?"average":"poor",l=r.includes(o)?o:a,c=this.getPerformanceLabel(l,t.label);let d=t.feedback||t.questionFeedback||t.questions||[];return Array.isArray(d)||(d=[]),d=d.map((e=>({question:e.question||e.questionText||e.text||this.$t("InterviewPrep.question"),strengths:e.strengths||e.strength||e.positive||"",improvement:e.improvement||e.improvements||e.negative||e.suggestion||""}))),{score:n,level:l,label:c,wpm:Number.isFinite(Number(t.wpm??t.wordsPerMinute))?Number(t.wpm??t.wordsPerMinute):0,secondsPerResponse:Number.isFinite(Number(t.secondsPerResponse??t.avgResponseTime))?Number(t.secondsPerResponse??t.avgResponseTime):0,feedback:d}},feedbackItems(){const e=this.selectedSession;if(!e)return[];const t=Array.isArray(e.questions)?e.questions:[],i=t.filter((e=>e&&(e.text||e.questionText||e.question))).map((e=>{const t=e.feedback||e.answerFeedback||e.evaluation||{};return{question:e.text||e.questionText||e.question||this.$t("InterviewPrep.defaults.question"),strengths:this.normalizeToStringArray(t.strengths||t.strength||t.positive||[]),improvement:this.normalizeToStringArray(t.improvement||t.improvements||t.negative||t.suggestion||[])}})).filter((e=>e.strengths.length||e.improvement.length));return i.length?i:(this.currentPerformance.feedback||[]).map((e=>({question:e.question||this.$t("InterviewPrep.defaults.question"),strengths:this.normalizeToStringArray(e.strengths||[]),improvement:this.normalizeToStringArray(e.improvement||[])})))},performanceIcon(){const e=this.currentPerformance.level;return"great"===e?"md:emoji_events":"good"===e?"md:thumb_up":"average"===e?"md:trending_flat":"md:trending_down"},wpmPosition(){return Math.min(100,this.currentPerformance.wpm/300*100)},sprPosition(){return Math.min(100,this.currentPerformance.secondsPerResponse/300*100)},visibleSessions(){return this.sessions.length?this.isMobile?this.sessionsExpanded?this.sessions:this.sessions.slice(0,this.mobileSessionsLimit):this.sessions:[]}
1,showSessionsToggle(){return this.isMobile&&this.sessions.length>this.mobileSessionsLimit},isLastQuestion(){return this.currentQuestions.length>0&&this.currentQuestionIndex===this.currentQuestions.length-1},remainingSessionsNumber(){const e=Number(this.remainingSessions);return Number.isFinite(e)?e:null},hasNoRemainingSessions(){return null!==this.remainingSessionsNumber&&this.remainingSessionsNumber<=0},userPricingPlan(){return this.$store?.getters?.["user/getUser"]?.pricingPlan??null},showNewSessionButton(){return"reviewing"===this.sessionState||"completed"===this.sessionState}},async created(){this.setup.locale=this.getInitialInterviewLocale();const{matchId:e,jobTitle:t,companyName:i}=this.$route.query;try{gt.capture("interviewPrepPageOpened",{matchId:e||null,jobTitle:t||null,companyName:i||null})}catch(s){console.warn("[InterviewPrep] posthog capture failed:",s)}e&&(this.jobInfo={matchId:e,jobTitle:t||this.$t("InterviewPrep.unknownPosition"),companyName:i||this.$t("InterviewPrep.unknownCompany")}),await this.loadSessions()},mounted(){window.addEventListener("resize",this.fitStartButtonLabel,{passive:!0}),this.fitStartButtonLabel(),this.updateIsMobile(),window.addEventListener("resize",this.updateIsMobile,{passive:!0}),this.stopLocaleWatch=this.$watch((()=>this.$i18n?.locale?.value||this.$i18n?.locale),(()=>this.fitStartButtonLabel()))},beforeUnmount(){this.isUnmounted=!0,window.removeEventListener("resize",this.fitStartButtonLabel),window.removeEventListener("resize",this.updateIsMobile),"function"===typeof this.stopLocaleWatch&&this.stopLocaleWatch(),this.clearTimer(),this.clearPoll(),this.stopTtsPlayback(),this.stopMicrophoneStream()},methods:{async ensureInterviewLocaleMessagesLoaded(){const e=this.getRequestLocale();if(e&&bt.includes(e))try{await(0,wt.d5)(e)}catch{}},tInterview(e,t){const i=this.getRequestLocale();try{return wt.Ay.global.t(e,t||void 0,{locale:i})}catch{try{return wt.Ay.global.t(e,t||void 0)}catch{return""}}},getActiveLocale(){const e=this.$i18n?.locale;return"string"===typeof e?e:e&&"object"===typeof e&&"value"in e?e.value:"en"},getIso6391FromLocale(e){if(null===e||void 0===e)return"";const t=String(e).trim();if(!t)return"";const i=t.split(/[-_]/)[0]?.toLowerCase()||"en";return/^[a-z]{2}$/.test(i)?i:""},getRequestLocale(){const e=this.getIso6391FromLocale(this.setup?.locale);return e&&bt.includes(e)?e:"en"},getInitialInterviewLocale(){try{const e=localStorage.getItem(ft),t=this.getIso6391FromLocale(e);if(t&&bt.includes(t))return t}catch{}const e=this.getIso6391FromLocale(this.getActiveLocale());return e&&bt.includes(e)?e:"en"},getLocaleDisplayName(e){const t=this.getIso6391FromLocale(e)||String(e||"").trim().toLowerCase();if(!t)return"";try{const e=this.getActiveLocale()||"en";if("undefined"!==typeof Intl&&"function"===typeof Intl.DisplayNames){const i=new Intl.DisplayNames([e],{type:"language"}),s=i.of(t);if(s)return s}}catch{}return t.toUpperCase()},formatQuestionOrdinal(e,t){const i=Number(e);if(!Number.isFinite(i)||i<=0)return String(e);const s=this.getIso6391FromLocale(t)||this.getActiveLocale();if("string"===typeof s&&s.toLowerCase().startsWith("el"))return`${i}η`;const n=i%10,r=i%100;return 1===n&&11!==r?`${i}st`:2===n&&12!==r?`${i}nd`:3===n&&13!==r?`${i}rd`:`${i}th`},normalizeToStringArray(e){if(!e)return[];if(Array.isArray(e))return e.filter(Boolean).map((e=>String(e).trim())).filter(Boolean);if("string"===typeof e){const t=e.trim();return t?[t]:[]}return[]},updateIsMobile(){this.isMobile="undefined"!==typeof window&&window.innerWidth<=960,this.isMobile||(this.sessionsExpanded=!1)},toggleSessions(){this.sessionsExpanded=!this.sessionsExpanded},getBestRecorderMimeType(){const e=["audio/webm;codecs=opus","audio/webm"];return"undefined"===typeof MediaRecorder||"function"!==typeof MediaRecorder.isTypeSupported?"":e.find((e=>MediaRecorder.isTypeSupported(e)))||""},startAnswerRecording(){if(!this.microphoneStream)return;if(this.mediaRecorder&&"inactive"!==this.mediaRecorder.state)try{this.mediaRecorder.stop()}catch{}this.audioChunks=[];const e=this.getBestRecorderMimeType();try{this.mediaRecorder=e?new MediaRecorder(this.microphoneStream,{mimeType:e}):new MediaRecorder(this.microphoneStream)}catch(t){return console.error("[InterviewPrep] MediaRecorder init failed:",t),void(this.mediaRecorder=null)}this.recorderMimeType=this.mediaRecorder?.mimeType||e||"",this.mediaRecorder.ondataavailable=e=>{e?.data?.size>0&&this.audioChunks.push(e.data)};try{this.mediaRecorder.start()}catch(t){console.error("[InterviewPrep] MediaRecorder start failed:",t)}},stopAnswerRecording(){const e=this.mediaRecorder;if(!e){const e=this.recorderMimeType||"audio/webm";return Promise.resolve(this.audioChunks.length?new Blob(this.audioChunks,{type:e}):null)}if("inactive"===e.state){const t=e.mimeType||this.recorderMimeType||"audio/webm";return Promise.resolve(this.audioChunks.length?new Blob(this.audioChunks,{type:t}):null)}return new Promise((t=>{const i=()=>{const i=e.mimeType||this.recorderMimeType||"audio/webm",s=this.audioChunks.length?new Blob(this.audioChunks,{type:i}):null;this.mediaRecorder=null,t(s)};e.addEventListener("stop",i,{once:!0});try{e.stop()}catch(s){console.warn("[InterviewPrep] MediaRecorder stop failed:",s),i()}}))}
1,stopTtsPlayback({resumeRecorder:e=!0}={}){if(this.ttsAudio)try{this.ttsAudio.pause(),this.ttsAudio.currentTime=0}catch{}if(this.ttsAudioUrl){try{URL.revokeObjectURL(this.ttsAudioUrl)}catch{}this.ttsAudioUrl=null}if(e&&this.ttsPausedRecorder&&"paused"===this.mediaRecorder?.state)try{this.mediaRecorder.resume()}catch{}this.ttsPausedRecorder=!1},async playTtsBlob(e,{waitForEnd:t=!1}={}){if(!e||"undefined"===typeof Blob||!(e instanceof Blob))return;const i=e.type||"";if(!i.startsWith("audio/"))return;if(this.ttsAudio||(this.ttsAudio=new Audio,this.ttsAudio.preload="auto",this.ttsAudio.onended=()=>{if(this.ttsPausedRecorder&&"paused"===this.mediaRecorder?.state)try{this.mediaRecorder.resume()}catch{}this.ttsPausedRecorder=!1}),this.stopTtsPlayback({resumeRecorder:!1}),"paused"===this.mediaRecorder?.state)this.ttsPausedRecorder=!0;else if("recording"===this.mediaRecorder?.state)try{this.mediaRecorder.pause(),this.ttsPausedRecorder=!0}catch{this.ttsPausedRecorder=!1}this.ttsAudioUrl=URL.createObjectURL(e),this.ttsAudio.src=this.ttsAudioUrl;const s=t?new Promise((e=>{const t=()=>e();this.ttsAudio.addEventListener("ended",t,{once:!0}),this.ttsAudio.addEventListener("error",t,{once:!0})})):null;try{await this.ttsAudio.play()}catch(n){return console.warn("[InterviewPrep] TTS audio play failed:",n),void this.stopTtsPlayback()}s&&await s},async fetchAndPlayQuestionTts(e,{waitForEnd:t=!1}={}){const i="object"===typeof e&&e&&(e.text||e.questionText||e.question)||("string"===typeof e?e.trim():"");if(i)try{const e=await ht({questionText:i});await this.playTtsBlob(e,{waitForEnd:t})}catch(s){console.error("[InterviewPrep] getSessionTTS error:",s)}},fitStartButtonLabel(){this.$nextTick((()=>{const e=this.$refs.startBtn,t=this.$refs.startBtnLabel,i=e?.$el||e;if(!i||!t)return;const s=i.querySelector?.(".v-btn__content")||i,n=14,r=11;this.startBtnFontSize=n,this.$nextTick((()=>{const e=Math.max(0,s.clientWidth-(t.offsetLeft-s.offsetLeft));if(!e)return;let i=n,o=t.scrollWidth;if(o<=e)return;const a=e/o;i=Math.max(r,Math.floor(n*a)),this.startBtnFontSize=i,this.$nextTick((()=>{let i=0;while(t.scrollWidth>e&&this.startBtnFontSize>r&&i<10)this.startBtnFontSize-=1,i+=1}))}))}))},getIntlLocale(){const e=this.$i18n?.locale?.value||this.$i18n?.locale||"en";return"el"===e?"el-GR":"en"===e?"en-US":e},formatInterviewTypeLabel(e){const t=String(e||"");return"Initial Screen"===t?this.$t("InterviewPrep.setup.interviewTypes.initialScreen"):"Technical"===t?this.$t("InterviewPrep.setup.interviewTypes.technical"):"Work Culture"===t?this.$t("InterviewPrep.setup.interviewTypes.workCulture"):"Behavioral"===t?this.$t("InterviewPrep.setup.interviewTypes.behavioral"):"Other"===t?this.$t("InterviewPrep.setup.interviewTypes.other"):e||""},roleLabel(e){return"interviewer"===e?this.$t("InterviewPrep.aiInterviewer"):this.$t("InterviewPrep.common.you")},interviewTypeLabel(e){const t={"Initial Screen":this.$t("InterviewPrep.interviewTypes.initialScreen"),Technical:this.$t("InterviewPrep.interviewTypes.technical"),"Work Culture":this.$t("InterviewPrep.interviewTypes.workCulture"),Behavioral:this.$t("InterviewPrep.interviewTypes.behavioral"),Other:this.$t("InterviewPrep.interviewTypes.other")};return t[e]||e||this.$t("InterviewPrep.common.interview")},getPerformanceLabel(e,t){const i=`InterviewPrep.performance.levels.${e||"poor"}`,s=this.$t(i);return s&&s!==i?s:t||e||this.$t("InterviewPrep.performance.levels.poor")},async loadSessions(){try{const e=await dt(),t=e?.remaining;if(null===t||void 0===t)this.remainingSessions=null;else if("number"===typeof t)this.remainingSessions=t;else{const e=Number(t);this.remainingSessions=Number.isFinite(e)?e:t}Array.isArray(e)?this.sessions=e:Array.isArray(e?.sessions)?this.sessions=e.sessions:Array.isArray(e?.sessions?.sessions)?this.sessions=e.sessions.sessions:Array.isArray(e?.data)?this.sessions=e.data:this.sessions=[]}catch{this.sessions=[],this.remainingSessions=null}},stopMicrophoneStream(){if(this.microphoneStream)try{this.microphoneStream.getTracks().forEach((e=>e.stop()))}catch{}finally{this.microphoneStream=null}},async ensureMicrophoneStream(){const e=this.microphoneStream?.getAudioTracks?.().some((e=>"live"===e.readyState));if(this.microphoneStream&&e)return this.microphoneStream;if(!navigator?.mediaDevices?.getUserMedia){const e=new Error("Microphone not supported");throw e.name="NotSupportedError",e}const t=await navigator.mediaDevices.getUserMedia({audio:!0});
1if(this.isUnmounted){try{t.getTracks().forEach((e=>e.stop()))}catch{}return t}return this.microphoneStream=t,t},async enableMicrophone(){if(!this.microphoneEnabling){this.microphoneEnabling=!0;try{if(await this.ensureMicrophoneStream(),this.isUnmounted)return;this.microphoneEnabled=!0}catch(e){if(this.isUnmounted)return;this.microphoneEnabled=!1,this.stopMicrophoneStream(),this.notifyMicrophoneError(e)}finally{if(this.isUnmounted)return;this.microphoneEnabling=!1}}},notifyMicrophoneError(e){if(this.isUnmounted)return;const t=e?.name||"",i="NotAllowedError"===t||"PermissionDeniedError"===t,s="NotFoundError"===t||"DevicesNotFoundError"===t,n="NotSupportedError"===t;let r="InterviewPrep.errors.micEnableFailed";n?r="InterviewPrep.errors.micNotSupported":i?r="InterviewPrep.errors.micPermissionDenied":s&&(r="InterviewPrep.errors.micNotFound"),this.$notify({message:this.$t(r),type:"danger"}),i?console.info("[InterviewPrep] microphone permission denied"):s||n?console.warn("[InterviewPrep] microphone unavailable:",e):console.error("[InterviewPrep] microphone error:",e)},async selectSession(e){this.clearTimer(),this.clearPoll();const t=e._id||e.id||e.sessionId;try{const e=await ut(t);console.log("[InterviewPrep] session detail:",e),this.selectedSession=e}catch(i){console.error("[InterviewPrep] getSession error:",i),this.selectedSession=e}this.sessionState="reviewing",this.duration=this.selectedSession.duration||0},async startInterview(){if("recording"!==this.sessionState&&"preparing"!==this.sessionState)if(this.jobInfo.matchId)if(this.hasNoRemainingSessions)this.openSessionLimitDialog("start_click");else{try{if(await this.ensureMicrophoneStream(),this.isUnmounted)return;this.microphoneEnabled=!0}catch(e){if(this.isUnmounted)return;return this.microphoneEnabled=!1,this.stopMicrophoneStream(),void this.notifyMicrophoneError(e)}this.selectedSession=null,this.sessionState="preparing",this.duration=0,this.audioChunks=[],this.recorderMimeType="";try{const e=await ct({matchId:this.jobInfo.matchId||null,interviewType:this.setup.interviewType,questionCount:this.setup.questionCount,locale:this.getRequestLocale()}),t=e?.session||e,i=e?.username||t?.username,s=t?.jobContext?.jobTitle||this.jobInfo.jobTitle||this.tInterview("InterviewPrep.defaults.unknownPosition"),n=t?.jobContext?.companyName||this.jobInfo.companyName||this.tInterview("InterviewPrep.defaults.unknownCompany");if(this.activeSessionId=t?.sessionId||t?.id,this.currentQuestions=t.questions||e?.questions||[],this.currentQuestionIndex=0,this.transcriptMessages=this.currentQuestions.length?[{role:"interviewer",text:this.currentQuestions[0].text}]:[],!this.currentQuestions.length)return this.$notify({message:this.$t("InterviewPrep.errors.questionGenerationFailed"),type:"danger"}),this.sessionState="idle",this.activeSessionId=null,void(this.selectedSession=null);gt.capture("interviewPrepSessionStarted",{sessionId:this.activeSessionId,matchId:this.jobInfo.matchId||null,interviewType:this.setup.interviewType,questionCount:this.setup.questionCount,locale:this.getRequestLocale(),questionsReturned:Array.isArray(this.currentQuestions)?this.currentQuestions.length:0}),await this.ensureInterviewLocaleMessagesLoaded();const r=this.tInterview("InterviewPrep.tts.intro",{username:i,jobTitle:s,companyName:n});await this.fetchAndPlayQuestionTts(r,{waitForEnd:!0}),this.currentQuestions.length&&await this.fetchAndPlayQuestionTts(this.currentQuestions[0],{waitForEnd:!0}),this.startAnswerRecording(),this.sessionState="recording",this.durationInterval=setInterval((()=>{this.duration++}),1e3)}catch(e){this.stopMicrophoneStream(),await this.loadSessions(),this.hasNoRemainingSessions?this.openSessionLimitDialog("create_session_failed_refresh"):this.$notify({message:this.$t("InterviewPrep.errors.createSessionFailed"),type:"danger"}),console.error("[InterviewPrep] createSession error:",e),this.sessionState="idle"}}else this.$notify({message:this.$t("InterviewPrep.errors.selectPosition"),type:"danger"})},openSessionLimitDialog(e){if(!this.showSessionLimitDialog){this.showSessionLimitDialog=!0;try{gt.capture("interviewPrepSessionLimitReached",{source:e,remainingSessions:this.remainingSessionsNumber,maxSessionsPerUser:this.maxSessionsPerUser,matchI
1d:this.jobInfo.matchId||null,pricingPlan:this.userPricingPlan})}catch(t){console.warn("[InterviewPrep] posthog capture failed:",t)}}},async submitCurrentAnswer(){if(!this.submittingAnswer&&this.currentQuestions.length){this.submittingAnswer=!0;try{if(!this.activeSessionId)return console.error("[InterviewPrep] submitAnswer called without activeSessionId"),void(this.submittingAnswer=!1);const e=this.currentQuestions[this.currentQuestionIndex],t=await this.stopAnswerRecording();t&&t.size>0&&await pt({sessionId:this.activeSessionId,questionId:e?._id||e?.id||"",questionText:e?.text||e?.questionText||e?.question||"",audioBlob:t})}catch(e){console.error("[InterviewPrep] submitAnswer error:",e)}if(this.audioChunks=[],this.isLastQuestion)await this.stopRecording();else{this.currentQuestionIndex++;const e=this.currentQuestions[this.currentQuestionIndex];this.transcriptMessages.push({role:"interviewer",text:e.text});const t=Number(e?.index),i=Number.isFinite(t)?t+1:this.currentQuestionIndex+1;await this.ensureInterviewLocaleMessagesLoaded();const s=this.formatQuestionOrdinal(i,this.getRequestLocale()),n=this.tInterview("InterviewPrep.tts.nextQuestion",{ordinal:s,number:i});await this.fetchAndPlayQuestionTts(n,{waitForEnd:!0}),await this.fetchAndPlayQuestionTts(e,{waitForEnd:!0}),this.startAnswerRecording(),this.submittingAnswer=!1}}},async stopRecording(){this.clearTimer(),gt.capture("interviewPrepSessionEnded",{sessionId:this.activeSessionId,matchId:this.jobInfo.matchId||null,durationSeconds:this.duration,endedFrom:this.sessionState});try{await this.stopAnswerRecording()}catch{}this.stopMicrophoneStream();try{await this.ensureInterviewLocaleMessagesLoaded();const e=this.tInterview("InterviewPrep.tts.sessionEnd");await this.fetchAndPlayQuestionTts(e,{waitForEnd:!1})}catch{}this.sessionState="analyzing",this.submittingAnswer=!1;try{await vt(this.activeSessionId,{locale:this.getRequestLocale()}),await this.loadSessions(),this.startPolling()}catch(e){this.sessionState="completed",await this.loadSessions(),this.$notify({message:this.$t("InterviewPrep.errors.feedbackAnalysisFailed"),type:"danger"}),console.error("[InterviewPrep] completeSession error:",e)}},startPolling(){this.pollInterval=setInterval((async()=>{try{const e=await ut(this.activeSessionId);"completed"===e.status&&(this.clearPoll(),this.selectedSession=e,this.sessionState="reviewing",await this.loadSessions())}catch{this.clearPoll(),this.sessionState="completed"}}),3e3)},resetSession(){this.clearTimer(),this.clearPoll(),this.stopTtsPlayback(),this.mediaRecorder&&"inactive"!==this.mediaRecorder.state&&this.mediaRecorder.stop(),this.mediaRecorder=null,this.stopMicrophoneStream(),this.sessionState="idle",this.duration=0,this.selectedSession=null,this.activeSessionId=null,this.currentQuestions=[],this.currentQuestionIndex=0,this.transcriptMessages=[],this.audioChunks=[],this.recorderMimeType="",this.submittingAnswer=!1},clearTimer(){this.durationInterval&&(clearInterval(this.durationInterval),this.durationInterval=null)},clearPoll(){this.pollInterval&&(clearInterval(this.pollInterval),this.pollInterval=null)},formatDuration(e){const t=Math.floor(e/60),i=e%60;return`${String(t).padStart(1,"0")}:${String(i).padStart(2,"0")}`},formatSessionDate(e){const t=new Date(e),i=this.$i18n?.locale||"en-US",s=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit"}).format(t),n=new Intl.DateTimeFormat(i,{month:"long",day:"numeric",year:"numeric"}).format(t);return`${s} | ${n}`}}};var yt=i(66262);const kt=(0,yt.A)(_t,[["render",at],["__scopeId","data-v-6fe5765e"]]),It=kt},3019:(e,t,i)=>{i.d(t,{c:()=>g,e:()=>w});var s=i(20641),n=i(67061),r=i(10726),o=i(73603),a=i(23007),l=i(93683),c=i(90019),d=i(36839),u=i(75501),p=i(21070),h=i(81094),v=i(72636),m=i(14675);const w=(0,h.j)({title:String,text:String,bgColor:String,...(0,c.s)(),...(0,d.TX)(),...(0,u.S)(),...(0,p.X)(),...(0,o.G)(),...(0,r.F)()},"VExpansionPanel"),g=(0,v.RW)()({name:"VExpansionPanel",props:w(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:i}=t;const p=(0,d.aO)(e,n.Y),{backgroundColorClasses:h,backgroundColorStyles:v}=(0,l.z6)(e,"bgColor"),{elevationClasses:w}
1=(0,c.j)(e),{roundedClasses:g}=(0,u.v)(e),f=(0,s.EW)((()=>p?.disabled.value||e.disabled)),b=(0,s.EW)((()=>p.group.items.value.reduce(((e,t,i)=>(p.group.selected.value.includes(t.id)&&e.push(i),e)),[]))),_=(0,s.EW)((()=>{const e=p.group.items.value.findIndex((e=>e.id===p.id));return!p.isSelected.value&&b.value.some((t=>t-e===1))})),y=(0,s.EW)((()=>{const e=p.group.items.value.findIndex((e=>e.id===p.id));return!p.isSelected.value&&b.value.some((t=>t-e===-1))}));return(0,s.Gt)(n.Y,p),(0,m.C)((()=>{const t=!(!i.text&&!e.text),n=!(!i.title&&!e.title),l=o.w.filterProps(e),c=r.T.filterProps(e);return(0,s.bF)(e.tag,{class:["v-expansion-panel",{"v-expansion-panel--active":p.isSelected.value,"v-expansion-panel--before-active":_.value,"v-expansion-panel--after-active":y.value,"v-expansion-panel--disabled":f.value},g.value,h.value,e.class],style:[v.value,e.style]},{default:()=>[(0,s.bF)("div",{class:["v-expansion-panel__shadow",...w.value]},null),(0,s.bF)(a.K,{defaults:{VExpansionPanelTitle:{...l},VExpansionPanelText:{...c}}},{default:()=>[n&&(0,s.bF)(o.w,{key:"title"},{default:()=>[i.title?i.title():e.title]}),t&&(0,s.bF)(r.T,{key:"text"},{default:()=>[i.text?i.text():e.text]}),i.default?.()]})]})})),{groupItem:p}}})},10726:(e,t,i)=>{i.d(t,{F:()=>p,T:()=>h});var s=i(20641),n=i(53751),r=i(67061),o=i(38671),a=i(95851),l=i(76928),c=i(81094),d=i(72636),u=i(14675);const p=(0,c.j)({...(0,a.u)(),...(0,l.f)()},"VExpansionPanelText"),h=(0,d.RW)()({name:"VExpansionPanelText",props:p(),setup(e,t){let{slots:i}=t;const a=(0,s.WQ)(r.Y);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:c,onAfterLeave:d}=(0,l._)(e,a.isSelected);return(0,u.C)((()=>(0,s.bF)(o.Qo,{onAfterLeave:d},{default:()=>[(0,s.bo)((0,s.bF)("div",{class:["v-expansion-panel-text",e.class],style:e.style},[i.default&&c.value&&(0,s.bF)("div",{class:"v-expansion-panel-text__wrapper"},[i.default?.()])]),[[n.aG,a.isSelected.value]])]}))),{}}})},73603:(e,t,i)=>{i.d(t,{G:()=>m,w:()=>w});var s=i(20641),n=i(67061),r=i(23007),o=i(26861),a=i(93683),l=i(95851),c=i(36217),d=i(98107),u=i(42651),p=i(81094),h=i(72636),v=i(14675);const m=(0,p.j)({color:String,expandIcon:{type:d.TX,default:"$expand"},collapseIcon:{type:d.TX,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...(0,l.u)(),...(0,c.X)()},"VExpansionPanelTitle"),w=(0,h.RW)()({name:"VExpansionPanelTitle",directives:{Ripple:u.n},props:m(),setup(e,t){let{slots:i}=t;const l=(0,s.WQ)(n.Y);if(!l)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:d,backgroundColorStyles:u}=(0,a.z6)(e,"color"),{dimensionStyles:p}=(0,c.S)(e),h=(0,s.EW)((()=>({collapseIcon:e.collapseIcon,disabled:l.disabled.value,expanded:l.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly}))),m=(0,s.EW)((()=>l.isSelected.value?e.collapseIcon:e.expandIcon));return(0,v.C)((()=>(0,s.bo)((0,s.bF)("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":l.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},d.value,e.class],style:[u.value,p.value,e.style],type:"button",tabindex:l.disabled.value?-1:void 0,disabled:l.disabled.value,"aria-expanded":l.isSelected.value,onClick:e.readonly?void 0:l.toggle},[(0,s.bF)("span",{class:"v-expansion-panel-title__overlay"},null),i.default?.(h.value),!e.hideActions&&(0,s.bF)(r.K,{defaults:{VIcon:{icon:m.value}}},{default:()=>[(0,s.bF)("span",{class:"v-expansion-panel-title__icon"},[i.actions?.(h.value)??(0,s.bF)(o.w,null,null)])]})]),[[(0,s.gN)("ripple"),e.ripple]]))),{}}})},92613:(e,t,i)=>{i.d(t,{$:()=>f});var s=i(20641),n=i(67061),r=i(3019),o=i(95851),a=i(57562),l=i(36839),c=i(21070),d=i(95841),u=i(50953),p=i(81094),h=i(94717),v=i(72636),m=i(14675);const w=["default","accordion","inset","popout"],g=(0,p.j)({flat:Boolean,...(0,l.gL)(),...(0,h.Up)((0,r.e)(),["bgColor","collapseIcon","color","eager","elevation","expandIcon","focusable","hideActions","readonly","ripple","rounded","tile","static"]),...(0,d.yx)(),...(0,o.u)(),...(0,c.X)(),variant:{type:String,default:"default",validator:e=>w.includes(e)}},"VExpansionPanels"),f=(0,v.RW)()({name:"VExpansionPanels",props:g(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:i}=t;const{next:r,prev:o}=(0,l.dB)(e,n.Y),{themeClasses:c}=(0,d.NX)(e),p=(0,s.EW)((()=>e.variant&&`v-expansion-panels--variant-${e.variant}`));return(0,a.Uh)({VExpansionPanel:{bgColor:(0,u.lW)(e,"bgColor"),collapseIcon:(0,u.lW)(e,"collapseIcon"),color:(0,u.lW)(e,"color"),eager:(0,u.lW)(e,"eager"),elevation:(0,u.lW)(e,"elevation"),expandIcon:(0,u.lW)(e,"expandIcon"),focusable:(0,u.lW)(e,"focusable"),hideActions:(0,u.lW)(e,"hideActions"),readonly:(0,u.lW)(e,"readonly"),ripple:(0,u.lW)(e,"ripple"),rounded:(0,u.lW)(e,"rounded"),static:(0,u.lW)(e,"static")}}),(0,m.C)((()=>(0,s.bF)(e.tag,{class:["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},c.value,p.value,e.class],style:e.style},{default:()=>[i.default?.({prev:o,next:r})]}))),{next:r,prev:o}}})},67061:(e,t,i)=>{i.d(t,{Y:()=>s});const s=Symbol.for("vuetify:v-expansion-panel")}}]); 2//# sourceMappingURL=399.667237c5.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.