1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ExplorePathModal-B7AakqJI.js","assets/animation-CddyXVCz.js","assets/react-vendor-CbN3pvl2.js","assets/index-PGJMoIYN.js","assets/index-DnWsV7cE.js","assets/supabase-iKSPld20.js","assets/docgen-Bp8WKBAE.js","assets/query-DPqpbKNH.js","assets/index-D2PKCkk9.css","assets/ProGate-BEhmrWMs.js","assets/billingLimits-4ln6JCGI.js","assets/Tooltip-DaQZLjbJ.js","assets/CareerRoadmapView-FLCjJ0Yn.js","assets/clipboard-C0L7pyCw.js","assets/LearningResourcesPopover-C8j3JsXv.js"])))=>i.map(i=>d[i]); 2import{f as w,s as De,h as M,S as se,A as Ie,i as Le,j as Me,u as Ee,B as L,k as Oe,l as $e,T as Fe,P as ze,m as qe,o as Ue,p as Je,q as ye,r as Be,M as Ge,_ as ae}from"./index-DnWsV7cE.js";import{r as g,j as e,R as re}from"./animation-CddyXVCz.js";import{P as je}from"./ProGate-BEhmrWMs.js";import{T as Ve}from"./Tooltip-DaQZLjbJ.js";const Ye=[{title:"Product Owner",category:"Product",requiredSkills:["Agile","Jira","Stakeholder Management","User Stories","Backlog Refinement","Product Strategy"],description:"Bridge the gap between business requirements and engineering execution."},{title:"Technical Lead",category:"Engineering",requiredSkills:["Architecture","Mentorship","Node.js","System Design","Code Review","Project Management"],description:"Senior-level engineering leadership with a focus on technical excellence and team growth."},{title:"Solution Architect",category:"Engineering",requiredSkills:["Cloud Infrastructure","System Design","API Design","Security","Scalability","Microservices"],description:"Design complex, scalable systems that solve specific business problems."},{title:"Software Engineer in Test (SDET)",category:"Engineering",requiredSkills:["Playwright","Cypress","Automation","CI/CD","Testing Strategy","JavaScript"],description:"Focus on building robust automated testing frameworks and infrastructure."},{title:"Full Stack Engineer",category:"Engineering",requiredSkills:["React","Node.js","PostgreSQL","TypeScript","CSS","API Development"],description:"End-to-end development of web applications, handling both UI and Backend."},{title:"DevOps Engineer",category:"Engineering",requiredSkills:["Docker","Kubernetes","AWS","Terraform","CI/CD","Linux"],description:"Streamline the development lifecycle through infrastructure automation."},{title:"Technical Product Manager",category:"Product",requiredSkills:["API Knowledge","Product Strategy","Roadmapping","Data Analysis","User Research","Agile"],description:"Define product vision for deeply technical platforms or developer tools."},{title:"UI/UX Designer",category:"Design",requiredSkills:["Figma","Prototyping","User Research","Visual Design","Design Systems","Usability Testing"],description:"Create intuitive, beautiful experiences based on user behavior and design principles."},{title:"Technical Recruiter",category:"Management",requiredSkills:["Sourcing","Interviewing","Technical Vocabulary","LinkedIn Recruiter","Negotiation"],description:"Identify and hire top-tier technical talent for growing teams."},{title:"Engineering Manager",category:"Management",requiredSkills:["One-on-Ones","Performance Management","Recruiting","Project Delivery","Budgets"],description:"Leading people and teams to deliver high-quality software while fostering growth."}],Ke={Agile:["agile scrum","scrum","kanban"],Jira:["jira software","atlassian jira"],"Stakeholder Management":["stakeholder","stakeholder communication","cross functional","cross-functional"],"User Stories":["user story","story writing","requirements"],"Backlog Refinement":["backlog grooming","backlog prioritization","backlog management"],"Product Strategy":["product management","product vision","product roadmap"],Architecture:["software architecture","solution architecture","technical architecture"],Mentorship:["mentoring","coaching","team leadership"],"Node.js":["node","nodejs"],"System Design":["systems design","distributed systems","architecture design"],"Code Review":["peer review","reviews"],"Project Management":["program management","project delivery","delivery management"],"Cloud Infrastru
2cture":["cloud architecture","aws","azure","gcp","cloud"],"API Design":["api development","api knowledge","rest api","apis"],Security:["secure coding","authentication","authorization","iam"],Scalability:["scalable systems","performance optimization","high scale"],Microservices:["microservice architecture","service oriented architecture"],Automation:["test automation","qa automation","automated testing"],"CI/CD":["ci cd","continuous integration","continuous delivery","github actions","jenkins"],"Testing Strategy":["test strategy","quality strategy","qa strategy"],JavaScript:["js","typescript"],PostgreSQL:["postgres","postgresql database"],Docker:["containers"],AWS:["amazon web services"],Terraform:["iac","infrastructure as code"],Linux:["unix"],Roadmapping:["roadmap","roadmaps"],"Data Analysis":["analytics","sql","reporting"],"User Research":["customer research","user interviews","discovery"],Figma:["figma design"],Prototyping:["wireframing","prototype"],"Visual Design":["ui design"],"Design Systems":["component library"],"Usability Testing":["user testing","ux testing"],Sourcing:["candidate sourcing","talent sourcing"],Interviewing:["candidate interviews","hiring interviews"],"Technical Vocabulary":["technical communication"],"LinkedIn Recruiter":["linkedin recruiting"],Negotiation:["offer negotiation"],"One-on-Ones":["one on ones","one-on-one","weekly 1-on-1","direct reports"],"Performance Management":["performance reviews","career development"],Recruiting:["hiring"],"Project Delivery":["delivery management","execution"],Budgets:["budgeting","financial planning"]},U=a=>a.toLowerCase().replace(/[^a-z0-9\s+/.-]+/g," ").replace(/\s+/g," ").trim(),_e=a=>U(a).split(" ").filter(s=>s.length>=2),We=a=>{var t,m;const s=new Set,r=l=>{if(typeof l!="string")return;const c=U(l);c&&s.add(c)};return(t=a.skills)==null||t.forEach(r),r(a.summary),r(a.headline),(m=a.experience)==null||m.forEach(l=>{var c,d,o;r(l.jobTitle),r(l.company),r(l.summary),(c=l.highlights)==null||c.forEach(r),(d=l.description)==null||d.forEach(r),(o=l.accomplishments)==null||o.forEach(k=>{var h;r(k.description),(h=k.skills)==null||h.forEach(r)})}),Array.from(s)},te=a=>{const s=Ke[a]??[];return[a,...s]},He=a=>a.map(s=>({text:s,tokens:_e(s)})),Qe=(a,s)=>{const r=U(a);if(!r)return!1;const t=_e(r);return s.some(({text:m,tokens:l})=>{if(m===r||r.length>=3&&m.includes(r)||m.length>=3&&r.includes(m))return!0;if(!t.length||!l.length)return!1;const c=t.filter(o=>l.includes(o)).length,d=c/t.length;return c>0&&(d>=.6||t.length>=2&&d>=.5)})},ve=(a,s)=>te(a).some(r=>Qe(r,s)),Xe=a=>a>=4?1:a>=2?.6:.3,Ze=(a,s)=>{const r=te(a).map(U),t=s.find(m=>{const l=[m.skill_name,...te(m.skill_name)].map(U);return r.some(c=>l.includes(c))});return t?Xe(t.proficiency_level):null},et=(a,s,r=[])=>{if(s.length===0)return{overlap:0,missingSkills:[]};if(r.length===0){const l=s.filter(d=>ve(d,a)),c=s.filter(d=>!l.includes(d));return{overlap:Math.round(l.length/s.length*100),missingSkills:c}}let t=0;const m=[];return s.forEach(l=>{const c=ve(l,a)?1:0,d=Ze(l,r)??0,o=Math.max(c,d);t+=o,o===0&&m.push(l)}),{overlap:Math.round(t/s.length*100),missingSkills:m}},tt=(a,s=[])=>{var l,c;const r=He(We(a)),t=((c=(l=a.experience)==null?void 0:l[0])==null?void 0:c.jobTitle)||"";return Ye.map(d=>{const{overlap:o,missingSkills:k}=et(r,d.requiredSkills,s);let h="pivot";t&&(d.title.toLowerCase().includes(t.toLowerCase())||t.toLowerCase().includes(d.title.toLowerCase()))?h="progression":t&&d.category==="Engineering"&&t.toLowerCase().match(/engineer|developer|architect|lead/)&&(h="adjacent");const f=d.requiredSkills.length-k.length;let v="";o>=80?v="High overlap with your current skills.":o>=50?v=`Natural pivot path â you already have ${f} of ${d.requiredSkills.length} core competencies.`:o>0&&(v=`You show evidence for ${f} of ${d.requiredSkills.length} core skills.`);const S=v?`${v} ${d.description}`:d.description;return{title:d.title,category:d.category,overlap:o,missingSkills:k,reason:S,type:h}}).filter(d=>d.title.toLowerCase()!==t.toLowerCase()).sort((d,o)=>{if(o.overlap!==d.overlap)return o.overlap-d.overlap;const k={progression:3,adjacent:2,pivot:1};return k[o.type]-k[d.type]}).slice(0,6)},A=async()=>{var t,m;const a={"Content-Type":"application/json"}
2,s=await((t=De)==null?void 0:t.auth.getSession()),r=(m=s==null?void 0:s.data.session)==null?void 0:m.access_token;return r&&(a.Authorization=`Bearer ${r}`),a},R=(a,s)=>a.map(r=>w(r,s)).filter(Boolean),Te=(a,s)=>{var r;return((r=a.experience)==null?void 0:r.map(t=>[w(t.jobTitle,s),t.company?`at ${w(t.company,s)}`:"",t.summary?`(${w(t.summary,s)})`:""].filter(Boolean).join(" ")).join(", "))||""},vt=async(a,s)=>{var m,l;const r=await A(),t=await fetch("/api/intelligence/explore-path",{method:"POST",headers:r,body:JSON.stringify({targetRole:w(a.title,s.fullName),currentRole:w(((l=(m=s.experience)==null?void 0:m[0])==null?void 0:l.jobTitle)||"Current Role",s.fullName),matchPercentage:a.overlap,missingSkills:R(a.missingSkills,s.fullName),userSkills:R(s.skills||[],s.fullName),userExperience:Te(s,s.fullName)})});if(!t.ok)throw new Error("Failed to generate career path");return t.json()},st=async(a,s)=>{var c,d;const r=await A(),t={skills:R(a.skills||[],a.fullName),experience:((c=a.experience)==null?void 0:c.filter(o=>(o.jobTitle||"").trim()).map(o=>({jobTitle:w(o.jobTitle,a.fullName),company:w(o.company||"",a.fullName),summary:w(o.summary||"",a.fullName)})))||[],headline:w(a.headline||"",a.fullName),summary:w(a.summary||"",a.fullName),targetRoles:R(((d=a.jobPreferences)==null?void 0:d.targetRoles)||[],a.fullName)};s&&(s.savedJobs.length>0||s.statusDistribution&&s.statusDistribution.total>0)&&(t.pipeline={savedJobs:s.savedJobs.map(o=>({jobTitle:w(o.jobTitle,a.fullName),companyName:w(o.companyName,a.fullName),matchScore:o.matchScore})),statusDistribution:s.statusDistribution,matchScoreTrend:s.matchScoreTrend});const m=await fetch("/api/intelligence/career-recommendations",{method:"POST",headers:r,body:JSON.stringify(t)});if(!m.ok)throw new Error("AI recommendations failed");const l=await m.json();return Array.isArray(l.recommendations)?l.recommendations:[]},at=async(a,s)=>{var m,l,c;const r=await A(),t=await fetch("/api/intelligence/career-roadmap",{method:"POST",headers:r,body:JSON.stringify({currentRole:w(((l=(m=s.experience)==null?void 0:m[0])==null?void 0:l.jobTitle)||"Current Role",s.fullName),targetRole:w(a.title,s.fullName),matchPercentage:a.overlap,missingSkills:R(a.missingSkills,s.fullName),userSkills:R(s.skills||[],s.fullName),userExperience:Te(s,s.fullName),yearsOfExperience:(c=s._internal)==null?void 0:c.totalYearsOfExperience})});if(!t.ok)throw new Error("Failed to generate career roadmap");return t.text()},wt=async a=>{const s=await A(),r=await fetch("/api/intelligence/learning-resources",{method:"POST",headers:s,body:JSON.stringify(a)});if(!r.ok)throw new Error("Failed to fetch learning resources");return r.json()},rt=async a=>{const s=await A(),r=await fetch("/api/intelligence/salary-benchmark",{method:"POST",headers:s,body:JSON.stringify(a)});if(!r.ok)throw new Error("Failed to fetch salary benchmarks");return r.json()},lt=async()=>{const a=await A(),s=await fetch("/api/intelligence/skills",{method:"GET",headers:a});if(!s.ok)throw new Error("Failed to fetch tracked skills");const r=await s.json();return Array.isArray(r.skills)?r.skills:[]},we=async a=>{const s=await A(),r=await fetch("/api/intelligence/skills",{method:"POST",headers:s,body:JSON.stringify(a)});if(!r.ok)throw new Error("Failed to save skill");return(await r.json()).skill},nt=async(a,s)=>{const r=await A(),t=await fetch(`/api/intelligence/skills/${a}`,{method:"PUT",headers:r,body:JSON.stringify(s)});if(!t.ok)throw new Error("Failed to update skill");return(await t.json()).skill},it=async a=>{const s=await A();if(!(await fetch(`/api/intelligence/skills/${a}`,{method:"DELETE",headers:s})).ok)throw new Error("Failed to delete skill")},ot=async a=>{var m;const s=await A(),r=await fetch("/api/intelligence/skills/suggest",{method:"POST",headers:s,body:JSON.stringify({profile:{headline:w(a.headline||"",a.fullName),summary:w(a.summary||"",a.fullName),skills:R(a.skills||[],a.fullName),experience:((m=a.experience)==null?void 0:m.map(l=>{var c;return{jobTitle:w(l.jobTitle,a.fullName),company:w(l.company,a.fullName),summary:w(l.summary||"",a.fullName),description:R(l.description||[],a.fullName),highlights:R(l.highlights||[],a.fullName),accomplishments:((c=l.accomplishments)==null?void 0:c.map(d=>({description:w(d.description||"",a.fullName),skills:R(d.skills||[],a.fullName)})))||[]}}))||[]}})});if(!r.ok)throw new Error("Failed to suggest skills");const t=await r.json();return Array.isArray(t.suggestions)?t.suggestions:[]},ct=async()=>{const a=await A(),[s,r]=await Promise.allSettled([fetch("/api/database/saved-jobs",{method:"GET",headers:a}),fetch("/api/database/applied-jobs",{method:"GET",headers:a})]);let t=[];if(s.status==="fulfilled"&&s.value.ok){const c=await s.value.json();t=(Array.isArray(c)?c:c.jobs||[]).map(o=>({jobTitle:String(o.job_title||""),companyName:String(o.company_name||""),matchScore:typeof o.match_score=="number"?o.match_score:null})).filter(o=>o.jobTitle)}let m,l;if(r.status==="fulfilled"&&r.value.ok){const c=await r.value.json(),d=Array.isArray(c)?c:c.jobs||[];
2if(d.length>0){const o={applied:0,interviewing:0,offered:0,rejected:0};d.forEach(h=>{const f=String(h.application_status||h.status||"applied").toLowerCase();f==="interviewing"||f==="interview"?o.interviewing++:f==="offered"||f==="offer"?o.offered++:f==="rejected"||f==="declined"?o.rejected++:o.applied++}),m={...o,total:d.length};const k=d.map(h=>typeof h.match_score=="number"?h.match_score:null).filter(h=>h!==null);if(k.length>0){const h=Math.round(k.reduce((v,S)=>v+S,0)/k.length);let f="stable";if(k.length>=4){const v=Math.floor(k.length/2),S=k.slice(v).reduce((C,E)=>C+E,0)/(k.length-v),O=k.slice(0,v).reduce((C,E)=>C+E,0)/v;O-S>3?f="improving":S-O>3&&(f="declining")}l={average:h,trend:f}}}}return{savedJobs:t,statusDistribution:m,matchScoreTrend:l}},K={growing:{icon:Me,badge:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-300",bar:"bg-emerald-500"},stable:{icon:Le,badge:"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-300",bar:"bg-slate-400"},declining:{icon:Ie,badge:"bg-rose-100 text-rose-700 dark:bg-rose-900/30 dark:text-rose-300",bar:"bg-rose-500"}},dt=a=>{const s=new Map;return a.forEach(r=>{(r.hotSkills??[]).forEach(t=>{const m=t.trim();if(!m)return;const l=s.get(m)||{count:0,growing:0,stable:0,declining:0};l.count+=1,l[r.demandTrend]+=1,s.set(m,l)})}),Array.from(s.entries()).map(([r,t])=>{let m="stable";return t.growing>=t.stable&&t.growing>=t.declining?m="growing":t.declining>t.growing&&t.declining>=t.stable&&(m="declining"),{skill:r,count:t.count,trend:m}}).sort((r,t)=>t.count-r.count||r.skill.localeCompare(t.skill))},mt=({benchmarks:a,loading:s=!1})=>{var l;const r=g.useMemo(()=>dt(a).slice(0,10),[a]),t=r.slice(0,5),m=((l=t[0])==null?void 0:l.count)||1;return e.jsxs(M,{variant:"default",padding:"md",className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"rounded-2xl bg-blue-100 p-2 text-blue-600 dark:bg-blue-900/30 dark:text-blue-300",children:e.jsx(se,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-slate-100",children:"Skill Demand Trends"}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Aggregated from the hot skills attached to your recommended roles."})]})]}),s?e.jsxs("div",{className:"space-y-3 animate-pulse",children:[e.jsx("div",{className:"h-10 rounded-2xl bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"h-10 rounded-2xl bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"h-10 rounded-2xl bg-slate-200 dark:bg-slate-700"})]}):r.length===0?e.jsx("div",{className:"rounded-2xl border border-dashed border-slate-300 p-5 text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400",children:"Salary trend data will appear once benchmarks finish loading."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(c=>{const d=K[c.trend].icon;return e.jsxs("div",{className:`inline-flex items-center gap-2 rounded-full px-3 py-2 text-sm font-semibold ${K[c.trend].badge}`,children:[e.jsx(d,{className:"h-4 w-4"}),e.jsx("span",{children:c.skill})]},c.skill)})}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-5",children:t.map(c=>e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4 dark:border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-slate-100",children:c.skill}),e.jsx("span",{className:`rounded-full px-2 py-1 text-[10px] font-bold uppercase ${K[c.trend].badge}`,children:c.trend})]}),e.jsx("div",{className:"mt-4 h-2 rounded-full bg-slate-200 dark:bg-slate-700",children:e.jsx("div",{className:`h-2 rounded-full ${K[c.trend].bar}`,style:{width:`${Math.max(20,c.count/m*100)}%`}})}),e.jsxs("p",{className:"mt-2 text-xs text-slate-500 dark:text-slate-400",children:["Referenced by ",c.count," recommended role",c.count===1?"":"s"]})]},c.skill))})]})]})},W={1:"Beginner",2:"Elementary",3:"Intermediate",4:"Advanced",5:"Expert"},Ne={skill_name:"",proficiency_level:3,source:"manual",category:"Engineering",notes:"",years_of_experience:null}
2,ut=({profile:a,onSkillsChange:s})=>{var z,B,G,q;const{state:r,toast:t}=Ee(),[m,l]=g.useState(!0),[c,d]=g.useState(!1),[o,k]=g.useState(!1),[h,f]=g.useState([]),[v,S]=g.useState([]),[O,C]=g.useState(!1),[E,P]=g.useState(Ne),$=async()=>{var n;if(!((n=r.session)!=null&&n.access_token)){f([]),s==null||s([]);return}d(!0);try{const i=await lt();f(i),s==null||s(i)}catch(i){const u=i instanceof Error?i.message:"Failed to load skills";t.error("Could not load tracked skills",u)}finally{d(!1)}};g.useEffect(()=>{$()},[(z=r.session)==null?void 0:z.access_token]);const H=g.useMemo(()=>h.reduce((n,i)=>{const u=i.category||"Uncategorized";return n[u]=[...n[u]||[],i],n},{}),[h]),Q=async()=>{if(!E.skill_name.trim()){t.info("Add a skill name","Skill name is required before saving.");return}k(!0);try{const n=await we({...E,skill_name:E.skill_name.trim()}),i=[...h.filter(u=>u.id!==n.id&&u.skill_name.toLowerCase()!==n.skill_name.toLowerCase()),n].sort((u,b)=>u.skill_name.localeCompare(b.skill_name));f(i),s==null||s(i),P(Ne),t.success("Skill saved",`${n.skill_name} is now part of your tracked skills.`)}catch(n){const i=n instanceof Error?n.message:"Failed to save skill";t.error("Could not save skill",i)}finally{k(!1)}},F=async(n,i)=>{try{const u=await nt(n.id,i),b=h.map(N=>N.id===u.id?u:N).sort((N,V)=>N.skill_name.localeCompare(V.skill_name));f(b),s==null||s(b)}catch(u){const b=u instanceof Error?u.message:"Failed to update skill";t.error("Could not update skill",b)}},J=async n=>{try{await it(n.id);const i=h.filter(u=>u.id!==n.id);f(i),s==null||s(i),t.success("Skill removed",`${n.skill_name} was removed from tracked skills.`)}catch(i){const u=i instanceof Error?i.message:"Failed to delete skill";t.error("Could not remove skill",u)}},X=async()=>{var n;if(!((n=r.session)!=null&&n.access_token)){t.info("Sign in required","Skill tracking suggestions are available for signed-in users.");return}C(!0);try{const i=await ot(a);S(i),t.success("Suggestions ready",`${i.length} inferred skills found from your Career Diary.`)}catch(i){const u=i instanceof Error?i.message:"Failed to infer skills";t.error("Could not infer skills",u)}finally{C(!1)}},Z=async n=>{try{const i=await we(n),u=[...h.filter(b=>b.skill_name.toLowerCase()!==i.skill_name.toLowerCase()),i].sort((b,N)=>
2b.skill_name.localeCompare(N.skill_name));f(u),s==null||s(u),S(b=>b.filter(N=>N.skill_name!==n.skill_name)),t.success("Suggestion added",`${i.skill_name} is now tracked.`)}catch(i){const u=i instanceof Error?i.message:"Failed to accept suggestion";t.error("Could not add suggestion",u)}};return e.jsxs(M,{variant:"soft",padding:"md",className:"space-y-5 bg-gradient-to-br from-slate-50 to-blue-50 dark:from-slate-900 dark:to-slate-800",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.2em] text-blue-600 dark:text-blue-300",children:"Skill Proficiency"}),e.jsx("h2",{className:"mt-1 text-xl font-bold text-slate-900 dark:text-slate-100",children:"Track what you can actually do"}),e.jsx("p",{className:"mt-1 text-sm text-slate-500 dark:text-slate-400",children:"Rating skills improves the fallback recommendation engine and makes gap analysis more precise."})]}),e.jsx(L,{variant:"ghost",size:"sm",className:"rounded-full",onClick:()=>l(n=>!n),rightIcon:m?e.jsx(Oe,{className:"h-4 w-4"}):e.jsx($e,{className:"h-4 w-4"}),children:m?"Collapse":"Expand"})]}),m&&e.jsxs("div",{className:"space-y-5",children:[(B=r.session)!=null&&B.access_token?null:e.jsx(M,{className:"border border-slate-200 bg-white/70 dark:border-slate-700 dark:bg-slate-900/50",children:e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-300",children:"Sign in to store skill ratings over time and unlock AI-inferred suggestions from your Career Diary."})}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1.2fr_0.8fr]",children:[e.jsxs(M,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-100",children:"Tracked Skills"}),e.jsx(L,{variant:"outline",size:"sm",onClick:()=>{X()},loading:O,leftIcon:e.jsx(se,{className:"h-4 w-4"}),disabled:!((G=r.session)!=null&&G.access_token),children:"Auto-detect from Profile"})]}),c?e.jsx("div",{className:"space-y-3 animate-pulse",children:Array.from({length:4}).map((n,i)=>e.jsx("div",{className:"h-20 rounded-2xl bg-slate-200 dark:bg-slate-700"},i))}):h.length===0?e.jsx("div",{className:"rounded-2xl border border-dashed border-slate-300 p-6 text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400",children:"No tracked skills yet. Add a few core skills to improve overlap scoring."}):e.jsx("div",{className:"space-y-4",children:Object.entries(H).map(([n,i])=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"rounded-full bg-blue-100 px-2.5 py-1 text-[11px] font-bold uppercase tracking-[0.18em] text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",children:n}),e.jsxs("span",{className:"text-xs text-slate-400",children:[i.length," skills"]})]}),e.jsx("div",{className:"space-y-3",children:i.map(u=>e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white/80 p-4 dark:border-slate-700 dark:bg-slate-900/50",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-slate-900 dark:text-slate-100",children:u.skill_name}),e.jsxs("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:[W[u.proficiency_level]," ⢠source ",u.source]})]}),e.jsx(L,{variant:"ghost",size:"sm",className:"text-rose-600 hover:text-rose-700 dark:text-rose-300",onClick:()=>{J(u)},"aria-label":`Delete ${u.skill_name}`,children:e.jsx(Fe,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-[160px_160px_1fr]",children:[e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Proficiency"}),e.jsx("select",{value:u.proficiency_level,onChange:b=>{F(u,{proficiency_level:Number(b.target.value)})},className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dar
2k:text-slate-100",children:Object.entries(W).map(([b,N])=>e.jsxs("option",{value:b,children:[b," - ",N]},b))})]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Years"}),e.jsx("input",{type:"number",min:"0",step:"0.5",defaultValue:u.years_of_experience??"",onBlur:b=>{const N=b.target.value?Number(b.target.value):null;F(u,{years_of_experience:N})},className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100"},`${u.id}-years-${u.years_of_experience??""}`)]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Notes"}),e.jsx("input",{type:"text",defaultValue:u.notes??"",placeholder:"Optional context",onBlur:b=>{F(u,{notes:b.target.value||null})},className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100"},`${u.id}-notes-${u.notes??""}`)]})]})]},u.id))})]},n))}),v.length>0&&e.jsxs("div",{className:"space-y-3 border-t border-slate-200 pt-4 dark:border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("h4",{className:"text-sm font-bold uppercase tracking-[0.18em] text-slate-500 dark:text-slate-400",children:"AI Suggestions"}),e.jsxs("span",{className:"text-xs text-slate-400",children:[v.length," inferred skills"]})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2",children:v.map(n=>e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50/70 p-4 dark:border-slate-700 dark:bg-slate-800/50",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-slate-900 dark:text-slate-100",children:n.skill_name}),e.jsxs("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400",children:[W[n.proficiency_level]," ⢠",n.category||"Uncategorized"]})]}),e.jsx(L,{variant:"primary",size:"sm",onClick:()=>{Z(n)},children:"Add"})]}),n.notes&&e.jsx("p",{className:"mt-3 text-sm text-slate-600 dark:text-slate-300",children:n.notes})]},n.skill_name))})]})]}),e.jsxs(M,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ze,{className:"h-5 w-5 text-blue-500"}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-100",children:"Add Skill"})]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Skill Name"}),e.jsx("input",{type:"text",value:E.skill_name,onChange:n=>P(i=>({...i,skill_name:n.target.value})),placeholder:"TypeScript, Roadmapping, Figma...",className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100"})]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Proficiency"}),e.jsx("select",{value:E.proficiency_level,onChange:n=>P(i=>({...i,proficiency_level:Number(n.target.value)})),className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100",children:Object.entries(W).map(([n,i])=>e.jsxs("option",{value:n,children:[n," - ",i]},n))})]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Category"}),e.jsx("input",{type:"text",value:E.category??"",onChange:n=>P(i=>({...i,category:n.target.value})),className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100"})]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Years of Experience"}),e.jsx("input",{type:"number",min:"0",step:"0.5",value:E.years_of_experience??"",onChange:n=>P(i=>({...i,years_of_experience:n.target.value?Number(n.target.value):null})),className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dar
2k:text-slate-100"})]}),e.jsxs("label",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-slate-400",children:"Notes"}),e.jsx("textarea",{value:E.notes??"",onChange:n=>P(i=>({...i,notes:n.target.value})),rows:4,placeholder:"Where you used it, confidence, proof points...",className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-950 dark:text-slate-100"})]}),e.jsx(L,{variant:"primary",onClick:()=>{Q()},loading:o,disabled:!((q=r.session)!=null&&q.access_token),children:"Save Skill"})]})]})]})]})},gt=re.lazy(()=>ae(()=>import("./ExplorePathModal-B7AakqJI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(a=>({default:a.ExplorePathModal}))),xt=re.lazy(()=>ae(()=>import("./CareerRoadmapView-FLCjJ0Yn.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,13])).then(a=>({default:a.CareerRoadmapView}))),pt=re.lazy(()=>ae(()=>import("./LearningResourcesPopover-C8j3JsXv.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,10,11])).then(a=>({default:a.LearningResourcesPopover}))),Se="careergps-target-role",ht=()=>e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:Array.from({length:6}).map((a,s)=>e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50/70 p-4 dark:border-slate-700 dark:bg-slate-900/50 animate-pulse",children:[e.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-5 w-36 rounded bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"h-3 w-20 rounded bg-slate-200 dark:bg-slate-700"})]}),e.jsx("div",{className:"h-6 w-20 rounded-full bg-slate-200 dark:bg-slate-700"})]}),e.jsx("div",{className:"mb-4 h-2 rounded-full bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"mb-2 h-3 w-full rounded bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"mb-4 h-3 w-5/6 rounded bg-slate-200 dark:bg-slate-700"}),e.jsxs("div",{className:"mb-4 flex gap-2",children:[e.jsx("div",{className:"h-6 w-20 rounded-full bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"h-6 w-16 rounded-full bg-slate-200 dark:bg-slate-700"}),e.jsx("div",{className:"h-6 w-14 rounded-full bg-slate-200 dark:bg-slate-700"})]}),e.jsx("div",{className:"h-9 rounded-xl bg-slate-200 dark:bg-slate-700"})]},s))}),ee=a=>a.trim().toLowerCase(),bt=()=>{var xe,pe,he,be,fe,ke;const{state:a,toast:s}=Ee(),{isGuest:r}=qe(),{profile:t}=a,l=((xe=Ue().state)==null?void 0:xe.jobTitle)??null,[c,d]=g.useState(null),[o,k]=g.useState([]),[h,f]=g.useState(!0),[v,S]=g.useState(0),[O,C]=g.useState(!0),[E,P]=g.useState(!1),[$,H]=g.useState([]),[Q,F]=g.useState(!1),[J,X]=g.useState(null),[Z,z]=g.useState(!1),[B,G]=g.useState(""),[q,n]=g.useState(!1),[i,u]=g.useState(null),[b,N]=g.useState(null),[V,le]=g.useState(!1),[Ae,ne]=g.useState({}),[Re,ie]=g.useState([]),[oe,ce]=g.useState(""),[p,de]=g.useState(null),[Y,me]=g.useState(!1);Je({title:"Career GPS | CareerDiary",description:"Explore trajectory recommendations based on your CareerDiary profile.",canonical:"https://careerdiary.io/app/intelligence/career-gps"}),g.useEffect(()=>{l&&d(`I just tailored my resume for a ${l} role and I'm feeling unsure about applying. Can you help me build confidence?`)},[l]);const T=o[v]||null,ue=g.useMemo(()=>{var x,y,j;return((x=t==null?void 0:t.contactDetails)==null?void 0:x.location)||((j=(y=t==null?void 0:t._internal)==null?void 0:y.primaryLocation)==null?void 0:j.fullLocation)||void 0},[t]);g.useEffect(()=>{r||!t||(me(!0),ct().then(x=>de(x)).catch(()=>de(null)).finally(()=>me(!1)))},[r,t]),g.useEffect(()=>{if(r){f(!1);return}Y||(async()=>{if(!t){k([]),f(!1);return}f(!0),P(!1);try{const y=await st(t,p??void 0);if(!y.length)throw new Error("No AI recommendations returned");k(y),C(!0)}catch(y){const j=tt(t,$);k(j),C(!1),P(!0);const D=y instanceof Error?y.message:"AI recommendation engine unavailable";s.error("Using offline recommendations",D)}finally{f(!1)}})()},[t,$,r,p,Y]),g.useEffect(()=>{if(o.length===0){S(0);return}const x=typeof window<"u"?window.localStorage.getItem(Se):null;if(x){const y=o.findIndex(j=>j.title===x);if(y>=0){S(y);return}}S(y=>Math.min(y,o.length-1))},[o]),g.useEffect(()=>{!o[v]||typeof window>"u"||window.localStorage.setItem(Se,o[v].title)},[o,v]),g.useEffect(()=>{if(r)return;(async()=>{var y;if(!o.length||!t){ne({}),ie([]),ce("");return}le(!0);try{const j=await rt({roles:o.map(_=>_.title),location:ue,experienceYears:(y=t._internal)==null?void 0:y.totalYearsOfExperience}),D=j.benchmarks.reduce((_,I)=>(_[I.role]=I,_),{});ie(j.benchmarks),ne(D),ce(j.disclaimer)}catch(j){const D=j instanceof Error?j.message:"Failed to load salary benchmarks";s.error("Salary data unavailable",D)}finally{le(!1)}})()},[o,t,ue,r]);const Ce=g.useCallback(x=>{var _;const y=ee(x),j=$.find(I=>ee(I.skill_name)===y);return j?j.proficiency_level>=3?"intermediate":"beginner":((_=t==null?void 0:t.skills)==null?void 0:_.some(I=>ee(I)===y))?"beginner":"none"},[$,t==null?void 0:t.skills]),Pe=g.useCallback(x=>{X(x),F(!0)},[]),ge=g.useCallback(async()=>
2{if(!(!t||!T)){n(!0);try{const x=await at(T,t);G(x),z(!0)}catch(x){const y=x instanceof Error?x.message:"Failed to generate roadmap";s.error("Career roadmap unavailable",y)}finally{n(!1)}}},[t,T,s]);return r?e.jsx(je,{featureName:"Career GPS",featureKey:"career_gps",description:"Map career trajectories, compare salary bands, and generate next-step roadmaps with AI guidance.",children:e.jsx("div",{className:"space-y-8 p-8 text-center text-gray-400",children:"Career GPS preview"})}):e.jsx(je,{featureName:"Career GPS",featureKey:"career_gps",description:"Map career trajectories, compare salary bands, and generate next-step roadmaps with AI guidance.",children:e.jsxs("div",{className:"space-y-8 animate-in fade-in duration-700",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold bg-gradient-to-r from-blue-600 to-indigo-600 bg-clip-text text-transparent",children:"Career GPS"}),e.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-1",children:"AI-powered trajectory mapping based on your skills, experience, and career diary evidence."})]}),e.jsx(Ve,{content:"Strategy Engine analyzes your skills, experience, and career diary to generate personalized recommendations.",position:"bottom",children:e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-blue-50 dark:bg-blue-900/20 rounded-full border border-blue-100 dark:border-blue-800",children:[e.jsx(se,{className:"h-5 w-5 text-blue-500"}),e.jsx("span",{className:"text-sm font-semibold text-blue-700 dark:text-blue-300",children:O?"Strategy Engine Active":"Strategy Engine Fallback"})]})})]}),t&&e.jsx(ut,{profile:t,onSkillsChange:x=>H(x)}),!Y&&p&&(p.savedJobs.length>0||p.statusDistribution&&p.statusDistribution.total>0)?e.jsxs("div",{className:"rounded-2xl border border-indigo-200 bg-gradient-to-r from-indigo-50/80 to-blue-50/80 px-5 py-4 dark:border-indigo-900/40 dark:from-indigo-950/30 dark:to-blue-950/30",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(ye,{className:"h-4 w-4 text-indigo-500"}),e.jsx("span",{className:"text-xs font-bold text-indigo-700 dark:text-indigo-300 uppercase tracking-wider",children:"Pipeline Context"})]}),e.jsxs("p",{className:"text-sm text-slate-700 dark:text-slate-300",children:["Based on ",e.jsxs("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:[p.savedJobs.length," saved job",p.savedJobs.length!==1?"s":""]}),p.statusDistribution&&p.statusDistribution.total>0&&e.jsxs(e.Fragment,{children:[", ",e.jsxs("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:[p.statusDistribution.total," application",p.statusDistribution.total!==1?"s":""]})]}),p.matchScoreTrend&&e.jsxs(e.Fragment,{children:[", avg match score ",e.jsxs("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:[p.matchScoreTrend.average,"%"]}),p.matchScoreTrend.trend!=="stable"&&e.jsx("span",{className:p.matchScoreTrend.trend==="improving"?"text-green-600 dark:text-green-400":"text-amber-600 dark:text-amber-400",children:p.matchScoreTrend.trend==="improving"?" (trending up)":" (trending down)"})]})]}),p.statusDistribution&&p.statusDistribution.rejected>0&&p.statusDistribution.total>0&&e.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:[Math.round(p.statusDistribution.rejected/p.statusDistribution.total*100),"% rejection rate",p.statusDistribution.interviewing>0&&` · ${p.statusDistribution.interviewing} in interviews`,p.statusDistribution.offered>0&&` · ${p.statusDistribution.offered} offer${p.statusDistribution.offered!==1?"s":""}`]})]}):!Y&&p&&p.savedJobs.length===0&&(!p.statusDistribution||p.statusDistribution.total===0)&&!h?e.jsx("div",{className:"rounded-2xl border border-dashed border-slate-300 bg-slate-50/50 px-5 py-4 dark:border-slate-700 dark:bg-slate-900/30",children:e.jsxs("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:["Save some jobs or track applications to get ",e.jsx("span",{className:"font-semibold text-slate-600 dar
2k:text-slate-300",children:"pipeline-aware guidance"})," tailored to your active job search."]})}):null,c&&e.jsxs("div",{className:"rounded-2xl border border-blue-200 bg-blue-50/80 px-4 py-3 flex items-start justify-between gap-3 dark:border-blue-900/40 dark:bg-blue-950/20",children:[e.jsxs("p",{className:"text-sm text-blue-800 dark:text-blue-200 italic",children:['"',c,'"']}),e.jsx("button",{onClick:()=>d(null),className:"shrink-0 text-blue-400 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-300 text-xl leading-none transition-colors","aria-label":"Dismiss",children:"Ã"})]}),E&&e.jsx("div",{className:"rounded-2xl border border-amber-200 bg-amber-50/80 px-4 py-3 text-sm text-amber-800 dark:border-amber-900/40 dark:bg-amber-950/20 dark:text-amber-200",children:"Using offline recommendations. AI engine temporarily unavailable."}),e.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[e.jsxs(M,{variant:"default",padding:"md",className:"lg:col-span-2 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-slate-100 dark:border-slate-800 pb-4",children:[e.jsx(ye,{className:"h-6 w-6 text-indigo-500"}),e.jsx("h2",{className:"text-xl font-bold",children:"Recommended Micro-Pivots"})]}),h?e.jsx(ht,{}):e.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:o.map((x,y)=>{const j=Ae[x.title],D=v===y;return e.jsxs("div",{onClick:()=>S(y),className:`career-path-card p-4 rounded-2xl border bg-slate-50/50 dark:bg-slate-900/50 hover:border-blue-400 hover:shadow-lg transition-all cursor-pointer group ${D?"border-blue-400 ring-2 ring-blue-500/20 shadow-lg":"border-slate-100 dark:border-slate-800"}`,children:[e.jsxs("div",{className:"flex justify-between items-start mb-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg group-hover:text-blue-600 transition-colors leading-tight",children:x.title}),e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-400",children:x.category})]}),e.jsxs("div",{className:"flex flex-col items-end gap-2",children:[e.jsx("span",{className:`text-[10px] font-bold px-2 py-1 rounded-full ${x.type==="progression"?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":x.type==="adjacent"?"bg-indigo-100 text-indigo-700 dark:bg-indigo-900/30 dark:text-indigo-400":"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-400"}`,children:x.type.toUpperCase()}),D&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-blue-100 px-2 py-1 text-[10px] font-bold uppercase tracking-[0.16em] text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",children:[e.jsx(Be,{className:"h-3.5 w-3.5"}),"Set as Target"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"flex-1 h-1.5 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-blue-600",style:{width:`${x.overlap}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-blue-600 dark:text-blue-400 whitespace-nowrap",children:[x.overlap,"% Match"]})]}),V?e.jsx("div",{className:"mb-2 h-4 w-36 animate-pulse rounded bg-slate-200 dark:bg-slate-700"}):j!=null&&j.salaryRange?e.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 mb-2 dark:text-slate-400",children:[e.jsxs("span",{children:["$",((j.salaryRange.low??0)/1e3).toFixed(0),"k"]}),e.jsx("span",{children:"-"}),e.jsxs("span",{className:"font-semibold text-green-600 dark:text-green-400",children:["$",((j.salaryRange.median??0)/1e3).toFixed(0),"k"]}),e.jsx("span",{children:"-"}),e.jsxs("span",{children:["$",((j.salaryRange.high??0)/1e3).toFixed(0),"k"]}),j.demandTrend==="growing"&&e.jsx("span",{className:"text-green-500 ml-1",children:"â"})]}):null,e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-4 line-clamp-2 italic",children:x.reason}),x.missingSkills.length>0&&e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Growth Opportunity"}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[x.missingSkills.slice(0,3).map(_=>e.jsxs("button",{type:"button",onClick:I=>{I.stopPropagation(),N(I.currentTarget),u({skill:_,targetRole:x.title,currentLevel:Ce(_)})}
2,className:"text-[10px] px-2 py-1 bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 rounded-md hover:bg-blue-100 hover:text-blue-700 dark:hover:bg-blue-900/30 dark:hover:text-blue-300 cursor-pointer transition-colors",children:["+ ",_]},`${x.title}-${_}`)),x.missingSkills.length>3&&e.jsxs("span",{className:"text-[10px] text-slate-400",children:["+",x.missingSkills.length-3," more"]})]})]}),e.jsx(L,{variant:"ghost",size:"sm",className:"w-full text-xs font-semibold py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 hover:border-blue-300 dark:hover:border-blue-700",onClick:_=>{_.stopPropagation(),Pe(x)},children:"Explore Path"})]},x.title)})})]}),e.jsxs(M,{variant:"soft",padding:"md",className:"space-y-6 h-fit bg-gradient-to-br from-indigo-50 to-blue-50 dark:from-slate-900 dark:to-slate-800",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ge,{className:"h-6 w-6 text-blue-500"}),e.jsx("h2",{className:"text-lg font-bold",children:"Trajectory Map"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-white/50 dark:bg-white/5 rounded-xl border border-white/20",children:[e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider mb-2",children:"Current Benchmark"}),e.jsx("p",{className:"text-sm font-semibold",children:((he=(pe=t==null?void 0:t.experience)==null?void 0:pe[0])==null?void 0:he.jobTitle)||"Career Diary Entry Needed"})]}),e.jsxs("div",{className:"flex flex-col items-center gap-1 py-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-200 dark:bg-blue-800"}),e.jsx("div",{className:"w-0.5 h-4 bg-blue-200 dark:bg-blue-800"}),e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-300 dark:bg-blue-700"}),e.jsx("div",{className:"w-0.5 h-4 bg-blue-300 dark:bg-blue-700"}),e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-400 dark:bg-blue-600"})]}),e.jsxs("div",{className:"p-4 bg-blue-600 text-white rounded-xl shadow-lg cursor-pointer transition-all duration-300",children:[e.jsx("p",{className:"text-xs font-bold text-blue-100 uppercase tracking-wider mb-1",children:"Target Milestone"}),e.jsx("p",{className:"font-bold",children:(T==null?void 0:T.title)||"AI Strategy"})]}),T&&e.jsxs("div",{className:"text-center text-sm text-slate-500 dark:text-slate-400",children:[e.jsxs("span",{className:"font-bold text-blue-600 dark:text-blue-300",children:[T.overlap,"%"]})," skill match",e.jsx("span",{className:"mx-1",children:"·"}),e.jsxs("span",{className:"text-amber-600 dark:text-amber-300",children:[T.missingSkills.length," gaps"]})]})]}),e.jsx(L,{variant:"primary",className:"w-full shadow-md",onClick:()=>{ge()},loading:q,disabled:!T||!t,children:"Generate Career Roadmap"}),e.jsxs("div",{className:"pt-2 border-t border-slate-200 dark:border-slate-700",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2",children:"Quick Start"}),e.jsx("button",{type:"button",onClick:()=>d(l?`I just tailored my resume for a ${l} role and I'm feeling unsure about applying. Can you help me build confidence?`:"Help me build confidence for this job application"),className:"w-full text-left text-xs px-3 py-2 bg-white/60 dark:bg-white/5 border border-slate-200 dark:border-slate-700 rounded-lg text-slate-600 dark:text-slate-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 hover:border-blue-200 dark:hover:border-blue-700 transition-colors",children:"ðª Help me build confidence for this job application"})]})]})]}),e.jsx(mt,{benchmarks:Re,loading:V}),oe&&e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:oe}),e.jsxs(g.Suspense,{fallback:null,children:[J&&t&&e.jsx(gt,{isOpen:Q,onClose:()=>F(!1),recommendation:J,profile:t}),i&&e.jsx(pt,{isOpen:!!(i&&b),onClose:()=>{u(null),N(null)},anchorEl:b,skill:i.skill,targetRole:i.targetRole,currentLevel:i.currentLevel,userExperienceYears:(be=t==null?void 0:t._internal)==null?void 0:be.totalYearsOfExperience}),T&&e.jsx(xt,{isOpen:Z,onClose:()=>z(!1),markdown:B,currentRole:((ke=(fe=t==null?void 0:t.experience)==null?void 0:fe[0])==null?void 0:ke.jobTitle)||"Current Role",targetRole:T.title,onRegenerate:()=>{ge()},isRegenerating:q})]})]})})},Nt=Object.freeze(Object.defineProperty({__proto__:null,CareerGPSPage:bt},Symbol.toStringTag,{value:"Module"}));
2export{Nt as C,vt as e,wt as g};
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.