1import{r as e,j as t}from"./vendor-react-CcOkrrXR.js";import{a as s,aR as r,e as a,s as l,ac as o,L as c,q as i,K as n,a5 as m,E as h,aN as d,a$ as g,A as x}from"./index-DBwMo6Yj.js";import{C as u}from"./compass-s42qztix.js";import{V as p}from"./video-3RLSq4bg.js";import{b,a as f,L as v}from"./vendor-router-ByYPGhRc.js";import"./vendor-query-O7qEwtyB.js";import"./vendor-axios-CZ8oOnp1.js";import"./vendor-i18n-yn_Olgdh.js";const j=[{title:"About Techiguru",href:"/about",blurb:"Story, team, partners, and advertising"},{title:"Training catalog",href:"/#courses",blurb:"Live instructor-led programs"},{title:"Internships",href:"/internship",blurb:"Structured intern tracks"},{title:"College Trainings",href:"/college-trainings",blurb:"Short-term trainer opportunities"},{title:"Careers",href:"/careers",blurb:"Open roles at Techiguru"},{title:"Help Centre",href:"/help-centre",blurb:"FAQs for enrolment, payments, certificates"},{title:"FAQ",href:"/faq",blurb:"Answers for courses, internships, workshops, and certificates"},{title:"Advertise with us",href:"/advertise",blurb:"Place ads on the Techiguru portal"},{title:"Contact",href:"/contact",blurb:"Admissions, support, and partnerships"},{title:"Blog",href:"/blog",blurb:"Articles and career notes"},{title:"Tutorials",href:"/tutorials",blurb:"Free self-paced series"},{title:"Home",href:"/",blurb:"Featured courses, internships, and career tools"},{title:"School Program",href:"/school-program",blurb:"AI & Innovation School Program for Classes VI\u2013XII"},{title:"AI Code Generator",href:"/ai-code-generator",blurb:"Generate frontend HTML, CSS, JS, or React from a prompt"},{title:"AI Mentor",href:"/ai-mentor",blurb:"Career path suggestions from your goals and skills"},{title:"AI Soft Skills Trainer",href:"/ai-soft-skills-trainer",blurb:"Talk through interview answers and get communication coaching"},{title:"Resume Quest",href:"/ats-resume",blurb:"ATS Resume Challenge \u2014 match your resume to a job mission"},{title:"LinkedIn Booster",href:"/linkedin-booster",blurb:"AI-powered LinkedIn profile and personal-branding recommendations"},{title:"Career Premium",href:"/career-premium",blurb:"Jobs, resume AI, mock interviews, and career tools"},{title:"Privacy policy",href:"/privacy-policy",blurb:"How we handle learner data"}];function y(e,t){return`${e.title} ${e.blurb||""} ${e.label||""} ${e.trackLabel||""}`.toLowerCase().includes(t)}function k({href:e,kicker:s,title:r,excerpt:a,image:l,extra:o}){return t.jsxs(v,{to:e,className:"flex gap-3 p-3",style:{background:"var(--tg-surface)",border:"1px solid var(--tg-border)",textDecoration:"none"},children:[t.jsx("div",{className:"w-16 h-16 shrink-0 flex items-center justify-center overflow-hidden",style:{background:"var(--tg-bg-2)"},children:l?t.jsx(g,{src:l,alt:r,className:"w-full h-full object-cover",style:{width:"100%",height:"100%"}}):o||t.jsx(i,{size:18,style:{color:"var(--tg-accent)"}})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[s&&t.jsx("p",{className:"text-[10px] font-extrabold uppercase tracking-widest mb-0.5",style:{color:"var(--tg-accent)"},children:s}),t.jsx("p",{className:"text-sm font-semibold truncate",style:{color:"var(--tg-text-head)"},children:r}),a&&t.jsx("p",{className:"text-xs mt-1 line-clamp-2",style:{color:"var(--tg-text-muted)"},children:a})]}),t.jsx(x,{size:14,className:"shrink-0 mt-1",style:{color:"var(--tg-text-muted)"}})]})}function N(){const[g,x]=b(),v=f(),N=(g.get("q")||"").trim(),[w,T]=e.useState(N),[C,S]=e.useState(!1),[A,I]=e.useState({courses:[],blogs:[],tutorials:[],workshops:[]});e.useEffect(()=>{T(N)},[N]),e.useEffect(()=>{if(N.length<2)return void I({courses:[],blogs:[],tutorials:[],workshops:[]});let e=!1;return S(!0),s.get("/search",{params:{q:N},skipSessionInvalidate:!0}).then(({data:t})=>{e||I({courses:t.courses||[],blogs:t.blogs||[],tutorials:t.tutorials||[],workshops:t.workshops||[]})}).catch(()=>{e||I({courses:[],blogs:[],tutorials:[],workshops:[]})}).finally(()=>{e||S(!1)}),()=>{e=!0}},[N]);const z=N.toLowerCase(),L=N.length>=2?j.filter(e=>y(e,z)):[],P=N.length>=2?r(d).filter(e=>y(e,z)).slice(0,10):[],$=A.courses.length+A.blogs.length+A.tutorials.length+A.workshops.length+L.length+P.length;return t.jsxs("div",{className:"tg-page min-h-screen",style:{background:"var(--tg-bg)"},children:[t.jsx(a,{...l("/search"),title:N?`Search Results for "${N}"`:l("/search").title}),t.jsxs("div",{className:"max-w-[960px] mx-auto px-4 sm:px-6 py-8",children:[t.jsx("p",{className:"text-xs font-extrabold uppercase tracking-widest mb-2",style:{color:"var(--tg-accent)"},children:"Search"}),t.jsx("h1",{className:"text-2xl font-extrabold mb-4",style:{color:"var(--tg-text-head)"},children:"Find courses, tracks, and answers"}),t.jsxs("form",{onSubmit:e=>{e.preventDefault();const t=w.trim();t&&x({q:t})},className:"flex gap-2 mb-8",children:[t.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3",style:{background:"var(--tg-surface)",border:"1px solid var(--tg-border)"},children:[t.jsx(o,{size:16,style:{color:"var(--tg-accent)"}}),t.jsx("input",{value:w,onChange:e=>T(e.target.value),placeholder:"Try \u201cMERN\u201d, \u201ccertificate\u201d, \u201cinternship\u201d\u2026",className:"flex-1 py-3 text-sm bg-transparent outline-none",style:{color:"var(--tg-text-head)"}})]}),t.jsx("button",{type:"submit",className:"px-5 text-sm font-semibold",style:{background:"var(--tg-accent)",color:"var(--tg-on-accent)"},children:"Search"})]}),N.length>0&&N.length<2&&t.jsx("p",{className:"text-sm",style:{color:"var(--tg-text-muted)"},children:"Type at least 2 characters."}),C&&t.jsxs("div",{className:"flex items-center gap-2 py-10",style:{color:"var(--tg-text-muted)"},children:[t.jsx(c,{size:18,className:"animate-spin"})," Searching\u2026"]}),!C&&N.length>=2&&t.jsxs(t.Fragment,{children:[t.jsxs("p",{className:"text-sm mb-5",style:{color:"var(--tg-text-muted)"},children:[$," result",1===$?"":"s"," for \u201c",N,"\u201d"]}),0===$&&t.jsxs("div",{className:"p-6",style:{background:"var(--tg-surface)",border:"1px solid var(--tg-border)"},children:[t.jsx("p",{className:"font-semibold mb-1",style:{color:"var(--tg-text-head)"},children:"No matches"}),t.jsx("p",{className:"text-sm mb-3",style:{color:"var(--tg-text-muted)"},children:"Try a shorter keyword, or jump to a popular section."}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx("button",{type:"button",className:"text-sm font-semibold",style:{color:"var(--tg-accent)"},onClick:()=>v("/#courses"),children:"Training"}),t.jsx("button",{type:"button",className:"text-sm font-semibold",style:{color:"var(--tg-accent)"},onClick:()=>v("/blog"),children:"Blog"}),t.jsx("button",{type:"button",className:"text-sm font-semibold",style:{color:"var(--tg-accent)"},onClick:()=>v("/help-centre"),children:"Help"})]})]}),A.courses.length>0&&t.jsxs("section",{className:"mb-8",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-sm font-bold mb-3",style:{color:"var(--tg-text-head)"},children:[t.jsx(i,{size:15,style:{color:"var(--tg-accent)"}})," Courses"]}),t.jsx("div",{className:"grid gap-2",children:A.courses.map(e=>t.jsx(k,{href:e.href,kicker:e.category||"Course",title:e.title,excerpt:e.excerpt||e.instructor?.name,image:n(e.thumbnail)},e._id))})]}),P.length>0&&t.jsxs("section",{className:"mb-8",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-sm font-bold mb-3",style:{color:"var(--tg-text-head)"},children:[t.jsx(u,{size:15,style:{color:"var(--tg-accent)"}})," Technology tracks"]}),t.jsx("div",{className:"grid gap-2",children:P.map(e=>t.jsx(k,{href:`/tracks/${e.slug}`,kicker:e.trackLabel||"Track",title:e.title||e.label,excerpt:e.objectives||e.duration},e.slug||e.id))})]}),A.blogs.length>0&&t.jsxs("section",{className:"mb-8",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-sm font-bold mb-3",style:{color:"var(--tg-text-head)"},children:[t.jsx(m,{size:15,style:{color:"var(--tg-accent)"}})," Blog"]}),t.jsx("div",{className:"grid gap-2",children:A.blogs.map(e=>t.jsx(k,{href:e.href,kicker:e.category||"Article",title:e.title,excerpt:e.excerpt,image:n(e.coverImage)},e._id))})]}),A.tutorials.length>0&&t.jsxs("section",{className:"mb-8",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-sm font-bold mb-3",style:{color:"var(--tg-text-head)"},children:[t.jsx(p,{size:15,style:{color:"var(--tg-accent)"}})," Tutorials"]}),t.jsx("div",{className:"grid gap-2",children:A.tutorials.map(e=>t.jsx(k,{href:e.href,kicker:e.category||"Tutorial",title:e.title,excerpt:e.excerpt,image:n(e.thumbnail)},e._id))})]}),A.workshops.length>0&&t.jsxs("section",{className:"mb-8",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-sm font-bold mb-3",style:{color:"var(--tg-text-head)"},children:[t.jsx(h,{size:15,style:{color:"var(--tg-accent)"}})," College Trainings"]}),t.jsx("div",{className:"grid gap-2",children:A.workshops.map(e=>t.jsx(k,{href:e.href,kicker:"Trainer opportunity",title:e.title,excerpt:e.excerpt},e._id))})]}),L.length>0&&t.jsxs("section",{className:"mb-8",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-sm font-bold mb-3",style:{color:"var(--tg-text-head)"},children:[t.jsx(u,{size:15,style:{color:"var(--tg-accent)"}})," Pages"]}),t.jsx("div",{className:"grid gap-2",children:L.map(e=>t.jsx(k,{href:e.href,kicker:"Page",title:e.title,excerpt:e.blurb},e.href))})]})]})]})]})}export{N 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.