PageSourceSearch

https://quarrion.ai/_next/static/chunks/1538.ae323ed11430c560.js

js quarrion.ai collected 2026-10-02 01:13:05 UTC 170,367 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1538],{3249:(e,t,a)=>{a.d(t,{V:()=>i,v:()=>l});var r=a(27736),s=a(66597);async function n(){return(0,s.Em)("/api/onboarding/preview")}let i=["onboarding","preview"];function l(e){return(0,r.I)({queryKey:i,queryFn:n,enabled:e,staleTime:6e4})}},5631:(e,t,a)=>{a.d(t,{Q:()=>n});var r=a(54568),s=a(7620);function n(e){let{className:t}=e,a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{window.matchMedia("(prefers-reduced-motion: reduce)").matches&&a.current&&a.current.style.setProperty("--blob-duration","0s")},[]),(0,r.jsxs)("div",{ref:a,className:"fixed inset-0 -z-10 overflow-hidden ".concat(null!=t?t:""),"aria-hidden":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-950 via-gray-900 to-brand-950"}),(0,r.jsx)("div",{className:"absolute -top-1/4 -left-1/4 h-[60vh] w-[60vh] rounded-full bg-brand-600/20 blur-3xl",style:{animation:"var(--blob-duration, 20s) blob-float-1 ease-in-out infinite"}}),(0,r.jsx)("div",{className:"absolute -bottom-1/4 -right-1/4 h-[50vh] w-[50vh] rounded-full bg-brand-400/15 blur-3xl",style:{animation:"var(--blob-duration, 25s) blob-float-2 ease-in-out infinite"}}),(0,r.jsx)("div",{className:"absolute top-1/3 left-1/2 h-[40vh] w-[40vh] rounded-full bg-violet-600/10 blur-3xl",style:{animation:"var(--blob-duration, 30s) blob-float-3 ease-in-out infinite"}}),(0,r.jsx)("div",{className:"absolute inset-0 opacity-20 mix-blend-soft-light bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC44IiBudW1PY3RhdmVzPSI0IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI24pIiBvcGFjaXR5PSIwLjA1Ii8+PC9zdmc+')]"})]})}},6298:(e,t,a)=>{a.d(t,{Xg:()=>n});var r=a(7620),s=a(21675);function n(){let e=(0,r.useSyncExternalStore)(s.JH.subscribe,s.JH.getSnapshot,s.JH.getSnapshot),t=(0,r.useMemo)(()=>Array.from(new Set(e.entries.map(e=>e.jobId))).sort(),[e.entries]),a=(0,r.useCallback)((t,a,r)=>e.entries.some(e=>e.jobId===t&&e.kind===a)||(0,s.yQ)(r,a),[e.entries]),n=(0,r.useCallback)((e,t)=>{(0,s.LV)(e,"cv",t)},[]);return{state:e,inFlightJobIds:t,tailorCv:n,generateCoverLetter:(0,r.useCallback)((e,t)=>{(0,s.LV)(e,"coverLetter",t)},[]),prepareDocuments:(0,r.useCallback)(e=>{(0,s.cQ)(e)},[]),isPending:a}}},11538:(e,t,a)=>{let r;a.r(t),a.d(t,{SpaWrapper:()=>rW});var s=a(54568),n=a(50536),i=a(53545),l=a(4869),o=a(20855),d=a(98466),c=a(7620),u=a(64041),m=a(41416),h=a(52871),x=a(96886),p=a(99100),g=a(12598),f=a(29304),b=a(69354),y=a(97221),w=a(95323),j=a(80229),v=a(65202),N=a(92568),k=a(51115),S=a(18255),C=a(47573),A=a(38517),E=a(55532),_=a(91631),P=a(54925),I=a(74717),q=a(93285),R=a(40103);let T={category:"bug",subject:"",description:"",stepsToReproduce:""},F="bug-report-modal-heading";function z(e){let{isOpen:t,onClose:r}=e,{toast:n}=(0,q.dj)(),{mutate:i,isPending:l}=(0,R._c)(),[o,d]=(0,c.useState)(T),[u,m]=(0,c.useState)(null),[h,f]=(0,c.useState)(!1),[b,y]=(0,c.useState)(!1),w=(0,c.useCallback)(()=>{d(T),m(null),f(!1),r()},[r]),j=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&w()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,w]),(0,c.useEffect)(()=>{if(!t)return;let e=j.current;if(!e)return;let a='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',r=t=>{if("Tab"!==t.key)return;let r=Array.from(e.querySelectorAll(a)),s=r[0],n=r[r.length-1];s&&n&&(t.shiftKey&&document.activeElement===s?(t.preventDefault(),n.focus()):t.shiftKey||document.activeElement!==n||(t.preventDefault(),s.focus()))};e.addEventListener("keydown",r);let s=e.querySelector(a);return null==s||s.focus(),()=>e.removeEventListener("keydown",r)},[t]);let v=(0,c.useCallback)(async()=>{y(!0),f(!1);try{let e=(await a.e(541).then(a.t.bind(a,21525,23))).default,t=await e(document.body,{useCORS:!0,allowTaint:!1,logging:!1});m(t.toDataURL("image/jpeg",.5))}catch(t){try{var e;let t=await navigator.mediaDevices.getDisplayMedia({video:!0}),a=document.createElement("video");a.srcObject=t,await a.play();let r=document.createElement("canvas");r.width=a.videoWidth||1280,r.height=a.videoHeight||720,null==(e=r.getContext("2d"))||e.drawImage(a,0,0,r.width,r.height);let s=r.toDataURL("image/jpeg",.5);
1t.getTracks().forEach(e=>e.stop()),m(s)}catch(e){f(!0)}}finally{y(!1)}},[]),N=(0,c.useCallback)(e=>{var t,a;e.preventDefault();let r={userAgent:navigator.userAgent,language:navigator.language,platform:navigator.platform,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,cookieEnabled:navigator.cookieEnabled};i({category:o.category,subject:o.subject,description:o.description,steps_to_reproduce:o.stepsToReproduce||void 0,screenshot_url:null!=u?u:null,browser_info:r,page_url:window.location.href,session_id:null!=(t=sessionStorage.getItem("session_id"))?t:void 0,console_errors:null!=(a=window.__consoleErrorBuffer)?a:[]},{onSuccess:()=>{n("success","Bug report submitted. Thank you!"),w()},onError:()=>{n("error","Failed to submit. Please try again.")}})},[o,u,i,n,w]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"aria-live":"polite",className:"sr-only",children:t?"Bug report form opened":""}),(0,s.jsx)(p.N,{children:t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm",onClick:w,"aria-hidden":"true"}),(0,s.jsxs)(x.P.div,{ref:j,"data-testid":"bug-report-modal",role:"dialog","aria-labelledby":F,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{type:"spring",stiffness:300,damping:30},style:{transformOrigin:"bottom right"},className:"fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col bg-background shadow-2xl border-l border-border",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-6 py-4",children:[(0,s.jsx)("h2",{id:F,className:"text-lg font-semibold text-foreground",children:"Report an Issue"}),(0,s.jsx)(_.$,{variant:"ghost",size:"icon",onClick:w,"aria-label":"Close",children:(0,s.jsx)(g.A,{className:"h-4 w-4"})})]}),(0,s.jsxs)("form",{onSubmit:N,className:"flex flex-1 flex-col overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex-1 space-y-5 px-6 py-5",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("label",{htmlFor:"bug-category",className:"text-sm font-medium text-foreground",children:["Category ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsxs)("select",{id:"bug-category",required:!0,value:o.category,onChange:e=>d(t=>({...t,category:e.target.value})),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",children:[(0,s.jsx)("option",{value:"bug",children:"Bug"}),(0,s.jsx)("option",{value:"feature_request",children:"Feature Request"}),(0,s.jsx)("option",{value:"feedback",children:"Feedback"}),(0,s.jsx)("option",{value:"other",children:"Other"})]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("label",{htmlFor:"bug-subject",className:"text-sm font-medium text-foreground",children:["Subject ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("input",{id:"bug-subject",type:"text",required:!0,maxLength:200,value:o.subject,onChange:e=>d(t=>({...t,subject:e.target.value})),placeholder:"Brief summary of the issue",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("label",{htmlFor:"bug-description",className:"text-sm font-medium text-foreground",children:["Description ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("textarea",{id:"bug-description",required:!0,maxLength:5e3,rows:4,value:o.description,onChange:e=>d(t=>({...t,description:e.target.value})),placeholder:"Describe what happened...",className:"w-full resize-none rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("label",{htmlFor:"bug-steps",className:"text-sm font-medium text-foreground",children:["Steps to reproduce ",(0,s.jsx)("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),(0,s.jsx)("textarea",{id:"bug-steps",rows:3,maxLength:2e3,value:o.stepsToReproduce,onCh
1ange:e=>d(t=>({...t,stepsToReproduce:e.target.value})),placeholder:"1. Go to... 2. Click on... 3. See error",className:"w-full resize-none rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(_.$,{type:"button",variant:"outline",size:"sm",onClick:v,disabled:b,className:"w-full",children:[(0,s.jsx)(P.A,{className:"mr-2 h-4 w-4"}),b?"Capturing…":"Capture Screenshot"]}),h&&(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-yellow-500/10 px-3 py-2 text-xs text-yellow-600 dark:text-yellow-400",children:[(0,s.jsx)(I.A,{className:"h-3.5 w-3.5 flex-shrink-0"}),"Screenshot capture failed. You can still submit without it."]}),u&&(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-md border border-border",children:[(0,s.jsx)("img",{src:u,alt:"Screenshot preview",className:"w-full object-cover"}),(0,s.jsx)("button",{type:"button",onClick:()=>m(null),className:"absolute right-1 top-1 rounded-full bg-black/60 p-0.5 text-white hover:bg-black/80","aria-label":"Remove screenshot",children:(0,s.jsx)(g.A,{className:"h-3 w-3"})})]})]})]}),(0,s.jsx)("div",{className:"border-t border-border px-6 py-4",children:(0,s.jsx)(_.$,{type:"submit",className:"w-full",disabled:l,children:l?"Submitting…":"Submit Report"})})]})]})]})})]})}if(!window.__consoleErrorBuffer){window.__consoleErrorBuffer=[];let e=console.error.bind(console);console.error=function(){for(var t,a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];window.__consoleErrorBuffer=[...(null!=(t=window.__consoleErrorBuffer)?t:[]).slice(-19),{message:String(r[0]),timestamp:new Date().toISOString()}],e(...r)}}function U(){let[e,t]=(0,c.useState)(!1),[a,r]=(0,c.useState)(!1),n=(0,c.useRef)(null);(0,c.useEffect)(()=>{window.__consoleErrorBuffer||(window.__consoleErrorBuffer=[])},[]);let i=(0,c.useCallback)(()=>t(!0),[]),l=(0,c.useCallback)(()=>{t(!1),setTimeout(()=>{var e;null==(e=n.current)||e.focus()},0)},[]),o=(0,c.useCallback)(()=>r(!0),[]),d=(0,c.useCallback)(()=>r(!1),[]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed right-0 top-1/2 z-50 -translate-y-1/2",children:(0,s.jsx)(x.P.div,{initial:{opacity:0,x:72},animate:{opacity:1,x:16*!a},transition:{type:"spring",stiffness:300,damping:20,delay:1},onHoverStart:o,onHoverEnd:d,onFocus:o,onBlur:d,children:(0,s.jsxs)(_.$,{ref:n,"data-testid":"bug-report-button",variant:"outline",onClick:i,className:"flex h-12 items-center rounded-l-xl rounded-r-none border-r-0 pl-3 pr-3 bg-gradient-to-br from-indigo-500/10 via-purple-500/10 to-transparent bg-white/90 border-gray-200 shadow-lg text-gray-700 hover:bg-white dark:bg-gray-800/90 dark:border-gray-700 dark:shadow-[0_0_12px_rgba(99,102,241,0.3)] dark:text-gray-200 dark:hover:bg-gray-700/90","aria-label":"Report a bug",children:[(0,s.jsx)(E.A,{className:"h-5 w-5 shrink-0"}),(0,s.jsx)("span",{className:"overflow-hidden whitespace-nowrap text-sm font-medium transition-all duration-200 ".concat(a?"ml-2 max-w-[140px] opacity-100":"ml-0 max-w-0 opacity-0"),children:"Report a bug"})]})})}),(0,s.jsx)(z,{isOpen:e,onClose:l})]})}var D=a(74363),L=a(34518),M=a(19769),B=a(86319),O=a(41365),W=a(889),V=a(31587),K=a(75424),Q=a(72116),G=a(77373),Y=a(49900),H=a(62121),J=a(27736),Z=a(66597),X=a(2788),$=a(68009);class ee extends X.I{constructor(e,t="career_advisor"){super({metric:t,used:e.used,limit:e.limit,plan:e.plan,upgradeUrl:e.upgradeUrl,resetsAt:e.resetsAt}),this.message="Usage limit reached (".concat(e.used,"/").concat(e.limit,")"),this.name="AdvisorLimitError",this.limitInfo=e}}async function et(){try{var e;let{data:t}=await $.N.auth.getSession();if(null==(e=t.session)?void 0:e.access_token)return{Authorization:"Bearer ".concat(t.session.access_token)}}catch(e){}return{}}async function ea(e,t,a,r){let s=await et(),n=await fetch("".concat(Z.C1,"/api/career-advisor/chat"),{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",...s},body:JSON.stringify({message:e,...t?{conversationId:t}:{}}),signal:r});if(!n.ok){if(403===n.status){let e=function(e){var t,a,r,s,n,i,l;if(null===e||"object"!=typeof e||"TIER_LIMIT_EXCEEDED"!==e.code)return null;let o=null!=(t=e.errorData)?t:e.data;if(null===o||"object"!=typeof o)return null;let d=null!=(a=o.resets_at)?a:o.resetsAt;return{info:{used:Number(null!=(r=o.used)?r:0),limit:Number(null!=(s=o.limit)?s:0),plan:String(null!=(n=o.plan)?n:"free"),resetsAt:"string"==typeof d?d:null,upgradeUrl:String(null!=(i=o.upgradeUrl)?i:"/pricing")},metric:String(null!=(l=o.metric)?l:"career_advisor")}}(await n.json().catch(()=>null));if(e)throw new ee(e.info,e.metric)}throw Error("Chat request failed: ".concat(n.status))}if(!n.body)throw Error("Chat request failed: empty response body");let i=n.body.getReader(),l=new TextDecoder,o="",d=!1;for(;!d;){var c;let{done:e,value:t}=await i.read();if(d=e,e)break;let r=(o+=l.decode(t,{stream:!0})).split("\n");for(let e of(o=null!=(c=r.pop())?c:"",r)){if(!e.startsWith("data: "))continue;let t=e.slice(6).trim();if("[DONE]"===t)return void a({type:"done"});try{let e=JSON.parse(t);"string"==typeof e.conversationId?a({type:"conversationId",conversationId:e.conversationId}):"string"==typeof e.token?a({type:"token",token:e.token}):"string"==typeof e.messageId?a({type:"messageId",messageId:e.messageId}):!0===e.truncated?a({type:"truncated"}):"string"==typeof e.error&&a({type:"error",error:e.error})}catch(e){}}}a({type:"interrupted"})}function er(){return(0,Z.Em)("/api/career-advisor/conversations")}let es=["career-advisor","conversations"];function en(e,t){return{id:"local-".concat(e,"-").concat(Date.now()),role:e,content:t,createdAt:new Date().toISOString()}}var ei=a(63680),el=a(48517),eo=a(64980);let ed=2/3;function ec(e){let{metric:t,isFreeTier:a}=e,r=Math.min(100,Math.round(t.used/t.limit*100));return(0,s.jsxs)("div",{role:"status",className:"rounded-lg border border-gray-900/[0.06] dark:border-white/[0.06] bg-white dark:bg-gray-900 px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:[t.used," of ",t.limit," ",a?"free ":"","chats used"]}),(0,s.jsx)(o.N_,{to:"/pricing","aria-label":"Upgrade for more advisor chats",className:"flex-shrink-0 text-xs font-semibold text-brand-700 dark:text-brand-400 transition-colors hover:text-brand-700 dark:hover:text-brand-300",children:"Upgrade for more"})]}),(0,s.jsx)("div",{role:"progressbar","aria-label":"Career advisor usage","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,className:"mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-800",children:(0,s.jsx)("div",{className:(0,Y.cn)("h-full rounded-full transition-all",r>=100?"bg-red-500":"bg-brand-500"),style:{width:"".concat(r,"%")}})})]})}function eu(){return(0,s.jsxs)(o.N_,{to:"/pricing","aria-label":"Career Path Planner — upgrade to unlock",className:"group flex items-center gap-3 rounded-lg border border-gray-900/[0.06] dark:border-white/[0.06] bg-white dark:bg-gray-900 px-3 py-2.5 transition-colors hover:border-brand-500/40 hover:bg-gray-200/80 dark:hover:bg-gray-800/80 motion-reduce:transition-none",children:[(0,s.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-brand-500/10",children:(0,s.jsx)(ei.A,{className:"h-4 w-4 text-brand-700 dark:text-brand-400","aria-hidden":"true"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-gray-900 dark:text-white",children:"Career Path Planner"}),(0,s.jsx)("p",{className:"truncate text-[11px] text-gray-500",children:"Map my path to a target role"})]}),(0,s.jsxs)("span",{className:"flex flex-shrink-0 items-center gap-1 rounded-full bg-gray-200 dark:bg-gray-800 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:text-gray-400 transition-colors group-hover:text-brand-700 dark:group-hover:text-brand-300 motion-reduce:transition-none",children:[(0,s.jsx)(el.A,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Upgrade"]})]})}function em(){let{isFreeTier:e}=(0,eo.Rs)(),{data:t,isLoading:a,error:r}=(0,eo.Rz)(),n=null==t?void 0:t.metrics.find(e=>"career_advisor"===e.metric),i=!a&&!r&&!!n&&!(n.limit<=0)&&n.used/n.limit>=ed;return i||e?(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[i&&n&&(0,s.jsx)(ec,{metric:n,isFreeTier:e}),e&&(0,s.jsx)(eu,{})]}):null}var eh=a(65545);let ex=["What skills should I learn next?","How competitive am I for senior roles?","What's my expected salary trajectory?","Which companies match my profile best?"],ep="c
1areer-advisor-opened",eg="ask:";function ef(){try{return"true"===localStorage.getItem(ep)}catch(e){return!1}}function eb(e){let t=[],a=e,r=0;for(;a.length>0;){var n,i,l,o;let e=a.match(/\*\*(.+?)\*\*/),d=a.match(/`(.+?)`/),c=null;if(e&&(!d||(null!=(n=e.index)?n:0)<=(null!=(i=d.index)?i:0))?c=e:d&&(c=d),!c){t.push(a);break}let u=a.slice(0,null!=(l=c.index)?l:0);u&&t.push(u),c[0].startsWith("**")?t.push((0,s.jsx)("strong",{className:"font-semibold text-gray-900 dark:text-white",children:c[1]},r++)):t.push((0,s.jsx)("code",{className:"rounded bg-gray-300/60 dark:bg-gray-700/60 px-1 py-0.5 font-mono text-[11px] text-emerald-700 dark:text-emerald-300",children:c[1]},r++)),a=a.slice((null!=(o=c.index)?o:0)+c[0].length)}return(0,s.jsx)(s.Fragment,{children:t})}function ey(e){var t;let{message:a,onFeedback:r}=e,n=null!=(t=a.feedback)?t:null,i=(e,t)=>(0,Y.cn)("rounded-md p-1 transition-colors motion-reduce:transition-none",e?t:"text-gray-500 hover:bg-gray-300/60 dark:hover:bg-gray-700/60 hover:text-gray-700 dark:hover:text-gray-200");return(0,s.jsxs)("div",{role:"group","aria-label":"Rate this response",className:"mt-1.5 flex items-center gap-0.5",children:[(0,s.jsx)("button",{type:"button",onClick:()=>1!==n&&r(a.id,1),"aria-label":"Helpful response","aria-pressed":1===n,className:i(1===n,"bg-emerald-500/20 text-emerald-700 dark:text-emerald-300"),children:(0,s.jsx)(D.A,{className:"h-3 w-3","aria-hidden":"true"})}),(0,s.jsx)("button",{type:"button",onClick:()=>-1!==n&&r(a.id,-1),"aria-label":"Not helpful","aria-pressed":-1===n,className:i(-1===n,"bg-red-500/20 text-red-700 dark:text-red-300"),children:(0,s.jsx)(L.A,{className:"h-3 w-3","aria-hidden":"true"})})]})}function ew(e){let{message:t,isStreaming:a,onFeedback:r,onContinue:n}=e,i="user"===t.role,l=!i&&!a&&void 0!==r&&!t.id.startsWith("local-");return(0,s.jsxs)("div",{className:(0,Y.cn)("flex gap-2",i?"flex-row-reverse":"flex-row"),children:[(0,s.jsx)("div",{className:(0,Y.cn)("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full",i?"bg-brand-500":"bg-gray-300 dark:bg-gray-700"),children:i?(0,s.jsx)(M.A,{className:"h-3.5 w-3.5 text-gray-900 dark:text-white"}):(0,s.jsx)(B.A,{className:"h-3.5 w-3.5 text-gray-700 dark:text-gray-300"})}),(0,s.jsxs)("div",{className:(0,Y.cn)("max-w-[80%] rounded-2xl px-3 py-2 text-xs leading-relaxed",i?"rounded-tr-sm bg-brand-500 text-white":"rounded-tl-sm border border-gray-900/[0.06] dark:border-white/[0.06] bg-gray-200/80 dark:bg-gray-800/80 text-gray-700 dark:text-gray-200"),children:[i?(0,s.jsx)("span",{className:"whitespace-pre-wrap",children:t.content}):(0,s.jsxs)("div",{className:"prose-custom",children:[function(e){let t=e.split("\n"),a=[];return t.forEach((e,t)=>e.startsWith("## ")?void a.push((0,s.jsx)("h3",{className:"mt-2 mb-0.5 text-sm font-semibold text-gray-900 dark:text-white",children:e.slice(3)},t)):e.startsWith("# ")?void a.push((0,s.jsx)("h2",{className:"mt-2 mb-0.5 text-sm font-bold text-gray-900 dark:text-white",children:e.slice(2)},t)):e.startsWith("- ")||e.startsWith("* ")?void a.push((0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("span",{className:"mt-1 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-gray-500"}),(0,s.jsx)("span",{children:eb(e.slice(2))})]},t)):""===e?void a.push((0,s.jsx)("div",{className:"h-1.5"},t)):void a.push((0,s.jsx)("p",{children:eb(e)},t))),(0,s.jsx)(s.Fragment,{children:a})}(t.content),a&&(0,s.jsx)("span",{className:"inline-block h-3 w-0.5 animate-pulse bg-gray-600 dark:bg-gray-400 align-middle"})]}),!i&&t.truncated&&n&&(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-[10px] text-amber-700/90 dark:text-amber-400/90",children:"Response was cut short"}),(0,s.jsxs)("button",{type:"button",onClick:n,"aria-label":"Continue this response",className:"flex items-center gap-1 rounded-md border border-amber-400/40 px-2 py-0.5 text-[11px] font-medium text-amber-700 dark:text-amber-300 transition-colors hover:bg-amber-500/20 motion-reduce:transition-none",children:[(0,s.jsx)(O.A,{className:"h-3 w-3","aria-hidden":"true"}),"Continue"]})]}),l&&(0,s.jsx)(ey,{message:t,onFeedback:r})]})]})}function ej(){return(0,s.jsxs)("div",{role:"status","aria-label":"Loading conversation",className:"flex flex-col gap-3",children:[[0,1,2].map(e=>(0,s.jsxs)("div",{className:(0,Y.cn)("flex gap-2",e%2==1?"flex-row-reverse":"flex-row"),children:[(0,s.jsx)("div",{className:"h-7 w-7 flex-shrink-0 animate-pulse rounded-full bg-gray-200 dark:bg-gray-800"}),(0,s.jsx)("div",{className:(0,Y.cn)("h-12 animate-pulse rounded-2xl bg-gray-200/70 dark:bg-gray-800/70",e%2==1?"w-1/2":"w-2/3")})]},e)),(0,s.jsx)("span",{className:"sr-only",children:"Loading conversation…"})]})}function ev(e){let{info:t}=e;return(0,s.jsxs)("div",{role:"alert",className:"rounded-xl border border-brand-500/30 bg-brand-500/10 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(W.A,{className:"h-4 w-4 flex-shrink-0 text-brand-700 dark:text-brand-400"}),(0,s.jsx)("p",{className:"text-xs font-semibold text-gray-900 dark:text-white",children:"You've reached your advisor limit"})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-700 dark:text-gray-300",children:"".concat(t.used," of ").concat(t.limit," used on the ").concat(t.plan," plan")}),t.resetsAt&&(0,s.jsxs)("p",{className:"mt-0.5 text-[10px] text-gray-500",children:["Resets ",(0,eh.Yq)(t.resetsAt)]}),(0,s.jsx)(o.N_,{to:t.upgradeUrl,onClick:()=>(0,H.u)("advisor_upgrade_clicked",{surface:"limit_card"}),"aria-label":"Upgrade your plan",className:"mt-2 inline-flex items-center gap-1 rounded-lg bg-brand-500 px-3 py-1.5 text-xs font-semibold text-white transition-transform hover:scale-[1.02]",children:"Upgrade for unlimited"})]})}function eN(e){let{onRetry:t}=e;return(0,s.jsxs)("div",{role:"alert",className:"flex items-center justify-between gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[(0,s.jsx)("p",{className:"text-xs text-red-700 dark:text-red-400",children:"Something went wrong. Your message wasn't lost."}),(0,s.jsxs)("button",{onClick:t,"aria-label":"Retry last message",className:"flex flex-shrink-0 items-center gap-1 rounded-md border border-red-400/40 px-2 py-1 text-xs font-medium text-red-700 dark:text-red-300 transition-colors hover:bg-red-500/20",children:[(0,s.jsx)(V.A,{className:"h-3 w-3"}),"Retry"]})]})}function ek(e){let{defaultOpen:t=!1}=e,[a,r]=(0,c.useState)(t),[n,i]=(0,c.useState)(""),[l,d]=(0,c.useState)(null),[u,m]=(0,c.useState)(ef),[h,x]=(0,o.ok)(),{pathname:p}=(0,o.zy)(),b=(0,c.useRef)(null),y=(0,c.useRef)(null),w=(0,c.useRef)(null),j=(0,c.useRef)(null),{messages:v,streamingText:N,isStreaming:k,conversationId:S,error:C,sendMessage:A,retryLast:E,stopStreaming:_,setConversationId:P,resetThread:I,submitFeedback:q}=function(){let[e,t]=(0,c.useState)([]),[a,r]=(0,c.useState)(""),[s,n]=(0,c.useState)(!1),[i,l]=(0,c.useState)(null),[o,d]=(0,c.useState)(null),u=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useRef)(0),x=(0,c.useCallback)(async(e,a)=>{var o;if(s)return;
1null==(o=u.current)||o.abort(),u.current=new AbortController;let c=++h.current;if(m.current=e,a){let a=en("user",e);t(e=>[...e,a])}r(""),n(!0),d(null);let x="",p=null,g=!1,f=()=>{if(""===x)return;let e={...en("assistant",x),...p?{id:p}:{},...g?{truncated:!0}:{}};t(t=>[...t,e]),r("")};try{await ea(e,null!=i?i:void 0,e=>{c===h.current&&("conversationId"===e.type?l(e.conversationId):"token"===e.type?(x+=e.token,r(x)):"messageId"===e.type?p=e.messageId:"truncated"===e.type?g=!0:"interrupted"===e.type?d({kind:"generic",message:"The reply was interrupted before it finished."}):"error"===e.type&&d({kind:"generic",message:e.error}))},u.current.signal),c===h.current&&f()}catch(e){if(c!==h.current)return;e instanceof DOMException&&"AbortError"===e.name?f():d(e instanceof ee?{kind:"limit",info:e.limitInfo}:{kind:"generic",message:e instanceof Error?e.message:"An error occurred"})}finally{c===h.current&&n(!1)}},[i,s]),p=(0,c.useCallback)(e=>x(e,!0),[x]),g=(0,c.useCallback)(async()=>{let e=m.current;e&&await x(e,!1)},[x]),f=(0,c.useCallback)(()=>{var e;null==(e=u.current)||e.abort()},[]);return{messages:e,streamingText:a,isStreaming:s,conversationId:i,error:o,sendMessage:p,retryLast:g,stopStreaming:f,setConversationId:l,resetThread:(0,c.useCallback)(function(){var e;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];null==(e=u.current)||e.abort(),h.current+=1,m.current=null,t(a),r(""),d(null),n(!1)},[]),submitFeedback:(0,c.useCallback)(async(e,a)=>{let r=null;t(t=>t.map(t=>{var s;return t.id!==e?t:(r=null!=(s=t.feedback)?s:null,{...t,feedback:a})}));try{await (0,Z.Em)("/api/career-advisor/messages/".concat(encodeURIComponent(e),"/feedback"),{method:"POST",body:JSON.stringify({rating:a})})}catch(a){t(t=>t.map(t=>t.id===e?{...t,feedback:r}:t))}},[])}}(),{data:R}=(0,J.I)({queryKey:es,queryFn:er,staleTime:3e4}),{data:T,isLoading:F}=(0,J.I)({queryKey:["career-advisor","messages",l],queryFn:()=>(0,Z.Em)("/api/career-advisor/conversations/".concat(encodeURIComponent(l),"/messages")),enabled:null!==l,staleTime:0}),z=(0,c.useRef)(null);(0,c.useEffect)(()=>{P(l),I(),z.current=null},[l,P,I]),(0,c.useEffect)(()=>{l&&T&&z.current!==l&&(z.current=l,I(T))},[l,T,I]),(0,c.useEffect)(()=>{var e;null==(e=b.current)||e.scrollIntoView({behavior:"smooth"})},[v,N]);let U=(0,c.useCallback)(e=>{(0,H.u)("advisor_opened",{source:e}),r(!0),m(!0);try{localStorage.setItem(ep,"true")}catch(e){}},[]),D=(0,c.useCallback)(()=>{var e;r(!1),null==(e=w.current)||e.focus()},[]);(0,c.useEffect)(()=>{let e=h.get("advisor");if(null===e)return;("open"===e||e.startsWith(eg))&&(U("deeplink"),e.startsWith(eg)&&i(e.slice(eg.length)));let t=new URLSearchParams(h);t.delete("advisor"),x(t,{replace:!0})},[h,x,U]),(0,c.useEffect)(()=>{var e;a&&(null==(e=y.current)||e.focus())},[a]),(0,c.useEffect)(()=>{(null==C?void 0:C.kind)==="limit"&&(0,H.u)("advisor_limit_hit",{plan:C.info.plan})},[C]);let L=async e=>{(0,H.u)("advisor_message_sent",{conversationLength:v.length}),await A(e)},M=async()=>{let e=n.trim();e&&!k&&(i(""),await L(e))},O=0===v.length&&!N,W=p.startsWith("/explore"),V=!u&&!a&&!W;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{ref:w,onClick:()=>a?D():U(u?"bubble":"pill"),"aria-label":a?"Close career advisor":"Open career advisor",className:(0,Y.cn)("fixed bottom-24 right-6 z-50 flex items-center justify-center rounded-full shadow-2xl transition-all motion-reduce:transition-none","border border-gray-900/10 dark:border-white/10 bg-white dark:bg-gray-900",V?"h-12 gap-2 px-4":W?"h-12 w-12":"h-14 w-14",W&&"left-6 right-auto lg:left-auto lg:right-6",a?"scale-90 opacity-75":"scale-100 hover:scale-105 motion-reduce:hover:scale-100"),children:[a?(0,s.jsx)(g.A,{className:"h-5 w-5 text-gray-700 dark:text-gray-300"}):(0,s.jsx)(K.A,{className:"h-5 w-5 text-brand-700 dark:text-brand-400"}),V&&(0,s.jsx)("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Career Advisor"}),!a&&v.length>0&&(0,s.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 rounded-full bg-brand-500"})]}),a&&(0,s.jsxs)("div",{ref:j,role:"dialog","aria-modal":"true","aria-label":"AI Career Advisor",onKeyDown:e=>{if("Escape"===e.key){e.stopPropagation(),D();return}if("Tab"!==e.key)return;let t=j.current;if(!t)return;let a=Array.from(t.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not
1([tabindex="-1"])')),r=a[0],s=a[a.length-1];r&&s&&(e.shiftKey&&document.activeElement===r?(e.preventDefault(),s.focus()):e.shiftKey||document.activeElement!==s||(e.preventDefault(),r.focus()))},className:(0,Y.cn)("fixed z-50 flex flex-col overflow-hidden bg-white dark:bg-gray-950","inset-0","sm:inset-auto sm:bottom-[7.5rem] sm:right-6 sm:h-[540px] sm:w-[380px] sm:rounded-2xl sm:border sm:border-gray-900/10 dark:sm:border-white/10 sm:shadow-2xl",W&&"sm:left-6 sm:right-auto lg:left-auto lg:right-6"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-900/[0.06] dark:border-white/[0.06] px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(B.A,{className:"h-4 w-4 text-brand-700 dark:text-brand-400"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:"AI Career Advisor"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[R&&R.length>0&&(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("select",{value:null!=l?l:"",onChange:e=>d(e.target.value||null),className:"appearance-none rounded-lg border border-gray-900/10 dark:border-white/10 bg-gray-200 dark:bg-gray-800 py-1 pl-2 pr-6 text-[10px] text-gray-700 dark:text-gray-300 focus:outline-none","aria-label":"Select conversation",children:[(0,s.jsx)("option",{value:"",children:"New chat"}),R.map(e=>{var t,a,r;return(0,s.jsx)("option",{value:e.id,children:null!=(r=null!=(a=e.title)?a:null==(t=e.lastMessage)?void 0:t.slice(0,25))?r:"Chat"},e.id)})]}),(0,s.jsx)(Q.A,{className:"pointer-events-none absolute right-1 top-1/2 h-3 w-3 -translate-y-1/2 text-gray-500"})]}),(0,s.jsx)("button",{onClick:D,"aria-label":"Close advisor panel",className:"rounded-md p-1 text-gray-600 dark:text-gray-400 transition-colors hover:text-gray-900 dark:hover:text-white motion-reduce:transition-none",children:(0,s.jsx)(g.A,{className:"h-4 w-4"})})]})]}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto p-4",children:[(0,s.jsx)(em,{}),F&&(0,s.jsx)(ej,{}),!F&&O&&(0,s.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 text-center",children:[(0,s.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-brand-500/10",children:(0,s.jsx)(B.A,{className:"h-6 w-6 text-brand-700 dark:text-brand-400"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1 text-sm font-medium text-gray-900 dark:text-white",children:"Your AI Career Advisor"}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Ask me anything about your career progression"})]}),(0,s.jsx)("div",{className:"flex w-full flex-col gap-1.5",children:ex.map((e,t)=>(0,s.jsx)("button",{onClick:()=>{(0,H.u)("advisor_quick_start_used",{index:t,label:e}),L(e)},className:"rounded-lg border border-gray-900/[0.06] dark:border-white/[0.06] bg-white dark:bg-gray-900 px-3 py-2 text-left text-xs text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-200 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-white",children:e},e))})]}),v.map(e=>(0,s.jsx)(ew,{message:e,onFeedback:(e,t)=>{(0,H.u)("advisor_feedback_given",{rating:t}),q(e,t)},onContinue:e.truncated&&!k?()=>void L("Continue."):void 0},e.id)),N&&(0,s.jsx)(ew,{message:{id:"streaming",role:"assistant",content:N,createdAt:new Date().toISOString()},isStreaming:!0}),k&&(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsxs)("button",{onClick:_,"aria-label":"Stop generating",className:"flex items-center gap-1.5 rounded-full border border-gray-900/10 dark:border-white/10 bg-gray-200/80 dark:bg-gray-800/80 px-3 py-1.5 text-[11px] font-medium text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-300 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white",children:[(0,s.jsx)(G.A,{className:"h-3 w-3 fill-current"}),"Stop generating"]})}),(null==C?void 0:C.kind)==="limit"&&(0,s.jsx)(ev,{info:C.info}),(null==C?void 0:C.kind)==="generic"&&(0,s.jsx)(eN,{onRetry:()=>void E()}),(0,s.jsx)("div",{ref:b})]}),(0,s.jsxs)("div",{className:"border-t border-gray-900/[0.06] dark:border-white/[0.06] p-3",children:[(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("textarea",{ref:y,value:n,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),M())},placeholder:"Ask about your career...",rows:1,className:"flex-1 resize-none rounded-xl border border-gray-900/10 dark:border-white/10 bg-gray-200/80 dark:bg-gray-800/80 px-3 py-2 text-xs text-gray-900 dark:text-white placeholder-gray-600 dark:placeholder-gray-500 focus:border-brand-500/50 focus:outline-none",style:{maxHeight:"96px",overflowY:"auto"},"aria-label":"Chat message"}),(0,s.jsx)("button",{onClick:()=>void M(),disabled:!n.trim()||k,"aria-label":"Send message",className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-brand-500 text-white transition-opacity disabled:opacity-40",children:(0,s.jsx)(f.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsx)("p",{className:"mt-1.5 text-[10px] text-gray-600",children:"Enter to send \xb7 Shift+Enter for newline"})]})]}),S&&(0,s.jsx)("span",{"data-conv-id":S,className:"sr-only"})]})}var eS=a(86786),eC=a(18912),eA=a(34544),eE=a(25349),e_=a(80021),eP=a(33098),eI=a(58997),eq=a(97834);function eR(e){return e>90?"bg-red-500":e>=70?"bg-amber-500":"bg-green-500"}function eT(e){let{className:t}=e,[a,r]=(0,c.useState)(!1),{usage:n,limits:i,isFreeTier:l,isOnTrial:d,isOwner:u,isLoading:m}=(0,eo.Rs)(),{count:h,isLoading:x}=(0,eq.q)();if(!l&&!d||m||!n||!i)return null;let p=[{label:"AI Scores",used:n.aiScoresUsed,limit:i.aiScoresPerMonth},{label:"Deep Research",used:n.deepResearchUsed,limit:i.deepResearchPerMonth},{label:"CV Tailoring",used:n.cvTailoringUsed,limit:i.cvTailoringPerMonth},{label:"Salary Negotiation",used:n.salaryNegotiationUsed,limit:i.salaryNegotiationPerMonth},{label:"Salary Explorer",used:n.salaryExplorerUsed,limit:i.salaryExplorerPerMonth}
1,{label:"Qualification Widget",used:n.qualificationWidgetUsed,limit:i.qualificationWidgetPerMonth},{label:"PPP Comparison",used:n.pppComparisonUsed,limit:i.pppComparisonPerMonth}].filter(e=>"number"==typeof e.limit&&e.limit>0),g=i.autoApplyPerDay,f=-1===g||u,b=f||g<=0?0:Math.min(100,Math.round(h/g*100)),y=!f&&g>0&&h/g>.8,w=!f&&0===g,j=[...p].sort((e,t)=>t.used/t.limit-e.used/e.limit),v=a?j:j.slice(0,3),N=j.some(e=>e.used/e.limit>.8)||y||w;return(0,s.jsxs)("div",{"data-testid":"usage-meter",className:(0,Y.cn)("rounded-lg border border-white/10 bg-white/[0.04] p-3 text-xs backdrop-blur-sm",t),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex w-full items-center justify-between text-white/60 transition-colors hover:text-white/80","aria-label":a?"Collapse usage":"Expand usage",children:[(0,s.jsx)("span",{className:"font-medium text-white/70",children:"Usage this period"}),a?(0,s.jsx)(e_.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(Q.A,{className:"h-3.5 w-3.5"})]}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[v.map(e=>{var t;let a=Math.min(100,Math.round(e.used/e.limit*100)),r=Math.max(0,e.limit-e.used);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between text-white/50",children:[(0,s.jsx)("span",{children:e.label}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsxs)("span",{children:[e.used,"/",e.limit]}),(0,s.jsxs)("span",{className:(t=e.limit,0===r?"text-red-400":r/t<=.2?"text-amber-400":"text-green-400"),children:["(",r," left)"]})]})]}),(0,s.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-white/10",children:(0,s.jsx)("div",{className:(0,Y.cn)("h-full rounded-full transition-all",eR(a)),style:{width:"".concat(a,"%")}})})]},e.label)}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between text-white/50",children:[(0,s.jsx)("span",{children:"Auto-apply / day"}),f?(0,s.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,s.jsx)(eP.A,{className:"h-3 w-3","aria-hidden":"true"}),"Unlimited"]}):x?(0,s.jsx)("span",{"aria-label":"Loading auto-apply count",className:"inline-block h-3 w-16 animate-pulse rounded bg-white/10"}):(0,s.jsxs)("span",{children:[h," / ",g," today"]})]}),!f&&(0,s.jsx)("div",{role:"progressbar","aria-label":"Auto-apply daily usage","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":b,"aria-busy":x||void 0,className:"h-1.5 w-full overflow-hidden rounded-full bg-white/10",children:(0,s.jsx)("div",{className:(0,Y.cn)("h-full rounded-full transition-all",eR(b)),style:{width:"".concat(b,"%")}})}),!f&&(0,s.jsx)("div",{className:"mt-1 text-[10px] text-white/30",children:"Resets at midnight"})]})]}),j.length>3&&!a&&(0,s.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"mt-2 text-white/30 transition-colors hover:text-white/50",children:["+",j.length-3," more metrics"]}),N&&(0,s.jsxs)(o.N_,{to:"/pricing",className:"mt-3 flex items-center gap-1.5 font-medium text-brand-400 transition-colors hover:text-brand-300",children:[(0,s.jsx)(eI.A,{className:"h-3 w-3"}),l?"Upgrade to Starter":"Upgrade your plan"]})]})}function eF(){return"trial-banner-dismissed-".concat(new Date().toISOString().slice(0,10))}function ez(){let{isOnTrial:e,daysLeftInTrial:t}=(0,eo.Rs)(),[a,r]=(0,c.useState)(()=>"true"===localStorage.getItem(eF()));if(!e||a)return null;let n=void 0===t?"Trial active":0===t?"Trial ends today":"Trial ends in ".concat(t," day").concat(1===t?"":"s");return(0,s.jsxs)("div",{"data-testid":"trial-banner",className:(0,Y.cn)("flex items-center justify-between gap-3 rounded-lg px-4 py-2.5 text-sm","bg-gradient-to-r from-amber-900/50 to-yellow-900/40","border border-amber-500/30 backdrop-blur-sm mb-4"),role:"banner","aria-label":"Free trial status",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-amber-300",children:[(0,s.jsx)(eI.A,{className:"h-4 w-4 flex-shrink-0"}),(0,s.jsx)("span",{className:"font-medium",children:n}),(0,s.jsx)("span",{className:"text-amber-300/70",children:"\xb7"}),(0,s.jsx)(o.N_,{to:"/pricing",className:"underline underline-offset-2 transition-colors hover:text-amber-200",children:"Upgrade to keep access"})]}),(0,s.jsx)("button",{type:"button",onClick:function(){localStorage.setItem(eF(),"true"),r(!0)},className:"rounded p-0.5 text-amber-400/60 transition-colors hover:text-amber-300","aria-label":"Dismiss trial banner",children:(0,s.jsx)(g.A,{className:"h-3.5 w-3.5"})})]})}var eU=a(96094),eD=a(99053),eL=a(84223),eM=a(16895);function eB(e){let{to:t,label:a,icon:r,collapsed:n,onClick:i,badge:l}=e,d="number"==typeof l&&l>0,u=null!=l&&l>
199?"99+":String(null!=l?l:""),m=function(e){let[t,a]=(0,c.useState)(""),r=(0,c.useRef)(void 0);return(0,c.useEffect)(()=>{void 0!==e&&e!==r.current&&(r.current=e,a(1===e?"1 application waiting on you":"".concat(e," applications waiting on you")))},[e]),t}(d?l:void 0),h=(0,s.jsxs)(o.k2,{to:t,end:"/"===t,onClick:i,"aria-label":d?"".concat(a,", ").concat(l," waiting"):void 0,className:e=>{let{isActive:t}=e;return(0,Y.cn)("relative flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-all duration-200",n&&"justify-center px-2",t?"bg-brand-500/20 text-brand-400 shadow-sm shadow-brand-500/10":"text-gray-400 hover:bg-white/5 hover:text-gray-200")},children:[(0,s.jsx)(r,{className:"h-5 w-5 flex-shrink-0"}),!n&&(0,s.jsx)("span",{className:"truncate",children:a}),d&&!n&&(0,s.jsx)("span",{"aria-hidden":"true",className:"ml-auto inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-brand-500 px-1.5 py-0.5 text-xs font-semibold text-white",children:u}),d&&n&&(0,s.jsx)("span",{"aria-hidden":"true",className:"absolute right-1 top-1 h-2 w-2 rounded-full bg-brand-500 ring-2 ring-gray-900"})]});return(0,s.jsxs)(s.Fragment,{children:[n?(0,s.jsxs)(eC.m_,{delayDuration:0,children:[(0,s.jsx)(eC.k$,{asChild:!0,children:h}),(0,s.jsx)(eC.ZI,{side:"right",children:a})]}):h,d&&(0,s.jsx)("span",{role:"status","aria-live":"polite",className:"sr-only",children:m})]})}function eO(e){var t,a,r,n,i,d,m,E,P;let{children:I}=e,[R,T]=(0,c.useState)(!1),[F,z]=(0,c.useState)(()=>"true"===localStorage.getItem("sidebar-collapsed")),D=(0,o.zy)(),L=D.pathname.startsWith("/insights")||"/messaging"===D.pathname,{theme:M,toggleTheme:B}=(0,eS.DP)(),{data:O,isOwner:W}=(0,eU.xc)(),V=(0,eM.ft)(),{user:K,signOut:Q}=(0,h.A)(),G=(0,eD.RR)(),{toast:H}=(0,q.dj)(),Z=(0,l.jE)(),{data:X,isError:$}=(0,J.I)({queryKey:eD.ad,queryFn:eL.EU,refetchInterval:6e4,staleTime:15e3}),ee=(0,c.useRef)(null);(0,c.useEffect)(()=>{var e;if($||void 0===X)return;let t=X.count,a=ee.current;if(ee.current=t,null===a||t<=a)return;let r=t-a;H("info",1===(e=r)?"1 application needs you":"".concat(e," applications need you"),{label:"Open",to:function(e,t){if(1!==e)return"/needs-you";let a=function(e){var t;if(!e||0===e.length)return null;let a=e.reduce((e,t)=>t.waitingSince?(null==e?void 0:e.waitingSince)&&!(t.waitingSince>e.waitingSince)?e:t:e,null);return null!=(t=null!=a?a:e[0])?t:null}(t.getQueryData(eD.uB));return a?"/needs-you?application=".concat(encodeURIComponent(a.id)):"/needs-you"}(r,Z)})},[X,$,Z,H]);let et=(0,o.Zp)(),ea=(0,c.useCallback)(async()=>{try{await Q()}catch(e){}et("/login",{replace:!0})},[Q,et]);(0,c.useEffect)(()=>{T(!1)},[D.pathname]),(0,c.useEffect)(()=>{localStorage.setItem("sidebar-collapsed",String(F))},[F]);let er=(0,c.useCallback)(()=>T(!1),[]),es=null!=(d=null==(t=eE.e.find(e=>e.to===D.pathname||"/"!==e.to&&D.pathname.startsWith(e.to)))?void 0:t.label)?d:"Job Tracker",en=null!=(E=null!=(m=null==O||null==(r=O.displayName)||null==(a=r[0])?void 0:a.toUpperCase())?m:null==K||null==(i=K.email)||null==(n=i[0])?void 0:n.toUpperCase())?E:"U";return(0,s.jsxs)(eC.Bc,{children:[(0,s.jsxs)("div",{className:"relative flex h-screen overflow-hidden bg-background",children:[(0,s.jsx)("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:rounded-md focus:bg-primary focus:px-4 focus:py-2 focus:text-primary-foreground focus:shadow-lg",children:"Skip to main content"}),(0,s.jsx)(p.N,{children:R&&(0,s.jsx)(x.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm lg:hidden",onClick:er,"aria-hidden":"true"})}),(0,s.jsxs)(x.P.aside,{animate:{width:F?64:256},transition:{type:"spring",stiffness:300,damping:30},className:(0,Y.cn)("fixed inset-y-0 left-0 z-50 flex flex-col glass-sidebar transition-transform duration-200 lg:static lg:translate-x-0",R?"translate-x-0":"-translate-x-full"),"aria-label":"Main navigation",children:[(0,s.jsxs)("div",{className:"flex h-14 items-center border-b border-white/5 px-2",children:[(0,s.jsx)(o.k2,{to:"/","aria-label":"Quarrion — home",className:(0,Y.cn)("flex flex-1 items-center overflow-hidden rounded-md px-3 py-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500",F&&"justify-center px-2"),children:F?(0,s.jsx)(u.m,{size:32,replayOnHover:!0}):(0,s.jsx)(A.g,{size:32,animated:!0})}),(0,s.jsx)("button",{type:"button",onClick:er,className:"rounded-md p-1 text-gray-400 hover:text-white lg:hidden","aria-label":"Close navigation",children:(0,s.jsx)(g.A,{className:"h-5 w-5"})})]}),(0,s.jsxs)("nav",{className:"flex-1 space-y-1 overflow-y-auto px-2 py-4","aria-label":"Sidebar",children:[eE.e.map(e=>(0,s.jsx)(eB,{to:e.to,label:e.label,icon:e.icon,collapsed:F,onClick:er,badge:"/needs-you"===e.to?G:void 0},e.to)),V&&(0,s.jsx)(eB,{to:"/messaging",label:"Messaging",icon:f.A,collapsed:F,onClick:er}),W&&(0,s.jsx)(eB,{to:"/admin",label:"Admin",icon:b.A,collapsed:F,onClick:er})]}),!F&&(0,s.jsx)(eT,{className:"mx-2 mb-2"}),(0,s.jsx)("div",{className:"flex h-14 items-center border-t border-white/5 px-3",children:(0,s.jsx)("button",{type:"button",onClick:()=>z(e=>!e),className:"hidden lg:flex w-full items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-white/5 hover:text-white transition-colors","aria-label":F?"Expand sidebar":"Collapse sidebar",children:F?(0,s.jsx)(y.A,{className:"h-4 w-4"}):(0,s.jsx)(w.A,{className:"h-4 w-4"})})})]}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,s.jsxs)("header",{className:"flex h-14 items-center gap-3 border-b border-gray-200 dark:border-white/5 bg-white/80 dark:bg-gray-950/80 backdrop-blur-lg px-4 lg:px-6",children:[(0,s.jsx)("button",{type:"button",onClick:()=>T(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-accent lg:hidden","aria-label":"Open navigation",children:(0,s.jsx)(j.A,{className:"h-5 w-5"})}),(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsx)("h1",{className:"text-sm font-semibold text-foreground",children:es})}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)(_.$,{variant:"outline",size:"sm",onClick:()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0}))},className:"hidden sm:flex items-center gap-2 text-muted-foreground",children:[(0,s.jsx)(v.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"text-xs",children:"Search..."}),(0,s.jsxs)("kbd",{className:"pointer-events-none ml-auto hidden h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium sm:flex",children:[(0,s.jsx)("span",{className:"text-xs",children:"⌘"}),"K"]})]}),(0,s.jsx)(_.$,{variant:"ghost",size:"icon",onClick:B,"aria-label":"Toggle theme",children:"dark"===M?(0,s.jsx)(N.A,{className:"h-4 w-4 text-muted-foreground"}):(0,s.jsx)(k.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,s.jsxs)(eA.rI,{children:[(0,s.jsx)(eA.ty,{asChild:!0,children:(0,s.jsx)("button",{type:"button","aria-label":"Open user menu",className:"rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background transition-transform hover:scale-105",children:(null==O?void 0:O.avatarUrl)?(0,s.jsx)("img",{src:O.avatarUrl,alt:"User avatar",className:"w-8 h-8 rounded-full object-cover"}):(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center text-white text-xs font-medium",children:en})})}),(0,s.jsxs)(eA.SQ,{align:"end",className:"w-56",children:[(0,s.jsx)(eA.lp,{className:"px-2 py-1.5",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-0.5",children:[(0,s.jsx)("p",{className:"text-sm font-medium leading-none truncate",children:null!=(P=null==O?void 0:O.displayName)?P:"Account"}),(null==K?void 0:K.email)&&(0,s.jsx)("p",{className:"text-xs leading-none text-muted-foreground truncate",children:K.email})]})}),(0,s.jsx)(eA.mB,{}),(0,s.jsxs)(eA._2,{onSelect:()=>et("/settings"),children:[(0,s.jsx)(S.A,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),(0,s.jsx)("span",{children:"Account settings"})]}),W&&(0,s.jsxs)(eA._2,{onSelect:()=>et("/admin"),children:[(0,s.jsx)(b.A,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),(0,s.jsx)("span",{children:"Admin"})]}),(0,s.jsx)(eA.mB,{}),(0,s.jsxs)(eA._2,{onSelect:ea,className:"text-red-600 focus:bg-destructive/10 focus:text-red-600 dark:text-red-400 dark:focus:text-red-400",children:[(0,s.jsx)(C.A,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),(0,s.jsx)("span",{children:"Sign out"})]})]})]})]})]}),(0,s.jsx)("main",{id:"main-content",className:"flex-1 overflow-y-auto bg-background",children:L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ez,{}),I]}):(0,s.jsxs)("div",{className:"mx-auto max-w-7xl min-h-full px-4 py-6 sm:px-6 sm:py-8",children:[(0,s.jsx)(ez,{}),I]})})]})]}),(0,s.jsx)(U,{}),(0,s.jsx)(ek,{})]})}var eW=a(23626),eV=a(26862),eK=a(13119),eQ=a(59289),eG=a(75892),eY=a(16330),eH=a(81983),eJ=a(8921),eZ=a(21456),eX=a(97854),e$=a(45810),e0=a(24643),e1=a(38756),e2=
1a(36323),e5=a(88371);let e3=(0,c.forwardRef)((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(e2.uB,{ref:t,className:(0,Y.cn)("flex h-full w-full flex-col overflow-hidden rounded-lg bg-white/95 dark:bg-gray-900/95 text-foreground backdrop-blur-xl",a),...r})});function e4(e){let{children:t,...a}=e;return(0,s.jsx)(e5.lG,{...a,children:(0,s.jsx)(e5.Cf,{className:"overflow-hidden p-0",children:(0,s.jsx)(e3,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-group]]:px-2",children:t})})})}e3.displayName=e2.uB.displayName;let e6=(0,c.forwardRef)((e,t)=>{let{className:a,...r}=e;return(0,s.jsxs)("div",{className:"flex items-center border-b border-border px-3","cmdk-input-wrapper":"",children:[(0,s.jsx)(v.A,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,s.jsx)(e2.uB.Input,{ref:t,className:(0,Y.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...r})]})});e6.displayName=e2.uB.Input.displayName;let e8=(0,c.forwardRef)((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(e2.uB.List,{ref:t,className:(0,Y.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...r})});e8.displayName=e2.uB.List.displayName;let e7=(0,c.forwardRef)((e,t)=>(0,s.jsx)(e2.uB.Empty,{ref:t,className:"py-6 text-center text-sm text-muted-foreground",...e}));e7.displayName=e2.uB.Empty.displayName;let e9=(0,c.forwardRef)((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(e2.uB.Group,{ref:t,className:(0,Y.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...r})});e9.displayName=e2.uB.Group.displayName;let te=(0,c.forwardRef)((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(e2.uB.Separator,{ref:t,className:(0,Y.cn)("-mx-1 h-px bg-border",a),...r})});te.displayName=e2.uB.Separator.displayName;let tt=(0,c.forwardRef)((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(e2.uB.Item,{ref:t,className:(0,Y.cn)("relative flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",a),...r})});tt.displayName=e2.uB.Item.displayName;let ta=[{name:"Home",path:"/",icon:eV.A,keywords:"home top picks overview best scored recommendations"},{name:"Pipeline",path:"/pipeline",icon:eK.A,keywords:"run agent flow status"},{name:"Applications",path:"/kanban",icon:eQ.A,keywords:"board drag drop cards kanban"},{name:"CV & Letters",path:"/cv",icon:eG.A,keywords:"resume upload profiles cover letter"},{name:"Explore",path:"/explore",icon:eY.A,keywords:"explore browse search corpus all jobs discover roles find"},{name:"Messaging",path:"/messaging",icon:f.A,keywords:"follow up email outreach queue linkedin messaging"},{name:"Analytics",path:"/analytics",icon:eH.A,keywords:"charts metrics data"},{name:"Daily Digest",path:"/digest",icon:eJ.A,keywords:"summary today alerts"},{name:"Knowledge Graph",path:"/knowledge-graph",icon:eZ.A,keywords:"skills entities trends"},{name:"Insights",path:"/insights",icon:eX.A,keywords:"insights career radar salary explorer globe intelligence analytics"},{name:"Career Radar",path:"/insights/career-radar",icon:e$.A,keywords:"ml map clusters umap intelligence career radar embedding insights"},{name:"Salary Explorer",path:"/insights/salary-explorer",icon:e0.A,keywords:"salary pay compensation globe country insights explorer benchmarks"},{name:"Settings",path:"/settings",icon:S.A,keywords:"preferences config"}],tr=[{name:"Run Pipeline",action:"run-pipeline",icon:e1.A,keywords:"trigger start discovery"},{name:"Search Jobs",action:"search-jobs",icon:v.A,keywords:"find filter"}];function ts(){let[e,t]=(0,c.useState)(!1),a=(0,o.Zp)(),{isOwner:r}=(0,eU.xc)(),n=(0,c.useMemo)(()=>r?ta:ta.filter(e=>"/pipeline"!==e.path),[r]),i=(0,c.useMemo)(()=>
1r?tr:tr.filter(e=>"run-pipeline"!==e.action),[r]);(0,c.useEffect)(()=>{let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t(e=>!e))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let l=(0,c.useCallback)(e=>{t(!1),a(e)},[a]),d=(0,c.useCallback)(e=>{t(!1),"run-pipeline"===e?a("/pipeline"):"search-jobs"===e&&a("/")},[a]);return(0,s.jsxs)(e4,{open:e,onOpenChange:t,children:[(0,s.jsx)(e6,{placeholder:"Type a command or search..."}),(0,s.jsxs)(e8,{children:[(0,s.jsx)(e7,{children:"No results found."}),(0,s.jsx)(e9,{heading:"Pages",children:n.map(e=>(0,s.jsxs)(tt,{value:"".concat(e.name," ").concat(e.keywords),onSelect:()=>l(e.path),children:[(0,s.jsx)(e.icon,{className:"mr-2 h-4 w-4 opacity-70"}),(0,s.jsx)("span",{children:e.name})]},e.path))}),(0,s.jsx)(te,{}),(0,s.jsx)(e9,{heading:"Actions",children:i.map(e=>(0,s.jsxs)(tt,{value:"".concat(e.name," ").concat(e.keywords),onSelect:()=>d(e.action),children:[(0,s.jsx)(e.icon,{className:"mr-2 h-4 w-4 opacity-70"}),(0,s.jsx)("span",{children:e.name})]},e.action))})]})]})}var tn=a(50928),ti=a(48322),tl=a(11861),to=a(88631),td=a(6298),tc=a(21675),tu=a(18114);let tm={cv:"We couldn't tailor your CV for this job. Please try again.",coverLetter:"We couldn't generate this cover letter. Please try again."};function th(e,t){tc.JH.settle({jobId:e.jobId,kind:e.kind,status:"failed",error:t,needsBaseCv:!1,changesSummary:null,emphasisAreas:null,keyPoints:null,hadArtifactAtStart:e.hadArtifactAtStart})}function tx(){let{state:e,inFlightJobIds:t}=(0,td.Xg)(),{toast:a}=(0,q.dj)(),r=(0,l.jE)(),s=(0,c.useRef)(new Set),n=(0,c.useRef)(0),{data:i}=(0,J.I)({queryKey:["document-generation-watch",t.join(",")],queryFn:()=>(0,ti.CO)(t),enabled:t.length>0,refetchInterval:3e3,refetchIntervalInBackground:!0,staleTime:0,gcTime:0,retry:!1}),o=(0,c.useCallback)(async(e,t)=>{try{let s="cv"===e.kind?await (0,tl.e1)(e.jobId):await (0,to.gz)(e.jobId);if(t&&!function(e,t){if(!e)return!1;let a=Date.parse(e);return!Number.isNaN(a)&&a>=t.startedAt-6e4}(null==s?void 0:s.generatedAt,e))return;tc.JH.settle({jobId:e.jobId,kind:e.kind,status:"succeeded",error:null,needsBaseCv:!1,changesSummary:"cv"===e.kind&&null!=(a=null==s?void 0:s.changesSummary)?a:null,emphasisAreas:"cv"===e.kind&&null!=(n=null==s?void 0:s.emphasisAreas)?n:null,keyPoints:"coverLetter"===e.kind&&null!=(i=null==s?void 0:s.keyPoints)?i:null,hadArtifactAtStart:e.hadArtifactAtStart});var a,n,i,l=e.jobId;for(let e of[["workflow-status"],["tailored-cvs"],["cover-letters"],["tailored-cv",l],["tailored-cv-versions",l],["subscription"]])r.invali
1dateQueries({queryKey:e})}catch(t){th(e,t instanceof Error?t.message:"")}finally{s.current.delete("".concat(e.kind,":").concat(e.jobId))}},[r]);return(0,c.useEffect)(()=>{if(0===e.entries.length)return;let t=Date.now();for(let a of e.entries){let e="".concat(a.kind,":").concat(a.jobId);if(s.current.has(e))continue;let r=function(e,t,a){let r=(0,tc.PJ)(t,e.kind);if(r&&function(e,t){let a=Date.parse(e.createdAt);return!Number.isNaN(a)&&a>=t.startedAt-6e4}(r,e)){var s;return"succeeded"===r.status?{kind:"succeeded"}:"failed"===r.status?{kind:"failed",error:null!=(s=r.error)?s:""}:{kind:"pending"}}let n=a-e.startedAt>tc.TQ[e.kind];return(0,tc.Xz)(t,e.kind)?e.hadArtifactAtStart?n?{kind:"failed",error:tc.A7[e.kind]}:{kind:"verify"}:{kind:"succeeded"}:n?{kind:"failed",error:tc.A7[e.kind]}:{kind:"pending"}}(a,null==i?void 0:i[a.jobId],t);if("pending"!==r.kind){if("failed"===r.kind){th(a,r.error);continue}s.current.add(e),o(a,"verify"===r.kind)}}},[i,e.entries,o]),(0,c.useEffect)(()=>{for(let t of[e.outcomes.cv,e.outcomes.coverLetter])if(t&&!(t.id<=n.current)){if(n.current=Math.max(n.current,t.id),"succeeded"===t.status){a("success",function(e){var t,a;return"cv"===e.kind?e.changesSummary?"CV tailored: ".concat(e.changesSummary):"CV tailored — ready to review":"Cover letter generated: ".concat(null!=(a=null==(t=e.keyPoints)?void 0:t[0])?a:"Ready")}(t));continue}a("error",(0,tu.o8)(t.error?Error(t.error):null,tm[t.kind]),t.needsBaseCv?{label:"Upload CV",to:"/cv"}:{label:"Retry",onClick:()=>void(0,tc.LV)(t.jobId,t.kind,{hadArtifactAtStart:t.hadArtifactAtStart})})}},[e.outcomes,a]),null}var tp=a(60844);function tg(e){let{children:t}=e,{isAuthenticated:a,loading:r}=(0,h.A)(),{shouldRedirectToOnboarding:n,loading:i}=(0,m.z)(),l=(0,o.zy)(),[d,u]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{let e=setTimeout(()=>u(!0),1e4);return()=>clearTimeout(e)},[]),(r||i)&&!d)?(0,s.jsxs)("div",{className:"flex h-screen items-center justify-center bg-white dark:bg-gray-950",role:"status","aria-label":"Loading",children:[(0,s.jsx)(tp.A,{className:"h-6 w-6 animate-spin text-brand-500"}),(0,s.jsx)("span",{className:"sr-only",children:"Loading..."})]}):a?n&&"/onboarding"!==l.pathname?(0,s.jsx)(o.C5,{to:"/onboarding",replace:!0}):(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsx)(o.C5,{to:"/login",replace:!0})}function tf(e){let{children:t}=e,{isOwner:a,isLoading:r}=(0,eU.xc)();return r?(0,s.jsxs)("div",{className:"flex h-64 items-center justify-center",role:"status","aria-label":"Loading",children:[(0,s.jsx)(tp.A,{className:"h-6 w-6 animate-spin text-brand-500"}),(0,s.jsx)("span",{className:"sr-only",children:"Loading…"})]}):a?(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsx)(o.C5,{to:"/",replace:!0})}var tb=a(94661);let ty={metaLabel:"001 — The agent",chips:["Autonomous","Free tier"],headlineLead:"Your job search,",headlineEmphasis:"run by an agent.",subheadline:"Quarrion scans, scores, tailors and applies — you interview.",primaryCta:{label:"Start free",href:"/signup"},secondaryCta:{label:"Sign in",href:"/login"}},tw={title:"Quarrion — AI Job Search Agent That Applies For You",description:"Quarrion is an AI job-search agent: it scans 100+ job boards, scores every role against your CV, tailors your application, and drafts your recruiter replies — so you wake up to interviews."},tj=[{n:1,title:"Deep research, not keyword overlap",ours:"A three-tier pipeline scores every role against your CV, then researches the ones worth your time and tags what it found.",gap:"Most tools compare keywords and call it a match score."},{n:2,title:"Dead listings filtered out",ours:"Every listing is probed for liveness before it reaches you, so you are not applying into a closed req.",gap:"Ghost listings are the single most common complaint in this category."},{n:3,title:"Auto-apply with an approval gate",ours:"The agent fills and submits real applications, but you approve what goes out. Quality without spray-and-pray.",gap:"Blasters get accounts bot-flagged; autofill tools still leave the work to you."},{n:4,title:"Salary intelligence that is real",ours:"Published medians of what employers actually advertised — every sector, stated pay only, with the posting count on every figure. Plus city-level benchmarks adjusted for cost of living and inflation, with live FX, on an explorable globe.",gap:"Salary figures are often quoted with no sample behind them, or with missing pay filled in by a model."},{n:5,title:"Outreach and follow-ups built in",ours:"A unified re
1cruiter inbox with AI-drafted replies and follow-ups tied to the application record.",gap:"Trackers store contacts. They do not close the loop."},{n:6,title:"CV tailoring that cannot invent skills",ours:"Tailoring is grounded in your own profile and knowledge graph, so it rewrites what you have rather than inventing what you do not.",gap:"Hallucinated skills are a documented problem with AI CV tools."},{n:7,title:"The whole pipeline in one place",ours:"Discovery, scoring, research, tailoring, applying, messaging, interview prep, and offer negotiation.",gap:"Every alternative covers two or three of these stages. None covers the loop."}],tv=[{src:"/marketing/screenshot-scored-matches.png",alt:"Top Picks board showing roles ranked by match score with research tags",caption:"Every role scored against your CV — ranked, not listed.",width:1280,height:720},{src:"/marketing/screenshot-score-detail.png",alt:"An expanded role card showing the score breakdown and research findings",caption:"And it shows its working, so you can disagree with it.",width:986,height:365},{src:"/marketing/screenshot-pipeline-board.png",alt:"Application pipeline board with roles arranged across stage columns",caption:"Every application tracked from applied to offer.",width:1280,height:720},{src:"/marketing/screenshot-recruiter-draft.png",alt:"Recruiter message thread with an AI-drafted reply ready to send",caption:"Recruiter replies drafted and waiting for your approval.",width:1280,height:720},{src:"/marketing/screenshot-insights.png",alt:"Insights view showing skill coverage across matched roles",caption:"What the market keeps asking for that you do not have yet.",width:1280,height:720},{src:"/marketing/screenshot-salary-globe.png",alt:"Interactive 3D globe showing salary benchmarks by city",caption:"And what the job is worth, wherever it is.",width:1280,height:720}],tN={src:"/marketing/product-tour.mp4",poster:"/marketing/screenshot-scored-matches.png",width:1280,height:720,description:"The Top Picks board filling with scored roles, each tagged with what the agent researched."},tk=[{question:"Does it apply to jobs without asking me?",answer:"No. The agent prepares each application and queues it for your approval — you decide what goes out. You can review every application before it is submitted."},{question:"Do I need to upload a CV to start?",answer:"Yes, and it is the only setup step that matters. Everything the agent does — scoring, tailoring, drafting — is grounded in your CV, so it will not invent experience you do not have."},{question:"Is it actually free to start?",answer:"Yes. The free tier needs no card and gives you scored jobs on your first session. Paid plans add volume, auto-apply and tailoring."},{question:"What if I get hired?",answer:"Then it worked, and you should cancel. You can cancel from your settings at any time and keep access until the end of the period you have paid for."},{question:"Which job boards does it cover?",answer:"Over 100 boards and company career pages, including Ashby, Workable, Greenhouse and Lever, plus aggregator feeds — with each listing checked to still be open before it reaches you."}];var tS=a(88918);let tC="rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a]",tA=[.22,1,.36,1];function tE(){return(0,s.jsx)("div",{"aria-hidden":"true","data-testid":"film-grain",className:"pointer-events-none fixed inset-0 z-40 opacity-[0.05] mix-blend-overlay",style:{backgroundImage:'url("'.concat("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E",'")'),backgroundSize:"160px 160px"}})}function t_(e){let{children:t,className:a=""}=e;return(0,s.jsx)("p",{className:"m-0 font-mono text-[11px] uppercase leading-relaxed tracking-[0.18em] text-white/60 ".concat(a),children:t})}function tP(e){let{children:t}=e;return(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-white/15 px-3 py-1 font-mono text-[10.5px] uppercase tracking-[0.14em] text-white/70",children:t})}var tI=a(27186);function tq(){let e=(0,tI.I)(),[t,a]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{let e=window.setTimeout(()=>a(!0),1e3);return()=>window.clearTimeout(e)},[]),e)?null:(0,s.jsx)(p.N,{children:!t&&(0,s.jsx)(x.P.div,{"aria-hidden":"true","data-testid":"preloader",className:"fixed inset-0 z-[90] flex items-center justify-center bg-[#06070a]",initial:{opacity:1},exit:{opacity:0,transition:{duration:.5,ease:"easeOut"}},children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(x.P.span,{className:"h-2.5 w-2.5 rounded-full bg-brand-500",animate:{scale:[1,1.6,1],opacity:[.5,1,.5]},transition:{duration:.9,repeat:1/0,ease:"easeInOut"}}),(0,s.jsx)("span",{className:"font-mono text-xs uppercase tracking-[0.3em] text-white/60",children:"Quarrion"})]})})})}var tR=a(7874),tT=a(18493);let tF=[{href:"#features",label:"Product"}
1,{href:"#how",label:"How it works"},{href:"#pricing",label:"Pricing"}];function tz(){let[e,t]=(0,c.useState)(()=>new Date);return(0,c.useEffect)(()=>{let e=window.setInterval(()=>t(new Date),1e3);return()=>window.clearInterval(e)},[]),(0,s.jsx)("span",{"aria-hidden":"true",className:"hidden font-mono text-[10.5px] uppercase tracking-[0.14em] text-white/60 lg:block",children:function(e){let t=e.toLocaleTimeString("en-GB",{hour12:!1}),a=e.toLocaleDateString("en-GB",{weekday:"long"});return"".concat(t," — ").concat(a)}(e)})}function tU(){let e=(0,tI.I)(),{scrollY:t}=(0,tR.L)(),a=(0,tT.G)(t,[0,240],[1,.94]),r=(0,tT.G)(t,[0,240],[20,10]);return(0,s.jsxs)(x.P.nav,{"aria-label":"Primary",style:e?{top:12}:{scale:a,top:r},className:"fixed inset-x-0 z-50 mx-auto flex w-[min(94vw,760px)] items-center justify-between gap-3 rounded-full border border-white/10 bg-white/5 py-2 pl-5 pr-2 backdrop-blur-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("a",{href:"#top",className:"flex items-center no-underline ".concat(tC),"aria-label":"Quarrion home",children:(0,s.jsx)(A.g,{size:24})}),(0,s.jsx)(tz,{})]}),(0,s.jsx)("div",{className:"hidden items-center gap-6 text-[13px] text-white/70 md:flex",children:tF.map(e=>(0,s.jsx)("a",{href:e.href,className:"transition-colors hover:text-white ".concat(tC),children:e.label},e.href))}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(o.N_,{to:"/login",className:"px-3 py-2 text-[13px] text-white/70 transition-colors hover:text-white ".concat(tC),children:"Sign in"}),(0,s.jsx)(o.N_,{to:"/signup",className:"flex h-9 items-center rounded-full bg-white px-4 text-[13px] font-semibold text-[#06070a] transition-colors hover:bg-white/85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a]",children:"Start free"})]})]})}var tD=a(19760),tL=a(98425),tM=a(46021);function tB(e){let{children:t,className:a}=e,r=(0,c.useRef)(null),n=(0,tI.I)(),i=(0,tL.d)(0),l=(0,tL.d)(0),o=(0,tM.z)(i,{stiffness:260,damping:18,mass:.5}),d=(0,tM.z)(l,{stiffness:260,damping:18,mass:.5});return(0,s.jsx)(x.P.div,{ref:r,className:a,style:n?void 0:{x:o,y:d},onMouseMove:e=>{let t=r.current;if(!t||n)return;let a=t.getBoundingClientRect(),s=e.clientX-(a.left+a.width/2),o=e.clientY-(a.top+a.height/2),d=Math.hypot(s,o)||1,c=Math.min(d,24);i.set(s/d*c),l.set(o/d*c)},onMouseLeave:()=>{i.set(0),l.set(0)},children:t})}function tO(e){let{children:t,index:a}=e;return(0,s.jsx)("span",{className:"block overflow-hidden pb-[0.08em]",children:(0,s.jsx)(x.P.span,{className:"block will-change-transform",initial:{y:"110%"},animate:{y:0},transition:{duration:.9,ease:tA,delay:.9+.08*a},children:t})})}function tW(){return(0,s.jsxs)("header",{className:"relative flex min-h-screen flex-col justify-center px-6 pt-24 sm:px-12",children:[(0,s.jsxs)("div",{className:"mx-auto w-full max-w-[1400px]",children:[(0,s.jsxs)(x.P.div,{className:"mb-10 flex flex-wrap items-center gap-3",initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.8,delay:1.25},children:[(0,s.jsx)(t_,{children:ty.metaLabel}),ty.chips.map(e=>(0,s.jsx)(tP,{children:e},e))]}),(0,s.jsxs)("h1",{className:"m-0 font-display text-[clamp(2.9rem,9.5vw,8.5rem)] font-semibold leading-[0.98] tracking-[-0.04em] text-white",children:[(0,s.jsx)(tO,{index:0,children:ty.headlineLead}),(0,s.jsx)(tO,{index:1,children:(0,s.jsx)("em",{className:"font-serif font-normal italic tracking-[-0.01em] text-brand-300",children:ty.headlineEmphasis})})]}),(0,s.jsxs)(x.P.div,{className:"mt-12 flex flex-col gap-8 sm:flex-row sm:items-end sm:justify-between",initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.8,ease:tA,delay:1.35},children:[(0,s.jsx)("p",{className:"m-0 max-w-xs font-mono text-[12px] uppercase leading-relaxed tracking-[0.14em] text-white/60",children:ty.subheadline}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(tB,{children:(0,s.jsxs)(o.N_,{to:ty.primaryCta.href,className:"group inline-flex items-center gap-2.5 rounded-full bg-brand-600 px-7 py-4 text-[15px] font-semibold text-white shadow-lg shadow-brand-600/25 transition-colors hover:bg-brand-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a]",children:[ty.primaryCta.label,(0,s.jsx)(tD.A,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-1","aria-hidden":"true"})]})}),(0,s.jsx)(o.N_,{to:ty.secondaryCta.href,className:"text-[15px] text-white/70 underline-offset-4 transition-colors hover:text-white hover:underline ".concat(tC),children:ty.secondaryCta.label})]})]})]}),(0,s.jsxs)(x.P.div,{className:"pointer-events-none absolute inset-x-6 bottom-6 flex items-center justify-between sm:inset-x-12",initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:1,delay:1.6},"aria-hidden":"true",children:[(0,s.jsx)("span",{className:"font-mono text-[10.5px] uppercase tracking-[0.18em] text-white/50",children:"Scroll — the pipeline"}),(0,s.jsx)("span",{className:"font-mono text-[10.5px] uppercase tracking-[0.18em] text-white/50",children:"quarrion.ai"})]})]})}let tV=[{word:"DISCOVERS.",caption:"100+ boards"},{word:"SCORES.",caption:"against your CV"},{word:"TAILORS.",caption:"CV + cover letter per role"},{word:"APPLIES.",caption:"forms filled for you"},{word:"REPLIES.",caption:"recruiter drafts ready"}];function tK(e){let{index:t,word:a,caption:r,progress:n}=e,i=tV.length,l=(t+.5)/i,o=.5/i,d=(0,tT.G)(n,[l-o,l-.45*o,l+.45*o,l+o],[0,1,1,0]),c=(0,tT.G)(n,[l-o,l-.45*o,l+.45*o,l+o],[.94,1,1,1.04]);return(0,s.jsxs)(x.P.div,{style:{opacity:d,scale:c},className:"absolute inset-0 flex flex-col items-center justify-center px-6","aria-hidden":"true",children:[(0,s.jsx)("div",{className:"absolute left-6 top-24 sm:left-12 sm:top-28",children:(0,s.jsxs)(t_,{children:[String(t+1).padStart(3,"0")," — ",r]})}),(0,s.jsx)("span",{className:"font-display text-[clamp(3.4rem,14vw,13rem)] font-bold leading-none tracking-[-0.04em] text-white",children:a})]})}function tQ(){return(0,s.jsx)("section",{id:"how",className:"px-6 py-28 sm:px-12","aria-label":"What the agent does",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-10",children:"002 — While you sleep, Quarrion"}),(0,s.jsx)("ul",{className:"m-0 flex list-none flex-col gap-8 p-0",children:tV.map((e,t)=>(0,s.jsxs)("li",{className:"flex flex-col gap-1",children:[(0,s.jsxs)(t_,{children:[String(t+1).padStart(3,"0")," — ",e.caption]}),(0,s.jsx)("span",{className:"font-display text-[clamp(2.4rem,7vw,6rem)] font-bold leading-none tracking-[-0.04em] text-white",children:e.word})]},e.word))})]})})}function tG(){let e=(0,c.useRef)(null),t=(0,tI.I)(),{scrollYProgress:a}=(0,tR.L)({target:e,offset:["start start","end end"]});return t?(0,s.jsx)(tQ,{}):(0,s.jsxs)("section",{id:"how",ref:e,className:"relative h-[400vh]","aria-label":"What the agent does",children:[(0,s.jsx)("p",{className:"sr-only",children:"While you sleep, Quarrion discovers roles on 100+ boards, scores them against your CV, tailors your CV and cover letter, applies for you, and drafts recruiter replies."}),(0,s.jsxs)("div",{className:"sticky top-0 h-screen overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2","aria-hidden":"true",children:(0,s.jsx)(t_,{children:"while you sleep, Quarrion"})}),tV.map((e,t)=>(0,s.jsx)(tK,{index:t,word:e.word,caption:e.caption,progress:a},e.word))]})]})}var tY=a(54553),tH=a(82292);let tJ=[.16,1,.3,1];function tZ(e){let{children:t,className:a,delay:r=0,as:n="div"}=e,i=x.P[n];return(0,s.jsx)(i,{className:a,initial:{opacity:0,y:28},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.9,ease:tJ,delay:r},children:t})}let tX="product-tour-heading",t$="product-tour-description";function t0(){let e=(0,c.useRef)(null),t=(0,c.useRef)(null),a=(0,tI.I)(),r=(0,tY.W)(e,{once:!0,margin:"100% 0p
1x"}),[n,i]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!r||a)return;let e=t.current;if(!e)return;let s=e.play();s instanceof Promise&&s.catch(()=>i(!1))},[r,a]),(0,s.jsxs)("div",{ref:e,className:"relative overflow-hidden rounded-3xl border border-white/10 bg-white/[0.03] shadow-2xl shadow-black/50",children:[(0,s.jsx)("video",{ref:t,"data-testid":"product-tour-video",className:"block h-auto w-full",src:r?tN.src:void 0,poster:tN.poster,width:tN.width,height:tN.height,preload:"none",muted:!0,loop:!0,playsInline:!0,"aria-label":tN.description,"aria-describedby":t$,onPlay:()=>i(!0),onPause:()=>i(!1)}),(0,s.jsxs)("button",{type:"button",onClick:()=>{let e=t.current;if(!e)return;if(!e.paused)return void e.pause();let a=e.play();a instanceof Promise&&a.catch(()=>i(!1))},"aria-label":n?"Pause product tour":"Play product tour",className:"absolute bottom-4 left-4 inline-flex items-center gap-2 rounded-full border border-white/15 bg-black/60 px-4 py-2 font-mono text-[10.5px] uppercase tracking-[0.14em] text-white/80 backdrop-blur-md transition-colors hover:bg-black/80 hover:text-white ".concat(tC),children:[n?(0,s.jsx)(tH.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}):(0,s.jsx)(e1.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),(0,s.jsx)("span",{"aria-hidden":"true",children:n?"Pause":"Play"})]})]})}function t1(){return(0,s.jsx)("section",{id:"product-tour","aria-labelledby":tX,className:"px-6 py-32 sm:px-12",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-6",children:"003 — The product"}),(0,s.jsxs)("h2",{id:tX,className:"m-0 max-w-4xl font-display text-[clamp(2.2rem,6vw,4.8rem)] font-semibold leading-[1.02] tracking-[-0.04em] text-white",children:["The ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"product."})]}),(0,s.jsx)(tZ,{className:"mt-14",children:(0,s.jsx)(t0,{})}),(0,s.jsxs)("div",{className:"mt-8 flex flex-col gap-6 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("p",{id:t$,className:"m-0 max-w-xl font-mono text-[11px] uppercase leading-relaxed tracking-[0.14em] text-white/60",children:tN.description}),(0,s.jsxs)(o.N_,{to:"/signup",className:"group inline-flex flex-none items-center gap-2.5 self-start rounded-full bg-brand-600 px-7 py-3.5 text-[15px] font-semibold text-white shadow-lg shadow-brand-600/25 transition-colors hover:bg-brand-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a] sm:self-auto",children:["Start free",(0,s.jsx)(tD.A,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-1","aria-hidden":"true"})]})]})]})})}let t2="We believe applying to jobs is robot work. You were built for interviews — not for copy-pasting your CV into 400 portals. So we built the robot.",t5=t2.split(" ");function t3(e){let{index:t,progress:a}=e,r=t/t5.length,n=(t+1)/t5.length,i=(0,tT.G)(a,[r,n],[.15,1]);return(0,s.jsxs)(x.P.span,{style:{opacity:i},className:"inline",children:[t5[t]," "]})}function t4(){let e=(0,c.useRef)(null),t=(0,tI.I)(),{scrollYProgress:a}=(0,tR.L)({target:e,offset:["start 0.75","end 0.45"]});return(0,s.jsx)("section",{ref:e,className:"px-6 py-40 sm:px-12","aria-label":"Manifesto",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1100px]",children:[(0,s.jsx)(t_,{className:"mb-10",children:"004 — Why"}),(0,s.jsx)("p",{className:"m-0 font-display text-[clamp(1.7rem,4.2vw,3.4rem)] font-medium leading-[1.25] tracking-[-0.02em] text-white",children:t?t2:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"sr-only",children:t2}),(0,s.jsx)("span",{"aria-hidden":"true",children:t5.map((e,t)=>(0,s.jsx)(t3,{index:t,progress:a},"".concat(e,"-").concat(t)))})]})})]})})}function t6(e){let{to:t,suffix:a="",durationMs:r=1300}=e,n=(0,c.useRef)(null),i=(0,tY.W)(n,{once:!0,amount:.6}),[l]=(0,c.useState)(()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches),[o,d]=(0,c.useState)(l?t:0);return(0,c.useEffect)(()=>{if(!i||l)return;let e=0,a=null,s=n=>{null!=a||(a=n);let i=Math.min(1,(n-a)/r);d(Math.round(t*(1-Math.pow(1-i,3)))),i<1&&(e=requestAnimationFrame(s))};return e=requestAnimationFrame(s),()=>cancelAnimationFrame(e)}
1,[i,l,t,r]),(0,s.jsxs)("span",{ref:n,children:[o.toLocaleString("en-US"),a]})}let t8=[{tier:"Step 1",name:"Find",detail:"roles pulled from 100+ job boards this week",count:1e3,ratio:1},{tier:"Step 2",name:"Score",detail:"actually fit your CV, your salary, your locations",count:120,ratio:.42},{tier:"Step 3",name:"Research",detail:"get a deep dive — the company, the team, the pay",count:12,ratio:.16}];function t7(e){let{tier:t,name:a,detail:r,count:n,ratio:i,index:l}=e,o=(0,tI.I)();return(0,s.jsxs)(tZ,{as:"li",delay:.12*l,children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-6 gap-y-2",children:[(0,s.jsxs)(t_,{className:"w-40 flex-none !text-brand-400",children:[t," — ",a]}),(0,s.jsx)("span",{className:"font-display text-[clamp(2.6rem,8vw,6.5rem)] font-bold leading-none tracking-[-0.04em] text-white",children:(0,s.jsx)(t6,{to:n})}),(0,s.jsx)("span",{className:"max-w-xs font-mono text-[11px] uppercase leading-relaxed tracking-[0.14em] text-white/50",children:r})]}),(0,s.jsx)(x.P.div,{"aria-hidden":"true",initial:o?void 0:{scaleX:0},whileInView:o?void 0:{scaleX:1},viewport:{once:!0,amount:.6},transition:{duration:1.1,ease:tA,delay:.12*l+.2},className:"mt-5 h-px origin-left bg-gradient-to-r from-brand-400/80 to-white/10",style:{width:"".concat(100*i,"%")}})]})}function t9(){return(0,s.jsx)("section",{id:"features",className:"px-6 py-32 sm:px-12","aria-label":"How the agent decides",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-10",children:"005 — How it decides"}),(0,s.jsx)(tZ,{children:(0,s.jsxs)("h2",{className:"m-0 max-w-[900px] font-display text-[clamp(2.2rem,6vw,4.6rem)] font-bold leading-[1.02] tracking-[-0.03em] text-white",children:["It reads 1,000 roles."," ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"You read three."})]})}),(0,s.jsx)("ul",{className:"m-0 mt-20 flex list-none flex-col gap-14 p-0",children:t8.map((e,t)=>(0,s.jsx)(t7,{...e,index:t},e.tier))}),(0,s.jsx)(tZ,{delay:.45,className:"mt-16",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-6 gap-y-2",children:[(0,s.jsx)(t_,{className:"w-40 flex-none",children:"You see"}),(0,s.jsx)("span",{className:"font-display text-[clamp(2.6rem,8vw,6.5rem)] font-bold leading-none tracking-[-0.04em] text-brand-400",children:(0,s.jsx)(t6,{to:3})}),(0,s.jsx)("span",{className:"font-mono text-[11px] uppercase leading-relaxed tracking-[0.14em] text-white/70",children:"great-fit applications, CV tailored to each — the rest handled for you"})]})})]})})}let ae=["CV","Goals","Tone","History","Feedback"],at=["Target: Staff Product Engineer","Floor: \xa3110k","Remote-first","London / Lisbon","No early-stage"],aa="Hi Sarah — thanks for reaching out. The platform role looks like a strong match: four years shipping data products, and the band works for me. Free Thursday for a call.";function ar(){let e=(0,tI.I)(),t=e?void 0:{animate:{rotate:-360},transition:{duration:60,ease:"linear",repeat:1/0}};return(0,s.jsxs)("div",{"aria-hidden":"true",className:"relative mx-auto aspect-square w-full max-w-[440px]",children:[(0,s.jsx)("div",{className:"absolute inset-0 rounded-full border border-white/[0.07]"}),(0,s.jsx)("div",{className:"absolute inset-[18%] rounded-full border border-white/[0.05]"}),(0,s.jsx)("div",{className:"absolute left-1/2 top-1/2 grid h-24 w-24 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full border border-brand-400/40 bg-brand-500/10",children:(0,s.jsx)("span",{className:"font-mono text-[11px] uppercase tracking-[0.18em] text-brand-300",children:"You"})}),(0,s.jsx)(x.P.div,{className:"absolute inset-0",...e?void 0:{animate:{rotate:360},transition:{duration:60,ease:"linear",repeat:1/0}},children:ae.map((e,a)=>{let r=a/ae.length*2*Math.PI-Math.PI/2,n=50+50*Math.cos(r),i=50+50*Math.sin(r);return(0,s.jsx)("div",{className:"absolute -translate-x-1/2 -translate-y-1/2",style:{left:"".concat(n,"%"),top:"".concat(i,"%")},children:(0,s.jsx)(x.P.div,{...t,className:"rounded-full border border-white/15 bg-[#0b0d12] px-4 py-2 font-mono text-[10.5px] uppercase tracking-[0.14em] text-white/75",children:e})},e)})})]})}function as(){let e=(0,c.useRef)(null),t=(0,tY.W)(e,{once:!0,amount:.6}),[a]=(0,c.useState)(()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches),[r,n]=(0,c.useState)(a?aa.length:0);return(0,c.useEffect)(()=>
1{if(!t||a||r>=aa.length)return;let e=window.setTimeout(()=>n(e=>e+2),24);return()=>window.clearTimeout(e)},[t,a,r]),(0,s.jsxs)("p",{ref:e,className:"m-0 min-h-[5.5rem] text-sm leading-relaxed text-white/85",children:["“",aa.slice(0,r),r<aa.length&&(0,s.jsx)("span",{className:"animate-pulse text-brand-300",children:"▍"}),r>=aa.length&&"”"]})}function an(){return(0,s.jsx)("section",{className:"px-6 py-32 sm:px-12","aria-label":"It applies as you",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-10",children:"006 — The context"}),(0,s.jsx)(tZ,{children:(0,s.jsxs)("h2",{className:"m-0 font-display text-[clamp(2.2rem,6vw,4.6rem)] font-bold leading-[1.02] tracking-[-0.03em] text-white",children:["It applies as ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"you."})]})}),(0,s.jsxs)("div",{className:"mt-20 grid grid-cols-1 items-center gap-16 lg:grid-cols-2",children:[(0,s.jsxs)(tZ,{children:[(0,s.jsx)(ar,{}),(0,s.jsx)("p",{className:"mx-auto mt-8 max-w-sm text-center font-mono text-[11px] uppercase leading-relaxed tracking-[0.14em] text-white/50",children:"It learns you — every decision you make sharpens the next one"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-10",children:[(0,s.jsxs)(tZ,{delay:.1,children:[(0,s.jsx)(t_,{className:"mb-4",children:"Your goals, scored into every decision"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2.5",children:at.map(e=>(0,s.jsx)(tP,{children:e},e))})]}),(0,s.jsx)(tZ,{delay:.2,children:(0,s.jsxs)("div",{className:"rounded-3xl border border-white/10 bg-white/[0.03] p-6 shadow-2xl shadow-black/50 sm:p-7",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-4",children:[(0,s.jsx)(t_,{children:"Messaging / in your voice"}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-2 font-mono text-[10.5px] uppercase tracking-[0.14em] text-emerald-300/80",children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400"}),"Draft ready"]})]}),(0,s.jsx)(as,{}),(0,s.jsx)("p",{className:"mb-0 mt-5 font-mono text-[10.5px] uppercase tracking-[0.14em] text-white/45",children:"Written from your CV, your tone, your goals — while you slept"})]})})]})]})]})})}let ai="product-shots-heading";function al(){return(0,s.jsx)("section",{id:"screenshots","aria-labelledby":ai,className:"px-6 py-32 sm:px-12",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-6",children:"007 — On screen"}),(0,s.jsxs)("h2",{id:ai,className:"m-0 max-w-4xl font-display text-[clamp(2.2rem,6vw,4.8rem)] font-semibold leading-[1.02] tracking-[-0.04em] text-white",children:["On ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"screen."})]}),(0,s.jsx)("div",{className:"mt-16 grid gap-6 lg:grid-cols-2",children:tv.map((e,t)=>(0,s.jsx)(tZ,{delay:t%2*.08,children:(0,s.jsxs)("figure",{className:"m-0 overflow-hidden rounded-3xl border border-white/10 bg-white/[0.03] shadow-2xl shadow-black/50",children:[(0,s.jsx)("img",{src:e.src,alt:e.alt,width:e.width,height:e.height,loading:"lazy",decoding:"async",className:"block h-auto w-full"}),(0,s.jsx)("figcaption",{className:"border-t border-white/[0.06] px-5 py-4 font-mono text-[11px] uppercase leading-relaxed tracking-[0.14em] text-white/60",children:e.caption})]})},e.src))})]})})}let ao=(0,c.lazy)(()=>Promise.all([a.e(4198),a.e(6295),a.e(7388),a.e(9235),a.e(5517),a.e(4076),a.e(4511),a.e(6138),a.e(1746)]).then(a.bind(a,91746)).then(e=>({default:e.GlobeView}))),ad=[{city:"London",lat:51.5074,lng:-.1278,median:95e3,currency:"GBP",source:"base"},{city:"New York",lat:40.7128,lng:-74.006,median:145e3,currency:"USD",source:"base"},{city:"San Francisco",lat:37.7749,lng:-122.4194,median:165e3,currency:"USD",source:"base"},{city:"Berlin",lat:52.52,lng:13.405,median:78e3,currency:"EUR",source:"base"},{city:"Amsterdam",lat:52.3676,lng:4.9041,median:82e3,currency:"EUR",source:"base"},{city:"Lisbon",lat:38.7223,lng:-9.1393,median:52e3,currency:"EUR",source:"base"},{city:"Zurich",lat:47.3769,lng:8.5417,median:13e4,currency:"CHF",source:"base"},{city:"Toronto",lat:43.6532,lng:-79.3832,median:98e3,currency:"CAD",source:"base"},{city:"Singapore",lat:1.3521,lng:103.8198,median:11e4,currency:"SGD",source:"base"},{city:"Sydney",lat:-33.8688,lng:151.2093,median:105e3,currency:"AUD",source:"base"},{city:"Tokyo",lat:35.6762,lng:139.6503,median:88e3,currency:"JPY",source:"base"},{city:"Dubai",lat:25.2048,lng:55.2708,median:92e3,currency:"AED",source:"base"},{city:"S\xe3o Paulo",lat:-23.5505,lng:-46.6333,median:46e3,currency:"BRL",source:"base"},{city:"Bengaluru",lat:12.9716,lng:77.5946,median:38e3,currency:"INR",source:"base"}],ac=new Map;function au(){return(0,s.jsx)("div",{className:"grid h-full w-full place-items-center","aria-hidden":"true",children:(0,s.jsx)("div",{className:"h-40 w-40 animate-pulse rounded-full border border-brand-400/30 bg-brand-500/5"})})}function am(){let e=(0,c.useRef)(null),t=(0,tY.W)(e,{once:!0,margin:"100% 0p
1x"}),a=(0,tI.I)();return(0,s.jsxs)("section",{ref:e,className:"relative overflow-hidden","aria-label":"Salary Explorer",children:[(0,s.jsxs)("div",{className:"relative mx-auto max-w-[1400px] px-6 pb-8 pt-32 sm:px-12",children:[(0,s.jsx)(t_,{className:"mb-10",children:"008 — The market"}),(0,s.jsx)(tZ,{children:(0,s.jsxs)("h2",{className:"m-0 font-display text-[clamp(2.2rem,6vw,4.6rem)] font-bold leading-[1.02] tracking-[-0.03em] text-white",children:["Know your worth."," ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"Anywhere."})]})}),(0,s.jsx)(tZ,{delay:.1,children:(0,s.jsx)("p",{className:"m-0 mt-6 max-w-md font-mono text-[11px] uppercase leading-relaxed tracking-[0.14em] text-white/50",children:"What your role really pays in 40+ cities — adjusted for cost of living"})})]}),(0,s.jsxs)("div",{className:"pointer-events-none relative mx-auto h-[52vh] min-h-[380px] w-full max-w-[1100px] sm:h-[64vh]","data-testid":"salary-globe-stage","aria-hidden":"true",children:[t&&(0,s.jsx)(c.Suspense,{fallback:(0,s.jsx)(au,{}),children:(0,s.jsx)(ao,{autoRotate:!a,cityMarkers:ad,salaryData:ac})}),(0,s.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-32 bg-gradient-to-b from-transparent to-[#06070a]"})]})]})}let ah=[{to:100,suffix:"+",label:"job boards scanned"},{literal:"24/7",label:"agent uptime"},{literal:"<60s",label:"to your first scored match"},{to:0,suffix:"",label:"copy-paste"}];function ax(){return(0,s.jsx)("section",{className:"px-6 py-32 sm:px-12","aria-label":"Quarrion in numbers",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-14",children:"009 — The numbers"}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-x-10 gap-y-16 sm:grid-cols-2",children:ah.map((e,t)=>(0,s.jsxs)(tZ,{delay:.08*t,children:[(0,s.jsx)("div",{className:"font-display text-[clamp(4.5rem,15vw,11rem)] font-bold leading-[0.9] tracking-[-0.04em] text-white",children:"literal"in e?e.literal:(0,s.jsx)(t6,{to:e.to,suffix:e.suffix})}),(0,s.jsx)(t_,{className:"mt-4",children:e.label})]},e.label))})]})})}let ap=[{icon:"\uD83D\uDD0D",label:"Discover",tint:"border-brand-500/30 bg-brand-500/10 text-brand-300"},{icon:"★",label:"Score",tint:"border-violet-500/30 bg-violet-500/10 text-violet-300"},{icon:"◎",label:"Research",tint:"border-emerald-500/30 bg-emerald-500/10 text-emerald-300"},{icon:"✎",label:"Tailor",tint:"border-amber-500/30 bg-amber-500/10 text-amber-300"},{icon:"✓",label:"Apply",tint:"border-pink-500/30 bg-pink-500/10 text-pink-300"}];function ag(){return(0,s.jsxs)("div",{className:"relative","aria-hidden":"true",children:[(0,s.jsxs)("div",{className:"absolute -inset-8 z-0 overflow-hidden rounded-3xl",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(120%_120%_at_70%_20%,rgba(37,99,235,0.16),transparent_55%)]"}),(0,s.jsx)("div",{className:"q-anim-grid absolute inset-0 [background-size:44px_44px] [background-image:linear-gradient(rgba(255,255,255,0.045)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.045)_1px,transparent_1px)] [mask-image:radial-gradient(70%_70%_at_50%_40%,#000,transparent)]"})]}),(0,s.jsxs)("div",{className:"q-anim-float-slow relative z-10 overflow-hidden rounded-2xl border border-white/10 bg-gradient-to-b from-[#141821]/90 to-[#0b0d12]/95 shadow-2xl shadow-black/60 backdrop-blur-md",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-white/[0.07] px-[18px] py-3.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"q-anim-blink h-2.5 w-2.5 rounded-full bg-emerald-400 shadow-[0_0_10px_#22c55e]"}),(0,s.jsx)("span",{className:"font-mono text-xs tracking-wide text-white/70",children:"agent \xb7 running"})]}),(0,s.jsx)("span",{className:"font-mono text-[11.5px] text-white/70",children:"sweep every few hrs"})]}),(0,s.jsxs)("div",{className:"relative px-5 pb-5 pt-6",children:[(0,s.jsx)("div",{className:"relative mx-2 mb-5 h-0.5 bg-white/10",children:(0,s.jsx)("div",{className:"q-anim-flow absolute top-0 h-0.5 w-[70px] bg-gradient-to-r from-transparent via-brand-500 to-transparent"})}),(0,s.jsx)("div",{className:"flex justify-between px-0.5",children:ap.map(e=>(0,s.jsxs)("div",{className:"flex flex-1 flex-col items-center gap-2.5",children:[(0,s.jsx)("span",{className:"grid h-[34px] w-[34px] place-items-center rounded-[9px] border ".concat(e.tint),children:e.icon}),(0,s.jsx)("span",{className:"text-[10.5px] text-white/50",children:e.label})]},e.label))})]}),(0,s.jsxs)("div",{className:"mx-4 mb-[18px] mt-1 rounded-2xl border border-white/[0.08] bg-white/[0.025] px-4 py-[15p
1x]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-white/95",children:"Senior ML Engineer"}),(0,s.jsx)("div",{className:"mt-0.5 text-xs text-white/50",children:"Anthropic \xb7 Remote \xb7 \xa3120k–\xa3150k"})]}),(0,s.jsxs)("div",{className:"relative grid h-[52px] w-[52px] flex-none place-items-center rounded-full",style:{background:"conic-gradient(#3b82f6 0 340deg, rgba(255,255,255,.08) 340deg 360deg)"},children:[(0,s.jsx)("span",{className:"absolute inset-[5px] rounded-full bg-[#0d0f14]"}),(0,s.jsx)("span",{className:"relative text-[15px] font-bold text-white",children:"94"})]})]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[(0,s.jsx)("span",{className:"rounded-md bg-brand-500/10 px-2 py-[3px] text-[10.5px] text-brand-200",children:"Skills 96"}),(0,s.jsx)("span",{className:"rounded-md bg-white/5 px-2 py-[3px] text-[10.5px] text-white/60",children:"Seniority 92"}),(0,s.jsx)("span",{className:"rounded-md bg-white/5 px-2 py-[3px] text-[10.5px] text-white/60",children:"Salary 90"}),(0,s.jsx)("span",{className:"whitespace-nowrap rounded-md bg-emerald-500/10 px-2 py-[3px] text-[10.5px] text-emerald-300",children:"✨ Reply ready"})]})]})]})]})}function af(e){let{children:t,meta:a,depth:r}=e,n=(0,c.useRef)(null),i=(0,tI.I)(),{scrollYProgress:l}=(0,tR.L)({target:n,offset:["start end","end start"]}),o=(0,tT.G)(l,[0,1],[46*r,-46*r]),d=(0,tT.G)(l,[0,1],[1.4*r,-1.4*r]);return(0,s.jsxs)(x.P.div,{ref:n,style:i?void 0:{y:o,rotate:d},whileHover:i?void 0:{scale:1.02},transition:{type:"spring",stiffness:220,damping:20},className:"overflow-hidden rounded-3xl border border-white/10 bg-white/[0.03] p-5 shadow-2xl shadow-black/50 sm:p-7",children:[(0,s.jsx)(t_,{className:"mb-5",children:a}),t]})}function ab(){return(0,s.jsxs)("div",{"aria-hidden":"true",className:"rounded-2xl border border-white/[0.08] bg-[#0b0d12]/80 px-5 py-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-white/95",children:"Staff Product Engineer"}),(0,s.jsx)("div",{className:"mt-1 text-xs text-white/55",children:"Remote \xb7 \xa3110k–\xa3140k"})]}),(0,s.jsxs)("div",{className:"relative grid h-14 w-14 flex-none place-items-center rounded-full",style:{background:"conic-gradient(#3b82f6 0 330deg, rgba(255,255,255,.08) 330deg 360deg)"},children:[(0,s.jsx)("span",{className:"absolute inset-[5px] rounded-full bg-[#0d0f14]"}),(0,s.jsx)("span",{className:"relative text-[15px] font-bold text-white",children:"92"})]})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-1.5 font-mono text-[10.5px]",children:[(0,s.jsx)("span",{className:"rounded-md bg-brand-500/10 px-2 py-1 text-brand-200",children:"skills 95"}),(0,s.jsx)("span",{className:"rounded-md bg-white/5 px-2 py-1 text-white/60",children:"seniority 91"}),(0,s.jsx)("span",{className:"rounded-md bg-white/5 px-2 py-1 text-white/60",children:"salary 90"})]})]})}function ay(){return(0,s.jsxs)("div",{"aria-hidden":"true",className:"rounded-2xl border border-white/[0.08] bg-[#0b0d12]/80 px-5 py-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"q-anim-blink h-2 w-2 rounded-full bg-emerald-400"}),(0,s.jsx)("span",{className:"font-mono text-[11px] uppercase tracking-[0.14em] text-white/60",children:"draft ready \xb7 06:12"})]}),(0,s.jsx)("p",{className:"mb-0 mt-3 text-[13px] leading-relaxed text-white/70",children:"“Hi Sarah — thanks for reaching out. The platform role sounds like a strong match; I'm free Thursday for a call…”"}),(0,s.jsx)("div",{className:"mt-4 inline-flex items-center rounded-full border border-white/15 px-3 py-1 font-mono text-[10.5px] uppercase tracking-[0.14em] text-emerald-300",children:"Written while you slept"})]})}function aw(){return(0,s.jsx)("section",{className:"px-6 py-32 sm:px-12","aria-label":"Product proof",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-6",children:"010 — Proof"}),(0,s.jsxs)("h2",{className:"m-0 max-w-4xl font-display text-[clamp(2.2rem,6vw,4.8rem)] font-semibold leading-[1.02] tracking-[-0.04em] text-white",children:["The agent, ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"at work."})]}),(0,s.jsxs)("div",{className:"mt-16 grid items-start gap-6 lg:grid-cols-3",children:[(0,s.jsx)(af,{meta:"pipeline / live",depth:1,children:(0,s.jsx)(ag,{})}
1),(0,s.jsx)(af,{meta:"scoring / per role",depth:-1,children:(0,s.jsx)(ab,{})}),(0,s.jsx)(af,{meta:"messaging / drafts",depth:1,children:(0,s.jsx)(ay,{})})]})]})})}let aj="proof-points-heading";function av(){return(0,s.jsx)("section",{id:"why-quarrion","aria-labelledby":aj,className:"px-6 py-32 sm:px-12",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-6",children:"011 — The difference"}),(0,s.jsxs)("h2",{id:aj,className:"m-0 max-w-4xl font-display text-[clamp(2.2rem,6vw,4.8rem)] font-semibold leading-[1.02] tracking-[-0.04em] text-white",children:["The ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"difference."})]}),(0,s.jsx)("ul",{className:"m-0 mt-16 grid list-none gap-px overflow-hidden rounded-2xl border border-white/10 bg-white/10 p-0 md:grid-cols-2",children:tj.map((e,t)=>(0,s.jsxs)(tZ,{as:"li",delay:t%2*.08,className:"flex flex-col gap-3 bg-[#06070a] p-8",children:[(0,s.jsx)(t_,{children:String(e.n).padStart(3,"0")}),(0,s.jsx)("h3",{className:"m-0 font-display text-[clamp(1.15rem,2.4vw,1.65rem)] font-semibold leading-tight tracking-[-0.02em] text-white",children:e.title}),(0,s.jsx)("p",{className:"m-0 text-[15px] leading-relaxed text-white/70",children:e.ours}),(0,s.jsx)("p",{className:"m-0 mt-auto pt-3 font-mono text-[10.5px] uppercase leading-relaxed tracking-[0.14em] text-white/45",children:e.gap})]},e.n))}),(0,s.jsx)("div",{className:"mt-12 flex justify-start",children:(0,s.jsxs)(o.N_,{to:"/signup",className:"group inline-flex items-center gap-2.5 rounded-full bg-brand-600 px-7 py-3.5 text-[15px] font-semibold text-white shadow-lg shadow-brand-600/25 transition-colors hover:bg-brand-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a]",children:["Start free",(0,s.jsx)(tD.A,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-1","aria-hidden":"true"})]})})]})})}let aN=[{name:"Free",price:"\xa30",cta:"Start free",lines:["50 jobs \xb7 25 scores / mo","3 boards","no card required"]},{name:"Starter",price:"\xa316.99",per:"/mo",cta:"Get Starter",lines:["500 jobs \xb7 200 scores / mo","auto-apply 10 / day","CV tailoring + outreach"]},{name:"Pro",price:"\xa329.99",per:"/mo",cta:"Go Pro",featured:!0,lines:["unlimited jobs \xb7 1,000 scores","auto-apply 50 / day","salary negotiation + linkedin messaging"]}];function ak(){return(0,s.jsx)("section",{id:"pricing",className:"border-t border-white/[0.06] px-6 py-32 sm:px-12","aria-label":"Pricing",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-6",children:"012 — Pricing"}),(0,s.jsxs)("h2",{className:"m-0 font-display text-[clamp(2.2rem,6vw,4.8rem)] font-semibold leading-[1.02] tracking-[-0.04em] text-white",children:["Start free. ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"Upgrade later."})]}),(0,s.jsx)("div",{className:"mt-16 grid gap-px overflow-hidden rounded-2xl border border-white/10 bg-white/10 md:grid-cols-3",children:aN.map((e,t)=>(0,s.jsxs)(tZ,{delay:.08*t,className:"flex flex-col gap-6 p-8 ".concat(e.featured?"bg-brand-950/60":"bg-[#06070a]"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(t_,{children:e.name}),e.featured&&(0,s.jsx)("span",{className:"rounded-full border border-brand-400/40 px-3 py-1 font-mono text-[10px] uppercase tracking-[0.14em] text-brand-300",children:"Most popular"})]}),(0,s.jsxs)("div",{className:"font-display text-5xl font-semibold tracking-[-0.03em] text-white",children:[e.price,e.per&&(0,s.jsx)("span",{className:"text-base font-normal text-white/60",children:e.per})]}),(0,s.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:e.lines.map(e=>(0,s.jsx)("li",{className:"font-mono text-[11.5px] uppercase tracking-[0.12em] text-white/70",children:e},e))}),(0,s.jsx)(o.N_,{to:"/signup",className:"mt-auto flex h-11 items-center justify-center rounded-full text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a] ".concat(e.featured?"bg-brand-600 text-white hover:bg-brand-500":"border border-white/15 text-white hover:bg-white/10"),children:e.cta})]},e.name))}),(0,s.jsx)("p",{className:"mb-0 mt-8 font-mono text-[11px] uppercase tracking-[0.14em] text-white/60",children:"Included with Pro \xb7 LinkedIn Messaging — 100 drafted messages / month, no add-on to buy"})]})})}var aS=a(10614),aC=a(12494);let aA="landing-faq-heading";function aE(e){let{item:t,index:a}=e,[r,n]=(0,c.useState)(!1),i="landing-faq-button-".concat(a),l="landing-faq-panel-".concat(a);return(0,s.jsxs)("li",{className:"border-b border-white/[0.08]",children:[(0,s.jsx)("h3",{className:"m-0",children:(0,s.jsxs)("button",{type:"button",id:i,"aria-expanded":r,"aria-controls":l,onClick:()=>n(e=>!e),className:"flex w-full items-center justify-between gap-6 bg-transparent py-6 text-left ".concat(tC),children:[(0,s.jsx)("span",{className:"font-display text-[clamp(1.05rem,2.2vw,1.5rem)] font-semibold tracking-[-0.02em] text-white",children:t.question}),(0,s.jsx)("span",{"aria-hidden":"true",className:"grid h-8 w-8 flex-none place-items-center rounded-full border border-white/15 text-white/70",children:r?(0,s.jsx)(aS.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(aC.A,{className:"h-3.5 w-3.5"})})]})}),(0,s.jsx)("div",{id:l,role:"region","aria-labelledby":i,hidden:!r,children:(0,s.jsx)("p",{className:"m-0 max-w-3xl pb-7 pr-10 text-[15px] leading-relaxed text-white/70",children:t.answer})})]})}function a_(){return(0,s.jsx)("section",{id:"faq","aria-labelledby":aA,className:"border-t border-white/[0.06] px-6 py-32 sm:px-12",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1400px]",children:[(0,s.jsx)(t_,{className:"mb-6",children:"013 — Questions"}),(0,s.jsxs)("h2",{id:aA,className:"m-0 max-w-4xl font-display text-[clamp(2.2rem,6vw,4.8rem)] font-semibold leading-[1.02] tracking-[-0.04em] text-white",children:["Your ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"questions."})]}),(0,s.jsx)(tZ,{className:"mt-14",children:(0,s.jsx)("ul",{className:"m-0 grid list-none border-t border-white/[0.08] p-0 lg:max-w-4xl",children:tk.map((e,t)=>(0,s.jsx)(aE,{item:e,index:t},e.question))})}),(0,s.jsxs)("p",{className:"mt-10 max-w-3xl text-[15px] leading-relaxed text-white/55",children:["Billing questions — trials, cancelling, refunds —"," ",(0,s.jsx)(o.N_,{to:"/pricing",className:"font-medium text-white/85 underline underline-offset-4 hover:text-white ".concat(tC),children:"are answered on the pricing page"}),"."]}),(0,s.jsx)("div",{className:"mt-12",children:(0,s.jsxs)(o.N_,{to:"/signup",className:"group inline-flex items-center gap-2.5 rounded-full bg-brand-600 px-7 py-3.5 text-[15px] font-semibold text-white shadow-lg shadow-brand-600/25 transition-colors hover:bg-brand-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a]",children:["Start free",(0,s.jsx)(tD.A,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-1","aria-hidden":"true"})]})})]})})}function aP(){return(0,s.jsxs)("section",{className:"relative flex min-h-screen flex-col items-center justify-center px-6 text-center sm:px-12","aria-label":"Get started",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute left-1/2 top-1/2 h-[420px] w-[640px] -translate-x-1/2 -translate-y-1/2 bg-[radial-gradient(circle,rgba(37,99,235,0.22),transparent_65%)] blur-2xl","aria-hidden":"true"}),(0,s.jsxs)(tZ,{className:"relative flex flex-col items-center",children:[(0,s.jsx)(t_,{className:"mb-8",children:"014 — Tomorrow morning"}),(0,s.jsxs)("h2",{className:"m-0 font-display text-[clamp(2.8rem,9vw,8rem)] font-semibold leading-[0.98] tracking-[-0.04em] text-white",children:["Wake up to ",(0,s.jsx)("em",{className:"font-serif font-normal italic text-brand-300",children:"interviews."})]}),(0,s.jsx)(tB,{className:"mt-14",children:(0,s.jsxs)(o.N_,{to:"/signup",className:"group inline-flex items-center gap-2.5 rounded-full bg-white px-9 py-4 text-base font-semibold text-[#06070a] transition-colors hover:bg-white/85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[#06070a]",children:["Start free",(0,s.jsx)(tD.A,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-1","aria-hidden":"true"})]})}),(0,s.jsx)("p",{className:"mb-0 mt-6 font-mono text-[11px] uppercase tracking-[0.14em] text-white/60",children:"Free plan \xb7 no card required"})]})]})}function aI(){let e=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{var t,a,r;if(e.current)return;e.current=!0;let s=(0,tS.YA)();(0,H.u)("landing_viewed",{source:null!=(t=null==s?void 0:s.utmSource)?t:null,medium:null!=(a=null==s?void 0:s.utmMedium)?a:null,campaign:null!=(r=null==s?void 0:s.utmCampaign)?r:null})},[]),(0,c.useEffect)(()=>{var e;document.title=tw.title;let t=null!=(e=document.querySelector('meta[name="description"]'))?e:document.createElement("meta");t.setAttribute("name","description"),t.setAttribute("content",tw.description),t.parentNode||document.head.appendChild(t)},[]),(0,s.jsx)(tb.x,{reducedMotion:"user",children:(0,s.jsxs)("div",{id:"top",className:"dark relative min-h-screen overflow-x-clip bg-[#06070a] font-display text-[#eef1f6]",children:[(0,s.jsxs)("div",{className:"pointer-events-none fixed inset-0 z-0","aria-hidden":"true",children:[(0,s.jsx)("div",{className:"q-anim-glow absolute -top-40 left-[12%] h-[620px] w-[620px] rounded-full bg-[radial-gradient(circle,rgba(37,99,235,0.24),transparent_62%)] blur-3xl"}),(0,s.jsx)("div",{className:"q-anim-glow-2 absolute right-[-120px] top-[60vh] h-[560px] w-[560px] rounded-full bg-[radial-gradient(circle,rgba(99,102,241,0.16),transparent_62%)] blur-3xl"})]}),(0,s.jsx)(tE,{}),(0,s.jsx)(tq,{}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsx)(tU,{}),(0,s.jsx)(tW,{}),(0,s.jsx)(tG,{}),(0,s.jsx)(t1,{}),(0,s.jsx)(t4,{}),(0,s.jsx)(t9,{}),(0,s.jsx)(an,{}),(0,s.jsx)(al,{}),(0,s.jsx)(am,{}),(0,s.jsx)(ax,{}),(0,s.jsx)(aw,{}),(0,s.jsx)(av,{}),(0,s.jsx)(ak,{}),(0,s.jsx)(a_,{}),(0,s.jsx)(aP,{}),(0,s.jsxs)("footer",{className:"flex flex-col items-center justify-between gap-3 border-t border-white/[0.06] px-6 py-6 sm:flex-row sm:px-12",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(A.g,{size:20}),(0,s.jsxs)("span",{className:"font-mono text-[11px] uppercase tracking-[0.14em] text-white/60",children:["\xa9 ",new Date().getFullYear()," quarrion.ai"]})]}),(0,s.jsxs)("nav",{"aria-label":"Footer",className:"flex flex-wrap items-center justify-center gap-5 font-mono text-[11px] uppercase tracking-[0.14em] text-white/60",children:[(0,s.jsx)(o.N_,{to:"/pricing",className:"transition-colors hover:text-white ".concat(tC),children:"Pricing"}),(0,s.jsx)(o.N_,{to:"/privacy",className:"transition-colors hover:text-white ".concat(tC),children:"Privacy"}),(0,s.jsx)(o.N_,{to:"/terms",className:"transition-colors hover:text-white ".concat(tC),children:"Terms"}),(0,s.jsx)("a",{href:"mailto:[email protected]",className:"transition-colors hover:text-white ".concat(tC),children:"Contact"})]})]})]})]})})}var aq=a(56005),aR=a(5631),aT=a(70419),aF=a(64751);function az(e){let{factorId:t,onSuccess:a,onCancel:r}=e,[n,i]=(0,c.useState)(""),[l,o]=(0,c.useState)(""),[d,u]=(0,c.useState)(!1),m=(0,c.useCallback)(async()=>
1{if(6===n.length){o(""),u(!0);try{let{data:e,error:r}=await $.N.auth.mfa.challenge({factorId:t});if(r)return void o(r.message);let{error:s}=await $.N.auth.mfa.verify({factorId:t,challengeId:e.id,code:n});if(s){o(s.message),i("");return}a()}catch(e){o(e instanceof Error?e.message:"Verification failed")}finally{u(!1)}}},[n,t,a]),h=(0,c.useCallback)(e=>{"Enter"===e.key&&6===n.length&&m()},[n,m]);return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-brand-500/10",children:(0,s.jsx)(aT.A,{className:"h-6 w-6 text-brand-500"})}),(0,s.jsx)("h2",{className:"text-lg font-bold text-white",children:"Two-Factor Authentication"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Enter the 6-digit code from your authenticator app"})]}),l&&(0,s.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-300",children:l}),(0,s.jsx)("input",{type:"text",inputMode:"numeric",maxLength:6,value:n,onChange:e=>i(e.target.value.replace(/\D/g,"").slice(0,6)),onKeyDown:h,placeholder:"000000",className:"w-full rounded-lg border border-white/10 bg-white/[0.05] px-4 py-3 text-center text-xl tracking-[0.3em] font-mono text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20",autoFocus:!0}),(0,s.jsx)(_.$,{onClick:m,disabled:6!==n.length||d,className:"w-full bg-brand-600 text-white hover:bg-brand-500 disabled:opacity-50",children:d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tp.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Verifying..."]}):"Verify"}),(0,s.jsxs)("button",{type:"button",onClick:r,className:"flex w-full items-center justify-center gap-1 text-xs text-white/30 hover:text-white/50 transition-colors",children:[(0,s.jsx)(aF.A,{className:"h-3 w-3"}),"Back to login"]})]})}let aU=[{id:"google",label:"Google",icon:function(e){let{className:t="h-[18px] w-[18px]"}=e;return(0,s.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),(0,s.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,s.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84z",fill:"#FBBC05"}),(0,s.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]})},hoverClass:"hover:border-[#4285F4]/30 hover:bg-[#4285F4]/5"},{id:"github",label:"GitHub",icon:function(e){let{className:t="h-[18px] w-[18px]"}=e;return(0,s.jsx)("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.604-3.369-1.341-3.369-1.341-.454-1.155-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0 1 12 6.836a9.59 9.59 0 0 1 2.504.337c1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.163 22 16.418 22 12c0-5.523-4.477-10-10-10z"})})},hoverClass:"hover:border-white/20 hover:bg-white/[0.06]"},{id:"linkedin_oidc",label:"LinkedIn",icon:function(e){let{className:t="h-[18px] w-[18px]"}=e;return(0,s.jsx)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 1 1 0-4.125 2.062 2.062 0 0 1 0 4.125zM6.864 20.452H3.81V9h3.054v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",fill:"#0A66C2"})})},hoverClass:"hover:border-[#0A66C2]/30 hover:bg-[#0A66C2]/5"},{id:"azure",label:"Microsoft",icon:function(e){let{className:t="h-[18px] w-[18px]"}=e;return(0,s.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("rect",{x:"1",y:"1",width:"10",height:"10",fill:"#F25022"}),(0,s.jsx)("rect",{x:"13",y:"1",width:"10",height:"10",fill:"#7FBA00"}),(0,s.jsx)("rect",{x:"1",y:"13",width:"10",height:"10",fill:"#00A4EF"}),(0,s.jsx)("rect",{x:"13",y:"13",width:"10",height:"10",fill:"#FFB900"})]})},hoverClass:"hover:border-[#00A4EF]/30 hover:bg-[#00A4EF]/5"}];function aD(e){return/not enabled|disabled|unsupported provider/i.test(e)?"This sign-in option isn't available right now. Please try another method or email support.":/net
1work|fetch|timeout|timed out|offline|connection/i.test(e)?"We couldn’t reach the server. Check your connection and try again.":"We couldn’t start sign-in. Please try again or use another method."}function aL(e){let{mode:t,onError:a}=e,[r,n]=(0,c.useState)(null),i=(0,c.useCallback)(async e=>{n(e);try{let{error:t}=await $.N.auth.signInWithOAuth({provider:e,options:{redirectTo:"".concat("https://quarrion.ai","/auth/callback")}});t&&(null==a||a(aD(t.message)),n(null))}catch(t){let e=t instanceof Error?t.message:"Something went wrong. Please try again.";null==a||a(aD(e)),n(null)}},[a]),l=null!==r;return(0,s.jsx)("div",{className:"space-y-2",children:aU.map(e=>{let{id:a,label:n,icon:o,hoverClass:d}=e,c=r===a;return(0,s.jsxs)("button",{type:"button",disabled:l,"aria-busy":c,onClick:()=>void i(a),className:"flex w-full items-center justify-center gap-2.5 rounded-lg border border-white/10 bg-white/[0.03] py-2.5 text-sm transition-all duration-150 ".concat(l?"cursor-not-allowed opacity-40":"text-white/60 ".concat(d," hover:text-white")),children:[c?(0,s.jsx)(tp.A,{className:"h-[18px] w-[18px] animate-spin text-white/50"}):(0,s.jsx)(o,{className:"h-[18px] w-[18px]"}),"login"===t?"Sign in":"Sign up"," with ",n]},a)})})}function aM(e){let[t,a]=(0,c.useState)("idle"),[r,s]=(0,c.useState)(null),[n,i]=(0,c.useState)(0),l=(0,c.useRef)("idle"),o=(0,c.useRef)(0),d=(0,c.useRef)(null),u=(0,c.useCallback)(()=>{null!==d.current&&(clearInterval(d.current),d.current=null)},[]);(0,c.useEffect)(()=>{l.current=t},[t]),(0,c.useEffect)(()=>{o.current=n,0===n&&u()},[n,u]),(0,c.useEffect)(()=>u,[u]);let m=(0,c.useCallback)(()=>{u(),o.current=60,i(60),d.current=setInterval(()=>{i(e=>e>0?e-1:0)},1e3)},[u]);return{resend:(0,c.useCallback)(async()=>{if("sending"!==l.current&&!(o.current>0)){if(""===e.trim()){a("error"),s("Enter your email address first.");return}l.current="sending",a("sending"),s(null);try{var t;let r=(t="https://quarrion.ai",void 0!==t)?t:window.location.origin,{error:n}=await $.N.auth.resend({type:"signup",email:e,options:{emailRedirectTo:"".concat(r,"/auth/callback")}});if(n)throw n;a("sent"),s(null),m()}catch(e){a("error"),function(e){if("object"!=typeof e||null===e)return!1;if(429===e.status||429===e.code||"over_email_send_rate_limit"===e.code)return!0;let t="string"==typeof e.message?e.message.toLowerCase():"";return t.includes("security purposes")||t.includes("60 seconds")||t.includes("429")}(e)?(s("An email was sent recently — check your inbox and spam, or retry in a minute."),m()):s("Couldn't send the email. Please try again.")}}},[e,m]),status:t,error:r,cooldownSeconds:n}}function aB(){let e=(0,o.Zp)(),{signIn:t}=(0,h.A)(),{toast:a}=(0,q.dj)(),[r,n]=(0,c.useState)(""),[i,l]=(0,c.useState)(""),[d,u]=(0,c.useState)(""),[m,p]=(0,c.useState)(!1),[g,f]=(0,c.useState)("credentials"),[b,y]=(0,c.useState)(""),[w,j]=(0,c.useState)(""),[v,N]=(0,c.useState)(0),[k,S]=(0,c.useState)(!1),C=(0,c.useRef)(null),{resend:E,status:P,error:I,cooldownSeconds:R}=aM(r);(0,c.useEffect)(()=>{if(v<=0)return;let e=window.setTimeout(()=>N(e=>Math.max(0,e-1)),1e3);return()=>window.clearTimeout(e)},[v]);let T=(0,c.useCallback)(e=>{n(e),e&&j("")},[]),F=async a=>{var s;a.preventDefault(),u(""),S(!1),p(!0);try{try{await (0,Z.Em)("/api/auth/check-login",{method:"POST",body:JSON.stringify({email:r})})}catch(t){let e=t instanceof Error?t.message:"Too many login attempts";u(e),p(!1);return}await t(r,i);let{data:a}=await $.N.auth.mfa.getAuthenticatorAssuranceLevel();if(a&&"aal2"===a.nextLevel&&"aal1"===a.currentLevel){let{data:e}=await $.N.auth.mfa.listFactors(),t=null==e||null==(s=e.totp)?void 0:s.find(e=>"verified"===e.status);if(t){y(t.id),f("mfa"),p(!1);return}}try{await (0,Z.Em)("/api/auth/login-success",{method:"POST",body:JSON.stringify({email:r})})}catch(e){}e("/",{replace:!0})}catch(t){let e=t instanceof Error?t.message:"Failed to sign in";S("object"==typeof t&&null!==t&&"code"in t&&"email_not_confirmed"===t.code||t instanceof Error&&/email not confirmed/i.test(t.message)),u(e)}finally{p(!1)}},z=(0,c.useCallback)(()=>{(0,Z.Em)("/api/auth/login-success",{method:"POST",body:JSON.stringify({email:r})}).catch(()=>{}),e("/",{replace:!0})},[r,e]),U=(0,c.useCallback)(async()=>{await $.N.auth.signOut(),f("credentials"),y(""),l("")},[]),D=async()=>{var e,t;if(!r){j("Enter your email above, then tap 'Forgot password?' again."),null==(e=C.current)||e.focus();return}if(v>0)return;let{error:s}=await $.N.auth.resetPasswordForEmail(r,{redirectTo:"".concat("https://quarrion.ai","/auth/reset-password")});if(s){if(t=s.message,/security purposes|60 seconds/i.test(t)){a("info","A reset email was sent recently — check your inbox, or retry in a minute"),N(60);return}u("We couldn’t send the reset email. Please try again.");return}a("success","Password reset email sent. Check your inbox."),N(60)};return(0,s.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center px-4",children:[(0,s.jsx)(aR.Q,{}),(0,s.jsx)("div",{className:"absolute left-6 top-6 z-10",children:(0,s.jsx)(o.N_,{to:"/welcome",className:"flex items-center gap-2 text-sm text-white/50 hover:text-white transition-colors",children:(0,s.jsx)(A.g,{size:28})})}),(0,s.jsx)(x.P.div,{initial:{opacity:0,scale:.95,y:10}
1,animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"relative z-10 w-full max-w-sm",children:(0,s.jsx)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.06] p-8 shadow-2xl shadow-black/20 backdrop-blur-xl",children:"mfa"===g?(0,s.jsx)(az,{factorId:b,onSuccess:z,onCancel:U}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-6 text-center",children:[(0,s.jsx)("h1",{className:"text-lg font-bold text-white",children:"Welcome back"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Sign in to your job search dashboard"})]}),(0,s.jsxs)("form",{onSubmit:F,className:"space-y-4",children:[d&&(0,s.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-300",children:d}),k&&(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border border-white/10 bg-white/[0.04] px-3 py-3",children:[(0,s.jsx)("p",{className:"text-xs text-white/60",children:"Your email hasn’t been confirmed yet — the link may have expired or gone to spam."}),I&&(0,s.jsx)("p",{className:"text-xs text-red-300",role:"alert",children:I}),(0,s.jsx)(_.$,{type:"button",variant:"secondary",size:"sm",onClick:()=>void E(),disabled:"sending"===P||R>0,children:"sending"===P?"Sending…":R>0?"Resend in ".concat(R,"s"):"Resend confirmation email"}),"sent"===P&&(0,s.jsx)("p",{className:"text-xs text-white/50","aria-live":"polite",children:"Confirmation email sent — check your inbox."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"email",className:"mb-1.5 block text-xs font-medium text-white/60",children:"Email"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(aq.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30"}),(0,s.jsx)("input",{id:"email",ref:C,type:"email",required:!0,value:r,onChange:e=>T(e.target.value),placeholder:"[email protected]",className:"w-full rounded-lg border border-white/10 bg-white/[0.05] py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20"})]}),(0,s.jsx)("p",{className:"mt-1.5 text-xs text-white/50","aria-live":"polite",children:w})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"password",className:"mb-1.5 block text-xs font-medium text-white/60",children:"Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(el.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30"}),(0,s.jsx)("input",{id:"password",type:"password",required:!0,value:i,onChange:e=>l(e.target.value),placeholder:"••••••••",className:"w-full rounded-lg border border-white/10 bg-white/[0.05] py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20"})]})]}),(0,s.jsx)("div",{className:"text-right",children:(0,s.jsx)("button",{type:"button",onClick:D,disabled:v>0,className:"text-xs text-brand-400 hover:text-brand-300 transition-colors disabled:cursor-default disabled:text-white/40 disabled:hover:text-white/40",children:v>0?"Email sent — resend in ".concat(v,"s"):"Forgot password?"})}),(0,s.jsxs)(_.$,{type:"submit",disabled:m,className:"w-full bg-brand-600 text-white hover:bg-brand-500 disabled:opacity-50",children:[m?"Signing in...":"Sign In",!m&&(0,s.jsx)(tD.A,{className:"ml-2 h-4 w-4"})]})]}),(0,s.jsxs)("div",{className:"my-6 flex items-center gap-3",children:[(0,s.jsx)("div",{className:"h-px flex-1 bg-white/10"}),(0,s.jsx)("span",{className:"text-xs text-white/25",children:"or"}),(0,s.jsx)("div",{className:"h-px flex-1 bg-white/10"})]}),(0,s.jsx)(aL,{mode:"login",onError:u}),(0,s.jsxs)("p",{className:"mt-6 text-center text-xs text-white/30",children:["No account?"," ",(0,s.jsx)(o.N_,{to:"/signup",className:"text-brand-400 hover:text-brand-300 transition-colors",children:"Get started"})]})]})})})]})}var aO=a(52744);function aW(e){let{password:t,onScoreChange:a}=e,r=(0,c.useMemo)(()=>{let e=function(e){if(!e)return{score:0,label:"",color:"bg-gray-300",feedback:""};let t=0;e.length>=8&&(t+=1),e.length>=12&&(t+=1),e.length>=16&&(t+=1),/[a-z]/.test(e)&&/[A-Z]/.test(e)&&(t+=1),/\d/.test(e)&&(t+=1),/[^a-zA-Z0-9]/.test(e)&&(t+=1),/^[a-zA-Z]+$/.test(e)&&(t-=1),/^[0-9]+$/.test(e)&&(t-=1),/(.)\1{2,}/.test(e)&&(t-=1),/^(password|123456|qwerty|abc123)/i.test(e)&&(t-=2);let a=Math.max(0,Math.min(4,Math.round(4*t/6))),r=[{label:"Very Weak",color:"bg-red-500",feedback:"Use at least 8 characters with mixed case, numbers, and symbols."},{label:"Weak",color:"bg-orange-500",feedback:"Add more variety — mix uppercase, lowercase, numbers, and symbols."},{label:"Fair",color:"bg-yellow-500",feedback:"Decent, but a longer password with more variety would be stronger."},{label:"Strong",color:"bg-green-500",feedback:"Good password strength."},{label:"Very Strong",color:"bg-emerald-500",feedback:"Excellent password strength."}][a];return{score:a,...r}}(t);return null==a||a(e.score),e},[t,a]);if(!t)return null;let n=(r.score+1)/5*100;return(0,s.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,s.jsx)("div",{className:"h-1.5 w-full rounded-full bg-gray-200 dark:bg-gray-700",children:(0,s.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ".concat(r.color),style:{width:"".concat(n,"%")}})}),(0,s.jsx)("div",{className:"flex items-center justify-between",children:(0,s.jsx)("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",children:r.label})}),r.feedback&&(0,s.jsx)("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:r.feedback})]})}var aV=a(38100);function aK(e){let{onVerify:t,onError:a}=e,r=(0,c.useRef)(null),n=(0,c.useCallback)(e=>{t(e)},[t]),i=(0,c.useCallback)(e=>{null==a||a(e)},[a]);return(0,s.jsx)("div",{className:"rounded-lg border border-yellow-500/20 bg-yellow-500/10 px-3 py-2 text-xs text-yellow-300",children:"CAPTCHA not configured (dev mode)"})}var aQ=a(78259),aG=a(92221);function aY(){var e,t;return null!=(t=null==(e=(0,tS.o2)())?void 0:e.utmSource)?t:null}function aH(){let{signUp:e}=(0,h.A)(),{visitorId:t}=function(){let[e,t]=(0,c.useState)({visitorId:null,loading:!0});return(0,c.useEffect)(()=>{let e=!1;return(async()=>{try{let a=await aQ.Ay.load(),r=await a.get();e||t({visitorId:r.visitorId,loading:!1})}catch(a){console.warn("[fingerprint] Collection failed:",a.message),e||t({visitorId:null,loading:!1})}})(),()=>{e=!0}},[]),e}(),[a,r]=(0,c.useState)(""),[n,i]=(0,c.useState)(""),[l,d]=(0,c.useState)(""),[u,m]=(0,c.useState)(""),[p,g]=(0,c.useState)(!1),[f,b]=(0,c.useState)(!1),[y,w]=(0,c.useState)(0),[j,v]=(0,c.useState)(!1),[N,k]=(0,c.useState)(null),{resend:S,status:C,error:E,cooldownSeconds:P}=aM(a),I=(0,c.useCallback)(e=>{w(e)},[]),q=(0,c.useCallback)(()=>{S()},[S]),R=(0,c.useCallback)(()=>{b(!1),r(""),i(""),d(""),m("")},[]),T=(0,c.useCallback)(e=>{k(e)},[]),F=(0,c.useCallback)(e=>{let t=e.target;if(!(t instanceof Element))return;let a=t.closest("button");
1null===a||a.disabled||(0,H.u)("signup_started",{method:"oauth",source:aY()})},[]),z=async r=>{if(r.preventDefault(),m(""),n!==l)return void m("Passwords do not match");if(n.length<8)return void m("Password must be at least 8 characters");if(y<2)return void m("Password is too weak. Please choose a stronger password.");if(j&&!N)return void m("Please complete the verification challenge below.");g(!0);try{let r=await (0,aG.QB)(a,null!=t?t:void 0);if(!r.allowed&&!r.challengeRequired){var s;m(null!=(s=r.reason)?s:"This email cannot be used to create an account.");return}if(r.challengeRequired&&!N){v(!0),m("");return}sessionStorage.setItem("signup_fingerprint",null!=t?t:""),N&&sessionStorage.setItem("signup_captcha_token",N),(0,H.u)("signup_started",{method:"email",source:aY()}),await e(a,n),b(!0)}catch(e){m(e instanceof Error?e.message:"Failed to create account")}finally{g(!1)}};return(0,s.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center px-4",children:[(0,s.jsx)(aR.Q,{}),(0,s.jsx)("div",{className:"absolute left-6 top-6 z-10",children:(0,s.jsx)(o.N_,{to:"/welcome",className:"flex items-center gap-2 text-sm text-white/50 hover:text-white transition-colors",children:(0,s.jsx)(A.g,{size:28})})}),(0,s.jsx)(x.P.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"relative z-10 w-full max-w-sm",children:(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.06] p-8 shadow-2xl shadow-black/20 backdrop-blur-xl",children:[(0,s.jsxs)("div",{className:"mb-6 text-center",children:[(0,s.jsx)("h1",{className:"text-lg font-bold text-white",children:"Create your account"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Start tracking your job search"})]}),f?(0,s.jsxs)("div",{role:"status","aria-live":"polite",className:"flex flex-col items-center gap-3 py-4",children:[(0,s.jsx)(aO.A,{className:"h-10 w-10 text-green-400"}),(0,s.jsx)("h2",{className:"text-base font-semibold text-white",children:"Check your email"}),(0,s.jsxs)("p",{className:"text-center text-sm text-white/70",children:["We sent a confirmation link to ",(0,s.jsx)("strong",{className:"text-white",children:a}),"."]}),(0,s.jsx)("p",{className:"text-center text-xs text-white/40",children:"Not there? Check your spam folder — or resend it."}),E&&(0,s.jsx)("div",{className:"w-full rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-center text-xs text-red-300",children:E}),"sent"===C&&(0,s.jsx)("p",{className:"text-center text-xs text-green-300",children:"Sent again — it can take a minute to arrive."}),(0,s.jsx)(_.$,{type:"button",onClick:q,disabled:"sending"===C||P>0,className:"w-full bg-white/[0.08] text-white hover:bg-white/[0.14] disabled:opacity-50",children:"sending"===C?"Sending…":P>0?"sent"===C?"Email sent — resend in ".concat(P,"s"):"Resend in ".concat(P,"s"):"Resend email"}),(0,s.jsx)("button",{type:"button",onClick:R,className:"text-xs text-white/40 underline-offset-2 transition-colors hover:text-white/70 hover:underline",children:"Wrong address? Use a different email"}),(0,s.jsx)(o.N_,{to:"/login",className:"mt-2 text-sm text-brand-400 hover:text-brand-300 transition-colors",children:"Back to sign in"})]}):(0,s.jsxs)("form",{onSubmit:z,className:"space-y-4",children:[u&&(0,s.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-300",children:u}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"signup-email",className:"mb-1.5 block text-xs font-medium text-white/60",children:"Email"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(aq.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30"}),(0,s.jsx)("input",{id:"signup-email",type:"email",required:!0,value:a,onChange:e=>r(e.target.value),placeholder:"[email protected]",className:"w-full rounded-lg border border-white/10 bg-white/[0.05] py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"signup-password",className:"mb-1.5 block text-xs font-medium text-white/60",children:"Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(el.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30"}),(0,s.jsx)("input",{id:"signup-password",type:"password",required:!0,value:n,onChange:e=>i(e.target.value),placeholder:"Min 8 characters",className:"w-full rounded-lg border border-white/10 bg-white/[0.05] py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20"})]}),(0,s.jsx)(aW,{password:n,onScoreChange:I})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"signup-confirm",className:"mb-1.5 block text-xs font-medium text-white/60",children:"Confirm password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(el.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30"}),(0,s.jsx)("input",{id:"signup-confirm",type:"password",required:!0,value:l,onCh
1ange:e=>d(e.target.value),placeholder:"Re-enter your password",className:"w-full rounded-lg border border-white/10 bg-white/[0.05] py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20"})]})]}),j&&!N&&(0,s.jsx)(aK,{onVerify:T,onError:e=>m("Verification failed: ".concat(e))}),(0,s.jsxs)(_.$,{type:"submit",disabled:p||j&&!N,className:"w-full bg-brand-600 text-white hover:bg-brand-500 disabled:opacity-50",children:[p?"Creating account...":"Create Account",!p&&(0,s.jsx)(tD.A,{className:"ml-2 h-4 w-4"})]})]}),!f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"my-6 flex items-center gap-3",children:[(0,s.jsx)("div",{className:"h-px flex-1 bg-white/10"}),(0,s.jsx)("span",{className:"text-xs text-white/25",children:"or"}),(0,s.jsx)("div",{className:"h-px flex-1 bg-white/10"})]}),(0,s.jsx)("div",{onClickCapture:F,children:(0,s.jsx)(aL,{mode:"signup",onError:m})})]}),!f&&(0,s.jsxs)("p",{className:"mt-6 text-center text-xs text-white/30",children:["Already have an account?"," ",(0,s.jsx)(o.N_,{to:"/login",className:"text-brand-400 hover:text-brand-300 transition-colors",children:"Sign in"})]})]})})]})}var aJ=a(43002);function aZ(){let e=(0,o.Zp)();return(0,s.jsxs)(x.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3},className:"flex min-h-[60vh] flex-col items-center justify-center text-center",children:[(0,s.jsx)(x.P.div,{animate:{y:[-6,6,-6]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},className:"mb-6",children:(0,s.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-400/20 to-brand-600/20 border border-brand-500/10",children:(0,s.jsx)(eX.A,{className:"h-10 w-10 text-brand-400"})})}),(0,s.jsx)("div",{className:"mb-2 text-5xl font-bold gradient-text",children:"404"}),(0,s.jsx)("h1",{className:"mb-2 text-xl font-semibold text-foreground",children:"Page Not Found"}),(0,s.jsx)("p",{className:"mb-8 max-w-md text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved. Check the URL or head back to the dashboard."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-center gap-3",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>e(-1),className:"inline-flex items-center justify-center rounded-lg border border-border bg-background px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",children:[(0,s.jsx)(aF.A,{className:"h-4 w-4 mr-2"}),"Go back"]}),(0,s.jsxs)(o.N_,{to:"/",className:"inline-flex items-center justify-center rounded-lg bg-brand-600 px-4 py-2 text-sm font-medium text-white hover:bg-brand-700 transition-colors",children:[(0,s.jsx)(aJ.A,{className:"h-4 w-4 mr-2"}),"Go to Dashboard"]}),(0,s.jsxs)(o.N_,{to:"/kanban",className:"inline-flex items-center justify-center rounded-lg border border-border bg-background px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",children:[(0,s.jsx)(v.A,{className:"h-4 w-4 mr-2"}),"Applications"]}),(0,s.jsxs)(o.N_,{to:"/settings",className:"inline-flex items-center justify-center rounded-lg border border-border bg-background px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",children:[(0,s.jsx)(S.A,{className:"h-4 w-4 mr-2"}),"Settings"]})]})]})}var aX=a(7064),a$=a(28653),a0=a(71362),a1=a(78770);let a2={access_denied:"Sign-in was cancelled. You can try again whenever you like.",provider_disabled:"This sign-in option isn't available right now. Please try another method or email support.",provider_email_needs_verification:"Please verify your email with the provider, then try signing in again.",unauthorized_client:"This sign-in option isn't available right now. Please try another method or email support.",unsupported_response_type:"This sign-in option isn't available right now. Please try another method or email support.",invalid_request:"We couldn't complete sign-in with that provider. Please try again or use another method.",server_error:"The sign-in provider had a temporary problem. Please try again in a moment.",temporarily_unavailable:"The sign-in provider is temporarily unavailable. Please try again in a moment."};function a5(e){if(!e)return null;let t=e.replace(/^[?#]/,"");if(!t)return null;let a=new URLSearchParams(t),r=a.get("error");return r?{code:r,description:a.get("error_description")}:null}var a3=a(39495);let a4=e=>new Promise(t=>setTimeout(t,e));function a6(){let e=(0,o.Zp)(),[t,a]=(0,c.useState)("loading"),[r,n]=(0,c.useState)("");return(0,c.useEffect)(()=>{let t=!1,r=setTimeout(()=>{t||(a("error"),n("Authentication timed out. Please try again."))},15e3);async function s(){let e=(await $.N.auth.getSession()).data.session;if(e)return e;let a=new URLSearchParams(window.location.search).get("code");if(!a)return null;let r="";for(let e=0;e<4&&!t;e++){var s,n;let{data:i,error:l}=await $.N.auth.exchangeCodeForSession(a);if(!l&&i.session)return i.session;let o=(await $.N.auth.getSession()).data.session;if(o)return o;if(n=r=null!=(s=null==l?void 0:l.message)?s:"Sign in could not be completed.",!/lock|stole|another request|navigator ?lock/i.test(n))throw Error(r);if(await a4(250*(e+1)),t)return null}throw Error(r||"Sign in could not be completed.")}async function i(){var e;let t=sessionStorage.getItem("signup_fingerprint")||void 0,a=sessionStorage.getItem("signup_captcha_token")||void 0;sessionStorage.removeItem("signup_fingerprint"),sessionStorage.removeItem("signup_captcha_token");let r=null!=(e=(0,tS.o2)())?e:void 0;await Promise.race([(0,aG._b)({fingerprintHash:t,captchaToken:a,attribution:r}).catch(()=>void 0),a4(6e3)])}async function l(){var e;let[t,a,r]=await Promise.all([(0,a0.eO)().catch(()=>null),(0,tl.GA)().catch(()=>null),(0,a1.T)().catch(()=>null)]);return(0,a3.V)({onboardingCompleted:null==t?void 0:t.onboardingCompleted,hasCV:(null!=(e=null==a?void 0:a.profiles.length)?e:0)>0,hasPreferences:(0,a3.B)(r)})?"/onboarding":"/"}return(async function(){let r=function(e){var t;let a=null!=(t=a5(e.search))?t:a5(e.hash);return a?{code:a.code,message:function(e,t){let a=a2[e];if(a)return a;let r=t?function(e){let t=e.replace(RegExp("\\p{Cc}+","gu")," ").replace(/\s+/g," ").trim();return t.length<=200?t:"".concat(t.slice(0,200).trimEnd(),"…")}(t):"";return r?"Sign-in failed: ".concat(r):"Sign-in failed. Please try again or use another method."}(a.code,a.description)}:null}(window.location);if(r){a("error"),n(r.message);return}let o=await s();if(!t){if(!o)return void a("link-used");
1if(function(e){let t=Date.parse(e.created_at);if(!Number.isFinite(t))return!1;if(!e.last_sign_in_at)return!0;let a=Date.parse(e.last_sign_in_at);return!!Number.isFinite(a)&&a-t<12e4}(o.user)){var d,c,u;(0,H.u)("signup_completed",{method:(null==(u=o.user.app_metadata)?void 0:u.provider)==="email"?"email":"oauth",source:null!=(c=null==(d=(0,tS.o2)())?void 0:d.utmSource)?c:null})}await Promise.all([i(),l()]).then(a=>{let[,r]=a;t||e(r,{replace:!0})})}})().catch(e=>{if(t)return;let r=e instanceof Error?e.message:"";if(/verifier/i.test(r))return void a("link-used");a("error"),n(function(e){let t=e.toLowerCase();return/access_denied|denied|cancel/.test(t)?"Sign-in was cancelled. Please try again.":/expired|invalid|grant|code/.test(t)?"This sign-in link has expired. Please sign in again.":/network|timeout|timed out|fetch/.test(t)?"We couldn’t reach the server. Check your connection and try again.":"We couldn’t complete sign-in. Please try again."}(r))}).finally(()=>clearTimeout(r)),()=>{t=!0,clearTimeout(r)}},[e]),(0,s.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center px-4",children:[(0,s.jsx)(aR.Q,{}),(0,s.jsx)("div",{className:"absolute left-6 top-6 z-10",children:(0,s.jsx)(o.N_,{to:"/welcome",className:"flex items-center gap-2 text-sm text-white/50 hover:text-white transition-colors",children:(0,s.jsx)(A.g,{size:28})})}),(0,s.jsx)("div",{className:"relative z-10 flex flex-col items-center gap-4",role:"status","aria-live":"polite",children:"loading"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tp.A,{className:"h-8 w-8 animate-spin text-brand-400","aria-hidden":"true"}),(0,s.jsx)("p",{className:"text-sm text-white/50",children:"Completing sign in..."})]}):"link-used"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(aX.A,{className:"h-8 w-8 text-emerald-400","aria-hidden":"true"}),(0,s.jsx)("p",{className:"text-sm text-white/60",children:"This link may have already been used — your email is likely confirmed. Try signing in."}),(0,s.jsx)(o.N_,{to:"/login",className:"mt-2 text-sm text-brand-400 hover:text-brand-300 transition-colors",children:"Back to sign in"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a$.A,{className:"h-8 w-8 text-red-400","aria-hidden":"true"}),(0,s.jsx)("p",{className:"text-sm text-white/60",children:r}),(0,s.jsx)(o.N_,{to:"/login",className:"mt-2 text-sm text-brand-400 hover:text-brand-300 transition-colors",children:"Back to sign in"})]})})]})}let a8=e=>new Promise(t=>setTimeout(t,e));function a7(e){let t=e.toLowerCase();return/different from the old password/.test(t)?"That is already your current password. Please choose a different one.":/weak|breach|pwned/.test(t)?"That password is too easy to guess. Please choose a stronger one.":/expired|invalid|session|jwt|token/.test(t)?"This reset link has expired. Request a new one and try again.":/network|timeout|timed out|fetch/.test(t)?"We couldn’t reach the server. Check your connection and try again.":"We couldn’t update your password. Please try again."}async function a9(e){if((await $.N.auth.getSession()).data.session)return"ready";let t=new URLSearchParams(window.location.search).get("code");if(!t)return"invalid";let a="";for(let n=0;n<4&&!e();n++){var r,s;let{data:e,error:i}=await $.N.auth.exchangeCodeForSession(t);if(!i&&e.session||(await $.N.auth.getSession()).data.session)return"ready";if(s=a=null!=(r=null==i?void 0:i.message)?r:"",!/lock|stole|another request|navigator ?lock/i.test(s))return/verifier/i.test(a)?"wrong-browser":"invalid";await a8(250*(n+1))}return"invalid"}function re(e){let{children:t}=e;return(0,s.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center px-4",children:[(0,s.jsx)(aR.Q,{}),(0,s.jsx)("div",{className:"absolute left-6 top-6 z-10",children:(0,s.jsx)(o.N_,{to:"/welcome",className:"flex items-center gap-2 text-sm text-white/50 hover:text-white transition-colors",children:(0,s.jsx)(A.g,{size:28})})}),t]})}function rt(){return(0,s.jsxs)("div",{className:"relative z-10 flex flex-col items-center gap-4",role:"status","aria-live":"polite",children:[(0,s.jsx)(tp.A,{className:"h-8 w-8 animate-spin text-brand-400","aria-hidden":"true"}),(0,s.jsx)("p",{className:"text-sm text-white/50",children:"Checking your reset link..."})]})}function ra(e){let{message:t}=e;return(0,s.jsxs)("div",{className:"relative z-10 flex flex-col items-center gap-4",role:"status","aria-live":"polite",children:[(0,s.jsx)(a$.A,{className:"h-8 w-8 text-red-400","aria-hidden":"true"}),(0,s.jsx)("p",{className:"max-w-sm text-center text-sm text-white/60",children:t}),(0,s.jsx)(o.N_,{to:"/login",className:"mt-2 text-sm text-brand-400 hover:text-brand-300 transition-colors",children:"Request a new link"})]})}function rr(e){let{id:t,label:a,placeholder:r,value:n,onChange:i,children:l}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:t,className:"mb-1.5 block text-xs font-medium text-white/60",children:a}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(el.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30"}),(0,s.jsx)("input",{id:t,type:"password",required:!0,value:n,onChange:e=>i(e.target.value),placeholder:r,className:"w-full rounded-lg border border-white/10 bg-white/[0.05] py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/25 outline-none transition-colors focus:border-brand-500/50 focus:ring-1 focus:ring-brand-500/20"})]}),l]})}function rs(e){let{onSuccess:t}=e,[a,r]=(0,c.useState)(""),[n,i]=(0,c.useState)(""),[l,o]=(0,c.useState)(0),[d,u]=(0,c.useState)(""),[m,h]=(0,c.useState)(!1),p=(0,c.useCallback)(e=>o(e),[]),g=async e=>{e.preventDefault();let r=a!==n?"Passwords do not match":a.length<8?"Password must be at least 8 characters":l<2?"Password is too weak. Please choose a stronger password.":null;if(u(null!=r?r:""),!r){h(!0);try{let{error:e}=await $.N.auth.updateUser({password:a});if(e)return void u(a7(e.message));t()}catch(e){u(a7(e instanceof Error?e.message:""))}finally{h(!1)}}};return(0,s.jsx)(x.P.div,{initial:{opacity:0,scale:.95,y:10}
1,animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"relative z-10 w-full max-w-sm",children:(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.06] p-8 shadow-2xl shadow-black/20 backdrop-blur-xl",children:[(0,s.jsxs)("div",{className:"mb-6 text-center",children:[(0,s.jsx)("h1",{className:"text-lg font-bold text-white",children:"Choose a new password"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"You’re signed in from your reset link — pick a password and you’re done"})]}),(0,s.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[d&&(0,s.jsx)("div",{role:"alert",className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-300",children:d}),(0,s.jsx)(rr,{id:"new-password",label:"New password",placeholder:"Min 8 characters",value:a,onChange:r,children:(0,s.jsx)(aW,{password:a,onScoreChange:p})}),(0,s.jsx)(rr,{id:"confirm-password",label:"Confirm new password",placeholder:"Re-enter your password",value:n,onChange:i}),(0,s.jsxs)(_.$,{type:"submit",disabled:m,className:"w-full bg-brand-600 text-white hover:bg-brand-500 disabled:opacity-50",children:[m?"Updating…":"Update password",!m&&(0,s.jsx)(tD.A,{className:"ml-2 h-4 w-4"})]})]})]})})}function rn(){let e=(0,o.Zp)(),{toast:t}=(0,q.dj)(),[a,r]=(0,c.useState)("loading");(0,c.useEffect)(()=>{let e=!1,t=setTimeout(()=>{e||r("invalid")},15e3);return a9(()=>e).then(t=>{e||r(t)}).catch(()=>{e||r("invalid")}).finally(()=>clearTimeout(t)),()=>{e=!0,clearTimeout(t)}},[]);let n=(0,c.useCallback)(()=>{t("success","Password updated. You are signed in."),e("/",{replace:!0})},[e,t]);return"loading"===a?(0,s.jsx)(re,{children:(0,s.jsx)(rt,{})}):"invalid"===a?(0,s.jsx)(re,{children:(0,s.jsx)(ra,{message:"This reset link is invalid or has expired."})}):"wrong-browser"===a?(0,s.jsx)(re,{children:(0,s.jsx)(ra,{message:"Reset links only work in the browser they were requested from. Request a new link from this browser."})}):(0,s.jsx)(re,{children:(0,s.jsx)(rs,{onSuccess:n})})}let ri=(0,c.lazy)(()=>Promise.all([a.e(9639),a.e(3662),a.e(6959),a.e(5705),a.e(2597),a.e(621),a.e(7339),a.e(3280),a.e(487),a.e(9303),a.e(2751),a.e(1635)]).then(a.bind(a,21635)).then(e=>({default:e.Dashboard}))),rl=(0,c.lazy)(()=>Promise.all([a.e(9639),a.e(6959),a.e(3817),a.e(2597),a.e(621),a.e(524),a.e(876)]).then(a.bind(a,10876)).then(e=>({default:e.KanbanBoard}))),ro=(0,c.lazy)(()=>Promise.all([a.e(621),a.e(7339),a.e(487),a.e(9485),a.e(7772)]).then(a.bind(a,45834)).then(e=>({default:e.NeedsYouInbox}))),rd=(0,c.lazy)(()=>Promise.all([a.e(9639),a.e(3662),a.e(2676),a.e(2597),a.e(3280),a.e(524),a.e(9874),a.e(5143),a.e(1971)]).then(a.bind(a,66762)).then(e=>({default:e.JobDetail}))),rc=(0,c.lazy)(()=>Promise.all([a.e(9639),a.e(2597),a.e(9810)]).then(a.bind(a,29810)).then(e=>({default:e.ApplicationReceipt}))),ru=(0,c.lazy)(()=>Promise.all([a.e(3946),a.e(6340),a.e(9485),a.e(3673)]).then(a.bind(a,73673)).then(e=>({default:e.ApplicationDetail}))),rm=(0,c.lazy)(()=>Promise.all([a.e(4511),a.e(5903),a.e(4779),a.e(1457),a.e(4044)]).then(a.bind(a,34044)).then(e=>({default:e.Analytics}))),rh=(0,c.lazy)(()=>a.e(8813).then(a.bind(a,18813)).then(e=>({default:e.DailyDigest}))),rx=(0,c.lazy)(()=>Promise.all([a.e(6630),a.e(2196)]).then(a.bind(a,92196)).then(e=>({default:e.CvManager}))),rp=(0,c.lazy)(()=>Promise.all([a.e(6959),a.e(6562),a.e(621),a.e(7339),a.e(2484),a.e(3776)]).then(a.bind(a,53776)).then(e=>({default:e.Settings}))),rg=(0,c.lazy)(()=>a.e(7514).then(a.bind(a,17514)).then(e=>({default:e.EmailProposalsQueue}))),rf=(0,c.lazy)(()=>Promise.all([a.e(6959),a.e(2751),a.e(9041)]).then(a.bind(a,79041)).then(e=>({default:e.PipelineDashboard}))),rb=(0,c.lazy)(()=>a.e(5048).then(a.bind(a,25048)).then(e=>({default:e.KnowledgeGraph}))),ry=(0,c.lazy)(()=>Promise.all([a.e(9303),a.e(5637)]).then(a.bind(a,55637)).then(e=>({default:e.ExplorePage}))),rw=(0,c.lazy)(()=>a.e(755).then(a.bind(a,20755)).then(e=>({default:e.Pricing}))),rj=(0,c.lazy)(()=>a.e(4668).then(a.bind(a,24668)).then(e=>({default:e.SubscriptionSuccess}))),rv=(0,c.lazy)(()=>a.e(7328).then(a.bind(a,57328)).then(e=>({default:e.SubscriptionCancel}))),rN=(0,c.lazy)(()=>Promise.all([a.e(5804),a.e(3034)]).then(a.bind(a,3034)).then(e=>({default:e.PrivacyPolicy}))),rk=(0,c.lazy)(()=>
1Promise.all([a.e(5804),a.e(9005)]).then(a.bind(a,39005)).then(e=>({default:e.Terms}))),rS=(0,c.lazy)(()=>Promise.all([a.e(3946),a.e(4169)]).then(a.bind(a,4169)).then(e=>({default:e.InterviewPrepPage}))),rC=(0,c.lazy)(()=>a.e(9805).then(a.bind(a,9805)).then(e=>({default:e.InterviewPrepListPage}))),rA=(0,c.lazy)(()=>a.e(359).then(a.bind(a,80359)).then(e=>({default:e.Insights}))),rE=(0,c.lazy)(()=>Promise.all([a.e(6630),a.e(621),a.e(7339),a.e(2484),a.e(800)]).then(a.bind(a,12304)).then(e=>({default:e.OnboardingWizard}))),r_=(0,c.lazy)(()=>Promise.all([a.e(4511),a.e(5903),a.e(7803),a.e(4075)]).then(a.bind(a,34075)).then(e=>({default:e.Admin}))),rP=(0,c.lazy)(()=>Promise.all([a.e(5143),a.e(296)]).then(a.bind(a,99471)).then(e=>({default:e.QualificationsPage}))),rI=(0,c.lazy)(()=>Promise.all([a.e(6340),a.e(8556)]).then(a.bind(a,98556)).then(e=>({default:e.LinkedInMessaging}))),rq=(0,c.lazy)(()=>Promise.all([a.e(9639),a.e(2597),a.e(524),a.e(7151)]).then(a.bind(a,73467)).then(e=>({default:e.ApplicationDraftReview})));function rR(){return(0,s.jsxs)("div",{className:"flex items-center justify-center min-h-[200px]",role:"status","aria-label":"Loading",children:[(0,s.jsx)("span",{className:"sr-only",children:"Loading…"}),(0,s.jsx)(u.m,{size:48})]})}let rT={initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-8}},rF={type:"spring",stiffness:260,damping:20};function rz(e){let{children:t}=e;return(0,s.jsx)(x.P.div,{variants:rT,initial:"initial",animate:"animate",exit:"exit",transition:rF,children:t})}function rU(){let e=(0,o.zy)();return(0,s.jsx)(c.Suspense,{fallback:(0,s.jsx)(rR,{}),children:(0,s.jsx)(p.N,{mode:"wait",children:(0,s.jsxs)(o.BV,{location:e,children:[(0,s.jsx)(o.qh,{path:"/",element:(0,s.jsx)(tn.t,{pageName:"Dashboard",children:(0,s.jsx)(rz,{children:(0,s.jsx)(ri,{})})})}),(0,s.jsx)(o.qh,{path:"/top-picks",element:(0,s.jsx)(o.C5,{to:"/",replace:!0})}),(0,s.jsx)(o.qh,{path:"/qualified",element:(0,s.jsx)(o.C5,{to:"/",replace:!0})}),(0,s.jsx)(o.qh,{path:"/applications",element:(0,s.jsx)(o.C5,{to:"/kanban",replace:!0})}),(0,s.jsx)(o.qh,{path:"/applications/receipts/:runId/:jobId",element:(0,s.jsx)(tn.t,{pageName:"Application Receipt",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rc,{})})})}),(0,s.jsx)(o.qh,{path:"/applications/:id",element:(0,s.jsx)(tn.t,{pageName:"Application Detail",children:(0,s.jsx)(rz,{children:(0,s.jsx)(ru,{})})})}),(0,s.jsx)(o.qh,{path:"/jobs/:id",element:(0,s.jsx)(tn.t,{pageName:"Job Detail",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rd,{})})})}),(0,s.jsx)(o.qh,{path:"/cv",element:(0,s.jsx)(tn.t,{pageName:"CV Manager",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rx,{})})})}),(0,s.jsx)(o.qh,{path:"/settings",element:(0,s.jsx)(tn.t,{pageName:"Settings",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rp,{})})})}),(0,s.jsx)(o.qh,{path:"/kanban",element:(0,s.jsx)(tn.t,{pageName:"Applications",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rl,{})})})}),(0,s.jsx)(o.qh,{path:"/explore",element:(0,s.jsx)(tn.t,{pageName:"Explore",children:(0,s.jsx)(rz,{children:(0,s.jsx)(ry,{})})})}),(0,s.jsx)(o.qh,{path:"/needs-you",element:(0,s.jsx)(tn.t,{pageName:"Needs You",children:(0,s.jsx)(rz,{children:(0,s.jsx)(ro,{})})})}),(0,s.jsx)(o.qh,{path:"/outreach",element:(0,s.jsx)(o.C5,{to:"/messaging",replace:!0})}),(0,s.jsx)(o.qh,{path:"/email-proposals",element:(0,s.jsx)(tn.t,{pageName:"Email Proposals",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rg,{})})})}),(0,s.jsx)(o.qh,{path:"/correspondence",element:(0,s.jsx)(o.C5,{to:"/messaging?channel=correspondence",replace:!0})}),(0,s.jsx)(o.qh,{path:"/pipeline",element:(0,s.jsx)(tf,{children:(0,s.jsx)(tn.t,{pageName:"Pipeline Dashboard",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rf,{})})})})}),(0,s.jsx)(o.qh,{path:"/analytics",element:(0,s.jsx)(tn.t,{pageName:"Analytics",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rm,{})})})}),(0,s.jsx)(o.qh,{path:"/digest",element:(0,s.jsx)(tn.t,{pageName:"Daily Digest",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rh,{})})})}),(0,s.jsx)(o.qh,{path:"/knowledge-graph",element:(0,s.jsx)(tn.t,{pageName:"Knowledge Graph",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rb,{})})})}),(0,s.jsx)(o.qh,{path:"/insights",element:(0,s.jsx)(tn.t,{pageName:"Insights",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rA,{})})})}),(0,s.jsx)(o.qh,{path:"/insights/career-radar",element:(0,s.jsx)(tn.t,{pageName:"Insights",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rA,{})})})}),(0,s.jsx)(o.qh,{path:"/insights/salary-explorer",element:(0,s.jsx)(tn.t,{pageName:"Insights",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rA,{})})})}),(0,s.jsx)(o.qh,{path:"/career-radar",element:(0,s.jsx)(o.C5,{to:"/insights/career-radar",replace:!0})}),(0,s.jsx)(o.qh,{path:"/salary-explorer",element:(0,s.jsx)(o.C5,{to:"/insights/salary-explorer",replace:!0})}),(0,s.jsx)(o.qh,{path:"/messaging",element:(0,s.jsx)(tn.t,{pageName:"LinkedIn Messaging",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rI,{})})})}),(0,s.jsx)(o.qh,{path:"/messaging/drafts",element:(0,s.jsx)(o.C5,{to:"/messaging",replace:!0})}),(0,s.jsx)(o.qh,{path:"/opportunities",element:(0,s.jsx)(o.C5,{to:"/messaging?channel=leads",replace:!0})}),(0,s.jsx)(o.qh,{path:"/application-drafts",element:(0,s.jsx)(tn.t,{pageName:"Application Drafts",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rq,{})})})}),(0,s.jsx)(o.qh,{path:"/interview-prep/:jobId",element:(0,s.jsx)(tn.t,{pageName:"Interview Prep",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rS,{})})})}),(0,s.jsx)(o.qh,{path:"/interview-prep",element:(0,s.jsx)(tn.t,{pageName:"Interview Prep",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rC,{})})})}),(0,s.jsx)(o.qh,{path:"/qualifications",element:(0,s.jsx)(tn.t,{pageName:"Qualifications",children:(0,s.jsx)(rz,{children:(0,s.jsx)(rP,{})})})}),(0,s.jsx)(o.qh,{path:"/admin",element:(0,s.jsx)(tn.t,{pageName:"Admin",children:(0,s.jsx)(rz,{children:(0,s.jsx)(r_,{})})})}),(0,s.jsx)(o.qh,{path:"*",element:(0,s.jsx)(rz,{children:(0,s.jsx)(aZ,{})})})]})})})}function rD(){let e=(0,o.zy)(),t=(0,o.Zp)(),{isAuthenticated:r,loading:n}=(0,h.A)(),{shouldRedirectToOnboarding:i,loading:l}=(0,m.z)();return((0,c.useEffect)(()=>
1{if(!r)return;let e=window.setTimeout(()=>void(Promise.all([a.e(9639),a.e(3662),a.e(6959),a.e(5705),a.e(2597),a.e(621),a.e(7339),a.e(3280),a.e(487),a.e(9303),a.e(2751),a.e(1635)]).then(a.bind(a,21635)),Promise.all([a.e(9639),a.e(6959),a.e(3817),a.e(2597),a.e(621),a.e(524),a.e(876)]).then(a.bind(a,10876)),Promise.all([a.e(9639),a.e(3662),a.e(2676),a.e(2597),a.e(3280),a.e(524),a.e(9874),a.e(5143),a.e(1971)]).then(a.bind(a,66762)),Promise.all([a.e(3946),a.e(6340),a.e(9485),a.e(3673)]).then(a.bind(a,73673)),Promise.all([a.e(621),a.e(7339),a.e(487),a.e(9485),a.e(7772)]).then(a.bind(a,45834)),Promise.all([a.e(6959),a.e(6562),a.e(621),a.e(7339),a.e(2484),a.e(3776)]).then(a.bind(a,53776))),1e3);return()=>window.clearTimeout(e)},[r]),(0,c.useEffect)(()=>{let{data:a}=$.N.auth.onAuthStateChange(a=>{"PASSWORD_RECOVERY"===a&&"/auth/reset-password"!==e.pathname&&t("/auth/reset-password",{replace:!0})});return()=>a.subscription.unsubscribe()},[t,e.pathname]),("/"!==e.pathname||n||r)&&"/welcome"!==e.pathname&&"/login"!==e.pathname&&"/signup"!==e.pathname&&"/pricing"!==e.pathname&&"/privacy"!==e.pathname&&"/terms"!==e.pathname&&"/subscription/success"!==e.pathname&&"/subscription/cancel"!==e.pathname&&"/onboarding"!==e.pathname&&"/auth/callback"!==e.pathname&&"/auth/reset-password"!==e.pathname)?!l&&i?(0,s.jsx)(o.C5,{to:"/onboarding",replace:!0}):(0,s.jsx)(tg,{children:(0,s.jsx)(eO,{children:(0,s.jsx)(rU,{})})}):(0,s.jsx)(tn.t,{children:(0,s.jsx)(c.Suspense,{fallback:(0,s.jsx)(rR,{}),children:(0,s.jsxs)(o.BV,{location:e,children:[(0,s.jsx)(o.qh,{path:"/",element:(0,s.jsx)(aI,{})}),(0,s.jsx)(o.qh,{path:"/welcome",element:(0,s.jsx)(o.C5,{to:"/",replace:!0})}),(0,s.jsx)(o.qh,{path:"/login",element:(0,s.jsx)(aB,{})}),(0,s.jsx)(o.qh,{path:"/signup",element:(0,s.jsx)(aH,{})}),(0,s.jsx)(o.qh,{path:"/pricing",element:(0,s.jsx)(rw,{})}),(0,s.jsx)(o.qh,{path:"/privacy",element:(0,s.jsx)(rN,{})}),(0,s.jsx)(o.qh,{path:"/terms",element:(0,s.jsx)(rk,{})}),(0,s.jsx)(o.qh,{path:"/subscription/success",element:(0,s.jsx)(rj,{})}),(0,s.jsx)(o.qh,{path:"/subscription/cancel",element:(0,s.jsx)(rv,{})}),(0,s.jsx)(o.qh,{path:"/onboarding",element:(0,s.jsx)(rE,{})}),(0,s.jsx)(o.qh,{path:"/auth/callback",element:(0,s.jsx)(a6,{})}),(0,s.jsx)(o.qh,{path:"/auth/reset-password",element:(0,s.jsx)(rn,{})})]})})})}function rL(){return(0,s.jsx)(eW.N,{children:(0,s.jsxs)(q.tE,{children:[(0,s.jsx)(tx,{}),(0,s.jsx)(rD,{}),(0,s.jsx)(ts,{})]})})}function rM(){return null!=r||(r=(0,o.Ys)([{path:"*",element:(0,s.jsx)(rL,{})}])),(0,s.jsx)(d.pg,{router:r})}let rB=new n.q({onError:e=>{let t=(0,q.Rj)();t&&t("error",e instanceof Error?e.message:"An unexpected error occurred.")}}),rO=new i.E({mutationCache:rB,defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}});function rW(){return(0,s.jsx)(l.Ht,{client:rO,children:(0,s.jsx)(rM,{})})}},25009:(e,t,a)=>{a.d(t,{UE:()=>s,mp:()=>n});let r=Object.freeze({GB:"GBP",US:"USD",CA:"CAD",AU:"AUD",CH:"CHF",AT:"EUR",BE:"EUR",CY:"EUR",DE:"EUR",EE:"EUR",ES:"EUR",FI:"EUR",FR:"EUR",GR:"EUR",IE:"EUR",IT:"EUR",LT:"EUR",LU:"EUR",LV:"EUR",MT:"EUR",NL:"EUR",PT:"EUR",SI:"EUR",SK:"EUR"});function s(){var e;let t="undefined"!=typeof navigator?navigator.language:void 0;if(!t)return"GBP";let a=function(e){try{let t=new Intl.Locale(e).region;return t?t.toUpperCase():null}catch(a){let t=e.split(/[-_]/);return t.length>1&&t[1]?t[1].toUpperCase():null}}(t);return a&&null!=(e=r[a])?e:"GBP"}function n(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&e.length>0?e:"UTC"}catch(e){return"UTC"}}},33443:(e,t,a)=>{a.d(t,{Ox:()=>o,Th:()=>l,eT:()=>s,hG:()=>r,pD:()=>i,ts:()=>n});let r=["bpss","ctc","sc","esc","dv","edv","nppv3"],s=["bpss","ctc","sc","esc","dv","edv"],n={bpss:"BPSS (Baseline Personnel Security Standard)",ctc:"CTC (Counter Terrorist Check)",sc:"SC (Security Check)",esc:"eSC (enhanced Security Check)",dv:"DV (Developed Vetting)",edv:"eDV (enhanced Developed Vetting)",nppv3:"NPPV3 (National Police Personnel Vetting level 3)"},i="Security clearance is sponsored by an employer with a live requirement — it cannot be bought, studied for, or applied for independently. Record only clearance you currently hold or have held.";function l(e){return"string"==typeof e&&r.includes(e)}function o(e,t){if("nppv3"===t)return e.includes("nppv3");let a=s.indexOf(t);return -1!==a&&e.some(e=>{let t=s.indexOf(e);return -1!==t&&t>=a})}},39495:(e,t,a)=>{function r(e){return!1===e.onboardingCompleted&&(!e.hasCV||!e.hasPreferences)}function s(e){var t,a;return(null!=(a=null==e||null==(t=e.targetRoles)?void 0:t.length)?a:0)>0}a.d(t,{B:()=>s,V:()=>r})},40103:(e,t,a)=>{a.d(t,{uX:()=>d,_c:()=>o,w5:()=>c});var r=a(81562),s=a(27736),n=a(4869),i=a(66597);async function l(){var e,t,a,r,s,n;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,o=arguments.length>1?arguments[1]:void 0,d=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20,u=new URLSearchParams;u.set("page",String(l)),u.set("limit",String(c)),o&&u.set("status",o),d&&u.set("category",d);let m=u.toString(),h=await (0,i.gf)("/api/admin/bug-reports".concat(m?"?".concat(m):"")),x=await h.json();return{data:null!=(t=x.data)?t:[],meta:{total:null!=(r=null!=(a=x.total)?a:null==(e=x.data)?void 0:e.length)?r:0,page:null!=(s=x.page)?s:l,limit:null!=(n=x.limit)?n:c}}}function o(){return(0,r.n)({mutationFn:e=>(0,i.Em)("/api/bug-reports",{method:"POST",body:JSON.stringify(e)}),onError:e=>{console.error("Failed to create bug report:",e)}})}function d(e,t,a){return(0,s.I)({queryKey:["admin","bug-reports",e,t,a],queryFn:()=>l(e,t,a),staleTime:3e4})}function c(){let e=(0,n.jE)();return(0,r.n)({mutationFn:e=>{let{id:t,payload:a}=e;return(0,i.Em)("/api/admin/bug-reports/".concat(encodeURIComponent(t)),{method:"PATCH",body:JSON.stringify(a)})},onSuccess:()=>
1{e.invalidateQueries({queryKey:["admin","bug-reports"]})},onError:e=>{console.error("Failed to update bug report:",e)}})}},41416:(e,t,a)=>{a.d(t,{z:()=>o});var r=a(27736),s=a(96094),n=a(81261),i=a(11861),l=a(39495);function o(){var e;let{data:t,isLoading:a,isError:o}=(0,s.xc)(),d=!o&&(null==t?void 0:t.onboardingCompleted)===!1,{data:c,isLoading:u}=(0,r.I)({queryKey:["cv-profiles"],queryFn:i.GA,enabled:d,staleTime:3e4}),{data:m,isLoading:h}=(0,n.gc)("default",{retry:!1}),x=a||d&&(u||h),p=(null!=(e=null==c?void 0:c.profiles.length)?e:0)>0,g=!!d&&(0,l.B)(m);return{shouldRedirectToOnboarding:!x&&(0,l.V)({onboardingCompleted:null==t?void 0:t.onboardingCompleted,hasCV:p,hasPreferences:g}),initialStep:p?g?3:2:1,loading:x,hasCV:p,hasPreferences:g}}},50928:(e,t,a)=>{a.d(t,{t:()=>l});var r=a(54568),s=a(7620),n=a(28653),i=a(45234);class l extends s.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}render(){if(this.state.hasError){var e,t;if(this.props.fallback)return this.props.fallback;let a=this.props.pageName?"".concat(this.props.pageName," encountered an error"):"Something went wrong";return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-lg border border-red-200 bg-red-50 p-12 dark:border-red-800 dark:bg-red-950/30",role:"alert",children:[(0,r.jsx)(n.A,{className:"mb-4 h-12 w-12 text-red-400"}),(0,r.jsx)("h2",{className:"mb-2 text-lg font-semibold text-red-800 dark:text-red-200",children:a}),(0,r.jsx)("p",{className:"mb-6 max-w-md text-center text-sm text-red-600 dark:text-red-400",children:null!=(t=null==(e=this.state.error)?void 0:e.message)?t:"An unexpected error occurred. Please try again."}),(0,r.jsxs)("button",{type:"button",onClick:this.handleReset,className:"inline-flex items-center gap-2 rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:bg-red-700 dark:hover:bg-red-600",children:[(0,r.jsx)(i.A,{className:"h-4 w-4"}),"Try Again"]})]})}return this.props.children}constructor(e){super(e),this.handleReset=()=>{var e,t;this.setState({hasError:!1,error:null}),null==(e=(t=this.props).onRetry)||e.call(t)},this.state={hasError:!1,error:null}}}},78770:(e,t,a)=>{a.d(t,{T:()=>l,Ug:()=>o,lV:()=>d,tt:()=>c});var r=a(66597),s=a(25009),n=a(33443);function i(e){var t,a,r,i,l,o,d,c,u,m,h,x,p,g,f,b,y,w,j,v,N,k,S,C,A,E,_,P,I,q,R,T,F,z,U,D,L,M,B,O,W,V,K,Q,G,Y,H,J,Z,X,$,ee,et,ea,er,es;return{id:String(null!=(t=e.id)?t:""),profileName:String(null!=(r=null!=(a=e.profileName)?a:e.profile_name)?r:"default"),targetRoles:null!=(l=null!=(i=e.targetRoles)?i:e.target_roles)?l:[],minSalary:null!=e.minSalary?Number(e.minSalary):null!=e.min_salary?Number(e.min_salary):null,maxSalary:null!=e.maxSalary?Number(e.maxSalary):null!=e.max_salary?Number(e.max_salary):null,currentSalary:null!=e.currentSalary?Number(e.currentSalary):null!=e.current_salary?Number(e.current_salary):null,salaryCurrency:String(null!=(d=null!=(o=e.salaryCurrency)?o:e.salary_currency)?d:(0,s.UE)()),locations:null!=(c=e.locations)?c:[],remotePreference:String(null!=(m=null!=(u=e.remotePreference)?u:e.remote_preference)?m:"any"),industries:null!=(h=e.industries)?h:[],companySizes:null!=(p=null!=(x=e.companySizes)?x:e.company_sizes)?p:[],dealBreakers:null!=(f=null!=(g=e.dealBreakers)?g:e.deal_breakers)?f:[],preferredBoards:null!=(y=null!=(b=e.preferredBoards)?b:e.preferred_boards)?y:[],excludedBoards:null!=(j=null!=(w=e.excludedBoards)?w:e.excluded_boards)?j:[],scoreThreshold:Number(null!=(N=null!=(v=e.scoreThreshold)?v:e.score_threshold)?N:60),updatedAt:String(null!=(S=null!=(k=e.updatedAt)?k:e.updated_at)?S:""),titleExclusions:null!=(A=null!=(C=e.titleExclusions)?C:e.title_exclusions)?A:[],experienceYearsMin:Number(null!=(_=null!=(E=e.experienceYearsMin)?E:e.experience_years_min)?_:0),experienceYearsMax:Number(null!=(I=null!=(P=e.experienceYearsMax)?P:e.experience_years_max)?I:99),preFilterThreshold:Number(null!=(R=null!=(q=e.preFilterThreshold)?q:e.pre_filter_threshold)?R:30),quickScoreThreshold:Number(null!=(F=null!=(T=e.quickScoreThreshold)?T:e.quick_score_threshold)?F:40),dailyResearchLimit:Number(null!=(U=null!=(z=e.dailyResearchLimit)?z:e.daily_research_limit)?U:100),locationMandatory:null==(L=null!=(D=e.locationMandatory)?D:e.location_mandatory)||L,worldwideSearch:null!=(B=null!=(M=e.worldwideSearch)?M:e.worldwide_search)&&B,digitalNomad:null!=(W=null!=(O=e.digitalNomad)?O:e.digital_nomad)&&W,priorityCompanies:null!=(K=null!=(V=e.priorityCompanies)?V:e.priority_companies)?K:[],employmentTypes:null!=(G=null!=(Q=e.employmentTypes)?Q:e.employment_types)?G:null,minDayRate:null!=e.minDayRate?Number(e.minDayRate):null!=e.min_day_rate?Number(e.min_day_rate):null,ir35Preference:null!=(H=null!=(Y=e.ir35Preference)?Y:e.ir35_preference)?H:null,practiceAreas:null!=(Z=null!=(J=e.practiceAreas)?J:e.practice_areas)?Z:null,pqeYears:null!=e.pqeYears?Number(e.pqeYears):null!=e.pqe_years?Number(e.pqe_years):null,preferredFirmTypes:null!=($=null!=(X=e.preferredFirmTypes)?X:e.preferred_firm_types)?$:null,qualificationJurisdictions:null!=(et=null!=(ee=e.qualificationJurisdictions)?ee:e.qualification_jurisdictions)?et:null,preferredFirmTiers:null!=(er=null!=(ea=e.preferredFirmTiers)?ea:e.preferred_firm_tiers)?er:null,clearanceLevels:function(e){if(!Array.isArray(e))return null;let t=e.filter(n.Th);return t.length>0?t:null}(null!=(es=e.clearanceLevels)?es:e.clearance_levels)}}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=await (0,r.Em)("/api/preferences?profile=".concat(encodeURIComponent(e)));return i(null!=t?t:{})}async function o(e){return i(await (0,r.Em)("/api/preferences",{method:"PUT",body:JSON.stringify(e)}))}async function d(e,t){return i(await (0,r.Em)("/api/preferences/salary",{method:"PATCH",body:JSON.stringify({currentSalary:e,...t?{salaryCurrency:t}:{}})}))}async function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return(0,r.Em)("/api/preferences/apply",{method:"POST",body:JSON.stringify({profileName:e})})}},81261:(e,t,a)=>{a.d(t,{H2:()=>c,WH:()=>u,gc:()=>o,lk:()=>d});var r=a(27736),s=a(4869),n=a(81562),i=a(78770),l=a(3249);function o(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",a=arguments.length>1?arguments[1]:void 0;return(0,r.I)({queryKey:["preferences",t],queryFn:()=>(0,i.T)(t),staleTime:3e5,retry:null!=(e=null==a?void 0:a.retry)?e:1})}function d(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>(0,i.Ug)(e),onSuccess:()=>
1{e.invalidateQueries({queryKey:["preferences"]}),e.invalidateQueries({queryKey:["skills-gap-heatmap"]}),e.invalidateQueries({queryKey:l.V})},onError:e=>{console.error("Failed to update preferences:",e)}})}function c(){var e;let{data:t}=o("default");return null!=(e=null==t?void 0:t.salaryCurrency)?e:"GBP"}function u(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>(0,i.tt)(e),onSuccess:()=>{e.invalidateQueries({queryKey:["top-picks"]}),e.invalidateQueries({queryKey:["scores"]})},onError:e=>{console.error("Failed to apply preferences:",e)}})}},84223:(e,t,a)=>{a.d(t,{C0:()=>c,EU:()=>n,GJ:()=>d,NI:()=>i,qS:()=>u,rk:()=>s,sg:()=>l});var r=a(66597);function s(){return(0,r.Em)("/api/applications/needs-you")}function n(){return(0,r.Em)("/api/applications/needs-you/count")}function i(e){return(0,r.Em)("/api/applications/".concat(encodeURIComponent(e),"/mark-applied"),{method:"POST"})}function l(e){return(0,r.Em)("/api/applications/".concat(encodeURIComponent(e),"/skip"),{method:"POST"})}async function o(e,t){let a=await (0,r.gf)(e),s=await a.blob(),n=URL.createObjectURL(s),i=document.createElement("a");i.href=n,i.download=t,document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function d(e){return o("/api/cv/tailored/".concat(encodeURIComponent(e),"/download"),"cv-".concat(e.slice(0,8),".docx"))}function c(e){return o("/api/cover-letters/".concat(encodeURIComponent(e),"/download"),"cover-letter-".concat(e.slice(0,8),".docx"))}async function u(e){var t;let a=await (0,r.gf)("/api/applications/".concat(encodeURIComponent(e),"/resume"),{method:"POST"}),s=await a.json();if(!0===s.success)return{success:!0,error:null,data:s.data};let n=s.error,i=null!=(t=s.data)?t:{};if("no_collector"===n)return{success:!1,error:"no_collector",data:i};if("cap_reached"===n)return{success:!1,error:"cap_reached",data:i};if("approval_required"===n)return{success:!1,error:"approval_required",data:i};throw new r.UQ("string"==typeof n?n:"Could not resume this application.",a.status)}},90757:(e,t,a)=>{a.d(t,{Dq:()=>u,Ec:()=>c,YY:()=>o,rL:()=>l,tO:()=>d});var r=a(27736),s=a(4869),n=a(81562),i=a(66597);let l=["applications-board"];function o(e){return(0,r.I)({queryKey:["application",e],queryFn:()=>(0,i.TA)(e),enabled:!!e,staleTime:3e4})}function d(){return(0,r.I)({queryKey:l,queryFn:i.KQ,staleTime:3e4})}function c(e){return(0,r.I)({queryKey:["application-screenshot",e],queryFn:()=>(0,i.H6)(e),enabled:!!e,staleTime:6e4})}function u(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>{let{id:t,status:a}=e;return(0,i.C)(t,a)},onSuccess:(t,a)=>{e.invalidateQueries({queryKey:["application",a.id]}),e.invalidateQueries({queryKey:["jobs"]}),e.invalidateQueries({queryKey:l}),e.invalidateQueries({queryKey:["analytics"]})},onError:e=>{console.error("Failed to update application status:",e)}})}},97834:(e,t,a)=>{a.d(t,{q:()=>l});var r=a(27736),s=a(66597);function n(){return(0,s.Em)("/api/applications/today-count")}let i=["applications","today-count"];function l(){var e;let{data:t,isLoading:a}=(0,r.I)({queryKey:i,queryFn:n,staleTime:6e4,retry:!1});return{count:null!=(e=null==t?void 0:t.count)?e:0,resetsAt:null==t?void 0:t.resetsAt,isLoading:a}}},99053:(e,t,a)=>{a.d(t,{AQ:()=>m,RR:()=>u,XM:()=>h,ad:()=>d,uB:()=>o,uY:()=>c});var r=a(27736),s=a(4869),n=a(81562),i=a(84223),l=a(90757);let o=["needs-you"],d=["needs-you","count"];function c(){return(0,r.I)({queryKey:o,queryFn:i.rk,refetchInterval:6e4,refetchOnWindowFocus:"always",staleTime:15e3})}function u(){var e;let{data:t}=(0,r.I)({queryKey:d,queryFn:i.EU,refetchInterval:6e4,refetchOnWindowFocus:"always",staleTime:15e3});return null!=(e=null==t?void 0:t.count)?e:0}function m(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>(0,i.NI)(e),onSuccess:()=>{e.invalidateQueries({queryKey:o}),e.invalidateQueries({queryKey:d}),e.invalidateQueries({queryKey:["jobs"]}),e.invalidateQueries({queryKey:["applications"]}),e.invalidateQueries({queryKey:l.rL}),e.invalidateQueries({queryKey:["analytics"]})}})}function h(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>(0,i.sg)(e),onSuccess:()=>{e.invalidateQueries({queryKey:o}
1),e.invalidateQueries({queryKey:d}),e.invalidateQueries({queryKey:["jobs"]}),e.invalidateQueries({queryKey:["applications"]}),e.invalidateQueries({queryKey:l.rL}),e.invalidateQueries({queryKey:["analytics"]})}})}}}]);

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.