1import{j as m,a as r,C as u,D as c,E as o,a4 as p,ac as v,u as l,L as f,ad as y,Q as h,F as _}from"./swiper-vue.Dbyefhbw.js";const g=o("button",{type:"submit",class:"absolute bottom-1 right-1 top-1 block border border-black/20 rounded-md bg-black/5 px-2 text-black text-opacity-50 hover:text-opacity-100"}," Subscribe ",-1),x={class:"min-h-6"},k={key:0},B=m({__name:"Subscribe",setup(S){const s=r(""),a=r("idle"),t=r("");async function b(){const n=await $fetch("/api/subscribe",{method:"post",body:{email:s.value}}),e=JSON.parse(n);e&&(e==null?void 0:e.status)==="SUBSCRIBED"?(a.value="success",t.value="Thank you for subscribing!",s.value=""):e.message&&e.message.includes("already subscribed")?(a.value="error",t.value="You are already subscribed.",setTimeout(()=>{i()},3e3)):(a.value="error",t.value="Something went wrong. Please try again.",setTimeout(()=>{i()},3e3))}function i(){a.value="idle",t.value="",s.value=""}return(n,e)=>(u(),c("section",null,[o("form",{class:"relative mb-2 text-xs",onSubmit:y(b,["prevent"])},[p(o("input",{"onUpdate:modelValue":e[0]||(e[0]=d=>f(s)?s.value=d:null),type:"email",class:"w-full border-1 border-black bg-transparent px-2 py-2 pr-20 placeholder:text-black/50",placeholder:"Enter your email"},null,512),[[v,l(s)]]),g],32),o("div",x,[l(t)?(u(),c("span",k,h(l(t)),1)):_("",!0)])]))}});export{B as _};
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.