PageSourceSearch

https://xterns.ai/assets/XternProjectHub-_J-YDvAQ.js

js xterns.ai collected 2026-10-05 13:24:04 UTC 15,066 bytes, 1 lines download raw bytes

1import{r as x,j as e,aK as j,bt as N,I as Y,U as D,ad as L,J as d,h as Z,i as ee,k as se,a4 as ae,m as re,H as F,e as te}from"./index-DLd_kDlx.js";import{S as v,a as y,b as w,c as S,d as l}from"./select-RSrodAEw.js";import{u as le}from"./useProjects-D0lM2jIR.js";import{P as de}from"./ProjectDetailsModal-inVluIgr.js";import{u as ie,A as ne}from"./AcquireExperienceDialog-gZslbKSr.js";import{G as T}from"./globe-C057RQ73.js";import{F as oe}from"./filter-BMeMiGQo.js";import{T as C}from"./trending-up-BU4cR3Ys.js";import{S as ce}from"./search-DFH5eAlA.js";import"./index-BdQq_4o_.js";import"./index-Deh-4PO1.js";import"./chevron-down-DpJJsCer.js";import"./chevron-up-M4SAwIjf.js";import"./book-open-BSYsXyfC.js";import"./git-branch-C-twpC7K.js";import"./plus-0WhrdjYO.js";const ke=()=>{const[i,X]=x.useState(""),[n,q]=x.useState("all"),[o,E]=x.useState("all"),[c,M]=x.useState("all"),[a,z]=x.useState(null),[H,V]=x.useState(!1),[B,u]=x.useState(!1),{projects:I,isLoading:O,error:A,hasAppliedToProject:k,getApplicationStatus:g}=le(),{pods:U}=ie(),$=s=>{const r=U.filter(h=>h.project_id===s);if(r.length===0)return{totalXterns:0,maxXterns:0,spotsLeft:0};const t=r.reduce((h,f)=>h+Math.max(0,f.current_members-1),0),m=r.reduce((h,f)=>h+f.max_members,0),b=m-t;return{totalXterns:t,maxXterns:m,spotsLeft:b}},p=I.filter(s=>{const r=s.title.toLowerCase().includes(i.toLowerCase())||s.description.toLowerCase().includes(i.toLowerCase()),t=n==="all"||s.difficulty_level===n,m=o==="all"||s.mode===o,b=c==="all"||s.career_paths&&s.career_paths.includes(c);return r&&t&&m&&b}),P=s=>{z(s),u(!0)},G=()=>{console.log("Selected solo mode for project:",a==null?void 0:a.id),u(!1)},J=s=>{console.log("Joined pod:",s,"for project:",a==null?void 0:a.id),u(!1)},K=()=>{console.log("Finding tech lead for project:",a==null?void 0:a.id),u(!1)},R=s=>{switch(s){case"beginner":return"bg-emerald-50 text-emerald-700 border-emerald-200";case"intermediate":return"bg-amber-50 text-amber-700 border-amber-200";case"advanced":return"bg-rose-50 text-rose-700 border-rose-200";default:return"bg-slate-50 text-slate-700 border-slate-200"}},Q=s=>{switch(s){case"solo":return"bg-indigo-50 text-indigo-700 border-indigo-200";case"pod":return"bg-purple-50 text-purple-700 border-purple-200";default:return"bg-slate-50 text-slate-700 border-slate-200"}},W=s=>{switch(s){case"frontend":return"bg-blue-100 text-blue-800";case"backend":return"bg-purple-100 text-purple-800";case"fullstack":return"bg-indigo-100 text-indigo-800";case"devops":return"bg-orange-100 text-orange-800";case"data-engineer":return"bg-teal-100 text-teal-800";case"ai-ml":return"bg-pink-100 text-pink-800";case"ai-ml-engineering":return"bg-pink-100 text-pink-800";case"product-manager":return"bg-cyan-100 text-cyan-800";case"technical-writer":return"bg-sky-100 text-sky-800";case"technical-researcher":return"bg-violet-100 text-violet-800";case"content-creation-communication":return"bg-fuchsia-100 text-fuchsia-800";case"customer-success-sales":return"bg-emerald-100 text-emerald-800";case"qa-test":return"bg-lime-100 text-lime-800";case"qa-engineer":return"bg-lime-100 text-lime-800";case"ui-ux":return"bg-rose-100 text-rose-800";case"ui-ux-designer":return"bg-rose-100 text-rose-800";case"mobile":return"bg-emerald-100 text-emerald-800";case"security":return"bg-red-100 text-red-800";case"cybersecurity":return"bg-red-100 text-red-800";case"database-admin":return"bg-violet-100 text-violet-800";case"system-admin":return"bg-amber-100 text-amber-800";case"arvr-dev":return"bg-fuchsia-100 text-fuchsia-800";default:return"bg-gray-100 text-gray-800"}},_=s=>{const r=L.find(t=>t.id===s);return r?r.name:s};return O?e.jsx(j,{children:e.jsxs("div",{className:"min-h-screen flex w-full",children:[e.jsx(N,{}),e.jsx("main",{className:"flex-1 p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-lg",children:"Loading projects..."})})})]})}):A?e.jsx(j,{children:e.jsxs("div",{className:"min-h-screen flex w-full",children:[e.jsx(N,{}),e.jsx("main",{className:"flex-1 p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsxs("div",{className:"text-lg text-red-600",children:["Error loading projects: ",A]})})})]})}):e.jsx(j,{children:e.jsxs("div",{className:"min-h-screen flex w-full bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",children:[e.jsx(N,{}),e.jsxs("main",{className:"flex-1 p-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"p-3 bg-gradient-to-br from-purple-500 to-indigo-600 rounded-xl shadow-lg",children:e.jsx(T,{className:"h-6 w-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold bg-gradient-to-r from-gray-900 to-gray-700 bg-clip-text text-transparent",children:"Project Hub"}),e.jsx("p",{className:"text-gray-600 text-lg",children:"Discover and apply to exciting projects"})]})]})}),e.jsxs("div",{className:"bg-white rounded-3xl shadow-2xl border border-gray-100 p-8 mb-8 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-gradient-to-br from-purple-100 to-blue-100 rounded-full transform translate-x-32 -translate-y-32 opacity-30"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-gradient-to-tr from-indigo-100 to-purple-100 rounded-full transform -translate-x-24 translate-y-24 opacity-20"}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"p-2 bg-gradient-to-r from-purple-500 to-indigo-600 rounded-lg",children:e.jsx(oe,{className:"h-5 w-5 text-white"})}),e.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"Filter & Search Projects"}),e.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[e.jsx(C,{className:"h-4 w-4 text-gray-400"}),e.jsxs("span",{className:"text-sm text-gray-500 font-medium",children:[p.length," projects found"]}
1)]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6",children:[e.jsxs("div",{className:"lg:col-span-6 relative",children:[e.jsx("div",{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 z-10",children:e.jsx(ce,{className:"h-5 w-5"})}),e.jsx(Y,{placeholder:"Search projects by name, description, or skills...",value:i,onChange:s=>X(s.target.value),className:"pl-12 h-14 border-2 border-gray-200 bg-gray-50 hover:border-purple-300 focus:border-purple-500 focus:bg-white rounded-2xl text-base transition-all duration-200 shadow-sm hover:shadow-md"})]}),e.jsx("div",{className:"lg:col-span-3",children:e.jsxs(v,{value:n,onValueChange:q,children:[e.jsx(y,{className:"h-14 border-2 border-gray-200 bg-gray-50 hover:border-purple-300 focus:border-purple-500 rounded-2xl transition-all duration-200 shadow-sm hover:shadow-md",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{className:"h-4 w-4 text-gray-500"}),e.jsx(w,{placeholder:"Difficulty Level"})]})}),e.jsxs(S,{className:"rounded-xl border-2 shadow-xl",children:[e.jsx(l,{value:"all",className:"rounded-lg",children:"All Difficulties"}),e.jsx(l,{value:"beginner",className:"rounded-lg",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 bg-emerald-500 rounded-full"}),"Beginner"]})}),e.jsx(l,{value:"intermediate",className:"rounded-lg",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 bg-amber-500 rounded-full"}),"Intermediate"]})}),e.jsx(l,{value:"advanced",className:"rounded-lg",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 bg-rose-500 rounded-full"}),"Advanced"]})})]})]})}),e.jsx("div",{className:"lg:col-span-2",children:e.jsxs(v,{value:o,onValueChange:E,children:[e.jsx(y,{className:"h-14 border-2 border-gray-200 bg-gray-50 hover:border-purple-300 focus:border-purple-500 rounded-2xl transition-all duration-200 shadow-sm hover:shadow-md",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(D,{className:"h-4 w-4 text-gray-500"}),e.jsx(w,{placeholder:"Project Mode"})]})}),e.jsxs(S,{className:"rounded-xl border-2 shadow-xl",children:[e.jsx(l,{value:"all",className:"rounded-lg",children:"All Modes"}),e.jsx(l,{value:"solo",className:"rounded-lg",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 bg-indigo-500 rounded-full"}),"Solo"]})}),e.jsx(l,{value:"pod",className:"rounded-lg",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 bg-purple-500 rounded-full"}),"Pod"]})})]})]})}),e.jsx("div",{className:"lg:col-span-2",children:e.jsxs(v,{value:c,onValueChange:M,children:[e.jsx(y,{className:"h-14 border-2 border-gray-200 bg-gray-50 hover:border-purple-300 focus:border-purple-500 rounded-2xl transition-all duration-200 shadow-sm hover:shadow-md",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{className:"h-4 w-4 text-gray-500"}),e.jsx(w,{placeholder:"Career Path"})]})}),e.jsxs(S,{className:"rounded-xl border-2 shadow-xl",children:[e.jsx(l,{value:"all",className:"rounded-lg",children:"All Career Paths"}),L.map(s=>e.jsx(l,{value:s.id,className:"rounded-lg",children:s.name},s.id))]})]})})]}),(i||n!=="all"||o!=="all"||c!=="all")&&e.jsx("div",{className:"mt-6 pt-6 border-t border-gray-200",children:e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium text-gray-600",children:"Active filters:"}),i&&e.jsxs(d,{variant:"secondary",className:"bg-purple-100 text-purple-800 border-purple-200 px-3 py-1 rounded-full",children:['Search: "',i,'"']}),n!=="all"&&e.jsx(d,{variant:"secondary",className:"bg-blue-100 text-blue-800 border-blue-200 px-3 py-1 rounded-full capitalize",children:n}),o!=="all"&&e.jsx(d,{variant:"secondary",className:"bg-indigo-100 text-indigo-800 border-indigo-200 px-3 py-1 rounded-full capitalize",children:o}),c!=="all"&&e.jsx(d,{variant:"secondary",className:"bg-teal-100 text-teal-800 border-teal-200 px-3 py-1 rounded-full",children:_(c)})]})})]})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:p.map(s=>{const r=$(s.id);return e.jsxs(Z,{className:"group hover:shadow-2xl hover:-translate-y-1 transition-all duration-300 border-0 shadow-xl bg-white/80 backdrop-blur-sm overflow-hidden rounded-2xl",children:[e.jsxs(ee,{className:"pb-6",children:[e.jsx("div",{className:"flex items-start justify-between mb-6",children:e.jsxs("div",{className:"flex-1",children:[e.jsx(se,{className:"text-xl mb-4 text-gray-900 group-hover:text-purple-600 transition-colors leading-tight",children:s.title}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(d,{className:`${R(s.difficulty_level)} border font-medium px-3 py-1 rounded-full text-sm`,children:s.difficulty_level}),e.jsx(d,{className:`${Q(s.mode)} border font-medium px-3 py-1 rounded-full text-sm`,children:s.mode}),s.career_paths&&s.career_paths.slice(0,2).map((t,m)=>e.jsx(d,{className:`${W(t)} font-medium px-3 py-1 rounded-full text-sm`,children:_(t)},m)),s.career_paths&&s.career_paths.length>2&&e.jsxs(d,{variant:"outline",className:"text-xs font-medium px-2 py-1 rounded-full",children:["+",s.career_paths.length-2," more"]})]})]})}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(ae,{className:"h-4 w-4 text-purple-500"}),e.jsxs("span",{className:"font-medium",children:[s.duration_weeks," weeks duration"]})]})]}),e.jsxs(re,{className:"pt-0 space-y-6",children:[e.jsx("p",{className:"text-gray-600 leading-relaxed text-sm line-clamp-3",children:s.description}),e.jsx("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl p-5 border border-blue-100",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:e.jsx(D,{className:"w-4 h-4 text-blue-600"})}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Xterns Enrolled"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"text-xl font-bold text-blue-600",children:[r.totalXterns,"/",r.maxXterns]}),e.jsxs("div",{className:"text-xs text-gray-500 font-medium",children:[r.spotsLeft," spots left"]})]})]})}),e.jsxs("div",{className:"space-y-3",children:[s.application_deadline&&e.jsxs("div",{className:"flex items-center justify-between text-sm bg-orange-50 p-3 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[e.jsx(F,{className:"w-4 h-4 text-orange-500"}),e.jsx("span",{className:"font-medium",children:"Apply by"})]}),e.jsx("span",{className:"font-semibold text-gray-900",children:new Date(s.application_deadline).toLocaleDateString()})]}),s.start_date&&e.jsxs("div",{className:"flex items-center justify-between text-sm bg-green-50 p-3 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[e.jsx(F,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{className:"font-medium",children:"Starts on"})]}),e.jsx("span",{className:"font-semibold text-gray-900",children:new Date(s.start_date).toLocaleDateString()})]})]}),e.jsx("div",{className:"pt-4",children:k(s.id)?e.jsxs("div",{className:"flex items-center justify-center gap-3 py-4 bg-green-50 rounded-xl border border-green-200",children:[e.jsx(te,{className:"h-5 w-5 text-green-500"}),e.jsx("span",{className:"text-sm font-semibold text-green-700",children:g(s.id)==="accepted"?"Application Accepted":g(s.id)==="rejected"?"Application Not Selected":"Application Submitted"})]}):e.jsx("button",{onClick:()=>P(s),className:"w-full bg-gradient-to-r from-purple-600 via-purple-600 to-indigo-600 hover:from-purple-700 hover:via-purple-700 hover:to-indigo-700 text-white py-4 px-6 rounded-xl font-semibold transition-all duration-200 transform hover:scale-[1.02] shadow-lg hover:shadow-xl",children:"Acquire Experience"})})]})]},s.id)})}),p.length===0&&e.jsx("div",{className:"text-center py-20",children:e.jsxs("div",{className:"bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 p-16 max-w-md mx-auto",children:[e.jsx("div",{className:"p-4 bg-gray-100 rounded-full w-20 h-20 flex items-center justify-center mx-auto mb-6",children:e.jsx(T,{className:"h-10 w-10 text-gray-400"})}),e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:"No projects found"}),e.jsx("p",{className:"text-gray-600 leading-relaxed",children:i||n!=="all"||o!=="all"||c!=="all"?"Try adjusting your filters to discover more exciting projects.":"No projects have been published yet. Check back soon for new opportunities!"})]})}),e.jsx(de,{project:a,isOpen:H,onClose:()=>V(!1),hasApplied:a?k(a.id):!1,applicationStatus:a?g(a.id):null,onAcquireExperience:P}),e.jsx(ne,{project:a,isOpen:B,onClose:()=>u(!1),onSelectSolo:G,onSelectPod:J,onFindTechLead:K})]})]})})};export{ke 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.