PageSourceSearch

https://ailikeme.ai/static/598.9b610cdfdcd8be771f5d.js

js ailikeme.ai collected 2026-10-05 15:27:27 UTC 9,628 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmy_webpack_project=self.webpackChunkmy_webpack_project||[]).push([[598,4788,9989],{90598(e,t,r){r.r(t);var n=r(39471),a=r(41231),i=r(51794),s=r(79989),o=r(54788);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,s,o=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const p="[This answer is skipped]",v={ready:"Ready when you are",ai_speaking:"Interviewer is speaking…",listening:"Listening — speak now",thinking:"Thinking…",complete:"Interview complete",error:"Something went wrong"};r.d(t,["default",0,e=>{let t=e.initial,r=e.strings,c=e.sttParams,u=e.onComplete,m=e.onExit;
1const b=!0===t.showTranscript,f=d((0,n.useState)("ready"),2),g=f[0],y=f[1],_=d((0,n.useState)(t.session),2),w=_[0],h=_[1],k=d((0,n.useState)(t.transcript||[]),2),E=k[0],S=k[1],N=d((0,n.useState)(""),2),O=N[0],q=N[1],T=d((0,n.useState)(""),2),j=T[0],x=T[1],P=(0,n.useRef)(null),R=(0,n.useRef)(null),I=(0,n.useRef)(""),A=(0,n.useRef)(""),C=(0,n.useRef)(null),L=(0,n.useRef)(!0),U=(0,n.useRef)(t.session);U.current=w;const M=(0,n.useRef)(u),D=(0,n.useRef)(m);M.current=u,D.current=m;const B=()=>{R.current&&(clearTimeout(R.current),R.current=null)},F=()=>{try{P.current&&P.current.abort()}catch(e){}P.current=null},Y=()=>{try{C.current&&C.current.abort()}catch(e){}C.current=null};(0,n.useEffect)(()=>(L.current=!0,()=>{L.current=!1,B(),F(),Y()}),[]);const $=async e=>{if(!L.current)return;y("ai_speaking"),q(""),Y();const t=new AbortController;C.current=t,await(0,s.streamInterviewTTS)(e,{signal:t.signal}),L.current&&!t.signal.aborted&&z()},z=()=>{if(!L.current)return;I.current="",A.current="",q(""),y("listening");const e=new a.A((0,s.deepgramTokenUrl)(),{model:c&&c.deepgram_model,language:c&&c.deepgram_language});e.onresult=e=>{const t=e.results[e.resultIndex],r=t[0].transcript;G(),t.isFinal?(I.current=(I.current+" "+r).trim(),A.current="",q("")):(A.current=r,q(r))},e.onerror=()=>{},e.onend=()=>{},P.current=e,e.start()},G=()=>{B(),R.current=setTimeout(J,4e3)},J=()=>{const e=(I.current||A.current||"").trim();e&&Q(e)},Q=async function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skip,r=void 0!==t&&t;B(),F(),r&&Y(),q(""),y("thinking");const n=U.current;S(t=>[...t,{seq:n.seq,speaker:"companion",kind:"answer",text:r?p:e}]);try{const t=(await i._d.SubmitInterviewTurn(l({session_id:n.session_id,seq:n.seq,transcript_text:r?p:e},r?{skip:!0}:{}))).data;if(!L.current)return;V(t)}catch(e){if(e&&e.response&&409===e.response.status)return void W();x("We couldn't submit your answer. Please retry."),y("error")}},V=e=>{h(t=>l(l({},t),{},{seq:e.seq,question_index:e.question_index,total_questions:e.total_questions,progress:e.progress}));const t="advance"===e.action?"scripted_question":"complete"===e.action?"closing":"follow_up";if(S(r=>[...r,{seq:e.seq-1,speaker:"interviewer",kind:t,text:e.speak_text}]),"complete"===e.action){y("complete");const t=new AbortController;return C.current=t,void(0,s.streamInterviewTTS)(e.speak_text,{signal:t.signal}).finally(()=>{L.current&&M.current()})}$(e.speak_text)},W=async()=>{try{const e=(await i._d.GetInterviewState()).data;if(!L.current)return;if("completed"===e.status)return void M.current();const t={session_id:e.session_id,seq:e.seq,question_index:e.question_index,total_questions:e.total_questions,progress:e.progress};U.current=t,h(t),S(e.transcript||[]),$(e.speak_text)}catch(e){x("Lost sync with the interview. Please reload the page."),y("error")}},H=Math.round(100*(w.progress||0)),K=e=>r&&r["status_".concat(e)]||v[e],X="error"===g?j||K("error"):K(g),Z="listening"===g||"ai_speaking"===g,ee="ready"===g?n.createElement("button",{className:"iv-btn iv-btn--primary",onClick:()=>{t.speakText?$(t.speakText):z()}},t.resumed?"Resume interview":"Begin"):"error"===g?n.createElement("button",{className:"iv-btn iv-btn--primary",onClick:W},"Retry"):Z?n.createElement("button",{className:"iv-btn iv-btn--ghost",onClick:()=>{"listening"!==g&&"ai_speaking"!==g||Q("",{skip:!0})},title:"Move on without answering this question"},"Skip question"):null;return n.createElement("div",{className:"iv-call"},n.createElement("div",{className:"iv-call__progress","aria-label":"Interview progress"},n.createElement("div",{className:"iv-call__bar",style:{width:"".concat(H,"%")}})),n.createElement("div",{className:"iv-call__meta"},n.createElement("span",null,"Question ",w.question_index," of ",w.total_questions),n.createElement("button",{className:"iv-link",onClick:()=>{B(),F(),Y(),D.current()}},"End")),b?n.createElement(n.Fragment,null,n.createElement("div",{className:"iv-call__thread"},n.createElement(o.default,{turns:E,interim:O})),n.createElement("div",{className:"iv-call__dock"},n.createElement("div",{className:"iv-orb iv-orb--".concat(g)}),n.createElement("div",{className:"iv-status",role:"status","aria-live":"polite"},X),ee)):n.createElement("div",{className:"iv-call__stage"},n.createElement("div",{className:"iv-stage__orb iv-stage__orb--".concat(g)},n.createElement("span",{className:"iv-stage__ring"}),n.createElement("span",{className:"iv-stage__ring iv-stage__ring--lag"}),n.createElement("span",{className:"iv-stage__core"})),n.createElement("div",{className:"iv-stage__status",role:"status","aria-live":"polite"},X),ee))}])},54788(e,t,r){r.r(t);var n=r(39471);r.d(t,["default",0,e=>{let t=e.turns,r=void 0===t?[]:t,a=e.interim,i=void 0===a?"":a;const s=(0,n.useRef)(null);return(0,n.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[r,i]),n.createElement("div",{className:"iv-thread"},r.map((e,t)=>n.createElement("div",{key:null!=e.seq?e.seq:"t-".concat(t),className:"iv-bubble iv-bubble--".concat(e.speaker)},n.createElement("div",{className:"iv-bubble__who"},"interviewer"===e.speaker?"Interviewer":"You"),n.createElement("div",{className:"iv-bubble__text"},e.text))),i?n.createElement("div",{className:"iv-bubble iv-bubble--companion iv-bubble--interim"},n.createElement("div",{className:"iv-bubble__who"},"You"),n.createElement("div",{className:"iv-bubble__text"},i)):null,n.createElement("div",{ref:s}))}])},79989(e,t,r){r.r(t),r.d(t,{streamInterviewTTS:()=>i});var n=r(83300);const a=()=>"https://beta.ailikeme.ai/".replace(/\/+$/,"");function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.signal,i=t.onPlaybackStart;const s=new Audio;let o=!1;return new Promise(t=>{const c=()=>{o||(o=!0,clearTimeout(l),s.onended=null,s.onerror=null,t())},l=setTimeout(c,6e4);s.onended=c,s.onerror=c,r&&r.addEventListener("abort",()=>{try{s.pause()}catch(e){}c()},{once:!0}),async function(){const t=(0,n.c4)(),o=await fetch("".concat(a(),"/interface/tts-stream"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Token ".concat(t)},body:JSON.stringify({text:e}),signal:r});if(!o.ok)throw new Error("tts_failed_".concat(o.status));if("undefined"==typeof window||void 0===window.MediaSource||!window.MediaSource.isTypeSupp
1orted("audio/mpeg")||!o.body){const e=await o.blob();if(r&&r.aborted)return;return s.src=URL.createObjectURL(e),i&&i(),void s.play().catch(()=>{})}const c=new MediaSource;s.src=URL.createObjectURL(c),await new Promise((e,t)=>{c.addEventListener("sourceopen",e,{once:!0}),c.addEventListener("error",()=>t(new Error("mse_error")),{once:!0})});const l=c.addSourceBuffer("audio/mpeg"),u=o.body.getReader();let d=!1;for(;;){const e=await u.read(),t=e.done,n=e.value;if(r&&r.aborted)return;if(t)break;await new Promise((e,t)=>{l.addEventListener("updateend",e,{once:!0}),l.addEventListener("error",t,{once:!0});try{l.appendBuffer(n)}catch(e){t(e)}}),d||(d=!0,i&&i(),s.play().catch(()=>{}))}if("open"===c.readyState)try{c.endOfStream()}catch(e){}}().catch(()=>c())})}r.d(t,["deepgramTokenUrl",0,()=>"".concat(a(),"/interface/deepgram-token")])}}]);

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.