PageSourceSearch

https://auth.buffer.com/assets/ForgotPassword-B7A0TKUh.js

js buffer.com collected 2026-10-01 07:09:15 UTC 3,297 bytes, 1 lines download raw bytes

1import{O as e,k as t,r as n,t as r}from"./jsx-runtime-CL-DilWO.js";import{D as i}from"./LucideIcons-9IqVpk3v.js";import{i as a,n as o,r as s,t as c}from"./LegalFooter-CZUOGWXy.js";import{t as l}from"./Notice-hJmUoi3l.js";import{t as u}from"./Button-Dfnu3zd4.js";import{n as d,t as f}from"./AuthFormFields.module-KMmMqFAU.js";import{t as p}from"./Label-DuHNjnur.js";import{n as m,r as h}from"./pageTitle-DrP3IrGA.js";import{n as g,r as _,t as v}from"./PageLayout-CMwo5IdX.js";import{n as y,t as b}from"./loginDetails-C8bkks1J.js";import{c as x,o as S,s as C}from"./screenVariant-Cfga1VAC.js";import{n as w}from"./constants-C42EMpmP.js";import{t as T}from"./FormError-DQTM_6D-.js";var E={logo:`_logo_dhs0p_13`,"logo-entrance":`_logo-entrance_dhs0p_1`,logoSection:`_logoSection_dhs0p_23`,heading:`_heading_dhs0p_30`,description:`_description_dhs0p_34`,field:`_field_dhs0p_41`,backText:`_backText_dhs0p_48`},D=r(),O=m(`Reset Your Password`),k={invalid_email:`Please enter a valid email address.`,rate_limited:w};async function A({request:e}){let{variant:t}=await b(new URL(e.url).searchParams.get(`uid`)??void 0);return{variant:t}}function j({currentUrl:e,nextUrl:t}){return e.searchParams.get(`uid`)!==t.searchParams.get(`uid`)}var M=t(function({loaderData:t}){let r=t?.variant===`buffer-web`,[m]=e(),b=m.get(`uid`)??``,w=m.get(`status`),O=m.get(`error`),A=O?k[O]??`Something went wrong. Please try again.`:null,j=O===`invalid_email`?A:null,M=j?null:A,N=m.get(`email`)??``,P=S(`email`,...j?[`error`]:[]),F=b?`/login/${b}`:null,I=w===`sent`,L=(0,D.jsxs)(`div`,{className:E.logoSection,children:[(0,D.jsx)(h,{className:i(E.logo,r&&C.logoMark)}),(0,D.jsx)(a,{size:`lg`,as:`h1`,className:E.heading,children:I?`Check your email`:`Reset your password`})]}),R=F&&(0,D.jsx)(`p`,{className:E.backText,children:(0,D.jsx)(o,{as:n,to:F,children:`Back to log in`})}),z=I?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`p`,{className:E.description,children:`If an account exists for that address, we've sent a link to reset your password. The link is valid for a limited time.`}),R]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`p`,{className:E.description,children:`Enter your email and we'll send you a link to reset your password.`}),(0,D.jsxs)(`form`,{action:`/password-reset/forgot`,method:`post`,className:f.form,children:[b&&(0,D.jsx)(`input`,{type:`hidden`,name:`uid`,value:b}),(0,D.jsxs)(s,{direction:`column`,gap:`lg`,children:[M&&(0,D.jsx)(l,{variant:`error`,children:M}),(0,D.jsxs)(`div`,{className:E.field,children:[(0,D.jsx)(p,{htmlFor:`email`,children:`Email`}),(0,D.jsx)(d,{id:`email`,name:`email`,type:`email`,autoComplete:`username`,required:!0,size:`large`,className:f.input,placeholder:`Your email address`,defaultValue:N,"aria-invalid":!!j,"aria-describedby":j?`email-error`:void 0,onChange:P})]}),j&&(0,D.jsx)(T,{id:`email-error`,children:j}),(0,D.jsx)(u,{type:`submit`,size:`large`,className:i(f.submitButton,r&&C.submitButton),children:`Send reset link`}),R]})]})]});return r?(0,D.jsx)(x,{hero:(0,D.jsx)(y,{}),children:(0,D.jsxs)(`div`,{className:C.formBlock,children:[L,(0,D.jsx)(`div`,{className:C.body,children:z})]})}):(0,D.jsxs)(_,{children:[(0,D.jsxs)(g,{children:[L,(0,D.jsx)(v,{children:z})]}),(0,D.jsx)(c,{})]})});export{A as clientLoader,M as default,O as meta,j as shouldRevalidate};

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.