PageSourceSearch

https://app.surveyjunkie.com/assets/UpdatePassword-l49WFBPq.js

js surveyjunkie.com collected 2026-09-24 08:59:04 UTC 5,880 bytes, 2 lines download raw bytes

1import{q as p,y as f,B as A,P as G,D as S,T as L,j as C,R as e,ao as I,aq as D,ap as M,cl as v,p as J,r as n,I as Q,k as Y,cm as Z,aK as r,ch as ee,cn as te,az as se,ck as N,co as h,cp as H,cq as z}from"./index-D7zhMPes.js";import{H as ae}from"./Header-DNVLZ3f4.js";const re=p.div.withConfig({componentId:"sc-1kz0zxt-0"})(["max-width:414px;padding :40px 16px;margin :0 auto;@media ","{margin-top:",";}"],f.maxMobile,A),oe=p.p.withConfig({componentId:"sc-1kz0zxt-1"})([""," color:",";"],G.DEFAULT,S.color.text.secondary.value),ne=p.div.withConfig({componentId:"sc-1kz0zxt-2"})([""," margin-top:60px;@media ","{margin-top:40px;}"],L.FT_01,f.maxMobile);function ie({signInRedirect:t}){const{t:a}=C("updatePassword");return e.createElement(re,null,e.createElement(oe,null,a("UpdatePassword--error-message")),e.createElement(ne,null,e.createElement(I,{size:M.LARGE,width:D.FULL,onClick:t},a("UpdatePassword--error-buttonLabel"))))}const le=p.div.withConfig({componentId:"sc-14ic215-0"})(["max-width:414px;padding :40px 16px;margin :0 auto;@media ","{margin-top:",";}"],f.maxMobile,A),de=p.p.withConfig({componentId:"sc-14ic215-1"})([""," color:",";"],G.DEFAULT,S.color.text.secondary.value),W=p.div.withConfig({componentId:"sc-14ic215-2"})(["margin-top:16px;"]),ce=p.div.withConfig({componentId:"sc-14ic215-3"})([""," margin-top:60px;@media ","{margin-top:40px;}"],L.FT_01,f.maxMobile);function pe({passwordBlur:t,passwordCallback:a,confirmPasswordBlur:i,confirmPasswordCallback:R,isButtonDisabled:d,submitPasswordCallback:g,passwordFieldType:T,passwordHelperText:m,confirmPasswordFieldType:w,confirmPasswordHelperText:o,isLoading:P}){const{t:u}=C("updatePassword");return e.createElement(le,null,e.createElement(de,{tabIndex:0},u("UpdatePassword--submitPassword-message")),e.createElement(W,null,e.createElement(v,{blurCallback:t,changeCallback:a,fieldType:T,helperText:m,label:u("UpdatePassword--submitPassword-passwordLabel")})),e.createElement(W,null,e.createElement(v,{blurCallback:i,changeCallback:R,fieldType:w,helperText:o,label:u("UpdatePassword--submitPassword-confirmPasswordLabel")})),e.createElement(ce,null,e.createElement(I,{size:M.LARGE,width:D.FULL,disabled:d,onClick:g,interactable:!P,isLoading:P},u("UpdatePassword--submitPassword-buttonLabel"))))}const ue=p.div.withConfig({componentId:"sc-1i1rbxt-0"})(["max-width:414px;padding :40px 16px;margin :0 auto;@media ","{margin-top:",";}"],f.maxMobile,A),me=p.p.withConfig({componentId:"sc-1i1rbxt-1"})([""," display :flex;align-items:center;color :",";background :",";padding :16px 20px 16px 0;svg{height :44px;width :44px;margin-left:16px;}span{margin-left:16px;}"],J.DEFAULT,S.color.text.normal.value,S.color.background.info.light.value),fe=p.div.withConfig({componentId:"sc-1i1rbxt-2"})([""," margin-top:60px;@media ","{margin-top:40px;}"],L.FT_01,f.maxMobile);function Ee({signInRedirect:t}){const{t:a}=C("updatePassword");return n.useEffect(()=>{const i=setTimeout(()=>{t()},3e3);return()=>clearTimeout(i)},[t]),e.createElement(ue,null,e.createElement(me,null,e.createElement(Q,{iconId:Y.EMAIL_CHECK_OUTLINE}),e.createElement("span",null,a("UpdatePassword--success-message"))),e.createElement(fe,null,e.createElement(I,{size:M.LARGE,width:D.FULL,onClick:t},a("UpdatePassword--success-buttonLabel"))))}var l=function(t){return t[t.PASSWORD_SUBMIT=0]="PASSWORD_SUBMIT",t[t.SUCCESS=1]="SUCCESS",t[t.ERROR=2]="ERROR",t}(l||{});function Pe(){const{token:t}=Z(),{t:a}=C("updatePassword"),[i,R]=n.useState(""),[d,g]=n.useState(""),[T,m]=n.useState({fieldType:r.DEFAULT}),[w,o]=n.useState({fieldType:r.DEFAULT}),[P,u]=n.useState(!1),[y,U]=n.useState(!1),[O,b]=n.useState(l.PASSWORD_SUBMIT),[F,x]=n.useState(!1),[B,E]=n.useState(!1),[_,c]=n.useState(!1);n.useEffect(()=>{t||(b(l.ERROR),u(!0))},[t]),ee(()=>{F&&B&&_&&k()});const $=s=>{s.length>0?h(s)?(m({fieldType:r.DEFAULT}),x(!0),d&&s!==d?(o({fieldType:r.ERROR,helperText:a("UpdatePassword--submitPassword-passwordsDoNotMatch")}),c(!1)):d&&s===d&&(o({fieldType:r.DEFAULT}),c(!0))):(m({fieldType:r.ERROR,helperText:a("UpdatePassword--submitPassword-mustBeAtLeastXCharactersNoSpaces",{minimum:z,maximum:H})}),x(!1)):(m({fieldType:r.DEFAULT}),x(!1))},K=s=>{R(s),h(s)&&(m({fieldType:r.DEFAULT}),x(!0),d&&s!==d?(o({fieldType:r.ERROR,helperText:a("UpdatePassword--submitPassword-passwordsDoNotMatch")}),c(!1)):d&&s===d&&(o({fieldType:r.DEFAULT}),c(!0)))},q=s=>{s.length>0?h(s)?i&&s!==i?(o({fieldType:r.ERROR,helperText:a("UpdatePassword--submitPassword-passwordsDoNotMatch")}),E(!0),c(!1)):(o({fieldType:r.DEFAULT}),E(!0),c(!0)):(o({fieldType:r.ERROR,helperText:a("UpdatePassword--submitPassword-mustBeAtLeastXCharactersNoSp
1aces",{minimum:z,maximum:H})}),E(!1),c(!1)):(o({fieldType:r.DEFAULT}),E(!1),c(!1))},V=s=>{g(s),h(s)&&(E(!0),i&&s!==i?(o({fieldType:r.ERROR,helperText:a("UpdatePassword--submitPassword-passwordsDoNotMatch")}),c(!1)):i&&s===i&&(o({fieldType:r.DEFAULT}),c(!0)))},k=()=>{y||!t||(U(!0),u(!1),te(t,i).then(()=>{b(l.SUCCESS),U(!1),u(!1)}).catch(s=>{b(l.ERROR),u(!0),U(!1),se("updateUserPassword",s)}))},X=()=>{switch(O){case l.PASSWORD_SUBMIT:return a("UpdatePassword--submitPassword-headerTitle");case l.SUCCESS:return a("UpdatePassword--success-headerTitle");case l.ERROR:return a("UpdatePassword--error-headerTitle")}},j=()=>{switch(O){case l.PASSWORD_SUBMIT:return e.createElement(pe,{passwordBlur:$,passwordCallback:K,confirmPasswordBlur:q,confirmPasswordCallback:V,isButtonDisabled:!(F&&B&&_),submitPasswordCallback:k,passwordFieldType:T.fieldType,passwordHelperText:T.helperText,confirmPasswordFieldType:w.fieldType,confirmPasswordHelperText:w.helperText,isLoading:y});case l.SUCCESS:return e.createElement(Ee,{signInRedirect:N});case l.ERROR:return e.createElement(ie,{signInRedirect:N})}};return e.createElement("div",null,e.createElement(ae,{headerTitle:X(),isError:P}),j())}export{Pe as default};
2//# sourceMappingURL=UpdatePassword-l49WFBPq.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.