PageSourceSearch

https://www.smartcms.ai/_next/static/chunks/app/%5Blocale%5D/(auth)/forgot-password/page-4b8ab4e891107a37.js

js smartcms.ai collected 2026-10-05 15:00:34 UTC 5,531 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4483],{49471:(e,t,a)=>{Promise.resolve().then(a.bind(a,79194))},79194:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>s});var n=a(95155),r=a(12115),i=a(98698);function s(){let[e,t]=(0,r.useState)(""),[a,s]=(0,r.useState)("idle"),[l,o]=(0,r.useState)(null);async function u(t){t.preventDefault(),o(null),s("submitting");try{let t=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})});if(!t.ok){let e=await t.json().catch(()=>({}));(null==e?void 0:e.error)==="invalid_email"?o("Enter a valid email address."):o("Something went wrong. Try again in a moment."),s("idle");return}s("submitted")}catch(e){o("Network error. Try again."),s("idle")}}return"submitted"===a?(0,n.jsxs)("div",{children:[(0,n.jsx)(i.AuthHeader,{title:"Check your inbox",description:"If that email is registered, you'll receive a password reset link within a minute. The link is valid for 1 hour."}),(0,n.jsx)(i.Aside,{children:(0,n.jsx)(i.InlineLink,{href:"/login",children:"← Back to sign in"})})]}):(0,n.jsxs)("form",{onSubmit:u,noValidate:!0,children:[(0,n.jsx)(i.AuthHeader,{title:"Forgot your password?",description:"Enter your email and we'll send you a one-time link to choose a new password."}),l?(0,n.jsx)(i.Banner,{tone:"error",children:l}):null,(0,n.jsx)("div",{style:{animation:"auth-rise 0.55s ease-out 0.08s both"},children:(0,n.jsx)(i.A_,{label:"Email",type:"email",name:"email",autoComplete:"email",required:!0,value:e,onChange:e=>t(e.target.value),placeholder:"[email protected]"})}),(0,n.jsx)(i.b7,{pending:"submitting"===a,children:"Send reset link"}),(0,n.jsxs)(i.Aside,{children:[(0,n.jsx)(i.InlineLink,{href:"/login",children:"← Back to sign in"}),(0,n.jsx)(i.InlineLink,{href:"/signup",children:"Create account →"})]})]})}},98698:(e,t,a)=>{"use strict";a.d(t,{A_:()=>s,Aside:()=>u,AuthHeader:()=>i,Banner:()=>c,FS:()=>o,InlineLink:()=>d,b7:()=>l});var n=a(95155),r=a(12115);function i(e){let{title:t,description:a}=e;return(0,n.jsxs)("header",{className:"mb-8",style:{animation:"auth-rise 0.55s ease-out both"},children:[(0,n.jsx)("h1",{className:"font-[family-name:var(--font-auth-sans)] text-[clamp(1.75rem,3vw,2.25rem)] font-semibold leading-[1.1] tracking-[-0.02em] text-[var(--auth-fg)]",children:t}),a?(0,n.jsx)("p",{className:"mt-3 max-w-[42ch] text-[14px] leading-[1.55] text-[var(--auth-muted)]",children:a}):null]})}function s(e){let{label:t,hint:a,error:i,...s}=e,l=(0,r.useId)(),[o,u]=(0,r.useState)(!1),c=!!i;return(0,n.jsxs)("div",{className:"group",children:[(0,n.jsxs)("div",{className:"mb-1.5 flex items-baseline justify-between",children:[(0,n.jsx)("label",{htmlFor:l,className:"text-[13px] font-medium text-[var(--auth-fg)]",children:t}),a?(0,n.jsx)("span",{className:"text-[12px] text-[var(--auth-muted)]",children:a}):null]}),(0,n.jsx)("div",{className:"rounded-md border bg-[var(--auth-surface)] transition-colors",style:{borderColor:c?"var(--auth-danger)":o?"var(--auth-accent)":"var(--auth-line)",boxShadow:o?"0 0 0 3px var(--auth-accent-soft)":"none"},children:(0,n.jsx)("input",{...s,id:l,onFocus:e=>{var t;u(!0),null==(t=s.onFocus)||t.call(s,e)},onBlur:e=>{var t;u(!1),null==(t=s.onBlur)||t.call(s,e)},className:"block w-full bg-transparent px-3.5 py-2.5 text-[14px] leading-6 text-[var(--auth-fg)] placeholder:text-[var(--auth-muted)]/60 focus:outline-none"})}),c?(0,n.jsx)("span",{className:"mt-1.5 block text-[12px] leading-relaxed text-[var(--auth-danger)]",children:i}):null]})}function l(e){let{children:t,pending:a,...r}=e;return(0,n.jsxs)("button",{type:"submit",...r,disabled:a||r.disabled,className:"mt-6 flex w-full items-center justify-center gap-2 rounded-md bg-[var(--auth-accent)] px-5 py-2.5 text-[14px] font-medium text-[var(--auth-accent-fg)] transition-opacity duration-150 hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--auth-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--auth-bg)] disabled:cursor-not-allowed disabled:opacity-60",children:[a?(0,n.jsx)("span",{"aria-hidden":!0,
1className:"inline-block h-1.5 w-1.5 animate-[auth-blink_0.8s_ease-in-out_infinite] rounded-full bg-[var(--auth-accent-fg)]"}):null,(0,n.jsx)("span",{children:a?"Signing in…":t})]})}function o(e){let{children:t,...a}=e;return(0,n.jsx)("a",{...a,className:"mt-6 flex w-full items-center justify-center rounded-md bg-[var(--auth-accent)] px-5 py-2.5 text-[14px] font-medium text-[var(--auth-accent-fg)] transition-opacity duration-150 hover:opacity-90",children:t})}function u(e){let{children:t}=e;return(0,n.jsx)("div",{className:"mt-6 flex items-center justify-between gap-4 text-[13px] text-[var(--auth-muted)]",style:{animation:"auth-rise 0.55s ease-out 0.15s both"},children:t})}function c(e){let{tone:t,children:a}=e,r={info:{fg:"var(--auth-fg)",border:"var(--auth-accent)",bg:"var(--auth-accent-soft)"},error:{fg:"var(--auth-danger)",border:"var(--auth-danger)",bg:"var(--auth-danger-soft)"},success:{fg:"var(--auth-success)",border:"var(--auth-success)",bg:"var(--auth-success-soft)"}}[t];return(0,n.jsx)("div",{role:"error"===t?"alert":"status",className:"mb-5 rounded-md border-l-2 px-3.5 py-2.5 text-[13px] leading-[1.5]",style:{borderColor:r.border,background:r.bg,color:r.fg},children:a})}function d(e){let{children:t,...a}=e;return(0,n.jsx)("a",{...a,className:"text-[var(--auth-accent)] underline-offset-[4px] hover:underline",children:t})}}},e=>{e.O(0,[8441,4696,7358],()=>e(e.s=49471)),_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.