1import{j as e}from"./vendor-ui-RLVjjRbR.js";import{r as n}from"./vendor-react-BjT3qoi-.js";import{ar as f,as as j,au as y,av as N,y as x,aw as b,D as v,N as w,S as _,I as k,X as A,L as C,F as S}from"./index-c2K-vwfN.js";import"./vendor-data-BroOEKFd.js";import"./vendor-charts-BX1bV7np.js";import"./vendor-editor-Qa771eO-.js";import"./vendor-dnd-goOuDNTF.js";const D=({ambassador:t,open:l,onOpenChange:i})=>t?e.jsx(f,{open:l,onOpenChange:i,children:e.jsxs(j,{className:"sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx(y,{children:e.jsx(N,{className:"text-2xl",children:t.name??"Ambassador"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-5",children:[t.photo_url?e.jsx("img",{src:t.photo_url,alt:`${t.name??"Ambassador"} portrait`,className:"w-40 h-40 rounded-xl object-cover object-top border border-border shrink-0",loading:"lazy"}):null,e.jsxs("div",{className:"space-y-1",children:[t.title&&e.jsx("p",{className:"font-medium text-foreground",children:t.title}),t.company&&e.jsx("p",{className:"text-muted-foreground",children:t.company}),t.company_logo_url?e.jsx("img",{src:t.company_logo_url,alt:`${t.company??"Company"} logo`,className:"h-12 max-w-[160px] object-contain mt-3",loading:"lazy"}):null,t.linkedin_url&&e.jsxs("a",{href:t.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:underline text-sm pt-3",children:[e.jsx(x,{className:"h-4 w-4"})," LinkedIn profile"]})]})]}),t.bio&&e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:t.bio})]})]})}):null,L=({ambassador:t,onSelect:l})=>e.jsxs("button",{type:"button",onClick:l,className:"group h-full text-left flex flex-col rounded-xl overflow-hidden bg-card border border-border shadow-card hover:shadow-lg hover:-translate-y-1 transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:[e.jsxs("div",{className:"relative aspect-square overflow-hidden bg-muted",children:[t.photo_url?e.jsx("img",{src:t.photo_url,alt:`${t.name??"Ambassador"} portrait`,className:"w-full h-full object-cover object-top transition-transform duration-500 group-hover:scale-105",loading:"lazy"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/10 to-accent/10",children:e.jsx("span",{className:"text-4xl font-bold text-muted-foreground/40",children:(t.name??"?").charAt(0)})}),t.company_logo_url?e.jsx("div",{className:"absolute bottom-2 right-2 w-14 h-14 rounded-full border border-border bg-background shadow-sm p-2 flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:t.company_logo_url,alt:`${t.company??"Company"} logo`,className:"w-full h-full object-contain",loading:"lazy"})}):null]}),e.jsxs("div",{className:"p-4 space-y-1 flex-grow",children:[e.jsx("h2",{className:"font-bold text-base text-foreground group-hover:text-primary transition-colors line-clamp-2",children:t.name??"Ambassador"}),t.title&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:t.title}),t.company&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:t.company}),t.linkedin_url&&e.jsxs("span",{className:"inline-flex items-center gap-1 pt-2 text-xs text-primary opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx(x,{className:"h-3.5 w-3.5"})," LinkedIn"]})]})]}),T=()=>{const{data:t,isLoading:l,isError:i}=b(),[r,c]=n.useState(""),[u,p]=n.useState(null),[h,d]=n.useState(!1),a=n.useMemo(()=>{const s=t??[],m=r.trim().toLowerCase();return m?s.filter(o=>[o.name,o.title,o.company,o.bio].some(g=>(g??"").toLowerCase().includes(m))):s},[t,r]);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(v,{titlePrefix:"Ambassadors",description:"Meet the ambassadors championing Chemical Risk Expo across the industry.",canonicalPath:"/ambassadors"}),e.jsx(w,{}),e.jsx("main",{className:"flex-1",children:e.jsxs("section",{className:"container mx-auto px-4 pt-28 md:pt-32 pb-12 md:pb-16",children:[e.jsxs("header",{className:"max-w-3xl",children:[e.jsx("span",{className:"block text-xs md:text-sm uppercase tracking-[0.3em] text-primary font-semibold mb-3",children:"Our advocates"}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:"Ambassadors"}),e.jsx("p",{className:"text-lg text-muted-foreground",children:"The leaders and champions representing the show across the chemical risk and resilience community."})]}),e.jsxs("div",{className:"mt-8 max-w-md relative",children:[e.jsx(_,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(k,{type:"text",value:r,onChange:s=>c(s.target.value),placeholder:"Search ambassadors, titles, companiesâ¦","aria-label":"Search ambassadors",className:"pl-11 pr-10 h-11 rounded-full"}),r&&e.jsx("button",{type:"button",onClick:()=>c(""),"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-muted",children:e.jsx(A,{className:"h-4 w-4 text-muted-foreground"})})]}),l?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx(C,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i?e.jsx("p",{className:"py-20 text-center text-muted-foreground",children:"Ambassadors are unavailable right now. Please try again shortly."}):a.length===0?e.jsx("p",{className:"py-20 text-center text-muted-foreground",children:"No ambassadors match your search."}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-6 text-sm text-muted-foreground",children:[a.length," ambassador",a.length===1?"":"s"]}),e.jsx("div",{className:"mt-4 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:a.map(s=>e.jsx(L,{ambassador:s,onSelect:()=>{p(s),d(!0)}},s.id))})]})]})}),e.jsx(D,{ambassador:u,open:h,onOpenChange:d}),e.jsx(S,{})]})};export{T 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.