1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8265],{1240:(e,t,s)=>{"use strict";s.d(t,{A:()=>a,Z:()=>r});let a=["Shopper","Grocer","Other"];async function r(e){let{email:t,groups:s,source:a}=e,r=await fetch("/api/mailchimp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t.trim(),groups:s,source:a})}),l=await r.json().catch(()=>({}));if(!r.ok)throw Error(l.message||"Something went wrong. Please try again.");return{success:!0===l.success,message:l.message||"Successfully subscribed to newsletter",alreadySubscribed:l.alreadySubscribed,memberId:l.memberId}}},2433:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>m,default:()=>p});var a=s(7876),r=s(4232),l=s(7195),i=s(9240),n=s(2945),o=s(2874),c=s(6106),d=s(9099),x=s(7328),u=s.n(x),h=s(1240),m=!0;let p=e=>{let{webView:t}=e,[s,x]=(0,r.useState)(""),m="AIzaSyCK497oaewCm8xQuKKzIixpjLNEVbKnqFI",[p,C]=(0,r.useState)(!1),[b,f]=(0,r.useState)(""),[g,y]=(0,r.useState)(null),w=(0,d.useRouter)(),[j,N]=(0,r.useState)(""),[k,v]=(0,r.useState)(""),[S,L]=(0,r.useState)(""),[V,M]=(0,r.useState)(""),[_,Z]=(0,r.useState)(""),[A,E]=(0,r.useState)([]),[Y,H]=(0,r.useState)(!1),[K,B]=(0,r.useState)(!1),[I,P]=(0,r.useState)(!1),[z,O]=(0,r.useState)(""),T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;e&&e.preventDefault(),S.length<3?N("Your search query must be at least 3 characters long."):N(""),5!==t.length?v("Your zip code must be exactly 5 characters long."):v(""),S.length<3||5!==t.length||w.push("/search_results?searchQuery=".concat(S,"&zipcode=").concat(t))},W=(0,r.useRef)(p);(0,r.useEffect)(()=>{W.current=p},[p]);let{isLoaded:G}=(0,n.KD)({id:"google-map-script",googleMapsApiKey:m,libraries:o.G}),D=async e=>{if(e.preventDefault(),O(""),!V.includes("@"))return void O("Please enter a valid email address.");P(!0);try{(await (0,h.Z)({email:V,groups:A,source:"newsletter_page"})).alreadySubscribed?B(!0):H(!0)}catch(e){O(e instanceof Error?e.message:"Network error. Please check your connection and try again.")}finally{P(!1)}};return(0,a.jsxs)("div",{className:"bg-white min-h-screen flex flex-col",children:[(0,a.jsxs)(u(),{children:[(0,a.jsx)("title",{children:"Newsletter | Youdle"}),(0,a.jsx)("meta",{name:"description",content:"Subscribe to the Youdle newsletter for real-time grocery news, shortages, recalls, and in-demand products near you."})]}),!t&&(0,a.jsx)(l.A,{handleLocationInputClick:()=>C(!0),zipcode:s,setZipcode:x,handleSubmit:T,setSearchQuery:L,googleLoaded:G}),p&&(0,a.jsx)(c.A,{open:p,setOpen:C,openRef:W,zipcode:s,setZipcode:x,isLoaded:G,apiKey:m,setLocation:f,geocodeLocation:g,setGeocodeLocation:y,handleSubmit:T}),(0,a.jsxs)("main",{className:"flex-1",children:[(0,a.jsx)("section",{className:"bg-youdleDarkBlue py-16 md:py-24",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto px-4 text-center",children:[(0,a.jsxs)("svg",{width:"180",height:"54",viewBox:"0 0 114 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-auto mb-6",children:[(0,a.jsx)("path",{d:"M16.5841 33.0804C25.7432 33.0804 33.1681 25.6751 33.1681 16.5402C33.1681 7.40529 25.7432 0 16.5841 0C7.42494 0 0 7.40529 0 16.5402C0 25.6751 7.42494 33.0804 16.5841 33.0804Z",fill:"#F93822"}),(0,a.jsx)("path",{d:"M25.0436 7.93781H23.4687C22.8208 7.93781 22.2572 8.38172 22.1124 9.01212L20.6507 15.261H12.2652L10.9694 9.82376L10.8562 9.32469C10.6876 8.57609 9.94228 8.10591 9.19169 8.2714C8.4411 8.4395 7.96704 9.18285 8.1356 9.93145L9.80533 16.9709C9.95545 17.5961 10.5164 18.04 11.1617 18.04H20.0002L19.4629 20.341H12.2204C11.4514 20.341 10.8272 20.9635 10.8272 21.7305C10.8272 22.4975 11.4514 23.12 12.2204 23.12H20.569C21.2169 23.12 21.7805 22.6761 21.9254 22.0457L24.5774 10.7142H25.0462C25.8153 10.7142 26.4394 10.0917 26.4394 9.32469C26.4394 8.5577 25.8153 7.93518 25.0462 7.93518L25.0436 7.93781Z",fill:"white"}),(0,a.jsx)("path",{d:"M13.0339 24.6986C12.1016 24.6986 11.3457 25.4551 11.3457 26.3823C11.3457 27.3095 12.1042 28.0686 13.0339 28.0686C13.9635 28.0686 14.722 27.3122 14.722 26.3823C14.722 25.4525 13.9635 24.6986 13.0339 24.6986Z",fill:"white"}),(0,a.jsx)("path",{d:"M19.6205 24.6986C18.6882 24.6986 17.9297 25.4551 17.9297 26.3823C17.9297 27.3095 18.6882 28.0686 19.6205 28.0686C20.5528 28.0686 21.3087 27.3122 21.3087 26.3823C21.3087 25.4525 20.5502 24.6986 19.6205 24.6986Z",fill:"white"}),(0,a.jsx)("path",{d:"M41.3455 25.0899C40.9452 24.956 40.5001 24.625 40.5001 23.9815C40.5001 23.3379 41.011 22.873 41.5904 22.873C41.8143 22.873 41.946 22.9177 42.0803 22.9623C42.3911 23.0516 42.636 23.1173 43.0152 23.1173C43.8159 23.1173 44.2399 22.7837 44.6823 21.8749L44.7719 21.6306L40.4132 11.9145C40.3237 11.7149 40.2578 11.4496 40.2578 11.271C40.2578 10.5171 40.8372 9.96289 41.5931 9.96289C42.2831 9.96289 42.6597 10.3621 42.9046 10.9847L46.0624 18.7701L48.9989 10.9847C49.2201 10.4304 49.5994 9.96289 50.2894 9.96289C50.9794 9.96289 51.5799 10.5171 51.5799 11.2263C51.5799 11.447 51.514 11.7359 51.4692 11.8699L47.1764 22.1402C46.1756 24.5357 45.109 25.4235 43.218 25.4235C42.4622 25.4235 41.9065 25.3132 41.3508 25.0899H41.3455Z",fill:"white"}),(0,a.jsx)("path",{d:"M53 16.0174V15.9728C53 12.6237 55.6679 9.84998 59.2733 9.84998C62.8788 9.84998 65.523 12.5791 65.523 15.9281V15.9728C65.523 19.3008 62.8551 22.0745 59.2286 22.0745C55.602 22.0745 53 19.3454 53 16.0174ZM62.8314 16.0174V15.9728C62.8314 13.9108 61.3408 12.2009 59.2286 12.2009C57.1164 12.2009 55.6916 13.8872 55.6916 15.9281V15.9728C55.6916 18.0137 57.1822 19.721 59.2733 19.721C61.3645 19.721 62.8314 18.0347 62.8314 16.0174Z",fill:"white"}),(0,a.jsx)("path",{d:"M78.6853 20.5878C78.6853 21.3206 78.0849 21.9195 77.329 21.9195C76.5731 21.9195 75.9727 21.3416 75.9727 20.5878V19.9889C75.2168 21.0974 74.1265 22.0509 72.3014 22.0509C69.6546 22.0509 68.1191 20.2752 68.1191 17.5487V11.3156C68.1191 10.5618 68.7196 9.96289 69.4544 9.96289C70.1892 9.96289 70.8107 10.5618 70.8107 11.3156V16.7502C70.8107 18.5679 71.722 19.5897 73.3232 19.5897C74.9245 19.5897 75.97 18.5259 75.97 16.7056V11.3156C75.97 10.5618 76.5705 9.96289 77.3264 9.96289C78.0822 9.96289 78.6827 10.5618 78.6827 11.3156V20.5878H78.6853Z",fill:"white"}),(0,a.jsx)("path",{d:"M93.5851 20.5879C93.5851 21.3417 92.9847 21.9196 92.2499 21.9196C91.5151 21.9196 90.8936 21.3417 90.8936 20.5879V19.855C90.0271 21.0764 88.8024 22.0509 86.8904 22.0509C84.133 22.0509 81.4414 19.855 81.4414 15.9728V15.9281C81.4414 12.0459 84.0882 9.85002 86.8904 9.85002C88.8261 9.85002 90.0482 10.8035 90.8936 11.912V6.83197C90.8936 6.07811 91.494 5.50024 92.2288 5.50024C92.9636 5.50024 93.5851 6.07549 93.5851 6.83197V20.5852V20.5879ZM84.1541 15.9281V15.9728C84.1541 18.2344 85.7105 19.7211 87.5357 19.7211C89.3
1608 19.7211 90.9383 18.2134 90.9383 15.9728V15.9281C90.9383 13.6666 89.3371 12.1799 87.5357 12.1799C85.7342 12.1799 84.1541 13.6009 84.1541 15.9281Z",fill:"white"}),(0,a.jsx)("path",{d:"M97.1191 6.83453C97.1191 6.10169 97.6985 5.50281 98.4544 5.50281C99.2102 5.50281 99.8107 6.10169 99.8107 6.83453V20.5878C99.8107 21.3417 99.2102 21.9195 98.4544 21.9195C97.6985 21.9195 97.1191 21.3417 97.1191 20.5878V6.83453Z",fill:"white"}),(0,a.jsx)("path",{d:"M108.706 22.0745C105.303 22.0745 102.678 19.6107 102.678 15.9964V15.9517C102.678 12.6027 105.059 9.84998 108.416 9.84998C112.154 9.84998 114 12.9101 114 15.6182C114 16.372 113.42 16.9052 112.733 16.9052H105.372C105.662 18.8122 107.018 19.8786 108.754 19.8786C109.889 19.8786 110.776 19.4794 111.535 18.8568C111.735 18.7019 111.914 18.6126 112.225 18.6126C112.825 18.6126 113.291 19.0775 113.291 19.7C113.291 20.0336 113.136 20.3199 112.936 20.5195C111.869 21.473 110.534 22.0719 108.709 22.0719L108.706 22.0745Z",fill:"white"})]}),(0,a.jsx)("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-4",style:{fontFamily:"Nunito, sans-serif"},children:"Stay in the Know with Youdle"}),(0,a.jsx)("p",{className:"text-lg md:text-xl text-blue-200 max-w-2xl mx-auto",children:"Get real-time updates on grocery news, shortages, recalls, and in-demand products near you â delivered straight to your inbox."})]})}),(0,a.jsx)("section",{className:"py-16 md:py-20",children:(0,a.jsx)("div",{className:"max-w-xl mx-auto px-4",children:Y||K?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,a.jsx)("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,a.jsx)("h2",{className:"text-2xl font-bold text-black mb-2",children:K?"You're already subscribed!":"You're all set!"}),(0,a.jsx)("p",{className:"text-gray-600",children:K?"Looks like you're already on our list. Stay tuned for updates!":"Thanks for subscribing. Keep an eye on your inbox for the latest from Youdle."})]}):(0,a.jsxs)("form",{onSubmit:D,className:"space-y-6",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h2",{className:"text-2xl md:text-3xl font-bold text-black mb-2",children:"Subscribe to Our Newsletter"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Join thousands of shoppers who stay ahead with Youdle."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"newsletter-email",className:"block text-sm font-medium text-black mb-1",children:["Email Address ",(0,a.jsx)("span",{className:"text-red",children:"*"})]}),(0,a.jsx)("input",{id:"newsletter-email",type:"email",required:!0,value:V,onChange:e=>M(e.target.value),placeholder:"[email protected]",className:"w-full rounded-lg border-2 border-gray-300 bg-white px-4 py-3 text-base text-black placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-red focus:border-red transition-colors"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-black mb-3",children:"I am a (check all that apply):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-4",children:h.A.map(e=>(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:A.includes(e),onChange:()=>(e=>{E(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])})(e),className:"h-5 w-5 rounded border-2 border-gray-400 text-red focus:ring-red accent-red"}),(0,a.jsx)("span",{className:"text-base text-black",children:e})]},e))})]}),z&&(0,a.jsx)("p",{className:"text-red text-sm font-medium",children:z}),(0,a.jsx)("button",{type:"submit",disabled:I||!V.trim(),className:"w-full rounded-full bg-red py-4 px-6 text-base font-semibold text-white hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-red focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:I?"Subscribing...":"Subscribe"}),(0,a.jsx)("p",{className:"text-xs text-gray-600 text-center",children:"We respect your privacy. Unsubscribe at any time."})]})})}),(0,a.jsx)("section",{className:"bg-gray-100 py-16",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto px-4",children:[(0,a.jsx)("h2",{className:"text-2xl md:text-3xl font-bold text-black text-center mb-12",children:"What You'll Get"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[{title:"Shortage Alerts",description:"Be the first to know about product shortages in your area so you can plan ahead.",icon:(0,a.jsx)("svg",{className:"w-8 h-8 text-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})})},{title:"Recall Notices",description:"Stay safe with timely updates on grocery product recalls and safety alerts.",icon:(0,a.jsx)("svg",{className:"w-8 h-8 text-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})},{title:"Trending Grocery News",description:"Stay on top of the latest grocery industry news and trends that matter to you.",icon:(0,a.jsx)("svg",{className:"w-8 h-8 text-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}].map(e=>(0,a.jsxs)("div",{className:"bg-white rounded-2xl p-6 shadow-sm text-center",children:[(0,a.jsx)("div",{className:"w-14 h-14 bg-red bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-4",children:e.icon}),(0,a.jsx)("h3",{className:"text-lg font-bold text-black mb-2",children:e.title}),(0,a.jsx)("p",{className:"text-gray-600 text-sm",children:e.description})]},e.title))})]})})]}),!t&&(0,a.jsx)(i.A,{})]})}},6326:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/newsletter",function(){return s(2433)}])}},e=>{e.O(0,[7725,4876,6352,7195,9569,636,6593,8792],()=>e(e.s=6326)),_N_E=e.O()}]); 2//# sourceMappingURL=newsletter-ecff726627dcfb2e.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.