1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9226],{68692:function(e,r,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/password/confirm",function(){return a(18712)}])},62284:function(e,r,a){"use strict";var t=a(14924),n=a(26042),s=a(85893),o=a(67294),i=a(32427),c=a(43832),u=(0,i.Z)((function(e){return{root:(0,t.Z)({},e.breakpoints.down("xs"),{paddingRight:"8px",paddingLeft:"8px"})}})),l=o.forwardRef((function(e,r){var a=u();return(0,s.jsx)(c.Z,(0,n.Z)({ref:r,classes:a,fixed:!0,maxWidth:"sm"},e))}));r.Z=l},86263:function(e,r,a){"use strict";var t=a(14924),n=a(26042),s=a(85893),o=a(67294),i=a(32427),c=a(41749),u=(0,i.Z)((function(e){return{root:(0,t.Z)({width:"calc(100% + 16px)",margin:"-8px"},e.breakpoints.down("xs"),{width:"calc(100% + 8px)",margin:"-4px"})}})),l=o.forwardRef((function(e,r){var a=u();return(0,s.jsx)(c.Z,(0,n.Z)({ref:r,classes:a,container:!0,justifyContent:"center"},e))}));r.Z=l},73844:function(e,r,a){"use strict";var t=a(14924),n=a(26042),s=a(85893),o=a(67294),i=a(32427),c=a(41749),u=(0,i.Z)((function(e){return{root:(0,t.Z)({padding:"8px"},e.breakpoints.down("xs"),{padding:"4px"})}})),l=o.forwardRef((function(e,r){var a=u();return(0,s.jsx)(c.Z,(0,n.Z)({ref:r,classes:a,item:!0,xs:12},e))}));r.Z=l},18712:function(e,r,a){"use strict";a.r(r),a.d(r,{__N_SSP:function(){return C}});var t=a(47568),n=a(82670),s=a(828),o=a(20414),i=a(85893),c=a(67294),u=a(9008),l=a.n(u),d=a(11163),p=a(60253),h=a(36808),f=a.n(h),w=a(72091),g=a(282),m=a(18463),x=a(51907),Z=a(79912),v=a(39803),k=a(22318),b=a(49384),_=a(61164),y=a(92674),j=a(62284),A=a(86263),S=a(73844),C=!0;r.default=function(){var e=(0,d.useRouter)(),r=e.query,a="string"===typeof r.token?r.token:"",u=(0,p.$G)().t,h=(0,w.Ds)().enqueueSnackbar,C=(0,_.o)()[1],E=(0,y.Z)(),T=(0,s.Z)(c.useState(!1),2),N=T[0],R=T[1],U=(0,s.Z)(c.useState(""),2),P=U[0],D=U[1],J=(0,s.Z)(c.useState(""),2),L=J[0],q=J[1],F=(0,s.Z)(c.useState(!1),2),H=F[0],O=F[1],W=(0,s.Z)(c.useState(""),2),X=W[0],B=W[1],G=(0,s.Z)(c.useState(""),2),I=G[0],K=G[1],Y=(0,s.Z)(c.useState(!1),2),$=Y[0],z=Y[1],M=c.useCallback((function(e){return e?/^[a-zA-Z0-9!-/:-@\xa5[-`{-~]+$/.test(e)?e.length<8||e.length>50?u("password-must-be-8-50-characters-long"):"":u("only-alphanumeric-characters-are-allowed"):u("password-is-required")}),[u]),Q=c.useCallback((function(e){return e!==P?u("passwords-do-not-match"):""}),[P,u]),V=c.useCallback((function(){H||(O(!0),q(M(P)))}),[P,H,M]),ee=c.useCallback((function(e){D(e.target.value),q(M(e.target.value))}),[M]),re=c.useCallback((function(){$||(z(!0),K(Q(X)))}),[X,$,Q]),ae=c.useCallback((function(e){B(e.target.value),K(Q(e.target.value))}),[Q]),te=c.useCallback((0,t.Z)((function(){var r,t,s,i,c,l,d,p,w;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,3,,4]),t=window.Android.getRecaptcha(),null===(s=JSON.parse(t))||void 0===s?void 0:s.error)throw new Error(s.error);if(!(null===s||void 0===s||null===(r=s.data)||void 0===r?void 0:r.recaptcha))throw new Error("response.data.recaptcha is undefined");return(i=new FormData).append("token",a),i.append("password",P),i.append("recaptcha",s.data.recaptcha),[4,E("/android/auth-local",{method:"PUT",body:i})];case 1:if(null===(c=o.sent()))throw new Error("data is null");return l=c.token,d=c.id,p=c.unconfirmed,f().set("auth._token.local","bearer ".concat(l),{expires:365,secure:!0,sameSite:"lax"}),C({type:"SET_AUTH",payload:{ID:d,Unconfirmed:p}}),[4,e.replace("/home")];case 2:return o.sent(),h(u("your-password-has-been-changed"),{variant:"success"}),[3,4];case 3:if(w=o.sent(),!(0,n.Z)(w,Error))return(0,b.kg)(w),h(u("failed-to-change-password"),{variant:"error"}),R(!1),[2];if("automaticallyDetectedAsSuspiciousAccess"===w.message.trim())h(u("auto-detected-as-suspicious-access"),{variant:"error"});else(0,b.kg)(w),h(u("failed-to-change-password"),{variant:"error"});return R(!1),[3,4];case 4:return[2]}}
1))})),[C,h,E,P,e,u,a]),ne=c.useCallback((function(){R(!0),window.grecaptcha.ready((0,t.Z)((function(){var r,t,s,i,c,l,d;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),"6Le2wLkUAAAAAK88JHpF7hsPpX3n89oJ1RG2mYa0",[4,window.grecaptcha.execute("6Le2wLkUAAAAAK88JHpF7hsPpX3n89oJ1RG2mYa0",{action:"password_reset"})];case 1:return r=o.sent(),t=JSON.stringify({password:P,recaptcha:r}),[4,E("/password-token/".concat(a),{method:"PUT",body:t})];case 2:if(null===(s=o.sent()))throw new Error("data is null");return i=s.token,c=s.id,l=s.unconfirmed,f().set("auth._token.local","bearer ".concat(i),{expires:365,secure:!0,sameSite:"lax"}),C({type:"SET_AUTH",payload:{ID:c,Unconfirmed:l}}),[4,e.replace("/home")];case 3:return o.sent(),h(u("your-password-has-been-changed"),{variant:"success"}),[3,5];case 4:if(d=o.sent(),!(0,n.Z)(d,Error))return(0,b.kg)(d),h(u("failed-to-change-password"),{variant:"error"}),R(!1),[2];if("automaticallyDetectedAsSuspiciousAccess"===d.message.trim())h(u("auto-detected-as-suspicious-access"),{variant:"error"});else(0,b.kg)(d),h(u("failed-to-change-password"),{variant:"error"});return R(!1),[3,5];case 5:return[2]}}
1))})))}),[C,h,E,P,e,u,a]),se=c.useCallback((0,t.Z)((function(){var e,r;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return e=M(P),q(e),O(!0),r=Q(X),K(r),z(!0),e||r?[2]:"android"===f().get("web_view")?[3,1]:[3,3];case 1:return[4,te()];case 2:return a.sent(),[3,4];case 3:return ne(),[3,4];case 4:return[2]}}))})),[X,P,te,ne,Q,M]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l(),{children:(0,i.jsx)("title",{children:"Baskadia"})}),(0,i.jsx)(j.Z,{component:"main",maxWidth:"sm",style:{margin:"16px auto"},children:(0,i.jsx)(A.Z,{children:(0,i.jsx)(S.Z,{children:(0,i.jsxs)(m.Z,{children:[(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(k.Z,{component:"h2",variant:"h5",children:u("reset-password")}),(0,i.jsx)(v.Z,{name:"password",value:P,label:u("password"),helperText:H&&L,error:H&&!!L,autoComplete:"new-password",autoFocus:!0,disabled:N,fullWidth:!0,required:!0,type:"password",variant:"outlined",style:{marginTop:"24px"},onBlur:V,onChange:ee}),(0,i.jsx)(k.Z,{align:"right",color:P.length>50?"error":"inherit",display:"block",variant:"caption",children:"".concat(P.length," / 50")}),(0,i.jsx)(v.Z,{name:"confirm",value:X,label:u("confirm-password"),helperText:$&&I,error:$&&!!I,autoComplete:"new-password",disabled:N,fullWidth:!0,required:!0,type:"password",variant:"outlined",style:{marginTop:"6px"},onBlur:re,onChange:ae})]}),(0,i.jsx)(x.Z,{children:(0,i.jsx)(g.Z,{color:"primary",disabled:N,variant:"contained",style:{marginLeft:"auto"},onClick:se,children:u("reset")})})]})})})})]})}}},function(e){e.O(0,[3138,2387,4794,9803,1127,9774,2888,179],(function(){return r=68692,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
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.