PageSourceSearch

https://www.sarstedt.com/_next/static/chunks/pages/[country]/user/password-change-68328a43295435e6.js

js sarstedt.com collected 2026-10-03 21:33:25 UTC 4,106 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[571],{18702:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[country]/user/password-change",function(){return r(97406)}])},97406:(e,s,r)=>{"use strict";r.r(s),r.d(s,{__N_SSP:()=>N,default:()=>k});var n=r(37876),l=r(40575),a=r(5076),t=r(30647),o=r(51960),i=r(36535),d=r(25407),c=r(78384),h=r(14169),u=r(77328),x=r.n(u),p=r(48230),m=r.n(p),f=r(89099),j=r(14232),g=r(52913),w=r(43073),C=r(53071),b=r.n(C),S=r(14430),y=r(95068),$=r(99370),_=r(26114),L=r(47497),T=r(83070),N=!0;function k({mail:e,code:s}){let{t:r}=(0,g.A)(),{t:u}=(0,g.A)("seo"),{personalDataDisabled:p}=(0,_.e)(),[C,N]=(0,j.useState)(!1),k=(0,f.useRouter)(),{language:v,country:F}=(0,S.JK)(k),[P,E]=(0,j.useState)(e),[O,A]=(0,j.useState)(""),[D,R]=(0,j.useState)(""),[q,H]=(0,j.useState)(null),[B,{toggle:J,close:M}]=(0,w.j)(!1),[U,W]=(0,j.useState)(null),X={seo:{title:u("passwordChangeTitle"),description:u("passwordChangeDescription"),canonicalUrl:`${(0,y.$_)()}/${v}/${(0,S.$9)(F)}/user/password-change`,robots:{noFollow:!0,noIndex:!0}}},z=(0,y.cp)(X);if((0,j.useEffect)(()=>{p&&k.replace(`/${v}/${(0,S.$9)(F)}`)},[p,k,v,F]),p)return null;let I=async n=>{if(N(!0),n.preventDefault(),!(e.trim().length>0)){H(r("forms:passwordChangeFailText")),N(!1);return}let l=(0,L.H9)(O,r);if(l){H(l),N(!1);return}if(O!==D){H(r("forms:errorPasswordDontMatch")),N(!1);return}try{let n=await fetch("/api/password-change",{method:"POST",body:JSON.stringify({mail:e,code:s,newPassword:O}),headers:{"Content-Type":"application/json"}});if(n.ok)J(),W(!0);else{let e=await n.json().catch(()=>null),s=e?.errorCode?T.b[e.errorCode]:null,l=s?r(s):r("forms:passwordChangeFailText");H(l),W(!1),J();return}}catch{H(r("forms:passwordChangeFailText")),W(!1),J()}finally{N(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x(),{children:(0,n.jsx)(n.Fragment,{children:z})}),(0,n.jsx)("div",{className:b().main,children:(0,n.jsx)(l.x,{justify:"center",style:{marginTop:"2rem"},children:(0,n.jsx)(l.x.Col,{md:6,lg:5,children:(0,n.jsx)(a.t,{p:"md",shadow:"xs",withBorder:!1,style:{boxShadow:"none"},children:(0,n.jsxs)("form",{onSubmit:I,children:[q&&(0,n.jsx)(l.x,{children:(0,n.jsx)(l.x.Col,{span:12,children:(0,n.jsx)(t.E,{color:"red",children:q})})}),(0,n.jsx)(l.x,{children:(0,n.jsx)(l.x.Col,{span:12,children:(0,n.jsx)(o.k,{required:!0,type:"text",label:r("forms:userNameLabel"),placeholder:r("forms:userNamePlaceholder"),value:P,maxLength:$.n.FULL_NAME,onChange:e=>E(e.currentTarget.value)})})}),(0,n.jsx)(l.x,{children:(0,n.jsx)(l.x.Col,{span:12,children:(0,n.jsx)(i.y,{required:!0,label:r("forms:passwordLabel"),placeholder:r("forms:passwordPlaceholder"),value:O,maxLength:$.n.PASSWORD,onChange:e=>A(e.currentTarget.value)})})}),(0,n.jsx)(l.x,{children:(0,n.jsx)(l.x.Col,{span:12,children:(0,n.jsx)(i.y,{required:!0,label:r("forms:passwordRepeatLabel"),placeholder:r("forms:passwordRepeatPlaceholder"),value:D,maxLength:$.n.PASSWORD,onChange:e=>R(e.currentTarget.value)})})}),(0,n.jsxs)("div",{className:"flex mt-4 items-center gap-4",children:[(0,n.jsx)(d.$,{type:"submit",disabled:C,children:r("forms:passwordSendLabel")}),(0,n.jsx)(m(),{href:`/${v}/${(0,S.$9)(F)}/user/register`,className:"ml-auto",children:r("forms:registerLinkLabel")})]})]})})})})}),(0,n.jsx)(c.a,{opened:B,size:"lg",radius:"0",centered:!0,title:(0,n.jsx)("div",{style:{color:"black"},children:U?(0,n.jsx)("h3",{style:{marginBottom:"1rem"},children:r("forms:passwordChangeSuccessHeadline")}):(0,n.jsx)("h3",{children:r("forms:passwordChangeFailHeadline")})}),onClose:M,children:U?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:r("forms:passwordChangeSuccessText")}),(0,n.jsx)(h.s,{justify:"flex-end",children:(0,n.jsx)(d.$,{onClick:()=>{N(!0),k.push(`/${v}/${(0,S.$9)(F)}/customer/dashboard`),M()},children:r("forms:linkLoginLabel")})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:r("forms:passwordChangeFailText")}),(0,n.jsx)(h.s,{justify:"flex-end",children:(0,n.jsx)(d.$,{onClick:M,children:r("forms:buttonCloseLabel")})})]})})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=18702)),_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.