(this["webpackJsonprule-manager"]=this["webpackJsonprule-manager"]||[]).push([[0],{241:function(e,a,t){e.exports=t(373)},370:function(e,a,t){},371:function(e,a,t){},372:function(e,a,t){},373:function(e,a,t){"use strict";t.r(a);var l={};t.r(l),t.d(l,"activePage",(function(){return q})),t.d(l,"account_storeUserData",(function(){return ae})),t.d(l,"account_getUserSubscription",(function(){return te})),t.d(l,"account_rdx_clearData",(function(){return le})),t.d(l,"account_rdx_storeUserData",(function(){return ne})),t.d(l,"account_rdx_storeUIStatus",(function(){return ie})),t.d(l,"rdx_clearUIStatus",(function(){return ce})),t.d(l,"rdx_storeUIStatus",(function(){return se}));var n=t(0),i=t.n(n),c=t(45),s=t.n(c),r=t(8),o=t(9),m=t(11),d=t(10),u=t(13),p=t(3),g=t(117),h=t(217),v=t(58),b={page:null},E=t(169),f=t.n(E),N=t(218),w={},y=(Object(N.a)([function(e){return e.account.UserDetails}],(function(e){return!(!e||!e.endDate)&&f()(e.endDate).isSameOrAfter()})),function(e){return!!e&&("Organization"===(null===e||void 0===e?void 0:e.account)?"Active"===(null===e||void 0===e?void 0:e.status)&&"Active"===(null===e||void 0===e?void 0:e.orgStatus)&&f()(e.endDate).isSameOrAfter():"Active"===(null===e||void 0===e?void 0:e.status)&&f()(e.endDate).isSameOrAfter())}),k={},j=Object(g.b)({app:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"APP_ACTIVE_PAGE":return Object(v.a)(Object(v.a)({},e),{},{page:a.page});default:return e}},account:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"ACCOUNT_RDX_STORE_USER_DATA":return Object(v.a)(Object(v.a)({},e),a.data);case"ACCOUNT_RDX_CLEAR_DATA":return{};case"ACCOUNT_RDX_STORE_UI_STATUS":return Object(v.a)(Object(v.a)({},e),a.data);case"ACCOUNT_STORE_USER_DATA":return a.data.UserDetails?Object(v.a)(Object(v.a)({},e),{},{UserDetails:a.data.UserDetails}):Object(v.a)(Object(v.a)({},e),a.data);default:return e}},uistatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"RDX_CLEAR_UI_STATUS":return{};case"RDX_STORE_UI_STATUS":return Object(v.a)(Object(v.a)({},e),a.data);default:return e}}}),x=j,I=g.c,C=Object(g.d)(x,I(Object(g.a)(h.a))),T=C,O=t(41),S=t(378),A=t(37),B=t(385),R=t(387),P=t(390),F=t(80),z=t(391),M=t(392),D=t(393),q=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"APP_ACTIVE_PAGE",page:{name:e,extras:a}}},V=t(118),U=t.n(V),L=t(138),H=t(177),Y=t.n(H),W=t(71),G={userPool:void 0,user:{cognitoUser:void 0,signInRefObj:void 0,obj:void 0,at:void 0,it:void 0,attrs:void 0,sessionUserAttributes:void 0},load:function(){return new Promise((function(e,a){G.userPool=new W.d({UserPoolId:"us-east-1_3zfO93CIz",ClientId:"5j2485tpaccc7hh3vnutm0momn"}),G.user.obj=G.getCurrentUser().then((function(t){t?(G.user.obj=t,G.user.at=t.accessToken.jwtToken,G.user.it=t.idToken.jwtToken,G.getUserAttrs().then((function(a){G.user.attrs=a,e(a)})).catch((function(e){a(e)}))):e(null)})).catch((function(e){a(e)}))}))},signUp:function(e){return new Promise((function(a,t){var l=[],n={Name:"phone_number",Value:e.Mobile},i=new W.c(n);if(l.push(i),e.Email){var c={Name:"email",Value:e.Email},s=new W.c(c);l.push(s)}if(e.Name){var r={Name:"name",Value:e.Name},o=new W.c(r);l.push(o)}G.userPool.signUp(e.Email,e.Password,l,null,(function(e,l){e?(console.log(e),t(e)):(G.user.cognitoUser=l.user,a(l))}))}))},signIn:function(e,a,t,l){var n={Username:e.Email,Password:e.Password},i=new W.a(n),c={Username:e.Email,Pool:G.userPool};G.user.cognitoUser=new W.b(c),G.user.cognitoUser.authenticateUser(i,{onSuccess:function(e){G.user.obj=e,G.user.at=e.accessToken.jwtToken,G.user.it=e.idToken.jwtToken,G.getUserAttrs().then((function(e){G.user.attrs=e,a&&a(e)}))},onFailure:function(e){console.log(e),t&&t(e)},newPasswordRequired:function(e){delete e.email_verified,G.sessionUserAttributes=e,l&&l()}})},handleNewPassword:function(e,a,t){G.user.cognitoUser.completeNewPasswordChallenge(e,G.sessionUserAttributes,{onSuccess:function(e){G.user.obj=e,G.user.at=e.accessToken.jwtToken,G.user.it=e.idToken.jwtToken,G.getUserAttrs().then((function(e){G.user.attrs=e,a&&a(e)}))},onFailure:function(e){console.log(e),t&&t(e)}})},signInConfirm:function(e){G.user.cognitoUser.sendMFACode(e,G.user.signInRefObj)},signupConfirm:function(e,a){return new Promise((function(t,l){var n={Username:e,Pool:G.userPool};new W.b(n).confirmRegistration(a,!0,(function(e,a){e?(console.log("Failed confirming registration - "+e),l()):(console.log("Successfully confirmed registration - "+a),t())}))}))},resendConfirmationCode:function(e){return new Promise((function(a,t){var l={Username:e.Mobile,Pool:G.userPool};G.user.cognitoUser=new W.b(l),G.user.cognitoUser.resendConfirmationCode((function(e,l){e?t(e):a()}))}))},getCurrentUser:function(){return new Promise((function(e,a){G.user.cognitoUser=G.userPool.getCurrentUser(),null!=G.user.cognitoUser?G.user.cognitoUser.getSession((function(t,l){t&&a(t),e(l)})):e(null)}))},signOut:function(){void 0!==G.user.cognitoUser&&(G.user.cognitoUser.signOut(),G.user.cognitoUser=void 0,G.user.signInRefObj=void 0,G.user.obj=void 0,G.user.it=void 0)},getUserAttrs:function(e,a){return new Promise((function(t,l){G.user.cognitoUser.getUserAttributes((function(n,i){if(n)console.log("Failed getting attributes: ",n),a&&a(n),l(n);else{for(var c={},s=0;s0&&(s=c[0],{},console.log(s),(r={}).UserDetails=s,l(ae(r))),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),console.log(t.t0),a&&a();case 14:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}()},le=function(){return{type:"ACCOUNT_RDX_CLEAR_DATA"}},ne=function(e){return{type:"ACCOUNT_RDX_STORE_USER_DATA",data:e}},ie=function(e){return{type:"ACCOUNT_RDX_STORE_UI_STATUS",data:e}},ce=function(){return{type:"RDX_CLEAR_UI_STATUS"}},se=function(e){return{type:"RDX_STORE_UI_STATUS",data:e}},re=t(121),oe=t(70),me=t(377),de=t(113),ue=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){return Object(r.a)(this,t),a.apply(this,arguments)}return Object(o.a)(t,[{key:"render",value:function(){return i.a.createElement(re.a,null,i.a.createElement(oe.a,{span:24,style:{textAlign:"center"}},i.a.createElement("div",{className:"image-container center-aligned"},i.a.createElement("div",{className:"image-div image-size-200"},i.a.createElement("img",{src:"/images/logo/icheck-logo-with-title-blue.svg",alt:"icheck for Building"}))),i.a.createElement("h1",{style:{paddingTop:"20px",fontSize:"22px"},className:"text-color-fail"},"HELP"),i.a.createElement(me.a,null,i.a.createElement(de.a,null))))}}]),t}(n.Component),pe=ue,ge=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleSignInClick=function(e){l.setState({IsLoadingBtn:!0});var a={Email:e.email,Password:e.password};_.signIn(a,l.handleSignInSuccess.bind(Object(A.a)(l)),l.handleSignInFailure.bind(Object(A.a)(l)),l.handleNewPasswordRequired.bind(Object(A.a)(l)))},l.handleSignInSuccess=function(e){l.props.account_getUserSubscription(),l.getSetCurrentUser()},l.state={IsLoadingBtn:!1,IsErrorNotification:!1,ErrorMessage:"",ErrorDescription:""},l}return Object(o.a)(t,[{key:"handleSignInFailure",value:function(e){this.setState({IsLoadingBtn:!1,ErrorMessage:"SIGN IN failed",ErrorDescription:"Unable to login to icheck for Building account. Provide the valid email ID and password. Use Forgot Password link to reset the account password.",IsErrorNotification:!0}),this.props.account_rdx_storeUIStatus({SignedInState:!1}),console.log("signIn failed",e)}},{key:"handleNewPasswordRequired",value:function(){this.setState({IsLoadingBtn:!1}),this.props.history.push("/new-password"),console.log("New password required")}},{key:"getSetCurrentUser",value:function(){_.getUserAttrs(this.handleGetSetUserSuccess.bind(this),this.handleGetSetUserFailure.bind(this))}},{key:"handleGetSetUserSuccess",value:function(e){this.setState({IsLoadingBtn:!1});var a,t,l,n;e.email&&(a=e.email),e.name&&(t=e.name),e.phone_number&&(n=e.phone_number),e["custom:organization"]&&(l=e["custom:organization"]),this.props.account_rdx_storeUserData({UserEmail:a,UserName:t,UserOrganization:l,UserPhone:n,UserGroups:[]})}},{key:"handleGetSetUserFailure",value:function(e){this.setState({IsLoadingBtn:!1,ErrorMessage:"ERROR",ErrorDescription:"Something is wrong. Unable to get your profile information. Please try again. If the error persist, please contact icheckbuilding.support@bureauveritas.com for further help.",IsErrorNotification:!0}),console.log("Get user failed",e)}},{key:"render",value:function(){var e={labelCol:{lg:{span:24},sm:{span:24},xs:{span:24}},wrapperCol:{lg:{span:24},sm:{span:24},xs:{span:24}}};return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-primary font-weight-bold text-align-center"},"Welcome"),i.a.createElement("p",null,"Sign in to access the online help for icheck for Building."),i.a.createElement(B.a,{className:"bv-form",onFinish:this.handleSignInClick},i.a.createElement(B.a.Item,Object.assign({name:"email",hasFeedback:!0},e,{rules:[{required:!0,type:"email",message:"Please enter valid email address"}]}),i.a.createElement(R.a,{prefix:i.a.createElement(z.a,{className:"site-form-item-icon"}),placeholder:"Enter email address",ref:function(e){return e&&e.focus()}})),i.a.createElement(B.a.Item,Object.assign({name:"password"},e,{rules:[{required:!0,message:"Please input your password!"}]}),i.a.createElement(R.a.Password,{prefix:i.a.createElement(M.a,{className:"site-form-item-icon"}),placeholder:"Enter password"})),this.state.IsErrorNotification?i.a.createElement(B.a.Item,null,i.a.createElement(P.a,{className:"failed-message-box",message:this.state.ErrorMessage,description:this.state.ErrorDescription})):"",i.a.createElement(B.a.Item,e,i.a.createElement(F.a,{type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"SIGN IN",i.a.createElement(D.a,null)))),i.a.createElement(p.b,{to:"/forgot-password"},"Forgot password ?"))))}}]),t}(n.Component),he=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(ge)),ve=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleSetNewPasswordClick=function(e){l.setState({IsLoadingBtn:!0});var a=e.password;a===e.confirm_password?_.handleNewPassword(a,l.handleSignInSuccess.bind(Object(A.a)(l)),l.handlePasswordChangeFailure.bind(Object(A.a)(l))):l.setState({IsLoadingBtn:!1,ErrorMessage:"Password mismatch",ErrorDescription:"Both the new and confirm password should be same. Please provide the same password in both the fields.",IsErrorNotification:!0})},l.handleSignInSuccess=function(){l.getSetCurrentUser()},l.state={IsLoadingBtn:!1,IsErrorNotification:!1,ErrorMessage:"",ErrorDescription:""},l}return Object(o.a)(t,[{key:"getSetCurrentUser",value:function(){_.getUserAttrs(this.handleGetSetUserSuccess.bind(this),this.handleGetSetUserFailure.bind(this))}},{key:"handleGetSetUserSuccess",value:function(e){var a,t,l,n;e.email&&(a=e.email),e.name&&(t=e.name),e.phone_number&&(n=e.phone_number),e["custom:organization"]&&(l=e["custom:organization"]),this.props.account_rdx_storeUserData({UserEmail:a,UserName:t,UserOrganization:l,UserPhone:n,UserGroups:[]})}},{key:"handleGetSetUserFailure",value:function(e){this.setState({IsLoadingBtn:!1}),this.props.account_rdx_storeUIStatus({SignedInState:!1}),this.setState({ErrorMessage:"Something is wrong",ErrorDescription:"Something went wrong. This might be internal server error. Please try again.",IsErrorNotification:!0}),console.log("Get user failed",e)}},{key:"handlePasswordChangeFailure",value:function(e){this.setState({IsLoadingBtn:!1});var a="";switch(e.code){case"InvalidPasswordException":a="Password does not confirm to the policy. Make sure to have at least 8 characters that includes at least one capital letter, one small letter, one special character and a number.";break;case"TooManyRequestsException":a="You have reached the maximum attempts to reset the password. Please try again after some time.";break;case"UserNotFoundException":a="We could not find your account for icheck for Building. Please verify your login details and try again or contact icheckbuilding.support@bureauveritas.com for further help.";break;case"UserNotConfirmedException":a="Your account is not yet verified. Please contact icheckbuilding.support@bureauveritas.com for further help.";break;default:a="We are unable to change the password for your account. Please try again after some time. Contact icheckbuilding.support@bureauveritas.com for further help."}this.setState({ErrorMessage:"Unable to set password",ErrorDescription:a,IsErrorNotification:!0}),this.props.account_rdx_storeUIStatus({SignedInState:!1})}},{key:"render",value:function(){var e={labelCol:{lg:{span:24},sm:{span:24},xs:{span:24}},wrapperCol:{lg:{span:24},sm:{span:24},xs:{span:24}}};return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-primary font-weight-bold text-align-center"},"Set Password"),i.a.createElement("p",null,"Set your new password and continue to icheck for Building"),i.a.createElement(B.a,{className:"bv-form",onFinish:this.handleSetNewPasswordClick},i.a.createElement(B.a.Item,Object.assign({name:"password",hasFeedback:!0},e,{rules:[{required:!0,message:"Please enter valid password",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{prefix:i.a.createElement(M.a,{className:"site-form-item-icon"}),placeholder:"Enter new password",ref:function(e){return e&&e.focus()}})),i.a.createElement(B.a.Item,Object.assign({name:"confirm_password",hasFeedback:!0},e,{rules:[{required:!0,message:"Please confirm your password!",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{prefix:i.a.createElement(M.a,{className:"site-form-item-icon"}),placeholder:"Confirm new password"})),this.state.IsErrorNotification?i.a.createElement(B.a.Item,null,i.a.createElement(P.a,{className:"failed-message-box",message:this.state.ErrorMessage,description:this.state.ErrorDescription})):"",i.a.createElement(B.a.Item,e,i.a.createElement(F.a,{type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"SET PASSWORD ",i.a.createElement(M.a,null))),i.a.createElement(P.a,{className:"primary-message-box",style:{marginTop:"30px"},message:"Password policy",description:"Min password length is 8. The password must contain lowercase letters, uppercase letters, numbers, and special character"})))))}}]),t}(n.Component),be=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(ve)),Ee=t(394),fe=t(395),Ne=t(396),we=t(234),ye=function(e,a,t,l){we.a[e]({message:a,description:t,placement:"bottomRight",bottom:"80px",className:l})},ke=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleSaveProfileClick=function(e){l.setState({IsLoadingBtn:!0}),ye("info","Updating profile",i.a.createElement("div",null,i.a.createElement("p",null,"Updating profile information...")),"bv-notification info-notification");var a=[],t={Name:"name",Value:e.full_name};a.push(t);var n={Name:"phone_number",Value:e.phone_number};a.push(n);var c={Name:"custom:organization",Value:e.organization};a.push(c),_.updateUserAttributes(a,l.handleUserAttributeSuccess.bind(Object(A.a)(l)),l.handleUserAttributeFailure.bind(Object(A.a)(l)))},l.state={IsLoadingBtn:!1},l}return Object(o.a)(t,[{key:"handleUserAttributeSuccess",value:function(e){ye("success","Profile updated",i.a.createElement("div",null,i.a.createElement("p",null,"Your profile information is updated successfully.")),"bv-notification success-notification"),this.getSetCurrentUser()}},{key:"handleUserAttributeFailure",value:function(e){console.log("Update attribute failed",e),ye("error","Update profile failed",i.a.createElement("div",null,i.a.createElement("p",null,"Unable to update your profile details. Please try again.")),"bv-notification error-notification"),this.setState({IsLoadingBtn:!1}),this.props.account_rdx_storeUIStatus({SignedInState:!0}),this.props.history.push("/dashboard")}},{key:"getSetCurrentUser",value:function(){_.getUserAttrs(this.handleGetSetUserSuccess.bind(this),this.handleGetSetUserFailure.bind(this))}},{key:"handleGetSetUserSuccess",value:function(e){var a,t,l,n;e.email&&(a=e.email),e.name&&(t=e.name),e.phone_number&&(n=e.phone_number),e["custom:organization"]&&(l=e["custom:organization"]),this.props.account_rdx_storeUserData({UserEmail:a,UserName:t,UserOrganization:l,UserPhone:n}),this.setState({IsLoadingBtn:!1}),this.props.account_rdx_storeUIStatus({SignedInState:!0}),this.props.history.push("/")}},{key:"handleGetSetUserFailure",value:function(e){console.log("Get user failed",e),this.setState({IsLoadingBtn:!1}),this.props.account_rdx_storeUIStatus({SignedInState:!0}),this.props.history.push("/")}},{key:"render",value:function(){var e={labelCol:{lg:{span:24},sm:{span:24},xs:{span:24}},wrapperCol:{lg:{span:24},sm:{span:24},xs:{span:24}}};return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-primary font-weight-bold text-align-center"},"Almost done !!"),i.a.createElement("p",null,"Provide your profile details and you are all set to access the help section for icheck for Building."),i.a.createElement(B.a,{className:"bv-form",onFinish:this.handleSaveProfileClick},i.a.createElement(B.a.Item,Object.assign({name:"full_name",hasFeedback:!0},e,{rules:[{required:!0,message:"Please enter valid name (Letters and spaces)",pattern:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$"}]}),i.a.createElement(R.a,{prefix:i.a.createElement(z.a,{className:"site-form-item-icon"}),placeholder:"Enter full name",ref:function(e){return e&&e.focus()}})),i.a.createElement(B.a.Item,Object.assign({name:"organization",hasFeedback:!0},e,{rules:[{required:!0,message:"Please enter valid organization name (Letters, spaces and .,-)",pattern:"^[a-zA-z][a-zA-Z., -]+$"}]}),i.a.createElement(R.a,{prefix:i.a.createElement(Ee.a,{className:"site-form-item-icon"}),placeholder:"Enter organization"})),i.a.createElement(B.a.Item,Object.assign({name:"phone_number",hasFeedback:!0},e,{rules:[{required:!0,message:"Please enter valid phone number (Must start with +)",pattern:"^[+][0-9]{3,}"}]}),i.a.createElement(R.a,{prefix:i.a.createElement(fe.a,{className:"site-form-item-icon"}),placeholder:"Enter phone number"})),i.a.createElement("p",{className:"text-color-bv-light-grey"},"You can change this information in future using Edit Profile."),i.a.createElement(B.a.Item,e,i.a.createElement(F.a,{type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"Save and Continue ",i.a.createElement(Ne.a,null)))))))}}]),t}(n.Component),je=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(ke)),xe=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleGetCodeClick=function(e){l.setState({IsLoadingBtn:!0,IsDisabledBtn:!0,CodeRequestEmail:e.email}),_.forgotPasswordEmail(e.email,l.onGetCodeSuccess.bind(Object(A.a)(l)),l.onGetCodeFailure.bind(Object(A.a)(l)))},l.state={IsLoadingBtn:!1,IsDisabledBtn:!1,CodeRequestEmail:"",IsErrorNotification:!1,ErrorMessage:"",ErrorDescription:""},l}return Object(o.a)(t,[{key:"onGetCodeSuccess",value:function(e){this.setState({IsLoadingBtn:!1,IsDisabledBtn:!1}),this.props.account_rdx_storeUIStatus({CodeRequestEmail:this.state.CodeRequestEmail}),this.props.history.push("/forgot-password/confirm-code")}},{key:"onGetCodeFailure",value:function(e){this.setState({IsLoadingBtn:!1,IsDisabledBtn:!1,CodeRequestEmail:""}),this.props.account_rdx_storeUIStatus({CodeRequestEmail:""});var a="";switch(e.code){case"InvalidParameterException":a="Provide the valid email address to send the verification code.";break;default:a="We are unable to send the verification CODE. Provide the valid email address registered for icheck for Building."}this.setState({ErrorMessage:"Unable to send CODE",ErrorDescription:a,IsErrorNotification:!0})}},{key:"handleForgetPasswordExit",value:function(){this.setState({IsLoadingBtn:!1,IsDisabledBtn:!1,CodeRequestEmail:""}),this.props.account_rdx_storeUIStatus({CodeRequestEmail:""}),this.props.history.push("/login")}},{key:"render",value:function(){var e={labelCol:{lg:{span:24},sm:{span:24},xs:{span:24}},wrapperCol:{lg:{span:24},sm:{span:24},xs:{span:24}}};return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-primary font-weight-bold text-align-center"},"Password recovery"),i.a.createElement("p",null,"Enter valid email ID and click on GET CODE. If you are a registered icheck for Building user, you will receive one-time password recovery verification code on your email."),i.a.createElement(B.a,{className:"bv-form",onFinish:this.handleGetCodeClick},i.a.createElement(B.a.Item,Object.assign({name:"email",hasFeedback:!0},e,{rules:[{required:!0,type:"email",message:"Please enter valid email address"}]}),i.a.createElement(R.a,{prefix:i.a.createElement(z.a,{className:"site-form-item-icon"}),placeholder:"Enter email address",ref:function(e){return e&&e.focus()}})),this.state.IsErrorNotification?i.a.createElement(B.a.Item,null,i.a.createElement(P.a,{className:"failed-message-box",message:this.state.ErrorMessage,description:this.state.ErrorDescription})):"",i.a.createElement(B.a.Item,e,i.a.createElement(F.a,{style:{float:"left"},onClick:this.handleForgetPasswordExit.bind(this),disabled:this.state.IsDisabledBtn},"Back"),i.a.createElement(F.a,{style:{float:"right"},type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"GET CODE"))))))}}]),t}(n.Component),Ie=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(xe)),Ce=t(397),Te=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleVerifyCodeClick=function(e){l.setState({IsLoadingBtn:!0,IsDisabledBtn:!0}),e.new_password===e.confirm_new_password?_.forgotPasswordCode(e.verification_code,e.new_password,l.onForgetPasswordSuccess.bind(Object(A.a)(l)),l.onForgetPasswordFailure.bind(Object(A.a)(l))):l.setState({IsLoadingBtn:!1,IsDisabledBtn:!1,ErrorMessage:"Password mismatch",ErrorDescription:"Both the new and confirm password should be same. Please provide the same password in both the fields.",IsErrorNotification:!0})},l.state={IsLoadingBtn:!1,IsDisabledBtn:!1,IsErrorNotification:!1,ErrorMessage:"",ErrorDescription:""},l}return Object(o.a)(t,[{key:"onForgetPasswordSuccess",value:function(){this.setState({IsLoadingBtn:!1,IsDisabledBtn:!1}),this.props.history.push("/forgot-password/password-changed")}},{key:"onForgetPasswordFailure",value:function(e){this.setState({IsLoadingBtn:!1,IsDisabledBtn:!1});var a="";switch(e.code){case"InvalidParameterException":a="Provide the valid verification code and password.";break;case"InvalidPasswordException":a="Password does not confirm to the policy. Make sure to have at least 8 characters that includes at least one capital letter, one small letter, one special character and a number.";break;case"CodeMismatchException":a="Invalid verification code provided, please try again.";break;case"ExpiredCodeException":a="Your verification code is expired. Verification code is valid maximum for 3 minutes. Please get the new verification code and try again.";break;case"LimitExceededException":a="You have reached the maximum attempts to reset the password. Please try again after some time.";break;default:a="We are unable to set a password for your account. Your account might be invalid. Contact icheckbuilding.support@bureauveritas.com for further help."}this.setState({ErrorMessage:"Unable to set password",ErrorDescription:a,IsErrorNotification:!0})}},{key:"handleForgetPasswordClick",value:function(){this.props.history.push("/forgot-password")}},{key:"render",value:function(){var e=this.props.account,a={labelCol:{lg:{span:24},sm:{span:24},xs:{span:24}},wrapperCol:{lg:{span:24},sm:{span:24},xs:{span:24}}};return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-primary font-weight-bold text-align-center"},"Verification code"),i.a.createElement("p",null,"Enter one-time password recovery verification code shared on"," ",i.a.createElement("span",{className:"text-color-primary font-weight-bold"},e.CodeRequestEmail)," ","and your new account password. Click RESET to change your account password."),i.a.createElement(B.a,{className:"bv-form left-aligned-form",onFinish:this.handleVerifyCodeClick},i.a.createElement(B.a.Item,Object.assign({name:"verification_code",hasFeedback:!0},a,{rules:[{required:!0,message:"Please enter valid verification code (only numbers)",pattern:"^[0-9]*$"}]}),i.a.createElement(R.a,{prefix:i.a.createElement(Ce.a,{className:"site-form-item-icon"}),placeholder:"Enter verification code",ref:function(e){return e&&e.focus()}})),i.a.createElement(B.a.Item,Object.assign({name:"new_password",hasFeedback:!0},a,{rules:[{required:!0,message:"Please enter valid password.",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{prefix:i.a.createElement(M.a,{className:"site-form-item-icon"}),placeholder:"Enter new password"})),i.a.createElement(B.a.Item,Object.assign({name:"confirm_new_password",hasFeedback:!0},a,{rules:[{required:!0,message:"Please confirm your password!",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{prefix:i.a.createElement(M.a,{className:"site-form-item-icon"}),placeholder:"Confirm new password"})),this.state.IsErrorNotification?i.a.createElement(B.a.Item,null,i.a.createElement(P.a,{className:"failed-message-box",message:this.state.ErrorMessage,description:this.state.ErrorDescription})):"",i.a.createElement(B.a.Item,a,i.a.createElement(F.a,{style:{float:"left"},onClick:this.handleForgetPasswordClick.bind(this),disabled:this.state.IsDisabledBtn},"Back"),i.a.createElement(F.a,{style:{float:"right"},type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"RESET")),i.a.createElement(P.a,{className:"primary-message-box",style:{marginTop:"30px"},message:"Code validity",description:"The verification code is valid maximum for 3 minutes."}),i.a.createElement(P.a,{className:"primary-message-box",style:{marginTop:"30px"},message:"Password policy",description:"Min password length is 8. The password must contain lowercase letters, uppercase letters, numbers, and special character."})))))}}]),t}(n.Component),Oe=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(Te)),Se=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){return Object(r.a)(this,t),a.apply(this,arguments)}return Object(o.a)(t,[{key:"handleSignInUIClick",value:function(){this.props.history.push("/login")}},{key:"render",value:function(){var e=this.props.account;return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-primary font-weight-bold text-align-center"},"Password changed"),i.a.createElement("h3",{className:"text-color-primary text-align-center"},e.CodeRequestEmail),i.a.createElement("p",null,"Your password is successfully changed. Use the new password to SIGN IN to your account"),i.a.createElement(re.a,null,i.a.createElement(oe.a,{span:24,style:{textAlign:"center"}},i.a.createElement(F.a,{type:"primary",onClick:this.handleSignInUIClick.bind(this)},"SIGN IN ",i.a.createElement(D.a,null)))))))}}]),t}(n.Component),Ae=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(Se)),Be=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){return Object(r.a)(this,t),a.apply(this,arguments)}return Object(o.a)(t,[{key:"handleSignOutClick",value:function(){this.props.account_rdx_clearData(),_.signOut(),this.props.history.push("/login")}},{key:"componentDidUpdate",value:function(e){this.props.account.UserDetails&&this.props.account.UserDetails!=e.account.UserDetails&&this.props.isUserHaveAccess&&this.props.history.push("/")}},{key:"render",value:function(){var e=this.props.account;return i.a.createElement("div",{className:"rm-signed-out-full-page"},i.a.createElement("div",{className:"page-single-form"},i.a.createElement(pe,null),i.a.createElement("div",null,i.a.createElement("h2",{className:"text-color-fail font-weight-bold text-align-center"},"ACCESS DENIED"),i.a.createElement("h3",{className:"text-color-primary text-align-center"},"Hello ",e.UserName?e.UserName:e.UserEmail),i.a.createElement("p",null,"You do not have permission to access the help section for icheck for Building."),i.a.createElement(re.a,{gutter:[0,16]},i.a.createElement(oe.a,{span:24,style:{textAlign:"center"}},i.a.createElement(F.a,{type:"primary",onClick:this.handleSignOutClick.bind(this)},"TRY OTHER ACCOUNT ",i.a.createElement(D.a,null)))),i.a.createElement("p",{className:"text-color-bv-light-grey"},"You have tried login with ",e.UserEmail,". If you have account using any other email ID, please try login with that email ID."))))}}]),t}(n.Component),Re=Object(u.b)((function(e){return{account:e.account,isUserHaveAccess:y(e.account.UserDetails)}}),l)(Object(O.f)(Be)),Pe=t(403),Fe=t(227),ze=t(398),Me=t(399),De=t(400),qe=t(401),Ve=[{title:"What's new",key:"whats-new",icon:i.a.createElement(ze.a,{className:"text-color-fail"})},{title:"Release notes",key:"release-notes",children:[{title:"V2.3.0",key:"v2-3-0"},{title:"V2.2.0",key:"v2-2-0"},{title:"V2.1.0",key:"v2-1-0"},{title:"V2.0.0",key:"v2-0-0"},{title:"V1.0.3-BETA",key:"v1-0-3-beta"},{title:"V1.0.2-BETA",key:"v1-0-2-beta"},{title:"V1.0.1-BETA",key:"v1-0-1-beta"},{title:"V1.0.0-BETA",key:"v1-0-0-beta"}]},{title:"User guide",key:"user-guide",type:"header"},{title:"Get started",key:"user-guide/get-started",children:[{title:"Rule checking procedure",key:"rule-checking-procedure"},{title:"User interface",key:"user-interface"},{title:"Interacting with user interface",key:"interacting-with-user-interface",children:[{title:"Popup",key:"popup"},{title:"Collapsible content",key:"collapsible-content"},{title:"Tree structure",key:"tree-structure"},{title:"Search content",key:"search-content"},{title:"Toggle buttons",key:"toggle-buttons"}]}]},{title:"Account",key:"user-guide/account",children:[{title:"Create new account",key:"create-new-account"},{title:"Sign in",key:"sign-in"},{title:"Subscription",key:"subscription",children:[{title:"FREE trial subscription",key:"free-trial-subscription"},{title:"Premium subscription",key:"premium-subscription"}]},{title:"Computer authentication",key:"computer-authentication"},{title:"Account functionalities",key:"account-functionalities",children:[{title:"Edit profile",key:"edit-profile"},{title:"Change password",key:"change-password"}]},{title:"Organization account",key:"organization-account"}]},{title:"Help",key:"user-guide/help",children:[{title:"Accessing sample projects",key:"accessing-sample-projects"},{title:"Accessing tutorials",key:"accessing-tutorials"},{title:"Give feedback",key:"give-feedback"},{title:"Ask support",key:"ask-support"}]},{title:"Project",key:"user-guide/project",children:[{title:"Project file",key:"project-file"},{title:"Project menu",key:"project-menu"},{title:"Project wizard",key:"project-wizard",children:[{title:"Step 1 : Create project",key:"step-1-create-project"},{title:"Step 2 : Create facility",key:"step-2-create-facility"},{title:"Step 3 : Assign facility category",key:"step-3-assign-facility-category"}]}]},{title:"Settings",key:"user-guide/settings",children:[{title:"Compliance code",key:"compliance-code"},{title:"Facility spaces",key:"facility-spaces"},{title:"Facility and category",key:"facility-and-category"},{title:"Naming server",key:"naming-server",children:[{title:"Accessing naming sever",key:"accessing-naming-sever"},{title:"Viewing and editing values",key:"viewing-and-editing-values"},{title:"Naming sever file",key:"naming-sever-file"}]}]},{title:"Rule compliance",key:"user-guide/rule-compliance",children:[{title:"Spaces",key:"spaces"},{title:"Rules",key:"rules"},{title:"Check",key:"check"},{title:"Results",key:"results",children:[{title:"Understanding results",key:"understanding-results"},{title:"Examples of viewing results",key:"examples-of-viewing-results"},{title:"Exporting results",key:"exporting-results"}]},{title:"Result view control",key:"result-view-control",children:[{title:"Filter results",key:"filter-results"},{title:"Select spaces and objects",key:"select-spaces-and-objects"},{title:"Reset result view",key:"reset-result-view"},{title:"Toggle view mode",key:"toggle-view-mode"}]}]},{title:"Quick access bar",key:"user-guide/quick-access-bar",children:[{title:"Plug-in settings",key:"plug-in-settings"},{title:"Refresh plug-in",key:"refresh-plug-in"},{title:"Scroll to top",key:"scroll-to-top"},{title:"Highlight from model",key:"highlight-from-model"},{title:"Highlight element",key:"highlight-element"},{title:"Clear selection",key:"clear-selection"},{title:"Filter result",key:"filter-result"},{title:"Reset result",key:"reset-result"}]},{title:"Tutorials",key:"tutorials",type:"header"},{title:" Using icheck for Building",key:"tutorials/general-tutorial-of-using-plugin",icon:i.a.createElement(Me.a,null)},{title:"Using the naming server",key:"tutorials/using-the-naming-server",icon:i.a.createElement(Me.a,null)},{title:"Modeling parking and EVCS facilities",key:"tutorials/modeling-parking-and-evcs-facilities",icon:i.a.createElement(Me.a,null)},{title:"Modeling medical facilities",key:"tutorials/modeling-medical-facilities",icon:i.a.createElement(Me.a,null)},{title:"Modeling walking surfaces",key:"tutorials/modeling-walking-surfaces",icon:i.a.createElement(Me.a,null)},{title:"Sample projects",key:"sample-projects",type:"header"},{title:"General facility",key:"sample-projects/general-facility",icon:i.a.createElement(De.a,null)},{title:"Medical facility",key:"sample-projects/medical-facility",icon:i.a.createElement(De.a,null)},{title:"Judicial facility \u2013 Court floor holding cell",key:"sample-projects/judicial-facility\u2013court-floor-holding-cell",icon:i.a.createElement(De.a,null)},{title:"Judicial facility \u2013 Central holding cell",key:"sample-projects/judicial-facility\u2013central-holding-cell",icon:i.a.createElement(De.a,null)},{title:"Detention and correctional facility",key:"sample-projects/detention-and-correctional-facility",icon:i.a.createElement(De.a,null)},{title:"Assembly facility",key:"sample-projects/assembly-facility",icon:i.a.createElement(De.a,null)},{title:"Model preparation guide",key:"model-preparation-guide",type:"header"},{title:"Terms used",key:"model-preparation-guide/terms-used"},{title:"Sample examples",key:"model-preparation-guide/sample-examples"},{title:"Preparing BIM model",key:"model-preparation-guide/preparing-BIM-model",children:[{title:"Parking and EVCS",key:"parking-and-EVCS"},{title:"Passenger drop-off & loading zones",key:"passenger-drop-off-loading-zones"},{title:"Walking surfaces",key:"walking-surfaces"},{title:"Curb ramps",key:"curb-ramps"},{title:"Ramps",key:"ramps"},{title:"Entrance, exit, doorways, and gates",key:"entrance-exit-doorways-and-gates"},{title:"Stairways",key:"stairways"},{title:"Elevators",key:"elevators"},{title:"Toilets and bathing rooms",key:"toilets-and-bathing-rooms"},{title:"Space allowance and reach ranges",key:"space-allowance-and-reach-ranges"},{title:"Assembly facilities",key:"assembly-facilities"},{title:"Medical and long-term care facility",key:"medical-and-long-term-care-facility"},{title:"Dining and work surfaces",key:"dining-and-work-surfaces"},{title:"Judicial facilities",key:"judicial-facilities"},{title:"Detention and correctional facilities",key:"detention-and-correctional-facilities"},{title:"Sauna and steam rooms",key:"sauna-and-steam-rooms"},{title:"Kitchens, kitchenettes, wet bars & sinks",key:"kitchens-kitchenettes-wet-bars-sinks"},{title:"Dressing, fitting, and locker rooms",key:"dressing-fitting-and-locker-rooms"},{title:"Windows",key:"windows"}]},{title:"Installation guide",key:"installation-guide",type:"header"},{title:"Installation",key:"installation-guide/installation",icon:i.a.createElement(qe.a,null)},{title:"Uninstallation",key:"installation-guide/uninstallation",icon:i.a.createElement(qe.a,null)},{title:"Plug-in update",key:"installation-guide/plug-in-update",icon:i.a.createElement(qe.a,null)}],Ue=t(230),Le=function(){return i.a.createElement("span",{className:"font-weight-bold text-color-primary"},"icheck for Building")},He=function e(a,t,l,n){var i=a&&a.map((function(a){return a[t]===l?{obj:a,path:n}:a.children?e(a.children,t,l,[].concat(Object(Ue.a)(n),[a.key])):null}));return(i=i.filter(Boolean)).length>0?i[0]:null},Ye=function e(a){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return a&&a.map((function(a){return"header"===a.type?{title:a.title,key:a.key,path:"/"+a.key}:a.children?{title:a.title,key:a.key,children:e(a.children,t+"/"+a.key),path:t+"/"+a.key}:{title:a.title,key:a.key,path:t+"/"+a.key}}))},We=t(402),Ge=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){var e;Object(r.a)(this,t);for(var l=arguments.length,n=new Array(l),i=0;i0?this.getUserGroupString(e.UserGroups):"No access"}];return i.a.createElement("div",{className:"bv-drawer-container"},i.a.createElement("div",{className:"bv-drawer-padding-container bv-border-bottom"},i.a.createElement(it.a,{className:"bv-table left-aligned with-border",size:"middle",bordered:!1,pagination:!1,dataSource:a,columns:[{title:"Attribute",dataIndex:"attribute",key:"attribute",width:"50%",className:"font-weight-bold"},{title:"Value",dataIndex:"attributeValue",key:"attributeValue",width:"50%"}],showHeader:!1,locale:{emptyText:i.a.createElement("span",null,"User data not available")}})))}}]),t}(n.Component),Xi=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(Qi)),$i=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleSaveProfileClick=function(e){l.setState({IsLoadingBtn:!0,ErrorMessageClass:"primary-message-box",ErrorMessage:"Updating profile",ErrorDescription:"Updating profile information...",IsErrorNotification:!0});var a=[],t={Name:"name",Value:e.full_name};a.push(t);var n={Name:"phone_number",Value:e.phone_number};a.push(n);var i={Name:"custom:organization",Value:e.organization};a.push(i),_.updateUserAttributes(a,l.handleUserAttributeSuccess.bind(Object(A.a)(l)),l.handleUserAttributeFailure.bind(Object(A.a)(l)))},l.state={IsLoadingBtn:!1,IsErrorNotification:!1,ErrorMessageClass:"",ErrorMessage:"",ErrorDescription:""},l}return Object(o.a)(t,[{key:"handleUserAttributeSuccess",value:function(e){console.log("results",e),this.getSetCurrentUser()}},{key:"handleUserAttributeFailure",value:function(e){var a;console.log("Update attribute failed",e),a="NetworkError"===e.code?i.a.createElement("div",null,i.a.createElement("p",null,"Unable to connect. Please check your internet connection.")):"InvalidParameterException"===e.code&&e.message.includes("phone number")?i.a.createElement("div",null,i.a.createElement("p",null,"The phone number does not have a valid format. Please provide valid phone number.")):i.a.createElement("div",null,i.a.createElement("p",null,"Unable to update your profile details. Please try again.")),this.setState({IsLoadingBtn:!1,ErrorMessageClass:"failed-message-box",ErrorMessage:"Update profile failed",ErrorDescription:a,IsErrorNotification:!0})}},{key:"getSetCurrentUser",value:function(){_.getUserAttrs(this.handleGetSetUserSuccess.bind(this),this.handleGetSetUserFailure.bind(this))}},{key:"handleGetSetUserSuccess",value:function(e){var a,t,l,n;e.email&&(a=e.email),e.name&&(t=e.name),e.phone_number&&(n=e.phone_number),e["custom:organization"]&&(l=e["custom:organization"]),this.props.account_rdx_storeUserData({UserEmail:a,UserName:t,UserOrganization:l,UserPhone:n}),this.setState({IsLoadingBtn:!1,ErrorMessageClass:"success-message-box",ErrorMessage:"Profile updated",ErrorDescription:"Your profile information is updated successfully.",IsErrorNotification:!0})}},{key:"handleGetSetUserFailure",value:function(){this.setState({IsLoadingBtn:!1,ErrorMessageClass:"failed-message-box",ErrorMessage:"Update profile failed",ErrorDescription:"Unable to update your profile details. Please try again.",IsErrorNotification:!0})}},{key:"render",value:function(){var e=this.props.account,a={labelCol:{lg:{span:9},sm:{span:9},xs:{span:24}},wrapperCol:{lg:{span:15},sm:{span:15},xs:{span:24}}};return i.a.createElement("div",{className:"bv-drawer-container"},i.a.createElement("div",{className:"bv-drawer-padding-container bv-border-bottom"},i.a.createElement(B.a,{className:"bv-form left-aligned-form",onFinish:this.handleSaveProfileClick,initialValues:{full_name:e.UserName?e.UserName:"",organization:e.UserOrganization?e.UserOrganization:"",phone_number:e.UserPhone?e.UserPhone:""}},i.a.createElement(B.a.Item,Object.assign({name:"full_name",label:"Full name",hasFeedback:!0},a,{rules:[{required:!0,message:"Please enter valid name (Letters and spaces)",pattern:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$"}]}),i.a.createElement(R.a,{placeholder:"Enter full name"})),i.a.createElement(B.a.Item,Object.assign({name:"organization",label:"Organization",hasFeedback:!0},a,{rules:[{message:"Please enter valid organization name (Letters, spaces and .,-)",pattern:"^[a-zA-z][a-zA-Z., -]+$"}]}),i.a.createElement(R.a,{placeholder:"Enter organization"})),i.a.createElement(B.a.Item,Object.assign({name:"phone_number",label:"Phone",hasFeedback:!0},a,{rules:[{message:"Please enter valid phone number (Must start with +)",pattern:"^[+][0-9]{3,}"}]}),i.a.createElement(R.a,{placeholder:"Enter phone number"})),this.state.IsErrorNotification?i.a.createElement(B.a.Item,null,i.a.createElement(P.a,{className:this.state.ErrorMessageClass,message:this.state.ErrorMessage,description:this.state.ErrorDescription})):"",i.a.createElement(B.a.Item,Object.assign({},a,{label:" ",style:{marginTop:"20px"}}),i.a.createElement(F.a,{type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"Save profile ",i.a.createElement(Ne.a,null))))))}}]),t}(n.Component),ec=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)($i)),ac=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).handleResetPasswordClick=function(e){l.setState({IsLoadingBtn:!0}),e.new_password===e.confirm_new_password?_.changePassword(e.old_password,e.new_password,l.onResetPasswordSuccess.bind(Object(A.a)(l)),l.onResetPasswordFailure.bind(Object(A.a)(l))):l.setState({IsLoadingBtn:!1,ErrorMessageClass:"failed-message-box",ErrorMessage:"Password mismatch",ErrorDescription:"Both the new and confirm password should be same. Please provide the same password in both the fields.",IsErrorNotification:!0})},l.state={IsLoadingBtn:!1,IsErrorNotification:!1,ErrorMessageClass:"",ErrorMessage:"",ErrorDescription:""},l}return Object(o.a)(t,[{key:"onResetPasswordSuccess",value:function(){this.setState({IsLoadingBtn:!1,ErrorMessageClass:"success-message-box",ErrorMessage:"Password changed",ErrorDescription:"Your password is successfully changed. During your next SIGN IN, use the new password to SIGN IN to your account.",IsErrorNotification:!0})}},{key:"onResetPasswordFailure",value:function(e){var a="";switch(e.code){case"InvalidParameterException":a="Provide the valid old and new password.";break;case"InvalidPasswordException":a="Password does not confirm to the policy. Make sure to have at least 8 characters that includes at least one capital letter, one small letter, one special character and a number.";break;case"TooManyRequestsException":a=" You have reached the maximum attempts to reset the password. Please try again after some time.";break;case"LimitExceededException":a="You have reached the maximum attempts to reset the password. Please try again after some time.";break;case"NotAuthorizedException":a="You are not authorized to change the password. Please provide the correct old password.";break;case"UserNotFoundException":a="We could not find your account for icheck for Building. Please verify your login details and try again or contact icheckbuilding.support@bureauveritas.com for further help.";break;default:a="We are unable to reset the password for your account. Please try again or contact icheckbuilding.support@bureauveritas.com for further help."}this.setState({IsLoadingBtn:!1,ErrorMessageClass:"failed-message-box",ErrorMessage:"Unable to set password",ErrorDescription:a,IsErrorNotification:!0})}},{key:"render",value:function(){var e={labelCol:{lg:{span:9},sm:{span:9},xs:{span:24}},wrapperCol:{lg:{span:15},sm:{span:15},xs:{span:24}}};return i.a.createElement("div",{className:"bv-drawer-container"},i.a.createElement("div",{className:"bv-drawer-padding-container bv-border-bottom"},i.a.createElement(B.a,{className:"bv-form left-aligned-form",onFinish:this.handleResetPasswordClick},i.a.createElement(B.a.Item,Object.assign({name:"old_password",label:"Old password",hasFeedback:!0},e,{rules:[{required:!0,message:"Please enter valid password",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{placeholder:"Enter old password"})),i.a.createElement(B.a.Item,Object.assign({name:"new_password",label:"New password",hasFeedback:!0},e,{rules:[{required:!0,message:"Please enter valid password",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{placeholder:"Enter new password"})),i.a.createElement(B.a.Item,Object.assign({name:"confirm_new_password",label:"Confirm password",hasFeedback:!0},e,{rules:[{required:!0,message:"Please confirm your password!",pattern:"(?=^.{8,50}$)((?=.*d)(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"}]}),i.a.createElement(R.a.Password,{placeholder:"Confirm new password"})),this.state.IsErrorNotification?i.a.createElement(B.a.Item,null,i.a.createElement(P.a,{className:this.state.ErrorMessageClass,message:this.state.ErrorMessage,description:this.state.ErrorDescription})):"",i.a.createElement(B.a.Item,Object.assign({},e,{label:" ",style:{marginTop:"20px"}}),i.a.createElement(F.a,{type:"primary",loading:this.state.IsLoadingBtn,htmlType:"submit"},"Reset password ",i.a.createElement(M.a,null))),i.a.createElement("p",{className:"text-color-bv-light-grey",style:{marginTop:"20px"}},"Password policy : Min password length is 8. The password must contain lowercase letters, uppercase letters, numbers, and special character."))))}}]),t}(n.Component),tc=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){return Object(r.a)(this,t),a.apply(this,arguments)}return Object(o.a)(t,[{key:"render",value:function(){return i.a.createElement("div",{className:"bv-drawer-container"},i.a.createElement("div",{className:"bv-drawer-padding-container bv-border-bottom"},i.a.createElement("p",null,Le()," is an intelligent solution to check Revit BIM model for accessibility code compliance according to the 2019 California Building Code (CBC). The solution checks the BIM model according to Chapter 11B : Accessibility to Public Buildings, Public Accommodations, Commercial Buildings and Public Housing."),i.a.createElement("p",null,"Current version is : ",i.a.createElement("span",{className:"text-color-primary font-weight-bold"},"V","2.0.0"))))}}]),t}(n.Component),lc=Object(O.f)(tc),nc=Ki.a.SubMenu,ic=S.a.Header,cc=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){var e;return Object(r.a)(this,t),(e=a.call(this)).handleShowProfileDrawer=function(){e.setState({ShowProfileDrawer:!0})},e.handleHideProfileDrawer=function(){e.setState({ShowProfileDrawer:!1})},e.handleShowHelpDrawer=function(){e.setState({ShowHelpDrawer:!0})},e.handleHideHelpDrawer=function(){e.setState({ShowHelpDrawer:!1})},e.handleHideResetPasswordDrawer=function(){e.setState({ShowResetPasswordDrawer:!1})},e.handleShowResetPasswordDrawer=function(){e.setState({ShowResetPasswordDrawer:!0})},e.handleHideEditProfileDrawer=function(){e.setState({ShowEditProfileDrawer:!1})},e.handleShowEditProfileDrawer=function(){e.setState({ShowEditProfileDrawer:!0})},e.state={ShowHelpDrawer:!1,ShowProfileDrawer:!1,ShowEditProfileDrawer:!1,ShowResetPasswordDrawer:!1},e}return Object(o.a)(t,[{key:"handleSignOutClick",value:function(){this.props.account_rdx_clearData(),_.signOut(),this.props.history.push("/login"),document.body.classList.remove("full-height-body")}},{key:"render",value:function(){var e=this.props.account;return i.a.createElement(ic,null,i.a.createElement("div",{className:"rule-details-empty-div"}),i.a.createElement("div",{className:"header-container"},i.a.createElement(re.a,null,i.a.createElement(oe.a,{lg:24,md:24,sm:24,xs:24},i.a.createElement("div",{className:"header-image-container"},i.a.createElement(p.b,{to:"/"},i.a.createElement("img",{className:"header-logo hide-on-mobile",src:"/images/logo/icheck-logo-with-title-no-bv-blue.svg",alt:"icheck for Building"})),i.a.createElement(p.b,{to:"/"},i.a.createElement("img",{className:"header-logo hide-on-tablet hide-on-computer",src:"/images/logo/icheck-logo-only-icon-bv-blue.svg",alt:"icheck for Building"}))),i.a.createElement("div",{className:"header-name"},"HELP"),i.a.createElement(Ki.a,{className:"header-menu",theme:"light",mode:"horizontal",selectable:!1,style:{float:"right"}},i.a.createElement(Ki.a.Item,{key:"help",onClick:this.handleShowHelpDrawer.bind(this),className:"header-menu-icon"},i.a.createElement(Ha.a,{className:"header-icon-menu"})),i.a.createElement(nc,{key:"account-menu",title:i.a.createElement(z.a,{className:"header-icon-menu"}),style:{marginRight:"0px"},className:"header-menu-icon"},i.a.createElement("div",{className:"account-header"},e.UserName?e.UserName:e.UserEmail),i.a.createElement(Ki.a.Item,{key:"view-profile",onClick:this.handleShowProfileDrawer.bind(this)},"View profile"),i.a.createElement(Ki.a.Item,{key:"edit-profile",onClick:this.handleShowEditProfileDrawer.bind(this)},"Edit profile"),i.a.createElement(Ki.a.Item,{key:"reset-password",onClick:this.handleShowResetPasswordDrawer.bind(this)},"Reset password"),i.a.createElement(Ki.a.Divider,null),i.a.createElement(Ki.a.Item,{key:"sign-out",onClick:this.handleSignOutClick.bind(this)},"Sign Out"))),i.a.createElement(Zi.a,{width:500,placement:"right",closable:!0,title:"Help",className:"bv-drawer with-close-icon",onClose:this.handleHideHelpDrawer,visible:this.state.ShowHelpDrawer,footer:i.a.createElement(re.a,{type:"flex",align:"middle"},i.a.createElement(oe.a,{span:12},i.a.createElement(F.a,{type:"primary",danger:!0,onClick:this.handleHideHelpDrawer},"Close")),i.a.createElement(oe.a,{style:{textAlign:"right"},span:12},i.a.createElement("span",{className:"text-color-primary",style:{paddingRight:"10px"}},i.a.createElement(Ji.a,null)," V","2.0.0"),i.a.createElement("img",{style:{width:"26px"},src:"/images/logo/BV-logo-no-title-gray.svg",alt:"Bureau Veritas"})))},i.a.createElement(lc,null)),i.a.createElement(Zi.a,{width:500,placement:"right",closable:!0,title:"Profile details",className:"bv-drawer with-close-icon",onClose:this.handleHideProfileDrawer,visible:this.state.ShowProfileDrawer,footer:i.a.createElement(re.a,{type:"flex",align:"middle"},i.a.createElement(oe.a,{span:12},i.a.createElement(F.a,{type:"primary",danger:!0,onClick:this.handleHideProfileDrawer},"Close")),i.a.createElement(oe.a,{style:{textAlign:"right"},span:12},i.a.createElement("span",{className:"text-color-primary",style:{paddingRight:"10px"}},i.a.createElement(Ji.a,null)," V","2.0.0"),i.a.createElement("img",{style:{width:"26px"},src:"/images/logo/BV-logo-no-title-gray.svg",alt:"Bureau Veritas"})))},i.a.createElement(Xi,null)),i.a.createElement(Zi.a,{width:500,placement:"right",closable:!0,destroyOnClose:!0,title:"Edit profile",className:"bv-drawer with-close-icon",onClose:this.handleHideEditProfileDrawer,visible:this.state.ShowEditProfileDrawer,footer:i.a.createElement(re.a,{type:"flex",align:"middle"},i.a.createElement(oe.a,{span:12},i.a.createElement(F.a,{type:"primary",danger:!0,onClick:this.handleHideEditProfileDrawer},"Close")),i.a.createElement(oe.a,{style:{textAlign:"right"},span:12},i.a.createElement("span",{className:"text-color-primary",style:{paddingRight:"10px"}},i.a.createElement(Ji.a,null)," V","2.0.0"),i.a.createElement("img",{style:{width:"26px"},src:"/images/logo/BV-logo-no-title-gray.svg",alt:"Bureau Veritas"})))},i.a.createElement(ec,null)),i.a.createElement(Zi.a,{width:500,placement:"right",closable:!0,destroyOnClose:!0,title:"Reset password",className:"bv-drawer with-close-icon",onClose:this.handleHideResetPasswordDrawer,visible:this.state.ShowResetPasswordDrawer,footer:i.a.createElement(re.a,{type:"flex",align:"middle"},i.a.createElement(oe.a,{span:12},i.a.createElement(F.a,{type:"primary",danger:!0,onClick:this.handleHideResetPasswordDrawer},"Close")),i.a.createElement(oe.a,{style:{textAlign:"right"},span:12},i.a.createElement("span",{className:"text-color-primary",style:{paddingRight:"10px"}},i.a.createElement(Ji.a,null)," V","2.0.0"),i.a.createElement("img",{style:{width:"26px"},src:"/images/logo/BV-logo-no-title-gray.svg",alt:"Bureau Veritas"})))},i.a.createElement(ac,null))))))}}]),t}(n.Component),sc=Object(u.b)((function(e){return{account:e.account,isUserHaveAccess:y(e.account.UserDetails)}}),l)(Object(O.f)(cc)),rc=t(421),oc=S.a.Footer,mc=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(){return Object(r.a)(this,t),a.apply(this,arguments)}return Object(o.a)(t,[{key:"render",value:function(){var e=this.props.account;return i.a.createElement("div",null,e.SignedInState?i.a.createElement(oc,null,i.a.createElement("div",{className:"footer-container"},i.a.createElement(re.a,{type:"flex",align:"middle",style:{width:"100%"}},i.a.createElement(oe.a,{span:24},i.a.createElement("a",{href:"https://group.bureauveritas.com/",target:"_blank",rel:"noopener noreferrer",style:{paddingRight:"16px"}},i.a.createElement("img",{style:{width:"26px"},src:"/images/logo/BV-logo-no-title-gray.svg",alt:"Bureau Veritas"})),i.a.createElement("div",{className:"app-version"},i.a.createElement(Ji.a,null)," V","2.0.0"),i.a.createElement(rc.a,null)," Bureau Veritas. ",i.a.createElement("span",{className:"hide-on-mobile"},"All rights reserved."))))):i.a.createElement("div",{className:"rm-signed-out-footer-container"},i.a.createElement("div",{className:"footer-container"},i.a.createElement(re.a,{type:"flex",align:"middle",style:{width:"100%"}},i.a.createElement(oe.a,{span:24},i.a.createElement("a",{href:"https://group.bureauveritas.com/",target:"_blank",rel:"noopener noreferrer",style:{paddingRight:"16px"}},i.a.createElement("img",{style:{width:"26px"},src:"/images/logo/BV-logo-no-title-gray.svg",alt:"Bureau Veritas"})),i.a.createElement("div",{className:"app-version"},i.a.createElement(Ji.a,null)," V","2.0.0"),i.a.createElement(rc.a,null)," Bureau Veritas. ",i.a.createElement("span",{className:"hide-on-mobile"},"All rights reserved."))))))}}]),t}(n.Component),dc=Object(u.b)((function(e){return{account:e.account}}),l)(Object(O.f)(mc)),uc=t(384),pc=t(422),gc=t(168),hc=t(423),vc=t(116),bc=S.a.Sider,Ec=R.a.Search,fc=function(e){var a="";return e.title&&(a=a+" "+e.title.toLowerCase()),e.description&&(a=a+" "+e.description.toLowerCase()),a},Nc=function(e){Object(m.a)(t,e);var a=Object(d.a)(t);function t(e){var l;return Object(r.a)(this,t),(l=a.call(this,e)).onSidebarCollapse=function(e){l.setState({isSidebarCollapsed:e})},l.onSelect=function(e,a){var t=a.node,n=l.state.expandedKeys;if(0!==e.length&&(l.setState({selectedKeys:e}),l.props.history.push({pathname:t.path}),window.innerWidth<992&&l.setState({isSidebarCollapsed:!0})),t.children&&t.children.length>0){if(t.expanded){var i=n.findIndex((function(e){return e===t.key}));n.splice(i,1)}else n.push(t.key);l.setState({expandedKeys:n,autoExpandParent:!1})}},l.onExpand=function(e){l.setState({expandedKeys:e,autoExpandParent:!1})},l.onChange=function(e){var a=Ve,t=e.target.value,n=t.toLowerCase();if(t){var i=l.dataList.map((function(e){return fc(e).indexOf(n)>-1?function e(a,t){for(var l,n=0;n-1){e=!0;break}}return e}();l.setState({expandedKeys:i,searchValue:t,autoExpandParent:!0,isMenuFound:c})}else l.setState({expandedKeys:[],searchValue:"",autoExpandParent:!0,isMenuFound:!0})},l.clearSearch=function(){l.setState({searchValue:"",isMenuFound:!0})},l.onSearchClick=function(e){e||ye("error","ERROR",i.a.createElement("p",null,"Provide the search value."),"bv-notification error-notification");l.setState({expandedKeys:[],searchValue:"",autoExpandParent:!0,isMenuFound:!0})},l.renderTreeNodes=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=l.state.searchValue,n=t.toLowerCase();return e&&e.map((function(e){if("header"===e.type)return{title:i.a.createElement("span",{className:"font-weight-bold text-color-fail"},e.title),key:e.key,className:"menu-header",path:"/"+(e.url?e.url:e.key)};var c,s,r=fc(e).indexOf(n),o=e.title,m=o.toLowerCase().indexOf(n),d=m>-1?o.substr(0,m):o,u=m>-1?o.substr(m,t.length):"",p=m>-1?o.substr(m+t.length):"";c=!!(t&&r>-1),s=!(t.length>0)||r>-1;var g=t&&r>-1?i.a.createElement("span",{className:c?"bv-filter-node":""},d,i.a.createElement("span",{className:"text-search-found text-border-bottom style-solid medium primary-color"},u),p):i.a.createElement("span",null,o);return e.children?{title:g,key:e.key,className:s?"tree-node-enabled":"tree-node-disabled",children:l.renderTreeNodes(e.children,a+"/"+(e.url?e.url:e.key)),icon:void 0===e.icon?i.a.createElement($t.a,null):e.icon,path:a+"/"+(e.url?e.url:e.key)}:{title:i.a.createElement("span",{className:"bv-tree-title-with-button"},g),key:e.key,className:s?"tree-node-enabled leaf-cursor-default":"tree-node-disabled leaf-cursor-default",icon:void 0===e.icon?i.a.createElement(pc.a,null):e.icon,path:a+"/"+(e.url?e.url:e.key)}}))},l.state={expandedKeys:[],searchValue:"",autoExpandParent:!0,isMenuFound:!0,selectedKeys:[],isSidebarCollapsed:!1},l.dataList=[],l.tree=l.renderTreeNodes(Ve),l.setSidebarCollapsedState=l.setSidebarCollapsedState.bind(Object(A.a)(l)),l}return Object(o.a)(t,[{key:"componentDidMount",value:function(){this.setSelectedKey(),function e(a,t){for(var l=0;l