1import{r as c,j as e,H as f,L as h,m as y,c as g,h as b,a as w,b as j}from"./index-Ds0BYqKp.js";const S="QYntxZ",v="TAHwD6";function N(){const[o,d]=c.useState(""),[l,p]=c.useState(""),[s,i]=c.useState("idle"),u=r=>{const t=r.replace(/\D/g,"").slice(0,10);return t.length<=3?t:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`},m=async r=>{if(r.preventDefault(),!!o){i("submitting");try{const t={email:o};if(l){const n=l.replace(/\D/g,"");n.length===10&&(t.phone_number=`+1${n}`)}const a=await fetch(`https://a.klaviyo.com/client/subscriptions/?company_id=${S}`,{method:"POST",headers:{"Content-Type":"application/json",revision:"2024-02-15"},body:JSON.stringify({data:{type:"subscription",attributes:{custom_source:"Griz Ticket Giveaway",profile:{data:{type:"profile",attributes:t}}},relationships:{list:{data:{type:"list",id:v}}}}})});if(a.ok||a.status===202)i("success"),d(""),p("");else{const n=await a.text();console.error("Giveaway form API error:",a.status,n),w(`Giveaway API error: ${a.status}`,{extra:{body:n}}),i("error")}}catch(t){console.error("Giveaway form error:",t),j(t),t instanceof TypeError?i("blocked"):i("error")}}},x={fontSize:"16px",backgroundColor:"white",color:"#333",border:"2px solid #ddd",borderRadius:"9999px",padding:"14px 20px",width:"100%",outline:"none"};return e.jsxs(e.Fragment,{children:[e.jsxs(f,{children:[e.jsx("title",{children:"Griz Ticket Giveaway | Richard Finger"}),e.jsx("meta",{name:"robots",content:"noindex"})]}),e.jsxs("div",{className:"giveaway-page flex items-center justify-center min-h-screen px-4",children:[e.jsx(h,{href:"/",className:"fixed top-4 left-4 z-50 font-bristol uppercase",style:{fontSize:"14px",textDecoration:"none",backgroundColor:"rgba(0,0,0,0.5)",color:"#fff",padding:"8px 16px",borderRadius:"9999px",border:"1px solid rgba(255,255,255,0.2)",backdropFilter:"blur(10px)"},children:"â Home"}),e.jsx(y.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"w-full max-w-lg",children:e.jsxs("div",{className:"signup-form-container w-full rounded-2xl flex flex-col items-center justify-center px-6 py-10 sm:px-10",style:g,children:[e.jsx("div",{className:"text-center mb-4",children:e.jsx("span",{className:"text-3xl sm:text-4xl font-bold text-white uppercase font-bristol",style:b,children:"Ticket Giveaway"})}),s==="success"?e.jsx("p",{className:"text-center font-bold text-lg",style:{color:"#f3f30e"},children:"You're entered! Good luck!"}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-white text-center mb-6 max-w-md",style:{fontSize:"1rem",lineHeight:1.6},children:"Enter your email for a chance to win a pair of tickets to this Saturday's Griz show at The Armory!"}),e.jsxs("form",{onSubmit:m,className:"w-full flex flex-col gap-3 items-center max-w-md",children:[e.jsx("input",{type:"email",required:!0,placeholder:"EMAIL ADDRESS",value:o,onChange:r=>d(r.target.value),style:x}),e.jsxs("div",{className:"w-full flex items-center",style:{...x,padding:"0",display:"flex",overflow:"hidden"},children:[e.jsx("span",{style:{padding:"14px 12px 14px 20px",color:"#333",fontSize:"16px",display:"flex",alignItems:"center",gap:"6px",flexShrink:0},children:e.jsx("span",{style:{fontSize:"20px"},children:"ðºð¸"})}),e.jsx("input",{type:"tel",placeholder:"PHONE NUMBER",value:l,onChange:r=>p(u(r.target.value)),style:{fontSize:"16px",color:"#333",background:"transparent",border:"none",outline:"none",padding:"14px 20px 14px 0",width:"100%"}})]}),e.jsx("button",{type:"submit",disabled:s==="submitting",className:"w-full font-bristol uppercase tracking-wide disabled:opacity-50",style:{backgroundColor:"#1a1a1a",color:"#fff",fontSize:"20px",padding:"14px 20px",borderRadius:"9999px",border:"none",cursor:"pointer",letterSpacing:"0.05em"},children:s==="submitting"?"...":"Enter"})]})]}),s==="blocked"&&e.jsx("p",{className:"text-red-400 text-sm mt-3 text-center",children:"Unable to connect. If you have an ad blocker, try disabling it and resubmitting."}),s==="error"&&e.jsx("p",{className:"text-red-400 text-sm mt-3 text-center",children:"Something went wrong. Please try again."}),e.jsx("p",{className:"text-white/60 text-center mt-4 max-w-md",style:{fontSize:"10px",lineHeight:1.4}
1,children:"By submitting this form, you consent to receive informational (e.g., order updates) and/or marketing texts (e.g., cart reminders) from Richard Finger LLC including texts sent by autodialer. Consent is not a condition of purchase. Msg & data rates may apply. Msg frequency varies. Unsubscribe at any time by replying STOP or clicking the unsubscribe link (where available). Privacy Policy & Terms."})]})})]})]})}export{N 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.