1"use strict";(self.webpackChunksocialpilot_react=self.webpackChunksocialpilot_react||[]).push([[7494],{25524:()=>{},47494:(e,s,r)=>{r.r(s),r.d(s,{default:()=>V});var a=r(42891),t=r(9950),i=r(73878),n=r(41936),l=r(72772),o=r(5580),c=r(53679),d=r(34143),m=r(63593),h=r.n(m),w=r(42074),f=r(85532),A=r(59981),g=r(80878),u=r(58656),x=r(57656),N=r(41248),j=r(98214),p=(r(25524),r(99757)),v=r(31788),P=r(69993),S=r(77727),b=r(44414);const E=e=>{const{handleChange:s,submitResetPassword:r,data:a,enterPriceDetails:i,loginUrl:n,featureImageUrl:l,featureImageAltText:c,bgColor:m,removeAlert:E,displayNewLeftSide:y}=e,{newPassword:C,confirmPassword:R,newPasswordError:k,confirmPasswordError:I,isSubmited:_,firstName:L,lastName:M,firstNameError:T,errorMsg:D}=a,[O,U]=(0,t.useState)(!0),[W,B]=(0,t.useState)(!0),F=h().get("language");return(0,b.jsx)("div",{className:"container-fluid plain-container",children:(0,b.jsxs)("div",{className:"row h-100",children:[(0,b.jsx)("div",{className:"col-lg-5 col-sm-5 feature-image d-flex align-items-center justify-content-center ".concat(m," ").concat(o.lw?"p-0":""),children:y?(0,b.jsx)(v.A,{}):(0,b.jsx)(N.A,{imageUrl:l,altText:c,id:"ligin-feature-image"})}),(0,b.jsxs)("div",{className:"col-lg-7 col-sm-7 bg-white d-flex justify-content-center align-items-center",children:[(0,b.jsx)("div",{className:"top-logo-header",children:(0,b.jsxs)("div",{className:"d-flex justify-content-between mt-32 align-items-center",children:[(0,b.jsx)("div",{className:"",children:(0,b.jsx)("div",{className:"".concat(-1!==(0,j.A)("client")?"client-logo":""),children:(0,b.jsx)("div",{className:"",children:(0,b.jsx)("a",{className:"brand",href:"".concat(o.lw&&i.companyLogo?"javaScript:;":"https://www.socialpilot.co"),children:(0,b.jsx)(g.A,{})})})})}),(0,b.jsx)("div",{className:"",children:(0,b.jsx)(u.A,{defaultLanguage:F})})]})}),D&&(0,b.jsx)("div",{className:"alert-container alert-msg",children:(0,b.jsxs)("div",{id:"w0-success-0",className:"alert-danger alert text-left",children:[(0,b.jsx)(f.A,{type:"button",bsClass:"close",onClick:()=>E(),children:(0,b.jsx)(S.A,{name:"BaseClose",size:16})}),(0,b.jsx)("p",{className:"w-95 m-0",children:(0,b.jsx)(d.A,{id:D,defaultValue:D})})]})}),(0,b.jsx)("div",{className:"row",children:(0,b.jsx)("div",{className:"col-lg-12 col-sm-12 mt-24",children:(0,b.jsxs)("div",{className:"signin-container client-signin-container ".concat(o.lw?"enterprise-signin-container":""),children:[(0,b.jsx)("div",{className:"row mb-24",children:(0,b.jsx)("div",{className:"col-lg-12",children:(0,b.jsx)("h2",{className:"sign-up-text",children:(0,b.jsx)(d.A,{id:(0,P.A)(x.A.SET_A_NEW_PASSWORD),defaultValue:(0,P.A)(x.A.SET_A_NEW_PASSWORD)})})})}),(0,b.jsx)("div",{className:"row mb-24",children:(0,b.jsx)("div",{className:"col-lg-12",children:(0,b.jsxs)("form",{onSubmit:r,children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsxs)("div",{className:"col-lg-6 mb-24",children:[(0,b.jsxs)("label",{htmlFor:"firstName",className:"control-label ",children:[(0,b.jsx)(d.A,{id:(0,P.A)(A.A.FIRST_NAME),defaultMessage:(0,P.A)(A.A.FIRST_NAME)}),(0,b.jsx)("superscript",{children:" *"})]}),(0,b.jsx)("input",{type:"text",name:"firstName",className:"form-control".concat(T?" is-invalid":""),onChange:s,value:L,tabIndex:1}),T&&(0,b.jsx)("div",{className:"invalid-feedback",children:(0,b.jsx)(d.A,{id:(0,P.A)(T),defaultValue:(0,P.A)(T)})})]}),(0,b.jsxs)("div",{className:"col-lg-6 mb-24",children:[(0,b.jsx)("label",{htmlFor:"lastName",className:"control-label ",children:(0,b.jsx)(d.A,{id:(0,P.A)(A.A.LAST_NAME),defaultMessage:(0,P.A)(A.A.LAST_NAME)})}),(0,b.jsx)("input",{type:"text",name:"lastName",className:"form-control",value:M,onChange:s,tabIndex:2})]})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsxs)("div",{className:"col-lg-6 mb-24",children:[(0,b.jsxs)("label",{htmlFor:"password",className:"control-label",children:[(0,b.jsx)(d.A,{id:(0,P.A)(x.A.NEW_PASSWORD),defaultMessage:(0,P.A)(x.A.NEW_PASSWORD)}),(0,b.jsx)("superscript",{children:" *"})]}),(0,b.jsx)("input",{type:W?"password":"text",className:"form-control".concat(k?" is-invalid":""),name:"newPassword",onChange:s,value:C,tabIndex:3}),(0,b.jsx)("a",{href:"javascript:;",onClick:()=>{B(!W)},className:"passowrd-eye register-password-eye",children:""!==C?W?(0,b.jsx)(S.A,{name:"BasePreviewOffHide"}):(0,b.jsx)(S.A,{name:"BasePreviewOnShow"}):null}),k&&(0,b.jsx)("div",{className:"invalid-feedback",children:(0,b.jsx)(d.A,{id:(0,P.A)(k),defaultValue:(0,P.A)(k)})})]}),(0,b.jsxs)("div",{className:"col-lg-6 mb-24 password-container ".concat("en-US"!==F?"password-wrapper":""),children:[(0,b.jsxs)("label",{htmlFor:"password",className:"control-label",children:[(0,b.jsx)(d.A,{id:(0,P.A)(x.A.RETYPE_PASSWORD),defaultMessage:(0,P.A)(x.A.RETYPE_PASSWORD)}),(0,b.jsx)("superscript",{children:" *"})]}),(0,b.jsx)("input",{type:O?"password":"text",className:"form-control".concat(I?" is-invalid":""),name:"confirmPassword",onChange:s,value:R,tabIndex:4}),(0,b.jsx)("a",{href:"javascript:;",onClick:()=>{U(!O)}
1,className:"register-password-eye",children:""!==R?O?(0,b.jsx)(S.A,{name:"BasePreviewOffHide"}):(0,b.jsx)(S.A,{name:"BasePreviewOnShow"}):null}),I&&(0,b.jsx)("div",{className:"invalid-feedback",children:(0,b.jsx)(d.A,{id:(0,P.A)(I),defaultValue:(0,P.A)(I)})})]})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{className:"col",children:(0,b.jsxs)("div",{className:"form-inline",children:[(0,b.jsx)(f.A,{type:"submit",bsClass:"btn btn-primary btn-medium login-link reset-password-btn",disabled:_||""===C||""===R||""===L,children:(0,b.jsx)(d.A,{id:(0,P.A)(x.A.SET_PASSWORD),defaultValue:(0,P.A)(x.A.SET_PASSWORD)})}),_&&(0,b.jsx)(p.A,{className:"circular-spinner ml-2",id:"smallspinner-newuiCreatePassword"})]})}),(0,b.jsx)("div",{className:"col-auto my-auto",children:(0,b.jsx)(w.N_,{to:n||"/login",children:(0,b.jsx)(d.A,{id:(0,P.A)(x.A.BACK_TO_SIGNIN),defaultValue:(0,P.A)(x.A.BACK_TO_SIGNIN)})})})]})]})})})]})})})]})]})})};var y=r(51620),C=r(83438),R=r(25392),k=r(3745),I=r(1624),_=r(31965),L=r(42247),M=r(93205),T=r(674),D=r(40570),O=r(87744),U=r(41909),W=r(57193),B=r(29332);class F extends t.Component{constructor(e){super(e),this.handleChange=e=>{this.setState({[e.target.name]:e.target.value})},this.handleBackToLogin=()=>{y.A.push({pathname:"/login"})},this.removeAlert=e=>{this.setState({errorMsg:""})},this.submitResetPassword=e=>{e.preventDefault();const{createNewPassword:s,clientInviteNewPassword:r}=this.props,{newPassword:t,confirmPassword:i,token:l,firstName:o,lastName:c}=this.state,d=(0,D.UD)(o.trim(),1,35),m=(0,n.Q)(t),h=m.required()||m.validate();if(d||h)this.setState({newPasswordError:h,firstNameError:d});else if(t!==i)this.setState({confirmPasswordError:"",newPasswordError:x.A.NEW_CONFIRM_PASSWORD_MATCH});else{this.setState({isSubmited:!0});const e=(0,a.A)(l);e&&e.companyId?r({token:l,newPassword:t,firstName:o,lastName:c}):s({token:l,newPassword:t,firstName:o,lastName:c})}};const s=y.A&&y.A.location&&y.A.location.pathname?y.A.location.pathname.split("/"):[];this.displayNewLeftSide=!0;let{featureImageUrl:r,altText:t,bgColor:i}=(0,_.m)();o.lw&&(this.displayNewLeftSide=!1,r=L,t="Create Password",i="client-testimonial-bg"),this.displayNewLeftSide&&(i="new-signup-bg"),this.state={token:s[s.length-1]||"",newPassword:"",confirmPassword:"",newPasswordError:"",confirmPasswordError:"",errorMessage:"",isSubmited:!1,featureImageUrl:r,featureImageAltText:t,bgColor:i,firstName:"",lastName:"",firstNameError:"",errorMsg:""}}async componentDidMount(){const{verifyLinkAPI:e}=this.props,{token:s}=this.state;e(s);const{enterPriceDetails:r}=this.props;if(o.lw&&!r.status){if(!await(0,M.A)()){const{getEnterPriceDetails:e}=this.props;e()}}}async componentDidUpdate(e){const{createPasswordRes:s,verifyLinkRes:r,userSetting:a,fetchProfileUserSettingAction:t}=this.props,{userAcess:i}=r,{reviewAccess:n,spAccess:l}=i||{};if(s!==e.createPasswordRes&&s.error){let e="",r="",a="";s.error.reasons&&Array.isArray(s.error.reasons)&&s.error.reasons.length?s.error.reasons.forEach(s=>{"password"===s.field?e=s.message:"firstname"===s.field.toLowerCase()?r=s.message:a=s.message}):e=s.error.message,this.setState({newPasswordError:e,firstNameError:r,isSubmited:!1,errorMsg:a})}if(r!==e.verifyLinkRes&&r.error){let e="";r.error.reasons&&Array.isArray(r.error.reasons)&&r.error.reasons.length?r.error.reasons.forEach(s=>{e=s.message}):e=r.error.message,this.setState({errorMessage:e})}if(200===s.status&&s!==e.createPasswordRes){this.removeAlert(),s.response.token&&window.localStorage.setItem("teamCreatePassword",!0);try{if((await(0,T.A)(s.response.email,this.state.newPassword,(0,c.j)())).success){const e=await(0,M.A)(!0);if(l)return a(e),(o.lw||o.jN)&&t(e),void y.A.push("/");if(n)return o.lw||o.jN?void(window.location.href="".concat(o.C1,"/launchpad")):void(window.location.href=(0,U.v)().reviewUrl);const s=(0,U.v)().mainUrl;window.location.href="".concat(s)}}catch(d){this.setState({errorMsg:d})}}}render(){const{userSettingRes:e,verifyLinkRes:s,enterPriceDetails:r}=this.props,{errorMessage:a,newPassword:t,confirmPassword:i,newPasswordError:n,confirmPasswordError:o,isSubmited:c,featureImageUrl:d,featureImageAltText:m,bgColor:h,firstName:w,lastName:f,firstNameError:A,errorMsg:g}=this.state;if(s.isLoading||e.isLoading)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.m,{children:(0,b.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,b.jsx)(k.A,{})]});a&&(0,O.bB)("/login",{errorMessage:a});const{newFeatureImageUrl:u}=(0,W.A)(r,d);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.m,{children:(0,b.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,b.jsx)(E,{data:{newPassword:t,confirmPassword:i,newPasswordError:n,confirmPasswordError:o,isSubmited:c,firstName:w,lastName:f,firstNameError:A,errorMsg:g},displayNewLeftSide:this.displayNewLeftSide,handleChange:this.handleChange,handleBackToLogin:this.handleBackToLogin,submitResetPassword:this.submitResetPassword,enterPriceDetails:r,featureImageUrl:u,featureImageAltText:m,bgColor:h,removeAlert:this.removeAlert})]})}}const V=(0,i.Ng)(e=>({createPasswordRes:e.createPassword,verifyLinkRes:e.verifyLinkRes,userSettingRes:e.userSetting,enterPriceDetails:e.enterPriceDetailsReducer}),{createNewPassword:C.R8,clientInviteNewPassword:C.gl,verifyLinkAPI:C.Ks,userSetting:R.Ki,getEnterPriceDetails:I.S,fetchProfileUserSettingAction:B.$})(F)}}]);
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.