PageSourceSearch

https://trains.fyi/_next/static/chunks/pages/login/forgot-password-3ba9408d598f6f0f.js

js trains.fyi collected 2026-09-24 09:54:54 UTC 3,388 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7923],{20926:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login/forgot-password",function(){return r(37104)}])},37104:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var s=r(37876),l=r(48230),i=r.n(l),a=r(89099),n=r(14232),o=r(85392),d=r(74),u=r(93408),c=r(25620);function m(){let{returnUrl:e}=(0,a.useRouter)().query,{resetPassword:t}=(0,c.A)(),[r,l]=(0,n.useState)(""),[m,f]=(0,n.useState)(!1),[h,x]=(0,n.useState)(""),[b,w]=(0,n.useState)(!1),g=e?`/login/email?returnUrl=${encodeURIComponent(e)}`:"/login/email",p=async e=>{if(e.preventDefault(),x(""),!r.trim())return void x("Please enter your email address");f(!0);try{await t(r.trim()),w(!0)}catch(e){e?.code==="auth/invalid-email"?x("Please enter a valid email address"):w(!0)}finally{f(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col min-h-screen bg-gradient-to-br from-blue-800 via-blue-700 to-indigo-800",children:[(0,s.jsx)(u.A,{title:"Reset your password – trains.fyi",description:"Reset your trains.fyi password",canonical:"/login/forgot-password/"}),(0,s.jsx)(d.A,{}),(0,s.jsx)("main",{className:"flex-grow flex items-center justify-center px-4 py-12",children:(0,s.jsxs)("div",{className:"w-full max-w-sm",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-2",children:"Reset your password"}),(0,s.jsx)("p",{className:"text-blue-100 text-sm mb-6",children:(0,s.jsx)(i(),{href:g,className:"text-white font-medium hover:underline",children:"Back to sign in"})}),b?(0,s.jsx)("div",{className:"p-4 rounded-lg bg-white/10 text-white text-sm border border-white/20",children:"If an account exists for that email, we've sent a link to reset your password. Check your inbox."}):(0,s.jsxs)(s.Fragment,{children:[h&&(0,s.jsx)("div",{className:"mb-4 p-3 rounded-lg bg-red-500/20 text-red-100 text-sm border border-red-400/30",role:"alert",children:h}),(0,s.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"reset-email",className:"block text-sm font-medium text-white mb-1",children:"Email"}),(0,s.jsx)("input",{id:"reset-email",type:"email",autoComplete:"email",value:r,onChange:e=>l(e.target.value),className:"w-full px-3 py-2 border border-blue-500/50 rounded-lg bg-white/10 text-white placeholder-blue-200 focus:ring-2 focus:ring-white/30 focus:border-white/50",placeholder:"[email protected]"})]}),(0,s.jsx)("button",{type:"submit",disabled:m,className:"w-full flex justify-center py-2.5 px-4 rounded-lg text-sm font-medium text-blue-800 bg-white hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-blue-800 focus:ring-white disabled:opacity-50 disabled:cursor-not-allowed",children:m?"Sending…":"Send reset link"})]})]})]})}),(0,s.jsx)(o.A,{})]})}},77808:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var s=r(14232);let l=s.forwardRef(function({title:e,titleId:t,...r},l){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},r),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))})}},e=>{e.O(0,[6701,3927,2325,3990,8447,5392,636,6593,8792],()=>e(e.s=20926)),_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.