define("metaserver/static/js/modules/clean/account/change_email_modals",["require","exports","tslib","create-react-class","react","react-dom","prop-types","metaserver/static/js/modules/clean/account/email_verify_reasons","metaserver/static/js/modules/clean/account/set_password_modal","metaserver/static/js/modules/clean/form","metaserver/static/js/modules/clean/react/input_dig","metaserver/static/js/modules/clean/react/components/modal_controller","metaserver/static/js/modules/clean/react/modal_dig","metaserver/static/js/modules/clean/viewer","metaserver/static/js/modules/core/i18n","metaserver/static/js/modules/core/notify","styled-components"],(function(e,t,a,s,i,r,o,n,l,m,d,u,c,f,g,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeEmailModal=t.ChangeEmailWarningModal=void 0,s=a.__importDefault(s),i=a.__importDefault(i),r=a.__importStar(r),o=a.__importDefault(o),m=a.__importStar(m),d=a.__importStar(d),u=a.__importStar(u),p=a.__importDefault(p);const _=i.default.createFactory(d.text),y=i.default.createFactory(d.password),v=[n.EmailVerificationReasons.ADD_COMMENT,n.EmailVerificationReasons.SUBSCRIBE_TO_COMMENTS,n.EmailVerificationReasons.SHARE_FILEVIEWER],M=p.default.div` .change-email-input { width: 100%; } `;class E extends i.default.Component{constructor(){super(...arguments),this.getSSOWarning=()=>{const{is_paired:e}=f.Viewer.get_viewer(),t=e&&"work"===this.props.user.role,a=this.props.user.sso_required;return t&&a?i.default.createElement("div",{className:"db-modal-message"},g.intl.formatMessage({id:"E+nkeD",defaultMessage:"Your {team} Dropbox uses single sign-on. If you change your email address you may not be able to sign in."},{team:f.Viewer.get_viewer().team_name})):null},this.getInboxWarning=()=>{const{is_paired:e}=f.Viewer.get_viewer();if(0===this.props.inboxCount)return null;let t=g.intl.formatMessage({id:"TwUPS4",defaultMessage:"{count, plural, one{Your {count} existing shared folder invitation will be removed if you change your email address.} other{Your {count} existing shared folder invitations will be removed if you change your email address.}}"},{count:this.props.inboxCount});return e&&"personal"===this.props.user.role?t=g.intl.formatMessage({id:"hImpHR",defaultMessage:"{count, plural, one{Your {count} existing shared folder invitation in your personal Dropbox will be removed if you change your email address.} other{Your {count} existing shared folder invitations in your personal Dropbox will be removed if you change your email address.}}"},{count:this.props.inboxCount}):e&&"work"===this.props.user.role&&g.intl.formatMessage({id:"LTnOTV",defaultMessage:"{count, plural, one{Your {count} existing shared folder invitation in your {team} Dropbox will be removed if you change your email address.} other{Your {count} existing shared folder invitations in your {team} Dropbox will be removed if you change your email address.}}"},{count:this.props.inboxCount,team:f.Viewer.get_viewer().team_name}),i.default.createElement("div",{className:"db-modal-message"},t)},this.showChange=e=>{var t;return e.preventDefault(),this.refs.modal.close(),null===(t=this.props)||void 0===t?void 0:t.onContinue()}}render(){return i.default.createElement(c.Modal,{title:g.intl.formatMessage({id:"VUO2oS",defaultMessage:"Warning!"}),acceptButtonText:g.intl.formatMessage({id:"3654OT",defaultMessage:"Continue anyway"}),dismissButtonText:g.intl.formatMessage({id:"JKXEU8",defaultMessage:"Cancel"}),onAccept:this.showChange,ref:"modal",style:"default-maestro"},this.getSSOWarning(),this.getInboxWarning())}}t.ChangeEmailWarningModal=E,E.displayName="ChangeEmailWarningModal",E.propTypes={user:o.default.object,inboxCount:o.default.number,onContinue:o.default.func};const w=s.default({displayName:"ChangeEmailModal",mounted:!1,propTypes:{user:o.default.object,onChange:o.default.func,onVerificationCheck:o.default.func,fromCheckup:o.default.bool,reason:o.default.string},getInitialState:()=>({submitting:!1,errors:{},userConfirmedSetPassword:!1}),render(){return this.props.user.has_never_set_password&&!this.state.userConfirmedSetPassword?i.default.createElement(l.SetPasswordModal,{email:this.props.user.email,reason:g.intl.formatMessage({id:"Vrzvo2",defaultMessage:"For your security, Dropbox requires you to set a password to change your email."}),onUserConfirm:()=>this.setState({userConfirmedSetPassword:!0})}):v.includes(this.props.reason)?i.default.createElement(c.Modal,{title:g.intl.formatMessage({id:"THOQIj",defaultMessage:"Update ‘{email}’"},{email:this.props.user.email}),className:"change-email-modal--maestro",acceptButtonText:g.intl.formatMessage({id:"hPUPiA",defaultMessage:"Update email"}),dismissButtonText:g.intl.formatMessage({id:"8fk5Hk",defaultMessage:"Cancel"}),onAccept:this.handleSubmit,submitting:this.state.submitting,ref:"modal",style:"default-maestro"},i.default.createElement(M,null,i.default.createElement("form",{action:"/account/change_email",className:"change-email-form",onSubmit:this.handleSubmit,onKeyDown:this.handleKey,ref:"form"},i.default.createElement("div",{className:"change-email-message"},this.getPrompt()),i.default.createElement("div",{className:"change-email-inputs"},i.default.createElement("div",{className:"change-email-input"},i.default.createElement("div",{className:"change-email-input-label"},g.intl.formatMessage({id:"mMKYfC",defaultMessage:"New email"})),_({className:"change-email-input",name:"email",label:g.intl.formatMessage({id:"R5DNWc",defaultMessage:"you@mail.com"}),error:this.state.errors.email,autoComplete:"off"})),i.default.createElement("div",{className:"change-email-input"},i.default.createElement("div",{className:"change-email-input-label"},g.intl.formatMessage({id:"VvZ36k",defaultMessage:"Confirm email"})),_({className:"change-email-input",name:"confirm_email",label:g.intl.formatMessage({id:"R5DNWc",defaultMessage:"you@mail.com"}),error:this.state.errors.confirm_email,autoComplete:"off"})),i.default.createElement("div",{className:"change-email-input"},i.default.createElement("div",{className:"change-email-input-label"},g.intl.formatMessage({id:"ICoFby",defaultMessage:"Dropbox password"})),y({className:"change-email-input",name:"password",label:g.intl.formatMessage({id:"Lo93wl",defaultMessage:"Minimum 5 characters"}),error:this.state.errors.password,autoComplete:"off"})),i.default.createElement("input",{type:"hidden",name:"_subject_uid",value:this.props.user.id}),i.default.createElement("input",{type:"hidden",name:"from_checkup",value:`${!!this.props.fromCheckup}`}))))):i.default.createElement(c.Modal,{title:g.intl.formatMessage({id:"THOQIj",defaultMessage:"Update ‘{email}’"},{email:this.props.user.email}),className:"change-email-modal",acceptButtonText:g.intl.formatMessage({id:"hPUPiA",defaultMessage:"Update email"}),dismissButtonText:g.intl.formatMessage({id:"8fk5Hk",defaultMessage:"Cancel"}),onAccept:this.handleSubmit,submitting:this.state.submitting,ref:"modal"},i.default.createElement(M,null,i.default.createElement("form",{action:"/account/change_email",className:"change-email-form",onSubmit:this.handleSubmit,onKeyDown:this.handleKey,ref:"form"},i.default.createElement("div",null,this.getPrompt()),i.default.createElement("div",{className:"change-email-inputs"},_({className:"change-email-input",name:"email",placeholder:g.intl.formatMessage({id:"mMKYfC",defaultMessage:"New email"}),error:this.state.errors.email,autoComplete:"off"}),_({className:"change-email-input",name:"confirm_email",placeholder:g.intl.formatMessage({id:"VvZ36k",defaultMessage:"Confirm email"}),error:this.state.errors.confirm_email,autoComplete:"off"}),y({className:"change-email-input",name:"password",placeholder:g.intl.formatMessage({id:"TA7IaN",defaultMessage:"Dropbox password"}),error:this.state.errors.password,autoComplete:"off"}),i.default.createElement("input",{type:"hidden",name:"_subject_uid",value:this.props.user.id}),i.default.createElement("input",{type:"hidden",name:"from_checkup",value:`${!!this.props.fromCheckup}`})))))},componentDidMount(){this.mounted=!0},componentWillUnmount(){this.mounted=!1},handleKey(e){if(13===e.keyCode&&"INPUT"===(null!=e.target?e.target.tagName:void 0))return this.handleSubmit(e)},handleSubmit(e){if(e.preventDefault(),!this.state.submitting)return this.submit()},submit(){this.setState({submitting:!0,errors:{}});const e=r.findDOMNode(this.refs.form);return m.submit(e,this._success,this._error,this._complete)},_success(e){var t,a,s;const i=null===(t=r.findDOMNode(this.refs.form).querySelector('input[name="email"]'))||void 0===t?void 0:t.value,o="NEEDS_VERIFICATION"===e;return u.unmountModal(),o?null===(a=this.props)||void 0===a?void 0:a.onVerificationCheck(i):null===(s=this.props)||void 0===s?void 0:s.onChange(i)},_error(e){return"string"==typeof e?h.Notify.error(e):e?this.setState({errors:e}):h.Notify.error(g.intl.formatMessage({id:"A1ZtqA",defaultMessage:"There was a problem completing this request."}))},_complete(){if(this.mounted)return this.setState({submitting:!1})},getPrompt(){const{is_paired:e}=f.Viewer.get_viewer(),t=this.props.user.email_verified;return e&&"personal"===this.props.user.role?t?g.intl.formatMessage({id:"SSo9BY",defaultMessage:"Enter a new email address for your personal Dropbox. You’ll need to verify your new email address in order to finish updating your personal email."}):g.intl.formatMessage({id:"2v/Ulh",defaultMessage:"Enter a new email address for your personal Dropbox."}):e&&"work"===this.props.user.role?t?g.intl.formatMessage({id:"w72QA8",defaultMessage:"Enter a new email address for your {team} Dropbox. You’ll need to verify your new email address in order to finish updating your {team} email."},{team:f.Viewer.get_viewer().team_name}):g.intl.formatMessage({id:"DbvzPc",defaultMessage:"Enter a new email address for your personal Dropbox."}):t?g.intl.formatMessage({id:"BFwGQf",defaultMessage:"You’ll need to verify your new email address in order to finish updating your email."}):""}});t.ChangeEmailModal=w})),define("metaserver/static/js/modules/clean/account/email",["require","exports","tslib","react","metaserver/static/js/modules/clean/account/change_email_modals","metaserver/static/js/modules/clean/account/email_verify","metaserver/static/js/modules/clean/account/email_verify_reasons","metaserver/static/js/modules/clean/account/verify_email_modals","metaserver/static/js/modules/clean/react/components/modal_controller","metaserver/static/js/modules/clean/viewer","metaserver/static/js/modules/core/browser","metaserver/static/js/modules/core/exception","metaserver/static/js/modules/core/i18n","metaserver/static/js/modules/core/notify","metaserver/static/js/modules/core/uri","metaserver/static/js/modules/clean/event_dispatcher"],(function(e,t,a,s,i,r,o,n,l,m,d,u,c,f,g,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeEmail=t.EmailVerification=void 0,s=a.__importDefault(s),r=a.__importDefault(r),l=a.__importStar(l),d=a.__importStar(d),u=a.__importStar(u);class p{constructor(e){var t;this.role=e,this.user=this.role?m.Viewer.get_viewer().get_user_by_role(this.role,!0):m.Viewer.get_viewer().deprecated_first_user_in_the_cookie,this.email_to_verify=null===(t=this.user)||void 0===t?void 0:t.email,this.verify_for_change=!1}static initClass(){this.prototype.polling=!1,this.prototype.show_resend=!1}static getForRole(e){return this.initalized||(this.legacy=new p(void 0),this.personal=new p("personal"),this.work=new p("work"),null!=this.reason&&this.propagate_reason(),this.initalized=!0),"personal"===e?this.personal:"work"===e?this.work:this.legacy}static get_for_user(e){return this.getForRole(null==e?void 0:e.role)}static reset(){return this.initalized=!1}static set_reason(e){this.reason=e,this.initalized&&this.propagate_reason()}static propagate_reason(){[this.legacy,this.personal,this.work].map(e=>e.reason=this.reason)}set_email_to_verify(e){var t;return null===e&&(e=void 0),this.email_to_verify=e,this.verify_for_change=this.email_to_verify!==(null===(t=this.user)||void 0===t?void 0:t.email)}send_email(e,t){return r.default.send_verification_email(this.user,this.email_to_verify,e,t)}flash_email_sent_notification(){return f.Notify.success(c.intl.formatMessage({id:"EEEqGq",defaultMessage:"Verification email sent to {email}"},{email:this.email_to_verify}))}ensure_polling(e){return r.default.listen_for_verification(this.user,this.email_to_verify,()=>e&&this.user?(this.user.is_email_verified=!0,e()):d.reload())}email_sent(e,t,a){return this.show_resend=!0,this.show(null,t),a&&this.flash_email_sent_notification(),this.ensure_polling(e)}show(e,t,a){return null!=t&&p.set_reason(t),this.show_resend?this.show_resend_verify_modal(t,a):this.show_verify_modal(e,t,a)}_inferReason(e){if(e)return o.EmailVerificationReasons.CHANGE_EMAIL;const{reason:t}=p;return t||(u.reportStack("Email Verification reason should not be null",{severity:u.SEVERITY.NONCRITICAL,tags:["email_verify:null_reason"]}),null)}show_verify_modal(e,t,a){return null==t&&(t=this._inferReason(this.verify_for_change)),l.mountModal(s.default.createElement(n.VerifyEmailModal,{user:this.user,reason:t,email:this.email_to_verify,onCancel:a,onShowChange:()=>y.show(this.user,t),onEmailSent:()=>p.get_for_user(this.user).email_sent(e,t,!0)}))}show_resend_verify_modal(e,t){return null==e&&(e=this._inferReason(this.verify_for_change)),l.mountModal(s.default.createElement(n.ResendVerifyEmailModal,{user:this.user,email:this.email_to_verify,reason:e,onShowChange:()=>y.show(this.user,e),onEmailSent:()=>p.get_for_user(this.user).email_sent(null,e,!0),onCancel:t}))}verified_or_send_and_show(e,t){var a;return(null===(a=this.user)||void 0===a?void 0:a.is_email_verified)?(t&&t(),!0):(this.send_email(e,()=>this.email_sent(()=>(this.close(),t?t():void 0),e)),!1)}verified_or_show(e,t){return!(!this.user||!this.user.is_email_verified)||(this.show(null,e,t),!1)}show_sent_modal(){return l.mountModal(s.default.createElement(n.VerifyEmailSentModal,{email:this.email_to_verify}))}show_verified_modal(){return l.mountModal(s.default.createElement(n.EmailVerifiedModal,{reason:p.reason,email:this.email_to_verify}))}show_verified_and_changed_modal(){return l.mountModal(s.default.createElement(n.ChangedEmailVerifiedModal,{user:this.user,email:this.email_to_verify}))}close(){return l.unmountModal()}}t.EmailVerification=p,p.initClass();const _=new h.EventDispatcher,y={show:(e,t)=>y._should_show_warning(e)?y._show_warning_modal(e,t):y._show_change_modal(e,t),_should_show_warning(e){const{is_paired:t}=m.Viewer.get_viewer();return t&&"work"===(null==e?void 0:e.role)&&(null==e?void 0:e.sso_required)},_show_change_modal:(e,t)=>l.mountModal(s.default.createElement(i.ChangeEmailModal,{user:e,reason:t,onChange:t=>(y.trigger_change(e,t,!1),"/account"!==g.URI.parse(d.get_href()).getPath()?d.redirect("/home?send_verification_email=1"):t!==e.email?d.reload():void 0),onVerificationCheck:a=>{y.trigger_change(e,a,e.is_email_verified);const s=p.get_for_user(e);return s.set_email_to_verify(a),s.email_sent(null,t,!0)}})),_show_warning_modal:(e,t)=>l.mountModal(s.default.createElement(i.ChangeEmailWarningModal,{user:e,onContinue:()=>y._show_change_modal(e,t)})),add_listener(e,t){_.addListener(e.id,t)},remove_listener(e,t){_.removeListener(e.id,t)},trigger_change(e,t,a){_.trigger(e.id,{email:t,requiresVerification:a})}};t.ChangeEmail=y})),define("metaserver/static/js/modules/clean/account/email_verify",["require","exports","tslib","metaserver/static/js/modules/clean/deprecated_ajax/ajax_jquery"],(function(e,t,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),s=a.__importStar(s);const i={_POLLING:{},send_verification_email:(e,t,a,i)=>s.WebRequest({url:"/sendverifyemail",data:{email:t,reason:a},success:()=>i(),subject_user:e}),check_verification:(e,t,a,i)=>s.SilentBackgroundRequest({url:"/isemailverified",data:{email:t},success:e=>"ok"===e?a():i(),subject_user:e}),listen_for_verification(e,t,a){const s=`${null==e?void 0:e.id}:${t}`;if(!this._POLLING[s])return this._POLLING[s]=!0,this._poll_for_verification(e,t,a)},_poll_for_verification(e,t,a){return this.check_verification(e,t,a,()=>setTimeout(()=>this._poll_for_verification(e,t,a),4e3))}};t.default=i})),define("metaserver/static/js/modules/clean/account/set_password_modal",["require","exports","tslib","react","metaserver/static/js/modules/clean/deprecated_ajax/ajax_jquery","metaserver/static/js/modules/clean/react/components/modal_controller","metaserver/static/js/modules/clean/react/modal_dig","metaserver/static/js/modules/core/i18n","metaserver/static/js/modules/core/notify"],(function(e,t,a,s,i,r,o,n,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordModal=void 0,s=a.__importDefault(s),i=a.__importStar(i),r=a.__importStar(r);class m extends s.default.Component{constructor(e){super(e),this.state={sent:!1,submitting:!1}}resetResponseSuccess(e){"OK"===e.status?(l.Notify.success(n.intl.formatMessage({id:"SSwbgo",defaultMessage:"Sent an email to {email}"},{email:this.props.email})),this.setState({sent:!0,submitting:this.state.submitting})):this.resetEmailError()}resetEmailError(){l.Notify.error(n.intl.formatMessage({id:"fUWqZP",defaultMessage:"Could not send email. Please try again"}))}sendResetEmail(e){e.preventDefault(),this.setState({sent:this.state.sent,submitting:!0}),i.FormWebRequest({url:"/ajax_reset_start",data:{email:this.props.email},success:e=>this.resetResponseSuccess(JSON.parse(e)),error:()=>this.resetEmailError(),complete:()=>{this.setState({sent:this.state.sent,submitting:!1})}})}userConfirmSetPassword(){this.props.onUserConfirm?this.props.onUserConfirm():r.unmountModal()}static showInstance(e){r.mountModal(s.default.createElement(m,Object.assign({},e)))}render(){const e=n.intl.formatMessage({id:"W/iS2m",defaultMessage:"Dropbox will send an email to {email} with further instructions. You may need to check your spam folder or unblock no-reply@dropbox.com."},{email:this.props.email}),t=this.state.sent?n.intl.formatMessage({id:"Vep7Pr",defaultMessage:"Resend email"}):n.intl.formatMessage({id:"YZqQHq",defaultMessage:"Send email"}),a=n.intl.formatMessage({id:"WLFHmg",defaultMessage:"I’ve set a password"}),i=this.sendResetEmail.bind(this),r=this.userConfirmSetPassword.bind(this),l=s.default.createElement(o.ModalButtons,null,s.default.createElement(o.ModalButton,{variant:"primary",disabled:!this.state.sent,onClick:r},a),s.default.createElement(o.ModalButton,{variant:"opacity",onClick:i},t));return s.default.createElement(o.Modal,{title:n.intl.formatMessage({id:"6EcMoR",defaultMessage:"Set Password"}),onAccept:()=>this.userConfirmSetPassword(),buttonComponent:l},s.default.createElement("p",null,this.props.reason),s.default.createElement("p",null,e))}}t.SetPasswordModal=m,m.displayName="SetPasswordModal"})),define("metaserver/static/js/modules/clean/account/verify_email_modals",["require","exports","tslib","create-react-class","prop-types","react","metaserver/static/js/modules/clean/account/email_verify","metaserver/static/js/modules/clean/account/email_verify_reasons","metaserver/static/js/modules/clean/analytics","metaserver/static/js/modules/clean/react/components/modal_controller","metaserver/static/js/modules/clean/react/modal_dig","metaserver/static/js/modules/clean/viewer","metaserver/static/js/modules/core/i18n"],(function(e,t,a,s,i,r,o,n,l,m,d,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangedEmailVerifiedModal=t.EmailVerifiedModal=t.VerifyEmailSentModal=t.ResendVerifyEmailModal=t.VerifyEmailModal=void 0,s=a.__importDefault(s),i=a.__importDefault(i),r=a.__importDefault(r),o=a.__importDefault(o),m=a.__importStar(m);const f=[n.EmailVerificationReasons.ADD_COMMENT,n.EmailVerificationReasons.SUBSCRIBE_TO_COMMENTS,n.EmailVerificationReasons.SHARE_FILEVIEWER],g={renderChangeEmail(){return r.default.createElement("span",{className:"change-email-before-verify",onClick:this.showChangeEmail},c.intl.formatMessage({id:"62qYaH",defaultMessage:"Update email address"}))}},h=s.default({displayName:"VerifyEmailModal",mixins:[g],propTypes:{user:i.default.object,reason:i.default.string,email:i.default.string,onEmailSent:i.default.func,onCancel:i.default.func,onShowChange:i.default.func},_getStyle(){return f.includes(this.props.reason)?"default-maestro":"default"},render(){const e={reason:this.props.reason};return l.UserActivityLogger.log("web","email_verify_shown",e),r.default.createElement(d.Modal,{title:c.intl.formatMessage({id:"qSfYsl",defaultMessage:"Verify your email address"}),className:"verify-email",acceptButtonText:c.intl.formatMessage({id:"ldGo0I",defaultMessage:"Send email"}),dismissButtonText:c.intl.formatMessage({id:"rH6g3h",defaultMessage:"Cancel"}),onAccept:this.sendEmail,onDismiss:this.cancel,ref:"modal",style:this._getStyle(),altAction:this.renderChangeEmail()},r.default.createElement("div",{className:"db-modal-message"},r.default.createElement("div",null,this.getPrompt())))},sendEmail(e){return e.preventDefault(),o.default.send_verification_email(this.props.user,this.props.email,this.props.reason,this.emailSent)},cancel(){this.props.onCancel&&this.props.onCancel(),this.close()},close(){m.unmountModal()},emailSent(){var e;return this.close(),null===(e=this.props)||void 0===e?void 0:e.onEmailSent()},showChangeEmail(e){var t;const a={reason:this.props.reason};return l.UserActivityLogger.log("web","email_verify_change_first",a),e.preventDefault(),this.close(),null===(t=this.props)||void 0===t?void 0:t.onShowChange()},getPrompt(){switch(this.props.reason){case n.EmailVerificationReasons.ADD_COMMENT:return c.intl.formatMessage({id:"IqQ43j",defaultMessage:"Dropbox needs to verify your email address {email} before you can add comments. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.SUBSCRIBE_TO_COMMENTS:return c.intl.formatMessage({id:"vL8W0q",defaultMessage:"Dropbox needs to verify your email address {email} before you can subscribe. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.SHARE_FOLDER:return c.intl.formatMessage({id:"uhaAo6",defaultMessage:"Dropbox needs to verify your email address {email} to share folders. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.NEW_DFB_TEAM_TRY:case n.EmailVerificationReasons.NEW_DFB_TEAM_BUY:return c.intl.formatMessage({id:"AeBfu4",defaultMessage:"Dropbox needs to verify your email address {email} to add members to your team. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.SHMODAL:case n.EmailVerificationReasons.SHARE_FILEVIEWER:return c.intl.formatMessage({id:"snZuZp",defaultMessage:"Dropbox needs to verify your email address {email} to share links. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.SEND_TRANSFER_VIA_EMAIL:return c.intl.formatMessage({id:"KJO3V/",defaultMessage:"Dropbox needs to verify your email address {email} to send transfers. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.CREATE_API_APP:return c.intl.formatMessage({id:"zLfhKE",defaultMessage:"Dropbox needs to verify your email address {email} before you can register an API app. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.PUBLIC_FOLDER:return c.intl.formatMessage({id:"yAlYzI",defaultMessage:"Dropbox needs to verify your email address {email} to enable your Public folder. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.CHANGE_EMAIL:const{is_paired:e}=u.Viewer.get_viewer();return e&&"personal"===this.props.user.role?c.intl.formatMessage({id:"mdc1jT",defaultMessage:"Dropbox needs to verify your email address {email} to finish updating your personal email. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email}):e&&"work"===this.props.user.role?c.intl.formatMessage({id:"7PsqE/",defaultMessage:"Dropbox needs to verify your email address {email} to finish updating your {team} email. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email,team:u.Viewer.get_viewer().team_name}):c.intl.formatMessage({id:"2HVRJ2",defaultMessage:"Dropbox needs to verify your email address {email} to finish updating your email. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.CREATE_FILE_COLLECTOR:return c.intl.formatMessage({id:"KyKro/",defaultMessage:"Dropbox needs to verify your email address {email} to create file requests. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.GIFT_BUY:return c.intl.formatMessage({id:"ObebZe",defaultMessage:"Dropbox needs to verify your email address {email} before you can send gifts to your friends. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.REFER_FRIENDS:return c.intl.formatMessage({id:"NgyUVU",defaultMessage:"Dropbox needs to verify your email address {email} before you can invite friends. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.CREATE_TEAM:return c.intl.formatMessage({id:"7AVwhM",defaultMessage:"Dropbox needs to verify your email address {email} before you can create or join a team. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.CLOUD_DOCS:return c.intl.formatMessage({id:"fmvo35",defaultMessage:"Dropbox needs to verify your email address {email} before you can open or create this document type. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.MOUNT_FOLDER:return c.intl.formatMessage({id:"sBGn1X",defaultMessage:"Dropbox needs to verify your email address {email} to add folders to your Dropbox account. It’s as simple as clicking the link in the verification email we send to you."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});default:return c.intl.formatMessage({id:"MOMy71",defaultMessage:"Verify your email address at {email} to share folders and ensure your account can be recovered."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email})}}});t.VerifyEmailModal=h;const p=s.default({displayName:"ResendVerifyEmailModal",mixins:[g],propTypes:{user:i.default.object,email:i.default.string,reason:i.default.string,onEmailSent:i.default.func,onShowChange:i.default.func,onCancel:i.default.func},_getStyle(){return this._isMaestroDesign?"default-maestro":"default"},_isMaestroDesign(){return f.includes(this.props.reason)},render(){const e={reason:this.props.reason};return l.UserActivityLogger.log("web","email_verify_resend_shown",e),r.default.createElement(d.Modal,{title:c.intl.formatMessage({id:"LX3/hN",defaultMessage:"Verify your email address"}),ref:"modal",style:this._getStyle(),altAction:this.renderChangeEmail(),acceptButtonText:c.intl.formatMessage({id:"Xm2xLZ",defaultMessage:"Resend email"}),onAccept:this.sendEmail,dismissButtonText:c.intl.formatMessage({id:"HFcTbV",defaultMessage:"Done"}),onDismiss:this.cancel},r.default.createElement("div",{className:"db-modal-message"},r.default.createElement("div",null,this.getPrompt())))},cancel(){this.props.onCancel&&this.props.onCancel(),this.close()},close(){m.unmountModal()},showChangeEmail(e){var t;const a={reason:this.props.reason};return l.UserActivityLogger.log("web","email_verify_resend_change_first",a),e.preventDefault(),this.close(),null===(t=this.props)||void 0===t?void 0:t.onShowChange()},sendEmail(e){return e.preventDefault(),o.default.send_verification_email(this.props.user,this.props.email,this.props.reason,this.emailSent)},emailSent(){var e;return this.close(),null===(e=this.props)||void 0===e?void 0:e.onEmailSent()},getPrompt(){const{is_paired:e}=u.Viewer.get_viewer();return this.props.reason===n.EmailVerificationReasons.REFER_FRIENDS?c.intl.formatMessage({id:"V5m/DU",defaultMessage:"Dropbox needs to verify your email address {email} before you can invite friends. Check your inbox and click the link in the email to verify your address. If you can’t find it, check your spam folder."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email}):this.props.reason!==n.EmailVerificationReasons.CHANGE_EMAIL?c.intl.formatMessage({id:"1B+7Tj",defaultMessage:"Dropbox has sent a verification email to {email}. Check your inbox and click on the link in the email to verify your address. If you can't find it, check your spam folder or click the button to resend the email."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email}):e&&"personal"===this.props.user.role?c.intl.formatMessage({id:"0BEy+K",defaultMessage:"Dropbox has sent a verification email to {email}. Check your inbox and click on the link in the email to finish updating your personal email. If you can't find it, check your spam folder or click the button to resend the email."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email}):e&&"work"===this.props.user.role?c.intl.formatMessage({id:"XICSrF",defaultMessage:"Dropbox has sent a verification email to {email}. Check your inbox and click on the link in the email to finish updating your {team} email. If you can't find it, check your spam folder or click the button to resend the email."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email,team:u.Viewer.get_viewer().team_name}):c.intl.formatMessage({id:"MbQzS4",defaultMessage:"Dropbox has sent a verification email to {email}. Check your inbox and click on the link in the email to finish updating your email. If you can't find it, check your spam folder or click the button to resend the email."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email})}});t.ResendVerifyEmailModal=p;class _ extends r.default.Component{render(){const e=c.intl.formatMessage({id:"+0qvoG",defaultMessage:"Dropbox has sent a verification email to {email}. Check your inbox and click on the link in the email to verify your address. If you can't find it, check your spam folder or click the button to resend the email."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});return r.default.createElement(d.Modal,{title:c.intl.formatMessage({id:"lL1Onf",defaultMessage:"Verification email sent!"}),acceptButtonText:c.intl.formatMessage({id:"W0X0fi",defaultMessage:"Done"})},r.default.createElement("div",null,e))}}t.VerifyEmailSentModal=_,_.displayName="VerifyEmailSentModal",_.propTypes={email:i.default.string};class y extends r.default.Component{constructor(){super(...arguments),this.getPrompt=()=>{switch(this.props.reason){case n.EmailVerificationReasons.CREATE_TEAM:return c.intl.formatMessage({id:"CYHyF8",defaultMessage:"Thanks for verifying your email address: {email}. Now you can invite members to your team."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.SHARE_FOLDER:case n.EmailVerificationReasons.SEND_TRANSFER_VIA_EMAIL:return c.intl.formatMessage({id:"6wP/4a",defaultMessage:"Thanks for verifying your email address: {email}. You can now share and receive files on Dropbox."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.CREATE_API_APP:return c.intl.formatMessage({id:"YYHOPg",defaultMessage:"Thanks for verifying your email address: {email}. You can now register API apps."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});case n.EmailVerificationReasons.PUBLIC_FOLDER:return c.intl.formatMessage({id:"qn8l3S",defaultMessage:"Thanks for verifying your email address. You can now enable the Public folder for your {email} Dropbox."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email});default:return c.intl.formatMessage({id:"CMD+RZ",defaultMessage:"Thanks for verifying your email address: {email}."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email})}}}render(){return r.default.createElement(d.Modal,{title:c.intl.formatMessage({id:"hzY9FQ",defaultMessage:"Your email address is now verified"}),acceptButtonText:c.intl.formatMessage({id:"iJbj1c",defaultMessage:"Done"})},r.default.createElement("div",null,this.getPrompt()))}}t.EmailVerifiedModal=y,y.displayName="EmailVerifiedModal",y.propTypes={reason:i.default.string,email:i.default.string};class v extends r.default.Component{constructor(){super(...arguments),this.getPrompt=()=>{const{is_paired:e}=u.Viewer.get_viewer();return e&&"personal"===this.props.user.role?c.intl.formatMessage({id:"NWO11b",defaultMessage:"Thanks for verifying your email address {email}. Your personal account has successfully been changed."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email}):e&&"work"===this.props.user.role?c.intl.formatMessage({id:"TJea5z",defaultMessage:"Thanks for verifying your email address {email}. Your {team} account has successfully been changed."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email,team:u.Viewer.get_viewer().team_name}):c.intl.formatMessage({id:"X16ZP1",defaultMessage:"Thanks for verifying your email address {email}. Your account has successfully been changed."},{strong:e=>r.default.createElement("strong",null,e),email:this.props.email})}}render(){return r.default.createElement(d.Modal,{title:c.intl.formatMessage({id:"36KbGT",defaultMessage:"Your email address is now verified"}),acceptButtonText:c.intl.formatMessage({id:"0+WBOf",defaultMessage:"Done"})},r.default.createElement("div",null,this.getPrompt()))}}t.ChangedEmailVerifiedModal=v,v.displayName="ChangedEmailVerifiedModal",v.propTypes={email:i.default.string,user:i.default.object}})); //# sourceMappingURL=pkg-account.min.js-vflO8PixQ.map