UNPKG

230 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@aws-amplify/core"),require("@aws-amplify/auth"),require("@aws-amplify/ui"),require("@aws-amplify/storage"),require("@aws-amplify/analytics"),require("@aws-amplify/api"),require("@aws-amplify/interactions"),require("@aws-amplify/xr")):"function"==typeof define&&define.amd?define("aws_amplify_react",["react","@aws-amplify/core","@aws-amplify/auth","@aws-amplify/ui","@aws-amplify/storage","@aws-amplify/analytics","@aws-amplify/api","@aws-amplify/interactions","@aws-amplify/xr"],t):"object"==typeof exports?exports.aws_amplify_react=t(require("react"),require("@aws-amplify/core"),require("@aws-amplify/auth"),require("@aws-amplify/ui"),require("@aws-amplify/storage"),require("@aws-amplify/analytics"),require("@aws-amplify/api"),require("@aws-amplify/interactions"),require("@aws-amplify/xr")):e.aws_amplify_react=t(e.react,e["@aws-amplify/core"],e["@aws-amplify/auth"],e["@aws-amplify/ui"],e["@aws-amplify/storage"],e["@aws-amplify/analytics"],e["@aws-amplify/api"],e["@aws-amplify/interactions"],e["@aws-amplify/xr"])}(this,(function(e,t,n,o,r,i,a,s,u){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(0)),s=n(1),u=r(n(7)),c=i(n(5));t.Container=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.container),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.container,style:r}),e.children))},t.FormContainer=function(e){var n=e.theme||c.default;return t.beforeAfter(a.createElement("div",{className:u.formContainer,style:n.formContainer},e.children))},t.FormSection=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.formSection);return a.createElement(t.FormContainer,{theme:n},t.beforeAfter(a.createElement("div",{className:u.formSection,style:o},e.children)))},t.SectionHeader=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.sectionHeader),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.sectionHeader,style:r}),a.createElement(t.SectionHeaderContent,{theme:n},e.children,e.hint&&a.createElement("div",{className:u.sectionHeaderHint},e.hint))))},t.SectionHeaderContent=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.sectionHeaderContent);return t.beforeAfter(a.createElement("span",{className:u.sectionHeaderContent,style:o},e.children))},t.SectionFooter=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.sectionFooter),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.sectionFooter,style:r}),e.children))},t.SectionFooterPrimaryContent=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.sectionFooterPrimaryContent);return t.beforeAfter(a.createElement("span",{className:u.sectionFooterPrimaryContent,style:o},e.children))},t.SectionFooterSecondaryContent=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.sectionFooterSecondaryContent);return t.beforeAfter(a.createElement("span",{className:u.sectionFooterSecondaryContent,style:o},e.children))},t.SectionBody=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.sectionBody),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.sectionBody,style:r}),e.children))},t.ActionRow=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.actionRow),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-action-row",style:r}),e.children))},t.Strike=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.strike);return t.beforeAfter(a.createElement("div",{className:u.strike,style:o},a.createElement(t.StrikeContent,{theme:n},e.children)))},t.StrikeContent=function(e){var n=e.theme||c.default;return t.beforeAfter(a.createElement("span",{className:u.strikeContent,style:n.strikeContent},e.children))},t.FormRow=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.formRow),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.formRow,style:r}),e.children))},t.RadioRow=function(e){var n=e.id||"_"+e.value,r=e.theme||c.default;return a.createElement(t.FormRow,{theme:r},a.createElement(t.Radio,o({},e,{id:n})),a.createElement(t.Label,{htmlFor:n,theme:r},e.placeholder))},t.Radio=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.radio),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("input",o({},i,{type:"radio",className:u.radio,style:r})))},t.InputRow=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.input),i=s.objectLessAttributes(e,"theme");return a.createElement(t.FormRow,{theme:n},t.beforeAfter(a.createElement("input",o({},i,{className:u.input,style:r}))))},t.Input=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.input),i=s.objectLessAttributes(e,"theme");return a.createElement("input",o({},i,{className:u.input,style:r}))},t.SelectInput=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.selectInput);return a.createElement("div",{className:u.selectInput,style:o},e.children)},t.FormField=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.formField),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.formField,style:r}),e.children))},t.Button=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.button),i=e.disabled||!1,l=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("button",o({},l,{className:u.button,style:r,disabled:i}),e.children))},t.PhotoPickerButton=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.photoPickerButton),i=s.objectLessAttributes(e,"theme");return a.createElement("button",o({},i,{className:[u.photoPickerButton,u.button].join(" "),style:r}),e.children)},t.SignInButton=function(e){var n=e.theme||c.default,r=Object.assign({},n.signInButton,n[e.variant]),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("button",o({},i,{className:u.signInButton,style:r}),e.children))},t.SignInButtonIcon=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.signInButtonIcon),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("span",o({},i,{className:u.signInButtonIcon,style:r}),e.children))},t.SignInButtonContent=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.signInButtonContent);return t.beforeAfter(a.createElement("span",{className:u.signInButtonContent,style:o},e.children))},t.Link=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.a),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("a",o({},i,{className:u.a,style:r}),e.children))},t.Label=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.label),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("label",o({},i,{className:u.label,style:r}),e.children))},t.Hint=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.hint);return t.beforeAfter(a.createElement("div",{className:u.hint,style:o},e.children))},t.InputLabel=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.inputLabel);return t.beforeAfter(a.createElement("div",{className:u.inputLabel,style:o},e.children))},t.NavBar=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.navBar),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.navBar,style:r}),e.children))},t.Nav=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.nav),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.nav,style:r}),e.children))},t.NavRight=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.navRight),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.navRight,style:r}),e.children))},t.NavItem=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.navItem),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:u.navItem,style:r}),e.children))},t.NavButton=function(e){var n=e.theme||c.default,r=t.propStyle(e,n.navButton),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("button",o({},i,{className:u.button,style:r}),t.beforeAfter(a.createElement("span",null,e.children))))},t.Toast=function(e){var t=e.onClose,n=e.theme||c.default;return a.createElement("div",o({},e,{theme:n,className:u.toast,style:n.toast}),a.createElement("span",null,e.children),a.createElement("a",{className:u.toastClose,onClick:t}))},t.Toast.defaultProps={onClose:function(){}},t.PhotoPlaceholder=function(e){var n=e.theme||c.default,o=t.propStyle(e,n.photoPlaceholder);return a.createElement("div",{className:u.photoPlaceholder,style:o},a.createElement("div",{className:u.photoPlaceholderIcon},a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 24 24"},a.createElement("circle",{cx:"12",cy:"12",r:"3.2"}),a.createElement("path",{d:"M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"}),a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))))},t.beforeAfter=function(e){var t=e.props.style||{},n=t.before,o=t.after;return n||o?a.createElement("span",{style:{position:"relative"}},n?a.createElement("span",{style:n},n.content):null,e,o?a.createElement("span",{style:o},o.content):null):e},t.propStyle=function(e,t){var n=e.id,o=e.style,r=Object.assign({},o,t);if(!n)return r;var i="#"+n;return Object.assign(r,r[i]),r}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.sumerianScene={container:"sumerian-scene-container",sumerianScene:"sumerian-scene",loading:"sumerian-scene-loading",loadingLogo:"sumerian-scene-loading-logo",loadingSceneName:"sumerian-scene-loading-scene-name",loadingBar:"sumerian-scene-loading-bar",errorText:"sumerian-scene-error-text",bar:"sumerian-scene-bar",actions:"sumerian-scene-actions"},t.genericAttrs={usernameInput:"username-input",emailInput:"email-input",phoneNumberInput:"phone-number-input",dialCodeSelect:"dial-code-select"},t.chatBot={title:"chatbot-title",dialog:"chatbot-dialog",messageInput:"chatbot-message-input",sendMessageButton:"chatbot-send-message-button"},t.auth={signIn:{section:"sign-in-section",headerSection:"sign-in-header-section",bodySection:"sign-in-body-section",footerSection:"sign-in-footer-section",usernameInput:"username-input",passwordInput:"sign-in-password-input",forgotPasswordLink:"sign-in-forgot-password-link",signInButton:"sign-in-sign-in-button",createAccountLink:"sign-in-create-account-link",signInError:"authenticator-error"},signOut:{button:"sign-out-button",section:"sign-out-section"},signUp:{section:"sign-up-section",headerSection:"sign-up-header-section",bodySection:"sign-up-body-section",nonPhoneNumberInput:"sign-up-non-phone-number-input",phoneNumberInput:"sign-up-phone-number-input",dialCodeSelect:"sign-up-dial-code-select",footerSection:"sign-up-footer-section",createAccountButton:"sign-up-create-account-button",signInLink:"sign-up-sign-in-link",signUpButton:"sign-up-sign-up-button",signInButton:"sign-up-sign-in-button",confirmButton:"sign-up-confirm-button"},verifyContact:{section:"verify-contact-section",headerSection:"verify-contact-header-section",bodySection:"verify-contact-body-section",submitButton:"verify-contact-submit-button",verifyButton:"verify-contact-verify-button",skipLink:"verify-contact-skip-link"},TOTPSetup:{component:"totp-setup-component"},requireNewPassword:{section:"require-new-password-section",headerSection:"require-new-password-header-section",footerSection:"require-new-password-footer-section",bodySection:"require-new-password-body-section",newPasswordInput:"require-new-password-new-password-input",backToSignInLink:"require-new-password-back-to-sign-in-link",submitButton:"require-new-password-submit-button"},loading:{section:"loading-secton"},genericAttrs:t.genericAttrs,greetings:{navBar:"greetings-nav-bar",nav:"greetings-nav",navRight:"greetings-nav-right"},greeting:{signOutButton:"sign-out-button",signOutLink:"greeting-sign-out-link",navRight:"greetings-nav-right"},federatedSignIn:{section:"federated-sign-in-section",bodySection:"federated-sign-in-body-section",signInButtons:"federated-sign-in-buttons"},confirmSignUp:{section:"confirm-sign-up-section",headerSection:"confirm-sign-up-header-section",bodySection:"confirm-sign-up-body-section",usernameInput:"confirm-sign-up-username-input",confirmationCodeInput:"confirm-sign-up-confirmation-code-input",resendCodeLink:"confirm-sign-up-resend-code-link",confirmButton:"confirm-sign-up-confirm-button",backToSignInLink:"confirm-sign-up-back-to-sign-in-link"},confirmSignIn:{section:"confirm-sign-in-section",headerSection:"confirm-sign-in-header-section",bodySection:"confirm-sign-in-body-section",codeInput:"confirm-sign-in-code-input",confirmButton:"confirm-sign-in-confirm-button",backToSignInLink:"confirm-sign-in-back-to-sign-in-link"},setMFAComp:{section:"set-mfa-section",headerSection:"set-mfa-header-section",bodySection:"set-mfa-header-body-section",smsInput:"set-mfa-sms-input",totpInput:"set-mfa-totp-input",noMfaInput:"set-mfa-nomfa-input",verificationCodeInput:"set-mfa-verification-code-input",setMfaButton:"set-mfa-set-mfa-button",verifyTotpTokenButton:"set-mfa-verify-totp-token-button",cancelButton:"set-mfa-cancel-button"},forgotPassword:{section:"forgot-password-section",headerSection:"forgot-password-header-section",bodySection:"forgot-password-body-section",submitButton:"forgot-password-submit-button",sendCodeButton:"forgot-password-send-code-button",resendCodeLink:"forgot-password-resend-code-link",backToSignInLink:"forgot-password-back-to-sign-in-link",usernameInput:"username-input",codeInput:"forgot-password-code-input",newPasswordInput:"forgot-password-new-password-input"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Container={},t.FormContainer={},t.FormSection={},t.FormField={},t.SectionHeader={},t.SectionBody={},t.SectionFooter={},t.SectionFooterPrimaryContent={},t.SectionFooterSecondaryContent={},t.Input={},t.Button={},t.PhotoPickerButton={},t.PhotoPlaceholder={},t.SignInButton={},t.SignInButtonIcon={},t.SignInButtonContent={},t.Strike={},t.StrikeContent={},t.ActionRow={},t.FormRow={},t.A={},t.Hint={},t.Radio={},t.Label={},t.InputLabel={},t.AmazonSignInButton={},t.FacebookSignInButton={},t.GoogleSignInButton={},t.OAuthSignInButton={},t.Toast={},t.NavBar={},t.NavRight={},t.Nav={},t.NavItem={},t.NavButton={};var o={container:t.Container,formContainer:t.FormContainer,formSection:t.FormSection,formField:t.FormField,sectionHeader:t.SectionHeader,sectionBody:t.SectionBody,sectionFooter:t.SectionFooter,sectionFooterPrimaryContent:t.SectionFooterPrimaryContent,sectionFooterSecondaryContent:t.SectionFooterSecondaryContent,input:t.Input,button:t.Button,photoPickerButton:t.PhotoPickerButton,photoPlaceholder:t.PhotoPlaceholder,signInButton:t.SignInButton,signInButtonIcon:t.SignInButtonIcon,signInButtonContent:t.SignInButtonContent,amazonSignInButton:t.AmazonSignInButton,facebookSignInButton:t.FacebookSignInButton,googleSignInButton:t.GoogleSignInButton,oAuthSignInButton:t.OAuthSignInButton,formRow:t.FormRow,strike:t.Strike,strikeContent:t.StrikeContent,actionRow:t.ActionRow,a:t.A,hint:t.Hint,radio:t.Radio,label:t.Label,inputLabel:t.InputLabel,toast:t.Toast,navBar:t.NavBar,nav:t.Nav,navRight:t.NavRight,navItem:t.NavItem,navButton:t.NavButton};t.default=o},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,i,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=s(n(0)),l=n(1),p=n(2),h=n(11),d=n(20),f=n(4),m=u(n(8)),g=((i={})[h.UsernameAttributes.EMAIL]="Email",i[h.UsernameAttributes.PHONE_NUMBER]="Phone Number",i[h.UsernameAttributes.USERNAME]="Username",i),y=function(e){function t(t){var n=e.call(this,t)||this;return n.inputs={},n._isHidden=!0,n._validAuthStates=[],n.phone_number="",n.changeState=n.changeState.bind(n),n.error=n.error.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.renderUsernameField=n.renderUsernameField.bind(n),n.getUsernameFromInput=n.getUsernameFromInput.bind(n),n.onPhoneNumberChanged=n.onPhoneNumberChanged.bind(n),n}return a(t,e),t.prototype.componentDidMount=function(){if(window&&window.location&&window.location.search&&(!this.props.authData||!this.props.authData.username)){var e=new URLSearchParams(window.location.search),t=e?e.get("username"):void 0;this.setState({username:t})}},t.prototype.getUsernameFromInput=function(){var e=this.props.usernameAttributes;switch(void 0===e?"username":e){case h.UsernameAttributes.EMAIL:return this.inputs.email;case h.UsernameAttributes.PHONE_NUMBER:return this.phone_number;default:return this.inputs.username||this.state.username}},t.prototype.onPhoneNumberChanged=function(e){this.phone_number=e},t.prototype.renderUsernameField=function(e){var t=this.props.usernameAttributes,n=void 0===t?[]:t;return n===h.UsernameAttributes.EMAIL?c.createElement(p.FormField,{theme:e},c.createElement(p.InputLabel,{theme:e},l.I18n.get("Email")," *"),c.createElement(p.Input,{autoFocus:!0,placeholder:l.I18n.get("Enter your email"),theme:e,key:"email",name:"email",type:"email",onChange:this.handleInputChange,"data-test":f.auth.genericAttrs.emailInput})):n===h.UsernameAttributes.PHONE_NUMBER?c.createElement(d.PhoneField,{theme:e,onChangeText:this.onPhoneNumberChanged}):c.createElement(p.FormField,{theme:e},c.createElement(p.InputLabel,{theme:e},l.I18n.get(this.getUsernameLabel())," *"),c.createElement(p.Input,{defaultValue:this.state.username,autoFocus:!0,placeholder:l.I18n.get("Enter your username"),theme:e,key:"username",name:"username",onChange:this.handleInputChange,"data-test":f.auth.genericAttrs.usernameInput}))},t.prototype.getUsernameLabel=function(){var e=this.props.usernameAttributes,t=void 0===e?h.UsernameAttributes.USERNAME:e;return g[t]||t},t.prototype.usernameFromAuthData=function(){var e=this.props.authData;if(!e)return"";return"object"===o(e)?e.user?e.user.username:e.username:e},t.prototype.errorMessage=function(e){return"string"==typeof e?e:e.message?e.message:JSON.stringify(e)},t.prototype.triggerAuthEvent=function(e){var t=this.props.authState;this.props.onAuthEvent&&this.props.onAuthEvent(t,e)},t.prototype.changeState=function(e,t){this.props.onStateChange&&this.props.onStateChange(e,t),this.triggerAuthEvent({type:"stateChange",data:e})},t.prototype.error=function(e){this.triggerAuthEvent({type:"error",data:this.errorMessage(e)})},t.prototype.handleInputChange=function(e){this.inputs=this.inputs||{};var t=e.target,n=t.name,o=t.value,r=t.type,i=t.checked,a=["radio","checkbox"].includes(r);this.inputs[n]=a?i:o,this.inputs.checkedValue=a?o:null},t.prototype.render=function(){if(!this._validAuthStates.includes(this.props.authState))return this._isHidden=!0,this.inputs={},null;if(this._isHidden){this.inputs={};var e=this.props.track;e&&e()}return this._isHidden=!1,this.showComponent(this.props.theme||m.default)},t.prototype.showComponent=function(e){throw"You must implement showComponent(theme) and don't forget to set this._validAuthStates."},t}(c.Component);t.AuthPiece=y,t.default=y},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Container={fontFamily:'-apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol"',fontWeight:"400",lineHeight:"1.5",color:"#212529",textAlign:"left",paddingLeft:"15px",paddingRight:"15px"},t.NavBar={position:"relative",border:"1px solid transparent",borderColor:"#e7e7e7"},t.NavRight={textAlign:"right"},t.Nav={margin:"7.5px"},t.NavItem={display:"inline-block",padding:"10px 5px",lineHeight:"20px"},t.NavButton={display:"inline-block",padding:"6px 12px",marginTop:"8px",marginBottom:"8px",fontSize:"14px",fontWeight:400,lineHeight:"1.42857143",textAlign:"center",whiteSpace:"nowrap",verticalAlign:"middle",touchAction:"manipulation",cursor:"pointer",userSelect:"none",backgroundImage:"none",border:"1px solid transparent",borderRadius:"4px",color:"#333",backgroundColor:"#fff",borderColor:"#ccc"},t.FormContainer={textAlign:"center"},t.FormSection={marginBottom:"20px",backgroundColor:"#fff",border:"1px solid #ddd",borderRadius:"4px",textAlign:"left",width:"400px",display:"inline-block"},t.ErrorSection={marginBottom:"20px",color:"#fff",backgroundColor:"#f0ad4e",border:"1px solid #eea236",borderRadius:"4px",textAlign:"left"},t.SectionHeader={color:"#fff",backgroundColor:"#337ab7",borderColor:"#337ab7",padding:"10px 15px",borderBottom:"1px solid transparent",borderTopLeftRadius:"3px",borderTopRightRadius:"3px",textAlign:"center"},t.SectionFooter={color:"#333",backgroundColor:"#f5f5f5",padding:"10px 15px",borderTop:"1px solid #ddd",borderTopLeftRadius:"3px",borderTopRightRadius:"3px"},t.SectionBody={padding:"15px"},t.FormRow={marginBottom:"15px"},t.ActionRow={marginBottom:"15px"},t.Input={display:"block",width:"100%",height:"34px",padding:"6px 12px",fontSize:"14px",lineHeight:"1.42857143",color:"#555",backgroundColor:"#fff",backgroundImage:"none",border:"1px solid #ccc",borderRadius:"4px",boxShadow:"inset 0 1px 1px rgba(0,0,0,.075)",boxSizing:"border-box",transition:"border-color ease-in-out .15s,box-shadow ease-in-out .15s"},t.Button={display:"inline-block",padding:"6px 12px",marginBottom:"0",fontSize:"14px",fontWeight:400,lineHeight:"1.42857143",textAlign:"center",whiteSpace:"nowrap",verticalAlign:"middle",touchAction:"manipulation",cursor:"pointer",userSelect:"none",backgroundImage:"none",border:"1px solid transparent",borderRadius:"4px",color:"#333",backgroundColor:"#fff",borderColor:"#ccc"},t.SignInButton={position:"relative",padding:"6px 12px 6px 44px",fontSize:"14px",textAlign:"left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",marginTop:"2px","#google_signin_btn":{color:"#fff",backgroundColor:"#dd4b39",borderColor:"rgba(0,0,0,0.2)"},"#facebook_signin_btn":{color:"#fff",backgroundColor:"#3b5998",borderColor:"rgba(0,0,0,0.2)"}},t.Space={display:"inline-block",width:"20px"},t.A={color:"#007bff",cursor:"pointer"},t.Pre={overflow:"auto",fontFamily:'Menlo,\n Monaco,\n Consolas,\n "Courier New",\n monospace',display:"block",padding:"9.5px",margin:"0 0 10px",fontSize:"13px",lineHeight:"1.42857143",color:"#333",wordBreak:"break-all",wordWrap:"break-word",backgroundColor:"#f5f5f5",border:"1px solid #ccc",borderRadius:"4px"},t.Col1={display:"inline-block",width:"8.33333333%"},t.Col2={display:"inline-block",width:"16.66666667%"},t.Col3={display:"inline-block",width:"25%"},t.Col4={display:"inline-block",width:"33.33333333%"},t.Col5={display:"inline-block",width:"41.66666667%"},t.Col6={display:"inline-block",width:"50%"},t.Col7={display:"inline-block",width:"58.33333333%"},t.Col8={display:"inline-block",width:"66.66666667%"},t.Col9={display:"inline-block",width:"75%"},t.Col10={display:"inline-block",width:"83.33333333%"},t.Col11={display:"inline-block",width:"91.66666667%"},t.Col12={display:"inline-block",width:"100%"},t.Hidden={display:"none"},t.Bootstrap={container:t.Container,navBar:t.NavBar,nav:t.Nav,navRight:t.NavRight,navItem:t.NavItem,navButton:t.NavButton,formContainer:t.FormContainer,formSection:t.FormSection,errorSection:t.ErrorSection,sectionHeader:t.SectionHeader,sectionBody:t.SectionBody,sectionFooter:t.SectionFooter,formRow:t.FormRow,actionRow:t.ActionRow,space:t.Space,signInButton:t.SignInButton,input:t.Input,button:t.Button,a:t.A,pre:t.Pre,col1:t.Col1,col2:t.Col2,col3:t.Col3,col4:t.Col4,col5:t.Col5,col6:t.Col6,col7:t.Col7,col8:t.Col8,col9:t.Col9,col10:t.Col10,col11:t.Col11,col12:t.Col12,hidden:t.Hidden},t.default=t.Bootstrap},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Constants={AUTH_SOURCE_KEY:"amplify-react-auth-source",AUTH0:"auth0",GOOGLE:"google",FACEBOOK:"facebook",AMAZON:"amazon",REDIRECTED_FROM_HOSTED_UI:"amplify-redirected-from-hosted-ui"}},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(0)),s=n(1),u=i(n(8));t.Container=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.container),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-container",style:r}),e.children))},t.FormContainer=function(e){var n=e.theme||u.default,o=t.propStyle(e,n.formContainer);return t.beforeAfter(a.createElement("div",{className:"amplify-form-container",style:o},e.children))},t.FormSection=function(e){var n=e.theme||u.default,o=t.propStyle(e,n.formSection);return a.createElement(t.FormContainer,{theme:n},t.beforeAfter(a.createElement("div",{className:"amplify-form-section",style:o},e.children)))},t.ErrorSection=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.errorSection),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-error-section",style:r}),a.createElement(t.ErrorSectionContent,null,e.children)))},t.ErrorSectionContent=function(e){var n=e.theme||u.default,o=t.propStyle(e,n.errorSectionContent);return t.beforeAfter(a.createElement("span",{className:"amplify-error-section-content",style:o},e.children))},t.SectionHeader=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.sectionHeader),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-section-header",style:r}),a.createElement(t.SectionHeaderContent,{theme:n},e.children)))},t.SectionHeaderContent=function(e){var n=e.theme||u.default,o=t.propStyle(e,n.sectionHeaderContent);return t.beforeAfter(a.createElement("span",{className:"amplify-section-header-content",style:o},e.children))},t.SectionFooter=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.sectionFooter),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-section-footer",style:r}),a.createElement(t.SectionFooterContent,{theme:n},e.children)))},t.SectionFooterContent=function(e){var n=e.theme||u.default,o=t.propStyle(e,n.sectionFooterContent);return t.beforeAfter(a.createElement("span",{className:"amplify-section-footer-content",style:o},e.children))},t.SectionBody=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.sectionBody),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-section-body",style:r}),e.children))},t.ActionRow=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.actionRow),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-action-row",style:r}),e.children))},t.FormRow=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.formRow),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-form-row",style:r}),e.children))},t.InputRow=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.input),i=s.objectLessAttributes(e,"theme");return a.createElement(t.FormRow,{theme:n},t.beforeAfter(a.createElement("input",o({},i,{className:"amplify-input",style:r}))))},t.RadioRow=function(e){var n=e.id||"_"+e.value,r=e.theme||u.default;return a.createElement(t.FormRow,{theme:r},a.createElement(t.Radio,o({},e,{id:n})),a.createElement(t.Label,{htmlFor:n,theme:r},e.placeholder))},t.Radio=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.radio),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("input",o({},i,{type:"radio",className:"amplify-radio",style:r})))},t.CheckboxRow=function(e){var n=e.id||"_"+e.name,r=e.theme||u.default;return a.createElement(t.FormRow,{theme:r},a.createElement(t.Checkbox,o({},e,{id:n})),a.createElement(t.Label,{htmlFor:n,theme:r},e.placeholder))},t.Checkbox=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.checkbox),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("input",o({},i,{type:"checkbox",className:"amplify-checkbox",style:r})))},t.MessageRow=function(e){var n=e.theme||u.default;return a.createElement(t.FormRow,{theme:n},a.createElement(t.MessageContent,{theme:n},e.children))},t.MessageContent=function(e){var n=e.theme||u.default;return t.beforeAfter(a.createElement("span",{className:"amplify-message-content",style:n.messageContent},e.children))},t.ButtonRow=function(e){var n=e.theme||u.default;return t.beforeAfter(a.createElement("div",{className:"amplify-action-row",style:n.actionRow},a.createElement(t.Button,o({},e))))},t.Button=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.button),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("button",o({},i,{className:"amplify-button",style:r}),a.createElement(t.ButtonContent,{theme:n},e.children)))},t.ButtonContent=function(e){var n=e.theme||u.default;return t.beforeAfter(a.createElement("span",{className:"amplify-button-content",style:n.buttonContent},e.children))},t.SignInButton=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.signInButton),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("button",o({},i,{className:"amplify-signin-button",style:r}),e.children))},t.Link=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.a),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("a",o({},i,{className:"amplify-a",style:r}),e.children))},t.Label=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.label),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("label",o({},i,{className:"amplify-label",style:r}),e.children))},t.Space=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.space),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("span",o({},i,{className:"amplify-space",style:r}),e.children))},t.NavBar=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.navBar),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-nav-bar",style:r}),e.children))},t.Nav=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.nav),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-nav",style:r}),e.children))},t.NavRight=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.navRight),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-nav-right",style:r}),e.children))},t.NavItem=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.navItem),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("div",o({},i,{className:"amplify-nav-item",style:r}),e.children))},t.NavButton=function(e){var n=e.theme||u.default,r=t.propStyle(e,n.navButton),i=s.objectLessAttributes(e,"theme");return t.beforeAfter(a.createElement("button",o({},i,{className:"amplify-nav-button",style:r}),t.beforeAfter(a.createElement("span",{style:n.navButtonContent},e.children))))},t.beforeAfter=function(e){var t=e.props.style||{},n=t.before,o=t.after;return n||o?a.createElement("span",{style:{position:"relative"}},n?a.createElement("span",{style:n},n.content):null,e,o?a.createElement("span",{style:o},o.content):null):e},t.propStyle=function(e,t){var n=e.id,o=e.style,r=Object.assign({},o,t);if(!n)return r;var i="#"+n;return Object.assign(r,r[i]),r},t.transparent1X1="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",t.white1X1="data:image/gif;base64,R0lGODlhAQABAIAAAP7//wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.EMAIL="email",e.PHONE_NUMBER="phone_number",e.USERNAME="username"}(t.UsernameAttributes||(t.UsernameAttributes={}))},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=a(n(5)),l=n(2),p={width:"100%",height:"100%",display:"inline-block",position:"absolute",left:0,top:0,opacity:0,cursor:"pointer"},h=new u.ConsoleLogger("Picker"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.handleInput=function(e){var t=e.target.files[0];if(t){var n=t.name,o=t.size,r=t.type;h.debug(t);var i=this.props.onPick;i&&i({file:t,name:n,size:o,type:r})}},t.prototype.render=function(){var e=this,t=this.props.title||"Pick a File",n=this.props.accept||"*/*",o=this.props.theme||c.default,r=Object.assign({},{position:"relative"},o.pickerPicker),i=Object.assign({},p,o.pickerInput);return s.createElement("div",{style:r},s.createElement(l.PhotoPickerButton,{theme:o},u.I18n.get(t)),s.createElement("input",{title:u.I18n.get(t),type:"file",accept:n,style:i,onChange:function(t){return e.handleInput(t)}}))},t}(s.Component);t.Picker=d,t.default=d},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(0)),u=n(23),c=n(24),l=n(25),p=n(26),h=n(27),d=n(23);t.withGoogle=d.withGoogle,t.GoogleButton=d.GoogleButton;var f=n(24);t.withFacebook=f.withFacebook,t.FacebookButton=f.FacebookButton;var m=n(25);t.withAmazon=m.withAmazon,t.AmazonButton=m.AmazonButton;var g=n(26);t.withOAuth=g.withOAuth,t.OAuthButton=g.OAuthButton;var y=n(27);t.withAuth0=y.withAuth0,t.Auth0Button=y.Auth0Button,t.withFederated=function(e){var t=h.withAuth0(p.withOAuth(l.withAmazon(u.withGoogle(c.withFacebook(e)))));return function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.render=function(){var e=this.props.federated||{};return s.createElement(t,i({},this.props,e))},n}(s.Component)}},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(0)),c=n(1),l=n(3),p=n(6),h=n(2),d=n(4),f=n(21),m=n(51),g=n(11),y=n(20),v=new c.ConsoleLogger("SignUp"),b=function(e){function t(t){var n=e.call(this,t)||this;n.state={requestPending:!1},n._validAuthStates=["signUp"],n.signUp=n.signUp.bind(n),n.sortFields=n.sortFields.bind(n),n.getDefaultDialCode=n.getDefaultDialCode.bind(n),n.checkCustomSignUpFields=n.checkCustomSignUpFields.bind(n),n.needPrefix=n.needPrefix.bind(n),n.header=n.props&&n.props.signUpConfig&&n.props.signUpConfig.header?n.props.signUpConfig.header:"Create a new account";var o=(n.props||{}).usernameAttributes,r=void 0===o?g.UsernameAttributes.USERNAME:o;return r===g.UsernameAttributes.EMAIL?n.defaultSignUpFields=m.signUpWithEmailFields:r===g.UsernameAttributes.PHONE_NUMBER?n.defaultSignUpFields=m.signUpWithPhoneNumberFields:n.defaultSignUpFields=m.signUpWithUsernameFields,n}return r(t,e),t.prototype.validate=function(){var e=this,t=[];return this.signUpFields.map((function(n){"phone_number"!==n.key?n.required&&!e.inputs[n.key]?(n.invalid=!0,t.push(n.label)):n.invalid=!1:n.required&&!e.phone_number?(n.invalid=!0,t.push(n.label)):n.invalid=!1})),t},t.prototype.sortFields=function(){var e=this;this.props.signUpConfig&&this.props.signUpConfig.hiddenDefaults&&this.props.signUpConfig.hiddenDefaults.length>0&&(this.defaultSignUpFields=this.defaultSignUpFields.filter((function(t){return!e.props.signUpConfig.hiddenDefaults.includes(t.key)}))),this.checkCustomSignUpFields()?(this.props.signUpConfig&&this.props.signUpConfig.hideAllDefaults||this.defaultSignUpFields.forEach((function(t){-1===e.signUpFields.findIndex((function(e){return e.key===t.key}))&&e.signUpFields.push(t)})),this.signUpFields.sort((function(e,t){return e.displayOrder&&t.displayOrder?e.displayOrder<t.displayOrder?-1:e.displayOrder>t.displayOrder?1:e.key<t.key?-1:1:!e.displayOrder&&t.displayOrder?1:e.displayOrder&&!t.displayOrder?-1:e.displayOrder||t.displayOrder?void 0:e.key<t.key?-1:1}))):this.signUpFields=this.defaultSignUpFields},t.prototype.needPrefix=function(e){var t=this.signUpFields.find((function(t){return t.key===e}));return 0!==e.indexOf("custom:")?t.custom:(0===e.indexOf("custom:")&&!1===t.custom&&v.warn("Custom prefix prepended to key but custom field flag is set to false; retaining manually entered prefix"),null)},t.prototype.getDefaultDialCode=function(){return this.props.signUpConfig&&this.props.signUpConfig.defaultCountryCode&&-1!==f.countryDialCodes.indexOf("+"+this.props.signUpConfig.defaultCountryCode)?"+"+this.props.signUpConfig.defaultCountryCode:"+1"},t.prototype.checkCustomSignUpFields=function(){return this.props.signUpConfig&&this.props.signUpConfig.signUpFields&&this.props.signUpConfig.signUpFields.length>0},t.prototype.signUp=function(){return i(this,void 0,void 0,(function(){var e,t,n,o,r,i,s,u=this;return a(this,(function(a){switch(a.label){case 0:if(this.setState({requestPending:!0}),this.inputs.dial_code||(this.inputs.dial_code=this.getDefaultDialCode()),(e=this.validate())&&e.length>0)return this.setState({requestPending:!1}),[2,this.error("The following fields need to be filled out: "+e.join(", "))];if(!l.Auth||"function"!=typeof l.Auth.signUp)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");if(t={username:this.inputs.username,password:this.inputs.password,attributes:{}},n=Object.keys(this.inputs),o=Object.values(this.inputs),n.forEach((function(e,n){if(!["username","password","checkedValue","dial_code"].includes(e)&&"phone_line_number"!==e&&"dial_code"!==e&&"error"!==e){var r=(u.needPrefix(e)?"custom:":"")+e;t.attributes[r]=o[n]}})),this.phone_number&&(t.attributes.phone_number=this.phone_number),r=!1,this.signUpFields.forEach((function(e){e.label===u.getUsernameLabel()&&(v.debug("Changing the username to the value of "+e.label),t.username=t.attributes[e.key]||t.username,r=!0)})),!r&&!t.username)throw new Error("Couldn't find the label: "+this.getUsernameLabel()+", in sign up fields according to usernameAttributes!");a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,l.Auth.signUp(t)];case 2:return i=a.sent(),this.changeState("confirmSignUp",i.user.username),[3,5];case 3:return s=a.sent(),this.error(s),[3,5];case 4:return this.setState({requestPending:!1}),[7];case 5:return[2]}}))}))},t.prototype.showComponent=function(e){var n=this,o=this.props.hide;return o&&o.includes(t)?null:(this.checkCustomSignUpFields()&&(this.signUpFields=this.props.signUpConfig.signUpFields),this.sortFields(),u.createElement(h.FormSection,{theme:e,"data-test":d.auth.signUp.section},u.createElement(h.SectionHeader,{theme:e,"data-test":d.auth.signUp.headerSection},c.I18n.get(this.header)),u.createElement(h.SectionBody,{theme:e,"data-test":d.auth.signUp.bodySection},this.signUpFields.map((function(t){return"phone_number"!==t.key?u.createElement(h.FormField,{theme:e,key:t.key},t.required?u.createElement(h.InputLabel,{theme:e},c.I18n.get(t.label)," *"):u.createElement(h.InputLabel,{theme:e},c.I18n.get(t.label)),u.createElement(h.Input,{autoFocus:0===n.signUpFields.findIndex((function(e){return e.key===t.key})),placeholder:c.I18n.get(t.placeholder),theme:e,type:t.type,name:t.key,key:t.key,onChange:n.handleInputChange,"data-test":d.auth.signUp.nonPhoneNumberInput})):u.createElement(y.PhoneField,{theme:e,required:t.required,defaultDialCode:n.getDefaultDialCode(),label:t.label,placeholder:t.placeholder,onChangeText:n.onPhoneNumberChanged,key:"phone_number"})}))),u.createElement(h.SectionFooter,{theme:e,"data-test":d.auth.signUp.footerSection},u.createElement(h.SectionFooterPrimaryContent,{theme:e},u.createElement(h.Button,{disabled:this.state.requestPending,onClick:this.signUp,theme:e,"data-test":d.auth.signUp.createAccountButton},c.I18n.get("Create Account"))),u.createElement(h.SectionFooterSecondaryContent,{theme:e},c.I18n.get("Have an account? "),u.createElement(h.Link,{theme:e,onClick:function(){return n.changeState("signIn")},"data-test":d.auth.signUp.signInLink},c.I18n.get("Sign in"))))))},t}(p.AuthPiece);t.SignUp=b,t.default=b},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(3),l=n(6),p=a(n(5)),h=n(2),d=n(4),f=new u.ConsoleLogger("ForgotPassword"),m=function(e){function t(t){var n=e.call(this,t)||this;return n.send=n.send.bind(n),n.submit=n.submit.bind(n),n._validAuthStates=["forgotPassword"],n.state={delivery:null},n}return r(t,e),t.prototype.send=function(){var e=this,t=this.props.authData,n=void 0===t?{}:t,o=this.getUsernameFromInput()||n.username;if(!c.Auth||"function"!=typeof c.Auth.forgotPassword)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.forgotPassword(o).then((function(t){f.debug(t),e.setState({delivery:t.CodeDeliveryDetails})})).catch((function(t){return e.error(t)}))},t.prototype.submit=function(){var e=this,t=this.props.authData,n=void 0===t?{}:t,o=this.inputs,r=o.code,i=o.password,a=this.getUsernameFromInput()||n.username;if(!c.Auth||"function"!=typeof c.Auth.forgotPasswordSubmit)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.forgotPasswordSubmit(a,r,i).then((function(t){f.debug(t),e.changeState("signIn"),e.setState({delivery:null})})).catch((function(t){return e.error(t)}))},t.prototype.sendView=function(){var e=this.props.theme||p.default;return s.createElement("div",null,this.renderUsernameField(e))},t.prototype.submitView=function(){var e=this.props.theme||p.default;return s.createElement("div",null,s.createElement(h.FormField,{theme:e},s.createElement(h.InputLabel,{theme:e},u.I18n.get("Code")," *"),s.createElement(h.Input,{placeholder:u.I18n.get("Code"),theme:e,key:"code",name:"code",autoComplete:"off",onChange:this.handleInputChange})),s.createElement(h.FormField,{theme:e},s.createElement(h.InputLabel,{theme:e},u.I18n.get("New Password")," *"),s.createElement(h.Input,{placeholder:u.I18n.get("New Password"),theme:e,type:"password",key:"password",name:"password",autoComplete:"off",onChange:this.handleInputChange})))},t.prototype.showComponent=function(e){var n=this,o=this.props,r=(o.authState,o.hide),i=o.authData,a=void 0===i?{}:i;return r&&r.includes(t)?null:s.createElement(h.FormSection,{theme:e,"data-test":d.auth.forgotPassword.section},s.createElement(h.SectionHeader,{theme:e,"data-test":d.auth.forgotPassword.headerSection},u.I18n.get("Reset your password")),s.createElement(h.SectionBody,{theme:e,"data-test":d.auth.forgotPassword.bodySection},this.state.delivery||a.username?this.submitView():this.sendView()),s.createElement(h.SectionFooter,{theme:e},s.createElement(h.SectionFooterPrimaryContent,{theme:e},this.state.delivery||a.username?s.createElement(h.Button,{theme:e,onClick:this.submit,"data-test":d.auth.forgotPassword.submitButton},u.I18n.get("Submit")):s.createElement(h.Button,{theme:e,onClick:this.send,"data-test":d.auth.forgotPassword.sendCodeButton},u.I18n.get("Send Code"))),s.createElement(h.SectionFooterSecondaryContent,{theme:e},this.state.delivery||a.username?s.createElement(h.Link,{theme:e,onClick:this.send,"data-test":d.auth.forgotPassword.resendCodeLink},u.I18n.get("Resend Code")):s.createElement(h.Link,{theme:e,onClick:function(){return n.changeState("signIn")},"data-test":d.auth.forgotPassword.backToSignInLink},u.I18n.get("Back to Sign In")))))},t}(l.AuthPiece);t.ForgotPassword=m,t.default=m},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(3),l=a(n(5)),p=n(2),h=n(7),d=a(n(52)),f=new u.ConsoleLogger("TOTPSetupComp"),m=function(e){function t(t){var n=e.call(this,t)||this;return n.setup=n.setup.bind(n),n.showSecretCode=n.showSecretCode.bind(n),n.verifyTotpToken=n.verifyTotpToken.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.triggerTOTPEvent=n.triggerTOTPEvent.bind(n),n.state={code:null,setupMessage:null},n}return r(t,e),t.prototype.componentDidMount=function(){this.setup()},t.prototype.triggerTOTPEvent=function(e,t,n){this.props.onTOTPEvent&&this.props.onTOTPEvent(e,t,n)},t.prototype.handleInputChange=function(e){this.setState({setupMessage:null}),this.inputs={};var t=e.target,n=t.name,o=t.value,r=t.type,i=t.checked,a=["radio","checkbox"].includes(r);this.inputs[n]=a?i:o},t.prototype.setup=function(){var e=this;this.setState({setupMessage:null});var t=this.props.authData,n=encodeURI(u.I18n.get("AWSCognito"));if(!c.Auth||"function"!=typeof c.Auth.setupTOTP)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.setupTOTP(t).then((function(o){f.debug("secret key",o);var r="otpauth://totp/"+n+":"+t.username+"?secret="+o+"&issuer="+n;e.setState({code:r})})).catch((function(e){return f.debug("totp setup failed",e)}))},t.prototype.verifyTotpToken=function(){var e=this;if(this.inputs){var t=this.props.authData,n=this.inputs.totpCode;if(!c.Auth||"function"!=typeof c.Auth.verifyTotpToken||"function"!=typeof c.Auth.setPreferredMFA)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");return c.Auth.verifyTotpToken(t,n).then((function(){return c.Auth.setPreferredMFA(t,"TOTP").then((function(){e.setState({setupMessage:"Setup TOTP successfully!"}),f.debug("set up totp success!"),e.triggerTOTPEvent("Setup TOTP","SUCCESS",t)})).catch((function(t){e.setState({setupMessage:"Setup TOTP failed!"}),f.error(t)}))})).catch((function(t){e.setState({setupMessage:"Setup TOTP failed!"}),f.error(t)}))}f.debug("no input")},t.prototype.showSecretCode=function(e,t){return e?s.createElement("div",null,s.createElement("div",{className:h.totpQrcode},s.createElement(d.default,{value:e})),s.createElement(p.InputLabel,{theme:t},u.I18n.get("Enter Security Code:")),s.createElement(p.Input,{autoFocus:!0,theme:t,key:"totpCode",name:"totpCode",onChange:this.handleInputChange})):null},t.prototype.render=function(){var e=this.props.theme?this.props.theme:l.default,t=this.state.code;return s.createElement(p.FormSection,{theme:e},this.state.setupMessage&&s.createElement(p.Toast,null,u.I18n.get(this.state.setupMessage)),s.createElement(p.SectionHeader,{theme:e},u.I18n.get("Scan then enter verification code")),s.createElement(p.SectionBody,{theme:e},this.showSecretCode(t,e),this.state.setupMessage&&u.I18n.get(this.state.setupMessage)),s.createElement(p.SectionFooter,{theme:e},s.createElement(p.Button,{theme:e,onClick:this.verifyTotpToken,style:{width:"100%"}},u.I18n.get("Verify Security Token"))))},t}(s.Component);t.TOTPSetupComp=m,t.default=m},function(e,t){e.exports=r},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(3),p=n(19),h=n(28),d=n(30),f=n(31),m=n(14),g=n(32),y=n(33),v=n(34),b=n(15),S=n(35),C=n(9),w=s(n(5)),_=n(40),E=n(2),A=n(4),I=new c.ConsoleLogger("Authenticator");t.EmptyContainer=function(e){var t=e.children;return u.createElement(u.Fragment,null,t)};var O=function(e){function n(t){var n=e.call(this,t)||this;return n.handleStateChange=n.handleStateChange.bind(n),n.handleAuthEvent=n.handleAuthEvent.bind(n),n.onHubCapsule=n.onHubCapsule.bind(n),n._initialAuthState=n.props.authState||"signIn",n.state={authState:"loading"},c.Hub.listen("auth",n.onHubCapsule),n}return i(n,e),n.prototype.componentDidMount=function(){var e=this.props.amplifyConfig;e&&c.Amplify.configure(e),this._isMounted=!0;var t=localStorage.getItem(C.Constants.REDIRECTED_FROM_HOSTED_UI);localStorage.removeItem(C.Constants.REDIRECTED_FROM_HOSTED_UI),"true"!==t&&this.checkUser()},n.prototype.componentWillUnmount=function(){this._isMounted=!1},n.prototype.checkUser=function(){var e=this;if(!l.Auth||"function"!=typeof l.Auth.currentAuthenticatedUser)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");return l.Auth.currentAuthenticatedUser().then((function(t){e._isMounted&&e.handleStateChange("signedIn",t)})).catch((function(t){if(e._isMounted){var n=null;try{n=localStorage.getItem("amplify-authenticator-authState")}catch(e){I.debug("Failed to get the auth state from local storage",e)}("signedIn"===n?l.Auth.signOut():Promise.resolve()).then((function(){return e.handleStateChange(e._initialAuthState)})).catch((function(e){I.debug("Failed to sign out",e)}))}}))},n.prototype.checkContact=function(e,t){if(!l.Auth||"function"!=typeof l.Auth.verifiedContact)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");l.Auth.verifiedContact(e).then((function(n){c.isEmpty(n.verified)?(e=Object.assign(e,n),t("verifyContact",e)):t("signedIn",e)}))},n.prototype.onHubCapsule=function(e){var t=e.channel,n=e.payload;e.source;if("auth"===t)switch(n.event){case"cognitoHostedUI":case"signIn":this.checkContact(n.data,this.handleStateChange);break;case"cognitoHostedUI_failure":case"parsingUrl_failure":case"signOut":case"customGreetingSignOut":this.handleStateChange("signIn",null)}},n.prototype.handleStateChange=function(e,t){if(I.debug("authenticator state change "+e,t),e!==this.state.authState){"signedOut"===e&&(e="signIn");try{localStorage.setItem("amplify-authenticator-authState",e)}catch(e){I.debug("Failed to set the auth state into local storage",e)}this._isMounted&&this.setState({authState:e,authData:t,error:null,showToast:!1}),this.props.onStateChange&&this.props.onStateChange(e,t)}},n.prototype.handleAuthEvent=function(e,t,n){if(void 0===n&&(n=!0),"error"===t.type){var o=this.props.errorMessage||_.AmplifyMessageMap,r="string"==typeof o?o:o(t.data);this.setState({error:r,showToast:n})}},n.prototype.render=function(){var e=this,n=this.state,r=n.authState,i=n.authData,a=this.props.theme||w.default,s=this.props.errorMessage||_.AmplifyMessageMap,l=void 0===this.props.container?E.Container:this.props.container||t.EmptyContainer,C=this.props,I=C.hideDefault,O=C.hide,P=void 0===O?[]:O,k=C.federated,x=C.signUpConfig,L=C.usernameAttributes;I&&(P=P.concat([p.Greetings,h.SignIn,d.ConfirmSignIn,f.RequireNewPassword,m.SignUp,y.ConfirmSignUp,v.VerifyContact,b.ForgotPassword,S.TOTPSetup,g.Loading]));var M=[];"object"===o(this.props.children)&&(Array.isArray(this.props.children)?M=this.props.children:M.push(this.props.children));var N=[u.createElement(p.Greetings,{federated:k}),u.createElement(h.SignIn,{federated:k}),u.createElement(d.ConfirmSignIn,null),u.createElement(f.RequireNewPassword,null),u.createElement(m.SignUp,{signUpConfig:x}),u.createElement(y.ConfirmSignUp,null),u.createElement(v.VerifyContact,null),u.createElement(b.ForgotPassword,null),u.createElement(S.TOTPSetup,null),u.createElement(g.Loading,null)],T=u.Children.map(M,(function(e){return e.props.override}));P=P.filter((function(e){return!M.find((function(t){return t.type===e}))}));var B=u.Children.map(M,(function(t,n){return u.cloneElement(t,{key:"aws-amplify-authenticator-props-children-"+n,theme:a,messageMap:s,authState:r,authData:i,onStateChange:e.handleStateChange,onAuthEvent:e.handleAuthEvent,hide:P,override:T,usernameAttributes:L})})),F=(I?[]:u.Children.map(N,(function(t,n){return u.cloneElement(t,{key:"aws-amplify-authenticator-default-children-"+n,theme:a,messageMap:s,authState:r,authData:i,onStateChange:e.handleStateChange,onAuthEvent:e.handleAuthEvent,hide:P,override:T,usernameAttributes:L})}))).concat(B),j=this.state.error;return u.createElement(l,{theme:a},this.state.showToast&&u.createElement(E.Toast,{theme:a,onClose:function(){return e.setState({showToast:!1})},"data-test":A.auth.signIn.signInError},c.I18n.get(j)),F)},n}(u.Component);t.Authenticator=O,t.default=O},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(3),p=n(6),h=n(2),d=n(4),f=s(n(5)),m=n(22),g=n(13),y=n(11),v=new c.ConsoleLogger("Greetings"),b=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.onHubCapsule=n.onHubCapsule.bind(n),n.inGreeting=n.inGreeting.bind(n),c.Hub.listen("auth",n.onHubCapsule),n._validAuthStates=["signedIn"],n}return r(t,e),t.prototype.componentDidMount=function(){this._isMounted=!0,this.findState()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.findState=function(){var e=this;this.props.authState||this.props.authData||l.Auth.currentAuthenticatedUser().then((function(t){e.setState({authState:"signedIn",authData:t,stateFromStorage:!0})})).catch((function(e){return v.debug(e)}))},t.prototype.onHubCapsule=function(e){if(this._isMounted){var t=e.channel,n=e.payload;"auth"===t&&"signIn"===n.event?(this.setState({authState:"signedIn",authData:n.data}),this.props.authState||this.setState({stateFromStorage:!0})):"auth"!==t||"signOut"!==n.event||this.props.authState||this.setState({authState:"signIn"})}},t.prototype.inGreeting=function(e){var t=this.props.usernameAttributes;return""+((void 0===t?y.UsernameAttributes.USERNAME:t)===y.UsernameAttributes.USERNAME?c.I18n.get("Hello")+" ":"")+e},t.prototype.outGreeting=function(){return""},t.prototype.userGreetings=function(e){var t=this.props.authData||this.state.authData,n=this.props.inGreeting||this.inGreeting,o=this.props.usernameAttributes,r="";switch(void 0===o?"username":o){case y.UsernameAttributes.EMAIL:r=t.attributes?t.attributes.email:t.username;break;case y.UsernameAttributes.PHONE_NUMBER:r=t.attributes?t.attributes.phone_number:t.username;break;default:r=(t.attributes?t.attributes.name||(t.attributes.given_name?t.attributes.given_name+" "+t.attributes.family_name:void 0):void 0)||t.name||t.username}var i="function"==typeof n?n(r):n;return u.createElement("span",null,u.createElement(h.NavItem,{theme:e},i),this.renderSignOutButton())},t.prototype.renderSignOutButton=function(){var e=this.props.federated,t=void 0===e?{}:e,n=t.google_client_id,o=t.facebook_app_id,r=t.amazon_client_id,a=t.auth0,s=l.Auth.configure(),c=s.oauth,p=void 0===c?{}:c,h=n||s.googleClientId,d=o||s.facebookClientId,f=r||s.amazonClientId,y=a||p.auth0,v=m.SignOut;h&&(v=g.withGoogle(m.SignOut)),d&&(v=g.withFacebook(m.SignOut)),f&&(v=g.withAmazon(m.SignOut)),y&&(v=g.withAuth0(m.SignOut));var b=Object.assign({},this.props,this.state);return u.createElement(v,i({},b))},t.prototype.noUserGreetings=function(e){var t=this.props.outGreeting||this.outGreeting,n="function"==typeof t?t():t;return n?u.createElement(h.NavItem,{theme:e},n):null},t.prototype.render=function(){var e=this.props.hide;if(e&&e.includes(t))return null;var n="signedIn"===(this.props.authState||this.state.authState),o=this.props.theme||f.default,r=n?this.userGreetings(o):this.noUserGreetings(o);return r?u.createElement(h.NavBar,{theme:o,"data-test":d.auth.greetings.navBar},u.createElement(h.Nav,{theme:o,"data-test":d.auth.greetings.nav},u.createElement(h.NavRight,{theme:o,"data-test":d.auth.greetings.navRight},r))):null},t}(p.AuthPiece);t.Greetings=b,t.default=b},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(2),c=a(n(5)),l=n(21),p=n(1),h=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.handleInputChange=n.handleInputChange.bind(n),n.composePhoneNumber=n.composePhoneNumber.bind(n),n.inputs={dial_code:n.props.defaultDialCode||"+1",phone_line_number:""},n}return r(t,e),t.prototype.composePhoneNumber=function(e,t){return""+(e||"+1")+t.replace(/[-()]/g,"")},t.prototype.handleInputChange=function(e){var t=e.target,n=t.name,o=t.value;this.inputs[n]=o,this.props.onChangeText&&this.props.onChangeText(this.composePhoneNumber(this.inputs.dial_code,this.inputs.phone_line_number))},t.prototype.render=function(){var e=this.props,t=e.theme,n=void 0===t?c.default:t,o=e.required,r=void 0===o||o,i=e.defaultDialCode,a=void 0===i?"+1":i,d=e.label,f=void 0===d?"Phone Number":d,m=e.placeholder,g=void 0===m?"Enter your phone number":m;return s.createElement(u.FormField,{theme:n,key:"phone_number"},r?s.createElement(u.InputLabel,{theme:n},p.I18n.get(f)," *"):s.createElement(u.InputLabel,{theme:n},p.I18n.get(f)),s.createElement(u.SelectInput,{theme:n},s.createElement("select",{name:"dial_code",defaultValue:a,onChange:this.handleInputChange,"data-test":h.auth.genericAttrs.dialCodeSelect},l.countryDialCodes.map((function(e){return s.createElement("option",{key:e,value:e},e)}))),s.createElement(u.Input,{placeholder:p.I18n.get(g),theme:n,type:"tel",id:"phone_line_number",key:"phone_line_number",name:"phone_line_number",onChange:this.handleInputChange,"data-test":h.auth.genericAttrs.phoneNumberInput})))},t}(s.Component);t.PhoneField=d,t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.countryDialCodes=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"]},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(3),l=n(6),p=n(2),h=a(n(5)),d=n(9),f=n(4),m=new u.ConsoleLogger("SignOut"),g=function(e){function t(t){var n=e.call(this,t)||this;return n.signOut=n.signOut.bind(n),n.onHubCapsule=n.onHubCapsule.bind(n),u.Hub.listen("auth",n.onHubCapsule),n.state={},n}return r(t,e),t.prototype.componentDidMount=function(){this._isMounted=!0,this.findState()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.findState=function(){var e=this;this.props.authState||this.props.authData?this.props.stateFromStorage&&this.setState({stateFromStorage:!0}):c.Auth.currentAuthenticatedUser().then((function(t){e.setState({authState:"signedIn",authData:t,stateFromStorage:!0})})).catch((function(e){return m.error(e)}))},t.prototype.onHubCapsule=function(e){if(this._isMounted){var t=e.channel,n=e.payload;e.source;"auth"===t&&"signIn"===n.event?this.setState({authState:"signedIn",authData:n.data}):"auth"!==t||"signOut"!==n.event||this.props.authState||this.setState({authState:"signIn"}),"auth"!==t||"signIn"!==n.event||this.props.authState||this.setState({stateFromStorage:!0})}},t.prototype.signOut=function(){var e=this,t={};try{t=JSON.parse(localStorage.getItem(d.Constants.AUTH_SOURCE_KEY))||{},localStorage.removeItem(d.Constants.AUTH_SOURCE_KEY)}catch(e){m.debug("Failed to parse the info from "+d.Constants.AUTH_SOURCE_KEY+" from localStorage with "+e)}m.debug("sign out from the source",t);var n=this.props,o=n.googleSignOut,r=n.facebookSignOut,i=n.amazonSignOut,a=n.auth0SignOut;switch(t.provider){case d.Constants.GOOGLE:o?o():m.debug("No Google signout method provided");break;case d.Constants.FACEBOOK:r?r():m.debug("No Facebook signout method provided");break;case d.Constants.AMAZON:i?i():m.debug("No Amazon signout method provided");break;case d.Constants.AUTH0:a?a(t.opts):m.debug("No Auth0 signout method provided")}if(!c.Auth||"function"!=typeof c.Auth.signOut)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.signOut().then((function(){e.state.stateFromStorage||e.changeState("signedOut")})).catch((function(t){m.debug(t),e.error(t)}))},t.prototype.render=function(){var e=this.props.hide;if(e&&e.includes(t))return null;var n="signedIn"===(this.props.authState||this.state.authState),o=this.props.theme||h.default;return n?s.createElement(p.NavButton,{theme:o,onClick:this.signOut,"data-test":f.auth.signOut.button},u.I18n.get("Sign Out")):null},t}(l.AuthPiece);t.SignOut=g,t.default=g},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=u(n(0)),p=n(1),h=n(3),d=c(n(5)),f=n(7),m=n(2),g=n(9),y=new p.ConsoleLogger("withGoogle");function v(e){return function(t){function n(e){var n=t.call(this,e)||this;return n.initGapi=n.initGapi.bind(n),n.signIn=n.signIn.bind(n),n.signOut=n.signOut.bind(n),n.federatedSignIn=n.federatedSignIn.bind(n),n.state={},n}return r(n,t),n.prototype.signIn=function(){var e=this,t=window.gapi.auth2.getAuthInstance(),n=this.props.onError;t.signIn().then((function(t){e.federatedSignIn(t);var n={provider:g.Constants.GOOGLE};try{localStorage.setItem(g.Constants.AUTH_SOURCE_KEY,JSON.stringify(n))}catch(e){y.debug("Failed to cache auth source into localStorage",e)}}),(function(e){if(!n)throw e;n(e)}))},n.prototype.federatedSignIn=function(e){return a(this,void 0,void 0,(function(){var t,n,o,r,i,a;return s(this,(function(s){switch(s.label){case 0:if(t=e.getAuthResponse(),n=t.id_token,o=t.expires_at,r=e.getBasicProfile(),i={email:r.getEmail(),name:r.getName(),picture:r.getImageUrl()},a=this.props.onStateChange,!h.Auth||"function"!=typeof h.Auth.federatedSignIn||"function"!=typeof h.Auth.currentAuthenticatedUser)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");return[4,h.Auth.federatedSignIn("google",{token:n,expires_at:o},i)];case 1:return s.sent(),[4,h.Auth.currentAuthenticatedUser()];case 2:return i=s.sent(),a&&a("signedIn",i),[2]}}))}))},n.prototype.signOut=function(){var e=window.gapi&&window.gapi.auth2?window.gapi.auth2.getAuthInstance():null;if(!e)return Promise.resolve();e.then((function(e){return e?(y.debug("google signing out"),e.signOut()):(y.debug("google Auth undefined"),Promise.resolve())}))},n.prototype.componentDidMount=function(){var e=this.props.google_client_id,t=window.gapi&&window.gapi.auth2?window.gapi.auth2.getAuthInstance():null;e&&!t&&this.createScript()},n.prototype.createScript=function(){var e=document.createElement("script");e.src="https://apis.google.com/js/platform.js",e.async=!0,e.onload=this.initGapi,document.body.appendChild(e)},n.prototype.initGapi=function(){y.debug("init gapi");var e=this.props.google_client_id,t=window.gapi;t.load("auth2",(function(){t.auth2.init({client_id:e,scope:"profile email openid"})}))},n.prototype.render=function(){var t=window.gapi&&window.gapi.auth2?window.gapi.auth2.getAuthInstance():null;return l.createElement(e,i({},this.props,{ga:t,googleSignIn:this.signIn,googleSignOut:this.signOut}))},n}(l.Component)}t.withGoogle=v;t.GoogleButton=v((function(e){return l.createElement(m.SignInButton,{id:f.googleSignInButton,onClick:e.googleSignIn,theme:e.theme||d.default,variant:"googleSignInButton"},l.createElement(m.SignInButtonIcon,{theme:e.theme||d.default},l.createElement("svg",{viewBox:"0 0 256 262",xmlns:"http://ww0w.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},l.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),l.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),l.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),l.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"}))),l.createElement(m.SignInButtonContent,{theme:e.theme||d.default},p.I18n.get("Sign In with Google")))})),t.default=v},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(3),p=s(n(5)),h=n(7),d=n(2),f=n(9),m=new c.ConsoleLogger("withFacebook");function g(e){return function(t){function n(e){var n=t.call(this,e)||this;return n.fbAsyncInit=n.fbAsyncInit.bind(n),n.initFB=n.initFB.bind(n),n.signIn=n.signIn.bind(n),n.signOut=n.signOut.bind(n),n.federatedSignIn=n.federatedSignIn.bind(n),n.state={},n}return r(n,t),n.prototype.signIn=function(){var e=this,t=window.FB;t.getLoginStatus((function(n){var o={provider:f.Constants.FACEBOOK};try{localStorage.setItem(f.Constants.AUTH_SOURCE_KEY,JSON.stringify(o))}catch(e){m.debug("Failed to cache auth source into localStorage",e)}"connected"===n.status?e.federatedSignIn(n.authResponse):t.login((function(t){t&&t.authResponse&&e.federatedSignIn(t.authResponse)}),{scope:"public_profile,email"})}))},n.prototype.federatedSignIn=function(e){m.debug(e);var t=this.props.onStateChange,n=e.accessToken,o=1e3*e.expiresIn+(new Date).getTime();n&&window.FB.api("/me",{fields:"name,email,picture"},(function(e){var r={name:e.name,email:e.email,picture:e.picture.data.url};if(!l.Auth||"function"!=typeof l.Auth.federatedSignIn||"function"!=typeof l.Auth.currentAuthenticatedUser)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");l.Auth.federatedSignIn("facebook",{token:n,expires_at:o},r).then((function(e){return l.Auth.currentAuthenticatedUser()})).then((function(e){t&&t("signedIn",e)}))}))},n.prototype.signOut=function(){var e=window.FB;if(!e)return m.debug("FB sdk undefined"),Promise.resolve();e.getLoginStatus((function(t){return"connected"===t.status?new Promise((function(t,n){m.debug("facebook signing out"),e.logout((function(e){t(e)}))})):Promise.resolve()}))},n.prototype.componentDidMount=function(){this.props.facebook_app_id&&!window.FB&&this.createScript()},n.prototype.fbAsyncInit=function(){m.debug("init FB");var e=this.props.facebook_app_id,t=window.FB;t.init({appId:e,cookie:!0,xfbml:!0,version:"v2.11"}),t.getLoginStatus((function(e){return m.debug(e)}))},n.prototype.initFB=function(){window.FB;m.debug("FB inited")},n.prototype.createScript=function(){window.fbAsyncInit=this.fbAsyncInit;var e=document.createElement("script");e.src="https://connect.facebook.net/en_US/sdk.js",e.async=!0,e.onload=this.initFB,document.body.appendChild(e)},n.prototype.render=function(){var t=window.FB;return u.createElement(e,i({},this.props,{fb:t,facebookSignIn:this.signIn,facebookSignOut:this.signOut}))},n}(u.Component)}t.withFacebook=g;t.FacebookButton=g((function(e){return u.createElement(d.SignInButton,{id:h.facebookSignInButton,onClick:e.facebookSignIn,theme:e.theme||p.default,variant:"facebookSignInButton"},u.createElement(d.SignInButtonIcon,{theme:e.theme||p.default},u.createElement("svg",{viewBox:"0 0 279 538",xmlns:"http://www.w3.org/2000/svg"},u.createElement("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Artboard",fill:"#FFF"},u.createElement("path",{d:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",id:"Fill-1"}))))),u.createElement(d.SignInButtonContent,{theme:e.theme||p.default},c.I18n.get("Sign In with Facebook")))})),t.default=g},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(3),p=s(n(5)),h=n(7),d=n(2),f=n(9),m=new c.ConsoleLogger("withAmazon");function g(e){return function(t){function n(e){var n=t.call(this,e)||this;return n.initAmazon=n.initAmazon.bind(n),n.signIn=n.signIn.bind(n),n.signOut=n.signOut.bind(n),n.federatedSignIn=n.federatedSignIn.bind(n),n.state={},n}return r(n,t),n.prototype.signIn=function(){var e=this;window.amazon.Login.authorize({scope:"profile"},(function(t){if(t.error)m.debug("Failed to login with amazon: "+t.error);else{var n={provider:f.Constants.AMAZON};try{localStorage.setItem(f.Constants.AUTH_SOURCE_KEY,JSON.stringify(n))}catch(e){m.debug("Failed to cache auth source into localStorage",e)}e.federatedSignIn(t)}}))},n.prototype.federatedSignIn=function(e){var t=e.access_token,n=e.expires_in,o=this.props.onStateChange,r=1e3*n+(new Date).getTime();t&&window.amazon.Login.retrieveProfile((function(e){if(e.success){var n={name:e.profile.Name,email:e.profile.PrimaryEmail};if(!l.Auth||"function"!=typeof l.Auth.federatedSignIn||"function"!=typeof l.Auth.currentAuthenticatedUser)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");l.Auth.federatedSignIn("amazon",{token:t,expires_at:r},n).then((function(e){return l.Auth.currentAuthenticatedUser()})).then((function(e){o&&o("signedIn",e)}))}else m.debug("Get user Info failed")}))},n.prototype.signOut=function(){var e=window.amazon;if(!e)return m.debug("Amazon Login sdk undefined"),Promise.resolve();m.debug("Amazon signing out"),e.Login.logout()},n.prototype.componentDidMount=function(){this.props.amazon_client_id&&!window.amazon&&this.createScript()},n.prototype.createScript=function(){var e=document.createElement("script");e.src="https://api-cdn.amazon.com/sdk/login1.js",e.async=!0,e.onload=this.initAmazon,document.body.appendChild(e)},n.prototype.initAmazon=function(){m.debug("init amazon");var e=this.props.amazon_client_id;window.amazon.Login.setClientId(e)},n.prototype.render=function(){var t=window.amazon;return u.createElement(e,i({},this.props,{amz:t,amazonSignIn:this.signIn,amazonSignOut:this.signOut}))},n}(u.Component)}t.withAmazon=g;t.AmazonButton=g((function(e){return u.createElement(d.SignInButton,{id:h.amazonSignInButton,onClick:e.amazonSignIn,theme:e.theme||p.default,variant:"amazonSignInButton"},u.createElement(d.SignInButtonIcon,{theme:e.theme||p.default},u.createElement("svg",{viewBox:"0 0 248 268",xmlns:"http://www.w3.org/2000/svg"},u.createElement("g",{id:"Artboard-Copy-2",fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z",id:"Fill-6",fill:"#FFF"})))),u.createElement(d.SignInButtonContent,{theme:e.theme||p.default},c.I18n.get("Sign In with Amazon")))})),t.default=g},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(3),p=s(n(5)),h=n(7),d=n(2);function f(e){return function(t){function n(e){var n=t.call(this,e)||this;return n.signIn=n.signIn.bind(n),n}return r(n,t),n.prototype.signIn=function(e,t){l.Auth.federatedSignIn({provider:t})},n.prototype.render=function(){return u.createElement(e,i({},this.props,{OAuthSignIn:this.signIn}))},n}(u.Component)}t.withOAuth=f;t.OAuthButton=f((function(e){return u.createElement(d.SignInButton,{id:h.oAuthSignInButton,onClick:function(){return e.OAuthSignIn()},theme:e.theme||p.default,variant:"oAuthSignInButton"},u.createElement(d.SignInButtonContent,{theme:e.theme||p.default},c.I18n.get(e.label||"Sign in with AWS")))})),t.default=f},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=u(n(0)),p=n(1),h=n(3),d=c(n(5)),f=n(7),m=n(2),g=n(9),y=new p.ConsoleLogger("withAuth0");function v(e,t){return function(n){function o(e){var t=n.call(this,e)||this;return t._auth0=null,t.initialize=t.initialize.bind(t),t.signIn=t.signIn.bind(t),t.signOut=t.signOut.bind(t),t}return r(o,n),o.prototype.componentDidMount=function(){window.auth0?this.initialize():this.createScript()},o.prototype.createScript=function(){var e=document.createElement("script");e.src="https://cdn.auth0.com/js/auth0/9.8.1/auth0.min.js",e.async=!0,e.onload=this.initialize,document.body.appendChild(e)},o.prototype.initialize=function(){var e=this,n=h.Auth.configure().oauth,o=void 0===n?{}:n,r=this.props.auth0||t||o.auth0,i=this.props,a=i.onError,s=i.onStateChange,u=i.authState;r?(y.debug("withAuth0 configuration",r),this._auth0||(this._auth0=new window.auth0.WebAuth(r),window.auth0_client=this._auth0),"signedIn"!==u&&this._auth0.parseHash((function(t,n){if(!t&&n){var o={provider:g.Constants.AUTH0,opts:{returnTo:r.returnTo,clientID:r.clientID,federated:r.federated}};try{localStorage.setItem(g.Constants.AUTH_SOURCE_KEY,JSON.stringify(o))}catch(e){y.debug("Failed to cache auth source into localStorage",e)}e._auth0.client.userInfo(n.accessToken,(function(e,t){var o=void 0,i=void 0,u=void 0;e?y.debug("Failed to get the user info",e):(o=t.name,i=t.email,u=t.picture),h.Auth.federatedSignIn(r.domain,{token:n.idToken,expires_at:1e3*n.expiresIn+(new Date).getTime()},{name:o,email:i,picture:u}).then((function(){s&&h.Auth.currentAuthenticatedUser().then((function(e){s("signedIn",e)}))})).catch((function(e){y.debug("Failed to get the aws credentials",e),a&&a(e)}))}))}else y.debug("Failed to parse the url for Auth0",t)}))):y.debug("Auth0 is not configured")},o.prototype.signIn=function(){return a(this,void 0,void 0,(function(){return s(this,(function(e){if(!this._auth0)throw new Error("the auth0 client is not configured");return this._auth0.authorize(),[2]}))}))},o.prototype.signOut=function(e){void 0===e&&(e={});var t=window.auth0_client,n=e.returnTo,o=e.clientID,r=e.federated;if(!t)return y.debug("auth0 sdk undefined"),Promise.resolve();t.logout({returnTo:n,clientID:o,federated:r})},o.prototype.render=function(){return l.createElement(e,i({},this.props,{auth0:this._auth0,auth0SignIn:this.signIn,auth0SignOut:this.signOut}))},o}(l.Component)}t.withAuth0=v;t.Auth0Button=v((function(e){return l.createElement(m.SignInButton,{id:f.auth0SignInButton,onClick:e.auth0SignIn,theme:e.theme||d.default,variant:"auth0SignInButton"},l.createElement(m.SignInButtonIcon,{theme:e.theme||d.default},l.createElement("svg",{id:"artwork",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 193.7 216.6"},l.createElement("path",{id:"NEW",className:"st0",d:"M189,66.9L167.2,0H96.8l21.8,66.9H189z M96.8,0H26.5L4.8,66.9h70.4L96.8,0z M4.8,66.9L4.8,66.9\tc-13,39.9,1.2,83.6,35.2,108.3l21.7-66.9L4.8,66.9z M189,66.9L189,66.9l-57,41.4l21.7,66.9l0,0C187.7,150.6,201.9,106.8,189,66.9\tL189,66.9z M39.9,175.2L39.9,175.2l56.9,41.4l56.9-41.4l-56.9-41.4L39.9,175.2z"}))),l.createElement(m.SignInButtonContent,{theme:e.theme||d.default},e.label||"Sign In with Auth0"))})),t.default=v},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(0)),c=n(1),l=n(3),p=n(6),h=n(29),d=n(14),f=n(15),m=n(2),g=n(4),y=new c.ConsoleLogger("SignIn"),v=function(e){function t(t){var n=e.call(this,t)||this;return n.checkContact=n.checkContact.bind(n),n.signIn=n.signIn.bind(n),n._validAuthStates=["signIn","signedOut","signedUp"],n.state={},n}return r(t,e),t.prototype.checkContact=function(e){var t=this;if(!l.Auth||"function"!=typeof l.Auth.verifiedContact)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");l.Auth.verifiedContact(e).then((function(n){c.isEmpty(n.verified)?(e=Object.assign(e,n),t.changeState("verifyContact",e)):t.changeState("signedIn",e)}))},t.prototype.signIn=function(e){return i(this,void 0,void 0,(function(){var t,n,o,r;return a(this,(function(i){switch(i.label){case 0:if(e&&e.preventDefault(),t=this.getUsernameFromInput()||"",n=this.inputs.password,!l.Auth||"function"!=typeof l.Auth.signIn)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");this.setState({loading:!0}),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,l.Auth.signIn(t,n)];case 2:return o=i.sent(),y.debug(o),"SMS_MFA"===o.challengeName||"SOFTWARE_TOKEN_MFA"===o.challengeName?(y.debug("confirm user with "+o.challengeName),this.changeState("confirmSignIn",o)):"NEW_PASSWORD_REQUIRED"===o.challengeName?(y.debug("require new password",o.challengeParam),this.changeState("requireNewPassword",o)):"MFA_SETUP"===o.challengeName?(y.debug("TOTP setup",o.challengeParam),this.changeState("TOTPSetup",o)):"CUSTOM_CHALLENGE"===o.challengeName&&o.challengeParam&&"true"===o.challengeParam.trigger?(y.debug("custom challenge",o.challengeParam),this.changeState("customConfirmSignIn",o)):this.checkContact(o),[3,5];case 3:return"UserNotConfirmedException"===(r=i.sent()).code?(y.debug("the user is not confirmed"),this.changeState("confirmSignUp",{username:t})):"PasswordResetRequiredException"===r.code?(y.debug("the user requires a new password"),this.changeState("forgotPassword",{username:t})):this.error(r),[3,5];case 4:return this.setState({loading:!1}),[7];case 5:return[2]}}))}))},t.prototype.showComponent=function(e){var n=this,o=this.props,r=o.authState,i=o.hide,a=void 0===i?[]:i,s=o.federated,l=o.onStateChange,p=o.onAuthEvent,y=o.override,v=void 0===y?[]:y;if(a&&a.includes(t))return null;var b=!v.includes("SignUp")&&a.some((function(e){return e===d.SignUp})),S=!v.includes("ForgotPassword")&&a.some((function(e){return e===f.ForgotPassword}));return u.createElement(m.FormSection,{theme:e,"data-test":g.auth.signIn.section},u.createElement(m.SectionHeader,{theme:e,"data-test":g.auth.signIn.headerSection},c.I18n.get("Sign in to your account")),u.createElement(h.FederatedButtons,{federated:s,theme:e,authState:r,onStateChange:l,onAuthEvent:p}),u.createElement("form",{onSubmit:this.signIn},u.createElement(m.SectionBody,{theme:e},this.renderUsernameField(e),u.createElement(m.FormField,{theme:e},u.createElement(m.InputLabel,{theme:e},c.I18n.get("Password")," *"),u.createElement(m.Input,{placeholder:c.I18n.get("Enter your password"),theme:e,key:"password",type:"password",name:"password",onChange:this.handleInputChange,"data-test":g.auth.signIn.passwordInput}),!S&&u.createElement(m.Hint,{theme:e},c.I18n.get("Forgot your password? "),u.createElement(m.Link,{theme:e,onClick:function(){return n.changeState("forgotPassword")},"data-test":g.auth.signIn.forgotPasswordLink},c.I18n.get("Reset password"))))),u.createElement(m.SectionFooter,{theme:e,"data-test":g.auth.signIn.footerSection},u.createElement(m.SectionFooterPrimaryContent,{theme:e},u.createElement(m.Button,{theme:e,type:"submit",disabled:this.state.loading,"data-test":g.auth.signIn.signInButton},c.I18n.get("Sign In"))),!b&&u.createElement(m.SectionFooterSecondaryContent,{theme:e},c.I18n.get("No account? "),u.createElement(m.Link,{theme:e,onClick:function(){return n.changeState("signUp")},"data-test":g.auth.signIn.createAccountLink},c.I18n.get("Create account"))))))},t}(p.AuthPiece);t.SignIn=v,t.default=v},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(3),l=a(n(5)),p=n(2),h=n(4),d=n(13),f=new u.ConsoleLogger("FederatedSignIn"),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.google=function(e){if(!e)return null;var t=this.props,n=t.theme,o=t.onStateChange;return s.createElement(d.GoogleButton,{google_client_id:e,theme:n,onStateChange:o})},t.prototype.facebook=function(e){if(!e)return null;var t=this.props,n=t.theme,o=t.onStateChange;return s.createElement(d.FacebookButton,{facebook_app_id:e,theme:n,onStateChange:o})},t.prototype.amazon=function(e){if(!e)return null;var t=this.props,n=t.theme,o=t.onStateChange;return s.createElement(d.AmazonButton,{amazon_client_id:e,theme:n,onStateChange:o})},t.prototype.OAuth=function(e){if(!e)return null;var t=this.props,n=t.theme,o=t.onStateChange;return s.createElement(d.OAuthButton,{label:e?e.label:void 0,theme:n,onStateChange:o})},t.prototype.auth0=function(e){if(!e)return null;var t=this.props,n=t.theme,o=t.onStateChange;return s.createElement(d.Auth0Button,{label:e?e.label:void 0,theme:n,onStateChange:o,auth0:e})},t.prototype.render=function(){var e=this.props.authState;if(!["signIn","signedOut","signedUp"].includes(e))return null;var t=this.props.federated||{};if(!c.Auth||"function"!=typeof c.Auth.configure)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");var n=c.Auth.configure().oauth,o=void 0===n?{}:n;if(o.domain?t.oauth_config=Object.assign({},t.oauth_config,o):o.awsCognito&&(t.oauth_config=Object.assign({},t.oauth_config,o.awsCognito)),o.auth0&&(t.auth0=Object.assign({},t.auth0,o.auth0)),u.isEmpty(t))return null;var r=t.google_client_id,i=t.facebook_app_id,a=t.amazon_client_id,h=t.oauth_config,d=t.auth0,f=this.props.theme||l.default;return s.createElement("div",null,s.createElement("div",null,this.google(r)),s.createElement("div",null,this.facebook(i)),s.createElement("div",null,this.amazon(a)),s.createElement("div",null,this.OAuth(h)),s.createElement("div",null,this.auth0(d)),s.createElement(p.Strike,{theme:f},u.I18n.get("or")))},t}(s.Component);t.FederatedButtons=m;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.authState,n=e.onStateChange,o=this.props.federated||{};if(!c.Auth||"function"!=typeof c.Auth.configure)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");var r=c.Auth.configure().oauth,i=void 0===r?{}:r;if(i.domain?o.oauth_config=Object.assign({},o.oauth_config,i):i.awsCognito&&(o.oauth_config=Object.assign({},o.oauth_config,i.awsCognito)),i.auth0&&(o.auth0=Object.assign({},o.auth0,i.auth0)),!o)return f.debug("federated prop is empty. show nothing"),f.debug("federated={google_client_id: , facebook_app_id: , amazon_client_id}"),null;if(!["signIn","signedOut","signedUp"].includes(t))return null;f.debug("federated Config is",o);var a=this.props.theme||l.default;return s.createElement(p.FormSection,{theme:a,"data-test":h.auth.federatedSignIn.section},s.createElement(p.SectionBody,{theme:a,"data-test":h.auth.federatedSignIn.bodySection},s.createElement(m,{federated:o,theme:a,authState:t,onStateChange:n,"data-test":h.auth.federatedSignIn.signInButtons})))},t}(s.Component);t.FederatedSignIn=g,t.default=g},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(0)),s=n(1),u=n(3),c=n(6),l=n(2),p=n(4),h=function(e){function t(t){var n=e.call(this,t)||this;return n._validAuthStates=["confirmSignIn"],n.confirm=n.confirm.bind(n),n.checkContact=n.checkContact.bind(n),n.state={mfaType:"SMS"},n}return r(t,e),t.prototype.checkContact=function(e){var t=this;if(!u.Auth||"function"!=typeof u.Auth.verifiedContact)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");u.Auth.verifiedContact(e).then((function(n){if(s.isEmpty(n.verified)){var o=Object.assign(e,n);t.changeState("verifyContact",o)}else t.changeState("signedIn",e)}))},t.prototype.confirm=function(e){var t=this;e&&e.preventDefault();var n=this.props.authData,o=this.inputs.code,r="SOFTWARE_TOKEN_MFA"===n.challengeName?"SOFTWARE_TOKEN_MFA":null;if(!u.Auth||"function"!=typeof u.Auth.confirmSignIn)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");u.Auth.confirmSignIn(n,o,r).then((function(){t.checkContact(n)})).catch((function(e){return t.error(e)}))},t.prototype.componentDidUpdate=function(){var e=this.props.authData,t=e&&"SOFTWARE_TOKEN_MFA"===e.challengeName?"TOTP":"SMS";this.state.mfaType!==t&&this.setState({mfaType:t})},t.prototype.showComponent=function(e){var n=this,o=this.props.hide;return o&&o.includes(t)?null:a.createElement(l.FormSection,{theme:e,"data-test":p.auth.confirmSignIn.section},a.createElement(l.SectionHeader,{theme:e,"data-test":p.auth.confirmSignIn.headerSection},s.I18n.get("Confirm "+this.state.mfaType+" Code")),a.createElement("form",{onSubmit:this.confirm,"data-test":p.auth.confirmSignIn.bodySection},a.createElement(l.SectionBody,{theme:e},a.createElement(l.FormField,{theme:e},a.createElement(l.InputLabel,{theme:e},s.I18n.get("Code")," *"),a.createElement(l.Input,{autoFocus:!0,placeholder:s.I18n.get("Code"),theme:e,key:"code",name:"code",autoComplete:"off",onChange:this.handleInputChange,"data-test":p.auth.confirmSignIn.codeInput}))),a.createElement(l.SectionFooter,{theme:e},a.createElement(l.SectionFooterPrimaryContent,{theme:e,"data-test":p.auth.confirmSignIn.confirmButton},a.createElement(l.Button,{theme:e,type:"submit"},s.I18n.get("Confirm"))),a.createElement(l.SectionFooterSecondaryContent,{theme:e},a.createElement(l.Link,{theme:e,onClick:function(){return n.changeState("signIn")},"data-test":p.auth.confirmSignIn.backToSignInLink},s.I18n.get("Back to Sign In"))))))},t}(c.AuthPiece);t.ConfirmSignIn=h,t.default=h},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(0)),s=n(1),u=n(3),c=n(6),l=n(2),p=n(4),h=new s.ConsoleLogger("RequireNewPassword"),d=function(e){function t(t){var n=e.call(this,t)||this;return n._validAuthStates=["requireNewPassword"],n.change=n.change.bind(n),n.checkContact=n.checkContact.bind(n),n}return r(t,e),t.prototype.checkContact=function(e){var t=this;if(!u.Auth||"function"!=typeof u.Auth.verifiedContact)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");u.Auth.verifiedContact(e).then((function(n){s.isEmpty(n.verified)?(e=Object.assign(e,n),t.changeState("verifyContact",e)):t.changeState("signedIn",e)}))},t.prototype.change=function(){var e=this,t=this.props.authData,n=this.inputs.password,o=t.challengeParam.requiredAttributes,r=function(e,t){var n={};for(var o in e)-1!==t.indexOf(o)&&Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(this.inputs,o);if(!u.Auth||"function"!=typeof u.Auth.completeNewPassword)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");u.Auth.completeNewPassword(t,n,r).then((function(t){h.debug("complete new password",t),"SMS_MFA"===t.challengeName?e.changeState("confirmSignIn",t):"MFA_SETUP"===t.challengeName?(h.debug("TOTP setup",t.challengeParam),e.changeState("TOTPSetup",t)):e.checkContact(t)})).catch((function(t){return e.error(t)}))},t.prototype.showComponent=function(e){var n=this,o=this.props.hide;if(o&&o.includes(t))return null;var r=this.props.authData.challengeParam.requiredAttributes;return a.createElement(l.FormSection,{theme:e,"data-test":p.auth.requireNewPassword.section},a.createElement(l.SectionHeader,{theme:e,"data-test":p.auth.requireNewPassword.headerSection},s.I18n.get("Change Password")),a.createElement(l.SectionBody,{theme:e,"data-test":p.auth.requireNewPassword.bodySection},a.createElement(l.Input,{autoFocus:!0,placeholder:s.I18n.get("New Password"),theme:e,key:"password",name:"password",type:"password",onChange:this.handleInputChange,"data-test":p.auth.requireNewPassword.newPasswordInput}),r.map((function(t){return a.createElement(l.Input,{placeholder:s.I18n.get((o=t,o.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})).join(" "))),theme:e,key:t,name:t,type:"text",onChange:n.handleInputChange});var o}))),a.createElement(l.SectionFooter,{theme:e},a.createElement(l.SectionFooterPrimaryContent,{theme:e},a.createElement(l.Button,{theme:e,onClick:this.change},s.I18n.get("Change"))),a.createElement(l.SectionFooterSecondaryContent,{theme:e},a.createElement(l.Link,{theme:e,onClick:function(){return n.changeState("signIn")},"data-test":p.auth.requireNewPassword.backToSignInLink},s.I18n.get("Back to Sign In")))))},t}(c.AuthPiece);t.RequireNewPassword=d,t.default=d},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(0)),s=n(1),u=n(6),c=n(2),l=n(4),p=function(e){function t(t){var n=e.call(this,t)||this;return n._validAuthStates=["loading"],n}return r(t,e),t.prototype.showComponent=function(e){var n=this.props.hide;return n&&n.includes(t)?null:a.createElement(c.FormSection,{theme:e,"data-test":l.auth.loading.section},a.createElement(c.SectionBody,{theme:e},s.I18n.get("Loading...")))},t}(u.AuthPiece);t.Loading=p},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(0)),s=n(1),u=n(3),c=n(6),l=n(2),p=n(4),h=new s.ConsoleLogger("ConfirmSignUp"),d=function(e){function t(t){var n=e.call(this,t)||this;return n._validAuthStates=["confirmSignUp"],n.confirm=n.confirm.bind(n),n.resend=n.resend.bind(n),n}return r(t,e),t.prototype.confirm=function(){var e=this,t=this.usernameFromAuthData()||this.inputs.username,n=this.inputs.code;if(!u.Auth||"function"!=typeof u.Auth.confirmSignUp)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");u.Auth.confirmSignUp(t,n).then((function(){return e.changeState("signedUp")})).catch((function(t){return e.error(t)}))},t.prototype.resend=function(){var e=this,t=this.usernameFromAuthData()||this.inputs.username;if(!u.Auth||"function"!=typeof u.Auth.resendSignUp)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");u.Auth.resendSignUp(t).then((function(){return h.debug("code resent")})).catch((function(t){return e.error(t)}))},t.prototype.showComponent=function(e){var n=this,o=this.props.hide,r=this.usernameFromAuthData();return o&&o.includes(t)?null:a.createElement(l.FormSection,{theme:e,"data-test":p.auth.confirmSignUp.section},a.createElement(l.SectionHeader,{theme:e,"data-test":p.auth.confirmSignUp.headerSection},s.I18n.get("Confirm Sign Up")),a.createElement(l.SectionBody,{theme:e,"data-test":p.auth.confirmSignUp.bodySection},a.createElement(l.FormField,{theme:e},a.createElement(l.InputLabel,{theme:e},s.I18n.get(this.getUsernameLabel())," *"),a.createElement(l.Input,{placeholder:s.I18n.get("Username"),theme:e,key:"username",name:"username",onChange:this.handleInputChange,disabled:r,value:r||"","data-test":p.auth.confirmSignUp.usernameInput})),a.createElement(l.FormField,{theme:e},a.createElement(l.InputLabel,{theme:e},s.I18n.get("Confirmation Code")," *"),a.createElement(l.Input,{autoFocus:!0,placeholder:s.I18n.get("Enter your code"),theme:e,key:"code",name:"code",autoComplete:"off",onChange:this.handleInputChange,"data-test":p.auth.confirmSignUp.confirmationCodeInput}),a.createElement(l.Hint,{theme:e},s.I18n.get("Lost your code? "),a.createElement(l.Link,{theme:e,onClick:this.resend,"data-test":p.auth.confirmSignUp.resendCodeLink},s.I18n.get("Resend Code"))))),a.createElement(l.SectionFooter,{theme:e},a.createElement(l.SectionFooterPrimaryContent,{theme:e},a.createElement(l.Button,{theme:e,onClick:this.confirm,"data-test":p.auth.confirmSignUp.confirmButton},s.I18n.get("Confirm"))),a.createElement(l.SectionFooterSecondaryContent,{theme:e},a.createElement(l.Link,{theme:e,onClick:function(){return n.changeState("signIn")},"data-test":p.auth.confirmSignUp.backToSignInLink},s.I18n.get("Back to Sign In")))))},t}(c.AuthPiece);t.ConfirmSignUp=d,t.default=d},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(3),l=n(6),p=a(n(8)),h=n(2),d=n(4),f=new u.ConsoleLogger("VerifyContact"),m=function(e){function t(t){var n=e.call(this,t)||this;return n._validAuthStates=["verifyContact"],n.verify=n.verify.bind(n),n.submit=n.submit.bind(n),n.state={verifyAttr:null},n}return r(t,e),t.prototype.verify=function(){var e=this,t=this.inputs,n=t.contact,o=t.checkedValue;if(n){if(!c.Auth||"function"!=typeof c.Auth.verifyCurrentUserAttribute)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.verifyCurrentUserAttribute(o).then((function(t){f.debug(t),e.setState({verifyAttr:o})})).catch((function(t){return e.error(t)}))}else this.error("Neither Email nor Phone Number selected")},t.prototype.submit=function(){var e=this,t=this.state.verifyAttr,n=this.inputs.code;if(!c.Auth||"function"!=typeof c.Auth.verifyCurrentUserAttributeSubmit)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.verifyCurrentUserAttributeSubmit(t,n).then((function(t){f.debug(t),e.changeState("signedIn",e.props.authData),e.setState({verifyAttr:null})})).catch((function(t){return e.error(t)}))},t.prototype.verifyView=function(){var e=this.props.authData;if(!e)return f.debug("no user for verify"),null;var t=e.unverified;if(!t)return f.debug("no unverified on user"),null;var n=t.email,o=t.phone_number,r=this.props.theme||p.default;return s.createElement("div",null,n?s.createElement(h.RadioRow,{placeholder:u.I18n.get("Email"),theme:r,key:"email",name:"contact",value:"email",onChange:this.handleInputChange}):null,o?s.createElement(h.RadioRow,{placeholder:u.I18n.get("Phone Number"),theme:r,key:"phone_number",name:"contact",value:"phone_number",onChange:this.handleInputChange}):null)},t.prototype.submitView=function(){var e=this.props.theme||p.default;return s.createElement("div",null,s.createElement(h.Input,{placeholder:u.I18n.get("Code"),theme:e,key:"code",name:"code",autoComplete:"off",onChange:this.handleInputChange}))},t.prototype.showComponent=function(e){var n=this,o=this.props,r=o.authData,i=o.hide;return i&&i.includes(t)?null:s.createElement(h.FormSection,{theme:e,"data-test":d.auth.verifyContact.section},s.createElement(h.SectionHeader,{theme:e,"data-test":d.auth.verifyContact.headerSection},u.I18n.get("Account recovery requires verified contact information")),s.createElement(h.SectionBody,{theme:e,"data-test":d.auth.verifyContact.bodySection},this.state.verifyAttr?this.submitView():this.verifyView()),s.createElement(h.SectionFooter,{theme:e},s.createElement(h.SectionFooterPrimaryContent,{theme:e},this.state.verifyAttr?s.createElement(h.Button,{theme:e,onClick:this.submit,"data-test":d.auth.verifyContact.submitButton},u.I18n.get("Submit")):s.createElement(h.Button,{theme:e,onClick:this.verify,"data-test":d.auth.verifyContact.verifyButton},u.I18n.get("Verify"))),s.createElement(h.SectionFooterSecondaryContent,{theme:e},s.createElement(h.Link,{theme:e,onClick:function(){return n.changeState("signedIn",r)},"data-test":d.auth.verifyContact.skipLink},u.I18n.get("Skip")))))},t}(l.AuthPiece);t.VerifyContact=m,t.default=m},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(0)),u=n(1),c=n(3),l=n(6),p=n(16),h=n(4),d=new u.ConsoleLogger("TOTPSetup"),f=function(e){function t(t){var n=e.call(this,t)||this;return n._validAuthStates=["TOTPSetup"],n.onTOTPEvent=n.onTOTPEvent.bind(n),n.checkContact=n.checkContact.bind(n),n}return r(t,e),t.prototype.checkContact=function(e){var t=this;if(!c.Auth||"function"!=typeof c.Auth.verifiedContact)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");c.Auth.verifiedContact(e).then((function(n){if(u.isEmpty(n.verified)){var o=Object.assign(e,n);t.changeState("verifyContact",o)}else t.changeState("signedIn",e)}))},t.prototype.onTOTPEvent=function(e,t,n){d.debug("on totp event",e,t),"Setup TOTP"===e&&"SUCCESS"===t&&this.checkContact(n)},t.prototype.showComponent=function(e){var n=this.props.hide;return n&&n.includes(t)?null:s.createElement(p.TOTPSetupComp,i({},this.props,{onTOTPEvent:this.onTOTPEvent,"data-test":h.auth.TOTPSetup.component}))},t}(l.AuthPiece);t.TOTPSetup=f,t.default=f},function(e,t){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},function(e,t){e.exports={L:1,M:0,Q:3,H:2}},function(e,t,n){var o=n(39);function r(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var o=0;o<e.length-n;o++)this.num[o]=e[o+n]}r.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=o.gexp(o.glog(this.get(n))+o.glog(e.get(i)));return new r(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=o.glog(this.get(0))-o.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=o.gexp(o.glog(e.get(i))+t);return new r(n,0).mod(e)}},e.exports=r},function(e,t){for(var n={glog:function(e){if(e<1)throw new Error("glog("+e+")");return n.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return n.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;o<8;o++)n.EXP_TABLE[o]=1<<o;for(o=8;o<256;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(o=0;o<255;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);t.MapEntries=[["User does not exist",/user.*not.*exist/i],["User already exists",/user.*already.*exist/i],["Incorrect username or password",/incorrect.*username.*password/i],["Invalid password format",/validation.*password/i],["Invalid phone number format",/invalid.*phone/i,"Invalid phone number format. Please use a phone number format of +12345678900"]],t.AmplifyMessageMap=function(e){var n=t.MapEntries.filter((function(t){return t[1].test(e)}));if(0===n.length)return e;var r=n[0],i=r.length>2?r[2]:r[0];return o.I18n.get(r[0],i)}},function(e,t){e.exports=i},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(17),l=a(n(8)),p=n(10),h=n(43),d=n(44),f=new u.ConsoleLogger("Storage.S3Image"),m=function(e){function t(t){var n=e.call(this,t)||this;n._isMounted=!1,n.handleOnLoad=n.handleOnLoad.bind(n),n.handleOnError=n.handleOnError.bind(n),n.handlePick=n.handlePick.bind(n),n.handleClick=n.handleClick.bind(n);var o=n.props.src||p.transparent1X1;return n.state={src:o},n}return r(t,e),t.prototype.getImageSource=function(e,t,n,o){var r=this;if(!c.Storage||"function"!=typeof c.Storage.get)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");c.Storage.get(e,{level:t||"public",track:n,identityId:o}).then((function(e){r._isMounted&&r.setState({src:e})})).catch((function(e){return f.debug(e)}))},t.prototype.load=function(){var e=this.props,t=e.imgKey,n=e.path,o=e.body,r=e.contentType,i=e.level,a=e.track,s=e.identityId;if(t||n){var u=this,l=t||n;if(f.debug("loading "+l+"..."),o){var p=r||"binary/octet-stream";if(!c.Storage||"function"!=typeof c.Storage.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");c.Storage.put(l,o,{contentType:p,level:i||"public",track:a}).then((function(e){f.debug(e),u.getImageSource(l,i,a,s)})).catch((function(e){return f.debug(e)}))}else u.getImageSource(l,i,a,s)}else f.debug("empty imgKey and path")},t.prototype.handleOnLoad=function(e){var t=this.props.onLoad;t&&t(this.state.src)},t.prototype.handleOnError=function(e){var t=this.props.onError;t&&t(this.state.src)},t.prototype.handlePick=function(e){var t=this,n=this.props,o=n.imgKey,r=n.level,i=n.fileToKey,a=n.track,s=n.identityId,u=n.path,l=void 0===u?"":u,p=n.onUploadSuccess,h=e.file,m=e.type,g=o||l+d.calcKey(e,i);if(!c.Storage||"function"!=typeof c.Storage.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");c.Storage.put(g,h,{level:r||"public",contentType:m,track:a}).then((function(e){f.debug("handle pick data",e),t.getImageSource(g,r,a,s),p&&p()})).catch((function(e){return f.debug("handle pick error",e)}))},t.prototype.handleClick=function(e){var t=this.props.onClick;t&&t(e)},t.prototype.componentDidMount=function(){this._isMounted=!0,this.load()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.componentDidUpdate=function(e){(e.path!==this.props.path||e.imgKey!==this.props.imgKey||e.body!==this.props.body||e.level!==this.props.level)&&this.load()},t.prototype.imageEl=function(e,t){if(!e)return null;var n=this.props,o=n.className,r=n.selected;return s.createElement("div",{style:{position:"relative"},onClick:this.handleClick},s.createElement("img",{className:o,style:t.photoImg,src:e,onLoad:this.handleOnLoad,onError:this.handleOnError}),s.createElement("div",{style:r?t.overlaySelected:t.overlay}))},t.prototype.render=function(){var e=this.props,t=e.hidden,n=e.style,o=e.picker,r=e.translate,i=e.imgKey,a=this.state.src;if(r&&(a="string"==typeof r?r:r({type:"image",key:i,content:a})),!a&&!o)return null;var u=this.props.theme||l.default,c=t?l.default.hidden:Object.assign({},u.photo,n);return s.createElement("div",{style:c},c?this.imageEl(a,u):null,o?s.createElement("div",null,s.createElement(h.PhotoPicker,{key:"picker",onPick:this.handlePick,theme:u})):null)},t}(s.Component);t.S3Image=m,t.default=m},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(12),l=a(n(5)),p=n(2),h={maxWidth:"100%"},d=(new u.ConsoleLogger("PhotoPicker"),function(e){function t(t){var n=e.call(this,t)||this;return n.handlePick=n.handlePick.bind(n),n.state={previewSrc:t.previewSrc},n}return r(t,e),t.prototype.handlePick=function(e){var t=this,n=e.file,o=(e.name,e.size,e.type,this.props),r=o.preview,i=o.onPick,a=o.onLoad;if(i&&i(e),r){var s=new FileReader;s.onload=function(e){var n=e.target.result;t.setState({previewSrc:n}),a&&a(n)},s.readAsDataURL(n)}},t.prototype.render=function(){var e=this.props.preview,t=this.state.previewSrc,n=this.props.headerText||"Photos",o=this.props.headerHint||"Add your photos by clicking below",r=this.props.title||"Select a Photo",i=this.props.theme||l.default,a=Object.assign({},h,i.pickerPreview),d=!(e&&"hidden"!==e);return s.createElement(p.FormSection,{theme:i},s.createElement(p.SectionHeader,{theme:i,hint:o},u.I18n.get(n)),s.createElement(p.SectionBody,{theme:i},t?d?"The image has been selected":s.createElement("img",{src:t,style:a}):s.createElement(p.PhotoPlaceholder,{theme:i})),s.createElement(c.Picker,{title:r,accept:"image/*",theme:i,onPick:this.handlePick}))},t}(s.Component));t.PhotoPicker=d,t.default=d},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcKey=function(e,t){var n=e.name,r=e.size,i=e.type,a=encodeURI(n);if(t){var s=o(t);(a="string"===s?t:"function"===s?t({name:n,size:r,type:i}):encodeURI(JSON.stringify(t)))||(a="empty_key")}return a.replace(/\s/g,"_")}},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=n(17),l=a(n(8)),p=n(46),h=n(44),d=new u.ConsoleLogger("Storage.S3Text"),f=function(e){function t(t){var n=e.call(this,t)||this;n._isMounted=!1,n.handleOnLoad=n.handleOnLoad.bind(n),n.handleOnError=n.handleOnError.bind(n),n.handlePick=n.handlePick.bind(n),n.handleClick=n.handleClick.bind(n);var o=t.text,r=t.textKey;return n.state={text:o||"",textKey:r||""},n}return r(t,e),t.prototype.getText=function(e,t,n,o){var r=this;if(!c.Storage||"function"!=typeof c.Storage.get)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");c.Storage.get(e,{download:!0,level:t||"public",track:n,identityId:o}).then((function(e){d.debug(e);var t=e.Body.toString("utf8");r._isMounted&&r.setState({text:t}),r.handleOnLoad(t)})).catch((function(e){d.debug(e),r.handleOnError(e)}))},t.prototype.load=function(){var e=this.props,t=e.path,n=e.textKey,o=e.body,r=e.contentType,i=e.level,a=e.track,s=e.identityId;if(n||t){var u=this,l=n||t;if(d.debug("loading "+l+"..."),o){var p=r||"text/*";if(!c.Storage||"function"!=typeof c.Storage.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");c.Storage.put(l,o,{contentType:p,level:i||"public",track:a}).then((function(e){d.debug(e),u.getText(l,i,a,s)})).catch((function(e){return d.debug(e)}))}else u.getText(l,i,a,s)}else d.debug("empty textKey and path")},t.prototype.handleOnLoad=function(e){var t=this.props.onLoad;t&&t(e)},t.prototype.handleOnError=function(e){var t=this.props.onError;t&&t(e)},t.prototype.handlePick=function(e){var t=this,n=this.props.path||"",o=this.props,r=o.textKey,i=o.level,a=o.fileToKey,s=o.track,u=o.identityId,l=e.file,p=(e.name,e.size,e.type),f=r||n+h.calcKey(e,a);if(!c.Storage||"function"!=typeof c.Storage.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");c.Storage.put(f,l,{level:i||"public",contentType:p,track:s}).then((function(e){d.debug("handle pick data",e),t.getText(f,i,s,u)})).catch((function(e){return d.debug("handle pick error",e)}))},t.prototype.handleClick=function(e){var t=this.props.onClick;t&&t(e)},t.prototype.componentDidMount=function(){this._isMounted=!0,this.load()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.componentDidUpdate=function(e){(e.path!==this.props.path||e.textKey!==this.props.textKey||e.body!==this.props.body)&&this.load()},t.prototype.textEl=function(e,t){if(!e)return null;var n=this.props.selected;return s.createElement("div",{style:{position:"relative"},onClick:this.handleClick},s.createElement("pre",{style:t.pre},e),s.createElement("div",{style:n?t.overlaySelected:t.overlay}))},t.prototype.render=function(){var e=this.props,t=e.hidden,n=e.style,o=e.picker,r=e.translate,i=e.textKey,a=this.state.text;if(r&&(a="string"==typeof r?r:r({type:"text",key:i,content:a})),!a&&!o)return null;var u=this.props.theme||l.default,c=t?l.default.hidden:Object.assign({},u.text,n);return s.createElement("div",{style:c},c?this.textEl(a,u):null,o?s.createElement("div",null,s.createElement(p.TextPicker,{key:"picker",onPick:this.handlePick,theme:u})):null)},t}(s.Component);t.S3Text=f,t.default=f},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(0)),u=n(1),c=a(n(8)),l=n(12),p={},h={maxWidth:"100%"},d=(new u.ConsoleLogger("TextPicker"),function(e){function t(t){var n=e.call(this,t)||this;return n.handlePick=n.handlePick.bind(n),n.state={previewText:t.previewText},n}return r(t,e),t.prototype.handlePick=function(e){var t=this,n=e.file,o=(e.name,e.size,e.type,this.props),r=o.preview,i=o.onPick,a=o.onLoad;if(i&&i(e),r){var s=new FileReader;s.onload=function(e){var n=e.target.result;t.setState({previewText:n}),a&&a(n)},s.readAsText(n)}},t.prototype.render=function(){var e=this.props.preview,t=this.state.previewText,n=this.props.title||"Pick a File",o=this.props.theme||c.default,r=Object.assign({},p,o.picker),i=Object.assign({},h,o.pickerPreview,o.halfHeight,e&&"hidden"!==e?{}:c.default.hidden);return s.createElement("div",{style:r},t?s.createElement("div",{style:i},s.createElement("pre",{style:o.pre},t)):null,s.createElement(l.Picker,{title:n,accept:"text/*",theme:o,onPick:this.handlePick}))},t}(s.Component));t.TextPicker=d,t.default=d},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(49);o(n(10)),o(n(50)),o(n(61)),o(n(64)),o(n(66)),o(n(68)),o(n(72)),o(n(76));var a=n(8);t.AmplifyTheme=a.Bootstrap;var s=n(40);t.AmplifyMessageMapEntries=s.MapEntries;var u=n(10);t.transparent1X1=u.transparent1X1,t.white1X1=u.white1X1,r.I18n.putVocabularies(i.dict)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dict={de:{"Sign In":"Anmelden","Sign Up":"Registrieren","Sign Out":"Abmelden","Sign in to your account":"Melden Sie sich mit Ihrem Account an",Username:"Benutzername",Password:"Passwort","Enter your username":"Geben Sie Ihren Benutzernamen ein","Enter your password":"Geben Sie Ihr Passwort ein","No account? ":"Kein Account? ","Forgot your password? ":"Passwort vergessen? ","Reset password":"Passwort zurücksetzen","User does not exist":"Dieser Benutzer existiert nicht","User already exists":"Dieser Benutzer existiert bereits","Incorrect username or password":"Falscher Benutzername oder falsches Passwort","Invalid password format":"Ungültiges Passwort-Format","Create account":"Hier registrieren","Forgot Password":"Passwort vergessen","Change Password":"Passwort ändern","New Password":"Neues Passwort",Email:"Email","Phone Number":"Telefonnummer","Confirm a Code":"Code bestätigen","Confirm Sign In":"Anmeldung bestätigen","Confirm Sign Up":"Registrierung bestätigen","Back to Sign In":"Zurück zur Anmeldung","Send Code":"Code senden",Confirm:"Bestätigen","Resend Code":"Code erneut senden",Submit:"Abschicken",Skip:"Überspringen",Verify:"Verifizieren","Verify Contact":"Kontakt verifizieren",Code:"Code","Confirmation Code":"Bestätigungs-Code","Lost your code? ":"Code verloren? ","Account recovery requires verified contact information":"Zurücksetzen des Account benötigt einen verifizierten Account","Invalid phone number format":"Ungültiges Telefonummern-Format.\n Benutze eine Nummer im Format: +12345678900","Create Account":"Account erstellen","Have an account? ":"Schon registriert? ","Sign in":"Anmelden","Create a new account":"Erstelle einen neuen Account","Reset your password":"Zurücksetzen des Passworts","An account with the given email already exists.":"Ein Account mit dieser Email existiert bereits.","Username cannot be empty":"Benutzername darf nicht leer sein","Password attempts exceeded":"Die maximale Anzahl der fehlerhaften Anmeldeversuche wurde erreicht"},fr:{Hello:"Bonjour","Loading...":"Chargement...","Sign In":"Se connecter","Sign In with Amazon":"Se connecter avec Amazon","Sign In with Facebook":"Se connecter avec Facebook","Sign In with Google":"Se connecter avec Google","Sign in with AWS":"Se connecter avec AWS","Sign Up":"S'inscrire","Sign Out":"Déconnexion","Forgot Password":"Mot de passe oublié",Username:"Nom d'utilisateur",Password:"Mot de passe","Change Password":"Modifier le mot de passe",Change:"Modifier","New Password":"Nouveau mot de passe",Email:"Email","Phone Number":"Numéro de téléphone","Confirm a Code":"Confirmer un code","Confirm Sign In":"Confirmer la connexion","Confirm Sign Up":"Confirmer l'inscription","Back to Sign In":"Retour à la connexion",Send:"Envoyer","Send Code":"M'envoyer un code",Confirm:"Confirmer",SMS:"SMS","Confirm SMS Code":"Confirmer le code SMS","Confirm TOTP Code":"Confirmer le code TOTP","Resend a Code":"Renvoyer un code",Submit:"Soumettre",Skip:"Passer",Verify:"Vérifier","Verify Contact":"Vérifier le contact",Code:"Code","Confirmation Code":"Code de confirmation","Account recovery requires verified contact information":"La récupération du compte nécessite des informations de contact vérifiées","User does not exist":"L'utilisateur n'existe pas","User already exists":"L'utilisateur existe déjà","Incorrect username or password":"Identifiant ou mot de passe incorrect","Invalid password format":"Format de mot de passe invalide","Invalid phone number format":"Format de numéro de téléphone invalide. Veuillez utiliser un format +12345678900","Username/client id combination not found.":"L'utilisateur n'existe pas","Network error":"Erreur réseau","Sign in to your account":"Connexion à votre compte","Forgot your password? ":"Mot de passe oublié ? ","Reset password":"Réinitialisez votre mot de passe","No account? ":"Pas de compte ? ","Create account":"Créer un compte","Create Account":"Créer un compte","Have an account? ":"Déjà un compte ? ","Sign in":"Se connecter","Create a new account":"Créer un nouveau compte","Reset your password":"Réinitialisez votre mot de passe","Enter your username":"Saisissez votre nom d'utilisateur","Enter your password":"Saisissez votre mot de passe","Enter your phone number":"Saisissez votre numéro de téléphone","Enter your email":"Saisissez votre adresse email","Enter your code":"Saisissez cotre code de confirmation","Lost your code? ":"Vous avez perdu votre code ? ","Resend Code":"Renvoyer le code",or:"ou","An account with the given email already exists.":"Un utilisateur avec cette adresse email existe déjà.","Username cannot be empty":"Le nom d'utilisateur doit être renseigné"},es:{"Sign In":"Registrarse","Sign Up":"Regístrate","Sign Out":"Desconectar","Forgot Password":"Se te olvidó tu contraseña",Username:"Nombre de usuario",Password:"Contraseña","Change Password":"Cambia la contraseña","New Password":"Nueva contraseña",Email:"Email","Phone Number":"Número de teléfono","Confirm a Code":"Confirmar un código","Confirm Sign In":"Confirmar inicio de sesión","Confirm Sign Up":"Confirmar Registrarse","Back to Sign In":"Volver a Iniciar sesión","Send Code":"Enviar código",Confirm:"Confirmar","Resend a Code":"Reenviar un código",Submit:"Enviar",Skip:"Omitir",Verify:"Verificar","Verify Contact":"Verificar contacto",Code:"Código","Account recovery requires verified contact information":"La recuperación de la cuenta requiere información de contacto verificada","User does not exist":"el usuario no existe","User already exists":"El usuario ya existe","Incorrect username or password":"Nombre de usuario o contraseña incorrecta","Invalid password format":"Formato de contraseña inválido","Invalid phone number format":"Formato de número de teléfono inválido.\nUtilice el formato de número de teléfono +12345678900"},it:{"Account recovery requires verified contact information":"Ripristino del conto richiede un account verificati","An account with the given email already exists.":"Un account con questa email esiste già.","Back to Sign In":"Torna alla Accesso","Change Password":"Cambia la password",Code:"Codice",Confirm:"Conferma","Confirm Sign In":"Conferma di applicazione","Confirm Sign Up":"Registrazione Conferma","Confirm a Code":"Codice Conferma","Confirmation Code":"Codice di verifica","Create Account":"Crea account","Create a new account":"Creare un nuovo account","Create account":"Registrati",Email:"E-mail","Enter your password":"Inserire la password","Enter your username":"Inserisci il tuo nome utente","Forgot your password?":"Password dimenticata?","Forgot Password":"Password dimenticata","Have an account? ":"Già registrato?","Incorrect username or password":"Nome utente o password errati","Invalid password format":"Formato della password non valido","Invalid phone number format":"Utilizzo non valido Telefonummern formattare un numero nel formato :. 12.345.678,9 mille","Lost your code?":"Perso codice?","New Password":"Nuova password","No account? ":"Nessun account?",Password:"Password","Password attempts exceeded":"Il numero massimo di tentativi di accesso falliti è stato raggiunto","Phone Number":"Numero di telefono","Resend Code":"Codice Rispedisci","Reset password":"Ripristina password","Reset your password":"Resetta password","Send Code":"Invia codice","Sign In":"Accesso","Sign Out":"Esci","Sign Up":"Iscriviti","Sign in":"Accesso","Sign in to your account":"Accedi con il tuo account a",Skip:"Salta",Submit:"Sottoscrivi","User already exists":"Questo utente esiste già","User does not exist":"Questo utente non esiste",Username:"Nome utente","Username cannot be empty":"Nome utente non può essere vuoto",Verify:"Verifica","Verify Contact":"Contatto verifica"},zh:{"Sign In":"登录","Sign Up":"注册","Sign Out":"退出","Forgot Password":"忘记密码",Username:"用户名",Password:"密码","Change Password":"改变密码","New Password":"新密码",Email:"邮箱","Phone Number":"电话","Confirm a Code":"确认码","Confirm Sign In":"确认登录","Confirm Sign Up":"确认注册","Back to Sign In":"回到登录","Send Code":"发送确认码",Confirm:"确认","Resend a Code":"重发确认码",Submit:"提交",Skip:"跳过",Verify:"验证","Verify Contact":"验证联系方式",Code:"确认码","Account recovery requires verified contact information":"账户恢复需要验证过的联系方式","User does not exist":"用户不存在","User already exists":"用户已经存在","Incorrect username or password":"用户名或密码错误","Invalid password format":"密码格式错误","Invalid phone number format":"电话格式错误,请使用格式 +12345678900"},ja:{"Sign In":"サインイン ","Sign Up":"登録 ","Sign Out":"サインアウト ","Sign in to your account":"アカウントにサインイン ",Username:"ユーザー名 ",Password:"パスワード ","Enter your username":"ユーザー名を入力 ","Enter your password":"パスワードを入力 ","No account? ":"アカウントが無いとき ","Forgot your password? ":"パスワードを忘れましたか? ","Reset password":"パスワードをリセット ","User does not exist":"ユーザーが存在しません ","User already exists":"既にユーザーが存在しています ","Incorrect username or password":"ユーザー名かパスワードが異なります ","Invalid password format":"パスワードの形式が無効です ","Create account":"アカウントを作る ","Forgot Password":"パスワードを忘れた ","Change Password":"パスワードを変える ","New Password":"新しいパスワード",Email:"メールアドレス","Phone Number":"電話番号","Confirm a Code":"コードを確認","Confirm Sign In":"サインインする","Confirm Sign Up":"登録する","Back to Sign In":"サインインに戻る","Send Code":"コードを送信",Confirm:"確定","Resend Code":"コードを再送信",Submit:"送信",Skip:"スキップ",Verify:"確認","Verify Contact":"連絡先を確認",Code:"コード","Confirmation Code":"確認コード","Lost your code? ":"コードを失くしましたか?","Account recovery requires verified contact information":"アカウントの復旧には確認済みの連絡先が必要です","Invalid phone number format":"不正な電話番号の形式です。\n+12345678900 の形式で入力してください","Create Account":"アカウントを作る","Have an account? ":"アカウントを持っていますか?","Sign in":"サインイン","Create a new account":"新しいアカウントを作る","Reset your password":"パスワードをリセットする","An account with the given email already exists.":"入力されたメールアドレスのアカウントが既に存在します","Username cannot be empty":"ユーザー名は入力必須です","Password attempts exceeded":"サインインの試行回数が上限に達しました","Sign In with Google":"Googleでサインイン","Sign In with Facebook":"Facebookでサインイン"}}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var c=u(n(0)),l=n(18),p=n(18);t.Authenticator=p.Authenticator;var h=n(6);t.AuthPiece=h.AuthPiece;var d=n(28);t.SignIn=d.SignIn;var f=n(30);t.ConfirmSignIn=f.ConfirmSignIn;var m=n(22);t.SignOut=m.SignOut;var g=n(31);t.RequireNewPassword=g.RequireNewPassword;var y=n(14);t.SignUp=y.SignUp;var v=n(33);t.ConfirmSignUp=v.ConfirmSignUp;var b=n(34);t.VerifyContact=b.VerifyContact;var S=n(15);t.ForgotPassword=S.ForgotPassword;var C=n(19);t.Greetings=C.Greetings;var w=n(29);t.FederatedSignIn=w.FederatedSignIn,t.FederatedButtons=w.FederatedButtons;var _=n(35);t.TOTPSetup=_.TOTPSetup;var E=n(32);t.Loading=E.Loading,s(n(13)),s(n(11)),t.withAuthenticator=function(e,t,n,r,s,u){return void 0===t&&(t=!1),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===s&&(s=null),void 0===u&&(u={}),function(p){function h(e){var i=p.call(this,e)||this;return i.handleAuthStateChange=i.handleAuthStateChange.bind(i),i.state={authState:e.authState||null,authData:e.authData||null},i.authConfig={},"object"===o(t)&&null!==t?i.authConfig=Object.assign(i.authConfig,t):i.authConfig={includeGreetings:t,authenticatorComponents:n,federated:r,theme:s,signUpConfig:u},i}return i(h,p),h.prototype.handleAuthStateChange=function(e,t){this.setState({authState:e,authData:t})},h.prototype.render=function(){var t=this.state,n=t.authState,o=t.authData;return"signedIn"===n?c.createElement(c.Fragment,null,this.authConfig.includeGreetings?c.createElement(l.Authenticator,a({},this.props,{theme:this.authConfig.theme,federated:this.authConfig.federated||this.props.federated,hideDefault:this.authConfig.authenticatorComponents&&this.authConfig.authenticatorComponents.length>0,signUpConfig:this.authConfig.signUpConfig,usernameAttributes:this.authConfig.usernameAttributes,onStateChange:this.handleAuthStateChange,children:this.authConfig.authenticatorComponents||[]})):null,c.createElement(e,a({},this.props,{authState:n,authData:o,onStateChange:this.handleAuthStateChange}))):c.createElement(l.Authenticator,a({},this.props,{theme:this.authConfig.theme,federated:this.authConfig.federated||this.props.federated,hideDefault:this.authConfig.authenticatorComponents&&this.authConfig.authenticatorComponents.length>0,signUpConfig:this.authConfig.signUpConfig,usernameAttributes:this.authConfig.usernameAttributes,onStateChange:this.handleAuthStateChange,children:this.authConfig.authenticatorComponents||[]}))},h}(c.Component)};var A=function(e){function t(t){var n=e.call(this,t)||this;return n.state={auth:"init"},n.handleAuthState=n.handleAuthState.bind(n),n.renderChildren=n.renderChildren.bind(n),n}return i(t,e),t.prototype.handleAuthState=function(e,t){this.setState({auth:e,authData:t})},t.prototype.renderChildren=function(){return this.props.children(this.state.auth)},t.prototype.render=function(){return c.createElement("div",null,c.createElement(l.Authenticator,a({},this.props,{onStateChange:this.handleAuthState})),this.renderChildren())},t}(c.Component);t.AuthenticatorWrapper=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signUpWithUsernameFields=[{label:"Username",key:"username",required:!0,placeholder:"Username",displayOrder:1},{label:"Password",key:"password",required:!0,placeholder:"Password",type:"password",displayOrder:2},{label:"Email",key:"email",required:!0,placeholder:"Email",type:"email",displayOrder:3},{label:"Phone Number",key:"phone_number",placeholder:"Phone Number",required:!0,displayOrder:4}],t.signUpWithEmailFields=[{label:"Email",key:"email",required:!0,placeholder:"Email",type:"email",displayOrder:1},{label:"Password",key:"password",required:!0,placeholder:"Password",type:"password",displayOrder:2},{label:"Phone Number",key:"phone_number",placeholder:"Phone Number",required:!0,displayOrder:3}],t.signUpWithPhoneNumberFields=[{label:"Phone Number",key:"phone_number",placeholder:"Phone Number",required:!0,displayOrder:1},{label:"Password",key:"password",required:!0,placeholder:"Password",type:"password",displayOrder:2},{label:"Email",key:"email",required:!0,placeholder:"Email",type:"email",displayOrder:3}]},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h=n(0),d=n(53),f=n(56),m=n(37);function g(e){for(var t="",n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o<2048?(t+=String.fromCharCode(192|o>>6),t+=String.fromCharCode(128|63&o)):o<55296||o>=57344?(t+=String.fromCharCode(224|o>>12),t+=String.fromCharCode(128|o>>6&63),t+=String.fromCharCode(128|63&o)):(n++,o=65536+((1023&o)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|o>>18),t+=String.fromCharCode(128|o>>12&63),t+=String.fromCharCode(128|o>>6&63),t+=String.fromCharCode(128|63&o))}return t}var y={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000"},v={value:d.string.isRequired,size:d.number,level:d.oneOf(["L","M","Q","H"]),bgColor:d.string,fgColor:d.string},b=function(e){function t(){var e,n,o;a(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return c(o,(n=o=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),Object.defineProperty(p(o),"_canvas",{configurable:!0,enumerable:!0,writable:!0,value:void 0}),n))}return l(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e){var n=this;return Object.keys(t.propTypes).some((function(t){return n.props[t]!==e[t]}))}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,o=e.level,r=e.bgColor,i=e.fgColor,a=new f(-1,m[o]);if(a.addData(g(t)),a.make(),null!=this._canvas){var s=this._canvas,u=s.getContext("2d");if(!u)return;var c=a.modules;if(null===c)return;var l=n/c.length,p=n/c.length,h=(window.devicePixelRatio||1)/function(e){return e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1}(u);s.height=s.width=n*h,u.scale(h,h),c.forEach((function(e,t){e.forEach((function(e,n){u&&(u.fillStyle=e?i:r);var o=Math.ceil((n+1)*l)-Math.floor(n*l),a=Math.ceil((t+1)*p)-Math.floor(t*p);u&&u.fillRect(Math.round(n*l),Math.round(t*p),o,a)}))}))}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),o=(t.level,t.bgColor,t.fgColor,t.style),a=i(t,["value","size","level","bgColor","fgColor","style"]),s=r({height:n,width:n},o);return h.createElement("canvas",r({style:s,height:n,width:n,ref:function(t){return e._canvas=t}},a))}}]),t}(h.Component);Object.defineProperty(b,"defaultProps",{configurable:!0,enumerable:!0,writable:!0,value:y}),Object.defineProperty(b,"propTypes",{configurable:!0,enumerable:!0,writable:!0,value:v});var S=function(e){function t(){return a(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(b.propTypes).some((function(n){return t.props[n]!==e[n]}))}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,o=e.level,a=e.bgColor,s=e.fgColor,u=i(e,["value","size","level","bgColor","fgColor"]),c=new f(-1,m[o]);c.addData(g(t)),c.make();var l=c.modules;if(null!==l){var p=[];return l.forEach((function(e,t){var n=null;e.forEach((function(o,r){if(!o&&null!==n)return p.push("M".concat(n," ").concat(t,"h").concat(r-n,"v1H").concat(n,"z")),void(n=null);if(r!==e.length-1)o&&null===n&&(n=r);else{if(!o)return;null===n?p.push("M".concat(r,",").concat(t," h1v1H").concat(r,"z")):p.push("M".concat(n,",").concat(t," h").concat(r+1-n,"v1H").concat(n,"z"))}}))})),h.createElement("svg",r({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(l.length," ").concat(l.length)},u),h.createElement("path",{fill:a,d:"M0,0 h".concat(l.length,"v").concat(l.length,"H0z")}),h.createElement("path",{fill:s,d:p.join("")}))}}}]),t}(h.Component);Object.defineProperty(S,"defaultProps",{configurable:!0,enumerable:!0,writable:!0,value:y}),Object.defineProperty(S,"propTypes",{configurable:!0,enumerable:!0,writable:!0,value:v});var C=function(e){var t=e.renderAs,n=i(e,["renderAs"]),o="svg"===t?S:b;return h.createElement(o,n)};C.defaultProps=r({renderAs:"canvas"},y),e.exports=C},function(e,t,n){e.exports=n(54)()},function(e,t,n){"use strict";var o=n(55);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var o=n(57),r=n(58),i=n(59),a=n(60),s=n(38);function u(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=u.prototype;c.addData=function(e){var t=new o(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=r.getRSBlocks(e,this.errorCorrectLevel),n=new i,o=0,s=0;s<t.length;s++)o+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var u=this.dataList[s];n.put(u.mode,4),n.put(u.getLength(),a.getLengthInBits(u.mode,e)),u.write(n)}if(n.getLengthInBits()<=8*o)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[n][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=u.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var o=-1;o<=7;o++)t+o<=-1||this.moduleCount<=t+o||(this.modules[e+n][t+o]=0<=n&&n<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=o&&o<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var o=a.getLostPoint(this);(0==n||e>o)&&(e=o,t=n)}return t},c.createMovieClip=function(e,t,n){var o=e.createEmptyMovieClip(t,n);this.make();for(var r=0;r<this.modules.length;r++)for(var i=1*r,a=0;a<this.modules[r].length;a++){var s=1*a;this.modules[r][a]&&(o.beginFill(0,100),o.moveTo(s,i),o.lineTo(s+1,i),o.lineTo(s+1,i+1),o.lineTo(s,i+1),o.endFill())}return o},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var o=e[t],r=e[n];if(null==this.modules[o][r])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[o+i][r+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},c.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var o=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=o}for(n=0;n<18;n++){o=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=o}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,o=a.getBCHTypeInfo(n),r=0;r<15;r++){var i=!e&&1==(o>>r&1);r<6?this.modules[r][8]=i:r<8?this.modules[r+1][8]=i:this.modules[this.moduleCount-15+r][8]=i}for(r=0;r<15;r++){i=!e&&1==(o>>r&1);r<8?this.modules[8][this.moduleCount-r-1]=i:r<9?this.modules[8][15-r-1+1]=i:this.modules[8][15-r-1]=i}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,o=this.moduleCount-1,r=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[o][s-u]){var c=!1;i<e.length&&(c=1==(e[i]>>>r&1)),a.getMask(t,o,s-u)&&(c=!c),this.modules[o][s-u]=c,-1==--r&&(i++,r=7)}if((o+=n)<0||this.moduleCount<=o){o-=n,n=-n;break}}},u.PAD0=236,u.PAD1=17,u.createData=function(e,t,n){for(var o=r.getRSBlocks(e,t),s=new i,c=0;c<n.length;c++){var l=n[c];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var p=0;for(c=0;c<o.length;c++)p+=o[c].dataCount;if(s.getLengthInBits()>8*p)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*p+")");for(s.getLengthInBits()+4<=8*p&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*p||(s.put(u.PAD0,8),s.getLengthInBits()>=8*p));)s.put(u.PAD1,8);return u.createBytes(s,o)},u.createBytes=function(e,t){for(var n=0,o=0,r=0,i=new Array(t.length),u=new Array(t.length),c=0;c<t.length;c++){var l=t[c].dataCount,p=t[c].totalCount-l;o=Math.max(o,l),r=Math.max(r,p),i[c]=new Array(l);for(var h=0;h<i[c].length;h++)i[c][h]=255&e.buffer[h+n];n+=l;var d=a.getErrorCorrectPolynomial(p),f=new s(i[c],d.getLength()-1).mod(d);u[c]=new Array(d.getLength()-1);for(h=0;h<u[c].length;h++){var m=h+f.getLength()-u[c].length;u[c][h]=m>=0?f.get(m):0}}var g=0;for(h=0;h<t.length;h++)g+=t[h].totalCount;var y=new Array(g),v=0;for(h=0;h<o;h++)for(c=0;c<t.length;c++)h<i[c].length&&(y[v++]=i[c][h]);for(h=0;h<r;h++)for(c=0;c<t.length;c++)h<u[c].length&&(y[v++]=u[c][h]);return y},e.exports=u},function(e,t,n){var o=n(36);function r(e){this.mode=o.MODE_8BIT_BYTE,this.data=e}r.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=r},function(e,t,n){var o=n(37);function r(e,t){this.totalCount=e,this.dataCount=t}r.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r.getRSBlocks=function(e,t){var n=r.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var o=n.length/3,i=new Array,a=0;a<o;a++)for(var s=n[3*a+0],u=n[3*a+1],c=n[3*a+2],l=0;l<s;l++)i.push(new r(u,c));return i},r.getRsBlockTable=function(e,t){switch(t){case o.L:return r.RS_BLOCK_TABLE[4*(e-1)+0];case o.M:return r.RS_BLOCK_TABLE[4*(e-1)+1];case o.Q:return r.RS_BLOCK_TABLE[4*(e-1)+2];case o.H:return r.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=r},function(e,t){function n(){this.buffer=new Array,this.length=0}n.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},function(e,t,n){var o=n(36),r=n(38),i=n(39),a=0,s=1,u=2,c=3,l=4,p=5,h=6,d=7,f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;f.getBCHDigit(t)-f.getBCHDigit(f.G15)>=0;)t^=f.G15<<f.getBCHDigit(t)-f.getBCHDigit(f.G15);return(e<<10|t)^f.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;f.getBCHDigit(t)-f.getBCHDigit(f.G18)>=0;)t^=f.G18<<f.getBCHDigit(t)-f.getBCHDigit(f.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return f.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case u:return n%3==0;case c:return(t+n)%3==0;case l:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case h:return(t*n%2+t*n%3)%2==0;case d:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new r([1],0),n=0;n<e;n++)t=t.multiply(new r([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:case o.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,o=0;o<t;o++)for(var r=0;r<t;r++){for(var i=0,a=e.isDark(o,r),s=-1;s<=1;s++)if(!(o+s<0||t<=o+s))for(var u=-1;u<=1;u++)r+u<0||t<=r+u||0==s&&0==u||a==e.isDark(o+s,r+u)&&i++;i>5&&(n+=3+i-5)}for(o=0;o<t-1;o++)for(r=0;r<t-1;r++){var c=0;e.isDark(o,r)&&c++,e.isDark(o+1,r)&&c++,e.isDark(o,r+1)&&c++,e.isDark(o+1,r+1)&&c++,0!=c&&4!=c||(n+=3)}for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(o,r)&&!e.isDark(o,r+1)&&e.isDark(o,r+2)&&e.isDark(o,r+3)&&e.isDark(o,r+4)&&!e.isDark(o,r+5)&&e.isDark(o,r+6)&&(n+=40);for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(o,r)&&!e.isDark(o+1,r)&&e.isDark(o+2,r)&&e.isDark(o+3,r)&&e.isDark(o+4,r)&&!e.isDark(o+5,r)&&e.isDark(o+6,r)&&(n+=40);var l=0;for(r=0;r<t;r++)for(o=0;o<t;o++)e.isDark(o,r)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}};e.exports=f},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(62)),o(n(63))},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(0)),u=n(41),c=["componentDidMount","componentDidUpdate","compomentWillUnmount","compomentDidCatch","render"];t.trackLifecycle=function(e,t,n){return void 0===n&&(n=c),function(o){function a(e){var r=o.call(this,e)||this;return r.trackerName=t,r.trackEvents=n,r.track("constructor"),r}return r(a,o),a.prototype.track=function(e){if(this.trackEvents.filter((function(t){return t===e})).length>0){if(!u.Analytics||"function"!=typeof u.Analytics.record)throw new Error("No Analytics module found, please ensure @aws-amplify/analytics is imported");u.Analytics.record({name:this.trackerName,attributes:{event:e}})}},a.prototype.componentWillMount=function(){this.track("componentWillMount")},a.prototype.componentDidMount=function(){this.track("componentDidMount")},a.prototype.componentWillUnmount=function(){this.track("componentWillUnmount")},a.prototype.componentDidCatch=function(){this.track("componentDidCatch")},a.prototype.componentWillReceiveProps=function(){this.track("componentWillReceiveProps")},a.prototype.shouldComponentUpdate=function(){return this.track("shouldComponentUpdate"),!0},a.prototype.componentWillUpdate=function(){this.track("componentWillUpdate")},a.prototype.componentDidUpdate=function(){this.track("componentDidUpdate")},a.prototype.setState=function(){this.track("setState")},a.prototype.forceUpdate=function(){this.track("forceUpdate")},a.prototype.render=function(){return this.track("render"),s.createElement(e,i({},this.props))},a}(s.Component)}},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(0)),u=n(41);t.trackUpdate=function(e,t){return function(n){function o(e){var o=n.call(this,e)||this;return o.trackerName=t,o}return r(o,n),o.prototype.componentDidUpdate=function(e,t){var n=Object.assign({},this.props,this.state);if(!u.Analytics||"function"!=typeof u.Analytics.record)throw new Error("No Analytics module found, please ensure @aws-amplify/analytics is imported");u.Analytics.record({name:this.trackerName,attributes:n})},o.prototype.render=function(){return s.createElement(e,i({},this.props))},o}(s.Component)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(65);t.S3Album=o.S3Album;var r=n(42);t.S3Image=r.S3Image;var i=n(45);t.S3Text=i.S3Text},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(17),p=n(12),h=s(n(8)),d=n(42),f=n(45),m=new c.ConsoleLogger("Storage.S3Album"),g=function(e){function t(t){var n=e.call(this,t)||this;return n._isMounted=!1,n.handlePick=n.handlePick.bind(n),n.handleClick=n.handleClick.bind(n),n.list=n.list.bind(n),n.marshal=n.marshal.bind(n),n.state={items:[],ts:(new Date).getTime()},n}return i(t,e),t.prototype.getKey=function(e){var t=this.props.fileToKey,n=e.name,r=e.size,i=e.type,a=encodeURI(n);if(t){var s=o(t);(a="string"===s?t:"function"===s?t({name:n,size:r,type:i}):encodeURI(JSON.stringify(t)))||(m.debug("key is empty"),a="empty_key")}return a.replace(/\s/g,"_")},t.prototype.handlePick=function(e){var t=this,n=this.props,o=n.onPick,r=n.onLoad,i=n.onError,a=n.track,s=n.level;o&&o(e);var u=this.props.path||"",c=e.file,p=(e.name,e.size,e.type),h=u+this.getKey(e);if(!l.Storage||"function"!=typeof l.Storage.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");l.Storage.put(h,c,{level:s||"public",contentType:p,track:a}).then((function(e){m.debug("handle pick data",e);var n=t.state.items;if(0===n.filter((function(e){return e.key===h})).length){var o=n.concat(e);t.marshal(o)}else m.debug("update an item");r&&r(e)})).catch((function(e){m.debug("handle pick error",e),i&&i(e)})),this._isMounted&&this.setState({ts:(new Date).getTime()})},t.prototype.handleClick=function(e){var t=this.props,n=t.onClickItem,o=t.select,r=t.onSelect;(n&&n(e),o)&&(e.selected=!e.selected,this._isMounted&&this.setState({items:this.state.items.slice()}),r&&r(e,this.state.items.filter((function(e){return e.selected}))))},t.prototype.componentDidMount=function(){this._isMounted=!0,this.list()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.componentDidUpdate=function(e,t){this.props.path===e.path&&this.props.ts===e.ts&&this.props.select===e.select||(this.props.select||this.state.items.forEach((function(e){return e.selected=!1})),this.props.onSelect&&this.props.onSelect(null,[]),this.list())},t.prototype.list=function(){var e=this,t=this.props,n=t.path,o=t.level,r=t.track,i=t.identityId;if(m.debug("Album path: "+n),!l.Storage||"function"!=typeof l.Storage.list)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");return l.Storage.list(n,{level:o||"public",track:r,identityId:i}).then((function(t){m.debug("album list",t),e.marshal(t)})).catch((function(e){return m.warn(e),[]}))},t.prototype.contentType=function(e){return c.filenameToContentType(e.key,"image/*")},t.prototype.marshal=function(e){var t=this,n=this.props.contentType||"";e.forEach((function(e){if(!e.contentType){var o="string"==typeof n;e.contentType=o?n:n(e),e.contentType||(e.contentType=t.contentType(e))}}));var o=this.filter(e);o=this.sort(o),this._isMounted&&this.setState({items:o})},t.prototype.filter=function(e){var t=this.props.filter;return t?t(e):e},t.prototype.sort=function(e){var t=this.props.sort,n=o(t);if("function"===n)return t(e);if(["string","undefined"].includes(n)){var r=(t||"lastModified").split(/\s+/),i=r[0],a=r.length>1?r[1]:"";return a="lastModified"===i?"asc"===a?"asc":"desc":"desc"===a?"desc":"asc",c.sortByField(e,i,a),e}return m.warn("invalid sort. done nothing. should be a string or function"),e},t.prototype.render=function(){var e=this,t=this.props,n=t.picker,o=t.translateItem,r=t.level,i=t.identityId,a=this.state,s=a.items,l=a.ts,m=this.props.pickerTitle||"Pick",g=this.props.theme||h.default,y=s.map((function(t){return t.contentType&&c.isTextFile(t.contentType)?u.createElement(f.S3Text,{key:t.key,textKey:t.key,theme:g,style:g.albumText,selected:t.selected,translate:o,level:r,identityId:i,onClick:function(){return e.handleClick(t)}}):u.createElement(d.S3Image,{key:t.key,imgKey:t.key,theme:g,style:g.albumPhoto,selected:t.selected,translate:o,level:r,identityId:i,onClick:function(){return e.handleClick(t)}})}));return u.createElement("div",null,u.createElement("div",{style:g.album},y),n?u.createElement(p.Picker,{key:l,title:m,accept:"image/*, text/*",onPick:this.handlePick,theme:g}):null)},t}(u.Component);t.S3Album=g,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(12);t.Picker=o.Picker;var r=n(43);t.PhotoPicker=r.PhotoPicker;var i=n(46);t.TextPicker=i.TextPicker;var a=n(67);t.SelectMFAType=a.SelectMFAType;var s=n(16);t.TOTPSetupComp=s.TOTPSetupComp},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(0)),c=n(1),l=n(3),p=s(n(5)),h=n(2),d=n(16),f=new c.ConsoleLogger("SelectMFAType"),m=function(e){function t(t){var n=e.call(this,t)||this;return n.verify=n.verify.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.state={TOTPSetup:!1,selectMessage:null},n}return r(t,e),t.prototype.handleInputChange=function(e){this.setState({TOTPSetup:!1,selectMessage:null}),this.inputs={};var t=e.target,n=(t.name,t.value),o=t.type,r=t.checked,i=["radio","checkbox"].includes(o);this.inputs[n]=i?r:n},t.prototype.verify=function(){var e=this;if(f.debug("mfatypes inputs",this.inputs),this.inputs){var t=this.inputs,n=t.TOTP,o=t.SMS,r=t.NOMFA,i=null;n?i="TOTP":o?i="SMS":r&&(i="NOMFA");var a=this.props.authData;if(!l.Auth||"function"!=typeof l.Auth.setPreferredMFA)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");l.Auth.setPreferredMFA(a,i).then((function(t){f.debug("set preferred mfa success",t),e.setState({selectMessage:"Success! Your MFA Type is now: "+i,showToast:!0})})).catch((function(t){var n=t.message;"User has not set up software token mfa"===n||"User has not verified software token mfa"===n?e.setState({TOTPSetup:!0,selectMessage:"You need to setup TOTP",showToast:!0}):(f.debug("set preferred mfa failed",t),e.setState({selectMessage:"Failed! You cannot select MFA Type for now!",showToast:!0}))}))}else f.debug("No mfa type selected")},t.prototype.selectView=function(e){var t=this,n=this.props.MFATypes;if(!n||Object.keys(n).length<2)return f.debug("less than 2 mfa types available"),u.createElement("div",null,u.createElement("a",null,"less than 2 mfa types available"));var o=n.SMS,r=n.TOTP,i=n.Optional;return u.createElement(h.FormSection,{theme:e},this.state.showToast&&this.state.selectMessage&&u.createElement(h.Toast,{theme:e,onClose:function(){return t.setState({showToast:!1})}},c.I18n.get(this.state.selectMessage)),u.createElement(h.SectionHeader,{theme:e},c.I18n.get("Select MFA Type")),u.createElement(h.SectionBody,{theme:e},u.createElement("div",null,o?u.createElement(h.RadioRow,{placeholder:c.I18n.get("SMS"),theme:e,key:"sms",name:"MFAType",value:"SMS",onChange:this.handleInputChange}):null,r?u.createElement(h.RadioRow,{placeholder:c.I18n.get("TOTP"),theme:e,key:"totp",name:"MFAType",value:"TOTP",onChange:this.handleInputChange}):null,i?u.createElement(h.RadioRow,{placeholder:c.I18n.get("No MFA"),theme:e,key:"noMFA",name:"MFAType",value:"NOMFA",onChange:this.handleInputChange}):null)),u.createElement(h.SectionFooter,{theme:e},u.createElement(h.Button,{theme:e,onClick:this.verify},c.I18n.get("Verify"))))},t.prototype.render=function(){var e=this.props.theme||p.default;return u.createElement("div",null,this.selectView(e),this.state.TOTPSetup?u.createElement(d.TOTPSetupComp,i({},this.props)):null)},t}(u.Component);t.SelectMFAType=m,t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(70);t.Connect=o.Connect},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(0)),c=n(71),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state=n.getInitialState(),n.subSubscription=null,n}return r(t,e),t.prototype.getInitialState=function(){var e=this.props.query;return{loading:e&&!!e.query,data:{},errors:[],mutation:function(){return console.warn("Not implemented")}}},t.prototype.getDefaultState=function(){return{loading:!1,data:{},errors:[],mutation:function(){return console.warn("Not implemented")}}},t.prototype._fetchData=function(){return i(this,void 0,void 0,(function(){var e,t,n,o,r,s,u,l,p,h,d,f,m,g,y,v,b,S,C,w,_,E,A,I,O,P=this;return a(this,(function(k){switch(k.label){case 0:if(this._unsubscribe(),this.setState({loading:!0}),e=this.props,t=e.query,o=(n=void 0===t?{}:t).query,r=n.variables,s=void 0===r?{}:r,u=e.mutation,p=(l=void 0===u?{}:u).query,h=l.mutationVariables,void 0===h?{}:h,d=e.subscription,f=e.onSubscriptionMsg,m=void 0===f?function(e){return e}:f,g=this.getDefaultState(),y=g.data,v=g.mutation,b=g.errors,!c.API||"function"!=typeof c.API.graphql||"function"!=typeof c.API.getGraphqlOperationType)throw new Error("No API module found, please ensure @aws-amplify/api is imported");if(S=o&&"query"===c.API.getGraphqlOperationType(o),C=p&&"mutation"===c.API.getGraphqlOperationType(p),w=d&&"subscription"===c.API.getGraphqlOperationType(d.query),S||C||w||console.warn("No query, mutation or subscription was specified"),!S)return[3,4];k.label=1;case 1:return k.trys.push([1,3,,4]),y=null,[4,c.API.graphql({query:o,variables:s})];case 2:return _=k.sent(),y=_.data,[3,4];case 3:return E=k.sent(),y=E.data,b=E.errors,[3,4];case 4:if(C&&(v=function(e){return i(P,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,c.API.graphql({query:p,variables:e})];case 1:return t=n.sent(),this.forceUpdate(),[2,t]}}))}))}),w){A=d.query,I=d.variables;try{O=c.API.graphql({query:A,variables:I}),this.subSubscription=O.subscribe({next:function(e){var t=e.value.data,n=P.state.data,o=m(n,t);P.mounted&&P.setState({data:o})},error:function(e){return console.error(e)}})}catch(e){b=e.errors}}return this.setState({data:y,errors:b,mutation:v,loading:!1}),[2]}}))}))},t.prototype._unsubscribe=function(){this.subSubscription&&this.subSubscription.unsubscribe()},t.prototype.componentDidMount=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){return this._fetchData(),this.mounted=!0,[2]}))}))},t.prototype.componentWillUnmount=function(){this._unsubscribe(),this.mounted=!1},t.prototype.componentDidUpdate=function(e){var t=this.state.loading,n=this.props,o=n.query,r=n.mutation,i=e.query,a=e.mutation,s=o||{},u=s.query,c=s.variables,l=i||{},p=l.query,h=l.variables,d=p!==u||JSON.stringify(h)!==JSON.stringify(c),f=r||{},m=f.query,g=f.variables,y=a||{},v=y.query,b=y.variables,S=v!==m||JSON.stringify(b)!==JSON.stringify(g);t||!d&&!S||this._fetchData()},t.prototype.render=function(){var e=this.state,t=e.data,n=e.loading,o=e.mutation,r=e.errors;return this.props.children({data:t,errors:r,loading:n,mutation:o})||null},t}(u.Component);t.Connect=l,t.default=l},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(73))},function(e,t,n){"use strict";(function(e){var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a},u=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var l,p=c(n(0)),h=n(10),d=n(8),f=n(1),m=n(74),g=n(1),y=n(4),v=(new g.ConsoleLogger("ChatBot"),{itemMe:{padding:10,fontSize:12,color:"gray",marginTop:4,textAlign:"right"},itemBot:{fontSize:12,textAlign:"left"},list:{height:"300px",overflow:"auto"},textInput:Object.assign({},d.Input,{display:"inline-block",width:"calc(100% - 90px - 15px)"}),button:Object.assign({},d.Button,{width:"60px",float:"right"}),mic:Object.assign({},d.Button,{width:"40px",float:"right"})}),b={INITIAL:{MESSAGE:"Type your message or click 🎤",ICON:"🎤"},LISTENING:{MESSAGE:"Listening... click 🔴 again to cancel",ICON:"🔴"},SENDING:{MESSAGE:"Please wait...",ICON:"🔊"},SPEAKING:{MESSAGE:"Speaking...",ICON:"..."}},S=function(t){function o(o){var r=t.call(this,o)||this;if(r.props.voiceEnabled&&(n(75),l=new e.LexAudio.audioControl),!r.props.textEnabled&&r.props.voiceEnabled&&(b.INITIAL.MESSAGE="Click the mic button",v.textInput=Object.assign({},d.Input,{display:"inline-block",width:"calc(100% - 40px - 15px)"})),r.props.textEnabled&&!r.props.voiceEnabled&&(b.INITIAL.MESSAGE="Type a message",v.textInput=Object.assign({},d.Input,{display:"inline-block",width:"calc(100% - 60px - 15px)"})),!r.props.voiceConfig.silenceDetectionConfig)throw new Error("voiceConfig prop is missing silenceDetectionConfig");return r.state={dialog:[{message:r.props.welcomeMessage||"Welcome to Lex",from:"system"}],inputText:"",currentVoiceState:b.INITIAL,inputDisabled:!1,micText:b.INITIAL.ICON,continueConversation:!1,micButtonDisabled:!1},r.micButtonHandler=r.micButtonHandler.bind(r),r.changeInputText=r.changeInputText.bind(r),r.listItems=r.listItems.bind(r),r.submit=r.submit.bind(r),r.listItemsRef=p.createRef(),r.onSilenceHandler=r.onSilenceHandler.bind(r),r.doneSpeakingHandler=r.doneSpeakingHandler.bind(r),r.lexResponseHandler=r.lexResponseHandler.bind(r),r}return r(o,t),o.prototype.micButtonHandler=function(){return i(this,void 0,void 0,(function(){var e=this;return a(this,(function(t){return this.state.continueConversation?this.reset():this.setState({inputDisabled:!0,continueConversation:!0,currentVoiceState:b.LISTENING,micText:b.LISTENING.ICON,micButtonDisabled:!1},(function(){l.startRecording(e.onSilenceHandler,null,e.props.voiceConfig.silenceDetectionConfig)})),[2]}))}))},o.prototype.onSilenceHandler=function(){var e=this;l.stopRecording(),this.state.continueConversation&&l.exportWAV((function(t){e.setState({currentVoiceState:b.SENDING,audioInput:t,micText:b.SENDING.ICON,micButtonDisabled:!0},(function(){e.lexResponseHandler()}))}))},o.prototype.lexResponseHandler=function(){return i(this,void 0,void 0,(function(){var e,t,n=this;return a(this,(function(o){switch(o.label){case 0:if(!m.Interactions||"function"!=typeof m.Interactions.send)throw new Error("No Interactions module found, please ensure @aws-amplify/interactions is imported");return this.state.continueConversation?(e={content:this.state.audioInput,options:{messageType:"voice"}},[4,m.Interactions.send(this.props.botName,e)]):[2];case 1:return t=o.sent(),this.setState({lexResponse:t,currentVoiceState:b.SPEAKING,micText:b.SPEAKING.ICON,micButtonDisabled:!0,dialog:u(this.state.dialog,[{message:t.inputTranscript,from:"me"},t&&{from:"bot",message:t.message}]),inputText:""},(function(){n.doneSpeakingHandler()})),this.listItemsRef.current.scrollTop=this.listItemsRef.current.scrollHeight,[2]}}))}))},o.prototype.doneSpeakingHandler=function(){var e=this;this.state.continueConversation&&("audio/mpeg"===this.state.lexResponse.contentType?l.play(this.state.lexResponse.audioStream,(function(){"ReadyForFulfillment"!==e.state.lexResponse.dialogState&&"Fulfilled"!==e.state.lexResponse.dialogState&&"Failed"!==e.state.lexResponse.dialogState&&e.props.conversationModeOn?e.setState({currentVoiceState:b.LISTENING,micText:b.LISTENING.ICON,micButtonDisabled:!1},(function(){l.startRecording(e.onSilenceHandler,null,e.props.voiceConfig.silenceDetectionConfig)})):e.setState({inputDisabled:!1,currentVoiceState:b.INITIAL,micText:b.INITIAL.ICON,micButtonDisabled:!1,continueConversation:!1})})):this.setState({inputDisabled:!1,currentVoiceState:b.INITIAL,micText:b.INITIAL.ICON,micButtonDisabled:!1,continueConversation:!1}))},o.prototype.reset=function(){this.setState({inputText:"",currentVoiceState:b.INITIAL,inputDisabled:!1,micText:b.INITIAL.ICON,continueConversation:!1,micButtonDisabled:!1},(function(){l.clear()}))},o.prototype.listItems=function(){return this.state.dialog.map((function(e,t){return"me"===e.from?p.createElement("div",{key:t,style:v.itemMe,"data-test":y.chatBot.dialog+"-"+t},e.message):(e.from,p.createElement("div",{key:t,style:v.itemBot,"data-test":y.chatBot.dialog+"-"+t},e.message))}))},o.prototype.submit=function(e){return i(this,void 0,void 0,(function(){var t,n=this;return a(this,(function(o){switch(o.label){case 0:return e.preventDefault(),this.state.inputText?[4,new Promise((function(e){return n.setState({dialog:u(n.state.dialog,[{message:n.state.inputText,from:"me"}])},e)}))]:[2];case 1:if(o.sent(),!m.Interactions||"function"!=typeof m.Interactions.send)throw new Error("No Interactions module found, please ensure @aws-amplify/interactions is imported");return[4,m.Interactions.send(this.props.botName,this.state.inputText)];case 2:return t=o.sent(),this.setState({dialog:u(this.state.dialog,[t&&{from:"bot",message:t.message}]),inputText:""}),this.listItemsRef.current.scrollTop=this.listItemsRef.current.scrollHeight,[2]}}))}))},o.prototype.changeInputText=function(e){return i(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.setState({inputText:e.target.value})];case 1:return t.sent(),[2]}}))}))},o.prototype.getOnComplete=function(e){var t=this;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=t.props.clearOnComplete,i=e.apply(void 0,u(n));t.setState({dialog:u(r?[]:t.state.dialog,[i&&{from:"bot",message:i}]).filter(Boolean)},(function(){t.listItemsRef.current.scrollTop=t.listItemsRef.current.scrollHeight}))}},o.prototype.componentDidMount=function(){var e=this.props,t=e.onComplete,n=e.botName;if(t&&n){if(!m.Interactions||"function"!=typeof m.Interactions.onComplete)throw new Error("No Interactions module found, please ensure @aws-amplify/interactions is imported");m.Interactions.onComplete(n,this.getOnComplete(t,this))}},o.prototype.componentDidUpdate=function(e){var t=this.props,n=t.onComplete,o=t.botName;if(o&&this.props.onComplete!==e.onComplete){if(!m.Interactions||"function"!=typeof m.Interactions.onComplete)throw new Error("No Interactions module found, please ensure @aws-amplify/interactions is imported");m.Interactions.onComplete(o,this.getOnComplete(n,this))}},o.prototype.render=function(){var e=this.props,t=e.title,n=e.theme;e.onComplete;return p.createElement(h.FormSection,{theme:n},t&&p.createElement(h.SectionHeader,{theme:n,"data-test":y.chatBot.title},f.I18n.get(t)),p.createElement(h.SectionBody,{theme:n},p.createElement("div",{ref:this.listItemsRef,style:v.list},this.listItems())),p.createElement(h.SectionFooter,{theme:n},p.createElement(E,{micText:this.state.micText,voiceEnabled:this.props.voiceEnabled,textEnabled:this.props.textEnabled,styles:v,onChange:this.changeInputText,inputText:this.state.inputText,onSubmit:this.submit,inputDisabled:this.state.inputDisabled,micButtonDisabled:this.state.micButtonDisabled,handleMicButton:this.micButtonHandler,currentVoiceState:this.state.currentVoiceState})))},o}(p.Component);function C(e){var t=e.styles,n=e.onChange,o=e.inputText,r=e.inputDisabled,i=e.currentVoiceState;return p.createElement("input",{style:t.textInput,type:"text",placeholder:f.I18n.get(i.MESSAGE),onChange:n,value:o,disabled:r,"data-test":y.chatBot.messageInput})}function w(e){var t=e.voiceEnabled,n=e.styles,o=e.micButtonDisabled,r=e.handleMicButton,i=e.micText;return t?p.createElement("button",{style:n.mic,disabled:o,onClick:r},i):null}function _(e){var t=e.textEnabled,n=e.styles,o=e.inputDisabled;return t?p.createElement("button",{type:"submit",style:n.button,disabled:o,"data-test":y.chatBot.sendMessageButton},f.I18n.get("Send")):null}function E(e){var t=e.voiceEnabled,n=e.textEnabled,o=e.styles,r=e.onChange,i=e.inputDisabled,a=e.micButtonDisabled,s=e.inputText,u=e.onSubmit,c=e.handleMicButton,l=e.micText,h=e.currentVoiceState;return t&&!n&&(i=!0),t||n?p.createElement("form",{onSubmit:u},p.createElement(C,{onSubmit:u,styles:o,type:"text",currentVoiceState:h,onChange:r,inputText:s,inputDisabled:i}),p.createElement(_,{onSubmit:u,type:"submit",styles:o,inputDisabled:i,textEnabled:n}),p.createElement(w,{styles:o,micButtonDisabled:a,handleMicButton:c,micText:l,voiceEnabled:t})):p.createElement("div",null,"No Chatbot inputs enabled. Set at least one of voiceEnabled or textEnabled in the props."," ")}t.ChatBot=S,S.defaultProps={title:"",botName:"",onComplete:void 0,clearOnComplete:!1,voiceConfig:{silenceDetectionConfig:{time:2e3,amplitude:.2}},conversationModeOn:!1,voiceEnabled:!1,textEnabled:!0},t.default=S}).call(this,n(47))},function(e,t){e.exports=s},function(e,t,n){(function(e){!function e(t,n,o){function r(a,s){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){var n=t[a][1][e];return r(n||e)}),c,c.exports,e,t,n,o)}return n[a].exports}for(var i=!1,a=0;a<o.length;a++)r(o[a]);return r}({1:[function(e,t,n){!function(){"use strict";var t,o,r,i,a=e("./recorder.js"),s="Audio is not supported.";n.audioControl=function(e){e=e||{},this.checkAudioSupport=!1!==e.checkAudioSupport;var n=function(e){e=e||function(){},navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?(o=a.audioRecorder()).requestDevice().then((function(t){e(r=!0)})).catch((function(t){e(r=!1)})):e(r=!1)};return this.checkAudioSupport&&n(),{startRecording:function(e,n,i){if(e=e||function(){},n=n||function(){},!(r=!1!==r))throw new Error(s);o.audioContext().resume().then((function(){(t=o.createRecorder(i)).record(e,n)}))},stopRecording:function(){if(!(r=!1!==r))throw new Error(s);t.stop()},exportWAV:function(e,n){if(!(r=!1!==r))throw new Error(s);if(!e||"function"!=typeof e)throw new Error("You must pass a callback function to export.");n=void 0!==n?n:16e3,t.exportWAV(e,n),t.clear()},play:function(e,t){if(void 0!==e){var n=new Blob([e]),r=new FileReader;r.onload=function(){i=o.audioContext().createBufferSource(),o.audioContext().decodeAudioData(this.result,(function(e){i.buffer=e,i.connect(o.audioContext().destination),i.onended=function(e){"function"==typeof t&&t()},i.start(0)}))},r.readAsArrayBuffer(n)}},stop:function(){void 0!==i&&i.stop()},clear:function(){t.clear()},playHtmlAudioElement:function(e,t){if(void 0!==e){var n=new Blob([e]),o=document.createElement("audio"),r=window.URL.createObjectURL(n);o.src=r,o.addEventListener("ended",(function(){o.currentTime=0,"function"==typeof t&&t()})),o.play()}},supportsAudio:n}}}()},{"./recorder.js":5}],2:[function(e,t,n){!function(){"use strict";var t,o=e("./control.js").audioControl,r=Object.freeze({PASSIVE:"Passive",LISTENING:"Listening",SENDING:"Sending",SPEAKING:"Speaking"}),i=new o({checkAudioSupport:!1});n.conversation=function(e,n,o,s,u){var c;if(this.config=l(e),this.lexConfig=this.config.lexConfig,this.messages=r,n=n||function(){},this.onSuccess=o||function(){},this.onError=s||function(){},this.onAudioData=u||function(){},this.config.lexConfig.botName)if(AWS.config.credentials){if(AWS.config.region)return t=new AWS.LexRuntime,this.onSilence=function(){e.silenceDetection&&(i.stopRecording(),c.advanceConversation())},this.transition=function(e){var t=(c=e).state;n(t.message),t.message!==t.messages.SENDING&&t.message!==t.messages.SPEAKING||c.advanceConversation(),t.message!==t.messages.SENDING||this.config.silenceDetection||i.stopRecording()},this.advanceConversation=function(){i.supportsAudio((function(e){e?c.advanceConversation():s("Audio is not supported.")}))},this.updateConfig=function(e){this.config=l(e),this.lexConfig=this.config.lexConfig},this.reset=function(){i.clear(),c=new a(c.state)},c=new a(this),{advanceConversation:this.advanceConversation,updateConfig:this.updateConfig,reset:this.reset};this.onError("A Region value must be provided.")}else this.onError("AWS Credentials must be provided.");else this.onError("A Bot name must be provided.")};var a=function(e){this.state=e,e.message=e.messages.PASSIVE,this.advanceConversation=function(){i.startRecording(e.onSilence,e.onAudioData,e.config.silenceDetectionConfig),e.transition(new s(e))}},s=function(e){this.state=e,e.message=e.messages.LISTENING,this.advanceConversation=function(){i.exportWAV((function(t){e.audioInput=t,e.transition(new u(e))}))}},u=function(e){this.state=e,e.message=e.messages.SENDING,this.advanceConversation=function(){e.lexConfig.inputStream=e.audioInput,t.postContent(e.lexConfig,(function(t,n){t?(e.onError(t),e.transition(new a(e))):(e.audioOutput=n,e.transition(new c(e)),e.onSuccess(n))}))}},c=function(e){this.state=e,e.message=e.messages.SPEAKING,this.advanceConversation=function(){"audio/mpeg"===e.audioOutput.contentType?i.play(e.audioOutput.audioStream,(function(){"ReadyForFulfillment"!==e.audioOutput.dialogState&&"Fulfilled"!==e.audioOutput.dialogState&&"Failed"!==e.audioOutput.dialogState&&e.config.silenceDetection?(i.startRecording(e.onSilence,e.onAudioData,e.config.silenceDetectionConfig),e.transition(new s(e))):e.transition(new a(e))})):e.transition(new a(e))}},l=function(e){(e=e||{}).silenceDetection=!e.hasOwnProperty("silenceDetection")||e.silenceDetection;var t=e.lexConfig||{};return t.botAlias=t.hasOwnProperty("botAlias")?t.botAlias:"$LATEST",t.botName=t.hasOwnProperty("botName")?t.botName:"",t.contentType=t.hasOwnProperty("contentType")?t.contentType:"audio/x-l16; sample-rate=16000",t.userId=t.hasOwnProperty("userId")?t.userId:"userId",t.accept=t.hasOwnProperty("accept")?t.accept:"audio/mpeg",e.lexConfig=t,e}}()},{"./control.js":1}],3:[function(t,n,o){(function(e){e.LexAudio=e.LexAudio||{},e.LexAudio.audioControl=t("./control.js").audioControl,e.LexAudio.conversation=t("./conversation.js").conversation,n.exports=e.LexAudio}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./control.js":1,"./conversation.js":2}],4:[function(e,t,n){var o=arguments[3],r=arguments[4],i=arguments[5],a=JSON.stringify;t.exports=function(e,t){for(var n,s=Object.keys(i),u=0,c=s.length;u<c;u++){var l=s[u],p=i[l].exports;if(p===e||p&&p.default===e){n=l;break}}if(!n){n=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var h={};for(u=0,c=s.length;u<c;u++){h[l=s[u]]=l}r[n]=[Function(["require","module","exports"],"("+e+")(self)"),h]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),f={};f[n]=n,r[d]=[Function(["require"],"var f = require("+a(n)+");(f.default ? f.default : f)(self);"),f];var m={};!function e(t){for(var n in m[t]=!0,r[t][1]){var o=r[t][1][n];m[o]||e(o)}}(d);var g="("+o+")({"+Object.keys(m).map((function(e){return a(e)+":["+r[e][0]+","+a(r[e][1])+"]"})).join(",")+"},{},["+a(d)+"])",y=window.URL||window.webkitURL||window.mozURL||window.msURL,v=new Blob([g],{type:"text/javascript"});if(t&&t.bare)return v;var b=y.createObjectURL(v),S=new Worker(b);return S.objectURL=b,S}},{}],5:[function(e,t,n){!function(){"use strict";var t,o,r=e("webworkify")(e("./worker.js")),i=function(e,t){(t=t||{}).time=t.hasOwnProperty("time")?t.time:1500,t.amplitude=t.hasOwnProperty("amplitude")?t.amplitude:.2;var n,o,i,a,s=!1,u=e.context.createScriptProcessor(4096,1,1);r.onmessage=function(e){var t=e.data;n(t)},r.postMessage({command:"init",config:{sampleRate:e.context.sampleRate}});var c=function(){s=!1};u.onaudioprocess=function(e){s&&(r.postMessage({command:"record",buffer:[e.inputBuffer.getChannelData(0)]}),function(){l.fftSize=2048;var e=l.fftSize,n=new Uint8Array(e),r=t.amplitude,s=t.time;l.getByteTimeDomainData(n),"function"==typeof a&&a(n,e);for(var u=0;u<e;u++){var c=n[u]/128-1;(c>r||c<-1*r)&&(o=Date.now())}Date.now()-o>s&&i()}())};var l=e.context.createAnalyser();return l.minDecibels=-90,l.maxDecibels=-10,l.smoothingTimeConstant=.85,e.connect(l),l.connect(u),u.connect(e.context.destination),{record:function(e,t){i=e,a=t,o=Date.now(),s=!0},stop:c,clear:function(){c(),r.postMessage({command:"clear"})},exportWAV:function(e,t){n=e,r.postMessage({command:"export",sampleRate:t})}}};n.audioRecorder=function(){return{requestDevice:function(){return void 0===t&&(window.AudioContext=window.AudioContext||window.webkitAudioContext,t=new AudioContext),navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){o=e}))},createRecorder:function(e){return i(t.createMediaStreamSource(o),e)},audioContext:function(){return t}}}}()},{"./worker.js":6,webworkify:4}],6:[function(e,t,n){t.exports=function(e){"use strict";var t,n=0,o=[];function r(e,t,n){for(var o=0;o<n.length;o++)e.setUint8(t+o,n.charCodeAt(o))}e.addEventListener("message",(function(e){switch(e.data.command){case"init":c=e.data.config,t=c.sampleRate;break;case"record":u=e.data.buffer,o.push(u[0]),n+=u[0].length;break;case"export":i=e.data.sampleRate,a=function(e){var n=new ArrayBuffer(44+2*e.length),o=new DataView(n);return r(o,0,"RIFF"),o.setUint32(4,32+2*e.length,!0),r(o,8,"WAVE"),r(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,t,!0),o.setUint32(28,2*t,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),r(o,36,"data"),o.setUint32(40,2*e.length,!0),function(e,t,n){for(var o=0;o<n.length;o++,t+=2){var r=Math.max(-1,Math.min(1,n[o]));e.setInt16(t,r<0?32768*r:32767*r,!0)}}(o,44,e),o}(function(e,n){if(n===t)return e;for(var o=t/n,r=Math.round(e.length/o),i=new Float32Array(r),a=0,s=0;a<i.length;){for(var u=Math.round((a+1)*o),c=0,l=0,p=s;p<u&&p<e.length;p++)c+=e[p],l++;i[a]=c/l,a++,s=u}return i}(function(e,t){for(var n=new Float32Array(t),o=0,r=0;r<e.length;r++)n.set(e[r],o),o+=e[r].length;return n}(o,n),i)),s=new Blob([a],{type:"application/octet-stream"}),postMessage(s);break;case"clear":n=0,o=[]}var i,a,s,u,c}))}},{}]},{},[3])}).call(this,n(47))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(77);t.SumerianScene=o.SumerianScene},function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(0)),c=n(78),l=n(1),p=n(79),h=n(81),d=s(n(7)),f=n(4),m=new l.ConsoleLogger("SumerianScene"),g=function(e){function t(t){var n=e.call(this,t)||this;return n.state={showEnableAudio:!1,muted:!1,loading:!0,percentage:0,isFullscreen:!1,sceneError:null,isVRPresentationActive:!1},n}return r(t,e),t.prototype.setStateAsync=function(e){var t=this;return new Promise((function(n){t.setState(e,n)}))},t.prototype.componentDidMount=function(){document.addEventListener("fullscreenchange",this.onFullscreenChange.bind(this)),document.addEventListener("webkitfullscreenchange",this.onFullscreenChange.bind(this)),document.addEventListener("mozfullscreenchange",this.onFullscreenChange.bind(this)),document.addEventListener("MSFullscreenChange",this.onFullscreenChange.bind(this)),this.loadAndSetupScene(this.props.sceneName,"scene-dom-id")},t.prototype.componentWillUnmount=function(){document.removeEventListener("fullscreenchange",this.onFullscreenChange.bind(this)),document.removeEventListener("webkitfullscreenchange",this.onFullscreenChange.bind(this)),document.removeEventListener("mozfullscreenchange",this.onFullscreenChange.bind(this)),document.removeEventListener("MSFullscreenChange",this.onFullscreenChange.bind(this))},t.prototype.loadAndSetupScene=function(e,t){return i(this,void 0,void 0,(function(){var n,o,r,i=this;return a(this,(function(a){switch(a.label){case 0:this.setStateAsync({loading:!0}),n={progressCallback:function(e){var t=100*e;i.setState({percentage:t})}},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,c.XR.loadScene(e,t,n)];case 2:return a.sent(),[3,4];case 3:return o=a.sent(),r={displayText:"Failed to load scene",error:o},m.error(r.displayText,r.error),this.setStateAsync({sceneError:r}),[2];case 4:return c.XR.start(e),this.setStateAsync({muted:c.XR.isMuted(e),isVRPresentationActive:c.XR.isVRPresentationActive(e),loading:!1}),c.XR.onSceneEvent(e,"AudioEnabled",(function(){return i.setStateAsync({showEnableAudio:!1})})),c.XR.onSceneEvent(e,"AudioDisabled",(function(){return i.setStateAsync({showEnableAudio:!0})})),[2]}}))}))},t.prototype.setMuted=function(e){this.state.showEnableAudio&&(c.XR.enableAudio(this.props.sceneName),this.setState({showEnableAudio:!1})),c.XR.setMuted(this.props.sceneName,e),this.setState({muted:e})},t.prototype.onFullscreenChange=function(){var e=document;this.setState({isFullscreen:null!==e.fullscreenElement})},t.prototype.maximize=function(){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,document.getElementById("scene-container-dom-id").requestFullscreen()];case 1:return e.sent(),[2]}}))}))},t.prototype.minimize=function(){return i(this,void 0,void 0,(function(){var e;return a(this,(function(t){return(e=document).exitFullscreen?e.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitExitFullscreen&&e.webkitExitFullscreen(),[2]}))}))},t.prototype.toggleVRPresentation=function(){try{this.state.isVRPresentationActive?c.XR.exitVR(this.props.sceneName):c.XR.enterVR(this.props.sceneName)}catch(e){return void m.error("Unable to start/stop WebVR System: "+e.message)}this.setState({isVRPresentationActive:!this.state.isVRPresentationActive})},t.prototype.render=function(){var e,t,n,o=this;return c.XR.isSceneLoaded(this.props.sceneName)&&(e=this.state.showEnableAudio?u.createElement(p.IconButton,{variant:"sound-mute",tooltip:"The scene is muted. Click to unmute.",onClick:function(){return o.setMuted(!1)},autoShowTooltip:!0}):c.XR.isMuted(this.props.sceneName)?u.createElement(p.IconButton,{variant:"sound-mute",tooltip:"Unmute",onClick:function(){return o.setMuted(!1)}}):u.createElement(p.IconButton,{variant:"sound",tooltip:"Mute",onClick:function(){return o.setMuted(!0)}}),c.XR.isVRCapable(this.props.sceneName)&&(this.state.isVRPresentationActive?(m.info("VR Presentation Active"),t=u.createElement(p.IconButton,{variant:"exit-vr",tooltip:"Exit VR",onClick:function(){return o.toggleVRPresentation()}})):(m.info("VR Presentation Inactive"),t=u.createElement(p.IconButton,{variant:"enter-vr",tooltip:"Enter VR",onClick:function(){return o.toggleVRPresentation()}}))),n=this.state.isFullscreen?u.createElement(p.IconButton,{variant:"minimize",tooltip:"Exit Fullscreen",onClick:function(){return o.minimize()}}):u.createElement(p.IconButton,{variant:"maximize",tooltip:"Fullscreen",onClick:function(){return o.maximize()}})),u.createElement("div",{id:"scene-container-dom-id",className:d.sumerianSceneContainer,"data-test":f.sumerianScene.container},u.createElement("div",{id:"scene-dom-id",className:d.sumerianScene,"data-test":f.sumerianScene.sumerianScene},this.state.loading&&u.createElement(h.Loading,{sceneName:this.props.sceneName,percentage:this.state.percentage,sceneError:this.state.sceneError})),u.createElement("div",{className:d.sceneBar,"data-test":f.sumerianScene.bar},u.createElement("span",{className:d.sceneActions,"data-test":f.sumerianScene.actions},e,t,n)))},t}(u.Component);t.SumerianScene=g,t.default=g},function(e,t){e.exports=u},function(e,t,n){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(0)),a=r(n(80)),s=o(n(7));t.IconButton=function(e){var t;switch(e.variant){case"sound-mute":t=i.createElement("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{id:"icons/minis/volumeOff",fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M3.48026899,12.9630494 C3.63825091,12.9630494 3.79237961,13.0108921 3.92264322,13.1003479 L8.77467683,16.8113609 C9.29423971,17.1679383 10,16.7950396 10,16.1637406 L10,3.78619489 C10,3.15489596 9.29423971,2.78199725 8.77467683,3.13857463 L3.92264322,6.84545211 C3.79237961,6.93490793 3.63825091,6.9827506 3.48026899,6.9827506 L1.78294894,6.9827506 C1.3505185,6.9827506 1,7.33409518 1,7.76754476 L1,12.1781306 C1,12.6117048 1.3505185,12.9630494 1.78294894,12.9630494 L3.48026899,12.9630494 Z M17.2118156,7 L15.0918385,9.11997713 L12.9718614,7 L12,7.97174685 L14.1200917,10.091724 L12,12.2118156 L12.9718614,13.1835625 L15.0918385,11.0635854 L17.2118156,13.1835625 L18.1835625,12.2118156 L16.0635854,10.091724 L18.1835625,7.97174685 L17.2118156,7 Z",id:"Fill-2",fill:"#FFF"})));break;case"sound":t=i.createElement("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{id:"icons/minis/volumeOn",fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M3.48026899,12.9630494 L1.78294894,12.9630494 C1.3505185,12.9630494 1,12.6117048 1,12.1781306 L1,7.76754476 C1,7.33409518 1.3505185,6.9827506 1.78294894,6.9827506 L3.48026899,6.9827506 C3.63825091,6.9827506 3.79237961,6.93490793 3.92264322,6.84545211 L8.77467683,3.13857463 C9.29423971,2.78199725 10,3.15489596 10,3.78619489 L10,16.1637406 C10,16.7950396 9.29423971,17.1679383 8.77467683,16.8113609 L3.92264322,13.1003479 C3.79237961,13.0108921 3.63825091,12.9630494 3.48026899,12.9630494 Z M14.9270376,3.03232286 C15.1729267,3.03232286 15.4040399,3.12815658 15.5777627,3.3022351 C17.3699891,5.09889099 18.3570052,7.48235058 18.3570052,10.0135053 C18.3570052,12.54466 17.3699891,14.9281196 15.5777627,16.7247755 C15.4041045,16.898854 15.1729914,16.9947524 14.9270052,16.9947524 C14.6820861,16.9947524 14.4515549,16.899436 14.2777674,16.7263598 C13.9192316,16.3684383 13.9185203,15.7852882 14.2762477,15.4264291 C15.7222893,13.9769926 16.5186727,12.0545954 16.5186727,10.0135053 C16.5186727,7.97241524 15.7222893,6.05001801 14.2762154,4.60058152 C13.9184879,4.24175473 13.9191992,3.65857229 14.277832,3.30065081 C14.4514256,3.1275746 14.6819567,3.03232286 14.9270376,3.03232286 Z M13.5730665,6.11570485 C14.6133991,7.15574642 15.1862998,8.54003279 15.1862998,10.0134924 C15.1862998,11.4892799 14.6113945,12.8741159 13.5675376,13.9128965 C13.3942351,14.0855848 13.1639626,14.1806425 12.9191727,14.1806425 C12.6727016,14.1806425 12.4412975,14.0844531 12.2677039,13.9097926 C12.0944984,13.7358111 11.9994406,13.5047303 11.9999903,13.2592291 C12.0005723,13.0136956 12.096794,12.7831644 12.2708079,12.6100882 C12.9654406,11.9185917 13.3479995,10.996467 13.3479995,10.0134924 C13.3479995,9.03119677 12.966346,8.1086194 12.2733298,7.4157649 C11.9150203,7.05745543 11.9149233,6.47436998 12.2731358,6.11589885 C12.4467617,5.94224065 12.6775838,5.84666559 12.923085,5.84666559 C13.1685538,5.84666559 13.3993436,5.94220831 13.5730665,6.11570485 Z",id:"Fill-2",fill:"#FFF"})));break;case"maximize":t=i.createElement("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{id:"icons/minis/screenfull",fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M2.04162598,3 L2.04162598,16 L17.0147705,16 L17.0147705,3 L2.04162598,3 Z M1,2 L18,2 L18,17 L1,17 L1,2 Z M3,4 L16,4 L16,15 L3,15 L3,4 Z",id:"Rectangle-Copy",fill:"#FFF",fillRule:"nonzero"})));break;case"minimize":t=i.createElement("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{id:"icons/minis/screensmall",fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M11,16 L17.0147705,16 L17.0147705,3 L2.04162598,3 L2.04162598,10 L11,10 L11,16 Z M1,2 L18,2 L18,17 L1,17 L1,2 Z",id:"Rectangle",fill:"#FFF",fillRule:"nonzero"})));break;case"enter-vr":t=i.createElement("svg",{width:"19",height:"19",viewBox:"0 0 17 10",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},i.createElement("g",{id:"VRon",fill:"#FFF",fillRule:"nonzero"},i.createElement("path",{d:"M15.7856977,0.02395184 L15.8915734,0.02395184 C16.5037405,0.02395184 17,0.520211324 17,1.13237842 L17,1.54663675 L17,8.8915038 C17,9.5034193 16.4560011,10 15.7856977,10 L12.0095825,10 C9.98324439,7.1593807 8.80676009,5.741338 8.48012959,5.74587199 C8.16206045,5.75028714 7.01003321,7.1683298 5.02404785,10 L1.21426911,10 C0.543965735,10 3.32031236e-05,9.5034193 3.32031236e-05,8.8915038 L3.32031236e-05,1.54663675 L3.32031236e-05,1.13237842 L3.32031236e-05,1.13237842 C3.32031236e-05,0.520211324 0.496292687,0.02395184 1.10845978,0.02395184 L1.21426911,0.02395184 L15.7856977,0.02395184 Z M4.5,6 C5.32842712,6 6,5.32842712 6,4.5 C6,3.67157288 5.32842712,3 4.5,3 C3.67157288,3 3,3.67157288 3,4.5 C3,5.32842712 3.67157288,6 4.5,6 Z M12.5,6 C13.3284271,6 14,5.32842712 14,4.5 C14,3.67157288 13.3284271,3 12.5,3 C11.6715729,3 11,3.67157288 11,4.5 C11,5.32842712 11.6715729,6 12.5,6 Z",id:"Fill-1"}))));break;case"exit-vr":t=i.createElement("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{id:"icons/minis/VRon-Copy",fill:"none",fillRule:"evenodd"},i.createElement("g",{id:"Group-7-Copy",transform:"translate(1 3)",fill:"#FFF"},i.createElement("path",{d:"M15.7856977,3.02395184 L17,3.02395184 L17,4.13237842 L17,4.54663675 L17,11.8915038 C17,12.5034193 16.4560011,13 15.7856977,13 L12.0095825,13 C9.98324439,10.1593807 8.80676009,8.741338 8.48012959,8.74587199 C8.16206045,8.75028714 7.01003321,10.1683298 5.02404785,13 L1.21426911,13 C0.543965735,13 3.32031236e-05,12.5034193 3.32031236e-05,11.8915038 L3.32031236e-05,4.54663675 L3.32031236e-05,4.13237842 L3.32031236e-05,3.02395184 L1.21426911,3.02395184 L15.7856977,3.02395184 Z M4.5,9 C5.32842712,9 6,8.32842712 6,7.5 C6,6.67157288 5.32842712,6 4.5,6 C3.67157288,6 3,6.67157288 3,7.5 C3,8.32842712 3.67157288,9 4.5,9 Z M12.5,9 C13.3284271,9 14,8.32842712 14,7.5 C14,6.67157288 13.3284271,6 12.5,6 C11.6715729,6 11,6.67157288 11,7.5 C11,8.32842712 11.6715729,9 12.5,9 Z M2.5486669,0 L14.420089,0 C14.7977406,0 15.1613805,0.149260956 15.4374308,0.417695511 L16.9999668,2.00634766 L0,2.00634766 L1.58537972,0.395493117 C1.84682061,0.141306827 2.19106994,0 2.5486669,0 Z",id:"Fill-1"}))));break;default:t=null}return i.createElement(a.default,{text:e.tooltip,autoShowTooltip:e.autoShowTooltip},i.createElement("button",{className:s.actionButton,onClick:e.onClick},t))},t.default=t.IconButton},function(e,t,n){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(0)),i=n(7);t.Tooltip=function(e){var t=""+i.tooltip;return e.autoShowTooltip&&(t=i.tooltip+" "+i.autoShowTooltip),r.createElement("div",{className:t,"data-text":e.text},e.children)},t.default=t.Tooltip},function(e,t,n){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(0)),i=o(n(7)),a=n(4);t.Loading=function(e){return r.createElement("div",{className:i.loadingOverlay,"data-test":a.sumerianScene.loading},r.createElement("div",{className:i.loadingContainer},r.createElement("div",{className:i.loadingLogo,"data-test":a.sumerianScene.loadingLogo},r.createElement("svg",{viewBox:"0 0 800 481",xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",{id:"Page-1",fillRule:"evenodd"},r.createElement("g",{id:"AWS_logo_RGB-(1)",transform:"translate(-16 -17)",fillRule:"nonzero"},r.createElement("path",{d:"M241.371,190.172 C241.371,197.487 241.371,204.801 245.028,212.115 C245.028,219.43 248.685,226.744 252.343,234.058 C252.343,234.058 252.343,237.715 256,241.373 C256,245.03 252.343,248.688 252.343,248.688 L234.058,256.002 C230.401,256.002 230.401,259.659 226.743,259.659 C223.085,259.659 219.428,259.659 219.428,256.002 C219.428,252.345 212.113,248.687 208.457,245.031 C208.457,237.716 204.8,234.06 201.142,226.745 C182.856,248.688 153.599,263.317 124.342,263.317 C106.057,263.317 84.114,256.002 69.485,245.031 C54.856,230.402 51.2,212.116 51.2,193.831 C51.2,171.888 58.515,153.603 73.143,138.974 C91.428,124.345 113.371,117.031 138.972,117.031 C149.943,117.031 157.258,117.031 168.229,120.688 C179.2,120.688 186.515,124.345 197.486,128.003 L197.486,106.06 C197.486,91.431 193.829,76.803 186.515,62.174 C171.886,54.859 157.258,51.203 142.629,51.203 C131.658,51.203 124.344,51.203 113.372,54.86 C102.4,58.517 95.087,62.175 84.115,65.832 C80.458,65.832 76.801,69.489 73.143,69.489 L69.486,69.489 C65.829,69.489 62.171,65.832 62.171,62.174 L62.171,47.545 C62.171,43.888 62.171,40.23 65.828,36.574 C69.485,36.574 73.142,32.917 73.142,32.917 C84.114,29.26 95.085,25.603 109.714,21.946 C124.343,18.289 138.971,18.289 149.942,18.289 C175.542,14.632 201.142,21.946 219.428,36.574 C234.057,54.859 245.028,76.802 241.371,102.403 L241.371,190.175 L241.371,190.172 Z M131.657,230.4 C142.628,230.4 149.942,230.4 160.914,226.743 C171.886,223.086 179.199,215.772 186.514,208.457 C190.171,204.8 193.829,197.486 193.829,193.828 C197.486,182.857 197.486,175.543 197.486,168.228 L197.486,157.257 C190.171,157.257 182.857,153.6 171.886,153.6 C164.571,153.6 153.6,153.6 146.286,153.6 C135.315,149.943 120.686,153.6 109.714,160.915 C98.742,168.23 95.085,179.2 95.085,190.172 C95.085,201.143 98.742,212.115 106.057,219.429 C113.372,226.743 124.342,230.4 131.657,230.4 Z M347.428,259.657 C343.771,259.657 340.113,259.657 336.457,256 C332.801,252.343 332.8,248.685 332.8,245.029 L270.629,40.229 C270.629,36.572 266.972,32.914 266.972,29.258 C266.972,29.258 266.972,25.601 266.972,25.601 C266.972,25.601 270.629,21.944 270.629,25.601 L296.229,25.601 C299.886,25.601 303.544,25.601 307.2,29.258 C310.857,29.258 314.515,32.915 314.515,36.573 L358.4,212.116 L402.285,36.573 C402.285,32.916 405.942,29.259 405.942,25.602 C409.599,21.945 413.257,21.945 416.913,21.945 L438.856,21.945 C442.513,21.945 446.171,21.945 449.827,25.602 C453.483,29.259 453.484,32.917 453.484,36.573 L493.712,215.773 L541.255,36.573 C541.255,32.916 544.912,29.259 544.912,25.602 C548.569,21.945 552.226,21.945 555.883,21.945 L581.483,21.945 C581.483,21.945 585.14,21.945 585.14,21.945 C585.14,21.945 588.797,25.602 585.14,25.602 C585.14,25.602 585.14,29.259 585.14,29.259 C585.14,32.916 585.14,32.916 581.483,36.573 L515.655,241.373 C515.655,245.03 511.998,248.688 508.34,252.344 C504.682,256 501.025,256.001 497.369,256.001 L475.426,256.001 C471.769,256.001 468.111,256.001 464.455,252.344 C460.799,248.687 460.798,245.029 460.798,241.373 L427.884,73.145 L387.656,245.031 C387.656,248.688 383.999,252.346 383.999,256.002 C380.342,259.659 376.684,259.659 373.028,259.659 L347.428,259.659 L347.428,259.657 Z M687.543,266.971 C672.914,266.971 658.286,266.971 647.314,263.314 C636.342,259.657 625.371,255.999 618.057,252.343 C610.743,248.686 607.086,245.028 607.086,237.714 L607.086,223.085 C607.086,215.77 610.743,215.77 614.4,215.77 C614.4,215.77 618.057,215.77 618.057,215.77 L625.371,219.427 C636.342,223.084 643.656,226.742 654.628,230.398 C665.6,234.054 676.571,234.055 687.542,234.055 C702.171,234.055 713.142,230.398 727.771,226.74 C735.085,223.083 742.4,212.111 742.4,201.14 C742.4,193.825 738.743,186.511 735.086,182.855 C727.772,175.54 716.801,171.884 705.829,168.226 L665.6,157.255 C650.971,153.598 636.343,142.626 625.372,131.655 C618.058,120.683 610.743,106.055 610.743,91.427 C610.743,80.455 614.4,69.484 618.057,62.17 C621.714,54.856 629.028,47.541 636.342,40.227 C643.656,32.912 654.627,29.256 661.942,25.598 C672.913,21.941 683.885,21.941 694.856,21.941 C702.17,21.941 705.827,21.941 713.141,21.941 C720.455,21.941 724.112,21.941 731.426,25.598 C735.083,25.598 742.397,29.255 746.055,29.255 C749.713,29.255 753.369,32.912 757.026,32.912 C760.683,32.912 764.34,36.569 764.34,40.227 C767.997,36.57 767.997,40.227 767.997,43.884 L767.997,54.855 C767.997,62.17 764.34,62.17 760.683,62.17 C757.026,62.17 753.369,62.17 749.712,58.513 C735.083,51.198 716.798,47.542 698.512,47.542 C687.541,47.542 672.912,51.199 661.94,54.857 C658.283,65.829 654.626,73.142 654.626,84.114 C654.626,91.428 658.283,98.743 661.94,102.399 C669.254,109.713 680.225,113.371 691.197,117.028 L727.769,128 C742.398,131.657 757.026,142.629 767.997,153.6 C775.311,164.571 782.626,179.2 778.968,193.828 C778.968,204.799 775.311,215.771 771.654,223.085 C767.997,234.056 760.683,241.37 753.369,245.028 C746.055,252.343 735.084,255.999 724.112,259.656 C713.14,263.313 702.169,266.971 687.54,266.971 L687.543,266.971 Z",id:"Shape"}),r.createElement("path",{d:"M738.743,398.628 C650.972,464.457 522.972,497.371 416.914,497.371 C270.628,497.371 128,446.171 21.943,347.428 C10.971,336.457 18.286,329.142 29.257,332.8 C149.943,402.286 285.257,438.857 424.228,438.857 C526.628,438.857 629.028,416.914 727.771,376.686 C742.4,369.371 753.371,387.657 738.742,398.629 L738.743,398.628 Z",id:"Shape"}),r.createElement("path",{d:"M775.314,354.743 C764.343,340.115 702.171,347.428 672.914,351.086 C665.6,351.086 661.943,343.771 669.257,340.115 C720.457,303.543 800.914,314.515 811.886,325.487 C822.858,336.459 808.229,420.572 760.686,460.802 C753.372,468.117 746.057,464.459 749.715,457.145 C764.344,427.888 786.287,369.373 775.315,354.745 L775.314,354.743 Z",id:"Shape"}))))),r.createElement("div",{className:i.loadingSceneName,"data-test":a.sumerianScene.loadingSceneName},e.sceneName),e.sceneError?r.createElement("div",{className:i.sceneErrorText,"data-test":a.sumerianScene.errorText},e.sceneError.displayText):r.createElement("div",{className:i.loadingBar,"data-test":a.sumerianScene.loadingBar},r.createElement("div",{className:i.loadingBarFill,style:{width:e.percentage+"%"}}))))},t.default=t.Loading}])}));
2//# sourceMappingURL=aws-amplify-react.min.js.map
\No newline at end of file