PageSourceSearch

https://naughtonandbird.com/_next/static/chunks/app/contact/page-55238a88ad4efcdf.js

js naughtonandbird.com collected 2026-10-04 03:55:22 UTC 5,467 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[977],{2530:(e,a,n)=>{"use strict";n.d(a,{default:()=>m});var s=n(5155),t=n(2115),r=n(5704);let i={name:"Add your name.",email:"Add your email address.",message:"Tell us a little about what you are working on."},l=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,o=r.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY;function m(){let[e,a]=(0,t.useState)({}),[n,r]=(0,t.useState)("idle"),[m,c]=(0,t.useState)(0),[d,u]=(0,t.useState)("mailto:[email protected]"),h=(0,t.useRef)(null),f=(0,t.useRef)("");(0,t.useEffect)(()=>{if(!o||!h.current)return;let e=()=>{window.turnstile&&h.current&&0===h.current.childElementCount&&window.turnstile.render(h.current,{sitekey:o,callback:e=>{f.current=e},"expired-callback":()=>{f.current=""}})};if(window.turnstile)return void e();let a=document.createElement("script");a.src="https://challenges.cloudflare.com/turnstile/v0/api.js",a.async=!0,a.onload=e,document.head.appendChild(a)},[]);let p=n=>{e[n]&&a(e=>({...e,[n]:void 0}))},g=a=>"readiness-form__input".concat(e[a]?" readiness-form__input--error":""),b=async e=>{if(e.preventDefault(),"sending"===n)return;let s=new FormData(e.currentTarget),t=String(s.get("name")||"").trim(),o=String(s.get("email")||"").trim(),m=String(s.get("brand")||"").trim(),c=String(s.get("message")||"").trim(),d=s.getAll("interest").map(String),h={};if(t||(h.name=i.name),o?l.test(o)||(h.email="That does not look like an email address."):h.email=i.email,c||(h.message=i.message),Object.values(h).some(Boolean))return void a(h);a({}),r("sending");let p=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,email:o,brand:m,message:c,interest:d,website:String(s.get("website")||""),turnstileToken:f.current})}).catch(()=>null);if(p&&p.ok)return void r("sent");let g="Enquiry from ".concat(t).concat(m?" (".concat(m,")"):""),b=[c,"","Name: ".concat(t),m?"Domain: ".concat(m):"",d.length?"Working on: ".concat(d.join(", ")):""].filter(Boolean).join("\n");u("mailto:[email protected]?subject=".concat(encodeURIComponent(g),"&body=").concat(encodeURIComponent(b))),r("failed")};return"sent"===n?(0,s.jsxs)("div",{className:"readiness-form contact-form-card",children:[(0,s.jsx)("p",{className:"readiness-form__label",children:"Message received"}),(0,s.jsx)("p",{className:"body-1 mb-0",children:"Thank you. We read every message, and you will hear back from us within one working day."})]}):(0,s.jsxs)("form",{className:"readiness-form contact-form-card",onSubmit:b,noValidate:!0,children:[(0,s.jsx)("label",{className:"readiness-form__label",htmlFor:"cf-name",children:"Name"}),(0,s.jsx)("input",{className:g("name"),id:"cf-name",name:"name",type:"text",placeholder:"Your name",autoComplete:"name",onInput:()=>p("name")}),e.name&&(0,s.jsx)("p",{className:"readiness-form__field-error",children:e.name}),(0,s.jsx)("label",{className:"readiness-form__label",htmlFor:"cf-email",children:"Email"}),(0,s.jsx)("input",{className:g("email"),id:"cf-email",name:"email",type:"email",placeholder:"[email protected]",autoComplete:"email",onInput:()=>p("email")}),e.email&&(0,s.jsx)("p",{className:"readiness-form__field-error",children:e.email}),(0,s.jsx)("label",{className:"readiness-form__label",htmlFor:"cf-brand",children:"Domain"}),(0,s.jsx)("input",{className:"readiness-form__input",id:"cf-brand",name:"brand",type:"text",placeholder:"yourbrand.com",autoComplete:"url"}),(0,s.jsx)("p",{className:"readiness-form__label",children:"What are you working on?"}),(0,s.jsx)("div",{className:"contact-options mb-20",children:["Shopify SEO","GEO","Agentic Commerce","Klaviyo","Shopify Build","Something else"].map(e=>(0,s.jsxs)("label",{className:"contact-option",children:[(0,s.jsx)("input",{type:"checkbox",name:"interest",value:e,className:"contact-checkbox"}),e]},e))}),(0,s.jsxs)("div",{className:"contact-form-card__message-head",children:[(0,s.jsx)("label",{className:"readiness-form__label",htmlFor:"cf-message",children:"Message"}),(0,s.jsxs)("span",{className:"contact-form-card__count","aria-live":"polite",children:[500-m," characters left"]})]}),(0,s.jsx)("textarea",{id:"cf-message",name:"message",rows:5,maxLength:500,placeholder:"Tell us what you are working on",className:"".concat(g("message")," 
1contact-form-card__textarea"),onInput:e=>{p("message"),c(e.currentTarget.value.length)}}),e.message&&(0,s.jsx)("p",{className:"readiness-form__field-error",children:e.message}),(0,s.jsx)("input",{className:"readiness-form__hp",type:"text",name:"website",tabIndex:-1,autoComplete:"off","aria-hidden":"true"}),o&&(0,s.jsx)("div",{ref:h,className:"mb-20"}),(0,s.jsx)("button",{type:"submit",className:"cta-main readiness-form__submit",disabled:"sending"===n,children:"sending"===n?"Sending…":"Send Message"}),"failed"===n&&(0,s.jsxs)("p",{className:"readiness-form__field-error readiness-form__field-error--status",children:["Something went wrong sending your message."," ",(0,s.jsx)("a",{href:d,children:"Email it to [email protected] instead"}),", your message is already filled in."]})]})}},3355:(e,a,n)=>{Promise.resolve().then(n.bind(n,2530)),Promise.resolve().then(n.bind(n,199)),Promise.resolve().then(n.bind(n,1512)),Promise.resolve().then(n.bind(n,2333)),Promise.resolve().then(n.bind(n,728)),Promise.resolve().then(n.bind(n,8936)),Promise.resolve().then(n.t.bind(n,2619,23)),Promise.resolve().then(n.t.bind(n,1356,23))}},e=>{e.O(0,[619,394,210,441,255,358],()=>e(e.s=3355)),_N_E=e.O()}]);

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.