PageSourceSearch

https://voice.auribus.io/_next/static/chunks/1494-3a873cb1bfb5df23.js?dpl=e972ffed-9c48-4bc2-a17c-6ed8d6a3391f

js auribus.io collected 2026-10-05 00:59:00 UTC 79,661 bytes, 19 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1494],{92614:function(e,t,n){n.d(t,{u:function(){return i}});var o=n(72237);let i={convert(e,t={urlSafe:!1,skipPadding:!1}){let n="string"==typeof e?e:Array.from(e,e=>String.fromCodePoint(e)).join(""),i=(0,o.Ds)()(n);return t.urlSafe&&(i=i.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(i=i.replace(/=/g,"")),i}}},38247:function(e,t,n){n.d(t,{h:function(){return E}});var o=n(85230),i=n(83189),r=n(15786);n(85370);var a=n(66986),s=n(9825),c=n(32440),d=n(99794),l=n(36902),p=n(8228),u=n(91555);async function E({username:e,password:t,clientMetadata:n,config:E,tokenOrchestrator:m,authFlow:h,preferredChallenge:g}){let{userPoolId:x,userPoolClientId:f,userPoolEndpoint:S}=E,y=x?.split("_")[1]||"",I=await (0,r.d)(y),R={USERNAME:e,SRP_A:I.A.toString(16)};"USER_AUTH"===h&&g&&(R.PREFERRED_CHALLENGE=g);let A=(0,i.u)({username:e,userPoolId:x,userPoolClientId:f}),v=(0,a.N)({endpointResolver:(0,s.e)({endpointOverride:S})}),C=await v({region:(0,c.y)(x),userAgentValue:(0,d.W)(o.g4.SignIn)},{AuthFlow:h,AuthParameters:R,ClientMetadata:n,ClientId:f,UserContextData:A}),{ChallengeParameters:P,Session:w}=C,N=P?.USERNAME??e;return((0,u.r)(N),"PASSWORD_VERIFIER"===C.ChallengeName)?(0,p.H)(l.i,[t,P,n,w,I,E,m],N,m):C}},28058:function(e,t,n){var o;let i;function r(){return{active:!1}}n.d(t,{E:function(){return a}});let a=(i=(o=(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 r();default:return e}})(r(),{type:"RESET"}),{getState:()=>i,dispatch:e=>{i=o(i,e)}})},89700:function(e,t,n){let o;n.d(t,{fZ:function(){return d},k4:function(){return m},signInStore:function(){return E}});var i,r=n(12876);let a="CognitoSignInState",s={username:`${a}.username`,challengeName:`${a}.challengeName`,signInSession:`${a}.signInSession`,expiry:`${a}.expiry`},c=e=>Number(e)<=Date.now(),d=()=>{E.dispatch({type:"RESET_STATE"})},l=()=>{for(let e of Object.values(s))r.$2.removeItem(e)},p=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),u=()=>{let e=r.$2.getItem(s.expiry);return!e||c(e)?(l(),p()):{username:r.$2.getItem(s.username)??void 0,challengeName:r.$2.getItem(s.challengeName)??void 0,signInSession:r.$2.getItem(s.signInSession)??void 0}},E=(o=(i=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return h({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return h(t.value),{...t.value};case"SET_CHALLENGE_NAME":return h({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return h({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return u();case"RESET_STATE":return l(),p();default:return e}})(p(),{type:"SET_INITIAL_STATE"}),{getState:()=>o,dispatch:e=>{o=i(o,e)}});function m(e){E.dispatch({type:"SET_SIGN_IN_STATE",value:e})}let h=({challengeName:e,signInSession:t,username:n})=>{n&&r.$2.setItem(s.username,n),e&&r.$2.setItem(s.challengeName,e),t&&(r.$2.setItem(s.signInSession,t),r.$2.setItem(s.expiry,String(Date.now()+18e4)))}},54585:function(e,t,n){n.d(t,{AL:function(){return r},By:function(){return c},kq:function(){return a}});var o,i,r,a,s=n(44427);let c={[s.X.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[s.X.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[s.X.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[s.X.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[s.X.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[s.X.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[s.X.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[s.X.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[s.X.EmptySignInPassword]:{message:"password is required to signIn"},[s.X.EmptySignInUsername]:{message:"username is required to signIn"},[s.X.EmptySignUpPassword]:{message:"password is required to signUp"},[s.X.EmptySignUpUsername]:{message:"username is required to signUp"},[s.X.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[s.X.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"},[s.X.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[s.X.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[s.X.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"}};(o=r||(r={}
1)).DEFAULT_MSG="Authentication Error",o.EMPTY_EMAIL="Email cannot be empty",o.EMPTY_PHONE="Phone number cannot be empty",o.EMPTY_USERNAME="Username cannot be empty",o.INVALID_USERNAME="The username should either be a string or one of the sign in types",o.EMPTY_PASSWORD="Password cannot be empty",o.EMPTY_CODE="Confirmation code cannot be empty",o.SIGN_UP_ERROR="Error creating account",o.NO_MFA="No valid MFA method provided",o.INVALID_MFA="Invalid MFA type",o.EMPTY_CHALLENGE="Challenge response cannot be empty",o.NO_USER_SESSION="Failed to get the session because the user is empty",o.NETWORK_ERROR="Network Error",o.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",o.AUTOSIGNIN_ERROR="Please use your credentials to sign in",o.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings",(i=a||(a={})).SignInException="SignInException",i.OAuthSignInError="OAuthSignInException"},44427:function(e,t,n){var o,i;n.d(t,{X:function(){return o}}),(i=o||(o={})).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"},4731:function(e,t,n){n.d(t,{n:function(){return r}});var o=n(54585),i=n(65353);function r(e,t){let{message:n,recoverySuggestion:r}=o.By[t];if(!e)throw new i.l({name:t,message:n,recoverySuggestion:r})}},66986:function(e,t,n){n.d(t,{N:function(){return c}});var o=n(91742),i=n(28092),r=n(34724),a=n(93957),s=n(26085);let c=e=>(0,o.z)(a.x,(0,i.u)("InitiateAuth"),(0,r.o)(),{...s.n,...e})},70029:function(e,t,n){n.d(t,{u:function(){return c}});var o=n(91742),i=n(93957),r=n(28092),a=n(34724),s=n(26085);let c=e=>(0,o.z)(i.x,(0,r.u)("RespondToAuthChallenge"),(0,a.o)(),{...s.n,...e})},76522:function(e,t,n){n.d(t,{Dv:function(){return d},I:function(){return c},Zl:function(){return s}});var o=n(28058),i=n(65353),r=n(11632);let a=async()=>{throw new i.l({name:r.MA,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."})},s=a;function c(e){s=e}function d(e=!0){e&&(s=a),o.E.dispatch({type:"RESET"})}},32126:function(e,t,n){n.d(t,{f:function(){return f}});var o=n(29676),i=n(87433),r=n(85230),a=n(44427),s=n(4731),c=n(99794),d=n(83189),l=n(91742),p=n(93957),u=n(28092),E=n(34724),m=n(26085);let h=e=>(0,l.z)(p.x,(0,u.u)("ConfirmForgotPassword"),(0,E.o)(),{...m.n,...e});var g=n(9825),x=n(32440);async function f(e){let t=o.d.getConfig().Auth?.Cognito;(0,i.FG)(t);let{userPoolClientId:n,userPoolId:l,userPoolEndpoint:p}=t,{username:u,newPassword:E}=e;(0,s.n)(!!u,a.X.EmptyConfirmResetPasswordUsername),(0,s.n)(!!E,a.X.EmptyConfirmResetPasswordNewPassword);let m=e.confirmationCode;(0,s.n)(!!m,a.X.EmptyConfirmResetPasswordConfirmationCode);let f=e.options?.clientMetadata,S=(0,d.u)({username:u,userPoolId:l,userPoolClientId:n}),y=h({endpointResolver:(0,g.e)({endpointOverride:p})});await y({region:(0,x.y)(t.userPoolId),userAgentValue:(0,c.W)(r.g4.ConfirmResetPassword)},{Username:u,ConfirmationCode:m,Password:E,ClientMetadata:f,ClientId:t.userPoolClientId,UserContextData:S})}},97369:function(e,t,n){n.d(t,{_:function(){return I}});var o=n(29676),i=n(87433),r=n(85230),a=n(85871),s=n(4731),c=n(44427),d=n(32440),l=n(99794),p=n(83189),u=n(91742),E=n(26085),m=n(93957),h=n(28092),g=n(34724);let x=e=>(0,u.z)(m.x,(0,h.u)("ConfirmSignUp"),(0,g.o)(),{...E.n,...e});var f=n(9825),S=n(28058),y=n(76522);async function I(e){let{username:t,confirmationCode:n,options:u}=e,E=o.d.getConfig().Auth?.Cognito;(0,i.FG)(E);let{userPoolId:m,userPoolClientId:h,userPoolEndpoint:g}=E,I=u?.clientMetadata;(0,s.n)(!!t,c.X.EmptyConfirmSignUpUsername),(0,s.n)(!!n,c.X.EmptyConfirmSignUpCode);let R=(0,p.u)({username:t,userPoolId:m,userPoolClientId:h}),A=x({endpointResolver:(0,f.e)({endpointOverride:g})}),{Session:v}=await A({region:(0,d.y)(E.userPoolId),userAgentValue:(0,l.W)(r.g4.ConfirmSignUp)},{Username:t,ConfirmationCode:n,ClientMetadata:I,ForceAliasCreation:u?.forceAliasCreation,ClientId:E.userPoolClientId,UserContextData:R});
1return new Promise((e,n)=>{try{let n={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},o=S.E.getState();if(!o.active||o.username!==t){e(n),(0,y.Dv)();return}S.E.dispatch({type:"SET_SESSION",value:v});let i=a.qC.listen("auth-internal",({payload:t})=>{"autoSignIn"===t.event&&(e({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),i())});a.qC.dispatch("auth-internal",{event:"confirmSignUp",data:n})}catch(e){n(e)}})}},93315:function(e,t,n){n.d(t,{T:function(){return f}});var o=n(29676),i=n(87433),r=n(85230),a=n(4731),s=n(44427),c=n(32440),d=n(99794),l=n(83189),p=n(91742),u=n(93957),E=n(28092),m=n(34724),h=n(26085);let g=e=>(0,p.z)(u.x,(0,E.u)("ResendConfirmationCode"),(0,m.o)(),{...h.n,...e});var x=n(9825);async function f(e){let{username:t}=e;(0,a.n)(!!t,s.X.EmptySignUpUsername);let n=o.d.getConfig().Auth?.Cognito;(0,i.FG)(n);let{userPoolClientId:p,userPoolId:u,userPoolEndpoint:E}=n,m=e.options?.clientMetadata,h=(0,l.u)({username:t,userPoolId:u,userPoolClientId:p}),f=g({endpointResolver:(0,x.e)({endpointOverride:E})}),{CodeDeliveryDetails:S}=await f({region:(0,c.y)(n.userPoolId),userAgentValue:(0,d.W)(r.g4.ResendSignUpCode)},{Username:t,ClientMetadata:m,ClientId:n.userPoolClientId,UserContextData:h}),{DeliveryMedium:y,AttributeName:I,Destination:R}={...S};return{destination:R,deliveryMedium:y,attributeName:I||void 0}}},16039:function(e,t,n){n.d(t,{c:function(){return f}});var o=n(29676),i=n(87433),r=n(85230),a=n(44427),s=n(4731),c=n(32440),d=n(99794),l=n(83189),p=n(91742),u=n(93957),E=n(28092),m=n(34724),h=n(26085);let g=e=>(0,p.z)(u.x,(0,E.u)("ForgotPassword"),(0,m.o)(),{...h.n,...e});var x=n(9825);async function f(e){let{username:t}=e;(0,s.n)(!!t,a.X.EmptyResetPasswordUsername);let n=o.d.getConfig().Auth?.Cognito;(0,i.FG)(n);let{userPoolClientId:p,userPoolId:u,userPoolEndpoint:E}=n,m=e.options?.clientMetadata,h=(0,l.u)({username:t,userPoolId:u,userPoolClientId:p}),f=g({endpointResolver:(0,x.e)({endpointOverride:E})}),S=(await f({region:(0,c.y)(u),userAgentValue:(0,d.W)(r.g4.ResetPassword)},{Username:t,ClientMetadata:m,ClientId:p,UserContextData:h})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:S?.DeliveryMedium,destination:S?.Destination,attributeName:S?.AttributeName}}}}},37835:function(e,t,n){n.d(t,{z:function(){return I}});var o=n(71275),i=n(29676),r=n(87433),a=n(44427),s=n(4731),c=n(26014),d=n(89700),l=n(5696),p=n(55274),u=n(94470),E=n(8228),m=n(53366);async function h(e){let t=i.d.getConfig().Auth?.Cognito;(0,r.FG)(t);let{username:n,password:h,options:g}=e,x={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},f=g?.clientMetadata;(0,s.n)(!!n,a.X.EmptySignInUsername),(0,s.n)(!h,a.X.CustomAuthSignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,E.H)(o.pB,[n,f,t,p.C],n,p.C),s=(0,o.QS)(n);if((0,d.k4)({signInSession:a,username:s,challengeName:e,signInDetails:x}),r)return await (0,l.x)({username:s,...r,NewDeviceMetadata:await (0,m.F)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:x}),(0,d.fZ)(),await (0,u.O)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.cP)({challengeName:e,challengeParameters:i})}catch(t){(0,d.fZ)(),(0,c.R)(t);let e=(0,o.yM)(t.name);if(e)return e;throw t}}async function g(e){let{username:t,password:n,options:E}=e,h={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},g=i.d.getConfig().Auth?.Cognito;(0,r.FG)(g);let x=E?.clientMetadata;(0,s.n)(!!t,a.X.EmptySignInUsername),(0,s.n)(!!n,a.X.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,o.Mf)(t,n,x,g,p.C),s=(0,o.QS)(t);if((0,d.k4)({signInSession:a,username:s,challengeName:e,signInDetails:h}),r)return await (0,l.x)({username:s,...r,NewDeviceMetadata:await (0,m.F)({userPoolId:g.userPoolId,userPoolEndpoint:g.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:h}),(0,d.fZ)(),await (0,u.O)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.cP)({challengeName:e,challengeParameters:i})}catch(t){(0,d.fZ)(),(0,c.R)(t);let e=(0,o.yM)(t.name);if(e)return e;throw t}}var x=n(76522);async function f(e){let{username:t,password:n}=e,E=i.d.getConfig().Auth?.Cognito,h={loginId:t,authFlowType:"USER_SRP_AUTH"};(0,r.FG)(E);let g=e.options?.clientMetadata;(0,s.n)(!!t,a.X.EmptySignInUsername),(0,s.n)(!!n,a.X.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,o.U)(t,n,g,E,p.C),s=(0,o.QS)(t);if((0,d.k4)({signInSession:a,username:s,challengeName:e,signInDetail
1s:h}),r)return await (0,l.x)({username:s,...r,NewDeviceMetadata:await (0,m.F)({userPoolId:E.userPoolId,userPoolEndpoint:E.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:h}),(0,d.fZ)(),await (0,u.O)(),(0,x.Dv)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.cP)({challengeName:e,challengeParameters:i})}catch(t){(0,d.fZ)(),(0,x.Dv)(),(0,c.R)(t);let e=(0,o.yM)(t.name);if(e)return e;throw t}}async function S(e){let{username:t,password:n,options:h}=e,g=i.d.getConfig().Auth?.Cognito,f={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};(0,r.FG)(g);let S=h?.clientMetadata;(0,s.n)(!!t,a.X.EmptySignInUsername),(0,s.n)(!!n,a.X.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,E.H)(o.x6,[t,n,S,g,p.C],t,p.C),s=(0,o.QS)(t);if((0,d.k4)({signInSession:a,username:s,challengeName:e,signInDetails:f}),r)return await (0,l.x)({...r,username:s,NewDeviceMetadata:await (0,m.F)({userPoolId:g.userPoolId,userPoolEndpoint:g.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:f}),(0,d.fZ)(),await (0,u.O)(),(0,x.Dv)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.cP)({challengeName:e,challengeParameters:i})}catch(t){(0,d.fZ)(),(0,x.Dv)(),(0,c.R)(t);let e=(0,o.yM)(t.name);if(e)return e;throw t}}var y=n(40885);async function I(e){(0,x.Dv)(!1);let t=e.options?.authFlowType;switch(await (0,o.OP)(),t){case"USER_SRP_AUTH":default:return f(e);case"USER_PASSWORD_AUTH":return S(e);case"CUSTOM_WITHOUT_SRP":return h(e);case"CUSTOM_WITH_SRP":return g(e);case"USER_AUTH":return(0,y.G)(e)}}},19806:function(e,t,n){n.d(t,{F:function(){return $}});var o,i,r=n(29676),a=n(87433),s=n(99262),c=n(85230),d=n(41860),l=n(99794),p=n(35795),u=n(69514),E=n(79059),m=n(85871),h=n(5696),g=n(94470),x=n(74236),f=n(55274),S=n(53110),y=n(54585);new S.k("AuthError");let I={oauthSignInError:{message:y.AL.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:y.AL.DEFAULT_MSG,log:`
2            Error: Amplify has not been configured correctly.
3            This error is typically caused by one of the following scenarios:
4
5            1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point
6                See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information
7            
8            2. There might be multiple conflicting versions of amplify packages in your node_modules.
9				Refer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)
10        `},missingAuthConfig:{message:y.AL.DEFAULT_MSG,log:`
11            Error: Amplify has not been configured correctly. 
12            The configuration object is missing required auth properties.
13            This error is typically caused by one of the following scenarios:
14
15            1. Did you run \`amplify push\` after adding auth via \`amplify add auth\`?
16                See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information
17
18            2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.
19        `},emptyUsername:{message:y.AL.EMPTY_USERNAME},invalidUsername:{message:y.AL.INVALID_USERNAME},emptyPassword:{message:y.AL.EMPTY_PASSWORD},emptyCode:{message:y.AL.EMPTY_CODE},signUpError:{message:y.AL.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:y.AL.NO_MFA},invalidMFA:{message:y.AL.INVALID_MFA},emptyChallengeResponse:{message:y.AL.EMPTY_CHALLENGE},noUserSession:{message:y.AL.NO_USER_SESSION},deviceConfig:{message:y.AL.DEVICE_CONFIG},networkError:{message:y.AL.NETWORK_ERROR},autoSignInError:{message:y.AL.AUTOSIGNIN_ERROR},default:{message:y.AL.DEFAULT_MSG}};var R=n(65353);let A=(e,t)=>new R.l({message:e??"An error has occurred during the oauth process.",name:y.kq.OAuthSignInError,recoverySuggestion:t??I.oauthSignInError.log});(o=i||(i={})).NoConfig="noConfig",o.MissingAuthConfig="missingAuthConfig",o.EmptyUsername="emptyUsername",o.InvalidUsername="invalidUsername",o.EmptyPassword="emptyPassword",o.EmptyCode="emptyCode",o.SignUpError="signUpError",o.NoMFA="noMFA",o.InvalidMFA="invalidMFA",o.EmptyChallengeResponse="emptyChallengeResponse",o.NoUserSession="noUserSession",o.Default="default",o.DeviceConfig="deviceConfig",o.NetworkError="networkError",o.AutoSignInError="autoSignInError",o.OAuthSignInError="oauthSignInError";let v=async e=>{let t=await p.V.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new R.l({name:i.OAuthSignInError,message:null===e?"`signInWithRedirect` has been canceled.":"An error occurred while validating the state.",recoverySuggestion:null===e?void 0:"Try to initiate an OAuth flow from Amplify"});return n},C=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:o,responseType:i,domain:r,preferPrivateSession:a})=>{let s=new u.a(e),c=s.searchParams.get("error"),d=s.searchParams.get("error_description");if(c)throw A(d??c);return"code"===i?P({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:o,domain:r,preferPrivateSession:a}):w({currentUrl:e,redirectUri:o,preferPrivateSession:a})},P=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:o,domain:i,preferPrivateSession:r})=>{let s=new u.a(e),c=s.searchParams.get("code"),d=s.searchParams.get("state");if(!c||!d)throw A("User cancelled OAuth flow.");let l=await v(d),m=await p.V.loadPKCE(),g=Object.entries({grant_type:"authorization_code",code:c,client_id:n,redirect_uri:o,...m?{code_verifier:m}:{}}).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"),{access_token:x,refresh_token:f,id_token:S,error:y,error_message:I,token_type:R,expires_in:C}=await (await fetch("https://"+i+"/oauth2/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[E.Mt]:t},body:g})).json();if(y)throw A(I??y);let P=(x&&(0,a.xp)(x).payload.username)??"username";return await (0,h.x)({username:P,AccessToken:x,IdToken:S,RefreshToken:f}),N({redirectUri:o,state:l,preferPrivateSession:r})},w=async({currentUrl:e,redirectUri:t,preferPrivateSession:n})=>{let{id_token:o,access_token:i,state:r,token_type:s,expires_in:c,error_description:d,error:l}=(new u.a(e).hash??"#").substring(1).split("&").map(e=>e.split("=")).reduce((e,[t,n])=>({...e,[t]:n}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(l)throw A(d??l);if(!i)throw A("No access token returned from OAuth flow.");let p=await v(r),E=(i&&(0,a.xp)(i).payload.username)??"username";
19return await (0,h.x)({username:E,AccessToken:i,IdToken:o}),N({redirectUri:t,state:p,preferPrivateSession:n})},N=async({redirectUri:e,state:t,preferPrivateSession:n})=>{await f.C.setOAuthMetadata({oauthSignIn:!0}),await p.V.clearOAuthData(),await p.V.storeOAuthSignIn(!0,n),(0,x.P)(),F(e),T(t)&&m.Xb.dispatch("auth",{event:"customOAuthState",data:(U(t).match(/.{2}/g)||[]).map(e=>String.fromCharCode(parseInt(e,16))).join("")},"Auth",m.SQ),m.Xb.dispatch("auth",{event:"signInWithRedirect"},"Auth",m.SQ),await (0,g.O)()},T=e=>/-/.test(e),U=e=>e.split("-").splice(1).join("-"),F=e=>{"undefined"!=typeof window&&void 0!==window.history&&window.history.replaceState(window.history.state,"",e)};var M=n(85260);let D=async e=>{(0,x.P)(),await p.V.clearOAuthInflightData(),m.Xb.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",m.SQ)},_=async e=>{try{(0,a.FG)(e),(0,a.V0)(e),p.V.setAuthConfig(e)}catch(e){return}if(await p.V.loadOAuthInFlight())try{let t=window.location.href,{loginWith:n,userPoolClientId:o}=e,{domain:i,redirectSignIn:r,responseType:a}=n.oauth,s=(0,M.B)(r);await C({currentUrl:t,clientId:o,domain:i,redirectUri:s,responseType:a,userAgentValue:(0,l.W)(c.g4.SignInWithRedirect)})}catch(e){await D(e)}};(0,s.j)()&&r.d[d.w](_);let b={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"};var O=n(67163),L=n(71275),k=n(85370),q=n(72237),B=n(92614);let V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",H=e=>{let t;let n=new Uint8Array(e);(0,q.MX)().getRandomValues(n);let o="";for(let e of n)o+=V.charAt(e%V.length);return{value:o,method:"S256",toCodeChallenge:()=>t||(t=function(e){let t=new k.f;return t.update(e),B.u.convert(t.digestSync(),{urlSafe:!0}).replace(/=/g,"")}(o))}},z=e=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],o=new Uint8Array(e);for(let e of((0,q.MX)().getRandomValues(o),o))n.push(t[e%t.length]);return n.join("")},W=()=>z(32),G=e=>{async function t(n){if(n.persisted&&await e.loadOAuthInFlight()){let e=A("User cancelled OAuth flow.");await D(e)}window.removeEventListener("pageshow",t)}window.addEventListener("pageshow",t)};async function $(e){let t;let n=r.d.getConfig().Auth?.Cognito;(0,a.FG)(n),(0,a.V0)(n),p.V.setAuthConfig(n),e?.options?.prompt||await (0,L.OP)();let o="COGNITO";return"string"==typeof e?.provider?o=b[e.provider]:e?.provider?.custom?o=e.provider.custom:e?.provider?.idpIdentifier&&({idpIdentifier:t}=e.provider),X({oauthConfig:n.loginWith.oauth,clientId:n.userPoolClientId,provider:o,idpIdentifier:t,customState:e?.customState,preferPrivateSession:e?.options?.preferPrivateSession,options:{loginHint:e?.options?.loginHint,lang:e?.options?.lang,nonce:e?.options?.nonce,prompt:e?.options?.prompt},authSessionOpener:e?.options?.authSessionOpener})}let X=async({oauthConfig:e,provider:t,idpIdentifier:n,clientId:o,customState:i,preferPrivateSession:r,options:a,authSessionOpener:d})=>{let{domain:u,redirectSignIn:E,responseType:m,scopes:h}=e,{loginHint:g,lang:x,nonce:f,prompt:S}=a??{},y=W(),I=d||O.A,R=i?`${y}-${i.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}`:y,{value:v,method:P,toCodeChallenge:w}=H(128),N=(0,M.B)(e.redirectSignIn);(0,s.j)()&&p.V.storeOAuthInFlight(!0),p.V.storeOAuthState(R),p.V.storePKCE(v);let T=new URLSearchParams([["redirect_uri",N],["response_type",m],["client_id",o]]);n?T.append("idp_identifier",n):T.append("identity_provider",t),T.append("scope",h.join(" ")),g&&T.append("login_hint",g),x&&T.append("lang",x),f&&T.append("nonce",f),S&&T.append("prompt",S.toLowerCase()),T.append("state",R),"code"===m&&(T.append("code_challenge",w()),T.append("code_challenge_method",P));let U=`https://${u}/oauth2/authorize?${T.toString()}`;G(p.V);let{type:F,error:_,url:b}=await I(U,E,r)??{};try{if("error"===F)throw A(String(_));if("canceled"===F)throw A(String(F));"success"===F&&b&&await C({currentUrl:b,clientId:o,domain:u,redirectUri:N,responseType:m,userAgentValue:(0,l.W)(c.g4.SignInWithRedirect),preferPrivateSession:r})}catch(e){throw await D(e),e}}},40885:function(e,t,n){n.d(t,{G:function(){return C}});var o=n(29676),i=n(87433),r=n(44427),a=n(4731),s=n(26014),c=n(71275),d=n(28058),l=n(89700),p=n(
195696),u=n(94470),E=n(55274),m=n(85230),h=n(83189),g=n(66986),x=n(9825),f=n(32440),S=n(99794),y=n(38247),I=n(91555);async function R({username:e,clientMetadata:t,config:n,tokenOrchestrator:o,preferredChallenge:i,password:s,session:c}){let{userPoolId:d,userPoolClientId:l,userPoolEndpoint:p}=n,u=(0,h.u)({username:e,userPoolId:d,userPoolClientId:l}),E={USERNAME:e};if(i){if("PASSWORD_SRP"===i)return(0,a.n)(!!s,r.X.EmptySignInPassword),(0,y.h)({username:e,password:s,clientMetadata:t,config:n,tokenOrchestrator:o,authFlow:"USER_AUTH",preferredChallenge:i});"PASSWORD"===i&&((0,a.n)(!!s,r.X.EmptySignInPassword),E.PASSWORD=s),E.PREFERRED_CHALLENGE=i}let R={AuthFlow:"USER_AUTH",AuthParameters:E,ClientMetadata:t,ClientId:l,UserContextData:u};c&&(R.Session=c);let A=(0,g.N)({endpointResolver:(0,x.e)({endpointOverride:p})}),v=await A({region:(0,f.y)(d),userAgentValue:(0,S.W)(m.g4.SignIn)},R);return(0,I.r)(e),v}var A=n(53366),v=n(76522);async function C(e){let{username:t,password:n,options:m}=e,h=o.d.getConfig().Auth?.Cognito,g={loginId:t,authFlowType:"USER_AUTH"};(0,i.FG)(h);let x=m?.clientMetadata,f=m?.preferredChallenge;(0,a.n)(!!t,r.X.EmptySignInUsername);try{let e={username:t,config:h,tokenOrchestrator:E.C,clientMetadata:x,preferredChallenge:f,password:n},o=d.E.getState();o.active&&o.username===t&&(e.session=o.session);let i=await R(e),r=(0,c.QS)(t);if((0,l.k4)({signInSession:i.Session,username:r,challengeName:i.ChallengeName,signInDetails:g}),i.AuthenticationResult)return await (0,p.x)({username:r,...i.AuthenticationResult,NewDeviceMetadata:await (0,A.F)({userPoolId:h.userPoolId,userPoolEndpoint:h.userPoolEndpoint,newDeviceMetadata:i.AuthenticationResult.NewDeviceMetadata,accessToken:i.AuthenticationResult.AccessToken}),signInDetails:g}),(0,l.fZ)(),await (0,u.O)(),(0,v.Dv)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,c.cP)({challengeName:i.ChallengeName,challengeParameters:i.ChallengeParameters,availableChallenges:"AvailableChallenges"in i?i.AvailableChallenges:void 0})}catch(t){(0,l.fZ)(),(0,v.Dv)(),(0,s.R)(t);let e=(0,c.yM)(t.name);if(e)return e;throw t}}},99389:function(e,t,n){n.d(t,{y:function(){return b}});var o=n(29676),i=n(87433),r=n(85230),a=n(4731),s=n(44427),c=n(32440),d=n(46101),l=n(85871),p=n(37835),u=n(65353),E=n(76522),m=n(11632),h=n(40885);function g(e,t){let n;return o=>{n||e(...o),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}let x=g(function(e,t,n){let o=Date.now(),i=setInterval(async()=>{if(Date.now()-o>18e4)clearInterval(i),n(new u.l({name:m.MA,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.Dv)();else try{let n=await (0,p.z)(e);"CONFIRM_SIGN_UP"!==n.nextStep.signInStep&&(t(n),clearInterval(i),(0,E.Dv)())}catch(e){clearInterval(i),n(e),(0,E.Dv)()}},5e3)},300),f=g(S,300);async function S(e,t,n){try{let n=e?.options?.authFlowType==="USER_AUTH"?await (0,h.G)(e):await (0,p.z)(e);t(n),(0,E.Dv)()}catch(e){n(e),(0,E.Dv)()}}function y(e){return async()=>new Promise((t,n)=>{f([e,t,n])})}var I=n(83189),R=n(99794),A=n(91742),v=n(48880),C=n(54585),P=n(26014),w=n(48509),N=n(28092),T=n(93957),U=n(26085);let F=()=>async e=>{if(e.statusCode>=300){let t=await (0,v.f)(e);if((0,P.R)(t),t.name===w.y3.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){let e=s.X.EmptySignUpPassword,{message:t,recoverySuggestion:n}=C.By[e];throw new u.l({name:e,message:t,recoverySuggestion:n})}throw new u.l({name:t.name,message:t.message})}return(0,v.e)(e)},M=e=>(0,A.z)(T.x,(0,N.u)("SignUp"),F(),{...U.n,...e});var D=n(9825),_=n(28058);async function b(e){let{username:t,password:n,options:p}=e,u=o.d.getConfig().Auth?.Cognito,m=u?.signUpVerificationMethod??"code",{clientMetadata:h,validationData:g,autoSignIn:f}=e.options??{};(0,i.FG)(u),(0,a.n)(!!t,s.X.EmptySignUpUsername);let S="boolean"!=typeof f?f:void 0,A={username:t,options:S};S?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(A.password=n);let{userPoolId:v,userPoolClientId:C,userPoolEndpoint:P}=u,w=M({endpointResolver:(0,D.e)({endpointOverride:P})}),N={Username:t,Password:void 0,UserAttributes:p?.userAttributes&&(0,d.J)(p?.userAttributes),ClientMetadata:h,ValidationData:g&&(0,d.J)(g),ClientId:C,UserContextData:(0,I.u)({username:t,userPoolId:v,userPoolClientId:C})};n&&(N.Password=n);let{UserSub:T,CodeDeliveryDetails:U,UserConfirmed:F,Session:b}=await w({region:(0,c.y)(v),userAgentValue:(0,R.W)(r.g4.SignUp)},N);(S||!0===f)&&(_.E.dispatch({type:"START"}),_.E.dispatch({type:"SET_USERNAME",value:t}),_.E.dispatch({type:"SET_SESSION",value:b}));let O={destination:U?.Destination,deliveryMedium:U?.DeliveryMedium,attributeName:U?.AttributeName},L=_.E.getState().active;if(F)return L?((0,E.I)(y(A)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:T}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:T};if(L){if("link"===m)return(0,E.I)(async()=>new Promise((e,t)=>
19{x([A,e,t])})),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:O},userId:T};!function(e){let t=l.qC.listen("auth-internal",async({payload:n})=>{if("confirmSignUp"===n.event){let o=n.data;o?.isSignUpComplete&&(l.qC.dispatch("auth-internal",{event:"autoSignIn"}),(0,E.I)(y(e)),t())}}),n=setTimeout(()=>{t(),clearTimeout(n),(0,E.Dv)()},18e4)}(A)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:O},userId:T}}},5696:function(e,t,n){n.d(t,{x:function(){return a}});var o=n(87433),i=n(75638),r=n(55274);async function a(e){if(e.AccessToken){let t,n,i;let a=(0,o.xp)(e.AccessToken),s=1e3*(a.payload.iat||0),c=new Date().getTime();e.RefreshToken&&(n=e.RefreshToken),e.IdToken&&(t=(0,o.xp)(e.IdToken)),e?.NewDeviceMetadata&&(i=e.NewDeviceMetadata);let d={accessToken:a,idToken:t,refreshToken:n,clockDrift:s>0?s-c:0,deviceMetadata:i,username:e.username};e?.signInDetails&&(d.signInDetails=e.signInDetails),await r.C.setTokens({tokens:d})}else throw new i._({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}},48509:function(e,t,n){var o,i,r,a,s,c,d,l,p,u,E,m,h,g,x,f,S,y,I,R,A,v,C,P,w,N,T,U,F,M,D,_,b,O,L,k,q,B,V,H,z,W,G,$,X,Z,K,j;n.d(t,{OK:function(){return x},y3:function(){return I}}),(w=o||(o={})).ConcurrentModificationException="ConcurrentModificationException",w.ForbiddenException="ForbiddenException",w.InternalErrorException="InternalErrorException",w.InvalidParameterException="InvalidParameterException",w.NotAuthorizedException="NotAuthorizedException",w.ResourceNotFoundException="ResourceNotFoundException",w.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",(N=i||(i={})).ForbiddenException="ForbiddenException",N.InternalErrorException="InternalErrorException",N.InvalidParameterException="InvalidParameterException",N.InvalidPasswordException="InvalidPasswordException",N.LimitExceededException="LimitExceededException",N.NotAuthorizedException="NotAuthorizedException",N.PasswordResetRequiredException="PasswordResetRequiredException",N.ResourceNotFoundException="ResourceNotFoundException",N.TooManyRequestsException="TooManyRequestsException",N.UserNotConfirmedException="UserNotConfirmedException",N.UserNotFoundException="UserNotFoundException",(T=r||(r={})).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=a||(a={})).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",(F=s||(s={})).AliasExistsException="AliasExistsException",F.CodeMismatchException="CodeMismatchException",F.ExpiredCodeException="ExpiredCodeException",F.ForbiddenException="ForbiddenException",F.InternalErrorException="InternalErrorException",F.InvalidLambdaResponseException="InvalidLambdaResponseException",F.InvalidParameterException="InvalidParameterException",F.LimitExceededException="LimitExceededException",F.NotAuthorizedException="NotAuthorizedException",F.ResourceNotFoundException="ResourceNotFoundException",F.TooManyFailedAttemptsException="TooManyFailedAttemptsException",F.TooManyRequestsException="TooManyRequestsException",F.UnexpectedLambdaException="UnexpectedLambdaException",F.UserLambdaValidationException="UserLambdaValidationException",F.UserNotFoundException="UserNotFoundException",(M=c||(c={})).ForbiddenException="ForbiddenException",M.InternalErrorException="InternalErrorException",M.InvalidParameterException="InvalidParameterException",M.NotAuthorizedException="NotAuthorizedException",M.PasswordResetRequiredException="PasswordResetRequiredException",M.ResourceNotFoundException="ResourceNotFoundException",M.TooManyRequestsException="TooManyRequestsException",M.UserNotConfirmedException="UserNotConfirmedException",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",(_=l||(l={})).ForbiddenException="ForbiddenException",_.InternalErrorException="InternalErrorException",_.InvalidParameterException="InvalidParameterException",_.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",_.NotAuthorizedException="NotAuthorizedException",_.PasswordResetRequiredException="PasswordResetRequiredException",_.ResourceNotFoundException="ResourceNotFoundException",_.TooManyRequestsException="TooManyRequestsException",_.UserNotConfirmedException="UserNotConfirmedException",_.UserNotFoundException="UserNotFoundException",(b=p||(p={})).CodeDeliveryFailureException="CodeDeliveryFailureException",b.ForbiddenException="ForbiddenException",b.InternalErrorException="InternalErrorException",b.InvalidEmailRoleAccessPol
19icyException="InvalidEmailRoleAccessPolicyException",b.InvalidLambdaResponseException="InvalidLambdaResponseException",b.InvalidParameterException="InvalidParameterException",b.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",b.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",b.LimitExceededException="LimitExceededException",b.NotAuthorizedException="NotAuthorizedException",b.ResourceNotFoundException="ResourceNotFoundException",b.TooManyRequestsException="TooManyRequestsException",b.UnexpectedLambdaException="UnexpectedLambdaException",b.UserLambdaValidationException="UserLambdaValidationException",b.UserNotFoundException="UserNotFoundException",(O=u||(u={})).ForbiddenException="ForbiddenException",O.InternalErrorException="InternalErrorException",O.InvalidParameterException="InvalidParameterException",O.NotAuthorizedException="NotAuthorizedException",O.PasswordResetRequiredException="PasswordResetRequiredException",O.ResourceNotFoundException="ResourceNotFoundException",O.TooManyRequestsException="TooManyRequestsException",O.UserNotConfirmedException="UserNotConfirmedException",O.UserNotFoundException="UserNotFoundException",(L=E||(E={})).ExternalServiceException="ExternalServiceException",L.InternalErrorException="InternalErrorException",L.InvalidParameterException="InvalidParameterException",L.LimitExceededException="LimitExceededException",L.NotAuthorizedException="NotAuthorizedException",L.ResourceConflictException="ResourceConflictException",L.ResourceNotFoundException="ResourceNotFoundException",L.TooManyRequestsException="TooManyRequestsException",(k=m||(m={})).ExternalServiceException="ExternalServiceException",k.InternalErrorException="InternalErrorException",k.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",k.InvalidParameterException="InvalidParameterException",k.NotAuthorizedException="NotAuthorizedException",k.ResourceConflictException="ResourceConflictException",k.ResourceNotFoundException="ResourceNotFoundException",k.TooManyRequestsException="TooManyRequestsException",(q=h||(h={})).CodeDeliveryFailureException="CodeDeliveryFailureException",q.ForbiddenException="ForbiddenException",q.InternalErrorException="InternalErrorException",q.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",q.InvalidLambdaResponseException="InvalidLambdaResponseException",q.InvalidParameterException="InvalidParameterException",q.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",q.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",q.LimitExceededException="LimitExceededException",q.NotAuthorizedException="NotAuthorizedException",q.PasswordResetRequiredException="PasswordResetRequiredException",q.ResourceNotFoundException="ResourceNotFoundException",q.TooManyRequestsException="TooManyRequestsException",q.UnexpectedLambdaException="UnexpectedLambdaException",q.UserLambdaValidationException="UserLambdaValidationException",q.UserNotConfirmedException="UserNotConfirmedException",q.UserNotFoundException="UserNotFoundException",(B=g||(g={})).ForbiddenException="ForbiddenException",B.InternalErrorException="InternalErrorException",B.InvalidParameterException="InvalidParameterException",B.NotAuthorizedException="NotAuthorizedException",B.PasswordResetRequiredException="PasswordResetRequiredException",B.ResourceNotFoundException="ResourceNotFoundException",B.TooManyRequestsException="TooManyRequestsException",B.UserNotConfirmedException="UserNotConfirmedException",(V=x||(x={})).PasswordResetRequiredException="PasswordResetRequiredException",V.ForbiddenException="ForbiddenException",V.InternalErrorException="InternalErrorException",V.InvalidLambdaResponseException="InvalidLambdaResponseException",V.InvalidParameterException="InvalidParameterException",V.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",V.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",V.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",V.NotAuthorizedException="NotAuthorizedException",V.ResourceNotFoundException="ResourceNotFoundException",V.TooManyRequestsException="TooManyRequestsException",V.UnexpectedLambdaException="UnexpectedLambdaException",V.UserLambdaValidationException="UserLambdaValidationException",V.UserNotConfirmedException="UserNotConfirmedException",V.UserNotFoundException="UserNotFoundException",(H=f||(f={})).CodeDeliveryFailureException="CodeDeliveryFailureException",H.ForbiddenException="ForbiddenException",H.InternalErrorException="InternalErrorException",H.InvalidEmailRoleAccessPol
19icyException="InvalidEmailRoleAccessPolicyException",H.InvalidLambdaResponseException="InvalidLambdaResponseException",H.InvalidParameterException="InvalidParameterException",H.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",H.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",H.LimitExceededException="LimitExceededException",H.NotAuthorizedException="NotAuthorizedException",H.ResourceNotFoundException="ResourceNotFoundException",H.TooManyRequestsException="TooManyRequestsException",H.UnexpectedLambdaException="UnexpectedLambdaException",H.UserLambdaValidationException="UserLambdaValidationException",H.UserNotFoundException="UserNotFoundException",(z=S||(S={})).AliasExistsException="AliasExistsException",z.CodeMismatchException="CodeMismatchException",z.ExpiredCodeException="ExpiredCodeException",z.ForbiddenException="ForbiddenException",z.InternalErrorException="InternalErrorException",z.InvalidLambdaResponseException="InvalidLambdaResponseException",z.InvalidParameterException="InvalidParameterException",z.InvalidPasswordException="InvalidPasswordException",z.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",z.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",z.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",z.MFAMethodNotFoundException="MFAMethodNotFoundException",z.NotAuthorizedException="NotAuthorizedException",z.PasswordResetRequiredException="PasswordResetRequiredException",z.ResourceNotFoundException="ResourceNotFoundException",z.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",z.TooManyRequestsException="TooManyRequestsException",z.UnexpectedLambdaException="UnexpectedLambdaException",z.UserLambdaValidationException="UserLambdaValidationException",z.UserNotConfirmedException="UserNotConfirmedException",z.UserNotFoundException="UserNotFoundException",(W=y||(y={})).ForbiddenException="ForbiddenException",W.InternalErrorException="InternalErrorException",W.InvalidParameterException="InvalidParameterException",W.NotAuthorizedException="NotAuthorizedException",W.PasswordResetRequiredException="PasswordResetRequiredException",W.ResourceNotFoundException="ResourceNotFoundException",W.UserNotConfirmedException="UserNotConfirmedException",W.UserNotFoundException="UserNotFoundException",(G=I||(I={})).CodeDeliveryFailureException="CodeDeliveryFailureException",G.InternalErrorException="InternalErrorException",G.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",G.InvalidLambdaResponseException="InvalidLambdaResponseException",G.InvalidParameterException="InvalidParameterException",G.InvalidPasswordException="InvalidPasswordException",G.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",G.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",G.NotAuthorizedException="NotAuthorizedException",G.ResourceNotFoundException="ResourceNotFoundException",G.TooManyRequestsException="TooManyRequestsException",G.UnexpectedLambdaException="UnexpectedLambdaException",G.UserLambdaValidationException="UserLambdaValidationException",G.UsernameExistsException="UsernameExistsException",($=R||(R={})).AliasExistsException="AliasExistsException",$.CodeDeliveryFailureException="CodeDeliveryFailureException",$.CodeMismatchException="CodeMismatchException",$.ExpiredCodeException="ExpiredCodeException",$.ForbiddenException="ForbiddenException",$.InternalErrorException="InternalErrorException",$.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",$.InvalidLambdaResponseException="InvalidLambdaResponseException",$.InvalidParameterException="InvalidParameterException",$.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",$.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",$.NotAuthorizedException="NotAuthorizedException",$.PasswordResetRequiredException="PasswordResetRequiredException",$.ResourceNotFoundException="ResourceNotFoundException",$.TooManyRequestsException="TooManyRequestsException",$.UnexpectedLambdaException="UnexpectedLambdaException",$.UserLambdaValidationException="UserLambdaValidationException",$.UserNotConfirmedException="UserNotConfirmedException",$.UserNotFoundException="UserNotFoundException",(X=A||(A={}
19)).CodeMismatchException="CodeMismatchException",X.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",X.ForbiddenException="ForbiddenException",X.InternalErrorException="InternalErrorException",X.InvalidParameterException="InvalidParameterException",X.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",X.NotAuthorizedException="NotAuthorizedException",X.PasswordResetRequiredException="PasswordResetRequiredException",X.ResourceNotFoundException="ResourceNotFoundException",X.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",X.TooManyRequestsException="TooManyRequestsException",X.UserNotConfirmedException="UserNotConfirmedException",X.UserNotFoundException="UserNotFoundException",(Z=v||(v={})).AliasExistsException="AliasExistsException",Z.CodeMismatchException="CodeMismatchException",Z.ExpiredCodeException="ExpiredCodeException",Z.ForbiddenException="ForbiddenException",Z.InternalErrorException="InternalErrorException",Z.InvalidParameterException="InvalidParameterException",Z.LimitExceededException="LimitExceededException",Z.NotAuthorizedException="NotAuthorizedException",Z.PasswordResetRequiredException="PasswordResetRequiredException",Z.ResourceNotFoundException="ResourceNotFoundException",Z.TooManyRequestsException="TooManyRequestsException",Z.UserNotConfirmedException="UserNotConfirmedException",Z.UserNotFoundException="UserNotFoundException",(K=C||(C={})).ForbiddenException="ForbiddenException",K.InternalErrorException="InternalErrorException",K.InvalidParameterException="InvalidParameterException",K.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",K.NotAuthorizedException="NotAuthorizedException",K.PasswordResetRequiredException="PasswordResetRequiredException",K.ResourceNotFoundException="ResourceNotFoundException",K.TooManyRequestsException="TooManyRequestsException",K.UserNotConfirmedException="UserNotConfirmedException",K.UserNotFoundException="UserNotFoundException",(j=P||(P={})).ForbiddenException="ForbiddenException",j.InternalErrorException="InternalErrorException",j.InvalidParameterException="InvalidParameterException",j.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",j.NotAuthorizedException="NotAuthorizedException",j.PasswordResetRequiredException="PasswordResetRequiredException",j.ResourceNotFoundException="ResourceNotFoundException",j.TooManyRequestsException="TooManyRequestsException",j.UserNotConfirmedException="UserNotConfirmedException",j.UserNotFoundException="UserNotFoundException"},94470:function(e,t,n){n.d(t,{O:function(){return s}});var o=n(85871),i=n(24810),r=n(11632),a=n(65353);let s=async()=>{try{o.Xb.dispatch("auth",{event:"signedIn",data:await (0,i.t)()},"Auth",o.SQ)}catch(e){if(e.name===r.Jg)throw new a.l({name:r.sX,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}}},53366:function(e,t,n){n.d(t,{F:function(){return h}});var o=n(92614);let i=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 r=n(91742),a=n(93957),s=n(28092),c=n(34724),d=n(26085);let l=e=>(0,r.z)(a.x,(0,s.u)("ConfirmDevice"),(0,c.o)(),{...d.n,...e});var p=n(9825),u=n(32440),E=n(15786),m=n(77981);async function h({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:r}){if(!n)return;let a=e.split("_")[1]||"",s=await (0,E.d)(a),c=n?.DeviceKey,d=n?.DeviceGroupKey;try{await s.generateHashDevice(d??"",c??"")}catch(e){return}let h={Salt:o.u.convert((0,m.z)(s.getSaltToHashDevices())),PasswordVerifier:o.u.convert((0,m.z)(s.getVerifierDevices()))},g=s.getRandomPassword();try{let o=l({endpointResolver:(0,p.e)({endpointOverride:t})});return await o({region:(0,u.y)(e)}
19,{AccessToken:r,DeviceName:await i(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:h}),{deviceKey:c,deviceGroupKey:d,randomPassword:g}}catch(e){return}}n(85370)},10220:function(e,t,n){n.d(t,{z:function(){return u}});var o=n(70029),i=n(9825),r=n(32440),a=n(63705),s=n(15786),c=n(45250),d=n(31057),l=n(87797),p=n(83189);async function u({username:e,config:t,clientMetadata:n,session:c,tokenOrchestrator:d}){let{userPoolId:l,userPoolEndpoint:p}=t,u=t.userPoolClientId,m=await d?.getDeviceMetadata(e);(0,a.tr)(m);let h=await (0,s.d)(m.deviceGroupKey),g={USERNAME:e,SRP_A:h.A.toString(16),DEVICE_KEY:m.deviceKey},x=(0,o.u)({endpointResolver:(0,i.e)({endpointOverride:p})}),{ChallengeParameters:f,Session:S}=await x({region:(0,r.y)(l)},{ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:g,ClientMetadata:n,Session:c});return E(e,f,n,S,h,t,d)}async function E(e,t,n,s,u,{userPoolId:E,userPoolClientId:m,userPoolEndpoint:h},g){let x=await g?.getDeviceMetadata(e);(0,a.tr)(x);let f=new l.Z(t?.SRP_B,16),S=new l.Z(t?.SALT,16),{deviceKey:y}=x,{deviceGroupKey:I}=x,R=await u.getPasswordAuthenticationKey({username:x.deviceKey,password:x.randomPassword,serverBValue:f,salt:S}),A=(0,c.H)(),v={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:A,PASSWORD_CLAIM_SIGNATURE:(0,d.i)({username:y,userPoolName:I,challengeParameters:t,dateNow:A,hkdf:R}),DEVICE_KEY:y},C=(0,p.u)({username:e,userPoolId:E,userPoolClientId:m});return(0,o.u)({endpointResolver:(0,i.e)({endpointOverride:h})})({region:(0,r.y)(E)},{ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:m,ChallengeResponses:v,Session:s,ClientMetadata:n,UserContextData:C})}},36902:function(e,t,n){n.d(t,{i:function(){return u}});var o=n(65353),i=n(70029),r=n(9825),a=n(32440),s=n(87797);n(85370);var c=n(45250),d=n(31057),l=n(83189),p=n(10220);async function u(e,t,n,u,E,m,h){let{userPoolId:g,userPoolClientId:x,userPoolEndpoint:f}=m,S=g?.split("_")[1]||"",y=new s.Z(t?.SRP_B,16),I=new s.Z(t?.SALT,16),R=t?.USER_ID_FOR_SRP;if(!R)throw new o.l({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});let A=await E.getPasswordAuthenticationKey({username:R,password:e,serverBValue:y,salt:I}),v=(0,c.H)(),C={USERNAME:R,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:v,PASSWORD_CLAIM_SIGNATURE:(0,d.i)({username:R,userPoolName:S,challengeParameters:t,dateNow:v,hkdf:A})},P=await h.getDeviceMetadata(R);P&&P.deviceKey&&(C.DEVICE_KEY=P.deviceKey);let w=(0,l.u)({username:R,userPoolId:g,userPoolClientId:x}),N=(0,i.u)({endpointResolver:(0,r.e)({endpointOverride:f})}),T=await N({region:(0,a.y)(g)},{ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:u,ClientId:x,UserContextData:w});return"DEVICE_SRP_AUTH"===T.ChallengeName?(0,p.z)({username:R,config:m,clientMetadata:n,session:T.Session,tokenOrchestrator:h}):T}},8228:function(e,t,n){n.d(t,{H:function(){return i}});var o=n(65353);async function i(e,t,n,i){try{return await e(...t)}catch(r){if(r instanceof o.l&&"ResourceNotFoundException"===r.name&&r.message.includes("Device does not exist."))return await i.clearDeviceMetadata(n),e(...t);throw r}}},91555:function(e,t,n){n.d(t,{r:function(){return i}});var o=n(89700);function i(e){let{dispatch:t}=o.signInStore;t({type:"SET_USERNAME",value:e})}},71275:function(e,t,n){n.d(t,{OP:function(){return eE},QS:function(){return em},cP:function(){return ec},yM:function(){return ed},pB:function(){return ea},Mf:function(){return es},x6:function(){return ei},U:function(){return er}});var o,i,r=n(29676),a=n(85230),s=n(87433),c=n(69514),d=n(65353),l=n(48509),p=n(54585),u=n(11632),E=n(24810),m=n(99794),h=n(66986),g=n(91742),x=n(93957),f=n(28092),S=n(34724),y=n(26085);let I=e=>(0,g.z)(x.x,(0,f.u)("AssociateSoftwareToken"),(0,S.o)(),{...y.n,...e});var R=n(9825),A=n(32440),v=n(70029),C=n(5696),P=n(94470),w=n(89700),N=n(75638),T=n(97808);let U="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 F extends N._{constructor(e){super(e),this.constructor=F,Object.setPrototypeOf(this,F.prototype)}}(o=i||(i={})).PasskeyNotSupported="PasskeyNotSupported",o.PasskeyAlreadyExists="PasskeyAlreadyExists",o.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",o.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",o.RelyingPartyMismatch="RelyingPartyMismatch",o.PasskeyRegistrationFailed="PasskeyRegistrationFailed",o.PasskeyRetrievalFailed="PasskeyRetrievalFailed",o.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",o.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",o.PasskeyOperationAborted="PasskeyOperationAborted";let M="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",D="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",_={[i.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:U},[i.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:D},[i.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:D},[i.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:U},[i.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."},[i.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[i.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:M},[i.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:M},[i.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:M},[i.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},b=(0,T.$)(_,F);var O=n(37701);let L=e=>{if(e instanceof Error){if("AbortError"===e.name){let{message:t,recoverySuggestion:n}=_[i.PasskeyOperationAborted];return new F({name:i.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if("SecurityError"===e.name){let{message:t,recoverySuggestion:n}=_[i.RelyingPartyMismatch];return new F({name:i.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new F({name:O.Z.Unknown,message:"An unknown error has occurred.",underlyingError:e})},k=e=>{if(e instanceof F)return e;if(e instanceof Error&&"NotAllowedError"===e.name){let{message:t,recoverySuggestion:n}=_[i.PasskeyAuthenticationCanceled];return new F({name:i.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return L(e)};var q=n(99262);let B=()=>(0,q.j)()&&window.isSecureContext&&"credentials"in navigator&&"function"==typeof window.PublicKeyCredential;var V=n(92614);let H=e=>V.u.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0});var z=n(70624);let W=e=>Uint8Array.from(z.$.convert(e,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,G=e=>{let t=W(e.challenge),n=(e.allowCredentials||[]).map(e=>({...e,id:W(e.id)}));return{...e,challenge:t,allowCredentials:n}},$=e=>{let t={clientDataJSON:H(e.response.clientDataJSON),authenticatorData:H(e.response.authenticatorData),signature:H(e.response.signature)};e.response.userHandle&&(t.userHandle=H(e.response.userHandle));let n={id:e.id,rawId:H(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n},X=async e=>{try{let t=B();b(t,i.PasskeyNotSupported);let n=G(e),o=await navigator.credentials.get({publicKey:n});return b(o&&o instanceof PublicKeyCredential&&o.response instanceof AuthenticatorAssertionResponse,i.PasskeyRetrievalFailed),$(o)}catch(e){throw k(e)}};var Z=n(53366);async function K(e){let t=r.d.getConfig().Auth?.Cognito;(0,s.FG)(t);
19let{username:n,signInSession:o,signInDetails:c,challengeName:l}=w.signInStore.getState();if("WEB_AUTHN"!==l||!n)throw new d.l({name:p.kq.SignInException,message:"Unable to proceed due to invalid sign in state."});let{CREDENTIAL_REQUEST_OPTIONS:u}=e;b(!!u,i.InvalidPasskeyAuthenticationOptions);let E=await X(JSON.parse(u)),h=(0,v.u)({endpointResolver:(0,R.e)({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:g,ChallengeParameters:x,AuthenticationResult:f,Session:S}=await h({region:(0,A.y)(t.userPoolId),userAgentValue:(0,m.W)(a.g4.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(E)},ClientId:t.userPoolClientId,Session:o});if((0,w.k4)({signInSession:S,username:n,challengeName:g,signInDetails:c}),f)return await (0,C.x)({...f,username:n,NewDeviceMetadata:await (0,Z.F)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:c}),w.signInStore.dispatch({type:"RESET_STATE"}),await (0,P.O)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if("WEB_AUTHN"===g)throw new d.l({name:p.kq.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:g,challengeParameters:x}}var j=n(38247),Y=n(15786);n(85370);var Q=n(83189),J=n(36902),ee=n(10220),et=n(8228),en=n(91555);let eo="userAttributes.";async function ei(e,t,n,o,i){let{userPoolClientId:r,userPoolId:s,userPoolEndpoint:c}=o,d={USERNAME:e,PASSWORD:t},l=await i.getDeviceMetadata(e);l&&l.deviceKey&&(d.DEVICE_KEY=l.deviceKey);let p=(0,Q.u)({username:e,userPoolId:s,userPoolClientId:r}),u=(0,h.N)({endpointResolver:(0,R.e)({endpointOverride:c})}),E=await u({region:(0,A.y)(s),userAgentValue:(0,m.W)(a.g4.SignIn)},{AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:d,ClientMetadata:n,ClientId:r,UserContextData:p}),g=E.ChallengeParameters?.USERNAME??E.ChallengeParameters?.USER_ID_FOR_SRP??e;return((0,en.r)(g),"DEVICE_SRP_AUTH"===E.ChallengeName)?(0,ee.z)({username:g,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:i}):E}async function er(e,t,n,o,i){return(0,j.h)({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:i,authFlow:"USER_SRP_AUTH"})}async function ea(e,t,n,o){let{userPoolClientId:i,userPoolId:r,userPoolEndpoint:s}=n,c={USERNAME:e},d=await o.getDeviceMetadata(e);d&&d.deviceKey&&(c.DEVICE_KEY=d.deviceKey);let l=(0,Q.u)({username:e,userPoolId:r,userPoolClientId:i}),p=(0,h.N)({endpointResolver:(0,R.e)({endpointOverride:s})}),u=await p({region:(0,A.y)(r),userAgentValue:(0,m.W)(a.g4.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:i,UserContextData:l}),E=u.ChallengeParameters?.USERNAME??e;return((0,en.r)(E),"DEVICE_SRP_AUTH"===u.ChallengeName)?(0,ee.z)({username:E,config:n,clientMetadata:t,session:u.Session,tokenOrchestrator:o}):u}async function es(e,t,n,o,i){(0,s.FG)(o);let{userPoolId:r,userPoolClientId:c,userPoolEndpoint:d}=o,l=r?.split("_")[1]||"",p=await (0,Y.d)(l),u={USERNAME:e,SRP_A:p.A.toString(16),CHALLENGE_NAME:"SRP_A"},E=(0,Q.u)({username:e,userPoolId:r,userPoolClientId:c}),g=(0,h.N)({endpointResolver:(0,R.e)({endpointOverride:d})}),{ChallengeParameters:x,Session:f}=await g({region:(0,A.y)(r),userAgentValue:(0,m.W)(a.g4.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:n,ClientId:c,UserContextData:E}),S=x?.USERNAME??e;return(0,en.r)(S),(0,et.H)(J.i,[t,x,n,f,p,o,i],S,i)}async function ec(e){var t;let{challengeName:n,challengeParameters:o,availableChallenges:i}=e,a=r.d.getConfig().Auth?.Cognito;switch((0,s.FG)(a),n){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:o}};case"MFA_SETUP":{let{signInSession:e,username:t}=w.signInStore.getState(),n=ep(eu(o.MFAS_CAN_SETUP))||[],i=n.filter(e=>"EMAIL"===e||"TOTP"===e),r=i.includes("TOTP"),s=i.includes("EMAIL");if(r&&s)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:i}};if(s)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(r){let n=I({endpointResolver:(0,R.e)({endpointOverride:a.userPoolEndpoint})}),{Session:o,SecretCode:i}=await n({region:(0,A.y)(a.userPoolId)},{Session:e});
19return w.signInStore.dispatch({type:"SET_SIGN_IN_SESSION",value:o}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:{sharedSecret:i,getSetupUri:(e,n)=>{let o=`otpauth://totp/${e}:${n??t}?secret=${i}&issuer=${e}`;return new c.a(o)}}}}}throw new d.l({name:p.kq.SignInException,message:`Cannot initiate MFA setup from available types: ${n}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:(t=o.requiredAttributes)?JSON.parse(t).map(e=>e.includes(eo)?e.replace(eo,""):e):[]}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:ep(eu(o.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:o.CODE_DELIVERY_DELIVERY_MEDIUM,destination:o.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:o.CODE_DELIVERY_DELIVERY_MEDIUM,destination:o.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{let e=await K(o);if("isSignedIn"in e&&"nextStep"in e)return e;return ec(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:i}}}throw new d.l({name:p.kq.SignInException,message:`An error occurred during the sign in process. ${n} challengeName returned by the underlying service was not addressed.`})}function ed(e){return e===l.OK.PasswordResetRequiredException?{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}}:e===l.OK.UserNotConfirmedException?{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}:void 0}function el(e){return"SMS_MFA"===e?"SMS":"SOFTWARE_TOKEN_MFA"===e?"TOTP":"EMAIL_OTP"===e?"EMAIL":void 0}function ep(e){if(e)return e.map(el).filter(Boolean)}function eu(e){return e?JSON.parse(e):[]}async function eE(){let e;try{e=await (0,E.t)()}catch(e){}if(e&&e.userId&&e.username)throw new d.l({name:u.EU,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function em(e){return w.signInStore.getState().username??e}},87797:function(e,t,n){let o,i,r;function a(e,t){null!=e&&this.fromString(e,t)}function s(){return new a(null,null)}n.d(t,{Z:function(){return a}});let c="undefined"!=typeof navigator;c&&"Microsoft Internet Explorer"===navigator.appName?(a.prototype.am=function(e,t,n,o,i,r){let a=32767&t,s=t>>15;for(;--r>=0;){let t=32767&this[e],r=this[e++]>>15,c=s*t+r*a;i=((t=a*t+((32767&c)<<15)+n[o]+(1073741823&i))>>>30)+(c>>>15)+s*r+(i>>>30),n[o++]=1073741823&t}return i},o=30):c&&"Netscape"!==navigator.appName?(a.prototype.am=function(e,t,n,o,i,r){for(;--r>=0;){let r=t*this[e++]+n[o]+i;i=Math.floor(r/67108864),n[o++]=67108863&r}return i},o=26):(a.prototype.am=function(e,t,n,o,i,r){let a=16383&t,s=t>>14;for(;--r>=0;){let t=16383&this[e],r=this[e++]>>14,c=s*t+r*a;i=((t=a*t+((16383&c)<<14)+n[o]+i)>>28)+(c>>14)+s*r,n[o++]=268435455&t}return i},o=28),a.prototype.DB=o,a.prototype.DM=(1<<o)-1,a.prototype.DV=1<<o,a.prototype.FV=4503599627370496,a.prototype.F1=52-o,a.prototype.F2=2*o-52;let d=[];for(r=0,i=48;r<=9;++r)d[i++]=r;for(r=10,i=97;r<36;++r)d[i++]=r;for(r=10,i=65;r<36;++r)d[i++]=r;function l(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function p(e){let t=s();return t.fromInt(e),t}function u(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 E(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}E.prototype.convert=function(e){let t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(a.ZERO)>0&&this.m.subTo(t,t),t},E.prototype.revert=function(e){let t=s();return e.copyTo(t),this.reduce(t),t},E.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)},E.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},E.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},a.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},a.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},a.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=d[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&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){let e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t},a.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},a.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},a.prototype.lShiftTo=function(e,t){let n;let o=e%this.DB,i=this.DB-o,r=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<o&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>i|s,s=(this[n]&r)<<o;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},a.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()},a.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()},a.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&&a.ZERO.subTo(t,t)},a.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()},a.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=s());let r=s(),c=this.s,d=e.s,l=this.DB-u(o[o.t-1]);l>0?(o.lShiftTo(l,r),i.lShiftTo(l,n)):(o.copyTo(r),i.copyTo(n));let p=r.t,E=r[p-1];if(0===E)return;let m=E*(1<<this.F1)+(p>1?r[p-2]>>this.F2:0),h=this.FV/m,g=(1<<this.F1)/m,x=1<<this.F2,f=n.t,S=f-p,y=null===t?s():t;for(r.dlShiftTo(S,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),a.ONE.dlShiftTo(p,y),y.subTo(r,r);r.t<p;)r[r.t++]=0;for(;--S>=0;){let e=n[--f]===E?this.DM:Math.floor(n[f]*h+(n[f-1]+x)*g);if((n[f]+=r.am(0,e,n,S,0,p))<e)for(r.dlShiftTo(S,y),n.subTo(y,n);n[f]<--e;)n.subTo(y,n)}null!==t&&(n.drShiftTo(p,t),c!==d&&a.ZERO.subTo(t,t)),n.t=p,n.clamp(),l>0&&n.rShiftTo(l,n),c<0&&a.ZERO.subTo(n,n)},a.prototype.invDigit=function(){if(this.t<1)return 0;let e=this[0];if((1&e)==0)return 0;let t=3&e;
19return(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},a.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()},a.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="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(i=!0,r=l(n));a>=0;)s<t?n=(this[a]&(1<<s)-1)<<t-s|this[--a]>>(s+=this.DB-t):(n=this[a]>>(s-=t)&o,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(r+=l(n));return i?r:"0"},a.prototype.negate=function(){let e=s();return a.ZERO.subTo(this,e),e},a.prototype.abs=function(){return this.s<0?this.negate():this},a.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},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+u(this[this.t-1]^this.s&this.DM)},a.prototype.mod=function(e){let t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(a.ZERO)>0&&e.subTo(t,t),t},a.prototype.equals=function(e){return 0===this.compareTo(e)},a.prototype.add=function(e){let t=s();return this.addTo(e,t),t},a.prototype.subtract=function(e){let t=s();return this.subTo(e,t),t},a.prototype.multiply=function(e){let t=s();return this.multiplyTo(e,t),t},a.prototype.divide=function(e){let t=s();return this.divRemTo(e,t,null),t},a.prototype.modPow=function(e,t,n){let o,i,r,a=e.bitLength(),c=p(1),d=new E(t);if(a<=0)return c;let l=[],m=3,h=(o=a<18?1:a<48?3:a<144?4:a<768?5:6)-1,g=(1<<o)-1;if(l[1]=d.convert(this),o>1){let e=s();for(d.sqrTo(l[1],e);m<=g;)l[m]=s(),d.mulTo(e,l[m-2],l[m]),m+=2}let x=e.t-1,f=!0,S=s();for(a=u(e[x])-1;x>=0;){for(a>=h?i=e[x]>>a-h&g:(i=(e[x]&(1<<a+1)-1)<<h-a,x>0&&(i|=e[x-1]>>this.DB+a-h)),m=o;(1&i)==0;)i>>=1,--m;if((a-=m)<0&&(a+=this.DB,--x),f)l[i].copyTo(c),f=!1;else{for(;m>1;)d.sqrTo(c,S),d.sqrTo(S,c),m-=2;m>0?d.sqrTo(c,S):(r=c,c=S,S=r),d.mulTo(S,l[i],c)}for(;x>=0&&(e[x]&1<<a)==0;)d.sqrTo(c,S),r=c,c=S,S=r,--a<0&&(a=this.DB-1,--x)}let y=d.revert(c);return n(null,y),y},a.ZERO=p(0),a.ONE=p(1)},10642:function(e,t,n){n.d(t,{$v:function(){return o},H3:function(){return r},rt:function(){return i}});let o="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",i={},r={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),i[e]=t,r[t]=e}},15786:function(e,t,n){n.d(t,{d:function(){return v}});var o=n(65353),i=n(78402),r=n(87797);let a=async({a:e,g:t,k:n,x:o,B:i,N:r,U:a})=>new Promise((s,c)=>{t.modPow(o,r,(t,d)=>{if(t){c(t);return}i.subtract(n.multiply(d)).modPow(e.add(a.multiply(o)),r,(e,t)=>{if(e){c(e);return}s(t.mod(r))})})});var s=n(77981),c=n(85370),d=n(10642);let l=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=d.rt[e[n]];return t},p=e=>{let t=new c.f;t.update(e);let n=l(t.digestSync());return Array(64-n.length).join("0")+n},u=e=>p((0,s.z)(e)),E=/^[89a-f]/i,m=e=>{if(!(e instanceof r.Z))throw Error("Not a BigInteger");let t=0>e.compareTo(r.Z.ZERO),n=e.abs().toString(16);if(n=n.length%2!=0?`0${n}`:n,n=E.test(n)?`00${n}`:n,t){let e=n.split("").map(e=>{let t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join("");(n=new r.Z(e,16).add(r.Z.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},h=({A:e,B:t})=>{let n=new r.Z(u(m(e)+m(t)),16);if(n.equals(r.Z.ZERO))throw Error("U cannot be zero.");return n},g=(e,t,n)=>{let o=new c.f(t);o.update(e);let i=o.digestSync(),r=new c.f(i);return r.update(n),r.digestSync().slice(0,16)};var x=n(72237);class f{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,x.MX)().getRandomValues(new Uint32Array(1))[0]);return new f(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 S=e=>{let t=new f().random(e).toString();return(0,s.z)(t)};var y=n(92614);let I=()=>y.u.convert(S(40));
19class R{constructor({userPoolName:e,a:t,g:n,A:o,N:a}){this.encoder=i.o,this.userPoolName=e,this.a=t,this.g=n,this.A=o,this.N=a,this.k=new r.Z(u(`${m(a)}${m(n)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new o.l({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new o.l({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new o.l({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,t){this.randomPassword=I();let n=p(`${e}${t}:${this.randomPassword}`),o=l(S(16));return this.saltToHashDevices=m(new r.Z(o,16)),new Promise((e,t)=>{this.g.modPow(new r.Z(u(this.saltToHashDevices+n),16),this.N,(n,o)=>{if(n){t(n);return}this.verifierDevices=m(o),e()})})}async getPasswordAuthenticationKey({username:e,password:t,serverBValue:n,salt:o}){if(n.mod(this.N).equals(r.Z.ZERO))throw Error("B cannot be zero.");let i=h({A:this.A,B:n}),c=p(`${this.userPoolName}${e}:${t}`),d=new r.Z(u(m(o)+c),16),l=await a({a:this.a,g:this.g,k:this.k,x:d,B:n,N:this.N,U:i}),E=this.encoder.convert("Caldera Derived Key"),x=this.encoder.convert("\x01"),f=new Uint8Array(E.byteLength+x.byteLength);return f.set(E,0),f.set(x,E.byteLength),g((0,s.z)(m(l)),(0,s.z)(m(i)),f)}}let A=async({a:e,g:t,N:n})=>new Promise((o,i)=>{t.modPow(e,n,(e,t)=>{if(e){i(e);return}if(t.mod(n).equals(r.Z.ZERO)){i(Error("Illegal parameter. A mod N cannot be 0."));return}o(t)})}),v=async e=>{let t=new r.Z(d.$v,16),n=new r.Z("2",16),o=C(),i=await A({a:o,g:n,N:t});return new R({userPoolName:e,a:o,g:n,A:i,N:t})},C=()=>{let e=l(S(128));return new r.Z(e,16)}},77981:function(e,t,n){n.d(t,{z:function(){return i}});var o=n(10642);let i=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 i=e.slice(n,n+2).toLowerCase();if(i in o.H3)t[n/2]=o.H3[i];else throw Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return t}},45250:function(e,t,n){n.d(t,{H:function(){return r}});let o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=()=>{let e=new Date,t=i[e.getUTCDay()],n=o[e.getUTCMonth()],r=e.getUTCDate(),a=e.getUTCHours();a<10&&(a=`0${a}`);let s=e.getUTCMinutes();s<10&&(s=`0${s}`);let c=e.getUTCSeconds();c<10&&(c=`0${c}`);let d=e.getUTCFullYear();return`${t} ${n} ${r} ${a}:${s}:${c} UTC ${d}`}},31057:function(e,t,n){n.d(t,{i:function(){return s}});var o=n(85370),i=n(92614),r=n(70624),a=n(78402);let s=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:s})=>{let d=a.o.convert(e),l=a.o.convert(t),p=c(n.SECRET_BLOCK),u=a.o.convert(r),E=new Uint8Array(d.byteLength+l.byteLength+p.byteLength+u.byteLength);E.set(d,0),E.set(l,d.byteLength),E.set(p,d.byteLength+l.byteLength),E.set(u,d.byteLength+l.byteLength+p.byteLength);let m=new o.f(s);m.update(E);let h=m.digestSync();return i.u.convert(h)},c=e=>{let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=r.$.convert(n),i=new Uint8Array(o.length);for(let e=0;e<o.length;++e)i[e]=o.charCodeAt(e);return i}},78402:function(e,t,n){n.d(t,{o:function(){return o}});let o={convert:e=>new TextEncoder().encode(e)}},83189:function(e,t,n){n.d(t,{u:function(){return o}});function o({username:e,userPoolId:t,userPoolClientId:n}){if("undefined"==typeof window)return;let o=window.AmazonCognitoAdvancedSecurityData;if(void 0===o)return;let i=o.getData(e,t,n);return i?{EncodedData:i}:{}}}}]);

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.