PageSourceSearch

https://www.aipub.io/_next/static/chunks/0hc0pgat0og4o.js

js aipub.io collected 2026-10-02 01:57:24 UTC 88,868 bytes, 9 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,604528,e=>{"use strict";var t=e.i(883901),n=e.i(313157);e.s(["getAuthUserAgentValue",0,(e,o)=>(0,t.getAmplifyUserAgent)({category:n.Category.Auth,action:e,...o})])},948085,e=>{"use strict";let t;var n,o=e.i(338216);let i="CognitoSignInState",r={username:`${i}.username`,challengeName:`${i}.challengeName`,signInSession:`${i}.signInSession`,expiry:`${i}.expiry`},s=()=>{for(let e of Object.values(r))o.syncSessionStorage.removeItem(e)},a=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),c=(t=(n=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return l({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return l(t.value),{...t.value};case"SET_CHALLENGE_NAME":return l({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return l({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":let n=o.syncSessionStorage.getItem(r.expiry);if(!n||Number(n)<=Date.now())return s(),a();return{username:o.syncSessionStorage.getItem(r.username)??void 0,challengeName:o.syncSessionStorage.getItem(r.challengeName)??void 0,signInSession:o.syncSessionStorage.getItem(r.signInSession)??void 0};case"RESET_STATE":return s(),a();default:return e}})(a(),{type:"SET_INITIAL_STATE"}),{getState:()=>t,dispatch:e=>{t=n(t,e)}}),l=({challengeName:e,signInSession:t,username:n})=>{n&&o.syncSessionStorage.setItem(r.username,n),e&&o.syncSessionStorage.setItem(r.challengeName,e),t&&(o.syncSessionStorage.setItem(r.signInSession,t),o.syncSessionStorage.setItem(r.expiry,String(Date.now()+18e4)))};e.s(["resetActiveSignInState",0,()=>{c.dispatch({type:"RESET_STATE"})},"setActiveSignInState",0,function(e){c.dispatch({type:"SET_SIGN_IN_STATE",value:e})},"signInStore",0,c])},800536,e=>{"use strict";var t,n,o,i,r,s,a,c,l,d,E,p,u,g,h,m,S,A,I,x,C,R,P,y,f,v,T,U,N,w,F,_,M,D,O,b,L,V,k,q,H,B,W,z,G,K,$,Y;(f=t||(t={})).ConcurrentModificationException="ConcurrentModificationException",f.ForbiddenException="ForbiddenException",f.InternalErrorException="InternalErrorException",f.InvalidParameterException="InvalidParameterException",f.NotAuthorizedException="NotAuthorizedException",f.ResourceNotFoundException="ResourceNotFoundException",f.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",(v=n||(n={})).ForbiddenException="ForbiddenException",v.InternalErrorException="InternalErrorException",v.InvalidParameterException="InvalidParameterException",v.InvalidPasswordException="InvalidPasswordException",v.LimitExceededException="LimitExceededException",v.NotAuthorizedException="NotAuthorizedException",v.PasswordResetRequiredException="PasswordResetRequiredException",v.ResourceNotFoundException="ResourceNotFoundException",v.TooManyRequestsException="TooManyRequestsException",v.UserNotConfirmedException="UserNotConfirmedException",v.UserNotFoundException="UserNotFoundException",(T=o||(o={})).ForbiddenException="ForbiddenException",T.InternalErrorException="InternalErrorException",T.InvalidLambdaResponseException="InvalidLambdaResponseException",T.InvalidParameterException="InvalidParameterException",T.InvalidPasswordException="InvalidPasswordException",T.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",T.NotAuthorizedException="NotAuthorizedException",T.PasswordResetRequiredException="PasswordResetRequiredException",T.ResourceNotFoundException="ResourceNotFoundException",T.TooManyRequestsException="TooManyRequestsException",T.UsernameExistsException="UsernameExistsException",T.UserNotConfirmedException="UserNotConfirmedException",T.UserNotFoundException="UserNotFoundException",(U=i||(i={})).CodeMismatchException="CodeMismatchException",U.ExpiredCodeException="ExpiredCodeException",U.ForbiddenException="ForbiddenException",U.InternalErrorException="InternalErrorException",U.InvalidLambdaResponseException="InvalidLambdaResponseException",U.InvalidParameterException="InvalidParameterException",U.InvalidPasswordException="InvalidPasswordException",U.LimitExceededException="LimitExceededException",U.NotAuthorizedException="NotAuthorizedException",U.ResourceNotFoundException="ResourceNotFoundException",U.TooManyFailedAttemptsException="TooManyFailedAttemptsException",U.TooManyRequestsException="TooManyRequestsException",U.UnexpectedLambdaException="UnexpectedLambdaException",U.UserLambdaValidationException="UserLambdaValidationException",U.UserNotConfirmedException="UserNotConfirmedException",U.UserNotFoundException="UserNotFoundException",(N=r||(r={})).AliasExistsException="AliasExistsException",N.CodeMismatchException="CodeMismatchException",N.ExpiredCodeException="ExpiredCodeException",N.ForbiddenException="ForbiddenException",N.InternalErrorException="InternalErrorException",N.InvalidLambdaResponseException="InvalidLambdaResponseException",N.InvalidParameterException="InvalidParameterException",N.LimitExceededException="LimitExceededException",N.NotAuthorizedException="NotAuthorizedException",N.ResourceNotFoundException="ResourceNotFoundException",N.TooManyFailedAttemptsException="TooManyFailedAttemptsException",N.TooManyRequestsException="TooManyRequestsException",N.UnexpectedLambdaException="UnexpectedLambdaException",N.UserLambdaValidationException="UserLambdaValidationException",N.UserNotFoundException="UserNotFoundException",(w=s||(s={})).ForbiddenException="ForbiddenException",w.InternalErrorException="InternalErrorException",w.InvalidParameterException="InvalidParameterException",w.NotAuthorizedException="NotAuthorizedException",w.PasswordResetRequiredException="PasswordResetRequiredException",w.ResourceNotFoundException="ResourceNotFoundException",w.TooManyRequestsException="TooManyRequestsException",w.UserNotConfirmedException="UserNotConfirmedException",w.UserNotFoundException="UserNotFoundException",(F=a||(a={})).ForbiddenException="ForbiddenException",F.InternalErrorException="InternalErrorException",F.InvalidParameterException="InvalidParameterException",F.NotAuthorizedException="NotAuthorizedException",F.PasswordResetRequiredException="PasswordResetRequiredException",F.ResourceNotFoundException="ResourceNotFoundException",F.TooManyRequestsException="TooManyRequestsException",F.UserNotConfirmedException="UserNotConfirmedException",F.UserNotFoundException="UserNotFoundException",(_=c||(c={})).ForbiddenException="ForbiddenException",_.InternalErrorException="InternalErrorException",_.InvalidParameterException="InvalidParameterException",_.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",_.NotAuthorizedException="NotAuthorizedException",_.PasswordResetRequiredException="PasswordResetRequiredException",_.ResourceNotFoundException="ResourceNotFoundException",_.TooManyRequestsException="TooManyRequestsException",_.UserNotConfirmedException="UserNotConfirmedException",_.UserNotFoundException="UserNotFoundException",(M=l||(l={})).CodeDeliveryFailureException="CodeDeliveryFailureException",M.ForbiddenException="ForbiddenException",M.InternalErrorException="InternalErrorException",M.InvalidEmailRoleAccessPol
1icyException="InvalidEmailRoleAccessPolicyException",M.InvalidLambdaResponseException="InvalidLambdaResponseException",M.InvalidParameterException="InvalidParameterException",M.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",M.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",M.LimitExceededException="LimitExceededException",M.NotAuthorizedException="NotAuthorizedException",M.ResourceNotFoundException="ResourceNotFoundException",M.TooManyRequestsException="TooManyRequestsException",M.UnexpectedLambdaException="UnexpectedLambdaException",M.UserLambdaValidationException="UserLambdaValidationException",M.UserNotFoundException="UserNotFoundException",(D=d||(d={})).ForbiddenException="ForbiddenException",D.InternalErrorException="InternalErrorException",D.InvalidParameterException="InvalidParameterException",D.NotAuthorizedException="NotAuthorizedException",D.PasswordResetRequiredException="PasswordResetRequiredException",D.ResourceNotFoundException="ResourceNotFoundException",D.TooManyRequestsException="TooManyRequestsException",D.UserNotConfirmedException="UserNotConfirmedException",D.UserNotFoundException="UserNotFoundException",(O=E||(E={})).ExternalServiceException="ExternalServiceException",O.InternalErrorException="InternalErrorException",O.InvalidParameterException="InvalidParameterException",O.LimitExceededException="LimitExceededException",O.NotAuthorizedException="NotAuthorizedException",O.ResourceConflictException="ResourceConflictException",O.ResourceNotFoundException="ResourceNotFoundException",O.TooManyRequestsException="TooManyRequestsException",(b=p||(p={})).ExternalServiceException="ExternalServiceException",b.InternalErrorException="InternalErrorException",b.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",b.InvalidParameterException="InvalidParameterException",b.NotAuthorizedException="NotAuthorizedException",b.ResourceConflictException="ResourceConflictException",b.ResourceNotFoundException="ResourceNotFoundException",b.TooManyRequestsException="TooManyRequestsException",(L=u||(u={})).CodeDeliveryFailureException="CodeDeliveryFailureException",L.ForbiddenException="ForbiddenException",L.InternalErrorException="InternalErrorException",L.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",L.InvalidLambdaResponseException="InvalidLambdaResponseException",L.InvalidParameterException="InvalidParameterException",L.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",L.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",L.LimitExceededException="LimitExceededException",L.NotAuthorizedException="NotAuthorizedException",L.PasswordResetRequiredException="PasswordResetRequiredException",L.ResourceNotFoundException="ResourceNotFoundException",L.TooManyRequestsException="TooManyRequestsException",L.UnexpectedLambdaException="UnexpectedLambdaException",L.UserLambdaValidationException="UserLambdaValidationException",L.UserNotConfirmedException="UserNotConfirmedException",L.UserNotFoundException="UserNotFoundException",(V=g||(g={})).ForbiddenException="ForbiddenException",V.InternalErrorException="InternalErrorException",V.InvalidParameterException="InvalidParameterException",V.NotAuthorizedException="NotAuthorizedException",V.PasswordResetRequiredException="PasswordResetRequiredException",V.ResourceNotFoundException="ResourceNotFoundException",V.TooManyRequestsException="TooManyRequestsException",V.UserNotConfirmedException="UserNotConfirmedException",(k=h||(h={})).PasswordResetRequiredException="PasswordResetRequiredException",k.ForbiddenException="ForbiddenException",k.InternalErrorException="InternalErrorException",k.InvalidLambdaResponseException="InvalidLambdaResponseException",k.InvalidParameterException="InvalidParameterException",k.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",k.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",k.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",k.NotAuthorizedException="NotAuthorizedException",k.ResourceNotFoundException="ResourceNotFoundException",k.TooManyRequestsException="TooManyRequestsException",k.UnexpectedLambdaException="UnexpectedLambdaException",k.UserLambdaValidationException="UserLambdaValidationException",k.UserNotConfirmedException="UserNotConfirmedException",k.UserNotFoundException="UserNotFoundException",(q=m||(m={})).CodeDeliveryFailureException="CodeDeliveryFailureException",q.ForbiddenException="ForbiddenException",q.InternalErrorException="InternalErrorException",q.InvalidEmailRoleAccessPol
1icyException="InvalidEmailRoleAccessPolicyException",q.InvalidLambdaResponseException="InvalidLambdaResponseException",q.InvalidParameterException="InvalidParameterException",q.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",q.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",q.LimitExceededException="LimitExceededException",q.NotAuthorizedException="NotAuthorizedException",q.ResourceNotFoundException="ResourceNotFoundException",q.TooManyRequestsException="TooManyRequestsException",q.UnexpectedLambdaException="UnexpectedLambdaException",q.UserLambdaValidationException="UserLambdaValidationException",q.UserNotFoundException="UserNotFoundException",(H=S||(S={})).AliasExistsException="AliasExistsException",H.CodeMismatchException="CodeMismatchException",H.ExpiredCodeException="ExpiredCodeException",H.ForbiddenException="ForbiddenException",H.InternalErrorException="InternalErrorException",H.InvalidLambdaResponseException="InvalidLambdaResponseException",H.InvalidParameterException="InvalidParameterException",H.InvalidPasswordException="InvalidPasswordException",H.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",H.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",H.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",H.MFAMethodNotFoundException="MFAMethodNotFoundException",H.NotAuthorizedException="NotAuthorizedException",H.PasswordResetRequiredException="PasswordResetRequiredException",H.ResourceNotFoundException="ResourceNotFoundException",H.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",H.TooManyRequestsException="TooManyRequestsException",H.UnexpectedLambdaException="UnexpectedLambdaException",H.UserLambdaValidationException="UserLambdaValidationException",H.UserNotConfirmedException="UserNotConfirmedException",H.UserNotFoundException="UserNotFoundException",(B=A||(A={})).ForbiddenException="ForbiddenException",B.InternalErrorException="InternalErrorException",B.InvalidParameterException="InvalidParameterException",B.NotAuthorizedException="NotAuthorizedException",B.PasswordResetRequiredException="PasswordResetRequiredException",B.ResourceNotFoundException="ResourceNotFoundException",B.UserNotConfirmedException="UserNotConfirmedException",B.UserNotFoundException="UserNotFoundException",(W=I||(I={})).CodeDeliveryFailureException="CodeDeliveryFailureException",W.InternalErrorException="InternalErrorException",W.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",W.InvalidLambdaResponseException="InvalidLambdaResponseException",W.InvalidParameterException="InvalidParameterException",W.InvalidPasswordException="InvalidPasswordException",W.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",W.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",W.NotAuthorizedException="NotAuthorizedException",W.ResourceNotFoundException="ResourceNotFoundException",W.TooManyRequestsException="TooManyRequestsException",W.UnexpectedLambdaException="UnexpectedLambdaException",W.UserLambdaValidationException="UserLambdaValidationException",W.UsernameExistsException="UsernameExistsException",(z=x||(x={})).AliasExistsException="AliasExistsException",z.CodeDeliveryFailureException="CodeDeliveryFailureException",z.CodeMismatchException="CodeMismatchException",z.ExpiredCodeException="ExpiredCodeException",z.ForbiddenException="ForbiddenException",z.InternalErrorException="InternalErrorException",z.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",z.InvalidLambdaResponseException="InvalidLambdaResponseException",z.InvalidParameterException="InvalidParameterException",z.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",z.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",z.NotAuthorizedException="NotAuthorizedException",z.PasswordResetRequiredException="PasswordResetRequiredException",z.ResourceNotFoundException="ResourceNotFoundException",z.TooManyRequestsException="TooManyRequestsException",z.UnexpectedLambdaException="UnexpectedLambdaException",z.UserLambdaValidationException="UserLambdaValidationException",z.UserNotConfirmedException="UserNotConfirmedException",z.UserNotFoundException="UserNotFoundException",(G=C||(C={}
1)).CodeMismatchException="CodeMismatchException",G.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",G.ForbiddenException="ForbiddenException",G.InternalErrorException="InternalErrorException",G.InvalidParameterException="InvalidParameterException",G.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",G.NotAuthorizedException="NotAuthorizedException",G.PasswordResetRequiredException="PasswordResetRequiredException",G.ResourceNotFoundException="ResourceNotFoundException",G.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",G.TooManyRequestsException="TooManyRequestsException",G.UserNotConfirmedException="UserNotConfirmedException",G.UserNotFoundException="UserNotFoundException",(K=R||(R={})).AliasExistsException="AliasExistsException",K.CodeMismatchException="CodeMismatchException",K.ExpiredCodeException="ExpiredCodeException",K.ForbiddenException="ForbiddenException",K.InternalErrorException="InternalErrorException",K.InvalidParameterException="InvalidParameterException",K.LimitExceededException="LimitExceededException",K.NotAuthorizedException="NotAuthorizedException",K.PasswordResetRequiredException="PasswordResetRequiredException",K.ResourceNotFoundException="ResourceNotFoundException",K.TooManyRequestsException="TooManyRequestsException",K.UserNotConfirmedException="UserNotConfirmedException",K.UserNotFoundException="UserNotFoundException",($=P||(P={})).ForbiddenException="ForbiddenException",$.InternalErrorException="InternalErrorException",$.InvalidParameterException="InvalidParameterException",$.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",$.NotAuthorizedException="NotAuthorizedException",$.PasswordResetRequiredException="PasswordResetRequiredException",$.ResourceNotFoundException="ResourceNotFoundException",$.TooManyRequestsException="TooManyRequestsException",$.UserNotConfirmedException="UserNotConfirmedException",$.UserNotFoundException="UserNotFoundException",(Y=y||(y={})).ForbiddenException="ForbiddenException",Y.InternalErrorException="InternalErrorException",Y.InvalidParameterException="InvalidParameterException",Y.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",Y.NotAuthorizedException="NotAuthorizedException",Y.PasswordResetRequiredException="PasswordResetRequiredException",Y.ResourceNotFoundException="ResourceNotFoundException",Y.TooManyRequestsException="TooManyRequestsException",Y.UserNotConfirmedException="UserNotConfirmedException",Y.UserNotFoundException="UserNotFoundException",e.s(["InitiateAuthException",0,h,"SETUP_TOTP_EXCEPTION",0,"SetUpTOTPException","SignUpException",0,I])},309488,779613,e=>{"use strict";var t,n,o,i,r,s;(i=t||(t={})).EmptySignInUsername="EmptySignInUsername",i.EmptySignInPassword="EmptySignInPassword",i.CustomAuthSignInPassword="CustomAuthSignInPassword",i.EmptySignUpUsername="EmptySignUpUsername",i.EmptySignUpPassword="EmptySignUpPassword",i.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",i.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",i.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",i.EmptyChallengeResponse="EmptyChallengeResponse",i.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",i.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",i.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",i.EmptyResetPasswordUsername="EmptyResetPasswordUsername",i.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",i.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",i.IncorrectMFAMethod="IncorrectMFAMethod",i.EmptyUpdatePassword="EmptyUpdatePassword",i.InvalidPreferredChallenge="InvalidPreferredChallenge",e.s(["AuthValidationErrorCode",0,t],779613);let a={[t.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[t.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[t.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[t.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[t.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[t.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[t.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[t.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[t.EmptySignInPassword]:{message:"password is required to signIn"},[t.EmptySignInUsername]:{message:"username is required to signIn"},[t.EmptySignUpPassword]:{message:"password is required to signUp"},[t.EmptySignUpUsername]:{message:"username is required to signUp"},[t.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[t.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[t.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[t.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[t.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[t.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};(r=n||(n={}
1)).DEFAULT_MSG="Authentication Error",r.EMPTY_EMAIL="Email cannot be empty",r.EMPTY_PHONE="Phone number cannot be empty",r.EMPTY_USERNAME="Username cannot be empty",r.INVALID_USERNAME="The username should either be a string or one of the sign in types",r.EMPTY_PASSWORD="Password cannot be empty",r.EMPTY_CODE="Confirmation code cannot be empty",r.SIGN_UP_ERROR="Error creating account",r.NO_MFA="No valid MFA method provided",r.INVALID_MFA="Invalid MFA type",r.EMPTY_CHALLENGE="Challenge response cannot be empty",r.NO_USER_SESSION="Failed to get the session because the user is empty",r.NETWORK_ERROR="Network Error",r.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",r.AUTOSIGNIN_ERROR="Please use your credentials to sign in",r.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings",(s=o||(o={})).SignInException="SignInException",s.OAuthSignInError="OAuthSignInException",e.s(["AuthErrorCodes",0,o,"AuthErrorStrings",0,n,"validationErrorMap",0,a],309488)},589914,e=>{"use strict";var t=e.i(309488),n=e.i(44440);e.s(["assertValidationError",0,function(e,o){let{message:i,recoverySuggestion:r}=t.validationErrorMap[o];if(!e)throw new n.AuthError({name:o,message:i,recoverySuggestion:r})}])},763408,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(12547);let i=async e=>{var t;let i=e.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(i);let r=await e.Auth.getTokens({forceRefresh:!1});(0,o.assertAuthTokens)(r);let{"cognito:username":s,sub:a}=r.idToken?.payload??{},c={username:s,userId:a},l=(t=r,t?.signInDetails);return l&&(c.signInDetails=l),c},r=async()=>i(t.Amplify);e.s(["getCurrentUser",0,r],763408)},110375,877236,537729,354087,e=>{"use strict";var t=e.i(207348),n=e.i(38025),o=e.i(39615),i=e.i(121089),r=e.i(175585);e.s(["createInitiateAuthClient",0,e=>(0,t.composeServiceApi)(i.cognitoUserPoolTransferHandler,(0,n.createUserPoolSerializer)("InitiateAuth"),(0,o.createUserPoolDeserializer)(),{...r.DEFAULT_SERVICE_CLIENT_API_CONFIG,...e})],110375),e.s(["createRespondToAuthChallengeClient",0,e=>(0,t.composeServiceApi)(i.cognitoUserPoolTransferHandler,(0,n.createUserPoolSerializer)("RespondToAuthChallenge"),(0,o.createUserPoolDeserializer)(),{...r.DEFAULT_SERVICE_CLIENT_API_CONFIG,...e})],877236),e.s(["createVerifySoftwareTokenClient",0,e=>(0,t.composeServiceApi)(i.cognitoUserPoolTransferHandler,(0,n.createUserPoolSerializer)("VerifySoftwareToken"),(0,o.createUserPoolDeserializer)(),{...r.DEFAULT_SERVICE_CLIENT_API_CONFIG,...e})],537729),e.s(["createAssociateSoftwareTokenClient",0,e=>(0,t.composeServiceApi)(i.cognitoUserPoolTransferHandler,(0,n.createUserPoolSerializer)("AssociateSoftwareToken"),(0,o.createUserPoolDeserializer)(),{...r.DEFAULT_SERVICE_CLIENT_API_CONFIG,...e})],354087)},587972,e=>{"use strict";var t=e.i(578475),n=e.i(969993),o=e.i(383124);async function i(e){if(e.AccessToken){let n,i,r,s=(0,t.decodeJWT)(e.AccessToken),a=1e3*(s.payload.iat||0),c=new Date().getTime();e.RefreshToken&&(i=e.RefreshToken),e.IdToken&&(n=(0,t.decodeJWT)(e.IdToken)),e?.NewDeviceMetadata&&(r=e.NewDeviceMetadata);let l={accessToken:s,idToken:n,refreshToken:i,clockDrift:a>0?a-c:0,deviceMetadata:r,username:e.username};e?.signInDetails&&(l.signInDetails=e.signInDetails),await o.tokenOrchestrator.setTokens({tokens:l})}else throw new n.AmplifyError({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}e.s(["cacheCognitoTokens",0,i])},451343,e=>{"use strict";var t=e.i(971094),n=e.i(763408),o=e.i(601924),i=e.i(44440);let r=async()=>{try{t.Hub.dispatch("auth",{event:"signedIn",data:await (0,n.getCurrentUser)()},"Auth",t.AMPLIFY_SYMBOL)}catch(e){if(e.name===o.USER_UNAUTHENTICATED_EXCEPTION)throw new i.AuthError({name:o.UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION,message:"Unable to get user session following successful sign-in.",recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."});throw e}};e.s(["dispatchSignedInHubEvent",0,r])},205457,258931,574942,721367,186372,258791,89968,420093,963845,876085,
1142482,e=>{"use strict";let t,n,o;var i,r,s=e.i(674860),a=e.i(313157),c=e.i(578475),l=e.i(176518),d=e.i(44440),E=e.i(800536),p=e.i(309488),u=e.i(779613),g=e.i(589914),h=e.i(601924),m=e.i(763408),S=e.i(604528),A=e.i(110375),I=e.i(877236),x=e.i(537729),C=e.i(354087),R=e.i(26399),P=e.i(170095),y=e.i(587972),f=e.i(451343),v=e.i(948085),T=e.i(862410),U=e.i(969993);let N="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class w extends U.AmplifyError{constructor(e){super(e),this.constructor=w,Object.setPrototypeOf(this,w.prototype)}}(i=r||(r={})).PasskeyNotSupported="PasskeyNotSupported",i.PasskeyAlreadyExists="PasskeyAlreadyExists",i.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",i.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",i.RelyingPartyMismatch="RelyingPartyMismatch",i.PasskeyRegistrationFailed="PasskeyRegistrationFailed",i.PasskeyRetrievalFailed="PasskeyRetrievalFailed",i.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",i.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",i.PasskeyOperationAborted="PasskeyOperationAborted";let F="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",_="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",M={[r.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:N},[r.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:_},[r.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:_},[r.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:N},[r.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[r.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[r.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:F},[r.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:F},[r.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:F},[r.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},D=(0,T.createAssertionFunction)(M,w);e.s(["PasskeyError",0,w,"PasskeyErrorCode",0,r,"assertPasskeyError",0,D,"passkeyErrorMap",0,M],258931);var O=e.i(459785);let b=e=>{if(e instanceof Error){if("AbortError"===e.name){let{message:t,recoverySuggestion:n}=M[r.PasskeyOperationAborted];return new w({name:r.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if("SecurityError"===e.name){let{message:t,recoverySuggestion:n}=M[r.RelyingPartyMismatch];return new w({name:r.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new w({name:O.AmplifyErrorCode.Unknown,message:"An unknown error has occurred.",underlyingError:e})};e.s(["handlePasskeyError",0,b],574942);var L=e.i(20367);let V=()=>(0,L.isBrowser)()&&window.isSecureContext&&"credentials"in navigator&&"function"==typeof window.PublicKeyCredential;e.s(["getIsPasskeySupported",0,V],721367);var k=e.i(595427);let q=e=>k.base64Encoder.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0});var H=e.i(874883);let B=e=>Uint8Array.from(H.base64Decoder.convert(e,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,W=e=>{let t=B(e.challenge),n=(e.allowCredentials||[]).map(e=>({...e,id:B(e.id)}));return{...e,challenge:t,allowCredentials:n}},z=e=>{let t={clientDataJSON:q(e.response.clientDataJSON),authenticatorData:q(e.response.authenticatorData),signature:q(e.response.signature)};e.response.userHandle&&(t.userHandle=q(e.response.userHandle));let n={id:e.id,rawId:q(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n};function G(e){D(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,r.PasskeyRetrievalFailed)}e.s(["deserializeJsonToPkcCreationOptions",0,e=>{let t=B(e.user.id),n=B(e.challenge),o=(e.excludeCredentials||[]).map(e=>({...e,id:B(e.id)}
1));return{...e,excludeCredentials:o,challenge:n,user:{...e.user,id:t}}},"deserializeJsonToPkcGetOptions",0,W,"serializePkcWithAssertionToJson",0,z,"serializePkcWithAttestationToJson",0,e=>{let t={clientDataJSON:q(e.response.clientDataJSON),attestationObject:q(e.response.attestationObject),transports:e.response.getTransports(),publicKeyAlgorithm:e.response.getPublicKeyAlgorithm(),authenticatorData:q(e.response.getAuthenticatorData())},n=e.response.getPublicKey();n&&(t.publicKey=q(n));let o={type:e.type,id:e.id,rawId:q(e.rawId),clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(o.authenticatorAttachment=e.authenticatorAttachment),o}],186372),e.s(["assertCredentialIsPkcWithAuthenticatorAssertionResponse",0,G,"assertCredentialIsPkcWithAuthenticatorAttestationResponse",0,function(e){D(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAttestationResponse,r.PasskeyRegistrationFailed)}],258791);let K=async e=>{try{let t=V();D(t,r.PasskeyNotSupported);let n=W(e),o=await navigator.credentials.get({publicKey:n});return G(o),z(o)}catch(e){throw(e=>{if(e instanceof w)return e;if(e instanceof Error&&"NotAllowedError"===e.name){let{message:t,recoverySuggestion:n}=M[r.PasskeyAuthenticationCanceled];return new w({name:r.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return b(e)})(e)}},$=async()=>{let{userAgentData:e}=navigator;if(!e)return navigator.userAgent;let{platform:t="",platformVersion:n="",model:o="",architecture:i="",fullVersionList:r=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]);return[t,n,i,o,t,r.map(e=>`${e.brand}/${e.version}`).join(";")].filter(e=>e).join(" ")||navigator.userAgent};var Y=e.i(207348),J=e.i(121089),j=e.i(38025),Z=e.i(39615),X=e.i(175585);let Q={convert:e=>new TextEncoder().encode(e)};function ee(e,t){null!=e&&this.fromString(e,t)}function et(){return new ee(null,null)}let en="u">typeof navigator;en&&"Microsoft Internet Explorer"===navigator.appName?(ee.prototype.am=function(e,t,n,o,i,r){let s=32767&t,a=t>>15;for(;--r>=0;){let t=32767&this[e],r=this[e++]>>15,c=a*t+r*s;i=((t=s*t+((32767&c)<<15)+n[o]+(0x3fffffff&i))>>>30)+(c>>>15)+a*r+(i>>>30),n[o++]=0x3fffffff&t}return i},t=30):en&&"Netscape"!==navigator.appName?(ee.prototype.am=function(e,t,n,o,i,r){for(;--r>=0;){let r=t*this[e++]+n[o]+i;i=Math.floor(r/0x4000000),n[o++]=0x3ffffff&r}return i},t=26):(ee.prototype.am=function(e,t,n,o,i,r){let s=16383&t,a=t>>14;for(;--r>=0;){let t=16383&this[e],r=this[e++]>>14,c=a*t+r*s;i=((t=s*t+((16383&c)<<14)+n[o]+i)>>28)+(c>>14)+a*r,n[o++]=0xfffffff&t}return i},t=28),ee.prototype.DB=t,ee.prototype.DM=(1<<t)-1,ee.prototype.DV=1<<t,ee.prototype.FV=0x10000000000000,ee.prototype.F1=52-t,ee.prototype.F2=2*t-52;let eo=[];for(o=0,n=48;o<=9;++o)eo[n++]=o;for(o=10,n=97;o<36;++o)eo[n++]=o;for(o=10,n=65;o<36;++o)eo[n++]=o;function ei(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function er(e){let t=et();return t.fromInt(e),t}function es(e){let t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function ea(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}ea.prototype.convert=function(e){let t=et();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ee.ZERO)>0&&this.m.subTo(t,t),t},ea.prototype.revert=function(e){let t=et();return e.copyTo(t),this.reduce(t),t},ea.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=32767&e[t],o=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,o,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},ea.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},ea.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},ee.prototype.copyTo=function(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},ee.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},ee.prototype.fromString=function(e,t){let n;if(16===t)n=4;else if(8===t)n=3;else if(2===t)n=1;else if(32===t)n=5;else if(4===t)n=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let o=e.length,i=!1,r=0;for(;--o>=0;){let t=function(e,t){let n=eo[e.charCodeAt(t)];return null==n?-1:n}(e,o);if(t<0){"-"===e.charAt(o)&&(i=!0);continue}i=!1,0===r?this[this.t++]=t:r+n>this.DB?(this[this.t-1]|=(t&(1<<this.DB-r)-1)<<r,this[this.t++]=t>>this.DB-r):this[this.t-1]|=t<<r,(r+=n)>=this.DB&&(r-=this.DB)}this.clamp(),i&&ee.ZERO.subTo(this,this)},ee.prototype.clamp=function(){let e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t},ee.prototype.dlShiftTo=function(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},ee.prototype.drShiftTo=function(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},ee.prototype.lShiftTo=function(e,t){let n,o=e%this.DB,i=this.DB-o,r=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<o&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&r)<<o;for(n=s-1;n>=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},ee.prototype.rShiftTo=function(e,t){t.s=this.s;let n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}let o=e%this.DB,i=this.DB-o,r=(1<<o)-1;t[0]=this[n]>>o;for(let e=n+1;e<this.t;++e)t[e-n-1]|=(this[e]&r)<<i,t[e-n]=this[e]>>o;o>0&&(t[this.t-n-1]|=(this.s&r)<<i),t.t=this.t-n,t.clamp()},ee.prototype.subTo=function(e,t){let n=0,o=0,i=Math.min(e.t,this.t);for(;n<i;)o+=this[n]-e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o-=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o-=e[n],t[n++]=o&this.DM,o>>=this.DB;o-=e.s}t.s=o<0?-1:0,o<-1?t[n++]=this.DV+o:o>0&&(t[n++]=o),t.t=n,t.clamp()},ee.prototype.multiplyTo=function(e,t){let n=this.abs(),o=e.abs(),i=n.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+n.t]=n.am(0,o[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&ee.ZERO.subTo(t,t)},ee.prototype.squareTo=function(e){let t=this.abs(),n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){let o=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,o,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},ee.prototype.divRemTo=function(e,t,n){let o=e.abs();if(o.t<=0)return;let i=this.abs();if(i.t<o.t){null!=t&&t.fromInt(0),null!=n&&this.copyTo(n);return}null===n&&(n=et());let r=et(),s=this.s,a=e.s,c=this.DB-es(o[o.t-1]);c>0?(o.lShiftTo(c,r),i.lShiftTo(c,n)):(o.copyTo(r),i.copyTo(n));let l=r.t,d=r[l-1];if(0===d)return;let E=d*(1<<this.F1)+(l>1?r[l-2]>>this.F2:0),p=this.FV/E,u=(1<<this.F1)/E,g=1<<this.F2,h=n.t,m=h-l,S=null===t?et():t;
1for(r.dlShiftTo(m,S),n.compareTo(S)>=0&&(n[n.t++]=1,n.subTo(S,n)),ee.ONE.dlShiftTo(l,S),S.subTo(r,r);r.t<l;)r[r.t++]=0;for(;--m>=0;){let e=n[--h]===d?this.DM:Math.floor(n[h]*p+(n[h-1]+g)*u);if((n[h]+=r.am(0,e,n,m,0,l))<e)for(r.dlShiftTo(m,S),n.subTo(S,n);n[h]<--e;)n.subTo(S,n)}null!==t&&(n.drShiftTo(l,t),s!==a&&ee.ZERO.subTo(t,t)),n.t=l,n.clamp(),c>0&&n.rShiftTo(c,n),s<0&&ee.ZERO.subTo(n,n)},ee.prototype.invDigit=function(){if(this.t<1)return 0;let e=this[0];if((1&e)==0)return 0;let t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},ee.prototype.addTo=function(e,t){let n=0,o=0,i=Math.min(e.t,this.t);for(;n<i;)o+=this[n]+e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o+=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o+=e[n],t[n++]=o&this.DM,o>>=this.DB;o+=e.s}t.s=o<0?-1:0,o>0?t[n++]=o:o<-1&&(t[n++]=this.DV+o),t.t=n,t.clamp()},ee.prototype.toString=function(e){let t,n;if(this.s<0)return"-"+this.negate().toString(e);if(16==e)t=4;else if(8===e)t=3;else if(2===e)t=1;else if(32===e)t=5;else if(4===e)t=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");let o=(1<<t)-1,i=!1,r="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,r=ei(n));s>=0;)a<t?n=(this[s]&(1<<a)-1)<<t-a|this[--s]>>(a+=this.DB-t):(n=this[s]>>(a-=t)&o,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(r+=ei(n));return i?r:"0"},ee.prototype.negate=function(){let e=et();return ee.ZERO.subTo(this,e),e},ee.prototype.abs=function(){return this.s<0?this.negate():this},ee.prototype.compareTo=function(e){let t=this.s-e.s;if(0!=t)return t;let n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},ee.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+es(this[this.t-1]^this.s&this.DM)},ee.prototype.mod=function(e){let t=et();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(ee.ZERO)>0&&e.subTo(t,t),t},ee.prototype.equals=function(e){return 0===this.compareTo(e)},ee.prototype.add=function(e){let t=et();return this.addTo(e,t),t},ee.prototype.subtract=function(e){let t=et();return this.subTo(e,t),t},ee.prototype.multiply=function(e){let t=et();return this.multiplyTo(e,t),t},ee.prototype.divide=function(e){let t=et();return this.divRemTo(e,t,null),t},ee.prototype.modPow=function(e,t,n){let o,i,r,s=e.bitLength(),a=er(1),c=new ea(t);if(s<=0)return a;let l=[],d=3,E=(o=s<18?1:s<48?3:s<144?4:s<768?5:6)-1,p=(1<<o)-1;if(l[1]=c.convert(this),o>1){let e=et();for(c.sqrTo(l[1],e);d<=p;)l[d]=et(),c.mulTo(e,l[d-2],l[d]),d+=2}let u=e.t-1,g=!0,h=et();for(s=es(e[u])-1;u>=0;){for(s>=E?i=e[u]>>s-E&p:(i=(e[u]&(1<<s+1)-1)<<E-s,u>0&&(i|=e[u-1]>>this.DB+s-E)),d=o;(1&i)==0;)i>>=1,--d;if((s-=d)<0&&(s+=this.DB,--u),g)l[i].copyTo(a),g=!1;else{for(;d>1;)c.sqrTo(a,h),c.sqrTo(h,a),d-=2;d>0?c.sqrTo(a,h):(r=a,a=h,h=r),c.mulTo(h,l[i],a)}for(;u>=0&&(e[u]&1<<s)==0;)c.sqrTo(a,h),r=a,a=h,h=r,--s<0&&(s=this.DB-1,--u)}let m=c.revert(a);return n(null,m),m},ee.ZERO=er(0),ee.ONE=er(1);let ec=async({a:e,g:t,k:n,x:o,B:i,N:r,U:s})=>new Promise((a,c)=>{t.modPow(o,r,(t,l)=>{t?c(t):i.subtract(n.multiply(l)).modPow(e.add(s.multiply(o)),r,(e,t)=>{e?c(e):a(t.mod(r))})})}),el={},ed={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),el[e]=t,ed[t]=e}let eE=e=>{if(e.length%2!=0)throw Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){let o=e.slice(n,n+2).toLowerCase();if(o in ed)t[n/2]=ed[o];else throw Error(`Cannot decode unrecognized sequence ${o} as hexadecimal`)}return t};e.i(562008);var ep=e.i(417128);let eu=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=el[e[n]];return t},eg=e=>{let t=new ep.Sha256;t.update(e);let n=eu(t.digestSync());return Array(64-n.length).join("0")+n},eh=/^[89a-f]/i,em=e=>{if(!(e instanceof ee))throw Error("Not a BigInteger");let t=0>e.compareTo(ee.ZERO),n=e.abs().toString(16);return n=n.length%2!=0?`0${n}`:n,n=eh.test(n)?`00${n}`:n,t&&(n=new ee(n.split("").map(e=>{let t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join(""),16).add(ee.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2)),n};var eS=e.i(178428);class eA{constructor(e,t){this.words=[];let n=e;n=this.words=n||[],void 0!==t?this.sigBytes=t:this.sigBytes=4*n.length}random(e){let t=[];for(let n=0;n<e;n+=4)t.push((0,eS.getCrypto)().getRandomValues(new Uint32Array(1))[0]);return new eA(t,e)}toString(){return function(e){let{words:t}=e,{sigBytes:n}=e,o=[];for(let e=0;e<n;e++){let n=t[e>>>2]>>>24-e%4*8&255;o.push((n>>>4).toString(16)),o.push((15&n).toString(16))}return o.join("")}(this)}}let eI=e=>eE(new eA().random(e).toString());
1class ex{constructor({userPoolName:e,a:t,g:n,A:o,N:i}){this.encoder=Q,this.userPoolName=e,this.a=t,this.g=n,this.A=o,this.N=i,this.k=new ee((e=>eg(eE(e)))(`${em(i)}${em(n)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new d.AuthError({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new d.AuthError({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new d.AuthError({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,t){this.randomPassword=k.base64Encoder.convert(eI(40));let n=eg(`${e}${t}:${this.randomPassword}`),o=eu(eI(16));return this.saltToHashDevices=em(new ee(o,16)),new Promise((e,t)=>{this.g.modPow(new ee(eg(eE(this.saltToHashDevices+n)),16),this.N,(n,o)=>{n?t(n):(this.verifierDevices=em(o),e())})})}async getPasswordAuthenticationKey({username:e,password:t,serverBValue:n,salt:o}){var i,r;let s,a,c;if(n.mod(this.N).equals(ee.ZERO))throw Error("B cannot be zero.");let l=(({A:e,B:t})=>{let n=new ee(eg(eE(em(e)+em(t))),16);if(n.equals(ee.ZERO))throw Error("U cannot be zero.");return n})({A:this.A,B:n}),d=eg(`${this.userPoolName}${e}:${t}`),E=new ee(eg(eE(em(o)+d)),16),p=await ec({a:this.a,g:this.g,k:this.k,x:E,B:n,N:this.N,U:l}),u=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert("\x01"),h=new Uint8Array(u.byteLength+g.byteLength);return h.set(u,0),h.set(g,u.byteLength),i=eE(em(p)),r=eE(em(l)),(s=new ep.Sha256(r)).update(i),a=s.digestSync(),(c=new ep.Sha256(a)).update(h),c.digestSync().slice(0,16)}}let eC=async({a:e,g:t,N:n})=>new Promise((o,i)=>{t.modPow(e,n,(e,t)=>{e?i(e):t.mod(n).equals(ee.ZERO)?i(Error("Illegal parameter. A mod N cannot be 0.")):o(t)})}),eR=async e=>{let t=new ee("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),n=new ee("2",16),o=eP(),i=await eC({a:o,g:n,N:t});return new ex({userPoolName:e,a:o,g:n,A:i,N:t})},eP=()=>new ee(eu(eI(128)),16);async function ey({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:o}){if(!n)return;let i=e.split("_")[1]||"",r=await eR(i),s=n?.DeviceKey,a=n?.DeviceGroupKey;try{await r.generateHashDevice(a??"",s??"")}catch(e){return}let c={Salt:k.base64Encoder.convert(eE(r.getSaltToHashDevices())),PasswordVerifier:k.base64Encoder.convert(eE(r.getVerifierDevices()))},l=r.getRandomPassword();try{let i,r=(i={endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:t})},(0,Y.composeServiceApi)(J.cognitoUserPoolTransferHandler,(0,j.createUserPoolSerializer)("ConfirmDevice"),(0,Z.createUserPoolDeserializer)(),{...X.DEFAULT_SERVICE_CLIENT_API_CONFIG,...i}));return await r({region:(0,P.getRegionFromUserPoolId)(e)},{AccessToken:o,DeviceName:await $(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:s,deviceGroupKey:a,randomPassword:l}}catch(e){return}}async function ef(e){let t=s.Amplify.getConfig().Auth?.Cognito;(0,c.assertTokenProviderConfig)(t);let{username:n,signInSession:o,signInDetails:i,challengeName:l}=v.signInStore.getState();if("WEB_AUTHN"!==l||!n)throw new d.AuthError({name:p.AuthErrorCodes.SignInException,message:"Unable to proceed due to invalid sign in state."});let{CREDENTIAL_REQUEST_OPTIONS:E}=e;D(!!E,r.InvalidPasskeyAuthenticationOptions);let u=await K(JSON.parse(E)),g=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:h,ChallengeParameters:m,AuthenticationResult:A,Session:x}=await g({region:(0,P.getRegionFromUserPoolId)(t.userPoolId),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:t.userPoolClientId,Session:o});if((0,v.setActiveSignInState)({signInSession:x,username:n,challengeName:h,sign
1InDetails:i}),A)return await (0,y.cacheCognitoTokens)({...A,username:n,NewDeviceMetadata:await ey({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:A.NewDeviceMetadata,accessToken:A.AccessToken}),signInDetails:i}),v.signInStore.dispatch({type:"RESET_STATE"}),await (0,f.dispatchSignedInHubEvent)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if("WEB_AUTHN"===h)throw new d.AuthError({name:p.AuthErrorCodes.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:h,challengeParameters:m}}function ev({username:e,userPoolId:t,userPoolClientId:n}){if("u"<typeof window)return;let o=window.AmazonCognitoAdvancedSecurityData;if(void 0===o)return;let i=o.getData(e,t,n);return i?{EncodedData:i}:{}}e.s(["getNewDeviceMetadata",0,ey],89968),e.s(["getUserContextData",0,ev],420093);let eT=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],eU=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],eN=()=>{let e=new Date,t=eU[e.getUTCDay()],n=eT[e.getUTCMonth()],o=e.getUTCDate(),i=e.getUTCHours();i<10&&(i=`0${i}`);let r=e.getUTCMinutes();r<10&&(r=`0${r}`);let s=e.getUTCSeconds();s<10&&(s=`0${s}`);let a=e.getUTCFullYear();return`${t} ${n} ${o} ${i}:${r}:${s} UTC ${a}`},ew=({userPoolName:e,username:t,challengeParameters:n,dateNow:o,hkdf:i})=>{let r=Q.convert(e),s=Q.convert(t),a=eF(n.SECRET_BLOCK),c=Q.convert(o),l=new Uint8Array(r.byteLength+s.byteLength+a.byteLength+c.byteLength);l.set(r,0),l.set(s,r.byteLength),l.set(a,r.byteLength+s.byteLength),l.set(c,r.byteLength+s.byteLength+a.byteLength);let d=new ep.Sha256(i);d.update(l);let E=d.digestSync();return k.base64Encoder.convert(E)},eF=e=>{let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=H.base64Decoder.convert(n),i=new Uint8Array(o.length);for(let e=0;e<o.length;++e)i[e]=o.charCodeAt(e);return i};var e_=e.i(12547);async function eM({username:e,config:t,clientMetadata:n,session:o,tokenOrchestrator:i}){let{userPoolId:r,userPoolEndpoint:s}=t,a=t.userPoolClientId,c=await i?.getDeviceMetadata(e);(0,e_.assertDeviceMetadata)(c);let l=await eR(c.deviceGroupKey),d={USERNAME:e,SRP_A:l.A.toString(16),DEVICE_KEY:c.deviceKey},E=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:s})}),{ChallengeParameters:p,Session:u}=await E({region:(0,P.getRegionFromUserPoolId)(r)},{ChallengeName:"DEVICE_SRP_AUTH",ClientId:a,ChallengeResponses:d,ClientMetadata:n,Session:o});return eD(e,p,n,u,l,t,i)}async function eD(e,t,n,o,i,{userPoolId:r,userPoolClientId:s,userPoolEndpoint:a},c){let l=await c?.getDeviceMetadata(e);(0,e_.assertDeviceMetadata)(l);let d=new ee(t?.SRP_B,16),E=new ee(t?.SALT,16),{deviceKey:p}=l,{deviceGroupKey:u}=l,g=await i.getPasswordAuthenticationKey({username:l.deviceKey,password:l.randomPassword,serverBValue:d,salt:E}),h=eN(),m={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:h,PASSWORD_CLAIM_SIGNATURE:ew({username:p,userPoolName:u,challengeParameters:t,dateNow:h,hkdf:g}),DEVICE_KEY:p},S=ev({username:e,userPoolId:r,userPoolClientId:s});return(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:a})})({region:(0,P.getRegionFromUserPoolId)(r)},{ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:s,ChallengeResponses:m,Session:o,ClientMetadata:n,UserContextData:S})}async function eO(e,t,n,o,i,r,s){let{userPoolId:a,userPoolClientId:c,userPoolEndpoint:l}=r,E=a?.split("_")[1]||"",p=new ee(t?.SRP_B,16),u=new ee(t?.SALT,16),g=t?.USER_ID_FOR_SRP;if(!g)throw new d.AuthError({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});let h=await i.getPasswordAuthenticationKey({username:g,password:e,serverBValue:p,salt:u}),m=eN(),S={USERNAME:g,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:m,PASSWORD_CLAIM_SIGNATURE:ew({username:g,userPoolName:E,challengeParameters:t,dateNow:m,hkdf:h})},A=await s.getDeviceMetadata(g);A&&A.deviceKey&&(S.DEVICE_KEY=A.deviceKey);let x=ev({username:g,userPoolId:a,userPoolClientId:c}),C=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})}),y=await C({region:(0,P.getRegionFromUserPoolId)(a)},{ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:S,ClientMetadata:n,Session:o,ClientId:c,UserContextData:x});return"DEVICE_SRP_AUTH"===y.ChallengeName?eM({username:g,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function eb(e,t,n,o){try{return await e(...t)}catch(i){if(i instanceof d.AuthError&&"ResourceNotFoundException"===i.name&&i.message.includes("Device does not exist."))return await o.clearDeviceMetadata(n),e(...t);throw i}}function eL(e){let{dispatch:t}=v.signInStore;t({type:"SET_USERNAME",value:e})}async function eV({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:i,authFlow:r,preferredChallenge:s}){let{userPoolId:c,userPoolClientId:l,userPoolEndpoint:d}=o,E=c?.split("_")[1]||"",p=await eR(E),u={USERNAME:e,SRP_A:p.A.toString(16)};"USER_AUTH"===r&&s&&(u.PREFERRED_CHALLENGE=s);let g=ev({username:e,userPoolId:c,userPoolClientId:l}),h=(0,A.createInitiateAuthClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:d})}),m=await h({region:(0,P.getRegionFromUserPoolId)(c),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.SignIn)}
1,{AuthFlow:r,AuthParameters:u,ClientMetadata:n,ClientId:l,UserContextData:g}),{ChallengeParameters:I,Session:x}=m,C=I?.USERNAME??e;return(eL(C),"PASSWORD_VERIFIER"===m.ChallengeName)?eb(eO,[t,I,n,x,p,o,i],C,i):m}async function ek({username:e,session:t,selectedChallenge:n,config:o,clientMetadata:i}){return(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:o.userPoolEndpoint})})({region:(0,P.getRegionFromUserPoolId)(o.userPoolId),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:e,ANSWER:n},ClientId:o.userPoolClientId,Session:t,ClientMetadata:i})}async function eq(e,t,n,o,i){let{userPoolId:r,userPoolClientId:s,userPoolEndpoint:c}=o,l=ev({username:e,userPoolId:r,userPoolClientId:s}),d=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:c})}),E=await d({region:(0,P.getRegionFromUserPoolId)(r),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},ClientId:s,ClientMetadata:n,Session:i,UserContextData:l});return eL(E.ChallengeParameters?.USERNAME??e),E}async function eH(e,t,n,o,i,r){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:l}=o,d=s.split("_")[1]||"",E=await eR(d),p={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:E.A.toString(16)},u=ev({username:e,userPoolId:s,userPoolClientId:c}),g=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})}),h=await g({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:p,ClientId:c,ClientMetadata:n,Session:i,UserContextData:u}),m=h.ChallengeParameters?.USERNAME??e;return(eL(m),"PASSWORD_VERIFIER"===h.ChallengeName)?eb(eO,[t,h.ChallengeParameters,n,h.Session,E,o,r],m,r):h}e.s(["retryOnResourceNotFoundException",0,eb],963845),e.s(["setActiveSignInUsername",0,eL],876085),e.s(["handlePasswordSRP",0,eV],142482);let eB="userAttributes.";async function eW({challengeResponse:e,clientMetadata:t,session:n,username:o,config:i,tokenOrchestrator:r}){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:l}=i,d={USERNAME:o,ANSWER:e},E=await r?.getDeviceMetadata(o);E&&E.deviceKey&&(d.DEVICE_KEY=E.deviceKey);let p=ev({username:o,userPoolId:s,userPoolClientId:c}),u=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})}),g=await u({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:d,Session:n,ClientMetadata:t,ClientId:c,UserContextData:p});return"DEVICE_SRP_AUTH"===g.ChallengeName?eM({username:o,config:i,clientMetadata:t,session:g.Session,tokenOrchestrator:r}):g}async function ez({challengeResponse:e,username:t,clientMetadata:n,session:o,deviceName:i,config:r}){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:l}=r;if("EMAIL"===e)return{ChallengeName:"MFA_SETUP",Session:o,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if("TOTP"===e)return{ChallengeName:"MFA_SETUP",Session:o,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};let E={USERNAME:t};if(/^\d+$/.test(e)){let t=(0,x.createVerifySoftwareTokenClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})}),{Session:r}=await t({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{UserCode:e,Session:o,FriendlyDeviceName:i});return v.signInStore.dispatch({type:"SET_SIGN_IN_SESSION",value:r}),(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})})({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"MFA_SETUP",ChallengeResponses:E,Session:r,ClientMetadata:n,ClientId:c})}if(e.includes("@"))return E.EMAIL=e,(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})})({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"MFA_SETUP",ChallengeResponses:E,Session:o,ClientMetadata:n,ClientId:c});throw new d.AuthError({name:p.AuthErrorCodes.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${e}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP co
1de as the challengeResponse.'})}async function eG({challengeResponse:e,username:t,clientMetadata:n,session:o,config:i}){var r;let s,{userPoolId:c,userPoolClientId:l,userPoolEndpoint:d}=i;(0,g.assertValidationError)("TOTP"===e||"SMS"===e||"EMAIL"===e,u.AuthValidationErrorCode.IncorrectMFAMethod);let E={USERNAME:t,ANSWER:(s="SMS_MFA","TOTP"===(r=e)&&(s="SOFTWARE_TOKEN_MFA"),"EMAIL"===r&&(s="EMAIL_OTP"),s)},p=ev({username:t,userPoolId:c,userPoolClientId:l});return(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:d})})({region:(0,P.getRegionFromUserPoolId)(c),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:E,Session:o,ClientMetadata:n,ClientId:l,UserContextData:p})}async function eK({challengeResponse:e,clientMetadata:t,session:n,username:o,requiredAttributes:i,config:r}){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:l}=r,d={...function(e){if(!e)return{};let t={};return Object.entries(e).forEach(([e,n])=>{n&&(t[`${eB}${e}`]=n)}),t}(i),NEW_PASSWORD:e,USERNAME:o},E=ev({username:o,userPoolId:s,userPoolClientId:c});return(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})})({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:d,ClientMetadata:t,Session:n,ClientId:c,UserContextData:E})}async function e$(e,t,n,o,i){let{userPoolClientId:r,userPoolId:s,userPoolEndpoint:c}=o,l={USERNAME:e,PASSWORD:t},d=await i.getDeviceMetadata(e);d&&d.deviceKey&&(l.DEVICE_KEY=d.deviceKey);let E=ev({username:e,userPoolId:s,userPoolClientId:r}),p=(0,A.createInitiateAuthClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:c})}),u=await p({region:(0,P.getRegionFromUserPoolId)(s),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.SignIn)},{AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:l,ClientMetadata:n,ClientId:r,UserContextData:E}),g=u.ChallengeParameters?.USERNAME??u.ChallengeParameters?.USER_ID_FOR_SRP??e;return(eL(g),"DEVICE_SRP_AUTH"===u.ChallengeName)?eM({username:g,config:o,clientMetadata:n,session:u.Session,tokenOrchestrator:i}):u}async function eY(e,t,n,o,i){return eV({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:i,authFlow:"USER_SRP_AUTH"})}async function eJ(e,t,n,o){let{userPoolClientId:i,userPoolId:r,userPoolEndpoint:s}=n,c={USERNAME:e},l=await o.getDeviceMetadata(e);l&&l.deviceKey&&(c.DEVICE_KEY=l.deviceKey);let d=ev({username:e,userPoolId:r,userPoolClientId:i}),E=(0,A.createInitiateAuthClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:s})}),p=await E({region:(0,P.getRegionFromUserPoolId)(r),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:i,UserContextData:d}),u=p.ChallengeParameters?.USERNAME??e;return(eL(u),"DEVICE_SRP_AUTH"===p.ChallengeName)?eM({username:u,config:n,clientMetadata:t,session:p.Session,tokenOrchestrator:o}):p}async function ej(e,t,n,o,i){(0,c.assertTokenProviderConfig)(o);let{userPoolId:r,userPoolClientId:s,userPoolEndpoint:l}=o,d=r?.split("_")[1]||"",E=await eR(d),p={USERNAME:e,SRP_A:E.A.toString(16),CHALLENGE_NAME:"SRP_A"},u=ev({username:e,userPoolId:r,userPoolClientId:s}),g=(0,A.createInitiateAuthClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:l})}),{ChallengeParameters:h,Session:m}=await g({region:(0,P.getRegionFromUserPoolId)(r),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:s,UserContextData:u}),I=h?.USERNAME??e;return eL(I),eb(eO,[t,h,n,m,E,o,i],I,i)}async function eZ(e){let{challengeName:t,challengeParameters:n,availableChallenges:o}=e,i=s.Amplify.getConfig().Auth?.Cognito;switch((0,c.assertTokenProviderConfig)(i),t){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{let{signInSession:e,username:t}=v.signInStore.getState(),o=e1(e8(n.MFAS_CAN_SETUP))||[],r=o.filter(e=>"EMAIL"===e||"TOTP"===e),s=r.includes("TOTP"),a=r.includes("EMAIL");if(s&&a)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:r}};if(a)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(s){let n=(0,C.createAssociateSoftwareTokenClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:i.userPoolEndpoint})}),{Session:o,SecretCode:r}=await n({region:(0,P.getRegionFromUserPoolId)(i.userPoolId)},{Session:e});return v.signInStore.dispatch({type:"SET_SIGN_IN_SESSION",value:o}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:eX(r,t)}}}throw new d.AuthError({name:p.AuthErrorCodes.SignInException,message:`Cannot initiate MFA setup from available types: ${o}`})}case"NEW_PASSWORD_REQUIRED":var r;return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:(r=n.requiredAttributes)?JSON.parse(r).map(e=>e.includes(eB)?e.replace(eB,""):e):[]}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:e1(e8(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{let e=await ef(n);if("isSignedIn"in e&&"nextStep"in e)return e;return eZ(e)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:o}}}throw new d.AuthError({name:p.AuthErrorCodes.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function eX(e,t){return{sharedSecret:e,getSetupUri:(n,o)=>{let i=`otpauth://totp/${n}:${o??t}?secret=${e}&issuer=${n}`;return new l.AmplifyUrl(i)}}}async function eQ(e,t,n,o,i,r,s,a){let c=a?.userAttributes,l=a?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":if("PASSWORD_SRP"===o||"PASSWORD"===o)return{ChallengeName:o,Session:n,$metadata:{}};
1return ek({username:e,session:n,selectedChallenge:o,config:i,clientMetadata:s});case"SELECT_MFA_TYPE":return eG({challengeResponse:o,clientMetadata:s,session:n,username:e,config:i});case"MFA_SETUP":return ez({challengeResponse:o,clientMetadata:s,session:n,username:e,deviceName:l,config:i});case"NEW_PASSWORD_REQUIRED":return eK({challengeResponse:o,clientMetadata:s,session:n,username:e,requiredAttributes:c,config:i});case"CUSTOM_CHALLENGE":return eb(eW,[{challengeResponse:o,clientMetadata:s,session:n,username:e,config:i,tokenOrchestrator:r}],e,r);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return e4({challengeName:t,challengeResponse:o,clientMetadata:s,session:n,username:e,config:i,tokenOrchestrator:r});case"PASSWORD":return eq(e,o,s,i,n);case"PASSWORD_SRP":return eH(e,o,s,i,n,r)}throw new d.AuthError({name:p.AuthErrorCodes.SignInException,message:`An error occurred during the sign in process.
2		${t} challengeName returned by the underlying service was not addressed.`})}function e0(e){return"SMS_MFA"===e?"SMS":"SOFTWARE_TOKEN_MFA"===e?"TOTP":"EMAIL_OTP"===e?"EMAIL":void 0}function e1(e){if(e)return e.map(e0).filter(Boolean)}function e8(e){return e?JSON.parse(e):[]}async function e5(){let e;try{e=await (0,m.getCurrentUser)()}catch(e){}if(e&&e.userId&&e.username)throw new d.AuthError({name:h.USER_ALREADY_AUTHENTICATED_EXCEPTION,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}async function e4({challengeName:e,challengeResponse:t,clientMetadata:n,session:o,username:i,config:r,tokenOrchestrator:s}){let{userPoolId:c,userPoolClientId:l,userPoolEndpoint:d}=r,E={USERNAME:i};"EMAIL_OTP"===e&&(E.EMAIL_OTP_CODE=t),"SMS_MFA"===e&&(E.SMS_MFA_CODE=t),"SMS_OTP"===e&&(E.SMS_OTP_CODE=t),"SOFTWARE_TOKEN_MFA"===e&&(E.SOFTWARE_TOKEN_MFA_CODE=t);let p=await s?.getDeviceMetadata(i);p&&p.deviceKey&&(E.DEVICE_KEY=p.deviceKey);let u=ev({username:i,userPoolId:c,userPoolClientId:l}),g=(0,I.createRespondToAuthChallengeClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:d})}),h=await g({region:(0,P.getRegionFromUserPoolId)(c),userAgentValue:(0,S.getAuthUserAgentValue)(a.AuthAction.ConfirmSignIn)},{ChallengeName:e,ChallengeResponses:E,Session:o,ClientMetadata:n,ClientId:l,UserContextData:u});return"DEVICE_SRP_AUTH"===h.ChallengeName?eM({username:i,config:r,clientMetadata:n,session:h.Session,tokenOrchestrator:s}):h}e.s(["assertUserNotAuthenticated",0,e5,"getActiveSignInUsername",0,function(e){return v.signInStore.getState().username??e},"getMFAType",0,e0,"getMFATypes",0,e1,"getSignInResult",0,eZ,"getSignInResultFromError",0,function(e){return e===E.InitiateAuthException.PasswordResetRequiredException?{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}}:e===E.InitiateAuthException.UserNotConfirmedException?{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}:void 0},"getTOTPSetupDetails",0,eX,"handleChallengeName",0,eQ,"handleCustomAuthFlowWithoutSRP",0,eJ,"handleCustomSRPAuthFlow",0,ej,"handleUserPasswordAuthFlow",0,e$,"handleUserSRPAuthFlow",0,eY],205457)},472740,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(948085),i=e.i(44440),r=e.i(205457),s=e.i(688236),a=e.i(589914),c=e.i(779613),l=e.i(309488),d=e.i(587972),E=e.i(383124),p=e.i(451343),u=e.i(89968);async function g(e){let{challengeResponse:g,options:h}=e,{username:m,challengeName:S,signInSession:A,signInDetails:I}=o.signInStore.getState(),x=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(x);let C=h?.clientMetadata;if((0,a.assertValidationError)(!!g,c.AuthValidationErrorCode.EmptyChallengeResponse),!m||!S||!A)throw new i.AuthError({name:l.AuthErrorCodes.SignInException,message:`
3			An error occurred during the sign in process.
4
5			This most likely occurred due to:
6			1. signIn was not called before confirmSignIn.
7			2. signIn threw an exception.
8			3. page was refreshed during the sign in flow and session has expired.
9			`,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{let{Session:e,ChallengeName:t,AuthenticationResult:n,ChallengeParameters:i}=await (0,r.handleChallengeName)(m,S,A,g,x,E.tokenOrchestrator,C,h);if((0,o.setActiveSignInState)({signInSession:e,username:m,challengeName:t,signInDetail
9s:I}),n)return await (0,d.cacheCognitoTokens)({username:m,...n,NewDeviceMetadata:await (0,u.getNewDeviceMetadata)({userPoolId:x.userPoolId,userPoolEndpoint:x.userPoolEndpoint,newDeviceMetadata:n.NewDeviceMetadata,accessToken:n.AccessToken}),signInDetails:I}),(0,o.resetActiveSignInState)(),await (0,p.dispatchSignedInHubEvent)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,r.getSignInResult)({challengeName:t,challengeParameters:i})}catch(t){(0,s.assertServiceError)(t);let e=(0,r.getSignInResultFromError)(t.name);if(e)return e;throw t}}e.s(["confirmSignIn",0,g])},976942,86832,e=>{"use strict";let t;function n(){return{active:!1}}let o=(t=(i=(e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return n();default:return e}})(n(),{type:"RESET"}),{getState:()=>t,dispatch:e=>{t=i(t,e)}});e.s(["autoSignInStore",0,o],86832);var i,r=e.i(44440),s=e.i(601924);let a=async()=>{throw new r.AuthError({name:s.AUTO_SIGN_IN_EXCEPTION,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})},c=a;e.s(["autoSignIn",()=>c,"resetAutoSignIn",0,function(e=!0){e&&(c=a),o.dispatch({type:"RESET"})},"setAutoSignIn",0,function(e){c=e}],976942)},162473,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(313157),i=e.i(779613),r=e.i(589914),s=e.i(604528),a=e.i(420093),c=e.i(207348),l=e.i(121089),d=e.i(38025),E=e.i(39615),p=e.i(175585),u=e.i(26399),g=e.i(170095);async function h(e){let h,m=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(m);let{userPoolClientId:S,userPoolId:A,userPoolEndpoint:I}=m,{username:x,newPassword:C}=e;(0,r.assertValidationError)(!!x,i.AuthValidationErrorCode.EmptyConfirmResetPasswordUsername),(0,r.assertValidationError)(!!C,i.AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword);let R=e.confirmationCode;(0,r.assertValidationError)(!!R,i.AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode);let P=e.options?.clientMetadata,y=(0,a.getUserContextData)({username:x,userPoolId:A,userPoolClientId:S}),f=(h={endpointResolver:(0,u.createCognitoUserPoolEndpointResolver)({endpointOverride:I})},(0,c.composeServiceApi)(l.cognitoUserPoolTransferHandler,(0,d.createUserPoolSerializer)("ConfirmForgotPassword"),(0,E.createUserPoolDeserializer)(),{...p.DEFAULT_SERVICE_CLIENT_API_CONFIG,...h}));await f({region:(0,g.getRegionFromUserPoolId)(m.userPoolId),userAgentValue:(0,s.getAuthUserAgentValue)(o.AuthAction.ConfirmResetPassword)},{Username:x,ConfirmationCode:R,Password:C,ClientMetadata:P,ClientId:m.userPoolClientId,UserContextData:y})}e.s(["confirmResetPassword",0,h],162473)},857770,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(313157),i=e.i(971094),r=e.i(589914),s=e.i(779613),a=e.i(170095),c=e.i(604528),l=e.i(420093),d=e.i(207348),E=e.i(175585),p=e.i(121089),u=e.i(38025),g=e.i(39615),h=e.i(26399),m=e.i(86832),S=e.i(976942);async function A(e){let A,{username:I,confirmationCode:x,options:C}=e,R=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(R);let{userPoolId:P,userPoolClientId:y,userPoolEndpoint:f}=R,v=C?.clientMetadata;(0,r.assertValidationError)(!!I,s.AuthValidationErrorCode.EmptyConfirmSignUpUsername),(0,r.assertValidationError)(!!x,s.AuthValidationErrorCode.EmptyConfirmSignUpCode);let T=(0,l.getUserContextData)({username:I,userPoolId:P,userPoolClientId:y}),U=(A={endpointResolver:(0,h.createCognitoUserPoolEndpointResolver)({endpointOverride:f})},(0,d.composeServiceApi)(p.cognitoUserPoolTransferHandler,(0,u.createUserPoolSerializer)("ConfirmSignUp"),(0,g.createUserPoolDeserializer)(),{...E.DEFAULT_SERVICE_CLIENT_API_CONFIG,...A})),{Session:N}=await U({region:(0,a.getRegionFromUserPoolId)(R.userPoolId),userAgentValue:(0,c.getAuthUserAgentValue)(o.AuthAction.ConfirmSignUp)},{Username:I,ConfirmationCode:x,ClientMetadata:v,ForceAliasCreation:C?.forceAliasCreation,ClientId:R.userPoolClientId,UserContextData:T});return new Promise((e,t)=>{try{let t={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},n=m.autoSignInStore.getState();if(!n.active||n.username!==I){e(t),(0,S.resetAutoSignIn)();return}m.autoSignInStore.dispatch({type:"SET_SESSION",value:N});let o=i.HubInternal.listen("auth-internal",({payload:t})=>{"autoSignIn"===t.event&&(e({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),o())});i.HubInternal.dispatch("auth-internal",{event:"confirmSignUp",data:t})}catch(e){t(e)}})}e.s(["confirmSignUp",0,A],857770)},817827,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(313157),i=e.i(589914),r=e.i(779613),s=e.i(170095),a=e.i(604528),c=e.i(420093),l=e.i(207348),d=e.i(121089),E=e.i(38025),p=e.i(39615),u=e.i(175585),g=e.i(26399);async function h(e){let h,{username:m}=e;(0,i.assertValidationError)(!!m,r.AuthValidationErrorCode.EmptySignUpUsername);let S=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(S);let{userPoolClientId:A,userPoolId:I,userPoolEndpoint:x}=S,C=e.options?.clientMetadata,R=(0,c.getUserContextData)({username:m,userPoolId:I,userPoolClientId:A}),P=(h={endpointResolver:(0,g.createCognitoUserPoolEndpointResolver)({endpointOverride:x})},(0,l.composeServiceApi)(d.cognitoUserPoolTransferHandler,(0,E.createUserPoolSerializer)("ResendConfirmationCode"),(0,p.createUserPoolDeserializer)(),{...u.DEFAULT_SERVICE_CLIENT_API_CONFIG,...h})),{CodeDeliveryDetails:y}=await P({region:(0,s.getRegionFromUserPoolId)(S.userPoolId),userAgentValue:(0,a.getAuthUserAgentValue)(o.AuthAction.ResendSignUpCode)},{Username:m,ClientMetadata:C,ClientId:S.userPoolClientId,UserContextData:R}),{DeliveryMedium:f,AttributeName:v,Destination:T}={...y};return{destination:T,deliveryMedium:f,attributeName:v||void 0}}e.s(["resendSignUpCode",0,h],817827)},330605,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(313157),i=e.i(779613),r=e.i(589914),s=e.i(170095),a=e.i(604528),c=e.i(420093),l=e.i(207348),d=e.i(121089),E=e.i(38025),p=e.i(39615),u=e.i(175585),g=e.i(26399);async function h(e){let h,{username:m}=e;(0,r.assertValidationError)(!!m,i.AuthValidationErrorCode.EmptyResetPasswordUsername);let S=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(S);let{userPoolClientId:A,userPoolId:I,userPoolEndpoint:x}=S,C=e.options?.clientMetadata,R=(0,c.getUserContextData)({username:m,userPoolId:I,userPoolClientId:A}),P=(h={endpointResolver:(0,g.createCognitoUserPoolEndpointResolver)({endpointOverride:x})},(0,l.composeServiceApi)(d.cognitoUserPoolTransferHandler,(0,E.createUserPoolSerializer)("ForgotPassword"),(0,p.createUserPoolDeserializer)(),{...u.DEFAULT_SERVICE_CLIENT_API_CONFIG,...h})),y=(await P({region:(0,s.getRegionFromUserPoolId)(I),userAgentValue:(0,a.getAuthUserAgentValue)(o.AuthAction.ResetPassword)},{Username:m,ClientMetadata:C,ClientId:A,UserContextData:R})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:y?.DeliveryMedium,destination:y?.Destination,attributeName:y?.AttributeName}}}}e.s(["resetPassword",0,h],330605)},619448,456283,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(779613),i=e.i(589914),r=e.i(688236),s=e.i(205457),a=e.i(948085),c=e.i(587972),l=e.i(383124),d=e.i(451343),E=e.i(963845),p=e.i(89968);async function u(e){let u=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(u);let{username:g,password:h,options:m}=e,S={loginId:g,authFlowType:"CUSTOM_WITHOUT_SRP"},A=m?.clientMetadata;(0,i.assertValidationError)(!!g,o.AuthValidationErrorCode.EmptySignInUsername),(0,i.assertValidationError)(!h,o.AuthValidationErrorCode.CustomAuthSignInPassword);try{let{ChallengeName:e,ChallengeParameters:t,AuthenticationResult:n,Session:o}=await (0,E.retryOnResourceNotFoundException)(s.handleCustomAuthFlowWithoutSRP,[g,A,u,l.tokenOrchestrator],g,l.tokenOrchestrator),i=(0,s.getActiveSignInUsername)(g);if((0,a.setActiveSignInState)({signInSession:o,username:i,challengeName:e,signInDetail
9s:S}),n)return await (0,c.cacheCognitoTokens)({username:i,...n,NewDeviceMetadata:await (0,p.getNewDeviceMetadata)({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:n.NewDeviceMetadata,accessToken:n.AccessToken}),signInDetails:S}),(0,a.resetActiveSignInState)(),await (0,d.dispatchSignedInHubEvent)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,s.getSignInResult)({challengeName:e,challengeParameters:t})}catch(t){(0,a.resetActiveSignInState)(),(0,r.assertServiceError)(t);let e=(0,s.getSignInResultFromError)(t.name);if(e)return e;throw t}}async function g(e){let{username:E,password:u,options:g}=e,h={loginId:E,authFlowType:"CUSTOM_WITH_SRP"},m=t.Amplify.getConfig().Auth?.Cognito;(0,n.assertTokenProviderConfig)(m);let S=g?.clientMetadata;(0,i.assertValidationError)(!!E,o.AuthValidationErrorCode.EmptySignInUsername),(0,i.assertValidationError)(!!u,o.AuthValidationErrorCode.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:t,AuthenticationResult:n,Session:o}=await (0,s.handleCustomSRPAuthFlow)(E,u,S,m,l.tokenOrchestrator),i=(0,s.getActiveSignInUsername)(E);if((0,a.setActiveSignInState)({signInSession:o,username:i,challengeName:e,signInDetails:h}),n)return await (0,c.cacheCognitoTokens)({username:i,...n,NewDeviceMetadata:await (0,p.getNewDeviceMetadata)({userPoolId:m.userPoolId,userPoolEndpoint:m.userPoolEndpoint,newDeviceMetadata:n.NewDeviceMetadata,accessToken:n.AccessToken}),signInDetails:h}),(0,a.resetActiveSignInState)(),await (0,d.dispatchSignedInHubEvent)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,s.getSignInResult)({challengeName:e,challengeParameters:t})}catch(t){(0,a.resetActiveSignInState)(),(0,r.assertServiceError)(t);let e=(0,s.getSignInResultFromError)(t.name);if(e)return e;throw t}}e.s(["signInWithCustomAuth",0,u],619448),e.s(["signInWithCustomSRPAuth",0,g],456283)},663007,320574,e=>{"use strict";var t=e.i(205457),n=e.i(619448),o=e.i(456283),i=e.i(674860),r=e.i(578475),s=e.i(779613),a=e.i(589914),c=e.i(688236),l=e.i(948085),d=e.i(587972),E=e.i(383124),p=e.i(451343),u=e.i(89968),g=e.i(976942);async function h(e){let{username:n,password:o}=e,h=i.Amplify.getConfig().Auth?.Cognito,m={loginId:n,authFlowType:"USER_SRP_AUTH"};(0,r.assertTokenProviderConfig)(h);let S=e.options?.clientMetadata;(0,a.assertValidationError)(!!n,s.AuthValidationErrorCode.EmptySignInUsername),(0,a.assertValidationError)(!!o,s.AuthValidationErrorCode.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:s}=await (0,t.handleUserSRPAuthFlow)(n,o,S,h,E.tokenOrchestrator),a=(0,t.getActiveSignInUsername)(n);if((0,l.setActiveSignInState)({signInSession:s,username:a,challengeName:e,signInDetails:m}),r)return await (0,d.cacheCognitoTokens)({username:a,...r,NewDeviceMetadata:await (0,u.getNewDeviceMetadata)({userPoolId:h.userPoolId,userPoolEndpoint:h.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:m}),(0,l.resetActiveSignInState)(),await (0,p.dispatchSignedInHubEvent)(),(0,g.resetAutoSignIn)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,t.getSignInResult)({challengeName:e,challengeParameters:i})}catch(n){(0,l.resetActiveSignInState)(),(0,g.resetAutoSignIn)(),(0,c.assertServiceError)(n);let e=(0,t.getSignInResultFromError)(n.name);if(e)return e;throw n}}var m=e.i(963845);async function S(e){let{username:n,password:o,options:h}=e,S=i.Amplify.getConfig().Auth?.Cognito,A={loginId:n,authFlowType:"USER_PASSWORD_AUTH"};(0,r.assertTokenProviderConfig)(S);let I=h?.clientMetadata;(0,a.assertValidationError)(!!n,s.AuthValidationErrorCode.EmptySignInUsername),(0,a.assertValidationError)(!!o,s.AuthValidationErrorCode.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:s}=await (0,m.retryOnResourceNotFoundException)(t.handleUserPasswordAuthFlow,[n,o,I,S,E.tokenOrchestrator],n,E.tokenOrchestrator),a=(0,t.getActiveSignInUsername)(n);if((0,l.setActiveSignInState)({signInSession:s,username:a,challengeName:e,signInDetails:A}),r)return await (0,d.cacheCognitoTokens)({...r,username:a,NewDeviceMetadata:await (0,u.getNewDeviceMetadata)({userPoolId:S.userPoolId,userPoolEndpoint:S.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}
9),signInDetails:A}),(0,l.resetActiveSignInState)(),await (0,p.dispatchSignedInHubEvent)(),(0,g.resetAutoSignIn)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,t.getSignInResult)({challengeName:e,challengeParameters:i})}catch(n){(0,l.resetActiveSignInState)(),(0,g.resetAutoSignIn)(),(0,c.assertServiceError)(n);let e=(0,t.getSignInResultFromError)(n.name);if(e)return e;throw n}}var A=e.i(86832),I=e.i(313157),x=e.i(420093),C=e.i(110375),R=e.i(26399),P=e.i(170095),y=e.i(604528),f=e.i(142482),v=e.i(876085);async function T({username:e,clientMetadata:t,config:n,tokenOrchestrator:o,preferredChallenge:i,password:r,session:c}){let{userPoolId:l,userPoolClientId:d,userPoolEndpoint:E}=n,p=(0,x.getUserContextData)({username:e,userPoolId:l,userPoolClientId:d}),u={USERNAME:e};if(i){if(n.passwordless&&(("EMAIL_OTP"!==i||n.passwordless.emailOtpEnabled)&&("SMS_OTP"!==i||n.passwordless.smsOtpEnabled)&&("WEB_AUTHN"!==i||n.passwordless.webAuthn)||(0,a.assertValidationError)(!1,s.AuthValidationErrorCode.InvalidPreferredChallenge)),"PASSWORD_SRP"===i)return(0,a.assertValidationError)(!!r,s.AuthValidationErrorCode.EmptySignInPassword),(0,f.handlePasswordSRP)({username:e,password:r,clientMetadata:t,config:n,tokenOrchestrator:o,authFlow:"USER_AUTH",preferredChallenge:i});"PASSWORD"===i&&((0,a.assertValidationError)(!!r,s.AuthValidationErrorCode.EmptySignInPassword),u.PASSWORD=r),u.PREFERRED_CHALLENGE=i}let g={AuthFlow:"USER_AUTH",AuthParameters:u,ClientMetadata:t,ClientId:d,UserContextData:p};c&&(g.Session=c);let h=(0,C.createInitiateAuthClient)({endpointResolver:(0,R.createCognitoUserPoolEndpointResolver)({endpointOverride:E})}),m=await h({region:(0,P.getRegionFromUserPoolId)(l),userAgentValue:(0,y.getAuthUserAgentValue)(I.AuthAction.SignIn)},g);return(0,v.setActiveSignInUsername)(e),m}async function U(e){let{username:n,password:o,options:h}=e,m=i.Amplify.getConfig().Auth?.Cognito,S={loginId:n,authFlowType:"USER_AUTH"};(0,r.assertTokenProviderConfig)(m);let I=h?.clientMetadata,x=h?.preferredChallenge??m?.passwordless?.preferredChallenge;(0,a.assertValidationError)(!!n,s.AuthValidationErrorCode.EmptySignInUsername);try{let e={username:n,config:m,tokenOrchestrator:E.tokenOrchestrator,clientMetadata:I,preferredChallenge:x,password:o},i=A.autoSignInStore.getState();i.active&&i.username===n&&(e.session=i.session);let r=await T(e),s=(0,t.getActiveSignInUsername)(n);if((0,l.setActiveSignInState)({signInSession:r.Session,username:s,challengeName:r.ChallengeName,signInDetails:S}),r.AuthenticationResult)return await (0,d.cacheCognitoTokens)({username:s,...r.AuthenticationResult,NewDeviceMetadata:await (0,u.getNewDeviceMetadata)({userPoolId:m.userPoolId,userPoolEndpoint:m.userPoolEndpoint,newDeviceMetadata:r.AuthenticationResult.NewDeviceMetadata,accessToken:r.AuthenticationResult.AccessToken}),signInDetails:S}),(0,l.resetActiveSignInState)(),await (0,p.dispatchSignedInHubEvent)(),(0,g.resetAutoSignIn)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,t.getSignInResult)({challengeName:r.ChallengeName,challengeParameters:r.ChallengeParameters,availableChallenges:"AvailableChallenges"in r?r.AvailableChallenges:void 0})}catch(n){(0,l.resetActiveSignInState)(),(0,g.resetAutoSignIn)(),(0,c.assertServiceError)(n);let e=(0,t.getSignInResultFromError)(n.name);if(e)return e;throw n}}async function N(e){(0,g.resetAutoSignIn)(!1);let i=e.options?.authFlowType;switch(await (0,t.assertUserNotAuthenticated)(),i){case"USER_SRP_AUTH":default:return h(e);case"USER_PASSWORD_AUTH":return S(e);case"CUSTOM_WITHOUT_SRP":return(0,n.signInWithCustomAuth)(e);case"CUSTOM_WITH_SRP":return(0,o.signInWithCustomSRPAuth)(e);case"USER_AUTH":return U(e)}}e.s(["signInWithUserAuth",0,U],320574),e.s(["signIn",0,N],663007)},29057,e=>{"use strict";e.s(["toAttributeType",0,function(e){return Object.entries(e).map(([e,t])=>({Name:e,Value:t}))},"toAuthUserAttribute",0,function(e){let t={};return e?.forEach(e=>{e.Name&&(t[e.Name]=e.Value)}),t}])},670514,e=>{"use strict";var t=e.i(674860),n=e.i(578475),o=e.i(313157),i=e.i(589914),r=e.i(779613),s=e.i(170095),a=e.i(29057),c=e.i(971094),l=e.i(663007),d=e.i(44440),E=e.i(976942),p=e.i(601924),u=e.i(320574);function g(e,t){let n;return o=>{n||e(...o),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}let h=g(function(e,t,n){let o=Date.now(),i=setInterval(async()=>
9{if(Date.now()-o>18e4)clearInterval(i),n(new d.AuthError({name:p.AUTO_SIGN_IN_EXCEPTION,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),(0,E.resetAutoSignIn)();else try{let n=await (0,l.signIn)(e);"CONFIRM_SIGN_UP"!==n.nextStep.signInStep&&(t(n),clearInterval(i),(0,E.resetAutoSignIn)())}catch(e){clearInterval(i),n(e),(0,E.resetAutoSignIn)()}},5e3)},300),m=g(S,300);async function S(e,t,n){try{let n=e?.options?.authFlowType==="USER_AUTH"?await (0,u.signInWithUserAuth)(e):await (0,l.signIn)(e);t(n),(0,E.resetAutoSignIn)()}catch(e){n(e),(0,E.resetAutoSignIn)()}}function A(e){return async()=>new Promise((t,n)=>{m([e,t,n])})}var I=e.i(420093),x=e.i(604528),C=e.i(207348),R=e.i(64978),P=e.i(309488),y=e.i(688236),f=e.i(800536),v=e.i(38025),T=e.i(121089),U=e.i(175585),N=e.i(26399),w=e.i(86832);async function F(e){let l,{username:p,password:u,options:g}=e,m=t.Amplify.getConfig().Auth?.Cognito,S=m?.signUpVerificationMethod??"code",{clientMetadata:F,validationData:_,autoSignIn:M}=e.options??{};(0,n.assertTokenProviderConfig)(m),(0,i.assertValidationError)(!!p,r.AuthValidationErrorCode.EmptySignUpUsername);let D="boolean"!=typeof M?M:void 0,O={username:p,options:D};D?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(O.password=u);let{userPoolId:b,userPoolClientId:L,userPoolEndpoint:V}=m,k=(l={endpointResolver:(0,N.createCognitoUserPoolEndpointResolver)({endpointOverride:V})},(0,C.composeServiceApi)(T.cognitoUserPoolTransferHandler,(0,v.createUserPoolSerializer)("SignUp"),async e=>{if(e.statusCode>=300){let t=await (0,R.parseJsonError)(e);if((0,y.assertServiceError)(t),t.name===f.SignUpException.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){let e=r.AuthValidationErrorCode.EmptySignUpPassword,{message:t,recoverySuggestion:n}=P.validationErrorMap[e];throw new d.AuthError({name:e,message:t,recoverySuggestion:n})}throw new d.AuthError({name:t.name,message:t.message})}return(0,R.parseJsonBody)(e)},{...U.DEFAULT_SERVICE_CLIENT_API_CONFIG,...l})),q={Username:p,Password:void 0,UserAttributes:g?.userAttributes&&(0,a.toAttributeType)(g?.userAttributes),ClientMetadata:F,ValidationData:_&&(0,a.toAttributeType)(_),ClientId:L,UserContextData:(0,I.getUserContextData)({username:p,userPoolId:b,userPoolClientId:L})};u&&(q.Password=u);let{UserSub:H,CodeDeliveryDetails:B,UserConfirmed:W,Session:z}=await k({region:(0,s.getRegionFromUserPoolId)(b),userAgentValue:(0,x.getAuthUserAgentValue)(o.AuthAction.SignUp)},q);(D||!0===M)&&(w.autoSignInStore.dispatch({type:"START"}),w.autoSignInStore.dispatch({type:"SET_USERNAME",value:p}),w.autoSignInStore.dispatch({type:"SET_SESSION",value:z}));let G={destination:B?.Destination,deliveryMedium:B?.DeliveryMedium,attributeName:B?.AttributeName},K=w.autoSignInStore.getState().active;if(W)return K?((0,E.setAutoSignIn)(A(O)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:H}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:H};if(K){let e,t;if("link"===S)return(0,E.setAutoSignIn)(async()=>new Promise((e,t)=>{h([O,e,t])})),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:G},userId:H};e=c.HubInternal.listen("auth-internal",async({payload:t})=>{if("confirmSignUp"===t.event){let n=t.data;n?.isSignUpComplete&&(c.HubInternal.dispatch("auth-internal",{event:"autoSignIn"}),(0,E.setAutoSignIn)(A(O)),e())}}),t=setTimeout(()=>{e(),clearTimeout(t),(0,E.resetAutoSignIn)()},18e4)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:G},userId:H}}e.s(["signUp",0,F],670514)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.