1import{j as e}from"./vendor-query-BHcDM7rw.js";import{k as B,u as E,r as m}from"./vendor-react-DHPG0S42.js";import{C as n,a as t,b as l,c as d,d as c}from"./card-txxsFi8B.js";import{T as M,a as H,b as y,c as x,d as L,e as h}from"./table-BVY_v-SG.js";import{A as F,a as J,b as I}from"./avatar-BtX-O-RE.js";import{B as r}from"./badge-CeptlhxZ.js";import{B as w}from"./button-DRDlISWS.js";import{P as k}from"./progress-DHyeBTmJ.js";import{T as U,a as G,b as j,c as p}from"./tabs-9X4Y2aVZ.js";import{R as $}from"./RankingExplanation-Dz-2wwUK.js";import{A as z}from"./AddSkillForm-DYid4_4m.js";import{J as f}from"./vendor-ui-BEbuZsVX.js";import{T as O,k as W}from"./supabase-E19SSUmj.js";import{c as Q,u as V}from"./index-B6gMI8qg.js";import{g as Y}from"./imageUtils-Df--LVGr.js";import{M as X}from"./map-pin-BrD0CZsd.js";import{M as _}from"./mail-CcV2vjvx.js";import{P as q}from"./phone-CtLxlOGM.js";import{G as v}from"./graduation-cap-CbL0x82M.js";import{C as K}from"./calendar-DjSlUQiP.js";import{D as C}from"./dollar-sign--_VUx5E-.js";import{C as Z}from"./code-Ca7go3C2.js";import{B as ee}from"./book-DfbDRJfL.js";import{B as g}from"./briefcase-BZz3Ngt4.js";import"./separator-U6LA5bua.js";import"./input-CkscVn5I.js";import"./textarea-DLk_SQy4.js";import"./select-dNRtxM6j.js";import"./chevron-down-07LzMnTB.js";import"./chevron-up-CU2C5APn.js";import"./check-1S43UZIh.js";import"./label-UKLaDFFg.js";import"./plus-oquJ5Wye.js";import"./file-check-g2cKhcFx.js";import"./award-AD_N76eD.js";import"./vendor-supabase-CseCC2Es.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const se=Q("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]),Ie=()=>{const{id:u}=B(),o=E(),[a,ae]=m.useState(null),[S,T]=m.useState("overview"),[A,N]=m.useState(!1),{user:b}=V();m.useEffect(()=>{u&&o(`/profile/${u}/candidate`,{replace:!0})},[u,o]);const R=async s=>{if(!b){f.error("You must be logged in to add skills"),o("/auth");return}N(!0);try{const i={...s,user_id:b.id};await W(i),f.success("Skill added successfully!")}catch(i){console.error("Error adding skill:",i),f.error("Failed to add skill. Please try again.")}finally{N(!1)}};return a?e.jsxs("div",{className:"container mx-auto py-12 px-6",children:[e.jsx(w,{variant:"outline",className:"mb-6",onClick:()=>o("/dashboard"),children:"Back to Dashboard"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs(n,{className:"lg:col-span-1",children:[e.jsxs(t,{className:"text-center border-b pb-6",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsxs(F,{className:"h-24 w-24",children:[e.jsx(J,{src:Y(a.avatar,96),alt:`${a.name}'s profile photo`,loading:"lazy",decoding:"async",width:"96",height:"96"}),e.jsx(I,{children:a.name.charAt(0)})]})}),e.jsx(l,{children:a.name}),e.jsx(d,{children:a.title}),e.jsx("div",{className:"flex justify-center mt-3 gap-2",children:a.skills.slice(0,3).map((s,i)=>e.jsx(r,{variant:"secondary",children:s},i))})]}),e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:a.location})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:a.email})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(q,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:a.phone})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:a.education})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(K,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("span",{children:["Available ",a.availability]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(C,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:"Current CTC: $85,000"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(C,{className:"h-4 w-4 text-primary"}),e.jsx("span",{children:"Expected CTC: $105,000"})]}),e.jsxs("div",{className:"border-t pt-4 mt-4",children:[e.jsxs("h3",{className:"font-semibold mb-3 flex items-center",children:[e.jsx(O,{className:"h-4 w-4 mr-2 text-primary"})," Ranking"]}),e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{children:"Overall Ranking"}),e.jsxs("span",{className:"font-bold",children:[a.ranking.overall,"/100"]})]}),e.jsx(k,{value:a.ranking.overall,className:"h-2 mb-4"}),e.jsxs("div",{className:"bg-primary/5 p-3 rounded-md",children:[e.jsx("div",{className:"font-medium mb-2",children:"Ranking Position"}),e.jsxs("div",{className:"flex items-center text-xl font-bold text-primary",children:["#",a.ranking.position," ",e.jsxs("span",{className:"text-sm font-normal text-muted-foreground ml-2",children:["of ",a.ranking.total," candidates"]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Top ",Math.round(a.ranking.position/a.ranking.total*100),"% in ",a.skills[0]]})]})]})]})})]}),e.jsx("div",{className:"lg:col-span-2 space-y-6",children:e.jsxs(U,{value:S,onValueChange:T,children:[e.jsxs(G,{className:"w-full justify-start mb-6",children:[e.jsx(j,{value:"overview",children:"Overview"}),e.jsx(j,{value:"ranking",children:"Ranking Details"}),e.jsx(j,{value:"experience",children:"Experience"}),e.jsx(j,{value:"add-skills",children:"Add Skills"})]}),e.jsxs(p,{value:"overview",className:"space-y-6",children:[e.jsxs(n,{children:[e.jsxs(t,{children:[e.jsx(l,{children:"Skills & Expertise"}),e.jsx(d,{children:"Skill assessment and ranking"})]}),e.jsx(c,{children:e.jsx("div",{className:"space-y-6",children:a.skillRankings.map((s,i)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{className:"flex items-center",children:[s.name==="React.js"&&e.jsx(Z,{className:"h-4 w-4 mr-2 text-primary"}),s.name==="TypeScript"&&e.jsx(se,{className:"h-4 w-4 mr-2 text-primary"}),s.name==="UI/UX"&&e.jsx(ee,{className:"h-4 w-4 mr-2 text-primary"}),e.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e.jsxs("span",{className:"text-sm font-medium",children:[s.score,"%"]})]}),e.jsx(k,{value:s.score,className:"h-1.5"}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{children:["Ranking: #",s.ranking," of ",s.total]}),e.jsxs("span",{children:["Top ",Math.round(s.ranking/s.total*100),"%"]})]})]},i))})})]}),e.jsxs(n,{children:[e.jsxs(t,{children:[e.jsx(l,{children:"Project Experience"}),e.jsx(d,{children:"Academic and personal projects"})]}),e.jsx(c,{children:e.jsx("div",{className:"space-y-6",children:a.projects.map((s,i)=>e.jsxs("div",{className:"border-b last:border-0 pb-4 last:pb-0",children:[e.jsx("h3",{className:"font-semibold",children:s.name}),e.jsx("div",{className:"flex gap-2 mb-2 mt-1",children:s.technologies.map((P,D)=>e.jsx(r,{variant:"outline",children:P},D))}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.description})]},i))})})]}),e.jsxs(n,{children:[e.jsxs(t,{children:[e.jsx(l,{children:"Applications"}),e.jsx(d,{children:"Recent job applications"})]}),e.jsx(c,{children:e.jsxs(M,{children:[e.jsx(H,{children:e.jsxs(y,{children:[e.jsx(x,{children:"Company"}),e.jsx(x,{children:"Position"}),e.jsx(x,{children:"Applied"}),e.jsx(x,{children:"Status"})]})}),e.jsx(L,{children:a.applications.map((s,i)=>e.jsxs(y,{children:[e.jsx(h,{className:"font-medium",children:s.company}),e.jsx(h,{children:s.position}),e.jsx(h,{children:s.date}),e.jsx(h,{children:e.jsx(r,{variant:s.status==="Accepted"?"default":s.status==="Pending"?"secondary":"outline",children:s.status})})]},i))})]})})]})]}),e.jsxs(p,{value:"ranking",className:"space-y-6",children:[e.jsx($,{}),e.jsxs(n,{children:[e.jsxs(t,{children:[e.jsx(l,{children:"Your Ranking History"}),e.jsx(d,{children:"See how your ranking has changed over time"})]}),e.jsx(c,{children:e.jsx("div",{className:"h-64 w-full bg-muted/30 rounded-md flex items-center justify-center",children:e.jsx("p",{className:"text-muted-foreground",children:"Ranking history chart will be available soon"})})})]})]}),e.jsxs(p,{value:"experience",className:"space-y-6",children:[e.jsxs(n,{children:[e.jsxs(t,{children:[e.jsx(l,{children:"Work Experience"}),e.jsx(d,{children:"Professional history"})]}),e.jsx(c,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-b pb-5",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Senior Frontend Developer"}),e.jsxs("div",{className:"flex items-center text-muted-foreground mt-1",children:[e.jsx(g,{className:"h-4 w-4 mr-1"}),e.jsx("span",{children:"TechCorp Inc."})]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Jan 2021 - Present"})]}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Led the development of the company's flagship SaaS product, improving performance by 40%. Mentored junior developers and implemented modern frontend architecture."}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[e.jsx(r,{variant:"outline",children:"React"}),e.jsx(r,{variant:"outline",children:"TypeScript"}),e.jsx(r,{variant:"outline",children:"GraphQL"}),e.jsx(r,{variant:"outline",children:"Team Leadership"})]})]}),e.jsxs("div",{className:"border-b pb-5",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Frontend Developer"}),e.jsxs("div",{className:"flex items-center text-muted-foreground mt-1",children:[e.jsx(g,{className:"h-4 w-4 mr-1"}),e.jsx("span",{children:"WebSolutions Inc."})]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Mar 2018 - Dec 2020"})]}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Developed responsive web applications for various clients in e-commerce and fintech sectors. Collaborated with designers to implement pixel-perfect UIs."}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[e.jsx(r,{variant:"outline",children:"React"}),e.jsx(r,{variant:"outline",children:"JavaScript"}),e.jsx(r,{variant:"outline",children:"CSS"}),e.jsx(r,{variant:"outline",children:"Redux"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Junior Web Developer"}),e.jsxs("div",{className:"flex items-center text-muted-foreground mt-1",children:[e.jsx(g,{className:"h-4 w-4 mr-1"}),e.jsx("span",{children:"Digital Agency"})]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Jun 2016 - Feb 2018"})]}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Created and maintained websites for small to medium-sized businesses. Focused on responsive design and cross-browser compatibility."}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[e.jsx(r,{variant:"outline",children:"HTML"}),e.jsx(r,{variant:"outline",children:"CSS"}),e.jsx(r,{variant:"outline",children:"JavaScript"}),e.jsx(r,{variant:"outline",children:"jQuery"})]})]})]})})]}),e.jsxs(n,{children:[e.jsxs(t,{children:[e.jsx(l,{children:"Education"}),e.jsx(d,{children:"Academic background"})]}),e.jsx(c,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-b pb-5",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Bachelor of Science in Computer Science"}),e.jsxs("div",{className:"flex items-center text-muted-foreground mt-1",children:[e.jsx(v,{className:"h-4 w-4 mr-1"}),e.jsx("span",{children:"University of Technology"})]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"2012 - 2016"})]}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Graduated with honors. Focus on software engineering and web technologies. Completed thesis on real-time web applications."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"High School Diploma"}),e.jsxs("div",{className:"flex items-center text-muted-foreground mt-1",children:[e.jsx(v,{className:"h-4 w-4 mr-1"}),e.jsx("span",{children:"Jefferson High School"})]})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"2008 - 2012"})]}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Advanced placement in Mathematics and Computer Science. President of the Computer Club."})]})]})})]})]}),e.jsx(p,{value:"add-skills",children:e.jsx(z,{onSubmit:R,isSubmitting:A})})]})})]})]}):e.jsxs("div",{className:"container mx-auto py-12 px-6 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Profile not found"}),e.jsx(w,{onClick:()=>
6o("/dashboard"),children:"Back to Dashboard"})]})};export{Ie as default};
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.