1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6],{156:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password",function(){return r(9761)}])},6129:function(e,s,r){"use strict";r.d(s,{Z:function(){return i}});var t=r(4246),n=r(9894),a=r.n(n);function i(e){let{variant:s="primary",as:r="button",href:n,type:i="button",target:l,rel:o,disabled:c=!1,fullWidth:d=!1,onClick:u,children:h,className:f}=e,m=["ss-btn","ss-btn--".concat(s),d?"ss-btn--full":"",f].filter(Boolean).join(" ");return"link"===r&&n?(0,t.jsx)(a(),{href:n,className:m,target:l,rel:o,onClick:u,"aria-disabled":c||void 0,children:h}):"a"===r&&n?(0,t.jsx)("a",{href:n,className:m,target:l,rel:o,onClick:u,"aria-disabled":c||void 0,children:h}):(0,t.jsx)("button",{type:i,className:m,disabled:c,onClick:u,children:h})}},4968:function(e,s,r){"use strict";r.d(s,{Z:function(){return n}});var t=r(4246);function n(e){let{id:s,label:r,type:n="text",value:a,onChange:i,required:l,minLength:o,autoComplete:c,placeholder:d,error:u,labelAccessory:h}=e;return(0,t.jsxs)("div",{className:"ss-field",children:[(0,t.jsxs)("div",{className:"ss-label-row",children:[(0,t.jsx)("label",{htmlFor:s,className:"ss-label",children:r}),h]}),(0,t.jsx)("input",{id:s,className:"ss-input",type:n,value:a,onChange:i,required:l,minLength:o,autoComplete:c,placeholder:d,"aria-invalid":!!u,"aria-describedby":u?"".concat(s,"-err"):void 0}),u&&(0,t.jsx)("p",{id:"".concat(s,"-err"),role:"alert",className:"ss-input-err",children:u})]})}},4274:function(e,s,r){"use strict";r.d(s,{Z:function(){return n}});var t=r(4246);function n(e){let{variant:s="mark",size:r=28,tone:n="brand",title:a,className:i}=e,l=null!=a?a:"Sales Sidekick",o="mono"===n,c=o?"currentColor":"#FFFFFF",d=o?"currentColor":"rgba(255,255,255,0.62)",u=(0,t.jsxs)("svg",{width:r,height:r,viewBox:"0 0 128 128",..."lockup"===s?{"aria-hidden":!0}:{role:"img","aria-label":l},children:[(0,t.jsx)("rect",{width:"128",height:"128",rx:"30",fill:o?"none":"var(--primary)"}),(0,t.jsx)("circle",{cx:"27",cy:"40",r:"5.4",fill:o?"currentColor":"#F5A623"}),(0,t.jsx)("rect",{x:"43",y:"34.5",width:"46",height:"11",rx:"5.5",fill:c}),(0,t.jsx)("circle",{cx:"27",cy:"64",r:"5.4",fill:d}),(0,t.jsx)("rect",{x:"43",y:"58.5",width:"64",height:"11",rx:"5.5",fill:c}),(0,t.jsx)("circle",{cx:"27",cy:"88",r:"5.4",fill:d}),(0,t.jsx)("rect",{x:"43",y:"82.5",width:"54",height:"11",rx:"5.5",fill:c})]});return"lockup"===s?(0,t.jsxs)("span",{className:i,role:"img","aria-label":l,style:{display:"inline-flex",alignItems:"center",gap:10},children:[u,(0,t.jsx)("span",{"aria-hidden":!0,style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:Math.round(.72*r),lineHeight:1,letterSpacing:"-0.01em",color:"var(--ink)"},children:"Sales Sidekick"})]}):(0,t.jsx)("span",{className:i,style:{display:"inline-flex"},children:u})}},9761:function(e,s,r){"use strict";r.r(s),r.d(s,{default:function(){return f}});var t=r(4246),n=r(7378),a=r(8038),i=r.n(a),l=r(9894),o=r.n(l),c=r(6677),d=r(4274),u=r(6129),h=r(4968);function f(){let e=(0,c.useRouter)(),s="string"==typeof e.query.token?e.query.token:null,[r,a]=(0,n.useState)(""),[l,f]=(0,n.useState)(""),[m,x]=(0,n.useState)(null),[p,j]=(0,n.useState)(!1),[w,g]=(0,n.useState)(!1);async function y(e){if(e.preventDefault(),x(null),r.length<8){x("Password must be at least 8 characters.");return}if(r!==l){x("Passwords do not match.");return}g(!0);try{let e=await fetch("/api/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:s,newPassword:r})}),n=await e.json();if(!e.ok){var t;x(null!==(t=n.error)&&void 0!==t?t:"Error ".concat(e.status));return}j(!0)}catch(e){x("Network error. Could not reach the server.")}finally{g(!1)}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i(),{children:[(0,t.jsx)("title",{children:"Choose a new password"}),(0,t.jsx)("meta",{name:"robots",content:"noindex,nofollow"})]}),(0,t.jsx)("main",{className:"ss-auth-page",children:(0,t.jsxs)("div",{className:"ss-auth-stack",children:[(0,t.jsx)(o(),{href:"/",className:"ss-logo-link",children:(0,t.jsx)(d.Z,{variant:"lockup",size:28})}),(0,t.jsxs)("div",{className:"ss-auth-card",children:[(0,t.jsx)("h1",{className:"ss-h3",style:{textAlign:"center",marginBottom:"1.25rem"},children:"Choose a new password"}),s?p?(0,t.jsxs)("div",{className:"ss-alert ss-alert--success",role:"status",children:[(0,t.jsx)("p",{style:{margin:"0 0 1rem"},children:"Password reset. Sign in to continue."}),(0,t.jsx)(u.Z,{as:"link",href:"/login",variant:"primary",children:"Sign in"})]}):(0,t.jsxs)("form",{onSubmit:y,className:"ss-form",children:[(0,t.jsx)(h.Z,{id:"newPassword",label:"New password",type:"password",value:r,onChange:e=>a(e.target.value),required:!0,minLength:8,autoComplete:"new-password"}),(0,t.jsx)(h.Z,{id:"confirmPassword",label:"Confirm new password",type:"password",value:l,onCh
1ange:e=>f(e.target.value),required:!0,autoComplete:"new-password"}),m&&(0,t.jsx)("div",{className:"ss-alert ss-alert--error",role:"alert",children:m}),(0,t.jsx)(u.Z,{type:"submit",variant:"primary",fullWidth:!0,disabled:w,children:w?"Resetting...":"Reset password"})]}):(0,t.jsxs)("div",{className:"ss-alert ss-alert--error",role:"alert",children:["Invalid reset link."," ",(0,t.jsx)(o(),{href:"/forgot-password",className:"ss-link",children:"Request a new one"}),"."]}),!p&&(0,t.jsx)("p",{className:"ss-auth-foot",style:{marginTop:"1.25rem"},children:(0,t.jsx)(o(),{href:"/login",className:"ss-link",children:"Back to sign in"})})]})]})})]})}},6677:function(e,s,r){e.exports=r(8739)}},function(e){e.O(0,[894,888,774,179],function(){return e(e.s=156)}),_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.