1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3962],{23918:(e,t,s)=>{"use strict";s.d(t,{b:()=>N});var a=s(41996),l=s(41728),n=s(84248),i=s.n(n),r=s(8444),c=s(75471),d=s(65585),o=s(24965),m=s(81675),x=s(55188),h=s(66395),u=s(5571),g=s(19952),p=s(93052);function f(){return(0,a.jsxs)("div",{className:"mt-10 text-center md:mt-14",children:[(0,a.jsx)("div",{className:"bg-yellow mx-auto mb-4 mt-0 flex h-[72px] w-[72px] items-center justify-center rounded-full md:h-[104px] md:w-[104px]",children:(0,a.jsx)(p.I,{className:"h-auto max-h-10 w-10 fill-white md:max-h-14 md:w-12",height:24,use:"shining-star",width:24})}),(0,a.jsx)("h2",{className:"m-0 text-xl md:text-2xl",children:"No hospitals were found, but we're adding new partners all the time!"}),(0,a.jsx)("p",{className:"text-muted-foreground mx-0 mb-0 mt-2 text-base md:mt-4 md:text-lg",children:"Consider sponsoring the hospital with the greatest need."})]})}let j=(0,h.A)(e=>{let{hits:t,selectedHospital:s,onSelectHospital:l,variant:n}=e;if(0===t.length)return(0,a.jsx)(f,{});let i="form"===n;return(0,a.jsx)("ol",{className:"mt-8 grid grid-cols-1 gap-6 md:grid-cols-2",children:t.map(e=>{let t=(null==s?void 0:s.objectID)===e.objectID,n=!!(s&&!t);return(0,a.jsxs)("li",{className:(0,g.cn)("md:border-border rounded-lg p-3 md:border md:p-6",t?"bg-secondary text-secondary-foreground":"text-muted-foreground bg-background",n&&"opacity-25"),children:[(0,a.jsxs)("address",{className:"not-italic",children:[e.city,", ",e.state,(0,a.jsx)("h3",{className:"title-sm mb-4",children:e.name})]}),i&&(0,a.jsxs)("div",{className:"mt-auto flex items-center justify-between",children:[(0,a.jsx)(u.$,{className:t?"":"bg-blue",disabled:n,onClick:()=>s?l(t?null:e):l(e),size:"sm",variant:t?"secondary":"default",children:t?"Remove":"Sponsor"}),(0,a.jsxs)("div",{className:"font-greycliff-extrabold flex items-center text-xs",children:[(0,a.jsx)(x.$n,{className:"mr-2",height:16,use:"Vr",width:24})," ",e.needs.virtualReality,(0,a.jsx)(x.$n,{className:"mx-2",height:16,use:"Gaming",width:23})," ",e.needs.nintendoSwitch,(0,a.jsx)(x.$n,{className:"mx-2",height:16,use:"Gown",width:18})," ",e.needs.gowns,(0,a.jsx)(x.$n,{className:"mx-2",height:16,use:"Play",width:24})," ",e.needs.toys]})]})]},e.objectID)})})}),b=i()("YM74CSB9WB","dd43bdf6a8e761cb2d8ec33ab9490100"),y=(0,r.A)(e=>{let{nbHits:t,stateIcon:s,foundIn:l,cityName:n}=e;return n&&[{value:"prod_hospitals_by_need_desc",label:"Hospital Need"}].unshift({value:"prod_hospitals",label:"Close to ".concat(n)}),(0,a.jsxs)("div",{className:"mx-auto my-8 flex items-center justify-center gap-x-6 md:my-12",children:[(0,a.jsx)("div",{className:"bg-yellow flex h-24 w-24 shrink-0 items-center justify-center rounded-full p-5 md:h-60 md:w-60 md:p-10",children:(0,a.jsx)("svg",{className:"fill-white",fill:"none",focu
1sable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("use",{xlinkHref:"#".concat(s)})})}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"font-greycliff-extrabold text-foreground text-center leading-5 md:text-2xl",children:[(0,a.jsx)("strong",{className:"text-yellow block text-7xl",children:t}),1===t?"hospital":"hospitals"," found in ",l]})})]})});function N(e){let{searchMethod:t,selectedCity:s,selectedHospital:n,onSelectHospital:i,variant:r="form"}=e,[x,h]=l.useState(null),u=s&&s.name?s.name.replace(/\s/g,""):null,g=s&&s.administrative?s.administrative.replace(/\s/g,""):u,p="city"===t&&s||"hospital"===t&&x;return(0,a.jsxs)(c.A,{indexName:"prod_hospitals",searchClient:b,children:["hospital"===t&&(0,a.jsx)(d.A,{autoFocus:!0,onChange:e=>h(e.currentTarget.value),onReset:()=>h(null),translations:{placeholder:"Hospital name"}}),"city"===t&&s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{cityName:s.name,foundIn:s.administrative?s.administrative:s.name,stateIcon:g}),(0,a.jsx)(o.A,{aroundLatLng:"".concat(s.latlng.lat,", ").concat(s.latlng.lng),filters:'state:"'.concat(s.administrative?s.administrative:s.name,'"'),hitsPerPage:8})]}),p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{onSelectHospital:i,selectedHospital:n,variant:r}),(0,a.jsx)(m.A,{})]}),(0,a.jsx)(o.A,{hitsPerPage:8})]})}},53962:(e,t,s)=>{"use strict";s.r(t),s.d(t,{SearchHospitals:()=>p});var a=s(41996),l=s(41728),n=s(18995),i=s(29286),r=s(56584),c=s(23918),d=s(21791),o=s(87809),m=s(19952),x=s(77348),h=s.n(x),u=s(51820);let g=(0,n.default)(()=>Promise.all([s.e(5544),s.e(1272),s.e(8861)]).then(s.bind(s,28861)).then(e=>({default:e.CitySearch})),{loadableGenerated:{webpack:()=>[28861]},ssr:!1,loading:()=>(0,a.jsx)("div",{className:"bg-asphalt-25/75 mx-auto h-12 max-w-md animate-pulse rounded-lg"})});function p(e){let{headline:t,subhead:s}=e,[n,x]=l.useState("city"),[p,f]=l.useState(null),[j,b]=l.useState(null),{setValue:y}=(0,i.mN)({defaultValues:{searched_by:""}});return l.useEffect(()=>{let e=document.querySelector(".ap-input"),t=document.querySelector(".ais-SearchBox-input");"city"===n&&null!==e&&e.focus(),"hospital"===n&&null!==t&&t.focus()},[n]),(0,a.jsxs)("section",{className:(0,m.cn)("mx-auto w-full max-w-5xl px-6 sm:px-12",h().search),children:[(0,a.jsxs)("div",{className:"mx-auto mb-6 flex max-w-2xl flex-col items-center lg:mb-8",children:[(0,a.jsx)("h2",{className:"heading-lg max-w-lg text-center",children:t?(0,u.Y)(t):"Search our hospitals"}),(0,a.jsx)("p",{className:"text-muted-foreground body-lg mt-6 text-center lg:mt-8",children:s||(0,a.jsxs)(a.Fragment,{children:["Find hospitals we serve and learn how to"," ",(0,a.jsx)(r.N,{className:"underline",href:"/fund-a-program",children:"fund a program"}),"."]})})]}),(0,a.jsxs)("div",{className:"mx-auto mb-4 grid max-w-md grid-cols-2 gap-2 lg:gap-4",children:[(0,a.jsx)(o.b,{isActive:"city"===n,onClick:()=>{y("searched_by","Location"),x("city")},size:"small",type:"button",children:"By City/Location"}),(0,a.jsx)(o.b,{isActive:"hospital"===n,onClick:()=>{y("searched_by","Hospital name"),x("hospital")},size:"small",type:"button",children:"By Hospital Name"})]}),"city"===n&&(0,a.jsx)(l.Suspense,{fallback:null,children:(0,a.jsx)(g,{onClear:()=>{b(null)},onSelectCity:e=>b(e)})}),(0,a.jsx)(c.b,{onSelectHospital:e=>{f(e)},searchMethod:n,selectedCity:j,selectedHospital:p,variant:"search"}),(0,a.jsx)(d.a,{})]})}},77348:e=>{e.exports={search:"hospital-sponsorship_search___K8z9"}},87809:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var a=s(41996);s(41728);var l=s(17781),n=s(604),i=s(19952);let r=e=>{let{size:t,isActive:s,children:r,className:c,...d}=e;return(0,a.jsxs)("button",{className:(0,i.cn)("font-greycliff-extrabold flex items-center justify-start gap-x-2 rounded-lg text-left","large"===t&&"p-6 text-lg lg:text-2xl","small"===t&&"p-4 text-xs sm:p-4 sm:text-sm",s?"bg-secondary text-secondary-foreground":"bg-secondary/10 text-secondary",c),...d,children:[s?(0,a.jsx)(l.A,{className:"-mt-px size-4 shrink-0 sm:size-5"}):(0,a.jsx)(n.A,{className:"-mt-px size-4 shrink-0 sm:size-5"}),r]})};r.displayName="FancyRadioButton"}}]); 2//# sourceMappingURL=3962.bb34cefecd7b6bf0.js.map
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.