PageSourceSearch

https://app.idrivesafely.com/assets/index-CPNJdKJw.js

js idrivesafely.com collected 2026-10-02 03:35:53 UTC 2,489 bytes, 2 lines download raw bytes

1import{x as c,a2 as l,z as p,aI as y,L as m,cm as w,cs as h,R as f,M as b,S as g,D as E,G as n,H as R,T as x,U as T,a9 as _}from"./index-CL22zKs4.js";import{R as C}from"./recaptcha-BOvWsXtx.js";import{u as S}from"./useComponentLog-B5pYe_aL.js";import{r as I}from"./user-CBryul3m.js";import"./user-DuO0ExxU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9f3b2b26-e0c4-47a0-a59b-236bd1c9cd08",e._sentryDebugIdIdentifier="sentry-dbid-9f3b2b26-e0c4-47a0-a59b-236bd1c9cd08")}catch{}})();class u extends Error{title;buttonText;constructor({message:t,title:r,buttonText:a}){super(t?.trim()?t:"We could not send your reset email. Please try again."),this.name="PasswordResetError",this.title=r,this.buttonText=a}}const P={message:"Cannot find email address in user account info.",buttonText:"Continue"},d=["requestPasswordReset"],A=()=>{const e=c(),t=l(),r=p(s=>s.user.username),a=y({mutationKey:d,mutationFn:async s=>{if(!r)throw new u(P);const o=await I(r,s);if(!o?.isSuccess)throw new u(o??{});return o},networkMode:"always",onMutate:()=>{e({type:g})},onSuccess:()=>{e({type:b,payload:{modal:{title:"Success!",message:"Check your email for a link to reset your password. If it’s not in your inbox, try checking your spam or junk folders.",buttonText:"Continue",confirmDispatch:[{type:f,payload:{url:"dash.index"}}]}}})},onError:s=>{w(s)||e({type:h,payload:{error:s}})},onSettled:()=>{e({type:m})}});return{...a,mutate:s=>{t.isMutating({mutationKey:d})>0||a.mutate(s)}}},j=()=>{S("ChangePassword");const{mutate:e,isPending:t}=A(),[r,a]=E.useState(!1),i=new C("password_reset"),s=async()=>{a(!1);try{const o=await i.getToken();e(o)}catch(o){console.error(o),a(!0)}};return n.jsxs("div",{className:"grit screen change-password px-16 pt-10",children:[r&&n.jsx(R,{extraClassName:"mb-4",title:"Unable to Change Password",description:"An error occurred. Please try again.",variant:"error"}),n.jsx(x,{as:"h1",size:"xxlarge",children:"Change your password?"}),n.jsx(T,{className:"py-4 pb-[60px]",children:"Forgot your password or just want to change it? No problem. We'll send you an email to reset your password and enter a new one."}),n.jsx(_,{onClick:()=>{s()},disabled:t,children:"Email password reset link"})]})};export{j as default};
2//# sourceMappingURL=index-CPNJdKJw.js.map

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.