1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9360],{39360(e,t,r){r.r(t),r.d(t,{default:()=>D});var n=r(81923),a=r(96540),l=r(53494),i=r(34818),o=r(97024),c=r(63),s=r(87107),u=r(24961),m=r(19660),d=r(54490),A=r(63118),f=r(96488),g=r(54815),E=r(27345),p=r(82782),h=r(96595),w=r(30626),b=r(42547),y=r(28422),v=r(62650),S=r(56589),C=r(33222),x=r(70321),_=r(8747),O=r(26030),L=r(80235),P=r(86120),k=r(4891);function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,i,o=[],c=!0,s=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var j={Section:(0,n.A)(m.Ay,{target:"e5xahjg2"})({name:"182p72h",styles:"min-height:60vh"})},I=(0,n.A)("div",{target:"e5xahjg1"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),q=(0,n.A)(l.QW,{target:"e5xahjg0"})("color:",_.l.black60,";text-decoration:underline;");const D=function(){var e,t=(0,x.J)([x.e.PASSWORD_RESET_NEW_PASSWORD_PAGE]),r=t.getTranslation,n=t.loading,m=(0,h.b)(),_=(0,g.Xe)().showError,U=(0,b.At)().currentMarket,D=(0,g.sq)(),F=(0,g.aA)().render,T=(0,A.A)().queryMatches.mobile,N=(0,v.JL)(),R=(0,v.UO)(),M=W((0,a.useState)(""),2),Z=M[0],B=M[1],H=W((0,a.useState)(!1),2),K=H[0],z=H[1],J=W((0,a.useState)(!1),2),Q=J[0],Y=J[1],$=W((0,a.useState)(!1),2),G=$[0],V=$[1],X=W((0,a.useState)(!1),2),ee=X[0],te=X[1],re=W((0,a.useState)(!1),2),ne=re[0],ae=re[1],le=W((0,a.useState)(!1),2),ie=le[0],oe=le[1],ce=(0,E.WW)(),se=ce.mutation,ue=ce.loading,me=null!==(e=D.get("userId"))&&void 0!==e?e:"",de="".concat(r("Allowed characters"),": ").concat(k.i),Ae=(0,a.useCallback)(function(){var e=function(){if((0,S.h)(S.Aq.UserPasswordResetConfirm),(0,C.m8)()){var e=(0,C.O0)();if((0,C.Iz)(e))return void window.location.replace(e)}window.location.replace("".concat(N,"/auth/logout?to=/").concat(U.locale,"/login/").concat(y.MI))},t=function(e){(0,S.Q$)(S.Aq.UserPasswordResetConfirm);var t={duration:6e3,closeOnClick:!0},n=(0,O.parseError)(e,r);n&&(t=Object.assign({},t,{content:n})),_(t)};!function(){if(me){var r={userId:me,newPassword:Z,otp:m,confirmationMethod:p._.LINK};return se(r,e,t)}_({duration:4e3,closeOnClick:!0})}()},[de,me,r,N,U.locale,R,_,Z,m,se]),fe=(0,a.useCallback)(function(e){B(e);var t=(0,O.validatePasswordFields)(e),r=t.hasUpperCase,n=t.hasLowerCase,a=t.containsNumber,l=t.validChars,i=t.isValidLength;oe(!1),z(r),Y(n),V(a),te(i),ae(l)},[B,z,Y,V,te,oe]);if((0,a.useEffect)(function(){return(0,S.eb)(S.Aq.UserPasswordResetConfirm)},[]),n)return a.createElement(L.aH,{fullScreen:!0});var ge=a.createElement(a.Fragment,null,r("For security reasons, setting a new password will sign you out everywhere.")," ",a.createElement(q,{onClick:function(){return F(a.createElement(P.A,{text:r}),{width:"600px","aria-labelledby":"cancel-booking-dialog-title"})}},r("Learn more")));return a.createElement(j.Section,null,a.createElement(i.A,null,a.createElement(o.A,{span:{mobile:4,tablet:4,desktop:6,desktopWide:4}},a.createElement(L.tU,{prefix:"Polestar ID",title:r("Create new password")}),a.createElement(d.A,{spacing:f.A.xLarge}),a.createElement(c.A,null,r("Password requirements")),a.createElement(d.A,{spacing:f.A.medium}),a.createElement(I,null,a.createElement(w.Z,{isFulfilled:K,isWarning:ie,labelText:r("Uppercase letter (A-Z)")}),a.createElement(w.Z,{isFulfilled:Q,isWarning:ie,labelText:r("Lowercase letter (a-z)")}),a.createElement(w.Z,{isFulfilled:G,isWarning:ie,labelText:r("Number (0-9)")}),a.createElement(w.Z,{isFulfilled:ee,isWarning:ie,labelText:r("8 characters or more")})),a.createElement(d.A,{spacing:f.A.large}),a.createElement(s.A,{label:r("New password"),required:!0,value:Z,onChange:function(e){fe(e)},onBlur:function(){return oe(!1)},error:ie&&(ne?r("Enter a password that meets the requirements"):de),hint:r("Enter a password that meets the requirements")}),a.createElement(d.A,{spacing:f.A.large}),a.createElement(L.Rv,{message:ge}),a.createElement(d.A,{spacing:T?f.A.medium:f.A.large}),a.createElement(l.jn,{loading:ue,disabled:ue,onClick:function(){K&&Q&&G&&ee&&ne?(oe(!1),Ae()):oe(!0)}},r("Confirm")))),a.createElement(u.A,null))}},86120(e,t,r){r.d(t,{A:()=>m});var n=r(96540),a=r(33410),l=r(65209),i=r(51243),o=r(63),c=r(54490),s=r(96488),u=r(80235);const m=function(e){var t=e.text;return n.createElement(n.Fragment,null,n.createElement(u.tU,{title:t("Sign out everywhere")}),n.createElement(c.A,{spacing:s.A.medium}),n.createElement(o.A,null,t("When resetting your password, signing out everywhere helps to keep your account secure.")),n.createElement(c.A,{spacing:s.A.medium}),n.createElement(o.A,null,t("You will be signed out from:")),n.createElement(c.A,{spacing:s.A.medium}),n.createElement(l.Ay,{bulletIcon:a.s2.roundClosed,spacing:i.x.spacious},n.createElement(o.A,null,t("Your vehicle")),n.createElement(o.A,null,t("Polestar App")),n.createElement(o.A,null,t("Polestar.com")),n.createElement(o.A,null,t("Polestar community")),n.createElement(o.A,null,t("Third-party applications"))))}}}]);
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.