PageSourceSearch

https://hospitalityb2b.co.uk/assets/Speakers-DdWgIwyq.js

js hospitalityb2b.co.uk collected 2026-09-30 04:18:31 UTC 10,379 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui-Bwz2KwBC.js";import{x as K,y as X,u as J,S as Y,I as ee,X as C,a as I,b as O,c as R,d as T,e as j,A as ae,B as f,f as z,L as te,C as se,g as re,h as le,j as ne,N as oe,l as ie,P as ce,z as de,F as me,s as ue}from"./index-Yxar46Qa.js";import{u as pe}from"./vendor-data-D3rmSUoE.js";import{r as n}from"./vendor-react-B-LUs8MM.js";import"./vendor-dnd-BwFBceOp.js";import"./vendor-editor-B92hpOiY.js";import"./vendor-charts-C9IGNkSd.js";const he=({name:h,photoUrl:t,title:x,company:l,companyLogoUrl:u,linkedinUrl:o,onClick:g})=>{const d=h.charAt(0).toUpperCase();return e.jsxs("button",{type:"button",onClick:g,className:"group relative flex h-full w-full flex-col overflow-hidden rounded-xl border border-border/70 bg-card text-left transition-all duration-300 hover:-translate-y-1 hover:border-accent/50 hover:shadow-[0_20px_40px_-20px_hsl(var(--primary)/0.25)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":`View ${h} profile`,children:[e.jsxs("div",{className:"relative aspect-[3/4] w-full overflow-hidden bg-gradient-to-br from-muted/50 via-background to-muted/30",children:[t?e.jsx("img",{src:t,alt:`${h} photo`,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center",children:e.jsx("span",{className:"font-heading text-6xl font-bold text-primary/30",children:d})}),u&&e.jsx("div",{className:"absolute bottom-2 right-2 h-12 w-12 overflow-hidden rounded-full border border-border/60 bg-background p-1.5 shadow-sm",children:e.jsx("img",{src:u,alt:`${l} logo`,className:"h-full w-full object-contain"})}),e.jsx("div",{className:"pointer-events-none absolute inset-x-4 bottom-0 h-px bg-gradient-to-r from-transparent via-border to-transparent"})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-1 px-4 py-4 md:px-5 md:py-5",children:[e.jsx("h3",{className:"font-heading text-base font-semibold leading-tight text-primary line-clamp-2 md:text-lg group-hover:text-accent transition-colors",children:h}),x&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:x}),l&&e.jsx("p",{className:"text-sm text-muted-foreground/80 line-clamp-1",children:l}),e.jsxs("div",{className:"mt-auto flex items-end justify-between gap-3 pt-3",children:[o?e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/70 bg-muted/40 px-2.5 py-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:[e.jsx(K,{className:"h-3 w-3"}),"LinkedIn"]}):e.jsx("span",{className:"text-[11px] uppercase tracking-wider text-muted-foreground/70",children:"Speaker"}),e.jsx("span",{className:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/5 text-primary transition-all duration-300 group-hover:bg-accent group-hover:text-accent-foreground","aria-hidden":"true",children:e.jsx(X,{className:"h-4 w-4 transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})})]})]})]})},Ne=()=>{const{data:h}=J(),[t,x]=n.useState(null),[l,u]=n.useState(""),[o,g]=n.useState("all"),[d,A]=n.useState("az"),[v,U]=n.useState(!1),[p,c]=n.useState(1),[E,V]=n.useState(null),[q,P]=n.useState(!1),S=20,{data:m,isLoading:k}=pe({queryKey:["speakers"],queryFn:async()=>{const{data:a,error:r}=await ue.from("speakers").select("*").eq("is_active",!0).order("name");if(r)throw r;return(a==null?void 0:a.filter(s=>s.photo_url))||[]},staleTime:0,refetchOnMount:"always"}),_="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),L=n.useMemo(()=>{const a=new Set;return m==null||m.forEach(r=>{r.company&&r.company.trim()&&a.add(r.company.trim())}),Array.from(a).sort((r,s)=>r.localeCompare(s))},[m]),b=n.useMemo(()=>{if(!m)return[];let a=m;if(t&&(a=a.filter(s=>s.name.toUpperCase().startsWith(t))),o!=="all"&&(a=a.filter(s=>(s.company??"").trim()===o)),l.trim()){const s=l.toLowerCase();a=a.filter(i=>{var M,B,F;return i.name.toLowerCase().includes(s)||((M=i.title)==null?void 0:M.toLowerCase().includes(s))||((B=i.company)==null?void 0:B.toLowerCase().includes(s))||((F=i.bio)==null?void 0:F.toLowerCase().includes(s))})}const r=[...a];return d==="az"?r.sort((s,i)=>s.name.localeCompare(i.name,void 0,{sensitivity:"base"})):d==="za"?r.sort((s,i)=>i.name.localeCompare(s.name,void 0,{sensitivity:"base"})):d==="company"&&r.sort((s,i)=>(s.company??"").localeCompare(i.company??"",void 0,{sensitivity:"base"})),r},[m,t,l,o,d]),y=Math.ceil(b.length/S),$=(p-1)*S,Q=$+S,N=b.slice($,Q),D=(t?1:0)+(o!=="all"?1:0)+(l.trim()?1:0),Z=()=>{x(null),u(""),g("all"),A("az"),c(1)},H=a=>{x(t===a?null:a),c(1)},W=a=>{u(a.target.value),c(1)},w=a=>{c(a),window.scrollTo({top:0,behavior:"smooth"})},G=n.useMemo(()=>[{id:"speakers-list",component:e.jsxs("section",{className:"py-4",children:[e.jsxs("div",{className:"mb-6 rounded-2xl border border-border/70 bg-card p-4 md:p-5 shadow-sm",children:[e.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center",children:[e.jsxs("div",{className:"relative flex-1 min-w-0",children:[e.jsx(Y,{className:"pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ee,{type:"text",placeholder:"Search speakers, title, company…",value:l,onCh
1ange:W,className:"pl-11 pr-10 h-11 rounded-full border-muted bg-background focus-visible:ring-1 focus-visible:ring-ring","aria-label":"Search speakers"}),l&&e.jsx("button",{type:"button",onClick:()=>{u(""),c(1)},className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-muted transition-colors","aria-label":"Clear search",children:e.jsx(C,{className:"h-4 w-4 text-muted-foreground"})})]}),L.length>0&&e.jsxs(I,{value:o,onValueChange:a=>{g(a),c(1)},children:[e.jsx(O,{className:"w-full md:w-52 h-11 rounded-full",children:e.jsx(R,{placeholder:"Company"})}),e.jsxs(T,{children:[e.jsx(j,{value:"all",children:"All companies"}),L.map(a=>e.jsx(j,{value:a,children:a},a))]})]}),e.jsxs(I,{value:d,onValueChange:a=>A(a),children:[e.jsxs(O,{className:"w-full md:w-40 h-11 rounded-full",children:[e.jsx(ae,{className:"h-4 w-4 mr-1 text-muted-foreground"}),e.jsx(R,{})]}),e.jsxs(T,{children:[e.jsx(j,{value:"az",children:"Name: A → Z"}),e.jsx(j,{value:"za",children:"Name: Z → A"}),e.jsx(j,{value:"company",children:"Company"})]})]}),e.jsxs(f,{type:"button",variant:v||t?"default":"outline",onClick:()=>U(!v),className:"h-11 rounded-full px-4","aria-expanded":v,children:["A–Z ",t&&e.jsxs("span",{className:"ml-1 font-bold",children:["· ",t]})]})]}),v&&e.jsx("div",{className:"mt-4 flex flex-wrap gap-1.5 border-t border-border/60 pt-4 animate-fade-in",children:_.map(a=>e.jsx(f,{variant:t===a?"default":"outline",size:"sm",onClick:()=>H(a),className:`h-8 w-8 p-0 text-xs ${t===a?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:a},a))}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 border-t border-border/60 pt-4",children:[e.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground mr-1",children:k?"Loading…":`${b.length} result${b.length===1?"":"s"}`}),l.trim()&&e.jsxs(z,{variant:"secondary",className:"gap-1 rounded-full",children:["“",l,"”",e.jsx("button",{onClick:()=>{u(""),c(1)},"aria-label":"Remove search",children:e.jsx(C,{className:"h-3 w-3"})})]}),o!=="all"&&e.jsxs(z,{variant:"secondary",className:"gap-1 rounded-full",children:[o,e.jsx("button",{onClick:()=>{g("all"),c(1)},"aria-label":"Remove company",children:e.jsx(C,{className:"h-3 w-3"})})]}),t&&e.jsxs(z,{variant:"secondary",className:"gap-1 rounded-full",children:["Starts with ",t,e.jsx("button",{onClick:()=>{x(null),c(1)},"aria-label":"Remove letter filter",children:e.jsx(C,{className:"h-3 w-3"})})]}),D>0&&e.jsx(f,{variant:"ghost",size:"sm",onClick:Z,className:"ml-auto h-8 text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]})]}),k?e.jsx("div",{className:"flex justify-center items-center py-20",children:e.jsx(te,{className:"h-12 w-12 animate-spin text-primary"})}):N&&N.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 md:gap-6 lg:gap-8 animate-fade-in mb-10 items-stretch",children:N.map(a=>e.jsx(he,{id:a.id,name:a.name,bio:a.bio||void 0,photoUrl:a.photo_url||void 0,title:a.title||void 0,company:a.company||void 0,companyLogoUrl:a.company_logo_url||void 0,linkedinUrl:a.linkedin_url||void 0,onClick:()=>{V(a),P(!0)}},a.id))}),y>1&&e.jsxs("div",{className:"flex justify-end items-center gap-2",children:[e.jsx(f,{variant:"outline",size:"icon",onClick:()=>w(p-1),disabled:p===1,className:"disabled:opacity-50 hover:bg-primary hover:text-white hover:border-primary","aria-label":"Previous page",children:e.jsx(se,{className:"h-4 w-4"})}),e.jsx("div",{className:"flex gap-1",children:Array.from({length:y},(a,r)=>r+1).map(a=>p===a?e.jsx(re,{styleType:"button1",onClick:()=>w(a),"aria-label":`Page ${a}`,"aria-current":"page",children:a},a):e.jsx(f,{variant:"outline",size:"sm",onClick:()=>w(a),className:"hover:bg-primary hover:text-white hover:border-primary","aria-label":`Go to page ${a}`,children:a},a))}),e.jsx(f,{variant:"outline",size:"icon",onClick:()=>w(p+1),disabled:p===y,className:"disabled:opacity-50 hover:bg-primary hover:text-white hover:border-primary","aria-label":"Next page",children:e.jsx(le,{className:"h-4 w-4"})})]})]}):e.jsx("div",{className:"text-center py-20",children:e.jsx("p",{className:"text-xl text-muted-foreground",children:t?`No speakers found starting with "${t}"`:"Speaker lineup coming soon. Stay tuned!"})})]})}],[m,t,l,o,d,v,p,b,N,y,k,_,D,L,h]);return e.jsxs(e.Fragment,{children:[e.jsx(ne,{titlePrefix:"Speakers",description:"Meet our lineup of industry-leading speakers at {eventName}. Learn from food-to-go experts and thought leaders. {eventDate} at {eventLocation}.",keywords:"{eventName}, speakers, industry leaders, food-to-go experts, seminars, foodservice conference, {eventLocation}"}),e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(oe,{}),e.jsx(ie,{pageName:"speakers",defaultTitle:"Speakers",defaultSubtitle:"Meet the industry leaders taking the stage."}),e.jsx("main",{className:"flex-1 container mx-auto px-4 pt-8 pb-12",children:e.jsx(ce,{pageName:"speakers",sections:G})}),e.jsx(de,{speaker:E,open:q,onOpenChange:P}),e.jsx(me,{})]})]})};export{Ne 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.