1import{r as n,j as e}from"./vendor-react-zpu3niaY.js";import{u as rs,L as we,a as ls}from"./vendor-router-fEmgOTjS.js";import{u as ae}from"./vendor-query-DL93OzBF.js";import{c as qe,u as Te,ag as os,k as d,D as Ae,s as Fe,v as Ie,w as Re,x as Ee,a as ns,L as is,S as oe,I as J,j as te,l as cs,Q as ke,X as De,o as Se,C as ds,a6 as ms,T as xs,W as hs,Y as us,Z as ps,O as gs,a7 as bs}from"./index-BoxmWKdd.js";import{S as ys}from"./SEOHead-Q-morWIB.js";import{C as E,a as D}from"./card-BIRgDOO3.js";import{B as L}from"./badge-C1IRWViS.js";import{A as fs,a as js,b as vs,c as Ns}from"./accordion-UdW3Y14D.js";import{S as ws}from"./index-BUtACmAv.js";import{M as S}from"./map-pin-DqmTzp0w.js";import{N as ks}from"./navigation-D0ZU4EQU.js";import{C as Ss}from"./clock-B0U3dRWR.js";import{L as re}from"./lock-1d_a2pWZ.js";import{L as Ce}from"./locate-fixed-CtOCalYh.js";import{T as Cs}from"./truck-DWZnYIp6.js";import{C as Ls,S as Ps}from"./shopping-bag-BGwYUGRs.js";import{S as qs}from"./shield-_-5nzVzf.js";import{P as Ts}from"./package-24BRZH0l.js";import{Z as _e}from"./zap-CXjJTkCw.js";import{M as As}from"./monitor-CLZB-hhK.js";import{S as Fs}from"./send-zJV5WQar.js";import{S as le}from"./sliders-horizontal-DnzveWZC.js";import{C as Is}from"./circle-check-BM5lVIGJ.js";import{E as Rs}from"./eye-7oIkhL-Y.js";import"./vendor-editor-DP1cC4if.js";/** 2 * @license lucide-react v0.453.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 Es=qe("ChefHat",[["path",{d:"M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z",key:"1qvrer"}],["path",{d:"M6 17h12",key:"1jwigz"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Ds=qe("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);function _s(t){if(!t)return"";const i=Date.now()-new Date(t).getTime(),u=Math.floor(i/36e5);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function Hs({job:t}){var p,b,j;const{isAuthenticated:i}=Te(),u=rs(),[w,f]=n.useState(!1),m=((b=(p=t.tags)!=null&&p.length?t.tags:t.skillsRequired)==null?void 0:b.slice(0,3))||[],P=encodeURIComponent(`Hi, I saw your "${t.title}" job on Rojgar Hub and would like to apply.`),x=t.employerPhone?t.employerPhone.replace(/\D/g,""):"",v=x?`https://wa.me/91${x}?text=${P}`:null,_=t.walkInTimings||t.contactPerson||v,q=_s(t.postedAt);return e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"group hover-elevate transition-all duration-200",children:e.jsxs(D,{className:"p-4 space-y-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-base leading-tight line-clamp-2 flex-1 min-w-0",children:t.title}),q&&e.jsx("span",{className:"text-xs text-muted-foreground shrink-0 mt-0.5",children:q})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:((j=t.companyName)==null?void 0:j.trim())||"Unknown Company"}),t.salaryRange&&e.jsx("span",{className:"text-sm font-semibold text-green-700 dark:text-green-400 shrink-0",children:t.salaryRange})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(S,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:t.locality?`${t.locality}, ${t.location}`:t.location})]}),t.type&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-border",children:"·"}),e.jsx("span",{className:"shrink-0",children:t.type})]}),t.distance!=null&&e.jsxs(L,{variant:"secondary",className:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-300 border-none gap-1 text-[11px] ml-auto",children:[e.jsx(ks,{className:"h-2.5 w-2.5"}),t.distance," km"]})]}),m.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:m.map((N,h)=>e.jsx(L,{variant:"outline",className:"text-[10px] py-0 h-5",children:N},h))}),_&&e.jsxs("div",{className:"relative py-1",children:[e.jsxs("div",{className:i?"space-y-1.5":"blur-sm select-none pointer-events-none",children:[t.walkInTimings&&e.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Ss,{className:"h-3.5 w-3.5 shrink-0 text-primary/70"}),e.jsxs("span",{children:["Walk-in: ",t.walkInTimings]})]}),t.contactPerson&&e.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(os,{className:"h-3.5 w-3.5 shrink-0 text-primary/70"}),e.jsxs("span",{children:["Ask for: ",t.contactPerson]})]})]}),!i&&e.jsxs("button",{onClick:()=>f(!0),className:"absolute inset-0 flex items-center justify-center gap-1.5 text-xs text-primary font-semibold hover:underline bg-background/20 rounded-sm",children:[e.jsx(re,{className:"h-3 w-3"}),"View contact details"]}
11)]}),(t.urgentHiring||t.womenFriendly)&&e.jsxs("div",{className:"flex gap-1.5 flex-wrap",children:[t.urgentHiring&&e.jsx(L,{variant:"secondary",className:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300 border-none text-[10px] h-5",children:"Urgent"}),t.womenFriendly&&e.jsx(L,{variant:"secondary",className:"bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-300 border-none text-[10px] h-5",children:"Women-Friendly"})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-3 border-t",children:[e.jsx(we,{to:`/jobs/${t.id}`,className:"flex-1",children:e.jsx(d,{variant:"outline",size:"sm",className:"w-full",children:"View Details"})}),i?v?e.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:e.jsxs(d,{size:"sm",className:"w-full gap-1.5 bg-green-600 hover:bg-green-700 text-white border-none",children:[e.jsx(ws,{className:"h-3.5 w-3.5"}),"Apply via WhatsApp"]})}):e.jsx(we,{to:`/jobs/${t.id}#apply`,className:"flex-1",children:e.jsx(d,{size:"sm",className:"w-full",children:"Apply Now"})}):e.jsxs(d,{size:"sm",className:"flex-1 gap-1.5",onClick:()=>f(!0),children:[e.jsx(re,{className:"h-3.5 w-3.5"}),"Apply"]})]})]})}),e.jsx(Ae,{open:w,onOpenChange:f,children:e.jsxs(Fe,{className:"max-w-sm",children:[e.jsxs(Ie,{children:[e.jsxs(Re,{className:"flex items-center gap-2",children:[e.jsx(re,{className:"h-5 w-5 text-primary"}),"Sign in to apply"]}),e.jsx(Ee,{children:"Create a free account or log in to apply for this job and see full contact details."})]}),e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsx(d,{className:"w-full",onClick:()=>u(`/login?redirect=/jobs/${t.id}#apply`),children:"Login"}),e.jsx(d,{variant:"outline",className:"w-full",onClick:()=>u(`/login?tab=signup&redirect=/jobs/${t.id}#apply`),children:"Create Free Account"}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Free forever. No credit card required."})]})]})})]})}const $s=[{label:"1 km",value:1},{label:"3 km",value:3},{label:"5 km",value:5},{label:"10 km",value:10}],Us=[{label:"All",value:""},{label:"Full-time",value:"Full-time"},{label:"Part-time",value:"Part-time"},{label:"Contract",value:"Contract"}],Os=[{label:"Any",value:""},{label:"Under â¹10k",value:"0-10000"},{label:"â¹10kââ¹20k",value:"10000-20000"},{label:"â¹20kââ¹40k",value:"20000-40000"},{label:"â¹40k+",value:"40000-99999"}],Ms=[{label:"Any time",value:""},{label:"Today",value:"1"},{label:"Last 3 days",value:"3"},{label:"Last week",value:"7"}],Bs=[{label:"Any",value:""},{label:"Fresher",value:"fresher"},{label:"1â2 yrs",value:"1-2"},{label:"3â5 yrs",value:"3-5"}],Ws=[{label:"Delivery",sub:"Delivery Boy / Partner",query:"delivery",icon:Cs,color:"bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400"},{label:"Driver",sub:"Car, Truck, Auto",query:"driver",icon:Ls,color:"bg-blue-50 dark:bg-blue-950/30 text-blue-600 dark:text-blue-400"},{label:"Security",sub:"Guard / Bouncer",query:"security guard",icon:qs,color:"bg-slate-50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-400"},{label:"Retail / Sales",sub:"Counter / Executive",query:"retail sales",icon:Ps,color:"bg-purple-50 dark:bg-purple-950/30 text-purple-600 dark:text-purple-400"},{label:"Warehouse",sub:"Packing / Loading",query:"warehouse",icon:Ts,color:"bg-yellow-50 dark:bg-yellow-950/30 text-yellow-600 dark:text-yellow-400"},{label:"Helper / Mazdoor",sub:"Labour / Loader",query:"helper",icon:Ds,color:"bg-red-50 dark:bg-red-950/30 text-red-600 dark:text-red-400"},{label:"Cook / Kitchen",sub:"Chef / Assistant",query:"cook",icon:Es,color:"bg-amber-50 dark:bg-amber-950/30 text-amber-600 dark:text-amber-400"},{label:"Electrician",sub:"Wiring / Repair",query:"electrician",icon:_e,color:"bg-cyan-50 dark:bg-cyan-950/30 text-cyan-600 dark:text-cyan-400"},{label:"Housekeeping",sub:"Cleaning / Facility",query:"housekeeping",icon:cs,color:"bg-green-50 dark:bg-green-950/30 text-green-600 dark:text-green-400"},{label:"Data Entry / Office",sub:"Computer / Admin",query:"data entry",icon:As,color:"bg-indigo-50 dark:bg-indigo-950/30 text-indigo-600 dark:text-indigo-400"}],Gs=["delivery boy","security guard","driver","packing","housekeeping","electrician","cook","helper","retail sales","data entry","warehouse","receptionist","tailor","plumber","welder"],Js=[{icon:S,title:"Set Your Location",desc:"Use GPS or type your city to find jobs near you"},{icon:oe,title:"Browse & Filter",desc:"Filter by distance, salary, experience and job type"}
11,{icon:Fs,title:"Apply Instantly",desc:"Contact employers directly via WhatsApp or phone"}],zs=["Delhi","Mumbai","Bangalore","Hyderabad","Chennai","Pune","Kolkata","Ahmedabad","Jaipur","Lucknow","Chandigarh","Amritsar","Surat","Indore","Nagpur","Bhopal","Patna","Noida","Gurgaon","Faridabad","Ghaziabad","Coimbatore","Kochi","Vizag","Vadodara"],Le=[{q:"What are local jobs near me?",a:"Local jobs near you are blue-collar and entry-level job opportunities posted by employers within your city, locality, or commuting distance. On Rojgar Hub, you can search for delivery jobs, driver vacancies, security guard positions, retail sales roles, warehouse jobs, cook openings, housekeeping and more â all filtered by your GPS location or city name."},{q:"How do I find jobs close to my home?",a:"Click the GPS button on the search bar above to auto-detect your location, or type your city / locality name in the location field. Once your location is set, you'll see jobs sorted by proximity so you can prioritise opportunities within walking or short commuting distance."},{q:"Do I need to create an account to search local jobs?",a:"No. You can browse and search local jobs on Rojgar Hub without registering. You only need an account to save jobs, track your applications, or set up personalised job alerts."},{q:"What types of local jobs are available on Rojgar Hub?",a:"Rojgar Hub lists a wide variety of local and blue-collar jobs including: delivery boy / partner, cab and truck driver, security guard, housekeeping and facility management, retail and counter sales, warehouse packing and loading, cook and kitchen helper, electrician and plumber, data entry and office assistant, and many more."},{q:"How do job alerts work for local jobs?",a:"After setting your location and searching for a job type, click 'Set up email alert' in the right panel. Enter your email (no account needed) and we'll notify you whenever a new matching local job is posted in your area. Logged-in candidates can manage alerts from their dashboard."},{q:"Can I filter local jobs by salary or experience?",a:"Yes. Once you have set your location and see results, use the Filters panel on the left (or the filter button on mobile) to narrow jobs by salary range, employment type (full-time, part-time, contract), posting date, and years of experience."},{q:"Which cities have the most local job listings?",a:"High-volume cities on Rojgar Hub include Delhi, Mumbai, Bangalore, Hyderabad, Pune, Chennai, Kolkata, Ahmedabad, Jaipur, and Lucknow. Smaller cities like Chandigarh, Amritsar, Surat, Indore and Nagpur also have active listings across delivery, security and retail categories."}];function Pe({lat:t,radius:i,typeFilter:u,salaryFilter:w,postedFilter:f,expFilter:m,onRadiusChange:P,onTypeChange:x,onSalaryChange:v,onPostedChange:_,onExpChange:q,onClearAll:p,activeCount:b}){const j="text-xs px-3 py-1.5 rounded-full border transition-colors cursor-pointer",N="bg-primary text-primary-foreground border-primary",h="border-border text-muted-foreground hover:border-primary/50 hover:text-foreground";return e.jsxs("div",{className:"space-y-5",children:[b>0&&e.jsxs("button",{onClick:p,className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[e.jsx(De,{className:"h-3 w-3"})," Clear all filters"]}),t!==void 0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Distance"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:$s.map(o=>e.jsx("button",{onClick:()=>
11P(o.value),className:`${j} ${i===o.value?N:h}`,children:o.label},o.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Job Type"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Us.map(o=>e.jsx("button",{onClick:()=>x(o.value),className:`${j} ${u===o.value?N:h}`,children:o.label},o.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Salary / Wage"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Os.map(o=>e.jsx("button",{onClick:()=>v(o.value),className:`${j} ${w===o.value?N:h}`,children:o.label},o.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Posted Within"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Ms.map(o=>e.jsx("button",{onClick:()=>_(o.value),className:`${j} ${f===o.value?N:h}`,children:o.label},o.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Experience"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Bs.map(o=>e.jsx("button",{onClick:()=>q(o.value),className:`${j} ${m===o.value?N:h}`,children:o.label},o.value))})]})]})}function fa(){var Ne;const[t,i]=ls(),{toast:u}=ns(),{isAuthenticated:w,user:f}=Te(),m=t.get("lat")?parseFloat(t.get("lat")):void 0,P=t.get("lng")?parseFloat(t.get("lng")):void 0,x=t.get("location")||t.get("city")||void 0,v=m!==void 0&&P!==void 0||!!x,_=t.get("q")||"",q=t.get("radius")?parseInt(t.get("radius")):5,[p,b]=n.useState(_),[j,N]=n.useState(()=>localStorage.getItem("rh_last_city")||""),[h,o]=n.useState(q),[T,ne]=n.useState(t.get("type")||""),[A,ie]=n.useState(t.get("salary")||""),[F,ce]=n.useState(t.get("posted")||""),[I,de]=n.useState(t.get("exp")||""),[H,me]=n.useState(""),[$,z]=n.useState(!1),[He,R]=n.useState(!1),[M,U]=n.useState(null),[$e,B]=n.useState(!1),[O,xe]=n.useState(0),[Q,Y]=n.useState([]),[Ue,C]=n.useState(!1),W=n.useRef(null),[Oe,K]=n.useState(!1),[Me,he]=n.useState(!1),{data:ue}=ae({queryKey:["/api/job-seeker/job-alerts"],queryFn:()=>fetch("/api/job-seeker/job-alerts",{credentials:"include"}).then(s=>s.ok?s.json():[]),enabled:w&&(f==null?void 0:f.role)==="candidate",staleTime:60*1e3});n.useEffect(()=>{const s=t.get("q")||"local jobs",a=x||(m!==void 0?"Near me":""),r=(ue??[]).some(l=>l.active===!0&&(l.query??"")===s&&(l.location??"")===a&&(l.jobCategory??"all")==="private");he(r)},[ue,t,x,m]),n.useEffect(()=>{if(!v){const s=localStorage.getItem("rh_last_lat"),a=localStorage.getItem("rh_last_lng"),r=localStorage.getItem("rh_last_city");if(s&&a){const l=new URLSearchParams(t);l.set("lat",s),l.set("lng",a),i(l,{replace:!0})}else if(r){const l=new URLSearchParams(t);l.set("location",r),i(l,{replace:!0})}}},[]);const{data:V}=ae({queryKey:["/api/hyperlocal-job-titles","IN"],queryFn:()=>fetch("/api/hyperlocal-job-titles?country=IN").then(s=>s.json()),staleTime:300*1e3}),Z=(V==null?void 0:V.titles)??[],Be=Z.slice().sort((s,a)=>(s.sortOrder??0)-(a.sortOrder??0)).slice(0,10),We=p.length===0?[]:Z.flatMap(s=>{var l,y;const a=p.toLowerCase();if(s.primaryTitle.toLowerCase().includes(a)||(l=s.hindiTitle)!=null&&l.includes(p))return[{...s,matchedSynonym:null}];const r=(y=s.synonyms)==null?void 0:y.find(g=>g.toLowerCase().includes(a));return r?[{...s,matchedSynonym:r}]:[]}),Ge=((Ne=t.get("q"))==null?void 0:Ne.toLowerCase())??"",G=Z.filter(s=>s.primaryTitle.toLowerCase()!==Ge).sort((s,a)=>(s.sortOrder??0)-(a.sortOrder??0)).slice(0,8);n.useEffect(()=>{const s=a=>{W.current&&!W.current.contains(a.target)&&C(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);const Je=()=>{const s=new URLSearchParams;if(s.set("limit","20"),s.set("offset",String(O)),t.get("q")&&s.set("q",t.get("q")),m!==void 0){s.set("lat",String(m)),s.set("lng",String(P)),s.set("radius",String(h));const a=x||localStorage.getItem("rh_last_city");a&&s.set("city",a)}return x&&m===void 0&&s.set("location",x),T&&s.set("type",T),A&&s.set("salary",A),F&&s.set("posted",F),I&&s.set("exp",I),s.set("source","RojgarHub"),`/api/jobs?${s.toString()}`},{data:c,isLoading:ze,isFetching:pe}=ae({queryKey:["local-jobs",t.toString(),h,T,A,F,I,O],queryFn:()=>fetch(Je()).then(s=>s.json()),enabled:v});n.useEffect(()=>{c!=null&&c.jobs&&Y(O===0?c.jobs:s=>[...s,...c.jobs])},[c==null?void 0:c.jobs,O]),n.useEffect(()=>{xe(0),Y([])},[t.toString(),h,T,A,F,I]);
11const k=[T,A,F,I].filter(Boolean).length,Qe=s=>{s.preventDefault();const a=p.trim(),r=j.trim();if(r){const l=new URLSearchParams;a&&l.set("q",a),l.set("location",r),localStorage.setItem("rh_last_city",r),i(l)}else U(a||null),R(!0)},ge=(s,a)=>{b(a);const r=j.trim();if(r){const l=new URLSearchParams;l.set("q",s),l.set("location",r),localStorage.setItem("rh_last_city",r),i(l)}else U(s),R(!0)},Ye=s=>{s.preventDefault();const a=p.trim(),r=new URLSearchParams(t);a?r.set("q",a):r.delete("q"),i(r)},be=(s,a)=>{a!==null&&(a?s.set("q",a):s.delete("q"))},ye=()=>{if(!navigator.geolocation){u({title:"GPS not available",variant:"destructive"});return}z(!0),navigator.geolocation.getCurrentPosition(async s=>{try{const{latitude:a,longitude:r}=s.coords,y=await(await fetch(`/api/geocoding/reverse?lat=${a}&lng=${r}`)).json(),g=new URLSearchParams(t);g.set("lat",String(y.lat??a)),g.set("lng",String(y.lng??r)),localStorage.setItem("rh_last_lat",String(y.lat??a)),localStorage.setItem("rh_last_lng",String(y.lng??r)),y.city&&(localStorage.setItem("rh_last_city",y.city),N(y.city)),g.delete("location"),g.delete("city"),be(g,M),i(g),U(null),R(!1)}catch{u({title:"Location error",description:"Could not look up your address.",variant:"destructive"})}finally{z(!1)}},()=>{z(!1),u({title:"Permission denied",description:"Enter your city name instead.",variant:"destructive"})},{enableHighAccuracy:!0,timeout:1e4})},Ke=s=>{if(s.preventDefault(),!H.trim()){u({title:"Enter a city name",variant:"destructive"});return}const a=new URLSearchParams(t);a.set("location",H.trim()),localStorage.setItem("rh_last_city",H.trim()),N(H.trim()),localStorage.removeItem("rh_last_lat"),localStorage.removeItem("rh_last_lng"),a.delete("lat"),a.delete("lng"),be(a,M),i(a),U(null),R(!1),me("")},fe=s=>{o(s);const a=new URLSearchParams(t);a.set("radius",String(s)),i(a)},Ve=s=>{ne(s);const a=new URLSearchParams(t);s?a.set("type",s):a.delete("type"),i(a)},Ze=s=>{ie(s);const a=new URLSearchParams(t);s?a.set("salary",s):a.delete("salary"),i(a)},Xe=s=>{ce(s);const a=new URLSearchParams(t);s?a.set("posted",s):a.delete("posted"),i(a)},es=s=>{de(s);const a=new URLSearchParams(t);s?a.set("exp",s):a.delete("exp"),i(a)},X=()=>{ne(""),ie(""),ce(""),de("");const s=new URLSearchParams(t);["type","salary","posted","exp"].forEach(a=>s.delete(a)),i(s)},ss=async s=>{var y;const l={jobCategory:"private",query:t.get("q")||""||"local jobs",location:x||(m!==void 0?"Near me":""),channels:(y=s.channels)!=null&&y.length?s.channels:["email"],frequency:s.frequency||"instant",...s.email?{email:s.email}:{},...s.whatsapp?{whatsapp:s.whatsapp}:{}};if(w&&(f==null?void 0:f.role)==="candidate"){const g=await gs("POST","/api/job-seeker/job-alerts",{data:l});if(!g.ok){const se=await g.json().catch(()=>({}));throw new Error(se.error||"Failed to create alert")}}else{const g=await fetch("/api/alerts/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!g.ok){const se=await g.json().catch(()=>({}));throw new Error(se.error||"Failed to create alert")}}he(!0),K(!1),bs.invalidateQueries({queryKey:["/api/job-seeker/job-alerts"]}),u({title:"Alert created!",description:"You'll be notified when new local jobs are posted."})},as=(()=>{const s=t.get("q"),a=s?`${s} jobs`:"Local jobs";return x?`${a} in ${x}`:m!==void 0?`${a} near you`:a})(),ee=(c==null?void 0:c.total)??0,ts=Q.length<ee,je={lat:m,radius:h,typeFilter:T,salaryFilter:A,postedFilter:F,expFilter:I,onRadiusChange:fe,onTypeChange:Ve,onSalaryChange:Ze,onPostedChange:Xe,onExpChange:es,onClearAll:X,activeCount:k},ve=({onSelect:s})=>{const a=p.length===0?Be:We;return!Ue||a.length===0?null:e.jsxs("div",{className:"absolute z-30 w-full mt-1 bg-popover border border-border rounded-md shadow-lg overflow-hidden max-h-60 overflow-y-auto",children:[p.length===0&&e.jsx("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground bg-muted/40 border-b border-border",children:"Popular Job Titles"}),a.map(r=>e.jsxs("button",{type:"button",onMouseDown:()=>s(r.primaryTitle),className:"w-full flex items-center justify-between px-3 py-2.5 text-sm hover:bg-muted transition-colors text-left",children:[e.jsxs("div",{className:"flex flex-col items-start",children:[e.jsx("span",{className:"font-medium text-foreground",children:r.primaryTitle}),"matchedSynonym"in r&&r.matchedSynonym&&e.jsxs("span",{className:"text-muted-foreground text-[10px]",children:["matched: ",r.matchedSynonym]})]}),e.jsx("span",{className:"text-muted-foreground text-xs shrink-0 ml-2",children:r.hindiTitle})]},r.id))]})};return e.jsxs(is,{children:[e.jsx(ys,{title:"Local Jobs Near Me â Delivery, Driver, Security & More | Rojgar Hub",description:"Find local jobs near you in Delhi, Mumbai, Bangalore and across India. Search delivery boy, driver, security guard, warehouse, cook and 100+ blue-collar roles by GPS or city name. No account needed."}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:Le.map(s=>
11({"@type":"Question",name:s.q,acceptedAnswer:{"@type":"Answer",text:s.a}}))})}}),!v&&e.jsxs("div",{children:[e.jsx("div",{className:"bg-[#0d2137] text-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 md:px-6 py-12 md:py-16",children:[e.jsx("h1",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-center leading-tight",children:"Find Local Jobs Near You"}),e.jsx("p",{className:"mt-3 text-center text-white/70 text-sm md:text-base max-w-xl mx-auto",children:"Delivery, driver, security, retail, warehouse and more â search blue-collar jobs within walking or commuting distance from your home."}),e.jsxs("form",{onSubmit:Qe,className:"mt-8 flex flex-col sm:flex-row gap-2",children:[e.jsxs("div",{className:"flex-1 relative",ref:W,children:[e.jsx(oe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none z-10"}),e.jsx(J,{placeholder:"Job title (e.g. delivery boy, driver...)",value:p,onChange:s=>{b(s.target.value),C(!0)},onFocus:()=>C(!0),className:"pl-9 bg-white text-foreground h-11"}),e.jsx(ve,{onSelect:s=>{b(s),C(!1)}})]}),e.jsxs("div",{className:"flex-1 sm:max-w-[220px] relative flex gap-1.5",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(S,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),e.jsx(J,{placeholder:"City or locality",value:j,onChange:s=>N(s.target.value),className:"pl-9 bg-white text-foreground h-11"})]}),e.jsx(d,{type:"button",variant:"outline",size:"icon",onClick:ye,disabled:$,title:"Use GPS",className:"bg-white text-foreground border-white/80 shrink-0 h-11 w-11",children:$?e.jsx(te,{className:"h-4 w-4 animate-spin"}):e.jsx(Ce,{className:"h-4 w-4"})})]}),e.jsx(d,{type:"submit",className:"h-11 px-6 sm:shrink-0",children:"Search Jobs"})]}),e.jsxs("div",{className:"mt-4 flex flex-col sm:flex-row items-center justify-center gap-3",children:[e.jsx("p",{className:"text-white/50 text-xs",children:"No account needed to search · GPS auto-fills your location"}),e.jsx("span",{className:"hidden sm:block text-white/20 text-xs",children:"|"}),e.jsxs("a",{href:"/employer",className:"inline-flex items-center gap-2 text-xs font-semibold text-blue-300 hover:text-white border border-blue-400/40 hover:border-blue-300 bg-white/5 hover:bg-white/10 px-4 py-2 rounded-full transition-all group",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),"I want to Hire Staff",e.jsx("span",{className:"bg-[#DB0000] text-white text-[9px] font-bold px-1.5 py-0.5 rounded-full leading-none",children:"FREE"})]})]})]})}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 md:px-6 py-10",children:[e.jsx("h2",{className:"text-lg font-bold text-foreground mb-5",children:"Browse by Job Type"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3",children:Ws.map(s=>e.jsxs("button",{onClick:()=>ge(s.query,s.label),className:"group flex flex-col items-center gap-2 p-4 rounded-lg border border-border bg-background hover:border-primary/40 hover:shadow-sm transition-all text-center",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${s.color}`,children:e.jsx(s.icon,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground leading-tight group-hover:text-primary transition-colors",children:s.label}),e.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-tight",children:s.sub})]})]},s.query))})]}),e.jsx("div",{className:"border-t border-border bg-muted/30",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 md:px-6 py-8",children:[e.jsx("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4",children:"Popular searches"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Gs.map(s=>e.jsx("button",{onClick:()=>{b(s),ge(s,s)},className:"text-sm px-4 py-1.5 rounded-full border border-border bg-background text-foreground hover:border-primary hover:text-primary transition-colors",children:s},s))})]})}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 md:px-6 py-10",children:[e.jsx("h2",{className:"text-lg font-bold text-foreground mb-7 text-center",children:"How it works"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:Js.map(({icon:s,title:a,desc:r},l)=>e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(s,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsxs("span",{className:"text-xs font-bold text-primary",children:["Step ",l+1]})}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:a}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:r})]})]},a))})]}),e.jsx("div",{className:"border-t border-border bg-muted/20",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 md:px-6 py-10",children:[e.jsx("h2",{className:"text-lg font-bold text-foreground mb-3",children:"What are local jobs near me?"}),e.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-3xl",children:["Local jobs are blue-collar, entry-level, and part-time job opportunities available within your city, locality, or a short commute from your home. Rojgar Hub aggregates thousands of verified vacancies across India â from ",e.jsx("strong",{children:"delivery boy"})," and ",e.jsx("strong",{children:"driver"})," roles to"," ",e.jsx("strong",{children:"security guard"}),", ",e.jsx("strong",{children:"warehouse packing"}),", ",e.jsx("strong",{children:"retail sales"}),","," ",e.jsx("strong",{children:"cook"}),", ",e.jsx("strong",{children:"housekeeping"}),", and ",e.jsx("strong",{children:"electrician"})," positions. Unlike traditional job portals that focus on white-collar IT or finance roles, our local jobs section is built specifically for workers who prefer nearby employment that minimises daily travel time and costs."]}),e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-3xl mt-3",children:"Use your GPS or type a city / locality to instantly see openings sorted by distance. Filter results by salary range, job type, and experience level to find the right match. No resume or account is required to start browsing â simply set your location and explore."})]})}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 md:px-6 py-10",children:[e.jsx("h2",{className:"text-lg font-bold text-foreground mb-2",children:"Find local jobs in to
11p cities"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-5",children:"Browse delivery, driver, security and blue-collar vacancies in major Indian cities."}),e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-5 md:grid-cols-6 gap-2",children:zs.map(s=>e.jsxs("a",{href:`/local-jobs?location=${encodeURIComponent(s)}`,className:"flex items-center justify-center gap-1 text-xs px-3 py-2 rounded-md border border-border bg-background text-foreground hover:border-primary hover:text-primary transition-colors text-center font-medium",children:[e.jsx(S,{className:"h-3 w-3 shrink-0 opacity-50"}),s]},s))})]}),e.jsx("div",{className:"border-t border-border bg-muted/20",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 md:px-6 py-10",children:[e.jsx("h2",{className:"text-lg font-bold text-foreground mb-6",children:"Frequently asked questions"}),e.jsx(fs,{type:"single",collapsible:!0,className:"w-full space-y-2",children:Le.map((s,a)=>e.jsxs(js,{value:`faq-${a}`,className:"border border-border rounded-md px-4",children:[e.jsx(vs,{className:"text-sm font-semibold text-left hover:no-underline py-4",children:s.q}),e.jsx(Ns,{className:"text-sm text-muted-foreground leading-relaxed pb-4",children:s.a})]},a))})]})})]}),v&&e.jsxs("div",{children:[e.jsx("div",{className:"bg-[#0d2137] text-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 lg:px-8 py-4 space-y-2.5",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(S,{className:"h-4 w-4 text-primary shrink-0"}),e.jsx("span",{className:"text-sm font-semibold truncate",children:as})]}),e.jsx("button",{onClick:()=>R(!0),className:"text-xs text-blue-300 hover:text-white underline-offset-2 hover:underline transition-colors shrink-0",children:"Change location"})]}),e.jsxs("form",{onSubmit:Ye,className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",ref:W,children:[e.jsx(oe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),e.jsx(J,{placeholder:"Search job title or keyword...",value:p,onChange:s=>{b(s.target.value),C(!0)},onFocus:()=>C(!0),className:"pl-9 bg-white text-foreground border-white/30"}),e.jsx(ve,{onSelect:s=>{b(s),C(!1)}})]}),e.jsx(d,{type:"submit",className:"shrink-0",children:"Search"}),e.jsxs(d,{type:"button",variant:"outline",className:"shrink-0 lg:hidden border-white/30 text-white bg-white/10 hover:bg-white/20",onClick:()=>B(!0),children:[e.jsx(le,{className:"h-4 w-4"}),k>0&&e.jsx(L,{className:"ml-1 h-4 w-4 p-0 text-[10px] justify-center bg-primary border-primary",children:k})]})]})]})}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 md:px-6 lg:px-8 py-6",children:e.jsxs("div",{className:"flex gap-6 items-start",children:[e.jsx("aside",{className:"hidden lg:block w-64 shrink-0",children:e.jsx(E,{children:e.jsxs(D,{className:"p-4",children:[e.jsxs("h3",{className:"text-sm font-semibold mb-4 flex items-center gap-1.5",children:[e.jsx(le,{className:"h-4 w-4 text-primary"}),"Filters",k>0&&e.jsxs(L,{className:"ml-auto text-[10px] bg-primary/10 text-primary border-none",children:[k," active"]})]}),e.jsx(Pe,{...je})]})})}),e.jsx("div",{className:"flex-1 min-w-0 space-y-4",children:ze&&O===0?e.jsx("div",{className:"space-y-3",children:[1,2,3].map(s=>e.jsx("div",{className:"h-40 rounded-lg bg-muted animate-pulse"},s))}):Q.length>0?e.jsxs("div",{className:"space-y-3",children:[(c==null?void 0:c.fallbackUsed)&&(c==null?void 0:c.fallbackCity)&&e.jsxs("div",{className:"flex items-start gap-2 px-4 py-3 rounded-md bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800/40 text-sm text-amber-800 dark:text-amber-300",children:[e.jsx(S,{className:"w-4 h-4 shrink-0 mt-0.5"}),e.jsxs("span",{children:["No jobs within ",h,"km â showing all jobs in ",e.jsx("strong",{children:c.fallbackCity})]})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[ee," job",ee!==1?"s":""," found"]}),Q.map(s=>e.jsx(Hs,{job:s},s.id)),ts&&e.jsx("div",{className:"flex justify-center pt-2",children:e.jsxs(d,{variant:"outline",onClick:()=>xe(s=>s+20),disabled:pe,className:"gap-2",children:[pe?e.jsx(te,{className:"h-4 w-4 animate-spin"}):e.jsx(ke,{className:"h-4 w-4"}),"Load more"]})}),G.length>0&&e.jsxs("div",{className:"lg:hidden pt-2",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2",children:"Related searches"}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:G.map(s=>e.jsx("button",{onClick:()=>{const a=new URLSearchParams(t);a.set("q",s.primaryTitle),b(s.primaryTitle),i(a)},className:"shrink-0 text-xs px-3 py-1.5 rounded-full border border-border bg-background text-foreground hover:border-primary hover:text-primary transition-colors",children:s.primaryTitle},s.id))})]})]}):e.jsx(E,{children:e.jsxs(D,{className:"py-12 text-center space-y-3",children:[e.jsx(S,{className:"h-12 w-12 text-muted-foreground mx-auto"}),e.jsx("h3",{className:"font-semibold text-lg",children:"No local jobs found"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:m!==void 0?`No jobs found within ${h} km. Try increasing the radius or changing the keyword.`:`No jobs found in ${x}. Try a nearby city or use GPS to search a wider area.`}),m!==void 0&&h<10&&e.jsxs(d,{onClick:()=>fe(10),className:"gap-2",children:[e.jsx(ke,{className:"h-4 w-4"})," Expand to 10 km"]}),k>0&&e.jsxs(d,{variant:"outline",size:"sm",onClick:X,className:"gap-1",children:[e.jsx(De,{className:"h-3 w-3"})," Clear filters"]})]})})}),e.jsxs("aside",{className:"hidden lg:block w-72 shrink-0 space-y-4",children:[e.jsx(E,{children:e.jsx(D,{className:"p-4 space-y-3",children:Me?e.jsxs("div",{className:"text-center space-y-2 py-2",children:[e.jsx(Is,{className:"h-8 w-8 text-green-600 mx-auto"}),e.jsx("p",{className:"text-sm font-semibold text-green-700 dark:text-green-400",children:"Alert set!"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"You'll be notified when new local jobs are posted."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(Se,{className:"h-4 w-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Get alerts nearby me"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Be first to know when new local jobs are posted."})]})]}),e.jsxs(d,{onClick:()=>K(!0),className:"w-full gap-2 ",size:"sm",children:[e.jsx(Se,{className:"h-4 w-4"}),w?"Subscribe to alerts":"Set up email alert"]}),!w&&e.jsx("p",{className:"text-[11px] text-muted-foreground text-center",children:"No account needed â just your email"})]})})}),G.length>0&&e.jsx(E,{children:e.jsxs(D,{className:"p-4 space-y-3",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Related searches"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:G.map(s=>e.jsxs("button",{onClick:()=>{const a=new URLSearchParams(t);a.set("q",s.primaryTitle),b(s.primaryTitle),i(a)},className:"flex items-center gap-1 text-xs px-2.5 py-1 rounded-full border border-border bg-background text-foreground hover:border-primary hover:text-primary transition-colors",children:[s.primaryTitle,e.jsx(ds,{className:"h-2.5 w-2.5"})]},s.id))}),e.jsx("div",{className:"pt-1 border-t",children:e.jsxs("a",{href:"/find-jobs",className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[e.jsx(Rs,{className:"h-3 w-3"})," Browse all private jobs"]})})]})}),e.jsx(E,{children:e.jsxs(D,{className:"p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(_e,{className:"h-4 w-4 text-yellow-500"}
11),e.jsx("h3",{className:"text-sm font-semibold",children:"Quick Tip"})]}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:'Enable GPS for the most accurate nearby results. You can also search by locality name (e.g. "Sector 17, Chandigarh") for hyper-local results.'})]})})]})]})})]}),e.jsx(Ae,{open:He,onOpenChange:s=>{s||U(null),R(s)},children:e.jsxs(Fe,{className:"sm:max-w-md",children:[e.jsxs(Ie,{children:[e.jsxs(Re,{className:"flex items-center gap-2",children:[e.jsx(S,{className:"h-5 w-5 text-primary"}),v?"Change location":"Where are you looking for work?"]}),e.jsx(Ee,{children:M?`We'll search for "${M}" jobs once your location is set.`:"Share your location to see jobs near you."})]}),e.jsxs("div",{className:"space-y-4 pt-1",children:[e.jsxs(d,{onClick:ye,disabled:$,className:"w-full gap-2",children:[$?e.jsx(te,{className:"h-4 w-4 animate-spin"}):e.jsx(Ce,{className:"h-4 w-4"}),$?"Detecting locationâ¦":"Use My Current Location (GPS)"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 h-px bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or enter your city / locality"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),e.jsxs("form",{onSubmit:Ke,className:"flex gap-2",children:[e.jsx(J,{type:"text",placeholder:"e.g. Amritsar, Sector 17 Chandigarh",value:H,onChange:s=>me(s.target.value),className:"flex-1",autoFocus:!0}),e.jsx(d,{type:"submit",className:"shrink-0",children:"Go"})]})]})]})}),e.jsx(ms,{open:Oe,onOpenChange:K,onSubmit:ss,defaultValues:{jobCategory:"private",query:t.get("q")||"",location:x||(m!==void 0?"Near me":""),channels:["email"],frequency:"instant"}}),e.jsx(xs,{open:$e,onOpenChange:B,children:e.jsxs(hs,{side:"bottom",className:"max-h-[85vh] overflow-y-auto rounded-t-xl",children:[e.jsx(us,{className:"mb-4",children:e.jsxs(ps,{className:"flex items-center gap-2",children:[e.jsx(le,{className:"h-4 w-4"}),"Filters",k>0&&e.jsxs(L,{className:"text-[10px] bg-primary/10 text-primary border-none",children:[k," active"]})]})}),e.jsx(Pe,{...je}),e.jsxs("div",{className:"mt-6 flex gap-2",children:[e.jsx(d,{className:"flex-1",onClick:()=>B(!1),children:"Show results"}),k>0&&e.jsx(d,{variant:"outline",onClick:()=>{X(),B(!1)},children:"Clear all"})]})]})})]})}export{fa 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.