1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[673],{4673:function(e,t,r){r.r(t),r.d(t,{default:function(){return O}});var n=r(3890),a=r(8496),s=r(6788),i=r(5472),o=r(5081),l=r(5570),d=r(3704),c=r(8329),u=r(1343),m=r(1597),f=r(9083),p=r(7336),h=r(6071);let v=(0,r(8898).j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),x=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(h.f,{ref:t,className:(0,m.cn)(v(),r),...a})});x.displayName=h.f.displayName;let g=d.RV,y=a.createContext({}),b=e=>{let{...t}=e;return(0,n.jsx)(y.Provider,{value:{name:t.name},children:(0,n.jsx)(d.Qr,{...t})})},j=()=>{let e=a.useContext(y),t=a.useContext(w),{getFieldState:r,formState:n}=(0,d.Gc)(),s=r(e.name,n);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...s}},w=a.createContext({}),k=a.forwardRef((e,t)=>{let{className:r,...s}=e,i=a.useId();return(0,n.jsx)(w.Provider,{value:{id:i},children:(0,n.jsx)("div",{ref:t,className:(0,m.cn)("space-y-2",r),...s})})});k.displayName="FormItem",a.forwardRef((e,t)=>{let{className:r,...a}=e,{error:s,formItemId:i}=j();return(0,n.jsx)(x,{ref:t,className:(0,m.cn)(s&&"text-destructive",r),htmlFor:i,...a})}).displayName="FormLabel";let N=a.forwardRef((e,t)=>{let{...r}=e,{error:a,formItemId:s,formDescriptionId:i,formMessageId:o}=j();return(0,n.jsx)(p.g7,{ref:t,id:s,"aria-describedby":a?"".concat(i," ").concat(o):"".concat(i),"aria-invalid":!!a,...r})});N.displayName="FormControl",a.forwardRef((e,t)=>{let{className:r,...a}=e,{formDescriptionId:s}=j();return(0,n.jsx)("p",{ref:t,id:s,className:(0,m.cn)("text-sm text-muted-foreground",r),...a})}).displayName="FormDescription";let T=a.forwardRef((e,t)=>{let{className:r,children:a,...s}=e,{error:i,formMessageId:o}=j(),l=i?String(null==i?void 0:i.message):a;return l?(0,n.jsx)("p",{ref:t,id:o,className:(0,m.cn)("text-sm font-medium text-destructive",r),...s,children:l}):null});T.displayName="FormMessage";let S=a.forwardRef((e,t)=>{let{className:r,type:a,...s}=e;return(0,n.jsx)("input",{type:a,className:(0,m.cn)("flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm r
1ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...s})});S.displayName="Input";var A=r(3479);let I=c.Ry({email:c.Z_().email()});var O=e=>{let{title:t,description:r,buttonText:a,className:c,...p}=e,{toast:h}=(0,A.pm)(),v=(0,d.cI)({resolver:(0,i.F)(I),defaultValues:{email:""}}),x=async e=>{let t=await fetch("/newsletter",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e.email})});return(null==t?void 0:t.ok)?h({title:"\uD83C\uDF89 Nice!",description:"You'll get the emails now."}):h({title:"Something went wrong.",description:"The subscription did not happen. Please try again.",variant:"destructive"})};return(0,n.jsxs)("section",{className:(0,m.cn)("relative isolate my-24 overflow-hidden bg-primary py-6 text-primary-foreground",c),...p,children:[(0,n.jsxs)("div",{className:"p-8 md:p-12",children:[(0,n.jsxs)("div",{className:"mx-auto max-w-lg text-center",children:[(0,n.jsx)("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:t}),(0,n.jsx)("p",{className:"hidden text-muted-foreground sm:mt-4 sm:block",children:r})]}),(0,n.jsxs)("div",{className:"mx-auto mt-8 max-w-xl",children:[(0,n.jsx)(g,{...v,children:(0,n.jsxs)("form",{onSubmit:v.handleSubmit(x),className:"flex w-full flex-col gap-3 md:flex-row",children:[(0,n.jsx)(b,{control:v.control,name:"email",render:e=>{let{field:t}=e;return(0,n.jsxs)(k,{className:"flex-auto",children:[(0,n.jsx)(N,{children:(0,n.jsx)(S,{type:"email",placeholder:"[email protected]",...t})}),(0,n.jsx)(T,{})]})}}),(0,n.jsxs)(f.z,{type:"submit",variant:"secondary",children:[(0,n.jsx)(o.Z,{className:"mr-2 h-4 w-4"})," ",a]})]})}),u.ZP.newsletterUrl&&(0,n.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,n.jsx)(f.z,{asChild:!0,variant:"ghost",children:(0,n.jsxs)(s.default,{href:u.ZP.newsletterUrl,target:"_blank",children:["Let me read it first ",(0,n.jsx)(l.Z,{className:"mr-2 h-4 w-4"})]})})})]})]}),(0,n.jsxs)("svg",{viewBox:"0 0 1024 1024",className:"absolute left-1/2 top-1/2 -z-10 h-[64rem] w-[64rem] -translate-x-1/2","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:512,cy:512,r:512,fill:"url(#gradient)",fillOpacity:"0.7"}),(0,n.jsx)("defs",{children:(0,n.jsxs)("radialGradient",{id:"gradient",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(512 512) rotate(90) scale(512)",children:[(0,n.jsx)("stop",{stopColor:"#7775D6"}),(0,n.jsx)("stop",{offset:1,stopColor:"#E935C1",stopOpacity:0})]})})]})]})}},9083:function(e,t,r){r.d(t,{z:function(){return d}});var n=r(3890),a=r(8496),s=r(7336),i=r(8898),o=r(1597);let l=(0,i.j)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"underline-offset-4 hover:underline text-primary"},size:{default:"h-10 py-2 px-4",sm:"h-9 px-3 rounded-md",lg:"h-11 px-8 rounded-md",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=a.forwardRef((e,t)=>{let{className:r,variant:a,size:i,asChild:d=!1,...c}=e,u=d?s.g7:"button";return(0,n.jsx)(u,{className:(0,o.cn)(l({variant:a,size:i,className:r})),ref:t,...c})});d.displayName="Button"},3479:function(e,t,r){r.d(t,{pm:function(){return m}});var n=r(8496);let a=0,s=new Map,i=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);s.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;
1return r?i(r):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],d={toasts:[]};function c(e){d=o(d,e),l.forEach(e=>{e(d)})}function u(e){let{...t}=e,r=(a=(a+1)%Number.MAX_VALUE).toString(),n=()=>c({type:"DISMISS_TOAST",toastId:r});return c({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||n()}}}),{id:r,dismiss:n,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function m(){let[e,t]=n.useState(d);return n.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},1343:function(e,t,r){r.d(t,{ZP:function(){return i},r4:function(){return n}}),r(2555).env.VERCEL_URL;let n={name:"Amy Shields",handle:"@amyshieldsfake",socialProfiles:[{name:"github",link:"https://github.com/thedevdavid"},{name:"instagram",link:"https://instagram.com/thedevdavid"},{name:"linkedin",link:"https://linkedin.com/in/thedevdavid"},{name:"mastodon",link:"https://mastodon.social/@thedevdavid"},{name:"threads",link:"https://threads.net/@thedevdavid"},{name:"tiktok",link:"https://tiktok.com/@thedevdavid"},{name:"x",link:"https://twitter.com/thedevdavid"},{name:"youtube",link:"https://youtube.com/@thedevdavid"}],email:"[email protected]",website:"https://nextjs.org",jobTitle:"Frontend Engineer & UI Designer",company:"Unicorns & Co.",availableForWork:!0,location:{city:"Los Angeles",media:"/losangeles.jpg"}},a="".concat(n.name,"'s Blog"),s="I'm ".concat(n.name,". Building hackinâ cool digital products around the world \uD83C\uDF34.");var i={title:{template:"%s | ".concat(a),default:a},description:s,siteRepo:"https://github.com/thedevdavid/digital-garden",newsletterProvider:"mailerlite",newsletterUrl:"https://developreneur.davidlevai.com",analyticsProvider:"umami",defaultTheme:"system",activeAnnouncement:!0,announcement:{buttonText:"Support on DevHunt â",link:"https://devhunt.org/tool/modern-developer-blog-template-digital-garden-starter"},postsPerPage:10,postsOnHomePage:8,projectsOnHomePage:4}},1597:function(e,t,r){r.d(t,{Ds:function(){return i},cn:function(){return s}});var n=r(2675),a=r(4380);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m6)((0,n.W)(t))}function i(e,t,r){let n;return function(){for(var a=arguments.length,s=Array(a),i=0;i<a;i++)s[i]=arguments[i];let o=this,l=r&&!n;clearTimeout(n),n=setTimeout(function(){n=null,r||e.apply(o,s)},t),l&&e.apply(o,s)}}r(1343)}}]);
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.