PageSourceSearch

https://bro-depot.com/_next/static/chunks/pages/auth/reset-password-999ad8bc03cf1e16.js

js bro-depot.com collected 2026-10-04 02:39:55 UTC 15,089 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3035],{49837:function(e,r,n){"use strict";n.d(r,{Z:function(){return x}});var t=n(87462),o=n(63366),s=n(67294),i=n(86010),a=n(94780),u=n(81719),c=n(78884),l=n(70918),d=n(34867);function f(e){return(0,d.Z)("MuiCard",e)}(0,n(1588).Z)("MuiCard",["root"]);var m=n(85893);const p=["className","raised"],h=(0,u.ZP)(l.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})((()=>({overflow:"hidden"})));var x=s.forwardRef((function(e,r){const n=(0,c.Z)({props:e,name:"MuiCard"}),{className:s,raised:u=!1}=n,l=(0,o.Z)(n,p),d=(0,t.Z)({},n,{raised:u}),x=(e=>{const{classes:r}=e;return(0,a.Z)({root:["root"]},f,r)})(d);return(0,m.jsx)(h,(0,t.Z)({className:(0,i.Z)(x.root,s),elevation:u?8:void 0,ref:r,ownerState:d},l))}))},91359:function(e,r,n){"use strict";n.d(r,{Z:function(){return h}});var t=n(87462),o=n(63366),s=n(67294),i=n(86010),a=n(94780),u=n(81719),c=n(78884),l=n(34867);function d(e){return(0,l.Z)("MuiCardContent",e)}(0,n(1588).Z)("MuiCardContent",["root"]);var f=n(85893);const m=["className","component"],p=(0,u.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}})));var h=s.forwardRef((function(e,r){const n=(0,c.Z)({props:e,name:"MuiCardContent"}),{className:s,component:u="div"}=n,l=(0,o.Z)(n,m),h=(0,t.Z)({},n,{component:u}),x=(e=>{const{classes:r}=e;return(0,a.Z)({root:["root"]},d,r)})(h);return(0,f.jsx)(p,(0,t.Z)({as:u,className:(0,i.Z)(x.root,s),ownerState:h,ref:r},l))}))},68346:function(e,r,n){"use strict";n.d(r,{Z:function(){return _}});var t=n(63366),o=n(87462),s=n(67294),i=n(86010),a=n(94780),u=n(36622),c=n(81719),l=n(78884),d=n(51625),f=n(84771),m=n(29630),p=n(34867);function h(e){return(0,p.Z)("MuiLink",e)}var x=(0,n(1588).Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),w=n(54844),Z=n(41796);const v={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var g=({theme:e,ownerState:r})=>{const n=(e=>v[e]||e)(r.color),t=(0,w.D)(e,`palette.${n}`,!1)||r.color,o=(0,w.D)(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,Z.Fq)(t,.4)},y=n(85893);const b=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],j=(0,c.ZP)(m.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,r[`underline${(0,u.Z)(n.underline)}`],"button"===n.component&&r.button]}})((({theme:e,ownerState:r})=>(0,o.Z)({},"none"===r.underline&&{textDecoration:"none"},"hover"===r.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===r.underline&&(0,o.Z)({textDecoration:"underline"},"inherit"!==r.color&&{textDecorationColor:g({theme:e,ownerState:r})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===r.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${x.focusVisible}`]:{outline:"auto"}})));var _=s.forwardRef((function(e,r){const n=(0,l.Z)({props:e,name:"MuiLink"}),{className:c,color:m="primary",component:p="a",onBlur:x,onFocus:w,TypographyClasses:Z,underline:g="always",variant:_="inherit",sx:P}=n,C=(0,t.Z)(n,b),{isFocusVisibleRef:N,onBlur:k,onFocus:q,ref:A}=(0,d.Z)(),[S,R]=s.useState(!1),D=(0,f.Z)(r,A),M=(0,o.Z)({},n,{color:m,component:p,focusVisible:S,underline:g,variant:_}),z=(e=>{const{classes:r,component:n,focusVisible:t,underline:o}=e,s={root:["root",`underline${(0,u.Z)(o)}`,"button"===n&&"button",t&&"focusVisible"]};return(0,a.Z)(s,h,r)})(M);return(0,y.jsx)(j,(0,o.Z)({color:m,className:(0,i.Z)(z.root,c),classes:Z,component:p,onBlur:e=>{k(e),!1===N.current&&R(!1),x&&x(e)},onFocus:e=>{q(e),!0===N.current&&R(!0),w&&w(e)},ref:D,ownerState:M,variant:_,sx:[...Object.keys(v).includes(m)?[]:[{color:m}],...Array.isArray(P)?P:[P]]},C))}))},53129:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/reset-password",function(){return n(20462)}])},50053:function(e,r,n){"use strict";n.d(r,{ZP:function(){return H},zb:function(){return $}});var t=n(47568),o=n(828),s=n(70655),i=n(85893),a=n(14924),u=n(81719),c=n(62097),l=n(61225),d=(0,u.ZP)("img")((function(e){var r=e.theme;return(0,a.Z)({zIndex:-1,bottom:"7%",width:"100%",position:"absolute"},r.breakpoints.down("lg"),{bottom:"10%"})})),f=function(e){var r=e.image,n=(0,c.Z)(),t=(0,l.Z)(n.breakpoints.down("md")),o=r||"/assets/images/pages/auth-v1-login-mask-".concat(n.palette.mode,".png");return t?null:(0,i.jsx)(d,{alt:"mask",src:o})},m=n(54459),p=n(87811),h=n(97174),x=n(13267),w=n(96277),Z=n(47533),v=n(43085),g=n(49837),y=n(91359),b=n(29630),j=n(55343),_=n(3695),P=n(39063),C=n(9041),N=n(80562),k=n(32631),q=n(54225),A=n(68346),S=n(96682),R=n(18377),D=n(41664),M=n.n(D),z=n(11163),B=n(67294),V=n(87536),O=n(74231),$=O.Z_().min(8,"Password must be at least 8 characters").required().matches(x.OF,"Password must not contain three or more consecutive characters").matches(x.kJ,"Password must contain one uppercase letter, lowercase letter, number, and special character"),W=O.Ry().shape({newPassword:$,confirmPassword:O.Z_().required().oneOf([O.iH("newPassword"),null],"Passwords must match")}),F={newPassword:"",confirmPassword:""},H=function(){var e=(0,B.useState)(!1),r=e[0],n=e[1],a=(0,B.useState)(!1),u=a[0],c=a[1],l=(0,S.Z)(),d=(0,z.useRouter)(),x=d.query.token,D=(0,o.Z)((0,w.gL8)(),2),O=D[0],$=D[1],H=($.data,$.loading,(0,V.cI)({defaultValues:F,mode:"onBlur",resolver:(0,Z.X)(W)})),U=H.control,E=H.setError,I=H.handleSubmit,L=H.formState,T=L.errors,G=(L.isSubmitting,function(){var e=(0,t.Z)((function(e){var r,n,t,o,i,a,u;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return r=e.newPassword,e.confirmPassword,n={newPassword:r,token:String(x)},[4,O({variables:n})];case 1:return t=s.sent(),o=t.data,i=t.errors,o&&((0,v.x9)(o.resetPassword),d.push("/auth/login")),i&&(E("newPassword",{type:"manual",message:null===(a=i[0])||void 0===a?void 0:a.message}),E("newPassword",{type:"manual",message:null===(u=i[0])||void 0===u?void 0:u.message})),[2]}}))}));return function(r){return e.apply(this,arguments)}}());return(0,i.jsxs)(R.Z,{className:"content-center",children:[(0,i.jsx)(g.Z,{className:"w-full md:w-1/2 xl:w-1/3",sx:{zIndex:1},children:(0,i.jsxs)(y.Z,{sx:{p:"".concat(l.spacing(15.5,7,8)," !important")},children:[(0,i.jsxs)(R.Z,{sx:{mb:8,display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsxs)("svg",{width:47,fill:"none",height:26,viewBox:"0 0 268 
1150",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{rx:"25.1443",width:"50.2886",height:"143.953",fill:l.palette.primary.main,transform:"matrix(-0.865206 0.501417 0.498585 0.866841 195.571 0)"}),(0,i.jsx)("rect",{rx:"25.1443",width:"50.2886",height:"143.953",fillOpacity:"0.4",fill:"url(#paint0_linear_7821_79167)",transform:"matrix(-0.865206 0.501417 0.498585 0.866841 196.084 0)"}),(0,i.jsx)("rect",{rx:"25.1443",width:"50.2886",height:"143.953",fill:l.palette.primary.main,transform:"matrix(0.865206 0.501417 -0.498585 0.866841 173.147 0)"}),(0,i.jsx)("rect",{rx:"25.1443",width:"50.2886",height:"143.953",fill:l.palette.primary.main,transform:"matrix(-0.865206 0.501417 0.498585 0.866841 94.1973 0)"}),(0,i.jsx)("rect",{rx:"25.1443",width:"50.2886",height:"143.953",fillOpacity:"0.4",fill:"url(#paint1_linear_7821_79167)",transform:"matrix(-0.865206 0.501417 0.498585 0.866841 94.1973 0)"}),(0,i.jsx)("rect",{rx:"25.1443",width:"50.2886",height:"143.953",fill:l.palette.primary.main,transform:"matrix(0.865206 0.501417 -0.498585 0.866841 71.7728 0)"}),(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{y1:"0",x1:"25.1443",x2:"25.1443",y2:"143.953",id:"paint0_linear_7821_79167",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{}),(0,i.jsx)("stop",{offset:"1",stopOpacity:"0"})]}),(0,i.jsxs)("linearGradient",{y1:"0",x1:"25.1443",x2:"25.1443",y2:"143.953",id:"paint1_linear_7821_79167",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{}),(0,i.jsx)("stop",{offset:"1",stopOpacity:"0"})]})]})]}),(0,i.jsx)(b.Z,{variant:"h6",sx:{ml:2,lineHeight:1,fontWeight:700,fontSize:"1.5rem !important"},children:h.Z.templateName})]}),(0,i.jsxs)(R.Z,{sx:{mb:6},children:[(0,i.jsx)(b.Z,{variant:"h5",sx:{mb:1.5,letterSpacing:"0.18px",fontWeight:600},children:"Reset Password \ud83d\udd12"}),(0,i.jsx)(b.Z,{variant:"body2",children:"Your new password must be different from previously used password"})]}),(0,i.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:I(G),children:[(0,i.jsxs)(j.Z,{fullWidth:!0,sx:{mb:4},children:[(0,i.jsx)(_.Z,{htmlFor:"auth-reset-password-new-password",children:"New Password"}),(0,i.jsx)(V.Qr,{name:"newPassword",control:U,rules:{required:!0},render:function(e){var t=e.field,o=t.value,s=t.onChange,a=t.onBlur;return(0,i.jsx)(P.Z,{value:o,onBlur:a,label:"New Password",onChange:s,id:"auth-reset-password-new-password",error:Boolean(T.newPassword),type:r?"text":"password",endAdornment:(0,i.jsx)(C.Z,{position:"end",children:(0,i.jsx)(N.Z,{edge:"end",onMouseDown:function(e){return e.preventDefault()},onClick:function(){return n(!r)},children:r?(0,i.jsx)(m.D2,{}):(0,i.jsx)(m.Z,{})})})})}}),T.newPassword&&(0,i.jsx)(k.Z,{sx:{color:"error.main"},id:"stepper-linear-account-password-helper",children:T.newPassword.message})]}),(0,i.jsxs)(j.Z,{fullWidth:!0,sx:{mb:4},children:[(0,i.jsx)(_.Z,{htmlFor:"auth-reset-password-confirm-password",children:"Confirm Password"}),(0,i.jsx)(V.Qr,{name:"confirmPassword",control:U,rules:{required:!0},render:function(e){var r=e.field,n=r.value,t=r.onChange,o=r.onBlur;return(0,i.jsx)(P.Z,{value:n,onBlur:o,label:"Confirm Password",onChange:t,id:"auth-reset-password-confirm-password",error:Boolean(T.confirmPassword),type:u?"text":"password",endAdornment:(0,i.jsx)(C.Z,{position:"end",children:(0,i.jsx)(N.Z,{edge:"end",onMouseDown:function(e){return e.preventDefault()},onClick:function(){return c(!u)},children:u?(0,i.jsx)(m.D2,{}):(0,i.jsx)(m.Z,{})})})})}}),T.confirmPassword&&(0,i.jsx)(k.Z,{sx:{color:"error.main"},id:"stepper-linear-account-confirm-password-helper",children:T.confirmPassword.message})]}),(0,i.jsx)(q.Z,{fullWidth:!0,size:"large",type:"submit",variant:"contained",sx:{mb:5.25},children:"Set New Password"}),(0,i.jsx)(b.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(M(),{passHref:!0,href:"/auth/login",children:(0,i.jsxs)(b.Z,{component:A.Z,sx:{display:"flex",alignItems:"center",color:"primary.main",justifyContent:"center"},children:[(0,i.jsx)(p.qg,{size:18}),(0,i.jsx)("span",{children:"Back to login"})]})})})]})]})}),(0,i.jsx)(f,{image:"/assets/images/pages/auth-v1-reset-password-mask-".concat(l.palette.mode,".png")})]})}},54459:function(e,r,n){"use strict";n.d(r,{D2:function(){return i},OH:function(){return c},Z:function(){return a},iI:function(){return u}});var t=n(51649),o=n(5434),s=n(79352),i=t.qVU,a=t.CcW,u=s._l2,c=o.IM},87811:function(e,r,n){"use strict";n.d(r,{AD:function(){return u},G6:function(){return i},HD:function(){return l},Ms:function(){return s},Ye:function(){return c},qg:function(){return a}});var t=n(80471),o=n(86893),s=o.rH8,i=o.bTu,a=o.YFh,u=o.Tfp,c=t.kEI,l=t.BM_},13267:function(e,r,n){"use strict";n.d(r,{$i:function(){return x},Af:function(){return _},Ai:function(){return v},Aj:function(){return j},As:function(){return h}
1,BQ:function(){return d},CN:function(){return P},D0:function(){return w},Hj:function(){return b},OF:function(){return p},Po:function(){return u},R3:function(){return l},kJ:function(){return m},kb:function(){return g},m5:function(){return f},oJ:function(){return c},oi:function(){return y},u5:function(){return Z}});var t,o=n(14924),s=n(96277),i=n(19223),a=n(74231),u=/((https?):\/\/)?(www.)?[a-z0-9]+(\.[a-z]{2,}){1,3}(#?\/?[a-zA-Z0-9#]+)*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/,c=/^[a-zA-Z0-9]+$/i,l=/^[a-zA-Z]+$/i,d=/^[0-9]+$/i,f=/^[a-z0-9]+$/g,m=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,}$/,p=/^(?!.*(.)\1\1.*).*$/,h=/\d/g,x="Length (cm)",w="Width (cm)",Z="Height (cm)",v="Weight (kg)",g={address1:"",address2:"",city:"",country:"",postcode:"",state:""},y=(t={},(0,o.Z)(t,s.Au2.Deposit,s.Au2.Deposit),(0,o.Z)(t,s.Au2.Balance,s.Au2.Balance),t),b=a.Ry().shape({amount:a.Rx(),currency:a.Z_()}).nullable(),j=a.Ry().shape({companyName:a.Z_().nullable(),address1:a.Z_().required("Address is required"),address2:a.Z_().nullable(),city:a.Z_().required("City is required"),country:a.Z_().required("Country is required"),postcode:a.Z_().required("Postcode is required"),state:a.Z_().required("State is required")}),_=a.Ry().shape({address1:a.Z_().nullable(),address2:a.Z_().nullable(),city:a.Z_().nullable(),country:a.Z_().nullable(),postcode:a.Z_().nullable(),state:a.Z_().nullable(),companyName:a.Z_().nullable()}).nullable(),P=a.Ry().shape({length:(0,i.r)().required("Length is required"),width:(0,i.r)().required("Width is required"),height:(0,i.r)().required("Height is required"),weight:(0,i.r)().required("Weight is required")})},19223:function(e,r,n){"use strict";n.d(r,{r:function(){return s}});var t=n(96486),o=n(74231),s=function(){return o.Rx().nullable().transform((function(e,r){return""===r||(0,t.isNil)(r)?null:e}))}},20462:function(e,r,n){"use strict";n.r(r);var t=n(85893),o=n(50053),s=n(22794),i=function(){return(0,t.jsx)(o.ZP,{})};i.getLayout=function(e){return(0,t.jsx)(s.Z,{children:e})},i.guestGuard=!0,r.default=i},47533:function(e,r,n){"use strict";n.d(r,{X:function(){return a}});var t=n(87536),o=function(e,r,n){if(e&&"reportValidity"in e){var o=(0,t.U2)(n,r);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},s=function(e,r){var n=function(n){var t=r.fields[n];t&&t.ref&&"reportValidity"in t.ref?o(t.ref,n,e):t.refs&&t.refs.forEach((function(r){return o(r,n,e)}))};for(var t in r.fields)n(t)},i=function(e,r){r.shouldUseNativeValidation&&s(e,r);var n={};for(var o in e){var i=(0,t.U2)(r.fields,o);(0,t.t8)(n,o,Object.assign(e[o],{ref:i&&i.ref}))}return n},a=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),function(a,u,c){try{return Promise.resolve(function(t,i){try{var l=(r.context,Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](a,Object.assign({abortEarly:!1},r,{context:u}))).then((function(e){return c.shouldUseNativeValidation&&s({},c),{values:n.rawValues?a:e,errors:{}}})))}catch(o){return i(o)}return l&&l.then?l.then(void 0,i):l}(0,(function(e){if(!e.inner)throw e;return{values:{},errors:i((r=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(r.inner||[]).reduce((function(e,r){if(e[r.path]||(e[r.path]={message:r.message,type:r.type}),n){var o=e[r.path].types,s=o&&o[r.type];e[r.path]=(0,t.KN)(r.path,n,e,r.type,s?[].concat(s,r.message):r.message)}return e}),{})),c)};var r,n})))}catch(o){return Promise.reject(o)}}}}},function(e){e.O(0,[7536,1524,4231,9774,2888,179],(function(){return r=53129,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.