PageSourceSearch

https://denverfrenchfest.com/assets/AdminSchedule-BfUQiZuz.js

js denverfrenchfest.com collected 2026-10-07 15:41:22 UTC 28,978 bytes, 12 lines download raw bytes

1import{k as K,r as c,j as e,X as F,b as v,d as x}from"./index-BQDmHtuR.js";import{D as R}from"./download-Y_XNCHLI.js";import{P as ye,T as he}from"./trash-2-FsG_gdFV.js";import{U as be}from"./users-e0uiMSsK.js";import{C as ge}from"./check-DkvxqpEd.js";import{P as fe}from"./pencil-kO4IY-lY.js";import{S as je}from"./save-DvWNPCKY.js";/**
2 * @license lucide-react v0.462.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 M=K("MessageSquareWarning",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v2",key:"stiyo7"}],["path",{d:"M12 13h.01",key:"y0uutt"}]]);/**
7 * @license lucide-react v0.462.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 _e=K("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),T=[{value:"draft",label:"Draft",color:"#666"},{value:"pending_approval",label:"Pending Approval",color:"#B8860B"},{value:"approved",label:"Approved",color:"#1B4B8A"},{value:"changes_requested",label:"Changes Requested",color:"#9B2226"}],V=m=>T.find(C=>C.value===m)||T[0],O=[{value:"main_stage",label:"Main Stage"},{value:"kids_corner",label:"Kids Corner"},{value:"wine_cuisine",label:"Wine & Cuisine"},{value:"vip_reception",label:"VIP Reception"},{value:"industry_tasting",label:"Industry Tasting"}],H=[{value:"free",label:"Free"},{value:"rsvp_free",label:"RSVP (Free)"},{value:"paid",label:"Paid"}],G=[{value:"confirmed",label:"Confirmed"},{value:"open_to_book",label:"Open to Book"},{value:"tbd",label:"TBD"}],Ne=[{value:"none",label:"None"},{value:"link",label:"External Link"}],J=()=>({day:"",start_time:"",end_time:"",title:"",description:"",category:"main_stage",access_type:"free",status:"open_to_book",performer_name:"",culinary_partner:"",location:"",rsvp_enabled:!1,capacity:null,cta_mode:"none",cta_url:"",cta_label:"",is_public:!1,sort_order:0,active:!0,internal_label:"",image_url:"",presented_by:"",sponsor_logos:[],review_status:"draft",review_note:"",reviewed_by:null,reviewed_at:null}),i={border:"1px solid rgba(0,0,0,0.1)",backgroundColor:"var(--color-white)",color:"var(--color-navy)",fontFamily:"var(--font-ui)",minHeight:"40px",padding:"8px 12px",fontSize:"13px",width:"100%"},n={color:"var(--color-navy)",fontFamily:"var(--font-ui)",fontWeight:500};function Re(){const[m,C]=c.useState([]),[X,Y]=c.useState({}),[S,Q]=c.useState({}),[Z,g]=c.useState(!1),[f,z]=c.useState(null),[l,o]=c.useState(J()),[D,q]=c.useState(!1),[b,L]=c.useState(null),[u,ee]=c.useState([]),[j,te]=c.useState("all"),[N,w]=c.useState(null),[A,_]=c.useState(""),[P,I]=c.useState(!1),[$,B]=c.useState(!1),se=async()=>{B(!0);try{const{data:t,error:a}=await v.functions.invoke("resolve-act-images");if(a)throw a;const s=(t==null?void 0:t.summary)??{},r=s.by_source??{};x.success(`Resolved ${s.resolved??0}/${s.checked??0} · Spotify ${r.spotify??0} · iTunes ${r.itunes??0} · AudioDB ${r.theaudiodb??0} · MB ${r.musicbrainz??0} · Wiki ${r.wikipedia??0} · AI ${r.ai_generated??0} · fallback ${s.fallback??0}${s.needs_review?` · ${s.needs_review} to review`:""}`),console.log("[resolve-act-images]",t),h()}catch(t){x.error("Image resolve failed: "+((t==null?void 0:t.message)??"unknown"))}finally{B(!1)}},le=async()=>{var t;I(!0);try{const{data:a,error:s}=await v.functions.invoke("sync-eventbrite");if(s)throw s;const r=a??{},p=((t=r.failed_parse)==null?void 0:t.length)??0;x.success(`Synced ${r.synced??0} Eventbrite tasting${(r.synced??0)===1?"":"s"}${p?` · ${p} URL parse failure${p===1?"":"s"}`:""}`),h()}catch(a){x.error("Eventbrite sync failed: "+((a==null?void 0:a.message)??"unknown"))}finally{I(!1)}},h=async()=>{const{data:t,error:a}=await v.from("schedule_events").select("*").order("day").order("sort_order").order("start_time");if(a){x.error("Failed to load: "+a.message);return}C(t??[]);const{data:s}=await v.from("rsvps").select("event_id"),r={};
11s==null||s.forEach(d=>{r[d.event_id]=(r[d.event_id]||0)+1}),Y(r);const{data:p}=await v.from("saved_events").select("event_id"),y={};p==null||p.forEach(d=>{y[d.event_id]=(y[d.event_id]||0)+1}),Q(y)};c.useEffect(()=>{h()},[]);const ae=c.useMemo(()=>{const t={all:m.length,draft:0,pending_approval:0,approved:0,changes_requested:0};return m.forEach(a=>{t[a.review_status]=(t[a.review_status]||0)+1}),t},[m]),W=c.useMemo(()=>{const t=j==="all"?m:m.filter(s=>s.review_status===j),a={};return t.forEach(s=>{const r=s.day||"No date";(a[r]||(a[r]=[])).push(s)}),Object.entries(a).sort(([s],[r])=>s.localeCompare(r))},[m,j]),re=()=>{o(J()),z(null),g(!0)},oe=t=>{o({...t}),z(t.id),g(!0)},ne=async()=>{var s;if(!l.day)return x.error("Day is required");if(!((s=l.title)!=null&&s.trim()))return x.error("Title is required");q(!0);const t={...l};["start_time","end_time","description","performer_name","culinary_partner","location","cta_url","cta_label","internal_label","image_url","presented_by","review_note","reviewed_by"].forEach(r=>{t[r]===""&&(t[r]=null)}),(t.capacity===""||t.capacity===void 0)&&(t.capacity=null),Array.isArray(t.sponsor_logos)||(t.sponsor_logos=[]);let a=null;if(f?{error:a}=await v.from("schedule_events").update(t).eq("id",f):{error:a}=await v.from("schedule_events").insert([t]),q(!1),a)return x.error("Save failed: "+a.message);x.success(f?"Updated":"Created"),g(!1),h()},ie=async t=>{if(!confirm("Delete this event? RSVPs will also be deleted. This cannot be undone."))return;const{error:a}=await v.from("schedule_events").delete().eq("id",t);if(a)return x.error("Delete failed: "+a.message);x.success("Deleted"),h()},ce=async t=>{const{error:a}=await v.from("schedule_events").update({is_public:!t.is_public}).eq("id",t.id);if(a)return x.error("Toggle failed: "+a.message);h()},U=async()=>{var a;const{data:t}=await v.auth.getUser();return((a=t.user)==null?void 0:a.email)??null},E=async(t,a,s)=>{const{error:r}=await v.from("schedule_events").update(a).eq("id",t);if(r)return x.error("Failed: "+r.message);x.success(s),h()},de=t=>E(t.id,{review_status:"pending_approval"},"Submitted for approval"),xe=async t=>{const a=await U();E(t.id,{review_status:"approved",reviewed_by:a,reviewed_at:new Date().toISOString(),review_note:null},"Approved")},pe=t=>{w(t),_(t.review_note||"")},ve=async()=>{if(!N)return;if(!A.trim())return x.error("A review note is required when requesting changes");const t=await U();await E(N.id,{review_status:"changes_requested",review_note:A.trim(),reviewed_by:t,reviewed_at:new Date().toISOString()},"Changes requested"),w(null),_("")},me=async t=>{L(t);const{data:a}=await v.from("rsvps").select("*").eq("event_id",t.id).order("created_at",{ascending:!1});ee(a??[])},ue=()=>{if(!b||u.length===0)return;const t=["created_at","name","email","party_size"],a=[t.join(","),...u.map(y=>t.map(d=>`"${String(y[d]??"").replace(/"/g,'""')}"`).join(","))].join(`
12`),s=new Blob([a],{type:"text/csv"}),r=URL.createObjectURL(s),p=document.createElement("a");p.href=r,p.download=`rsvps-${b.title.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.csv`,p.click(),URL.revokeObjectURL(r)},k=(t,a)=>e.jsx("span",{className:"text-[10px] px-2 py-1",style:{backgroundColor:`${a}20`,color:a,fontFamily:"var(--font-ui)",fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase"},children:t});return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6 gap-4 flex-wrap",children:[e.jsx("h1",{className:"font-display text-2xl",style:{color:"var(--color-navy)",fontWeight:700},children:"Schedule"}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("button",{onClick:le,disabled:P,className:"flex items-center gap-2 px-4 py-2 text-xs disabled:opacity-50",style:{backgroundColor:"var(--color-navy)",color:"var(--color-white)",border:"none",fontFamily:"var(--font-ui)",fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",minHeight:36},children:[e.jsx(R,{size:14})," ",P?"Syncing…":"Sync Eventbrite"]}),e.jsxs("button",{onClick:se,disabled:$,className:"flex items-center gap-2 px-4 py-2 text-xs disabled:opacity-50",style:{backgroundColor:"var(--color-blue)",color:"var(--color-white)",border:"none",fontFamily:"var(--font-ui)",fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",minHeight:36},children:[e.jsx(R,{size:14})," ",$?"Resolving…":"Resolve Act Images"]}),e.jsxs("button",{onClick:re,className:"btn-secondary flex items-center gap-2 px-4 py-2 text-xs",children:[e.jsx(ye,{size:14})," Add Event"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:[{value:"all",label:"All",color:"#152A4A"},...T].map(t=>{const a=j===t.value;return e.jsxs("button",{onClick:()=>te(t.value),className:"text-[11px] px-3 py-1.5",style:{backgroundColor:a?t.color:`${t.color}15`,color:a?"var(--color-white)":t.color,border:"none",fontFamily:"var(--font-ui)",fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase"},children:[t.label," ",e.jsxs("span",{style:{opacity:.7,marginLeft:4}
12,children:["(",ae[t.value]||0,")"]})]},t.value)})}),W.length===0&&e.jsx("div",{className:"px-4 py-8 text-center text-xs",style:{color:"var(--color-body)",backgroundColor:"var(--color-white)"},children:j==="all"?'No events yet. Click "Add Event" to create your first one.':"No events match this filter."}),W.map(([t,a])=>e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-display text-sm mb-2",style:{color:"var(--color-blue)",fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase"},children:t==="No date"?t:new Date(t+"T12:00").toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),e.jsx("div",{style:{backgroundColor:"var(--color-white)"},children:e.jsxs("table",{className:"w-full text-sm",style:{fontFamily:"var(--font-ui)"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{borderBottom:"1px solid rgba(0,0,0,0.08)"},children:[e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)",width:"80px"},children:"Time"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Title"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Category"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Access"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Status"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"RSVPs"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},title:"Attendees marked going from My Festival",children:"Going"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Public"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Review"}),e.jsx("th",{className:"text-right px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Actions"})]})}),e.jsx("tbody",{children:a.map(s=>{var r,p,y;return e.jsxs("tr",{style:{borderBottom:"1px solid rgba(0,0,0,0.05)"},children:[e.jsx("td",{className:"px-3 py-3 text-xs",style:{color:"var(--color-body)"},children:s.start_time?s.start_time.slice(0,5):"—"}),e.jsxs("td",{className:"px-3 py-3",style:{color:"var(--color-navy)"},children:[e.jsx("div",{style:{fontWeight:600},children:s.title}),s.location&&e.jsx("div",{className:"text-[11px]",style:{color:"var(--color-body)"},children:s.location})]}),e.jsx("td",{className:"px-3 py-3",children:k(((r=O.find(d=>d.value===s.category))==null?void 0:r.label)||s.category,"#1B4B8A")}),e.jsx("td",{className:"px-3 py-3",children:k(((p=H.find(d=>d.value===s.access_type))==null?void 0:p.label)||s.access_type,"#152A4A")}),e.jsx("td",{className:"px-3 py-3",children:k(((y=G.find(d=>d.value===s.status))==null?void 0:y.label)||s.status,s.status==="confirmed"?"#1B4B8A":s.status==="tbd"?"#9B2226":"#666")}),e.jsx("td",{className:"px-3 py-3",children:e.jsxs("button",{onClick:()=>me(s),className:"text-xs inline-flex items-center gap-1 px-2 py-1",style:{background:"rgba(0,0,0,0.04)",border:"none",color:"var(--color-navy)",fontFamily:"var(--font-ui)"},children:[e.jsx(be,{size:11})," ",X[s.id]||0]})}),e.jsx("td",{className:"px-3 py-3",children:e.jsxs("span",{"data-testid":"admin-schedule-interest",title:"Saves from My Festival (read-only)",className:"text-xs inline-flex items-center gap-1 px-2 py-1",style:{backgroundColor:(S[s.id]||0)>0?"rgba(155,34,38,0.10)":"rgba(0,0,0,0.04)",color:(S[s.id]||0)>0?"var(--color-red)":"var(--color-body)",fontFamily:"var(--font-ui)",fontWeight:700},children:["♥ ",S[s.id]||0]})}),e.jsx("td",{className:"px-3 py-3",children:e.jsx("button",{onClick:()=>ce(s),className:"text-xs px-2 py-1",style:{backgroundColor:s.is_public?"rgba(27,75,138,0.15)":"rgba(155,34,38,0.10)",color:s.is_public?"var(--color-blue)":"var(--color-red)",border:"none",fontFamily:"var(--font-ui)",fontWeight:600},children:s.is_public?"LIVE":"HIDDEN"})}),e.jsx("td",{className:"px-3 py-3",children:(()=>{const d=V(s.review_status);return e.jsxs("div",{className:"flex flex-col gap-1",style:{minWidth:"140px"},children:[k(d.label,d.color),s.review_status==="changes_requested"&&s.review_note&&e.jsxs("div",{className:"text-[10px] italic",style:{color:"var(--color-red)",fontFamily:"var(--font-ui)",maxWidth:200},title:s.review_note,children:['"',s.review_note.length>50?s.review_note.slice(0,50)+"…":s.review_note,'"']}),s.review_status==="approved"&&!s.is_public&&e.jsx("div",{className:"text-[10px]",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:"Approved — flip Public to LIVE"})]})})()}),e.jsxs("td",{className:"px-3 py-3 text-right whitespace-nowrap",children:[(s.review_status==="draft"||s.review_status==="changes_requested")&&e.jsx("button",{onClick:()=>de(s),title:"Submit for approval",className:"p-1.5 hover:bg-black/5",style:{border:"none",background:"transparent",color:"var(--color-blue)"},children:e.jsx(_e,{size:14})}),s.review_status==="pending_approval"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>
12xe(s),title:"Approve",className:"p-1.5 hover:bg-black/5",style:{border:"none",background:"transparent",color:"var(--color-blue)"},children:e.jsx(ge,{size:14})}),e.jsx("button",{onClick:()=>pe(s),title:"Request changes",className:"p-1.5 hover:bg-black/5",style:{border:"none",background:"transparent",color:"var(--color-red)"},children:e.jsx(M,{size:14})})]}),e.jsx("button",{onClick:()=>oe(s),title:"Edit",className:"p-1.5 hover:bg-black/5",style:{border:"none",background:"transparent",color:"var(--color-body)"},children:e.jsx(fe,{size:14})}),e.jsx("button",{onClick:()=>ie(s.id),title:"Delete",className:"p-1.5 hover:bg-black/5",style:{border:"none",background:"transparent",color:"var(--color-red)"},children:e.jsx(he,{size:14})})]})]},s.id)})})]})})]},t)),Z&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",children:e.jsxs("div",{className:"w-full max-w-2xl p-6 max-h-[90vh] overflow-y-auto",style:{backgroundColor:"var(--color-white)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"font-display text-lg",style:{color:"var(--color-navy)"},children:[f?"Edit":"Add"," Event"]}),e.jsx("button",{onClick:()=>g(!1),style:{background:"none",border:"none",color:"var(--color-body)"},children:e.jsx(F,{size:18})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Day *"}),e.jsx("input",{type:"date",value:l.day||"",onChange:t=>o({...l,day:t.target.value}),style:i})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Start"}),e.jsx("input",{type:"time",value:l.start_time||"",onChange:t=>o({...l,start_time:t.target.value}),style:i})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"End"}),e.jsx("input",{type:"time",value:l.end_time||"",onChange:t=>o({...l,end_time:t.target.value}),style:i})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Title *"}),e.jsx("input",{value:l.title||"",onChange:t=>o({...l,title:t.target.value}),style:i})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Description"}),e.jsx("textarea",{value:l.description||"",onChange:t=>o({...l,description:t.target.value}),style:{...i,minHeight:"80px",resize:"vertical"},rows:3})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Category"}),e.jsx("select",{value:l.category,onChange:t=>o({...l,category:t.target.value}),style:i,children:O.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Access"}
12),e.jsx("select",{value:l.access_type,onChange:t=>o({...l,access_type:t.target.value}),style:i,children:H.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Status"}),e.jsx("select",{value:l.status,onChange:t=>o({...l,status:t.target.value}),style:i,children:G.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Performer Name"}),e.jsx("input",{value:l.performer_name||"",onChange:t=>o({...l,performer_name:t.target.value}),style:i})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Culinary Partner"}),e.jsx("input",{value:l.culinary_partner||"",onChange:t=>o({...l,culinary_partner:t.target.value}),style:i})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Location"}),e.jsx("input",{value:l.location||"",onChange:t=>o({...l,location:t.target.value}),style:i})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Capacity"}),e.jsx("input",{type:"number",value:l.capacity??"",onChange:t=>o({...l,capacity:t.target.value===""?null:parseInt(t.target.value)}),style:i})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx("input",{type:"checkbox",id:"rsvp-enabled",checked:!!l.rsvp_enabled,onChange:t=>o({...l,rsvp_enabled:t.target.checked})}),e.jsx("label",{htmlFor:"rsvp-enabled",className:"text-xs",style:n,children:"RSVP enabled (collect attendee info)"})]}),f&&(()=>{const t=V(l.review_status||"draft");return e.jsx("div",{className:"pt-3 border-t",style:{borderColor:"rgba(0,0,0,0.08)"},children:e.jsxs("div",{style:{backgroundColor:`${t.color}10`,border:`1px solid ${t.color}40`,padding:"10px 12px"},children:[e.jsx("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px]",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)",fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase"},children:"Review status"}),e.jsx("div",{className:"text-sm mt-0.5",style:{color:t.color,fontFamily:"var(--font-ui)",fontWeight:700},children:t.label}),l.reviewed_by&&l.reviewed_at&&e.jsxs("div",{className:"text-[11px] mt-1",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:["by ",l.reviewed_by," · ",new Date(l.reviewed_at).toLocaleString()]})]})}),l.review_status==="changes_requested"&&l.review_note&&e.jsxs("div",{className:"mt-2 text-xs italic",style:{color:"var(--color-red)",fontFamily:"var(--font-ui)"},children:['Reviewer note: "',l.review_note,'"']}),e.jsxs("p",{className:"text-[11px] mt-2",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:["Public site shows this event only when ",e.jsx("strong",{children:"review = Approved"})," AND ",e.jsx("strong",{children:"Public = LIVE"})," AND Active."]})]})})})(),e.jsxs("div",{className:"pt-3 border-t",style:{borderColor:"rgba(0,0,0,0.08)"},children:[e.jsxs("div",{style:{backgroundColor:"rgba(155,34,38,0.06)",border:"1px solid rgba(155,34,38,0.25)",padding:"10px 12px",marginBottom:"10px"},children:[e.jsx("label",{className:"text-xs block mb-1",style:{...n,color:"var(--color-red)",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase"},children:"Internal Label — admin only, never shown publicly"}),e.jsx("input",{value:l.internal_label||"",onChange:t=>o({...l,internal_label:t.target.value}),style:i,placeholder:'e.g. "Aerospace & Aviation", "Tech & Healthcare"'}),e.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:"Sacha's internal industry/theme tracking. Never rendered on the public site or sent in any public query."})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Hero Image URL"}),e.jsx("input",{value:l.image_url||"",onChange:t=>o({...l,image_url:t.target.value}),style:i,placeholder:"https://..."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Presented By"}),e.jsx("input",{value:l.presented_by||"",onChange:t=>o({...l,presented_by:t.target.value}),style:i,placeholder:'e.g. "Presented by Aer Lingus"'})]})]}),e.jsxs("div",{className:"mt-3",children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Sponsor Logos (JSON array)"}),e.jsx("textarea",{value:JSON.stringify(l.sponsor_logos??[],null,2),onChange:t=>{try{const a=JSON.parse(t.target.value||"[]");Array.isArray(a)&&o({...l,sponsor_logos:a})}catch{}},rows:5,style:{...i,fontFamily:"monospace",fontSize:"12px",minHeight:"110px",resize:"vertical"},placeholder:'[{"name":"Aer Lingus","logo_url":"https://...","url":"https://..."}]'}),e.jsxs("p",{className:"text-[11px] mt-1",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:["Array of ","{name, logo_url, url}"," for per-event partner/sponsor logos."]})]})]}),e.jsxs("div",{className:"pt-3 border-t",style:{borderColor:"rgba(0,0,0,0.08)"},children:[e.jsx("p",{className:"text-xs mb-2",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:'CTA — use "External Link" + URL for paid sessions (e.g. Eventbrite).'}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"CTA Mode"}),e.jsx("select",{value:l.cta_mode||"none",onChange:t=>o({...l,cta_mode:t.target.value}),style:i,children:Ne.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"CTA URL"}),e.jsx("input",{value:l.cta_url||"",onChange:t=>o({...l,cta_url:t.target.value}),style:i,placeholder:"https://eventbrite.com/..."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"CTA Label"}),e.jsx("input",{value:l.cta_label||"",onChange:t=>o({...l,cta_label:t.target.value}),style:i,placeholder:"Get Tickets"})]})]})]}),e.jsxs("div",{className:"pt-3 border-t grid grid-cols-1 sm:grid-cols-2 gap-3",style:{borderColor:"rgba(0,0,0,0.08)"},children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Sort Order"}),e.jsx("input",{type:"number",value:l.sort_order??0,onChange:t=>o({...l,sort_order:parseInt(t.target.value)||0}),style:i})]}),e.jsxs("div",{className:"flex flex-col gap-2 justify-end pb-1",children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs",style:n,children:[e.jsx("input",{type:"checkbox",checked:!!l.active,onChange:t=>o({...l,active:t.target.checked})}),"Active"]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs",style:{...n,fontWeight:700,color:l.is_public?"var(--color-blue)":"var(--color-red)"},children:[e.jsx("input",{type:"checkbox",checked:!!l.is_public,onChange:t=>o({...l,is_public:t.target.checked})}),l.is_public?"PUBLIC — visible on website":"HIDDEN — not on website"]})]})]})]}),e.jsxs("div",{className:"flex gap-2 mt-5",children:[e.jsxs("button",{onClick:ne,disabled:D,className:"btn-primary flex items-center gap-1 px-4 py-2 text-xs disabled:opacity-50",children:[e.jsx(je,{size:12})," ",D?"Saving...":"Save"]}),e.jsx("button",{onClick:()=>g(!1),className:"px-4 py-2 text-xs",style:{background:"transparent",border:"1px solid rgba(0,0,0,0.1)",color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:"Cancel"})]})]})}),b&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",children:e.jsxs("div",{className:"w-full max-w-2xl p-6 max-h-[90vh] overflow-y-auto",style:{backgroundColor:"var(--color-white)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-4 gap-2",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"font-display text-lg",style:{color:"var(--color-navy)"},children:["RSVPs — ",b.title]}),e.jsxs("p",{className:"text-xs",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:[u.length," RSVP",u.length===1?"":"s",b.capacity?` of ${b.capacity} capacity`:""]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:ue,disabled:u.length===0,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs",style:{backgroundColor:"var(--color-blue)",color:"var(--color-white)",border:"none",fontFamily:"var(--font-ui)",opacity:u.length===0?.4:1},children:[e.jsx(R,{size:12})," CSV"]}),e.jsx("button",{onClick:()=>L(null),style:{background:"none",border:"none",color:"var(--color-body)"},children:e.jsx(F,{size:18})})]})]}),e.jsxs("table",{className:"w-full text-sm",style:{fontFamily:"var(--font-ui)"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{borderBottom:"1px solid rgba(0,0,0,0.08)"},children:[e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Date"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Name"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Email"}),e.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium",style:{color:"var(--color-body)"},children:"Party"})]})}),e.jsxs("tbody",{children:[u.map(t=>e.jsxs("tr",{style:{borderBottom:"1px solid rgba(0,0,0,0.05)"},children:[e.jsx("td",{className:"px-3 py-2 text-xs whitespace-nowrap",style:{color:"var(--color-body)"},children:new Date(t.created_at).toLocaleDateString()}),e.jsx("td",{className:"px-3 py-2",style:{color:"var(--color-navy)"},children:t.name}),e.jsx("td",{className:"px-3 py-2",style:{color:"var(--color-navy)"},children:t.email}),e.jsx("td",{className:"px-3 py-2",style:{color:"var(--color-navy)"},children:t.party_size})]},t.id)),u.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-3 py-8 text-center text-xs",style:{color:"var(--color-body)"},children:"No RSVPs yet"})})]})]})]})}),N&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",children:e.jsxs("div",{className:"w-full max-w-md p-6",style:{backgroundColor:"var(--color-white)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h2",{className:"font-display text-lg",style:{color:"var(--color-navy)"},children:"Request Changes"}),e.jsx("button",{onClick:()=>{w(null),_("")},style:{background:"none",border:"none",color:"var(--color-body)"},children:e.jsx(F,{size:18})})]}),e.jsxs("p",{className:"text-xs mb-3",style:{color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:["For: ",e.jsx("strong",{style:{color:"var(--color-navy)"},children:N.title})]}),e.jsx("label",{className:"text-xs block mb-1",style:n,children:"Note (required) — what needs to change?"}),e.jsx("textarea",{value:A,onChange:t=>_(t.target.value),rows:5,style:{...i,minHeight:"110px",resize:"vertical"},autoFocus:!0}),e.jsxs("div",{className:"flex gap-2 mt-4",children:[e.jsxs("button",{onClick:ve,className:"btn-primary flex items-center gap-1 px-4 py-2 text-xs",children:[e.jsx(M,{size:12})," Send Request"]}),e.jsx("button",{onClick:()=>{w(null),_("")},className:"px-4 py-2 text-xs",style:{background:"transparent",border:"1px solid rgba(0,0,0,0.1)",color:"var(--color-body)",fontFamily:"var(--font-ui)"},children:"Cancel"})]})]})})]})}export{Re 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.