1import{r,j as e}from"./vendor-PKXgktxM.js";import{B as T,b as B,a as L,S as W,L as m,C as O,A as D}from"./index-aQEzI3WC.js";import{B as P}from"./Breadcrumb-Cga83jm1.js";import{c as q,a as z}from"./spamFilter-B5p5UB6V.js";import{a as i,b as I,c as R,E as _}from"./icons-CqhEfYCO.js";import"./helmet-BNHTuvC-.js";import"./admin-editor-DXMNQspV.js";import"./search-Dw8P0qyA.js";function A(c){const n=c.includes("?")?"&":"?";return`${c}${n}utm_source=cornelius&utm_medium=website&utm_campaign=where-to-buy`}function X(){const{data:c}=T(),{data:n}=B("where-to-buy"),{data:u}=L(),d=c,[s,a]=r.useState({name:"",email:"",company:"",location:"",comment:"",website:""}),[N,h]=r.useState(!1),[x,C]=r.useState(null),[S,k]=r.useState(!1),[o,p]=r.useState(""),F=r.useRef(q()),[b,g]=r.useState(!1),[y,w]=r.useState(null),E=async t=>{if(t.preventDefault(),z({honeypot:s.website,message:s.comment,elapsedMs:F.current()}).isSpam){k(!0);return}g(!0),w(null);try{const l=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productName:"Where to Buy Inquiry",name:s.name,phone:"",email:s.email,company:s.company,message:s.comment||null,source:"where_to_buy",location:s.location||null,website:s.website})}),j=await l.json().catch(()=>null);if(!l.ok)throw new Error(j?.error||"Failed to submit");h(!0),j?.emailSent===!1&&C("Your request was saved, but our notification system had a temporary issue. Our team will still follow up with you."),D("where-to-buy")}catch(l){w(l instanceof Error?l.message:"Failed to submit. Please try again.")}finally{g(!1)}},v=o.trim()?d.filter(t=>t.name.toLowerCase().includes(o.toLowerCase())||t.address.toLowerCase().includes(o.toLowerCase())):d;return e.jsxs("div",{children:[e.jsx(W,{title:n.title||"Where to Buy",description:n.description||"Find an authorized Cornelius distributor or service provider near you. Fountain, frozen, juice, and ice dispensing equipment from trusted partners.",path:"/where-to-buy",image:n.ogImage||void 0,jsonLd:[{"@context":"https://schema.org","@type":"WebPage",name:"Where to Buy Cornelius",description:"Find an authorized Cornelius distributor or service provider near you. Intelligent beverage dispensing systems available through our network of trusted partners.",url:"https://www.cornelius.com/where-to-buy",mainEntity:{"@type":"Organization","@id":"https://www.cornelius.com/#organization",name:"Cornelius, Inc.",url:"https://www.cornelius.com",contactPoint:{"@type":"ContactPoint",telephone:"+1-800-238-3600",contactType:"sales",areaServed:"US",availableLanguage:"English"}}},...d.map(t=>({"@context":"https://schema.org","@type":"LocalBusiness",name:t.name,address:t.address,url:t.url,parentOrganization:{"@id":"https://www.cornelius.com/#organization"}}))]}),e.jsx(P,{items:[{label:"Where to Buy"}]}),e.jsx("section",{className:"bg-gradient-to-br from-cornelius-dark via-cornelius-navy to-cornelius-blue text-white py-16 md:py-24",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6",children:[e.jsx("h1",{className:"text-3xl md:text-5xl font-bold mb-4",children:u.wtb_hero_headline??"Where To Buy Cornelius"}),e.jsxs("p",{className:"text-lg text-white/80 max-w-3xl",children:[u.wtb_hero_description??"Find an authorized Cornelius distributor or service partner near you. Canât find what you need?"," ",e.jsx(m,{to:"/contact",className:"text-white underline hover:no-underline",children:"Contact our Customer Care team"}),"."]}),e.jsxs("div",{className:"flex flex-wrap gap-4 mt-8",children:[e.jsxs(m,{to:"/products",className:"inline-flex items-center justify-center gap-2 bg-white text-cornelius-navy font-semibold px-5 sm:px-6 py-3 text-sm tracking-wide hover:bg-cornelius-light transition-colors min-h-[48px] w-full sm:w-auto",children:["EXPLORE OUR PRODUCTS ",e.jsx(i,{className:"w-4 h-4"})]}),e.jsxs(m,{to:"/document-library",className:"inline-flex items-center justify-center gap-2 border border-white text-white font-semibold px-5 sm:px-6 py-3 text-sm tracking-wide hover:bg-white hover:text-cornelius-navy transition-colors min-h-[48px] w-full sm:w-auto",children:["DOCUMENT LIBRARY ",e.jsx(i,{className:"w-4 h-4"})]})]})]})}),e.jsx("section",{className:"py-12 md:py-20 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4 mb-8",children:[e.jsx("h2",{className:"text-2xl font-bold text-cornelius-navy",children:"North American Distributors"}),e.jsxs("div",{className:"relative w-full md:w-80",children:[e.jsx(I,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-cornelius-gray"}),e.jsx("input",{type:"search",placeholder:"Search by name or location...",value:o,onChange:t=>p(t.target.value),className:"w-full pl-10 pr-4 py-2.5 text-sm border border-gray-300 focus:border-cornelius-navy focus:outline-none","aria-label":"Search distributors"})]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:v.map((t,f)=>e.jsxs("div",{className:"border border-gray-200 p-5 hover:border-cornelius-blue hover:shadow-sm transition-all",children:[e.jsx("h3",{className:"font-bold text-cornelius-navy mb-2",children:t.name}),e.jsxs("p",{className:"text-sm text-cornelius-gray leading-relaxed mb-3 flex items-start gap-2",children:[e.jsx(R,{className:"w-4 h-4 text-cornelius-blue shrink-0 mt-0.5"}),t.address]}),e.jsxs("a",{href:A(t.url),target:"_blank",rel:"noopener noreferrer",onClick:()=>O(t.name),className:"inline-flex items-center gap-1 text-sm font-semibold text-cornelius-blue hover:text-cornelius-navy transition-colors min-h-[44px]",children:["More Details ",e.jsx(_,{className:"w-3.5 h-3.5"})]})]},`${t.name}-${f}`))}),v.length===0&&e.jsxs("div",{className:"text-center py-12",children:[e.jsxs("p",{className:"text-cornelius-gray mb-4",children:['No distributors found matching "',o,'"']}),e.jsx("button",{onClick:()=>p(""),className:"text-sm text-cornelius-blue hover:underline min-h-[44px]",children:"Clear search"})]})]})}),e.jsx("section",{className:"py-12 md:py-20 bg-cornelius-light",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-cornelius-navy mb-2",children:"Get in Touch"}),e.jsx("p",{className:"text-cornelius-gray mb-8",children:"Contact a Cornelius expert today for help with sales or service"}),N?e.jsxs("div",{className:"bg-green-50 border border-green-200 p-8 text-center",children:[e.jsx("h3",{className:"text-lg font-bold text-green-800 mb-2",children:"Thank y
1ou!"}),e.jsx("p",{className:"text-green-700",children:"We've received your request. Our team will connect you with a distributor or service provider in your area shortly."}),x&&e.jsx("p",{className:"text-amber-700 text-sm mt-3 bg-amber-50 border border-amber-200 px-4 py-2",children:x}),e.jsx("button",{onClick:()=>{h(!1),a({name:"",email:"",company:"",location:"",comment:"",website:""})},className:"mt-4 text-sm text-cornelius-blue hover:underline min-h-[44px] inline-flex items-center",children:"Submit another request"})]}):e.jsxs("form",{onSubmit:E,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"wtb-name",className:"sr-only",children:"Name"}),e.jsx("input",{id:"wtb-name",type:"text",placeholder:"Name (First, Last)*",required:!0,value:s.name,onChange:t=>a({...s,name:t.target.value}),className:"w-full border border-gray-300 px-4 py-3 text-sm bg-white focus:border-cornelius-navy"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"wtb-email",className:"sr-only",children:"Email"}),e.jsx("input",{id:"wtb-email",type:"email",placeholder:"Email*",required:!0,value:s.email,onChange:t=>a({...s,email:t.target.value}),className:"w-full border border-gray-300 px-4 py-3 text-sm bg-white focus:border-cornelius-navy"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"wtb-company",className:"sr-only",children:"Company"}),e.jsx("input",{id:"wtb-company",type:"text",placeholder:"Company*",required:!0,value:s.company,onChange:t=>a({...s,company:t.target.value}),className:"w-full border border-gray-300 px-4 py-3 text-sm bg-white focus:border-cornelius-navy"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"wtb-location",className:"sr-only",children:"Location"}),e.jsx("input",{id:"wtb-location",type:"text",placeholder:"City / State / Region*",required:!0,value:s.location,onChange:t=>a({...s,location:t.target.value}),className:"w-full border border-gray-300 px-4 py-3 text-sm bg-white focus:border-cornelius-navy"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"wtb-comment",className:"sr-only",children:"Additional details"}),e.jsx("textarea",{id:"wtb-comment",placeholder:"Tell us what you're looking for (equipment type, service needs, etc.)",rows:4,value:s.comment,onChange:t=>a({...s,comment:t.target.value}),className:"w-full border border-gray-300 px-4 py-3 text-sm bg-white focus:border-cornelius-navy resize-none"})]}),e.jsxs("div",{className:"absolute left-0 opacity-0 pointer-events-none","aria-hidden":"true",tabIndex:-1,children:[e.jsx("label",{htmlFor:"wtb-website",children:"Website"}),e.jsx("input",{id:"wtb-website",type:"text",name:"website",autoComplete:"off",tabIndex:-1,value:s.website,onChange:t=>a({...s,website:t.target.value})})]}),S&&e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm px-4 py-3",children:"Your submission could not be processed. Please try again or contact us directly."}),y&&e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm px-4 py-3",children:y}),e.jsx("button",{type:"submit",disabled:b,className:"bg-cornelius-navy text-white font-semibold px-8 py-3 text-sm tracking-wide hover:bg-cornelius-blue transition-colors w-full sm:w-auto min-h-[48px] disabled:opacity-50 disabled:cursor-not-allowed",children:b?"SUBMITTING...":"SUBMIT"})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-white p-8 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-bold text-cornelius-navy mb-3",children:"Need Additional Help?"}),e.jsx("p",{className:"text-sm text-cornelius-gray mb-4",children:"Can't find what you're looking for? Our team can help match you with the right distributor or service provider."}),e.jsxs(m,{to:"/contact",className:"inline-flex items-center gap-2 text-sm font-semibold text-cornelius-blue hover:text-cornelius-navy transition-colors min-h-[44px]",children:["Contact Our Team ",e.jsx(i,{className:"w-4 h-4"})]})]}),e.jsxs("div",{className:"bg-white p-8 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-bold text-cornelius-navy mb-3",children:"Why Work with an Authorized Partner?"}),e.jsxs("ul",{className:"space-y-3 text-sm text-cornelius-gray",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(i,{className:"w-4 h-4 text-cornelius-blue shrink-0 mt-0.5"}),"Factory-trained technicians with deep Cornelius product knowledge"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(i,{className:"w-4 h-4 text-cornelius-blue shrink-0 mt-0.5"}),"Access to genuine Cornelius replacement parts"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(i,{className:"w-4 h-4 text-cornelius-blue shrink-0 mt-0.5"}),"Warranty-backed service and installation"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(i,{className:"w-4 h-4 text-cornelius-blue shrink-0 mt-0.5"}),"Ongoing support and preventive maintenance programs"]})]})]})]})]})})})]})}export{X 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.