PageSourceSearch

http://neighbourhoodfoodhub.com/js/98f976247d5d2895.js

js neighbourhoodfoodhub.com collected 2026-09-30 16:13:55 UTC 16,916 bytes, 60 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3303,(e,t,a)=>{t.exports=e.r(79520)},1613,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(17751),n=e.i(12598),i=e.i(18566),r=e.i(3303),l=e.i(5766),o=e.i(96593);let c=()=>{let[e,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=()=>{let e=document.documentElement.scrollHeight-window.innerHeight;s(window.scrollY/e*100)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,t.jsx)("div",{style:{position:"fixed",top:0,left:0,width:`${e}%`,height:"2px",backgroundColor:"var(--primary)",zIndex:1e3}})};var d=e.i(10204),u=e.i(46290);let m=()=>{let{isModalOpen:e,closeModal:a}=(0,o.useAppContext)();return(0,t.jsxs)(u.default,{isOpen:e,onRequestClose:a,ariaHideApp:!1,className:"lg:w-[450px] max-lg:w-full mx-5 p-4 bg-white rounded-lg shadow-lg relative outline-0",overlayClassName:"fixed inset-0 bg-[#25252577] bg-opacity-50 z-50 flex justify-center items-center",children:[(0,t.jsx)("button",{onClick:a,className:"absolute cursor-pointer top-[-10px] right-[-10px] bg-primary hover:bg-red-500 h-8 w-8 text-white text-xl font-bold flex justify-center items-center rounded-full",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:(0,t.jsx)("path",{d:"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"})})}),(0,t.jsx)("div",{className:"md:p-5",children:(0,t.jsx)(d.default,{isModal:!0})})]})};var x=e.i(40141);function p(e){return(0,x.GenIcon)({tag:"svg",attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M9 2.025v-1.025h1.5v-1h-4v1h1.5v1.025c-3.902 0.26-7 3.508-7 7.475 0 4.136 3.364 7.5 7.5 7.5s7.5-3.364 7.5-7.5c0-3.967-3.098-7.215-7-7.475zM8.5 16c-3.584 0-6.5-2.916-6.5-6.5s2.916-6.5 6.5-6.5 6.5 2.916 6.5 6.5-2.916 6.5-6.5 6.5zM9 9h4v1h-5v-4h1v3z"},child:[]}]})(e)}var h=e.i(79713),f=e.i(31512),g=e.i(58284),y=e.i(53145);function w({inputs:e,submitText:s,title:n}){let{register:r,handleSubmit:l,formState:{errors:o},reset:c,control:d}=(0,y.useForm)(),{phoneCode:u,country:m}=(0,h.default)(),{push:x}=(0,i.useRouter)(),[p,w]=(0,a.useState)(!1),b=async e=>{w(!0);try{e.page=window.location.href,e.leadSource=`Organic_Popup_${m.toUpperCase()}`,await (0,f.leadFormSubmit)(e)&&(0,g.updateDataLayer)({data:e,callback:x("uk"===m?"/thank-you/?=formsubmit":`/${m}/thank-you/?=formsubmit`),layerSuccess:"offer_banner_signup_success"}),c()}catch(e){console.error("Form submission error:",e)}finally{w(!1)}};return(0,t.jsxs)("form",{onSubmit:l(b),children:[e.map((e,a)=>(0,t.jsx)("div",{children:"select"===e.type?(0,t.jsx)(y.Controller,{name:e.name,rules:{required:!0},control:d,render:({field:a})=>(0,t.jsx)("select",{className:`form-control
2                    ${a.value?"":"text-[gray]"}
3                     ${o[e.name]?"border-red-500":""}`,...a,children:e.option.map((e,a)=>(0,t.jsx)("option",{value:e.value,children:e.label},a))})}):(0,t.jsxs)("div",{className:"relative",children:[u&&"phone"===e.name?(0,t.jsx)("div",{className:"absolute text-sm left-[10px] top-[10px] text-black border-gray-400 pr-2 border-r",children:u}):null,(0,t.jsx)("input",{placeholder:e.label,className:`form-control ${u&&"phone"===e.name?"pl-14":""} ${o[e.name]?"border-red-500":""}`,type:e.type,...r(e.name,{required:!0,validate:t=>"phone"!==e.name||/^\d{10}$/.test(t)||"Phone number must be exactly 10 digits"})})]})},a)),(0,t.jsxs)("button",{type:"submit",className:`btn btn-primary w-full btn-pill text-sm ${p?"opacity-50 cursor-not-allowed":""}`,disabled:p,children:[p?"Submitting...":s," "]})]})}var b=e.i(15941),v=e.i(7670),j=e.i(57688);let N=()=>{(0,b.default)();let e=(0,i.usePathname)(),[s,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!localStorage.getItem("promoModalSeen")&&!e.includes("/reseller")){let e=setTimeout(()=>{n(!0),localStorage.setItem("promoModalSeen","true")},1e4);return()=>clearTimeout(e)}},[]),(0,t.jsx)(u.default,{isOpen:s,onRequestClose:()=>n(!1),ariaHideApp:!1,event:"offer_banner_close",className:"lg:w-[700px] max-lg:w-full mx-5 bg-white rounded-lg shadow-xl relative p-0 outline-0",overlayClassName:s?"fixed inset-0 bg-[#25252577] bg-opacity-50 z-50 flex justify-center items-center":"",children:(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row items-center",children:[(0,t.jsx)("div",{className:(0,v.default)("lg:w-1/2 w-full relative lg:mr-5"),children:(0,t.jsx)(j.default,{src:"https://assets.foodhubforbusiness.com/fh-b2b/popup-offer.webp",alt:"Get your offer",layout:"responsive",width:250,height:250,className:"w-full md:w-[180px] mx-auto lg:w-full rounded-xl"})}),(0,t.jsxs)("div",{className:"lg:w-1/2 w-full py-3 px-4 md:pl-0 md:p-6 flex flex-col justify-center bg-white h-full rounded-xl",children:[(0,t.jsxs)("h2",{className:"text-xl max-md:justify-center mb-2 lg:text-2xl font-bold text-primary lg:mb-4 flex items-center gap-2",children:[(0,t.jsx)(p,{})," ",(0,t.jsx)("span",{className:"text-primary",children:"Offer Ends S
3oon"})]}),(0,t.jsx)(w,{title:"Tell us how we can help",inputs:[{label:"Name",name:"name",type:"text"},{label:"Email",name:"email",type:"email"},{label:"Phone",name:"phone",type:"number"},{label:"Business Name",name:"businessName",type:"text"}],submitText:"Get your offer"})]})]})})};var k=e.i(46932),_=e.i(88653),S=e.i(50719);let C="site_consent_v2";function T(){let[e,s]=(0,a.useState)(!1),[n,r]=(0,a.useState)(!1),l=(0,i.usePathname)();(0,a.useEffect)(()=>{var e;if(!("undefined"!=typeof document?(e=C,"undefined"==typeof document?"":document.cookie.split("; ").reduce((t,a)=>{let[s,n]=a.split("=");return s===e?decodeURIComponent(n):t},"")):"")){let e=setTimeout(()=>s(!0),1e3);return()=>clearTimeout(e)}},[]);let o=(e,t={})=>{"function"==typeof window.gtag&&window.gtag("event",e,{page_name:l,...t})},c=(e,t)=>{(function(e,t,a=365){let s=new Date(Date.now()+864e5*a).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${s}; path=/; SameSite=Lax`})(C,JSON.stringify(e)),"function"==typeof window.gtag&&window.gtag("consent","update",{analytics_storage:e.analytics?"granted":"denied",ad_storage:e.marketing?"granted":"denied",ad_user_data:e.marketing?"granted":"denied",ad_personalization:e.marketing?"granted":"denied"}),o(`cookie_${t}`,{analytics_consent:e.analytics?"granted":"denied",marketing_consent:e.marketing?"granted":"denied"}),s(!1),r(!1)};return(0,t.jsx)(_.AnimatePresence,{children:e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.AnimatePresence,{children:n&&(0,t.jsxs)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center p-4",children:[(0,t.jsx)(k.motion.div,{initial:{opacity:0}
3,animate:{opacity:1},exit:{opacity:0},onClick:()=>{o("cookie_customize_cancel"),r(!1)},className:"absolute inset-0 bg-slate-900/30 backdrop-blur-sm"}),(0,t.jsxs)(k.motion.div,{initial:{scale:.95,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:20},className:"relative bg-white rounded-2xl lg:rounded-[2rem] shadow-2xl max-w-lg w-full overflow-hidden border border-slate-100",children:[(0,t.jsxs)("div",{className:"p-6 border-b border-slate-50 flex justify-between items-center bg-slate-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"p-2 bg-primary/10 rounded-xl",children:(0,t.jsx)(S.HiOutlineAdjustments,{className:"text-primary text-xl"})}),(0,t.jsx)("h4",{className:"text-xl font-bold text-slate-900",children:"Cookie Settings"})]}),(0,t.jsx)("button",{onClick:()=>{o("cookie_customize_cancel"),r(!1)},className:"p-2 hover:bg-slate-200 rounded-full transition-colors",children:(0,t.jsx)(S.HiX,{className:"text-slate-800 text-xl"})})]}),(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(z,{onSave:e=>c(e,"save_preferences"),onCancel:()=>{o("cookie_customize_cancel"),r(!1)}})})]})]})}),(0,t.jsx)(k.motion.div,{initial:{y:100,opacity:0,x:"-50%"},animate:{y:0,opacity:1,x:"-50%"},exit:{y:100,opacity:0,x:"-50%"},className:"fixed bottom-8 left-1/2 z-[60] w-[92%] max-w-5xl",children:(0,t.jsxs)("div",{className:"bg-white shadow-lg border border-slate-200 rounded-2xl p-4 flex flex-col lg:flex-row items-center gap-3 lg:gap-6",children:[(0,t.jsx)("div",{className:"hidden lg:flex items-center justify-center w-14 h-14 bg-primary/10 rounded-2xl shrink-0",children:(0,t.jsx)(S.HiOutlineShieldCheck,{className:"text-primary text-3xl"})}),(0,t.jsxs)("div",{className:"flex-1 text-center lg:text-left",children:[(0,t.jsx)("div",{className:"flex items-center justify-center lg:justify-start gap-2 mb-1",children:(0,t.jsx)("h3",{className:"text-sm font-bold tracking-widest text-slate-800 uppercase",children:"Privacy Center"})}),(0,t.jsxs)("p",{className:"text-sm text-slate-600 font-medium leading-relaxed",children:["We use cookies to improve your experience and analyze our traffic."," ",(0,t.jsx)("a",{href:"/cookies",className:"text-primary hover:underline text-sm",children:"Learn More"})]})]}),(0,t.jsxs)("div",{className:"flex  justify-center gap-3 shrink-0",children:[(0,t.jsx)("button",{onClick:()=>{r(!0),o("cookie_customize_open")}
3,className:"px-2.5 py-1.5 lg:px-4 rounded-md border border-slate-200 text-sm  text-slate-600 hover:bg-slate-50 transition-all active:scale-95",children:"Manage"}),(0,t.jsx)("button",{onClick:()=>c({analytics:!1,marketing:!1,functional:!0},"reject_all"),className:"px-2.5 py-1.5 lg:px-4 border border-slate-200 rounded-md text-sm  text-slate-800 hover:text-slate-600 transition-all active:scale-95",children:"Reject"}),(0,t.jsx)("button",{onClick:()=>c({analytics:!0,marketing:!0,functional:!0},"accept_all"),className:"px-2.5 py-1.5 lg:px-4 rounded-md bg-primary text-white text-sm font-bold hover:shadow-lg hover:shadow-primary/30 transition-all active:scale-95 flex items-center gap-2",children:"Accept"})]})]})})]})})}function z({onSave:e,onCancel:s}){let[n,i]=(0,a.useState)(!1),[r,l]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(L,{label:"Strictly Necessary",desc:"Essential for the website to function properly.",checked:!0,disabled:!0}),(0,t.jsx)(L,{label:"Performance & Analytics",desc:"Helping us understand how you use our site.",checked:n,onChange:i}),(0,t.jsx)(L,{label:"Marketing & Retargeting",desc:"Used to show you relevant ads on other sites.",checked:r,onChange:l})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-6",children:[(0,t.jsx)("button",{onClick:s,className:"text-sm font-bold text-slate-800 hover:text-slate-600 transition-colors",children:"Back"}),(0,t.jsxs)("button",{onClick:()=>e({analytics:n,marketing:r,functional:!0}),className:"bg-primary text-white px-8 py-3.5 rounded-xl text-sm font-bold shadow-lg shadow-primary/20 hover:opacity-90 transition-all flex items-center gap-2 group",children:["Confirm My Choices",(0,t.jsx)(S.HiChevronRight,{className:"text-lg group-hover:translate-x-1 transition-transform"})]})]})]})}function L({label:e,desc:a,checked:s,onChange:n,disabled:i=!1}){return(0,t.jsx)("div",{onClick:()=>!i&&n?.(!s),className:`group p-4 rounded-2xl border-2 transition-all duration-200 ${s?"border-primary/20 bg-primary/[0.02]":"border-slate-100 hover:border-slate-200"} ${i?"opacity-50":"cursor-pointer"}`,children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"pr-4 text-left",children:[(0,t.jsx)("p",{className:`font-bold text-sm ${s?"text-primary":"text-slate-700"}`,children:e}),(0,t.jsx)("p",{className:"text-[11px] text-slate-800 font-medium mt-0.5",children:a})]}),(0,t.jsx)("div",{className:`w-11 h-6 rounded-full p-1 transition-colors duration-300 ${s?"bg-primary":"bg-slate-200"}`,children:(0,t.jsx)(k.motion.div,{animate:{x:20*!!s},transition:{type:"spring",stiffness:500,damping:30},className:"w-4 h-4 bg-white rounded-full shadow-sm"})})]})})}function E(){return(0,a.useEffect)(()=>{let e=setTimeout(()=>{if(!window.fbq){let e=function(...t){e.callMethod?e.callMethod(...t):e.queue?.push(t)};e.queue=[],e.loaded=!0,e.version="2.0",window.fbq=e}let e=document.createElement("script");e.async=!0,e.src="https://connect.facebook.net/en_US/fbevents.js",document.head.appendChild(e),e.onload=()=>{window.fbq?.("init","175808536222582"),"https://foodhubforbusiness.com/thank-you/"===window.location.href?window.fbq?.("track","Lead"):window.fbq?.("track","PageView")}},2e3);return()=>clearTimeout(e)},[]),null}function M(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E,{}),(0,t.jsx)(r.default,{id:"google-consent-management",strategy:"beforeInteractive",dangerouslySetInnerHTML:{__html:`
4            window.dataLayer = window.dataLayer || [];
5            function gtag(){dataLayer.push(arguments);}
6
7            // Step 1: Set Default (Deny everything for privacy compliance)
8            gtag('consent', 'default', {
9              'analytics_storage': 'denied',
10              'ad_storage': 'denied',
11              'ad_user_data': 'denied',
12              'ad_personalization': 'denied',
13              'wait_for_update': 500
14            });
15
16            // Step 2: Immediate Cookie Lookup
17            // Because this is SSG, we check the browser cookie the millisecond the script loads.
18            (function() {
19              var cookieName = "site_consent_v2=";
20              var cookies = document.cookie.split(';');
21              for (var i = 0; i < cookies.length; i++) {
22                var c = cookies[i].trim();
23                if (c.indexOf(cookieName) == 0) {
24                  try {
25                    var saved = JSON.parse(decodeURIComponent(c.substring(cookieName.length)));
26                    // Update consent immediately if cookie exists
27                    gtag('consent', 'update', {
28                      'analytics_storage': saved.analytics ? 'granted' : 'denied',
29                      'ad_storage': saved.marketing ? 'granted' : 'denied',
30                      'ad_user_data': saved.marketing ? 'granted' : 'denied',
31                      'ad_personalization': saved.marketing ? 'granted' : 'denied'
32                    });
33                  } catch (e) { console.error("Consent Sync Error", e); }
34                }
35              }
36            })();
37          `}}),(0,t.jsx)(r.default,{id:"gtm-script",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:`
vendor: 388 bytes, lines 37-42
37
38            (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
39            new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
40            j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
41            'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
42            })(window,document,'script','dataLayer','
42GTM-PXNPTFV
vendor: 14 bytes, lines 42-43
42');
43          
43`}}),(0,t.jsx)(r.default,{id:"ms-uet",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:`
44            (function(w,d,t,r,u){
45              var f,n,i;w[u]=w[u]||[],f=function(){
46                var o={ti:"26144775",enableAutoSpaTracking:true};
47                o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")
48              },
49              n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){
50                var s=this.readyState;
51                s && s !== "loaded" && s !== "complete" || (f(), n.onload = n.onreadystatechange = null)
52              },
53              i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)
54            })(window,document,"script","//bat.bing.com/bat.js","uetq");
55          `}}),(0,t.jsx)(r.default,{id:"uet-function",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:`
56            function uet_report_conversion() {
57              window.uetq = window.uetq || [];
58              window.uetq.push("event", "submit_lead_form", {});
59            }
60          `}})]})}e.i(86745);let P=new s.QueryClient;e.s(["default",0,({children:e,font:s})=>{let d=(0,i.usePathname)(),u=(0,b.default)();(0,a.useEffect)(()=>{window.scroll(0,0)},[d]);let x=d.includes("/stories"),p=!d.includes("/lp")&&!d.includes("/partner/toast")&&!d.includes("/thank-you")&&!d.includes("/drive2success-privacy-policy");if(x)return(0,t.jsx)(t.Fragment,{children:e});let h=function(e){switch(e.toLowerCase()){case"us":return"en-us";case"aus":return"en-au";case"nz":return"en-nz";case"ire":return"en-ie";case"ca":return"en-ca";default:return"en-gb"}}(u);return(0,t.jsx)("html",{lang:h,className:s.variable,children:(0,t.jsxs)("body",{className:"antialiased",suppressHydrationWarning:!0,children:[(0,t.jsxs)(n.QueryClientProvider,{client:P,children:[(0,t.jsxs)(o.AppProvider,{children:[(0,t.jsx)(c,{}),e,p&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(N,{})}),(0,t.jsx)(m,{})]}),(0,t.jsx)(T,{}),(0,t.jsx)(l.Toaster,{position:"top-center"})]}),(0,t.jsx)(r.default,{src:"/js/custom.js",strategy:"lazyOnload"}),(0,t.jsx)(M,{})]})})}],1613)}]);

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.