1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[380],{88912:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password/[...reset]",function(){return r(24465)}])},24465:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return h},default:function(){return x}});var t=r(85893),a=r(67294),o=r(36489),n=r(276),d=r(8930),i=r(56481),c=r(44243),u=r.n(c),l=r(93967),w=r.n(l),f=r(38405),m=r(11163),_=e=>{let{customerId:s,token:r}=e,[o,c]=(0,a.useState)(""),[l,_]=(0,a.useState)(""),[p,h]=(0,a.useState)(!1),[x,P]=(0,a.useState)(""),[y,j]=(0,a.useState)(!1),[b,N]=(0,a.useState)(!1),[g,E]=(0,a.useState)({confirmPassword:!1,password:!1}),[S,C]=(0,a.useState)({password:"",confirmPassword:""}),R=(0,m.useRouter)(),k=(0,f.Z)(),v=async e=>{if(e.preventDefault(),y||b||(j(!0),Z(),o&&l&&o===l))try{h(!0),P(""),await k({id:btoa("gid://shopify/Customer/".concat(s)),input:{resetToken:r,password:o}}),h(!1),R.push("/")}catch(s){let{errors:e}=s;P(e[0].message),h(!1)}},Z=(0,a.useCallback)(()=>{y?(o&&l&&o===l?(P(""),N(!1)):(P("Passwords do not match"),N(!0)),C({password:o?"":"Password is required",confirmPassword:o&&l&&o===l?"":"Passwords do not match"})):C({password:g.password&&!o?"Password is required":"",confirmPassword:g.confirmPassword&&(!l||o!==l)?"Passwords do not match":""})},[o,l,y,g]);return(0,t.jsxs)("div",{className:w()(u()["form-container"]),children:[(0,t.jsx)("h2",{className:w()(u()["form-container_headertext"]),children:"Reset account password"}),(0,t.jsx)("p",{"data-cy":"form-subtext",className:w()(u()["form-container_subtext"]),children:"Enter a new password"}),(0,t.jsx)("form",{onSubmit:v,className:"w-full flex flex-col justify-between py-3",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[x&&(0,t.jsx)(n.Z,{message:x}),(0,t.jsx)(d.Z,{label:"Password *",onChange:c,onBlur:()=>E({...g,password:!0}),type:"password",isError:!!g.password&&(!o||!!l&&o!==l),errorMessage:S.password}),(0,t.jsx)(d.Z,{label:"Confirm password *",onChange:_,onBlur:()=>E({...g,confirmPassword:!0}),type:"password",errorMessage:S.confirmPassword}),(0,t.jsx)("div",{className:" w-full flex flex-col",children:(0,t.jsx)(i.Z,{variant:"primary",type:"submit",loading:p||!s||!r,disabled:b||!s||!r,children:"Reset Password"})})]})})]})},p=e=>{if("undefined"!=typeof document){let e=document.getElementsByClassName(u().password_container);e.length&&e[0]&&e[0].parentElement&&(e[0].parentElement.style.minHeight="auto")}return(0,t.jsx)("div",{className:w()(u().password_container),children:(0,t.jsx)(_,{...e})})},h=!0;function x(e){let{}=e,s=(0,m.useRouter)(),[r,o]=(0,a.useMemo)(()=>{let[e,r]=s.query.reset||[];return[e,r]},[s.query.reset]);return(0,t.jsx)(p,{customerId:r,token:o})}x.Layout=o.Z},44243:function(e){e.exports={password_container:"ResetPassword_password_container__qRGd2","form-container":"ResetPassword_form-container__0_Elg","form-container_headertext":"ResetPassword_form-container_headertext__hC7jQ","form-container_subtext":"ResetPassword_form-container_subtext__B3GJH"}}},function(e){e.O(0,[714,822,489,888,774,179],function(){return e(e.s=88912)}),_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.