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CAI9D,CAAA,SAAS,MAAM,CAAG,CACpB,EAEA,UAAW,SAAS,CAAI,EACtB,IAAM,EAAU,SAAS,MAAM,CAAC,KAAK,CAAC,AAAI,OACxC,WAAa,EAAK,OAAO,CAAC,+BAAgC,QAAU,aAEtE,OAAO,EAAU,mBAAmB,CAAO,CAAC,EAAE,EAAI,KAAA,CACpD,EAGA,mBAAoB,WAClB,MAAO,AAAoC,aAApC,IAAI,CAAC,SAAS,CAAC,gBACxB,CACF,EAEA,IACA,EAAe,EACR,IAAM,EAAkB,IAAM,EAAc,kBAAkB,E,G,E","sources":["","auth.js","node_modules/aws-amplify/dist/esm/initSingleton.mjs","node_modules/aws-amplify/src/initSingleton.ts","node_modules/@aws-amplify/core/dist/esm/singleton/Amplify.mjs","node_modules/@aws-amplify/core/src/singleton/Amplify.ts","node_modules/@aws-amplify/core/dist/esm/Hub/index.mjs","node_modules/@aws-amplify/core/src/Hub/index.ts","node_modules/@aws-amplify/core/dist/esm/Logger/ConsoleLogger.mjs","node_modules/@aws-amplify/core/src/Logger/ConsoleLogger.ts","node_modules/@aws-amplify/core/dist/esm/constants.mjs","node_modules/@aws-amplify/core/src/constants.ts","node_modules/@aws-amplify/core/dist/esm/Logger/types.mjs","node_modules/@aws-amplify/core/src/Logger/types.ts","node_modules/@aws-amplify/core/dist/esm/errors/AmplifyError.mjs","node_modules/@aws-amplify/core/src/errors/AmplifyError.ts","node_modules/@aws-amplify/core/dist/esm/utils/deepFreeze.mjs","node_modules/@aws-amplify/core/src/utils/deepFreeze.ts","node_modules/@aws-amplify/core/dist/esm/singleton/constants.mjs","node_modules/@aws-amplify/core/src/singleton/constants.ts","node_modules/@aws-amplify/core/dist/esm/utils/parseAmplifyConfig.mjs","node_modules/@aws-amplify/core/src/utils/parseAmplifyConfig.ts","node_modules/@aws-amplify/core/dist/esm/parseAWSExports.mjs","node_modules/@aws-amplify/core/src/parseAWSExports.ts","node_modules/@aws-amplify/core/dist/esm/parseAmplifyOutputs.mjs","node_modules/@aws-amplify/core/src/parseAmplifyOutputs.ts","node_modules/@aws-crypto/sha256-js/src/index.ts","node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js","node_modules/@aws-crypto/sha256-js/src/jsSha256.ts","node_modules/tslib/tslib.es6.js","node_modules/@aws-crypto/sha256-js/build/module/constants.js","node_modules/@aws-crypto/sha256-js/src/constants.ts","node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js","node_modules/@aws-crypto/sha256-js/src/RawSha256.ts","node_modules/@aws-crypto/util/build/module/index.js","node_modules/@aws-crypto/util/src/index.ts","node_modules/@aws-crypto/util/build/module/convertToBuffer.js","node_modules/@aws-crypto/util/src/convertToBuffer.ts","node_modules/@smithy/util-utf8/dist-es/index.js","node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js","node_modules/@smithy/util-utf8/dist-es/toUint8Array.js","node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js","node_modules/buffer/index.js","node_modules/base64-js/index.js","node_modules/ieee754/index.js","node_modules/@aws-crypto/util/build/module/isEmptyData.js","node_modules/@aws-crypto/util/src/isEmptyData.ts","node_modules/@aws-crypto/util/build/module/numToUint8.js","node_modules/@aws-crypto/util/src/numToUint8.ts","node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js","node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts","node_modules/@smithy/util-hex-encoding/dist-es/index.js","node_modules/@aws-amplify/core/dist/esm/singleton/Auth/index.mjs","node_modules/@aws-amplify/core/src/singleton/Auth/index.ts","node_modules/@aws-amplify/core/dist/esm/storage/CookieStorage.mjs","node_modules/@aws-amplify/core/src/storage/CookieStorage.ts","node_modules/js-cookie/dist/js.cookie.js","node_modules/@aws-amplify/core/dist/esm/storage/index.mjs","node_modules/@aws-amplify/core/src/storage/index.ts","node_modules/@aws-amplify/core/dist/esm/storage/DefaultStorage.mjs","node_modules/@aws-amplify/core/src/storage/DefaultStorage.ts","node_modules/@aws-amplify/core/dist/esm/storage/KeyValueStorage.mjs","node_modules/@aws-amplify/core/src/storage/KeyValueStorage.ts","node_modules/@aws-amplify/core/dist/esm/errors/PlatformNotSupportedError.mjs","node_modules/@aws-amplify/core/src/errors/PlatformNotSupportedError.ts","node_modules/@aws-amplify/core/dist/esm/types/errors.mjs","node_modules/@aws-amplify/core/src/types/errors.ts","node_modules/@aws-amplify/core/dist/esm/storage/utils.mjs","node_modules/@aws-amplify/core/src/storage/utils.ts","node_modules/@aws-amplify/core/dist/esm/storage/InMemoryStorage.mjs","node_modules/@aws-amplify/core/src/storage/InMemoryStorage.ts","node_modules/@aws-amplify/core/dist/esm/storage/SessionStorage.mjs","node_modules/@aws-amplify/core/src/storage/SessionStorage.ts","node_modules/@aws-amplify/core/dist/esm/storage/SyncSessionStorage.mjs","node_modules/@aws-amplify/core/src/storage/SyncSessionStorage.ts","node_modules/@aws-amplify/core/dist/esm/storage/SyncKeyValueStorage.mjs","node_modules/@aws-amplify/core/src/storage/SyncKeyValueStorage.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/index.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/credentialsProvider/index.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdStore.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/credentialsProvider/IdentityIdStore.ts","node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/index.mjs","node_modules/@aws-amplify/core/src/singleton/Auth/utils/index.ts","node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/base64Decoder.mjs","node_modules/@aws-amplify/core/src/utils/convert/base64/base64Decoder.ts","node_modules/@aws-amplify/core/dist/esm/utils/globalHelpers/index.mjs","node_modules/@aws-amplify/core/src/utils/globalHelpers/index.ts","node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/errorHelpers.mjs","node_modules/@aws-amplify/core/src/singleton/Auth/utils/errorHelpers.ts","node_modules/@aws-amplify/core/dist/esm/errors/createAssertionFunction.mjs","node_modules/@aws-amplify/core/src/errors/createAssertionFunction.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/TokenStore.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/TokenStore.ts","node_modules/@aws-amplify/auth/dist/esm/errors/AuthError.mjs","node_modules/@aws-amplify/auth/src/errors/AuthError.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/types.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/types.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/errorHelpers.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/errorHelpers.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/constants.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/constants.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/types.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/credentialsProvider/types.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/credentialsProvider.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/credentialsProvider/credentialsProvider.ts","node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs","node_modules/@aws-amplify/core/src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts","node_modules/@aws-amplify/core/dist/esm/clients/serde/responseInfo.mjs","node_modules/@aws-amplify/core/src/clients/serde/responseInfo.ts","node_modules/@aws-amplify/core/dist/esm/clients/serde/json.mjs","node_modules/@aws-amplify/core/src/clients/serde/json.ts","node_modules/@aws-amplify/core/dist/esm/clients/internal/composeServiceApi.mjs","node_modules/@aws-amplify/core/src/clients/internal/composeServiceApi.ts","node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/base.mjs","node_modules/@aws-amplify/core/src/awsClients/cognitoIdentity/base.ts","node_modules/@aws-amplify/core/dist/esm/clients/endpoints/getDnsSuffix.mjs","node_modules/@aws-amplify/core/src/clients/endpoints/getDnsSuffix.ts","node_modules/@aws-amplify/core/dist/esm/clients/endpoints/partitions.mjs","node_modules/@aws-amplify/core/src/clients/endpoints/partitions.ts","node_modules/@aws-amplify/core/dist/esm/clients/handlers/unauthenticated.mjs","node_modules/@aws-amplify/core/src/clients/handlers/unauthenticated.ts","node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/middleware.mjs","node_modules/@aws-amplify/core/src/clients/middleware/retry/middleware.ts","node_modules/@aws-amplify/core/dist/esm/clients/middleware/userAgent/middleware.mjs","node_modules/@aws-amplify/core/src/clients/middleware/userAgent/middleware.ts","node_modules/@aws-amplify/core/dist/esm/clients/internal/composeTransferHandler.mjs","node_modules/@aws-amplify/core/src/clients/internal/composeTransferHandler.ts","node_modules/@aws-amplify/core/dist/esm/clients/handlers/fetch.mjs","node_modules/@aws-amplify/core/src/clients/handlers/fetch.ts","node_modules/@aws-amplify/core/dist/esm/clients/utils/memoization.mjs","node_modules/@aws-amplify/core/src/clients/utils/memoization.ts","node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/jitteredBackoff.mjs","node_modules/@aws-amplify/core/src/clients/middleware/retry/jitteredBackoff.ts","node_modules/@aws-amplify/core/dist/esm/utils/retry/jitteredBackoff.mjs","node_modules/@aws-amplify/core/src/utils/retry/jitteredBackoff.ts","node_modules/@aws-amplify/core/dist/esm/utils/retry/constants.mjs","node_modules/@aws-amplify/core/src/utils/retry/constants.ts","node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs","node_modules/@aws-amplify/core/src/clients/middleware/retry/defaultRetryDecider.ts","node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/isClockSkewError.mjs","node_modules/@aws-amplify/core/src/clients/middleware/retry/isClockSkewError.ts","node_modules/@aws-amplify/core/dist/esm/utils/amplifyUrl/index.mjs","node_modules/@aws-amplify/core/src/utils/amplifyUrl/index.ts","node_modules/@aws-amplify/core/dist/esm/Platform/index.mjs","node_modules/@aws-amplify/core/src/Platform/index.ts","node_modules/@aws-amplify/core/dist/esm/Platform/types.mjs","node_modules/@aws-amplify/core/src/Platform/types.ts","node_modules/@aws-amplify/core/dist/esm/Platform/version.mjs","node_modules/@aws-amplify/core/src/Platform/version.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detectFramework.mjs","node_modules/@aws-amplify/core/src/Platform/detectFramework.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/index.mjs","node_modules/@aws-amplify/core/src/Platform/detection/index.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/React.mjs","node_modules/@aws-amplify/core/src/Platform/detection/React.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/helpers.mjs","node_modules/@aws-amplify/core/src/Platform/detection/helpers.ts","node_modules/process/browser.js","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Vue.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Vue.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Svelte.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Svelte.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Next.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Next.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Nuxt.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Nuxt.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Angular.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Angular.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/ReactNative.mjs","node_modules/@aws-amplify/core/src/Platform/detection/ReactNative.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Expo.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Expo.ts","node_modules/@aws-amplify/core/dist/esm/Platform/detection/Web.mjs","node_modules/@aws-amplify/core/src/Platform/detection/Web.ts","node_modules/@aws-amplify/core/dist/esm/Platform/customUserAgent.mjs","node_modules/@aws-amplify/core/src/Platform/customUserAgent.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/parsers/regionParsers.mjs","node_modules/@aws-amplify/auth/src/foundation/parsers/regionParsers.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/types.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/types.ts","node_modules/@aws-amplify/auth/dist/esm/errors/constants.mjs","node_modules/@aws-amplify/auth/src/errors/constants.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdProvider.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/credentialsProvider/IdentityIdProvider.ts","node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getId.mjs","node_modules/@aws-amplify/core/src/awsClients/cognitoIdentity/getId.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/utils.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/credentialsProvider/utils.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/tokenProvider.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/tokenProvider.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/CognitoUserPoolsTokenProvider.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/CognitoUserPoolsTokenProvider.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/refreshAuthTokens.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/refreshAuthTokens.ts","node_modules/@aws-amplify/core/dist/esm/utils/deDupeAsyncFunction.mjs","node_modules/@aws-amplify/core/src/utils/deDupeAsyncFunction.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolSerializer.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolSerializer.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.ts","node_modules/@aws-amplify/auth/dist/esm/errors/utils/assertServiceError.mjs","node_modules/@aws-amplify/auth/src/errors/utils/assertServiceError.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/constants.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/constants.mjs","node_modules/@aws-amplify/auth/src/foundation/constants.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/factories/createCognitoUserPoolEndpointResolver.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/cognitoUserPoolEndpointResolver.mjs","node_modules/@aws-amplify/auth/src/foundation/cognitoUserPoolEndpointResolver.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/userContextData.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/userContextData.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/TokenOrchestrator.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/TokenOrchestrator.ts","node_modules/@aws-amplify/core/dist/esm/utils/isBrowser.mjs","node_modules/@aws-amplify/core/src/utils/isBrowser.ts","node_modules/@aws-amplify/core/dist/esm/utils/isTokenExpired.mjs","node_modules/@aws-amplify/core/src/utils/isTokenExpired.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthStore.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/oAuthStore.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signInWithRedirectStore.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/signInWithRedirectStore.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/inflightPromise.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/inflightPromise.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/getCurrentUser.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/getCurrentUser.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/internal/getCurrentUser.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/internal/getCurrentUser.ts","node_modules/@aws-amplify/core/dist/esm/singleton/apis/fetchAuthSession.mjs","node_modules/@aws-amplify/core/src/singleton/apis/fetchAuthSession.ts","node_modules/@aws-amplify/core/dist/esm/singleton/apis/internal/fetchAuthSession.mjs","node_modules/@aws-amplify/core/src/singleton/apis/internal/fetchAuthSession.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/fetchUserAttributes.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/fetchUserAttributes.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/internal/fetchUserAttributes.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/internal/fetchUserAttributes.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/apiHelpers.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/apiHelpers.ts","node_modules/@aws-amplify/auth/dist/esm/utils/getAuthUserAgentValue.mjs","node_modules/@aws-amplify/auth/src/utils/getAuthUserAgentValue.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signUp.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signUp.ts","node_modules/@aws-amplify/auth/dist/esm/errors/utils/assertValidationError.mjs","node_modules/@aws-amplify/auth/src/errors/utils/assertValidationError.ts","node_modules/@aws-amplify/auth/dist/esm/common/AuthErrorStrings.mjs","node_modules/@aws-amplify/auth/src/common/AuthErrorStrings.ts","node_modules/@aws-amplify/auth/dist/esm/errors/types/validation.mjs","node_modules/@aws-amplify/auth/src/errors/types/validation.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signUpHelpers.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/signUpHelpers.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signIn.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signIn.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signInHelpers.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/signInHelpers.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/types/errors.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/types/errors.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createVerifySoftwareTokenClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createVerifySoftwareTokenClient.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createAssociateSoftwareTokenClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createAssociateSoftwareTokenClient.ts","node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleWebAuthnSignInResult.mjs","node_modules/@aws-amplify/auth/src/client/flows/userAuth/handleWebAuthnSignInResult.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/cacheTokens.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/tokenProvider/cacheTokens.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/dispatchSignedInHubEvent.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/dispatchSignedInHubEvent.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/store/signInStore.mjs","node_modules/@aws-amplify/auth/src/client/utils/store/signInStore.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/errors.mjs","node_modules/@aws-amplify/auth/src/client/utils/passkey/errors.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/getPasskey.mjs","node_modules/@aws-amplify/auth/src/client/utils/passkey/getPasskey.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/getIsPasskeySupported.mjs","node_modules/@aws-amplify/auth/src/client/utils/passkey/getIsPasskeySupported.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/serde.mjs","node_modules/@aws-amplify/auth/src/client/utils/passkey/serde.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/convert/base64url/convertArrayBufferToBase64Url.mjs","node_modules/@aws-amplify/auth/src/foundation/convert/base64url/convertArrayBufferToBase64Url.ts","node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/base64Encoder.mjs","node_modules/@aws-amplify/core/src/utils/convert/base64/base64Encoder.ts","node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/bytesToString.mjs","node_modules/@aws-amplify/core/src/utils/convert/base64/bytesToString.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/convert/base64url/convertBase64UrlToArrayBuffer.mjs","node_modules/@aws-amplify/auth/src/foundation/convert/base64url/convertBase64UrlToArrayBuffer.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/types/index.mjs","node_modules/@aws-amplify/auth/src/client/utils/passkey/types/index.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/getNewDeviceMetadata.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/getNewDeviceMetadata.ts","node_modules/@aws-amplify/core/dist/esm/utils/deviceName/getDeviceName.mjs","node_modules/@aws-amplify/core/src/utils/deviceName/getDeviceName.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmDeviceClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmDeviceClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getAuthenticationHelper.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getAuthenticationHelper.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/AuthenticationHelper/AuthenticationHelper.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/AuthenticationHelper/AuthenticationHelper.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/textEncoder/index.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/textEncoder/index.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/BigInteger/BigInteger.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/BigInteger/BigInteger.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/calculate/calculateS.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/calculate/calculateS.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/calculate/calculateU.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/calculate/calculateU.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHashFromHex.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getHashFromHex.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getBytesFromHex.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getBytesFromHex.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/constants.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/constants.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHashFromData.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getHashFromData.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHexFromBytes.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getHexFromBytes.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getPaddedHex.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getPaddedHex.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHkdfKey.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getHkdfKey.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getRandomBytes.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getRandomBytes.ts","node_modules/@aws-amplify/core/dist/esm/utils/WordArray.mjs","node_modules/@aws-amplify/core/src/utils/WordArray.ts","node_modules/@aws-amplify/core/dist/esm/utils/cryptoSecureRandomInt.mjs","node_modules/@aws-amplify/core/src/utils/cryptoSecureRandomInt.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getRandomString.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getRandomString.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/calculate/calculateA.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/calculate/calculateA.ts","node_modules/@aws-amplify/auth/dist/esm/client/flows/shared/handlePasswordSRP.mjs","node_modules/@aws-amplify/auth/src/client/flows/shared/handlePasswordSRP.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/handlePasswordVerifierChallenge.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/handlePasswordVerifierChallenge.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getNowString.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getNowString.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getSignatureString.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/srp/getSignatureString.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/handleDeviceSRPAuth.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/handleDeviceSRPAuth.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/retryOnResourceNotFoundException.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/retryOnResourceNotFoundException.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/setActiveSignInUsername.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/setActiveSignInUsername.ts","node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleSelectChallenge.mjs","node_modules/@aws-amplify/auth/src/client/flows/userAuth/handleSelectChallenge.ts","node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleSelectChallengeWithPassword.mjs","node_modules/@aws-amplify/auth/src/client/flows/userAuth/handleSelectChallengeWithPassword.ts","node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.mjs","node_modules/@aws-amplify/auth/src/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithCustomAuth.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signInWithCustomAuth.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithCustomSRPAuth.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signInWithCustomSRPAuth.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithSRP.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signInWithSRP.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/autoSignIn.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/autoSignIn.ts","node_modules/@aws-amplify/auth/dist/esm/client/utils/store/autoSignInStore.mjs","node_modules/@aws-amplify/auth/src/client/utils/store/autoSignInStore.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithUserPassword.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signInWithUserPassword.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithUserAuth.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signInWithUserAuth.ts","node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleUserAuthFlow.mjs","node_modules/@aws-amplify/auth/src/client/flows/userAuth/handleUserAuthFlow.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmSignUp.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/confirmSignUp.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/resendSignUpCode.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/resendSignUpCode.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createResendConfirmationCodeClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createResendConfirmationCodeClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithRedirect.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signInWithRedirect.ts","node_modules/@aws-amplify/core/dist/esm/utils/urlSafeEncode.mjs","node_modules/@aws-amplify/core/src/utils/urlSafeEncode.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/enableOAuthListener.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/attemptCompleteOAuthFlow.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/attemptCompleteOAuthFlow.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthFlow.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/completeOAuthFlow.ts","node_modules/@aws-amplify/core/dist/esm/utils/urlSafeDecode.mjs","node_modules/@aws-amplify/core/src/utils/urlSafeDecode.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/createOAuthError.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/createOAuthError.ts","node_modules/@aws-amplify/auth/dist/esm/Errors.mjs","node_modules/@aws-amplify/auth/src/Errors.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/validateState.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/validateState.ts","node_modules/@aws-amplify/auth/dist/esm/types/Auth.mjs","node_modules/@aws-amplify/auth/src/types/Auth.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/getRedirectUrl.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleFailure.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/handleFailure.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/types/models.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/types/models.ts","node_modules/@aws-amplify/auth/dist/esm/utils/openAuthSession.mjs","node_modules/@aws-amplify/auth/src/utils/openAuthSession.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/generateCodeVerifier.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/generateCodeVerifier.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/generateState.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/generateState.ts","node_modules/@aws-amplify/core/dist/esm/utils/generateRandomString.mjs","node_modules/@aws-amplify/core/src/utils/generateRandomString.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/cancelOAuthFlow.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/cancelOAuthFlow.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signOut.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/signOut.ts","node_modules/@aws-amplify/core/dist/esm/singleton/apis/clearCredentials.mjs","node_modules/@aws-amplify/core/src/singleton/apis/clearCredentials.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/handleOAuthSignOut.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthSignOut.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/completeOAuthSignOut.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthSignOutRedirect.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/utils/oauth/oAuthSignOutRedirect.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/resetPassword.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/resetPassword.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createForgotPasswordClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createForgotPasswordClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmResetPassword.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/confirmResetPassword.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmForgotPasswordClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmForgotPasswordClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/updatePassword.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/updatePassword.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createChangePasswordClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createChangePasswordClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/updateUserAttributes.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/updateUserAttributes.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateUserAttributesClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateUserAttributesClient.ts","node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/deleteUser.mjs","node_modules/@aws-amplify/auth/src/providers/cognito/apis/deleteUser.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserClient.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserClient.ts","node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createEmptyResponseDeserializer.mjs","node_modules/@aws-amplify/auth/src/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createEmptyResponseDeserializer.ts","cookie-utils.js","cookie-manager.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequireeac0\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequireeac0\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"jUUxy\", function(module, exports) {\n\n$parcel$export(module.exports, \"Authentication\", () => $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3);\n\nvar $72z4V = parcelRequire(\"72z4V\");\n\nvar $2yfk2 = parcelRequire(\"2yfk2\");\nvar $kwYKv = parcelRequire(\"kwYKv\");\nvar $2Izdj = parcelRequire(\"2Izdj\");\nvar $xBcsQ = parcelRequire(\"xBcsQ\");\nvar $c7Zwg = parcelRequire(\"c7Zwg\");\nvar $8XrSp = parcelRequire(\"8XrSp\");\nvar $aqcy4 = parcelRequire(\"aqcy4\");\nvar $1YUHk = parcelRequire(\"1YUHk\");\nvar $eARfH = parcelRequire(\"eARfH\");\nvar $hPpH6 = parcelRequire(\"hPpH6\");\nvar $1XYd7 = parcelRequire(\"1XYd7\");\nvar $2q8Iv = parcelRequire(\"2q8Iv\");\nvar $bykg2 = parcelRequire(\"bykg2\");\nvar $ifW8F = parcelRequire(\"ifW8F\");\n\nvar $jpubH = parcelRequire(\"jpubH\");\nconst $e7ff1b009dd6583c$var$amplifyConfig = {\n Auth: {\n Cognito: {\n // Amazon Cognito Region\n region: 'ap-south-1',\n // Amazon Cognito User Pool ID\n userPoolId: 'ap-south-1_Nj3Dolrle',\n // Amazon Cognito Web Client ID\n userPoolClientId: '1ceovld7tjvubmpv7a81f6i00v',\n // OAuth configuration\n loginWith: {\n oauth: {\n domain: 'terraless-auth.auth.ap-south-1.amazoncognito.com',\n scope: [\n 'email',\n 'openid',\n 'profile'\n ],\n redirectSignIn: [\n window.location.origin\n ],\n redirectSignOut: [\n window.location.origin\n ],\n responseType: 'code'\n }\n }\n }\n }\n};\n// Initialize AWS Amplify\n(0, $72z4V.DefaultAmplify).configure($e7ff1b009dd6583c$var$amplifyConfig);\n// Simple Authentication module that leverages Cognito for auth operations\nconst $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3 = {\n // Check if user is authenticated\n checkStatus: async function() {\n try {\n const user = await (0, $2yfk2.getCurrentUser)();\n const session = await (0, $kwYKv.fetchAuthSession)();\n const attributes = await (0, $2Izdj.fetchUserAttributes)();\n return {\n isAuthenticated: true,\n user: {\n username: user.username,\n email: attributes.email,\n sub: attributes.sub,\n name: attributes.name || attributes.email\n }\n };\n } catch (error) {\n return {\n isAuthenticated: false,\n user: null\n };\n }\n },\n // Sign up with email and password (Cognito handles the rest)\n signUp: async function(email, password) {\n try {\n // Use email directly as the username - this will throw an error if email already exists\n const result = await (0, $xBcsQ.signUp)({\n username: email,\n password: password,\n options: {\n userAttributes: {\n email: email\n },\n autoSignIn: true\n }\n });\n console.log(\"User signup result:\", result);\n return {\n success: true,\n message: result.isSignUpComplete ? 'Registration successful! You can now sign in.' : 'Registration successful! Please check your email for a verification code.',\n userConfirmed: result.isSignUpComplete,\n username: email,\n email: email\n };\n } catch (error) {\n console.error('Error signing up:', error);\n $e7ff1b009dd6583c$var$loadingContainer.classList.remove('hidden');\n // Check if error is due to email already existing\n if (error.name === 'UsernameExistsException' || error.code === 'UsernameExistsException' || error.message && error.message.includes(\"User already exists\")) return {\n success: false,\n isExistingEmail: true,\n message: 'An account with this email already exists. Please sign in instead.'\n };\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Confirm signup\n confirmSignUp: async function(username, code) {\n try {\n await (0, $c7Zwg.confirmSignUp)({\n username: username,\n confirmationCode: code\n });\n return {\n success: true,\n message: 'Account confirmed successfully! You can now sign in.',\n username: username\n };\n } catch (error) {\n console.error('Error confirming sign up:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Resend confirmation code\n resendConfirmationCode: async function(username) {\n try {\n await (0, $8XrSp.resendSignUpCode)({\n username: username\n });\n return {\n success: true,\n message: 'Confirmation code has been resent successfully! Please check your email.'\n };\n } catch (error) {\n console.error('Error resending confirmation code:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Sign in with email and password\n signIn: async function(email, password) {\n try {\n // Since we're using email as username, no need for lookup\n const username = email;\n const { isSignedIn: isSignedIn, nextStep: nextStep } = await (0, $aqcy4.signIn)({\n username: username,\n password: password\n });\n // Check for challenges\n if (nextStep && nextStep.signInStep !== 'DONE') return {\n success: false,\n challengeName: nextStep.signInStep,\n message: 'Additional action required to complete sign-in.',\n user: {\n username: username\n }\n };\n // Get user attributes after successful sign-in\n const attributes = await (0, $2Izdj.fetchUserAttributes)();\n // Set authentication cookie (more secure than localStorage)\n (0, $jpubH.default).setCookie('isAuthenticated', 'true', {\n maxAge: 604800,\n secure: true,\n sameSite: 'strict'\n });\n return {\n success: true,\n message: 'Login successful!',\n user: {\n username: username,\n email: attributes.email,\n sub: attributes.sub\n }\n };\n } catch (error) {\n console.error('Error signing in:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Sign in with social provider\n federatedSignIn: async function(provider) {\n try {\n await (0, $1YUHk.signInWithRedirect)({\n provider: provider.toLowerCase(),\n customState: window.location.origin\n });\n // This will redirect to the provider's login page,\n // so the code below won't execute until after redirect back\n return {\n success: true,\n message: `Redirecting to ${provider} login...`\n };\n } catch (error) {\n console.error(`Error signing in with ${provider}:`, error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Sign out\n signOut: async function() {\n try {\n await (0, $eARfH.signOut)();\n // Clear authentication cookie\n (0, $jpubH.default).deleteCookie('isAuthenticated');\n (0, $jpubH.default).deleteCookie('serverStatus');\n return {\n success: true,\n message: 'Logged out successfully!'\n };\n } catch (error) {\n console.error('Error signing out:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Forgot password - request reset code\n forgotPassword: async function(email) {\n try {\n // Since we're using email as username, they are the same\n const { nextStep: nextStep } = await (0, $hPpH6.resetPassword)({\n email: email\n });\n return {\n success: true,\n message: 'Password reset code sent. Please check your email.',\n email: email\n };\n } catch (error) {\n console.error('Error in forgot password:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Reset password with verification code\n resetPassword: async function(email, code, newPassword) {\n try {\n await (0, $1XYd7.confirmResetPassword)({\n email: email,\n confirmationCode: code,\n newPassword: newPassword\n });\n return {\n success: true,\n message: 'Password has been reset successfully. You can now log in with your new password.'\n };\n } catch (error) {\n console.error('Error in reset password:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Get user-friendly authentication error messages\n getAuthErrorMessage: function(error) {\n const errorCode = error.code || error.name;\n switch(errorCode){\n case 'UserNotFoundException':\n return 'No account found with this username or email.';\n case 'NotAuthorizedException':\n return 'Incorrect username or password. Please try again.';\n case 'InvalidParameterException':\n return 'Invalid input. Please check your information and try again.';\n case 'UsernameExistsException':\n return 'An account with this username already exists.';\n case 'CodeMismatchException':\n return 'Invalid verification code. Please try again.';\n case 'UserNotConfirmedException':\n return 'Account not confirmed. Please check your email for confirmation code or go to the confirmation page.';\n case 'InvalidPasswordException':\n return 'Password does not meet requirements. Password must be at least 8 characters long with uppercase and lowercase letters, numbers, and special characters.';\n case 'LimitExceededException':\n return 'Attempt limit exceeded. Please try again later.';\n case 'ExpiredCodeException':\n return 'Verification code has expired. Please request a new one.';\n case 'NetworkError':\n return 'Network error. Please check your internet connection and try again.';\n case 'ResourceNotFoundException':\n return 'The requested resource was not found.';\n default:\n return error.message || 'An error occurred during authentication. Please try again.';\n }\n },\n // Get current authenticated user data\n getCurrentUser: async function() {\n try {\n const currentUser = await (0, $2yfk2.getCurrentUser)();\n const attributes = await (0, $2Izdj.fetchUserAttributes)();\n return {\n success: true,\n user: {\n username: currentUser.username,\n email: attributes.email,\n name: attributes.name || attributes.email,\n attributes: attributes\n }\n };\n } catch (error) {\n console.error('Error getting current user:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error),\n user: null\n };\n }\n },\n // Get JWT token for API calls\n getAuthToken: async function() {\n try {\n const session = await (0, $kwYKv.fetchAuthSession)();\n return session.tokens.idToken.toString();\n } catch (error) {\n console.error('Error getting auth token:', error);\n return null;\n }\n },\n // Change the password for the currently authenticated user\n changePassword: async function(oldPassword, newPassword) {\n try {\n await (0, $2q8Iv.updatePassword)({\n oldPassword: oldPassword,\n newPassword: newPassword\n });\n return {\n success: true,\n message: 'Password changed successfully!'\n };\n } catch (error) {\n console.error('Error changing password:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Update user attributes for the currently authenticated user\n updateUserAttributes: async function(attributes) {\n try {\n await (0, $bykg2.updateUserAttributes)({\n userAttributes: attributes\n });\n return {\n success: true,\n message: 'User attributes updated successfully!'\n };\n } catch (error) {\n console.error('Error updating user attributes:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n // Delete the currently authenticated user's account\n deleteAccount: async function() {\n try {\n await (0, $ifW8F.deleteUser)();\n return {\n success: true,\n message: 'Account deleted successfully!'\n };\n } catch (error) {\n console.error('Error deleting account:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n }\n};\n// Initialize page based on URL\nfunction $e7ff1b009dd6583c$var$initPage() {\n const path = window.location.pathname;\n const pageName = path.split('/').pop();\n // Check if user is authenticated\n $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.checkStatus().then((result)=>{\n const isAuthenticated = result.isAuthenticated;\n // Update auth-dependent UI elements\n $e7ff1b009dd6583c$var$updateAuthUI(isAuthenticated);\n // Initialize page-specific functionality\n if (pageName === 'auth.html' || pageName === '') $e7ff1b009dd6583c$var$setupLoginPage();\n else if (pageName === 'signup.html') $e7ff1b009dd6583c$var$setupSignupPage();\n else if (pageName === 'forgot-password.html') $e7ff1b009dd6583c$var$setupForgotPasswordPage();\n // Set up logout button on all pages\n $e7ff1b009dd6583c$var$setupLogoutButton();\n });\n}\n// Function to update UI elements based on authentication state\nfunction $e7ff1b009dd6583c$var$updateAuthUI(isAuthenticated) {\n const authLinks = document.querySelectorAll('.auth-dependent');\n if (authLinks) authLinks.forEach((link)=>{\n if (isAuthenticated) link.classList.remove('hidden');\n else link.classList.add('hidden');\n });\n const nonAuthLinks = document.querySelectorAll('.non-auth-dependent');\n if (nonAuthLinks) nonAuthLinks.forEach((link)=>{\n if (isAuthenticated) link.classList.add('hidden');\n else link.classList.remove('hidden');\n });\n}\n// Setup login page\nfunction $e7ff1b009dd6583c$var$setupLoginPage() {\n const loginForm = document.getElementById('login-form');\n if (!loginForm) return;\n const errorMessage = document.getElementById('error-message');\n const loadingContainer = document.getElementById('loading-container');\n // Set up login form submission\n loginForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n const email = document.getElementById('email').value;\n const password = document.getElementById('password').value;\n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n // Disable the submit button\n const submitButton = document.getElementById('submit-button');\n if (submitButton) submitButton.disabled = true;\n // Attempt to sign in\n const result = await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.signIn(email, password);\n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n if (result.success) // Redirect on successful login\n window.location.href = 'index.html';\n else {\n // Check for UserNotConfirmedException\n if (result.message && result.message.includes('not confirmed')) {\n // Store the email for the confirmation page\n localStorage.setItem('signup_email', email);\n // Ask user if they want to go to confirmation page\n if (confirm('Your account needs to be confirmed. Go to confirmation page?')) {\n window.location.href = 'confirmation.html?email=' + encodeURIComponent(email);\n return;\n }\n }\n // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n }\n });\n // Set up social login buttons\n const googleButton = document.getElementById('google-signin');\n if (googleButton) googleButton.addEventListener('click', async function() {\n await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.federatedSignIn('Google');\n });\n const amazonButton = document.getElementById('amazon-signin');\n if (amazonButton) amazonButton.addEventListener('click', async function() {\n await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.federatedSignIn('Amazon');\n });\n}\n// Setup signup page\nfunction $e7ff1b009dd6583c$var$setupSignupPage() {\n const signupForm = document.getElementById('signup-form');\n if (!signupForm) return;\n const errorMessage = document.getElementById('error-message');\n const loadingContainer = document.getElementById('loading-container');\n // Set up signup form submission\n signupForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n const email = document.getElementById('email').value;\n const password = document.getElementById('password').value;\n const confirmPassword = document.getElementById('confirm-password').value;\n // Validate passwords match\n if (password !== confirmPassword) {\n if (errorMessage) {\n errorMessage.textContent = 'Passwords do not match.';\n errorMessage.classList.remove('hidden');\n }\n return;\n }\n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n // Disable the submit button\n const submitButton = document.getElementById('signup-button');\n if (submitButton) submitButton.disabled = true;\n // Attempt to sign up\n console.log(email, password);\n const result = await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.signUp(email, password);\n console.log(result);\n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n if (result.success) {\n // Store the email for the confirmation page\n localStorage.setItem('signup_email', email);\n // Store password temporarily for auto-signin after confirmation\n localStorage.setItem('temp_password_' + email, password);\n // Check if user needs confirmation (in case auto sign-in is disabled)\n if (!result.userConfirmed) // Redirect to confirmation page\n window.location.href = 'confirmation.html?email=' + encodeURIComponent(email);\n else // Auto sign-in enabled, redirect to login page\n window.location.href = 'auth.html';\n } else {\n // Check if this is an existing email case\n if (result.isExistingEmail) {\n // Store the email for the login page\n localStorage.setItem('login_email', email);\n // Provide a clear message and option to redirect\n if (confirm(result.message + \" Would you like to go to the login page?\")) {\n window.location.href = 'auth.html';\n return;\n }\n }\n // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n }\n });\n}\n// Setup forgot password page\nfunction $e7ff1b009dd6583c$var$setupForgotPasswordPage() {\n const requestForm = document.getElementById('request-code-form');\n const resetForm = document.getElementById('reset-password-form');\n if (!requestForm && !resetForm) return;\n // Setup request password reset form\n if (requestForm) {\n const errorMessage = document.getElementById('request-error-message');\n const loadingContainer = document.getElementById('request-loading-container');\n requestForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n const username = document.getElementById('email').value;\n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n // Disable the submit button\n const submitButton = document.getElementById('request-button');\n if (submitButton) submitButton.disabled = true;\n // Attempt to send reset code\n const result = await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.forgotPassword(username);\n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n if (result.success) {\n // Store username for reset form\n sessionStorage.setItem('resetUsername', username);\n // Show reset form and hide request form\n requestForm.classList.add('hidden');\n if (resetForm) resetForm.classList.remove('hidden');\n } else // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n });\n }\n // Setup reset password form\n if (resetForm) {\n const errorMessage = document.getElementById('reset-error-message');\n const successMessage = document.getElementById('reset-success-message');\n const loadingContainer = document.getElementById('reset-loading-container');\n // Try to get username from session storage\n const username = sessionStorage.getItem('resetUsername');\n resetForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n const code = document.getElementById('verification-code').value;\n const newPassword = document.getElementById('new-password').value;\n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (successMessage) successMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n // Disable the submit button\n const submitButton = document.getElementById('reset-button');\n if (submitButton) submitButton.disabled = true;\n // Attempt to reset password\n const result = await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.resetPassword(username, code, newPassword);\n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n if (result.success) {\n // Show success message\n if (successMessage) {\n successMessage.textContent = result.message;\n successMessage.classList.remove('hidden');\n }\n // Redirect to login after a delay\n setTimeout(()=>{\n window.location.href = 'auth.html';\n }, 2000);\n } else // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n });\n }\n}\n// Setup logout button\nfunction $e7ff1b009dd6583c$var$setupLogoutButton() {\n const logoutButton = document.getElementById('logout-button');\n if (!logoutButton) return;\n logoutButton.addEventListener('click', async function() {\n await $e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3.signOut();\n window.location.href = 'index.html';\n });\n}\n// Initialize the page when DOM is loaded\ndocument.addEventListener('DOMContentLoaded', $e7ff1b009dd6583c$var$initPage);\n// Export the authentication module\nconst $e7ff1b009dd6583c$var$loadingContainer = document.getElementById('loading-container');\ndocument.addEventListener('DOMContentLoaded', ()=>{\n if ($e7ff1b009dd6583c$var$loadingContainer) $e7ff1b009dd6583c$var$loadingContainer.classList.add('hidden');\n});\n\n});\nparcelRegister(\"72z4V\", function(module, exports) {\n\n$parcel$export(module.exports, \"DefaultAmplify\", () => $8462ca0fe1ef67cb$export$11ac3725994bec7b);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\nvar $lKsZv = parcelRequire(\"lKsZv\");\nvar $57Of0 = parcelRequire(\"57Of0\");\n\nvar $guvIf = parcelRequire(\"guvIf\");\n\nvar $e2NQk = parcelRequire(\"e2NQk\");\nvar $54W3M = parcelRequire(\"54W3M\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $8462ca0fe1ef67cb$export$11ac3725994bec7b = {\n /**\n * Configures Amplify with the {@link resourceConfig} and {@link libraryOptions}.\n *\n * @param resourceConfig The {@link ResourcesConfig} object that is typically imported from the\n * `amplifyconfiguration.json` file. It can also be an object literal created inline when calling `Amplify.configure`.\n * @param libraryOptions The {@link LibraryOptions} additional options for the library.\n *\n * @example\n * import config from './amplifyconfiguration.json';\n *\n * Amplify.configure(config);\n */ configure (resourceConfig, libraryOptions) {\n const resolvedResourceConfig = (0, $guvIf.parseAmplifyConfig)(resourceConfig);\n // If no Auth config is provided, no special handling will be required, configure as is.\n // Otherwise, we can assume an Auth config is provided from here on.\n if (!resolvedResourceConfig.Auth) {\n (0, $1qbEC.Amplify).configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If Auth options are provided, always just configure as is.\n // Otherwise, we can assume no Auth libraryOptions were provided from here on.\n if (libraryOptions?.Auth) {\n (0, $1qbEC.Amplify).configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If no Auth libraryOptions were previously configured, then always add default providers.\n if (!(0, $1qbEC.Amplify).libraryOptions.Auth) {\n (0, $54W3M.cognitoUserPoolsTokenProvider).setAuthConfig(resolvedResourceConfig.Auth);\n (0, $54W3M.cognitoUserPoolsTokenProvider).setKeyValueStorage(// TODO: allow configure with a public interface\n libraryOptions?.ssr ? new (0, $lKsZv.CookieStorage)({\n sameSite: 'lax'\n }) : (0, $57Of0.defaultStorage));\n (0, $1qbEC.Amplify).configure(resolvedResourceConfig, {\n ...libraryOptions,\n Auth: {\n tokenProvider: (0, $54W3M.cognitoUserPoolsTokenProvider),\n credentialsProvider: (0, $e2NQk.cognitoCredentialsProvider)\n }\n });\n return;\n }\n // At this point, Auth libraryOptions would have been previously configured and no overriding\n // Auth options were given, so we should preserve the currently configured Auth libraryOptions.\n if (libraryOptions) {\n // If ssr is provided through libraryOptions, we should respect the intentional reconfiguration.\n if (libraryOptions.ssr !== undefined) (0, $54W3M.cognitoUserPoolsTokenProvider).setKeyValueStorage(// TODO: allow configure with a public interface\n libraryOptions.ssr ? new (0, $lKsZv.CookieStorage)({\n sameSite: 'lax'\n }) : (0, $57Of0.defaultStorage));\n (0, $1qbEC.Amplify).configure(resolvedResourceConfig, {\n Auth: (0, $1qbEC.Amplify).libraryOptions.Auth,\n ...libraryOptions\n });\n return;\n }\n // Finally, if there were no libraryOptions given at all, we should simply not touch the currently\n // configured libraryOptions.\n (0, $1qbEC.Amplify).configure(resolvedResourceConfig);\n },\n /**\n * Returns the {@link ResourcesConfig} object passed in as the `resourceConfig` parameter when calling\n * `Amplify.configure`.\n *\n * @returns An {@link ResourcesConfig} object.\n */ getConfig () {\n return (0, $1qbEC.Amplify).getConfig();\n }\n};\n\n});\nparcelRegister(\"1qbEC\", function(module, exports) {\n\n$parcel$export(module.exports, \"Amplify\", () => $30fdc25c6f443021$export$a3858a9a153cffc7);\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\n\n\n\n\nvar $iceoz = parcelRequire(\"iceoz\");\n\n\nvar $43O8I = parcelRequire(\"43O8I\");\n\n\nvar $guvIf = parcelRequire(\"guvIf\");\n\nparcelRequire(\"78v1Z\");\nparcelRequire(\"lUOK3\");\n\n\n\n\n\n\nvar $hMbLp = parcelRequire(\"hMbLp\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $30fdc25c6f443021$export$b412d755cfa0136 {\n constructor(){\n this.oAuthListener = undefined;\n this.resourcesConfig = {};\n this.libraryOptions = {};\n this.Auth = new (0, $hMbLp.AuthClass)();\n }\n /**\n * Configures Amplify for use with your back-end resources.\n *\n * @remarks\n * This API does not perform any merging of either `resourcesConfig` or `libraryOptions`. The most recently\n * provided values will be used after configuration.\n *\n * @remarks\n * `configure` can be used to specify additional library options where available for supported categories.\n *\n * @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.\n * @param libraryOptions - Additional options for customizing the behavior of the library.\n */ configure(resourcesConfig, libraryOptions) {\n const resolvedResourceConfig = (0, $guvIf.parseAmplifyConfig)(resourcesConfig);\n this.resourcesConfig = resolvedResourceConfig;\n if (libraryOptions) this.libraryOptions = libraryOptions;\n // Make resource config immutable\n this.resourcesConfig = (0, $iceoz.deepFreeze)(this.resourcesConfig);\n this.Auth.configure(this.resourcesConfig.Auth, this.libraryOptions.Auth);\n (0, $5RCQ5.Hub).dispatch('core', {\n event: 'configure',\n data: this.resourcesConfig\n }, 'Configure', (0, $5RCQ5.AMPLIFY_SYMBOL));\n this.notifyOAuthListener();\n }\n /**\n * Provides access to the current back-end resource configuration for the Library.\n *\n * @returns Returns the immutable back-end resource configuration.\n */ getConfig() {\n return this.resourcesConfig;\n }\n /** @internal */ [(0, $43O8I.ADD_OAUTH_LISTENER)](listener) {\n if (this.resourcesConfig.Auth?.Cognito.loginWith?.oauth) // when Amplify has been configured with a valid OAuth config while adding the listener, run it directly\n listener(this.resourcesConfig.Auth?.Cognito);\n else // otherwise register the listener and run it later when Amplify gets configured with a valid oauth config\n this.oAuthListener = listener;\n }\n notifyOAuthListener() {\n if (!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth || !this.oAuthListener) return;\n this.oAuthListener(this.resourcesConfig.Auth?.Cognito);\n // the listener should only be notified once with a valid oauth config\n this.oAuthListener = undefined;\n }\n}\n/**\n * The `Amplify` utility is used to configure the library.\n *\n * @remarks\n * `Amplify` orchestrates cross-category communication within the library.\n */ const $30fdc25c6f443021$export$a3858a9a153cffc7 = new $30fdc25c6f443021$export$b412d755cfa0136();\n\n});\nparcelRegister(\"5RCQ5\", function(module, exports) {\n\n$parcel$export(module.exports, \"AMPLIFY_SYMBOL\", () => $008d8f6886d8544f$export$aadf71dd9875dd20);\n$parcel$export(module.exports, \"Hub\", () => $008d8f6886d8544f$export$8c41bb232f1008b1);\n$parcel$export(module.exports, \"HubInternal\", () => $008d8f6886d8544f$export$45dde0743a4c8d6e);\n\nvar $gJw02 = parcelRequire(\"gJw02\");\n\nvar $1ZViM = parcelRequire(\"1ZViM\");\n\nvar $e0exy = parcelRequire(\"e0exy\");\n\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $008d8f6886d8544f$export$aadf71dd9875dd20 = typeof Symbol !== 'undefined' ? Symbol('amplify_default') : '@@amplify_default';\nconst $008d8f6886d8544f$var$logger = new (0, $gJw02.ConsoleLogger)('Hub');\nclass $008d8f6886d8544f$export$6b38ef2be9abbbb9 {\n constructor(name){\n this.listeners = new Map();\n this.protectedChannels = [\n 'core',\n 'auth',\n 'api',\n 'analytics',\n 'interactions',\n 'pubsub',\n 'storage',\n 'ui',\n 'xr'\n ];\n this.name = name;\n }\n /**\n * Used internally to remove a Hub listener.\n *\n * @remarks\n * This private method is for internal use only. Instead of calling Hub.remove, call the result of Hub.listen.\n */ _remove(channel, listener) {\n const holder = this.listeners.get(channel);\n if (!holder) {\n $008d8f6886d8544f$var$logger.warn(`No listeners for ${channel}`);\n return;\n }\n this.listeners.set(channel, [\n ...holder.filter(({ callback: callback })=>callback !== listener)\n ]);\n }\n dispatch(channel, payload, source, ampSymbol) {\n if (typeof channel === 'string' && this.protectedChannels.indexOf(channel) > -1) {\n const hasAccess = ampSymbol === $008d8f6886d8544f$export$aadf71dd9875dd20;\n if (!hasAccess) $008d8f6886d8544f$var$logger.warn(`WARNING: ${channel} is protected and dispatching on it can have unintended consequences`);\n }\n const capsule = {\n channel: channel,\n payload: {\n ...payload\n },\n source: source,\n patternInfo: []\n };\n try {\n this._toListeners(capsule);\n } catch (e) {\n $008d8f6886d8544f$var$logger.error(e);\n }\n }\n listen(channel, callback, listenerName = 'noname') {\n let cb;\n if (typeof callback !== 'function') throw new (0, $e0exy.AmplifyError)({\n name: (0, $1ZViM.NO_HUBCALLBACK_PROVIDED_EXCEPTION),\n message: 'No callback supplied to Hub'\n });\n else // Needs to be casted as a more generic type\n cb = callback;\n let holder = this.listeners.get(channel);\n if (!holder) {\n holder = [];\n this.listeners.set(channel, holder);\n }\n holder.push({\n name: listenerName,\n callback: cb\n });\n return ()=>{\n this._remove(channel, cb);\n };\n }\n _toListeners(capsule) {\n const { channel: channel, payload: payload } = capsule;\n const holder = this.listeners.get(channel);\n if (holder) holder.forEach((listener)=>{\n $008d8f6886d8544f$var$logger.debug(`Dispatching to ${channel} with `, payload);\n try {\n listener.callback(capsule);\n } catch (e) {\n $008d8f6886d8544f$var$logger.error(e);\n }\n });\n }\n}\n/* We export a __default__ instance of HubClass to use it as a\npseudo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events. */ const $008d8f6886d8544f$export$8c41bb232f1008b1 = new $008d8f6886d8544f$export$6b38ef2be9abbbb9('__default__');\n/**\n * @internal\n *\n * Internal hub used for core Amplify functionality. Not intended for use outside of Amplify.\n *\n */ const $008d8f6886d8544f$export$45dde0743a4c8d6e = new $008d8f6886d8544f$export$6b38ef2be9abbbb9('internal-hub');\n\n});\nparcelRegister(\"gJw02\", function(module, exports) {\n\n$parcel$export(module.exports, \"ConsoleLogger\", () => $4b398182966a4810$export$ba6a9c7ac8291f7f);\n\nvar $1ZViM = parcelRequire(\"1ZViM\");\n\nvar $4qg9e = parcelRequire(\"4qg9e\");\n/* eslint-disable no-console */ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $4b398182966a4810$var$LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6\n};\n/**\n * Write logs\n * @class Logger\n */ class $4b398182966a4810$export$ba6a9c7ac8291f7f {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */ constructor(name, level = (0, $4qg9e.LogType).WARN){\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return [\n this._padding(dt.getMinutes()),\n this._padding(dt.getSeconds())\n ].join(':') + '.' + dt.getMilliseconds();\n }\n configure(config) {\n if (!config) return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */ _log(type, ...msg) {\n let loggerLevelName = this.level;\n if ($4b398182966a4810$export$ba6a9c7ac8291f7f.LOG_LEVEL) loggerLevelName = $4b398182966a4810$export$ba6a9c7ac8291f7f.LOG_LEVEL;\n if (typeof window !== 'undefined' && window.LOG_LEVEL) loggerLevelName = window.LOG_LEVEL;\n const loggerLevel = $4b398182966a4810$var$LOG_LEVELS[loggerLevelName];\n const typeLevel = $4b398182966a4810$var$LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n let log = console.log.bind(console);\n if (type === (0, $4qg9e.LogType).ERROR && console.error) log = console.error.bind(console);\n if (type === (0, $4qg9e.LogType).WARN && console.warn) log = console.warn.bind(console);\n if ($4b398182966a4810$export$ba6a9c7ac8291f7f.BIND_ALL_LOG_LEVELS) {\n if (type === (0, $4qg9e.LogType).INFO && console.info) log = console.info.bind(console);\n if (type === (0, $4qg9e.LogType).DEBUG && console.debug) log = console.debug.bind(console);\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n } else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n } else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) obj = obj[0];\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n } else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables){\n const logEvent = {\n message: message,\n timestamp: Date.now()\n };\n plugin.pushLogs([\n logEvent\n ]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */ log(...msg) {\n this._log((0, $4qg9e.LogType).INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */ info(...msg) {\n this._log((0, $4qg9e.LogType).INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */ warn(...msg) {\n this._log((0, $4qg9e.LogType).WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */ error(...msg) {\n this._log((0, $4qg9e.LogType).ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */ debug(...msg) {\n this._log((0, $4qg9e.LogType).DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */ verbose(...msg) {\n this._log((0, $4qg9e.LogType).VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === (0, $1ZViM.AWS_CLOUDWATCH_CATEGORY)) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\n$4b398182966a4810$export$ba6a9c7ac8291f7f.LOG_LEVEL = null;\n$4b398182966a4810$export$ba6a9c7ac8291f7f.BIND_ALL_LOG_LEVELS = false;\n\n});\nparcelRegister(\"1ZViM\", function(module, exports) {\n\n$parcel$export(module.exports, \"AWS_CLOUDWATCH_CATEGORY\", () => $e362d339f3c21ca2$export$13470c6f1642bbce);\n$parcel$export(module.exports, \"USER_AGENT_HEADER\", () => $e362d339f3c21ca2$export$16032fc466434892);\n$parcel$export(module.exports, \"NO_HUBCALLBACK_PROVIDED_EXCEPTION\", () => $e362d339f3c21ca2$export$86d53207c3c20049);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Logging constants\nconst $e362d339f3c21ca2$export$13470c6f1642bbce = 'Logging';\nconst $e362d339f3c21ca2$export$16032fc466434892 = 'x-amz-user-agent';\n// Error exception code constants\nconst $e362d339f3c21ca2$export$86d53207c3c20049 = 'NoHubcallbackProvidedException';\n\n});\n\nparcelRegister(\"4qg9e\", function(module, exports) {\n\n$parcel$export(module.exports, \"LogType\", () => $efbbd0209ea980b7$export$a0472aa3a356446c);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $efbbd0209ea980b7$export$a0472aa3a356446c;\n(function(LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})($efbbd0209ea980b7$export$a0472aa3a356446c || ($efbbd0209ea980b7$export$a0472aa3a356446c = {}));\n\n});\n\n\nparcelRegister(\"e0exy\", function(module, exports) {\n\n$parcel$export(module.exports, \"AmplifyError\", () => $946cdba1e264a995$export$37321a6dace1881c);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $946cdba1e264a995$export$37321a6dace1881c extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */ constructor({ message: message, name: name, recoverySuggestion: recoverySuggestion, underlyingError: underlyingError }){\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = $946cdba1e264a995$export$37321a6dace1881c;\n Object.setPrototypeOf(this, $946cdba1e264a995$export$37321a6dace1881c.prototype);\n }\n}\n\n});\n\n\nparcelRegister(\"iceoz\", function(module, exports) {\n\n$parcel$export(module.exports, \"deepFreeze\", () => $35e949d961a4bb54$export$7e32b29e1cb162e1);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $35e949d961a4bb54$export$7e32b29e1cb162e1 = (object)=>{\n const propNames = Reflect.ownKeys(object);\n for (const name of propNames){\n const value = object[name];\n if (value && typeof value === 'object' || typeof value === 'function') $35e949d961a4bb54$export$7e32b29e1cb162e1(value);\n }\n return Object.freeze(object);\n};\n\n});\n\nparcelRegister(\"43O8I\", function(module, exports) {\n\n$parcel$export(module.exports, \"ADD_OAUTH_LISTENER\", () => $3ac22caa9341ca12$export$35210b3191d26437);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $3ac22caa9341ca12$export$35210b3191d26437 = Symbol('oauth-listener');\n\n});\n\nparcelRegister(\"guvIf\", function(module, exports) {\n\n$parcel$export(module.exports, \"parseAmplifyConfig\", () => $ef54e63dd8f4866f$export$f101a69cd6dc6202);\n\nvar $FIaO4 = parcelRequire(\"FIaO4\");\n\nvar $htw2G = parcelRequire(\"htw2G\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.\n *\n * @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.\n * @return A ResourcesConfig for the provided configuration object.\n */ const $ef54e63dd8f4866f$export$f101a69cd6dc6202 = (amplifyConfig)=>{\n if (Object.keys(amplifyConfig).some((key)=>key.startsWith('aws_'))) return (0, $FIaO4.parseAWSExports)(amplifyConfig);\n else if ((0, $htw2G.isAmplifyOutputs)(amplifyConfig)) return (0, $htw2G.parseAmplifyOutputs)(amplifyConfig);\n else return amplifyConfig;\n};\n\n});\nparcelRegister(\"FIaO4\", function(module, exports) {\n\n$parcel$export(module.exports, \"parseAWSExports\", () => $12e0f7072a5016a7$export$1ef2e9c2da492d);\n\nvar $gJw02 = parcelRequire(\"gJw02\");\n\nvar $e0exy = parcelRequire(\"e0exy\");\n\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $12e0f7072a5016a7$var$logger = new (0, $gJw02.ConsoleLogger)('parseAWSExports');\nconst $12e0f7072a5016a7$var$authTypeMapping = {\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n OPENID_CONNECT: 'oidc',\n NONE: 'none',\n AWS_LAMBDA: 'lambda',\n // `LAMBDA` is an incorrect value that was added during the v6 rewrite.\n // Keeping it as a valid value until v7 to prevent breaking customers who might\n // be relying on it as a workaround.\n // ref: https://github.com/aws-amplify/amplify-js/pull/12922\n // TODO: @v7 remove next line\n LAMBDA: 'lambda'\n};\n/**\n * Converts the object imported from `aws-exports.js` or `amplifyconfiguration.json` files generated by\n * the Amplify CLI into an object that conforms to the {@link ResourcesConfig}.\n *\n * @param config A configuration object imported from `aws-exports.js` or `amplifyconfiguration.json`.\n *\n * @returns An object that conforms to the {@link ResourcesConfig} .\n */ const $12e0f7072a5016a7$export$1ef2e9c2da492d = (config = {})=>{\n if (!Object.prototype.hasOwnProperty.call(config, 'aws_project_region')) throw new (0, $e0exy.AmplifyError)({\n name: 'InvalidParameterException',\n message: 'Invalid config parameter.',\n recoverySuggestion: 'Ensure passing the config object imported from `amplifyconfiguration.json`.'\n });\n const { aws_appsync_apiKey: aws_appsync_apiKey, aws_appsync_authenticationType: aws_appsync_authenticationType, aws_appsync_graphqlEndpoint: aws_appsync_graphqlEndpoint, aws_appsync_region: aws_appsync_region, aws_bots_config: aws_bots_config, aws_cognito_identity_pool_id: aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method: aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration: aws_cognito_mfa_configuration, aws_cognito_mfa_types: aws_cognito_mfa_types, aws_cognito_password_protection_settings: aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms: aws_cognito_verification_mechanisms, aws_cognito_signup_attributes: aws_cognito_signup_attributes, aws_cognito_social_providers: aws_cognito_social_providers, aws_cognito_username_attributes: aws_cognito_username_attributes, aws_mandatory_sign_in: aws_mandatory_sign_in, aws_mobile_analytics_app_id: aws_mobile_analytics_app_id, aws_mobile_analytics_app_region: aws_mobile_analytics_app_region, aws_user_files_s3_bucket: aws_user_files_s3_bucket, aws_user_files_s3_bucket_region: aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing: aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id: aws_user_pools_id, aws_user_pools_web_client_id: aws_user_pools_web_client_id, geo: geo, oauth: oauth, predictions: predictions, aws_cloud_logic_custom: aws_cloud_logic_custom, Notifications: Notifications, modelIntrospection: modelIntrospection } = config;\n const amplifyConfig = {};\n // Analytics\n if (aws_mobile_analytics_app_id) amplifyConfig.Analytics = {\n Pinpoint: {\n appId: aws_mobile_analytics_app_id,\n region: aws_mobile_analytics_app_region\n }\n };\n // Notifications\n const { InAppMessaging: InAppMessaging, Push: Push } = Notifications ?? {};\n if (InAppMessaging?.AWSPinpoint || Push?.AWSPinpoint) {\n if (InAppMessaging?.AWSPinpoint) {\n const { appId: appId, region: region } = InAppMessaging.AWSPinpoint;\n amplifyConfig.Notifications = {\n InAppMessaging: {\n Pinpoint: {\n appId: appId,\n region: region\n }\n }\n };\n }\n if (Push?.AWSPinpoint) {\n const { appId: appId, region: region } = Push.AWSPinpoint;\n amplifyConfig.Notifications = {\n ...amplifyConfig.Notifications,\n PushNotification: {\n Pinpoint: {\n appId: appId,\n region: region\n }\n }\n };\n }\n }\n // Interactions\n if (Array.isArray(aws_bots_config)) amplifyConfig.Interactions = {\n LexV1: Object.fromEntries(aws_bots_config.map((bot)=>[\n bot.name,\n bot\n ]))\n };\n // API\n if (aws_appsync_graphqlEndpoint) {\n const defaultAuthMode = $12e0f7072a5016a7$var$authTypeMapping[aws_appsync_authenticationType];\n if (!defaultAuthMode) $12e0f7072a5016a7$var$logger.debug(`Invalid authentication type ${aws_appsync_authenticationType}. Falling back to IAM.`);\n amplifyConfig.API = {\n GraphQL: {\n endpoint: aws_appsync_graphqlEndpoint,\n apiKey: aws_appsync_apiKey,\n region: aws_appsync_region,\n defaultAuthMode: defaultAuthMode ?? 'iam'\n }\n };\n if (modelIntrospection) amplifyConfig.API.GraphQL.modelIntrospection = modelIntrospection;\n }\n // Auth\n const mfaConfig = aws_cognito_mfa_configuration ? {\n status: aws_cognito_mfa_configuration && aws_cognito_mfa_configuration.toLowerCase(),\n totpEnabled: aws_cognito_mfa_types?.includes('TOTP') ?? false,\n smsEnabled: aws_cognito_mfa_types?.includes('SMS') ?? false\n } : undefined;\n const passwordFormatConfig = aws_cognito_password_protection_settings ? {\n minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,\n requireLowercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_LOWERCASE') ?? false,\n requireUppercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_UPPERCASE') ?? false,\n requireNumbers: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_NUMBERS') ?? false,\n requireSpecialCharacters: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_SYMBOLS') ?? false\n } : undefined;\n const mergedUserAttributes = Array.from(new Set([\n ...aws_cognito_verification_mechanisms ?? [],\n ...aws_cognito_signup_attributes ?? []\n ]));\n const userAttributes = mergedUserAttributes.reduce((attributes, key)=>({\n ...attributes,\n // All user attributes generated by the CLI are required\n [key.toLowerCase()]: {\n required: true\n }\n }), {});\n const loginWithEmailEnabled = aws_cognito_username_attributes?.includes('EMAIL') ?? false;\n const loginWithPhoneEnabled = aws_cognito_username_attributes?.includes('PHONE_NUMBER') ?? false;\n if (aws_cognito_identity_pool_id || aws_user_pools_id) amplifyConfig.Auth = {\n Cognito: {\n identityPoolId: aws_cognito_identity_pool_id,\n allowGuestAccess: aws_mandatory_sign_in !== 'enable',\n signUpVerificationMethod: aws_cognito_sign_up_verification_method,\n userAttributes: userAttributes,\n userPoolClientId: aws_user_pools_web_client_id,\n userPoolId: aws_user_pools_id,\n mfa: mfaConfig,\n passwordFormat: passwordFormatConfig,\n loginWith: {\n username: !(loginWithEmailEnabled || loginWithPhoneEnabled),\n email: loginWithEmailEnabled,\n phone: loginWithPhoneEnabled\n }\n }\n };\n const hasOAuthConfig = oauth ? Object.keys(oauth).length > 0 : false;\n const hasSocialProviderConfig = aws_cognito_social_providers ? aws_cognito_social_providers.length > 0 : false;\n if (amplifyConfig.Auth && hasOAuthConfig) amplifyConfig.Auth.Cognito.loginWith = {\n ...amplifyConfig.Auth.Cognito.loginWith,\n oauth: {\n ...$12e0f7072a5016a7$var$getOAuthConfig(oauth),\n ...hasSocialProviderConfig && {\n providers: $12e0f7072a5016a7$var$parseSocialProviders(aws_cognito_social_providers)\n }\n }\n };\n // Storage\n if (aws_user_files_s3_bucket) amplifyConfig.Storage = {\n S3: {\n bucket: aws_user_files_s3_bucket,\n region: aws_user_files_s3_bucket_region,\n dangerouslyConnectToHttpEndpointForTesting: aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing\n }\n };\n // Geo\n if (geo) {\n const { amazon_location_service: amazon_location_service } = geo;\n amplifyConfig.Geo = {\n LocationService: {\n maps: amazon_location_service.maps,\n geofenceCollections: amazon_location_service.geofenceCollections,\n searchIndices: amazon_location_service.search_indices,\n region: amazon_location_service.region\n }\n };\n }\n // REST API\n if (aws_cloud_logic_custom) amplifyConfig.API = {\n ...amplifyConfig.API,\n REST: aws_cloud_logic_custom.reduce((acc, api)=>{\n const { name: name, endpoint: endpoint, region: region, service: service } = api;\n return {\n ...acc,\n [name]: {\n endpoint: endpoint,\n ...service ? {\n service: service\n } : undefined,\n ...region ? {\n region: region\n } : undefined\n }\n };\n }, {})\n };\n // Predictions\n if (predictions) {\n // map VoiceId from speechGenerator defaults to voiceId\n const { VoiceId: voiceId } = predictions?.convert?.speechGenerator?.defaults ?? {};\n amplifyConfig.Predictions = voiceId ? {\n ...predictions,\n convert: {\n ...predictions.convert,\n speechGenerator: {\n ...predictions.convert.speechGenerator,\n defaults: {\n voiceId: voiceId\n }\n }\n }\n } : predictions;\n }\n return amplifyConfig;\n};\nconst $12e0f7072a5016a7$var$getRedirectUrl = (redirectStr)=>redirectStr?.split(',') ?? [];\nconst $12e0f7072a5016a7$var$getOAuthConfig = ({ domain: domain, scope: scope, redirectSignIn: redirectSignIn, redirectSignOut: redirectSignOut, responseType: responseType })=>({\n domain: domain,\n scopes: scope,\n redirectSignIn: $12e0f7072a5016a7$var$getRedirectUrl(redirectSignIn),\n redirectSignOut: $12e0f7072a5016a7$var$getRedirectUrl(redirectSignOut),\n responseType: responseType\n });\nconst $12e0f7072a5016a7$var$parseSocialProviders = (aws_cognito_social_providers)=>{\n return aws_cognito_social_providers.map((provider)=>{\n const updatedProvider = provider.toLowerCase();\n return updatedProvider.charAt(0).toUpperCase() + updatedProvider.slice(1);\n });\n};\n\n});\n\nparcelRegister(\"htw2G\", function(module, exports) {\n\n$parcel$export(module.exports, \"isAmplifyOutputs\", () => $7dcd6190391b2d90$export$99bf765e6322c00);\n$parcel$export(module.exports, \"parseAmplifyOutputs\", () => $7dcd6190391b2d90$export$11d0da171d17ab63);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $7dcd6190391b2d90$export$99bf765e6322c00(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version: version } = config;\n if (!version) return false;\n return version.startsWith('1');\n}\nfunction $7dcd6190391b2d90$var$parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) return undefined;\n const { bucket_name: bucket_name, aws_region: aws_region, buckets: buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && $7dcd6190391b2d90$var$createBucketInfoMap(buckets)\n }\n };\n}\nfunction $7dcd6190391b2d90$var$parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) return undefined;\n const { user_pool_id: user_pool_id, user_pool_client_id: user_pool_client_id, identity_pool_id: identity_pool_id, password_policy: password_policy, mfa_configuration: mfa_configuration, mfa_methods: mfa_methods, unauthenticated_identities_enabled: unauthenticated_identities_enabled, oauth: oauth, username_attributes: username_attributes, standard_required_attributes: standard_required_attributes, groups: groups } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups: groups\n }\n };\n if (identity_pool_id) authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id\n };\n if (password_policy) authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6\n };\n if (mfa_configuration) authConfig.Cognito.mfa = {\n status: $7dcd6190391b2d90$var$getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP')\n };\n if (unauthenticated_identities_enabled) authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n if (oauth) authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: $7dcd6190391b2d90$var$getOAuthProviders(oauth.identity_providers)\n }\n };\n if (username_attributes) authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username')\n };\n if (standard_required_attributes) authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr)=>({\n ...acc,\n [curr]: {\n required: true\n }\n }), {});\n return authConfig;\n}\nfunction $7dcd6190391b2d90$export$fbb0a2a08db9629a(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) return undefined;\n const { amazon_pinpoint: amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region\n }\n };\n}\nfunction $7dcd6190391b2d90$var$parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) return undefined;\n const { aws_region: aws_region, geofence_collections: geofence_collections, maps: maps, search_indices: search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps: maps\n }\n };\n}\nfunction $7dcd6190391b2d90$var$parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) return undefined;\n const { aws_region: aws_region, default_authorization_type: default_authorization_type, url: url, api_key: api_key, model_introspection: model_introspection } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: $7dcd6190391b2d90$var$getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection\n };\n return {\n GraphQL: GraphQL\n };\n}\nfunction $7dcd6190391b2d90$var$parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) return undefined;\n const { url: url, aws_region: aws_region, api_key: api_key, default_authorization_type: default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: $7dcd6190391b2d90$var$getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key\n };\n return {\n Events: Events\n };\n}\nfunction $7dcd6190391b2d90$var$parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) return undefined;\n const { aws_region: aws_region, channels: channels, amazon_pinpoint_app_id: amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) return undefined;\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region\n }\n };\n if (hasPushNotification) notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region\n }\n };\n return notificationsConfig;\n}\nfunction $7dcd6190391b2d90$export$11d0da171d17ab63(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) resourcesConfig.Storage = $7dcd6190391b2d90$var$parseStorage(amplifyOutputs.storage);\n if (amplifyOutputs.auth) resourcesConfig.Auth = $7dcd6190391b2d90$var$parseAuth(amplifyOutputs.auth);\n if (amplifyOutputs.analytics) resourcesConfig.Analytics = $7dcd6190391b2d90$export$fbb0a2a08db9629a(amplifyOutputs.analytics);\n if (amplifyOutputs.geo) resourcesConfig.Geo = $7dcd6190391b2d90$var$parseGeo(amplifyOutputs.geo);\n if (amplifyOutputs.data) resourcesConfig.API = $7dcd6190391b2d90$var$parseData(amplifyOutputs.data);\n if (amplifyOutputs.custom) {\n const customConfig = $7dcd6190391b2d90$var$parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) resourcesConfig.API = {\n ...resourcesConfig.API,\n ...customConfig\n };\n }\n if (amplifyOutputs.notifications) resourcesConfig.Notifications = $7dcd6190391b2d90$var$parseNotifications(amplifyOutputs.notifications);\n return resourcesConfig;\n}\nconst $7dcd6190391b2d90$var$authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc'\n};\nfunction $7dcd6190391b2d90$var$getGraphQLAuthMode(authType) {\n return $7dcd6190391b2d90$var$authModeNames[authType];\n}\nconst $7dcd6190391b2d90$var$providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple'\n};\nfunction $7dcd6190391b2d90$var$getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider)=>{\n if ($7dcd6190391b2d90$var$providerNames[provider] !== undefined) oAuthProviders.push($7dcd6190391b2d90$var$providerNames[provider]);\n return oAuthProviders;\n }, []);\n}\nfunction $7dcd6190391b2d90$var$getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL') return 'optional';\n if (mfaConfiguration === 'REQUIRED') return 'on';\n return 'off';\n}\nfunction $7dcd6190391b2d90$var$createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name: name, bucket_name: bucketName, aws_region: region, paths: paths })=>{\n if (name in mappedBuckets) throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n const sanitizedPaths = paths ? Object.entries(paths).reduce((acc, [key, value])=>{\n if (value !== undefined) acc[key] = value;\n return acc;\n }, {}) : undefined;\n mappedBuckets[name] = {\n bucketName: bucketName,\n region: region,\n paths: sanitizedPaths\n };\n });\n return mappedBuckets;\n}\n\n});\n\n\nparcelRegister(\"78v1Z\", function(module, exports) {\n$parcel$export(module.exports, \"Sha256\", () => (parcelRequire(\"4xNDb\")).Sha256);\nparcelRequire(\"4xNDb\");\n\n});\nparcelRegister(\"4xNDb\", function(module, exports) {\n\n$parcel$export(module.exports, \"Sha256\", () => $34f0be31e76b3852$export$3b58ea8124ac5e28);\n\nvar $7WQrb = parcelRequire(\"7WQrb\");\n\nvar $4saKg = parcelRequire(\"4saKg\");\n\nvar $bGlNU = parcelRequire(\"bGlNU\");\nparcelRequire(\"6dvWF\");\nvar $3cPkP = parcelRequire(\"3cPkP\");\nvar $ZB00P = parcelRequire(\"ZB00P\");\nvar $34f0be31e76b3852$export$3b58ea8124ac5e28 = /** @class */ function() {\n function Sha256(secret) {\n this.secret = secret;\n this.hash = new (0, $bGlNU.RawSha256)();\n this.reset();\n }\n Sha256.prototype.update = function(toHash) {\n if ((0, $ZB00P.isEmptyData)(toHash) || this.error) return;\n try {\n this.hash.update((0, $3cPkP.convertToBuffer)(toHash));\n } catch (e) {\n this.error = e;\n }\n };\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */ Sha256.prototype.digestSync = function() {\n if (this.error) throw this.error;\n if (this.outer) {\n if (!this.outer.finished) this.outer.update(this.hash.digest());\n return this.outer.digest();\n }\n return this.hash.digest();\n };\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */ Sha256.prototype.digest = function() {\n return (0, $7WQrb.__awaiter)(this, void 0, void 0, function() {\n return (0, $7WQrb.__generator)(this, function(_a) {\n return [\n 2 /*return*/ ,\n this.digestSync()\n ];\n });\n });\n };\n Sha256.prototype.reset = function() {\n this.hash = new (0, $bGlNU.RawSha256)();\n if (this.secret) {\n this.outer = new (0, $bGlNU.RawSha256)();\n var inner = $34f0be31e76b3852$var$bufferFromSecret(this.secret);\n var outer = new Uint8Array((0, $4saKg.BLOCK_SIZE));\n outer.set(inner);\n for(var i = 0; i < (0, $4saKg.BLOCK_SIZE); i++){\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n this.hash.update(inner);\n this.outer.update(outer);\n // overwrite the copied key in memory\n for(var i = 0; i < inner.byteLength; i++)inner[i] = 0;\n }\n };\n return Sha256;\n}();\nfunction $34f0be31e76b3852$var$bufferFromSecret(secret) {\n var input = (0, $3cPkP.convertToBuffer)(secret);\n if (input.byteLength > (0, $4saKg.BLOCK_SIZE)) {\n var bufferHash = new (0, $bGlNU.RawSha256)();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array((0, $4saKg.BLOCK_SIZE));\n buffer.set(input);\n return buffer;\n}\n\n});\nparcelRegister(\"7WQrb\", function(module, exports) {\n\n$parcel$export(module.exports, \"__awaiter\", () => $5c96a02c592fcff1$export$1050f835b63b671e);\n$parcel$export(module.exports, \"__generator\", () => $5c96a02c592fcff1$export$67ebef60e6f28a6);\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ var $5c96a02c592fcff1$var$extendStatics = function(d, b) {\n $5c96a02c592fcff1$var$extendStatics = Object.setPrototypeOf || ({\n __proto__: []\n }) instanceof Array && function(d, b) {\n d.__proto__ = b;\n } || function(d, b) {\n for(var p in b)if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return $5c96a02c592fcff1$var$extendStatics(d, b);\n};\nfunction $5c96a02c592fcff1$export$a8ba968b8961cb8a(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n $5c96a02c592fcff1$var$extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar $5c96a02c592fcff1$export$18ce0697a983be9b = function() {\n $5c96a02c592fcff1$export$18ce0697a983be9b = Object.assign || function __assign(t) {\n for(var s, i = 1, n = arguments.length; i < n; i++){\n s = arguments[i];\n for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return $5c96a02c592fcff1$export$18ce0697a983be9b.apply(this, arguments);\n};\nfunction $5c96a02c592fcff1$export$3c9a16f847548506(s, e) {\n var t = {};\n for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") {\n for(var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction $5c96a02c592fcff1$export$29e00dfd3077644b(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nfunction $5c96a02c592fcff1$export$d5ad3fd78186038f(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n}\nfunction $5c96a02c592fcff1$export$3a84e1ae4e97e9b0(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for(var i = decorators.length - 1; i >= 0; i--){\n var context = {};\n for(var p in contextIn)context[p] = p === \"access\" ? {} : contextIn[p];\n for(var p in contextIn.access)context.access[p] = contextIn.access[p];\n context.addInitializer = function(f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\nfunction $5c96a02c592fcff1$export$d831c04e792af3d(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for(var i = 0; i < initializers.length; i++)value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n return useValue ? value : void 0;\n}\nfunction $5c96a02c592fcff1$export$6a2a36740a146cb8(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\nfunction $5c96a02c592fcff1$export$d1a06452d3489bc7(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\nfunction $5c96a02c592fcff1$export$f1db080c865becb9(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nfunction $5c96a02c592fcff1$export$1050f835b63b671e(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function(resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction $5c96a02c592fcff1$export$67ebef60e6f28a6(thisArg, body) {\n var _ = {\n label: 0,\n sent: function() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() {\n return this;\n }), g;\n function verb(n) {\n return function(v) {\n return step([\n n,\n v\n ]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while(g && (g = 0, op[0] && (_ = 0)), _)try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [\n op[0] & 2,\n t.value\n ];\n switch(op[0]){\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [\n 0\n ];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [\n 6,\n e\n ];\n y = 0;\n } finally{\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nvar $5c96a02c592fcff1$export$45d3717a4c69092e = Object.create ? function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {\n enumerable: true,\n get: function() {\n return m[k];\n }\n };\n Object.defineProperty(o, k2, desc);\n} : function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nfunction $5c96a02c592fcff1$export$f33643c0debef087(m, o) {\n for(var p in m)if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) $5c96a02c592fcff1$export$45d3717a4c69092e(o, m, p);\n}\nfunction $5c96a02c592fcff1$export$19a8beecd37a4c45(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction $5c96a02c592fcff1$export$8d051b38c9118094(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally{\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally{\n if (e) throw e.error;\n }\n }\n return ar;\n}\nfunction $5c96a02c592fcff1$export$afc72e2116322959() {\n for(var ar = [], i = 0; i < arguments.length; i++)ar = ar.concat($5c96a02c592fcff1$export$8d051b38c9118094(arguments[i]));\n return ar;\n}\nfunction $5c96a02c592fcff1$export$6388937ca91ccae8() {\n for(var s = 0, i = 0, il = arguments.length; i < il; i++)s += arguments[i].length;\n for(var r = Array(s), k = 0, i = 0; i < il; i++)for(var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)r[k] = a[j];\n return r;\n}\nfunction $5c96a02c592fcff1$export$1216008129fb82ed(to, from, pack) {\n if (pack || arguments.length === 2) {\n for(var i = 0, l = from.length, ar; i < l; i++)if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nfunction $5c96a02c592fcff1$export$10c90e4f7922046c(v) {\n return this instanceof $5c96a02c592fcff1$export$10c90e4f7922046c ? (this.v = v, this) : new $5c96a02c592fcff1$export$10c90e4f7922046c(v);\n}\nfunction $5c96a02c592fcff1$export$e427f37a30a4de9b(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function() {\n return this;\n }, i;\n function awaitReturn(f) {\n return function(v) {\n return Promise.resolve(v).then(f, reject);\n };\n }\n function verb(n, f) {\n if (g[n]) {\n i[n] = function(v) {\n return new Promise(function(a, b) {\n q.push([\n n,\n v,\n a,\n b\n ]) > 1 || resume(n, v);\n });\n };\n if (f) i[n] = f(i[n]);\n }\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof $5c96a02c592fcff1$export$10c90e4f7922046c ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nfunction $5c96a02c592fcff1$export$bbd80228419bb833(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function(e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function() {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function(v) {\n return (p = !p) ? {\n value: $5c96a02c592fcff1$export$10c90e4f7922046c(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nfunction $5c96a02c592fcff1$export$e3b29a3d6162315f(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof $5c96a02c592fcff1$export$19a8beecd37a4c45 === \"function\" ? $5c96a02c592fcff1$export$19a8beecd37a4c45(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function() {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function(v) {\n return new Promise(function(resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function(v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nfunction $5c96a02c592fcff1$export$4fb47efe1390b86f(cooked, raw) {\n if (Object.defineProperty) Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n else cooked.raw = raw;\n return cooked;\n}\nvar $5c96a02c592fcff1$var$__setModuleDefault = Object.create ? function(o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function(o, v) {\n o[\"default\"] = v;\n};\nvar $5c96a02c592fcff1$var$ownKeys = function(o) {\n $5c96a02c592fcff1$var$ownKeys = Object.getOwnPropertyNames || function(o) {\n var ar = [];\n for(var k in o)if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return $5c96a02c592fcff1$var$ownKeys(o);\n};\nfunction $5c96a02c592fcff1$export$c21735bcef00d192(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) {\n for(var k = $5c96a02c592fcff1$var$ownKeys(mod), i = 0; i < k.length; i++)if (k[i] !== \"default\") $5c96a02c592fcff1$export$45d3717a4c69092e(result, mod, k[i]);\n }\n $5c96a02c592fcff1$var$__setModuleDefault(result, mod);\n return result;\n}\nfunction $5c96a02c592fcff1$export$da59b14a69baef04(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nfunction $5c96a02c592fcff1$export$d5dcaf168c640c35(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nfunction $5c96a02c592fcff1$export$d40a35129aaff81f(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nfunction $5c96a02c592fcff1$export$81fdc39f203e4e04(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\nfunction $5c96a02c592fcff1$export$88ac25d8e944e405(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() {\n try {\n inner.call(this);\n } catch (e) {\n return Promise.reject(e);\n }\n };\n env.stack.push({\n value: value,\n dispose: dispose,\n async: async\n });\n } else if (async) env.stack.push({\n async: true\n });\n return value;\n}\nvar $5c96a02c592fcff1$var$_SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\nfunction $5c96a02c592fcff1$export$8f076105dc360e92(env) {\n function fail(e) {\n env.error = env.hasError ? new $5c96a02c592fcff1$var$_SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while(r = env.stack.pop())try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {\n fail(e);\n return next();\n });\n } else s |= 1;\n } catch (e) {\n fail(e);\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\nfunction $5c96a02c592fcff1$export$889dfb5d17574b0b(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : d + ext + \".\" + cm.toLowerCase() + \"js\";\n });\n return path;\n}\nvar $5c96a02c592fcff1$export$2e2bcd8739ae039 = {\n __extends: $5c96a02c592fcff1$export$a8ba968b8961cb8a,\n __assign: $5c96a02c592fcff1$export$18ce0697a983be9b,\n __rest: $5c96a02c592fcff1$export$3c9a16f847548506,\n __decorate: $5c96a02c592fcff1$export$29e00dfd3077644b,\n __param: $5c96a02c592fcff1$export$d5ad3fd78186038f,\n __esDecorate: $5c96a02c592fcff1$export$3a84e1ae4e97e9b0,\n __runInitializers: $5c96a02c592fcff1$export$d831c04e792af3d,\n __propKey: $5c96a02c592fcff1$export$6a2a36740a146cb8,\n __setFunctionName: $5c96a02c592fcff1$export$d1a06452d3489bc7,\n __metadata: $5c96a02c592fcff1$export$f1db080c865becb9,\n __awaiter: $5c96a02c592fcff1$export$1050f835b63b671e,\n __generator: $5c96a02c592fcff1$export$67ebef60e6f28a6,\n __createBinding: $5c96a02c592fcff1$export$45d3717a4c69092e,\n __exportStar: $5c96a02c592fcff1$export$f33643c0debef087,\n __values: $5c96a02c592fcff1$export$19a8beecd37a4c45,\n __read: $5c96a02c592fcff1$export$8d051b38c9118094,\n __spread: $5c96a02c592fcff1$export$afc72e2116322959,\n __spreadArrays: $5c96a02c592fcff1$export$6388937ca91ccae8,\n __spreadArray: $5c96a02c592fcff1$export$1216008129fb82ed,\n __await: $5c96a02c592fcff1$export$10c90e4f7922046c,\n __asyncGenerator: $5c96a02c592fcff1$export$e427f37a30a4de9b,\n __asyncDelegator: $5c96a02c592fcff1$export$bbd80228419bb833,\n __asyncValues: $5c96a02c592fcff1$export$e3b29a3d6162315f,\n __makeTemplateObject: $5c96a02c592fcff1$export$4fb47efe1390b86f,\n __importStar: $5c96a02c592fcff1$export$c21735bcef00d192,\n __importDefault: $5c96a02c592fcff1$export$da59b14a69baef04,\n __classPrivateFieldGet: $5c96a02c592fcff1$export$d5dcaf168c640c35,\n __classPrivateFieldSet: $5c96a02c592fcff1$export$d40a35129aaff81f,\n __classPrivateFieldIn: $5c96a02c592fcff1$export$81fdc39f203e4e04,\n __addDisposableResource: $5c96a02c592fcff1$export$88ac25d8e944e405,\n __disposeResources: $5c96a02c592fcff1$export$8f076105dc360e92,\n __rewriteRelativeImportExtension: $5c96a02c592fcff1$export$889dfb5d17574b0b\n};\n\n});\n\nparcelRegister(\"4saKg\", function(module, exports) {\n\n$parcel$export(module.exports, \"BLOCK_SIZE\", () => $33e21cb3f745e23a$export$b2e3d6d444266a5c);\n$parcel$export(module.exports, \"DIGEST_LENGTH\", () => $33e21cb3f745e23a$export$d7bd469488748c5f);\n$parcel$export(module.exports, \"KEY\", () => $33e21cb3f745e23a$export$7167c830cefcb6b5);\n$parcel$export(module.exports, \"INIT\", () => $33e21cb3f745e23a$export$d788bc089976c004);\n$parcel$export(module.exports, \"MAX_HASHABLE_LENGTH\", () => $33e21cb3f745e23a$export$856b3d11dc447b50);\n/**\n * @internal\n */ var $33e21cb3f745e23a$export$b2e3d6d444266a5c = 64;\nvar $33e21cb3f745e23a$export$d7bd469488748c5f = 32;\nvar $33e21cb3f745e23a$export$7167c830cefcb6b5 = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\nvar $33e21cb3f745e23a$export$d788bc089976c004 = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\nvar $33e21cb3f745e23a$export$856b3d11dc447b50 = Math.pow(2, 53) - 1;\n\n});\n\nparcelRegister(\"bGlNU\", function(module, exports) {\n\n$parcel$export(module.exports, \"RawSha256\", () => $881487c8a44da5fa$export$aab6bc1ad3c77a42);\n\nvar $4saKg = parcelRequire(\"4saKg\");\n/**\n * @internal\n */ var $881487c8a44da5fa$export$aab6bc1ad3c77a42 = /** @class */ function() {\n function RawSha256() {\n this.state = Int32Array.from((0, $4saKg.INIT));\n this.temp = new Int32Array(64);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n /**\n * @internal\n */ this.finished = false;\n }\n RawSha256.prototype.update = function(data) {\n if (this.finished) throw new Error(\"Attempted to update an already finished hash.\");\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > (0, $4saKg.MAX_HASHABLE_LENGTH)) throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n while(byteLength > 0){\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n if (this.bufferLength === (0, $4saKg.BLOCK_SIZE)) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n };\n RawSha256.prototype.digest = function() {\n if (!this.finished) {\n var bitsHashed = this.bytesHashed * 8;\n var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);\n var undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % (0, $4saKg.BLOCK_SIZE) >= (0, $4saKg.BLOCK_SIZE) - 8) {\n for(var i = this.bufferLength; i < (0, $4saKg.BLOCK_SIZE); i++)bufferView.setUint8(i, 0);\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for(var i = this.bufferLength; i < (0, $4saKg.BLOCK_SIZE) - 8; i++)bufferView.setUint8(i, 0);\n bufferView.setUint32((0, $4saKg.BLOCK_SIZE) - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32((0, $4saKg.BLOCK_SIZE) - 4, bitsHashed);\n this.hashBuffer();\n this.finished = true;\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Uint8Array((0, $4saKg.DIGEST_LENGTH));\n for(var i = 0; i < 8; i++){\n out[i * 4] = this.state[i] >>> 24 & 0xff;\n out[i * 4 + 1] = this.state[i] >>> 16 & 0xff;\n out[i * 4 + 2] = this.state[i] >>> 8 & 0xff;\n out[i * 4 + 3] = this.state[i] >>> 0 & 0xff;\n }\n return out;\n };\n RawSha256.prototype.hashBuffer = function() {\n var _a = this, buffer = _a.buffer, state = _a.state;\n var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7];\n for(var i = 0; i < (0, $4saKg.BLOCK_SIZE); i++){\n if (i < 16) this.temp[i] = (buffer[i * 4] & 0xff) << 24 | (buffer[i * 4 + 1] & 0xff) << 16 | (buffer[i * 4 + 2] & 0xff) << 8 | buffer[i * 4 + 3] & 0xff;\n else {\n var u = this.temp[i - 2];\n var t1_1 = (u >>> 17 | u << 15) ^ (u >>> 19 | u << 13) ^ u >>> 10;\n u = this.temp[i - 15];\n var t2_1 = (u >>> 7 | u << 25) ^ (u >>> 18 | u << 14) ^ u >>> 3;\n this.temp[i] = (t1_1 + this.temp[i - 7] | 0) + (t2_1 + this.temp[i - 16] | 0);\n }\n var t1 = (((state4 >>> 6 | state4 << 26) ^ (state4 >>> 11 | state4 << 21) ^ (state4 >>> 25 | state4 << 7)) + (state4 & state5 ^ ~state4 & state6) | 0) + (state7 + ((0, $4saKg.KEY)[i] + this.temp[i] | 0) | 0) | 0;\n var t2 = ((state0 >>> 2 | state0 << 30) ^ (state0 >>> 13 | state0 << 19) ^ (state0 >>> 22 | state0 << 10)) + (state0 & state1 ^ state0 & state2 ^ state1 & state2) | 0;\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = state3 + t1 | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = t1 + t2 | 0;\n }\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n };\n return RawSha256;\n}();\n\n});\n\nparcelRegister(\"6dvWF\", function(module, exports) {\n\n$parcel$export(module.exports, \"convertToBuffer\", () => (parcelRequire(\"3cPkP\")).convertToBuffer);\n$parcel$export(module.exports, \"isEmptyData\", () => (parcelRequire(\"ZB00P\")).isEmptyData);\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nvar $3cPkP = parcelRequire(\"3cPkP\");\n\nvar $ZB00P = parcelRequire(\"ZB00P\");\n\nvar $aecxA = parcelRequire(\"aecxA\");\n\nvar $kjfFh = parcelRequire(\"kjfFh\");\n\n});\nparcelRegister(\"3cPkP\", function(module, exports) {\n\n$parcel$export(module.exports, \"convertToBuffer\", () => $255a5028cde3f3bc$export$4f21f20c2f1a9063);\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nparcelRequire(\"geIv0\");\nvar $1uolR = parcelRequire(\"1uolR\");\n\nvar $6ZWSX = parcelRequire(\"6ZWSX\");\nvar $255a5028cde3f3bc$require$Buffer = $6ZWSX.Buffer;\n// Quick polyfill\nvar $255a5028cde3f3bc$var$fromUtf8 = typeof $255a5028cde3f3bc$require$Buffer !== \"undefined\" && $255a5028cde3f3bc$require$Buffer.from ? function(input) {\n return $255a5028cde3f3bc$require$Buffer.from(input, \"utf8\");\n} : (0, $1uolR.fromUtf8);\nfunction $255a5028cde3f3bc$export$4f21f20c2f1a9063(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) return data;\n if (typeof data === \"string\") return $255a5028cde3f3bc$var$fromUtf8(data);\n if (ArrayBuffer.isView(data)) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n return new Uint8Array(data);\n}\n\n});\nparcelRegister(\"geIv0\", function(module, exports) {\n$parcel$export(module.exports, \"fromUtf8\", () => (parcelRequire(\"1uolR\")).fromUtf8);\nparcelRequire(\"1uolR\");\nparcelRequire(\"jGtn4\");\nparcelRequire(\"3cIry\");\n\n});\nparcelRegister(\"1uolR\", function(module, exports) {\n\n$parcel$export(module.exports, \"fromUtf8\", () => $115b7b7cc5a24eaf$export$c7c5cef950a4d2fc);\nconst $115b7b7cc5a24eaf$export$c7c5cef950a4d2fc = (input)=>new TextEncoder().encode(input);\n\n});\n\nparcelRegister(\"jGtn4\", function(module, exports) {\n\nvar $1uolR = parcelRequire(\"1uolR\");\nconst $e548b91235db5cfc$export$73470fd2221e6aef = (data)=>{\n if (typeof data === \"string\") return (0, $1uolR.fromUtf8)(data);\n if (ArrayBuffer.isView(data)) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n return new Uint8Array(data);\n};\n\n});\n\nparcelRegister(\"3cIry\", function(module, exports) {\nconst $2554f7a5fe934436$export$b4b216764bb846eb = (input)=>new TextDecoder(\"utf-8\").decode(input);\n\n});\n\n\nparcelRegister(\"6ZWSX\", function(module, exports) {\n\n$parcel$export(module.exports, \"Buffer\", () => $51861dfc7ca9d588$export$a143d493d941bafc, (v) => $51861dfc7ca9d588$export$a143d493d941bafc = v);\n$parcel$export(module.exports, \"INSPECT_MAX_BYTES\", () => $51861dfc7ca9d588$export$f99ded8fe4b79145, (v) => $51861dfc7ca9d588$export$f99ded8fe4b79145 = v);\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */ /* eslint-disable no-proto */ var $51861dfc7ca9d588$export$a143d493d941bafc;\nvar $51861dfc7ca9d588$export$e4cf37d7f6fb9e0a;\nvar $51861dfc7ca9d588$export$f99ded8fe4b79145;\nvar $51861dfc7ca9d588$export$599f31c3813fae4d;\n'use strict';\n\nvar $kuxul = parcelRequire(\"kuxul\");\n\nvar $9NvM5 = parcelRequire(\"9NvM5\");\nconst $51861dfc7ca9d588$var$customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null;\n$51861dfc7ca9d588$export$a143d493d941bafc = $51861dfc7ca9d588$var$Buffer;\n$51861dfc7ca9d588$export$e4cf37d7f6fb9e0a = $51861dfc7ca9d588$var$SlowBuffer;\n$51861dfc7ca9d588$export$f99ded8fe4b79145 = 50;\nconst $51861dfc7ca9d588$var$K_MAX_LENGTH = 0x7fffffff;\n$51861dfc7ca9d588$export$599f31c3813fae4d = $51861dfc7ca9d588$var$K_MAX_LENGTH;\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */ $51861dfc7ca9d588$var$Buffer.TYPED_ARRAY_SUPPORT = $51861dfc7ca9d588$var$typedArraySupport();\nif (!$51861dfc7ca9d588$var$Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\nfunction $51861dfc7ca9d588$var$typedArraySupport() {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e) {\n return false;\n }\n}\nObject.defineProperty($51861dfc7ca9d588$var$Buffer.prototype, 'parent', {\n enumerable: true,\n get: function() {\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(this)) return undefined;\n return this.buffer;\n }\n});\nObject.defineProperty($51861dfc7ca9d588$var$Buffer.prototype, 'offset', {\n enumerable: true,\n get: function() {\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(this)) return undefined;\n return this.byteOffset;\n }\n});\nfunction $51861dfc7ca9d588$var$createBuffer(length) {\n if (length > $51861dfc7ca9d588$var$K_MAX_LENGTH) throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, $51861dfc7ca9d588$var$Buffer.prototype);\n return buf;\n}\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */ function $51861dfc7ca9d588$var$Buffer(arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') throw new TypeError('The \"string\" argument must be of type string. Received type number');\n return $51861dfc7ca9d588$var$allocUnsafe(arg);\n }\n return $51861dfc7ca9d588$var$from(arg, encodingOrOffset, length);\n}\n$51861dfc7ca9d588$var$Buffer.poolSize = 8192 // not used by this implementation\n;\nfunction $51861dfc7ca9d588$var$from(value, encodingOrOffset, length) {\n if (typeof value === 'string') return $51861dfc7ca9d588$var$fromString(value, encodingOrOffset);\n if (ArrayBuffer.isView(value)) return $51861dfc7ca9d588$var$fromArrayView(value);\n if (value == null) throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n if ($51861dfc7ca9d588$var$isInstance(value, ArrayBuffer) || value && $51861dfc7ca9d588$var$isInstance(value.buffer, ArrayBuffer)) return $51861dfc7ca9d588$var$fromArrayBuffer(value, encodingOrOffset, length);\n if (typeof SharedArrayBuffer !== 'undefined' && ($51861dfc7ca9d588$var$isInstance(value, SharedArrayBuffer) || value && $51861dfc7ca9d588$var$isInstance(value.buffer, SharedArrayBuffer))) return $51861dfc7ca9d588$var$fromArrayBuffer(value, encodingOrOffset, length);\n if (typeof value === 'number') throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) return $51861dfc7ca9d588$var$Buffer.from(valueOf, encodingOrOffset, length);\n const b = $51861dfc7ca9d588$var$fromObject(value);\n if (b) return b;\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') return $51861dfc7ca9d588$var$Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n}\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/ $51861dfc7ca9d588$var$Buffer.from = function(value, encodingOrOffset, length) {\n return $51861dfc7ca9d588$var$from(value, encodingOrOffset, length);\n};\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf($51861dfc7ca9d588$var$Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf($51861dfc7ca9d588$var$Buffer, Uint8Array);\nfunction $51861dfc7ca9d588$var$assertSize(size) {\n if (typeof size !== 'number') throw new TypeError('\"size\" argument must be of type number');\n else if (size < 0) throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n}\nfunction $51861dfc7ca9d588$var$alloc(size, fill, encoding) {\n $51861dfc7ca9d588$var$assertSize(size);\n if (size <= 0) return $51861dfc7ca9d588$var$createBuffer(size);\n if (fill !== undefined) // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string' ? $51861dfc7ca9d588$var$createBuffer(size).fill(fill, encoding) : $51861dfc7ca9d588$var$createBuffer(size).fill(fill);\n return $51861dfc7ca9d588$var$createBuffer(size);\n}\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/ $51861dfc7ca9d588$var$Buffer.alloc = function(size, fill, encoding) {\n return $51861dfc7ca9d588$var$alloc(size, fill, encoding);\n};\nfunction $51861dfc7ca9d588$var$allocUnsafe(size) {\n $51861dfc7ca9d588$var$assertSize(size);\n return $51861dfc7ca9d588$var$createBuffer(size < 0 ? 0 : $51861dfc7ca9d588$var$checked(size) | 0);\n}\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */ $51861dfc7ca9d588$var$Buffer.allocUnsafe = function(size) {\n return $51861dfc7ca9d588$var$allocUnsafe(size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */ $51861dfc7ca9d588$var$Buffer.allocUnsafeSlow = function(size) {\n return $51861dfc7ca9d588$var$allocUnsafe(size);\n};\nfunction $51861dfc7ca9d588$var$fromString(string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8';\n if (!$51861dfc7ca9d588$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);\n const length = $51861dfc7ca9d588$var$byteLength(string, encoding) | 0;\n let buf = $51861dfc7ca9d588$var$createBuffer(length);\n const actual = buf.write(string, encoding);\n if (actual !== length) // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual);\n return buf;\n}\nfunction $51861dfc7ca9d588$var$fromArrayLike(array) {\n const length = array.length < 0 ? 0 : $51861dfc7ca9d588$var$checked(array.length) | 0;\n const buf = $51861dfc7ca9d588$var$createBuffer(length);\n for(let i = 0; i < length; i += 1)buf[i] = array[i] & 255;\n return buf;\n}\nfunction $51861dfc7ca9d588$var$fromArrayView(arrayView) {\n if ($51861dfc7ca9d588$var$isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return $51861dfc7ca9d588$var$fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return $51861dfc7ca9d588$var$fromArrayLike(arrayView);\n}\nfunction $51861dfc7ca9d588$var$fromArrayBuffer(array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) throw new RangeError('\"offset\" is outside of buffer bounds');\n if (array.byteLength < byteOffset + (length || 0)) throw new RangeError('\"length\" is outside of buffer bounds');\n let buf;\n if (byteOffset === undefined && length === undefined) buf = new Uint8Array(array);\n else if (length === undefined) buf = new Uint8Array(array, byteOffset);\n else buf = new Uint8Array(array, byteOffset, length);\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, $51861dfc7ca9d588$var$Buffer.prototype);\n return buf;\n}\nfunction $51861dfc7ca9d588$var$fromObject(obj) {\n if ($51861dfc7ca9d588$var$Buffer.isBuffer(obj)) {\n const len = $51861dfc7ca9d588$var$checked(obj.length) | 0;\n const buf = $51861dfc7ca9d588$var$createBuffer(len);\n if (buf.length === 0) return buf;\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || $51861dfc7ca9d588$var$numberIsNaN(obj.length)) return $51861dfc7ca9d588$var$createBuffer(0);\n return $51861dfc7ca9d588$var$fromArrayLike(obj);\n }\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) return $51861dfc7ca9d588$var$fromArrayLike(obj.data);\n}\nfunction $51861dfc7ca9d588$var$checked(length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= $51861dfc7ca9d588$var$K_MAX_LENGTH) throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + $51861dfc7ca9d588$var$K_MAX_LENGTH.toString(16) + ' bytes');\n return length | 0;\n}\nfunction $51861dfc7ca9d588$var$SlowBuffer(length) {\n if (+length != length) length = 0;\n return $51861dfc7ca9d588$var$Buffer.alloc(+length);\n}\n$51861dfc7ca9d588$var$Buffer.isBuffer = function isBuffer(b) {\n return b != null && b._isBuffer === true && b !== $51861dfc7ca9d588$var$Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n ;\n};\n$51861dfc7ca9d588$var$Buffer.compare = function compare(a, b) {\n if ($51861dfc7ca9d588$var$isInstance(a, Uint8Array)) a = $51861dfc7ca9d588$var$Buffer.from(a, a.offset, a.byteLength);\n if ($51861dfc7ca9d588$var$isInstance(b, Uint8Array)) b = $51861dfc7ca9d588$var$Buffer.from(b, b.offset, b.byteLength);\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(a) || !$51861dfc7ca9d588$var$Buffer.isBuffer(b)) throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n if (a === b) return 0;\n let x = a.length;\n let y = b.length;\n for(let i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n$51861dfc7ca9d588$var$Buffer.isEncoding = function isEncoding(encoding) {\n switch(String(encoding).toLowerCase()){\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true;\n default:\n return false;\n }\n};\n$51861dfc7ca9d588$var$Buffer.concat = function concat(list, length) {\n if (!Array.isArray(list)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n if (list.length === 0) return $51861dfc7ca9d588$var$Buffer.alloc(0);\n let i;\n if (length === undefined) {\n length = 0;\n for(i = 0; i < list.length; ++i)length += list[i].length;\n }\n const buffer = $51861dfc7ca9d588$var$Buffer.allocUnsafe(length);\n let pos = 0;\n for(i = 0; i < list.length; ++i){\n let buf = list[i];\n if ($51861dfc7ca9d588$var$isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(buf)) buf = $51861dfc7ca9d588$var$Buffer.from(buf);\n buf.copy(buffer, pos);\n } else Uint8Array.prototype.set.call(buffer, buf, pos);\n } else if (!$51861dfc7ca9d588$var$Buffer.isBuffer(buf)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n else buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer;\n};\nfunction $51861dfc7ca9d588$var$byteLength(string, encoding) {\n if ($51861dfc7ca9d588$var$Buffer.isBuffer(string)) return string.length;\n if (ArrayBuffer.isView(string) || $51861dfc7ca9d588$var$isInstance(string, ArrayBuffer)) return string.byteLength;\n if (typeof string !== 'string') throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n const len = string.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0) return 0;\n // Use a for loop to avoid recursion\n let loweredCase = false;\n for(;;)switch(encoding){\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len;\n case 'utf8':\n case 'utf-8':\n return $51861dfc7ca9d588$var$utf8ToBytes(string).length;\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2;\n case 'hex':\n return len >>> 1;\n case 'base64':\n return $51861dfc7ca9d588$var$base64ToBytes(string).length;\n default:\n if (loweredCase) return mustMatch ? -1 : $51861dfc7ca9d588$var$utf8ToBytes(string).length // assume utf8\n ;\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n}\n$51861dfc7ca9d588$var$Buffer.byteLength = $51861dfc7ca9d588$var$byteLength;\nfunction $51861dfc7ca9d588$var$slowToString(encoding, start, end) {\n let loweredCase = false;\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) start = 0;\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) return '';\n if (end === undefined || end > this.length) end = this.length;\n if (end <= 0) return '';\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n if (end <= start) return '';\n if (!encoding) encoding = 'utf8';\n while(true)switch(encoding){\n case 'hex':\n return $51861dfc7ca9d588$var$hexSlice(this, start, end);\n case 'utf8':\n case 'utf-8':\n return $51861dfc7ca9d588$var$utf8Slice(this, start, end);\n case 'ascii':\n return $51861dfc7ca9d588$var$asciiSlice(this, start, end);\n case 'latin1':\n case 'binary':\n return $51861dfc7ca9d588$var$latin1Slice(this, start, end);\n case 'base64':\n return $51861dfc7ca9d588$var$base64Slice(this, start, end);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return $51861dfc7ca9d588$var$utf16leSlice(this, start, end);\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n}\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\n$51861dfc7ca9d588$var$Buffer.prototype._isBuffer = true;\nfunction $51861dfc7ca9d588$var$swap(b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n$51861dfc7ca9d588$var$Buffer.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits');\n for(let i = 0; i < len; i += 2)$51861dfc7ca9d588$var$swap(this, i, i + 1);\n return this;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits');\n for(let i = 0; i < len; i += 4){\n $51861dfc7ca9d588$var$swap(this, i, i + 3);\n $51861dfc7ca9d588$var$swap(this, i + 1, i + 2);\n }\n return this;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits');\n for(let i = 0; i < len; i += 8){\n $51861dfc7ca9d588$var$swap(this, i, i + 7);\n $51861dfc7ca9d588$var$swap(this, i + 1, i + 6);\n $51861dfc7ca9d588$var$swap(this, i + 2, i + 5);\n $51861dfc7ca9d588$var$swap(this, i + 3, i + 4);\n }\n return this;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.toString = function toString() {\n const length = this.length;\n if (length === 0) return '';\n if (arguments.length === 0) return $51861dfc7ca9d588$var$utf8Slice(this, 0, length);\n return $51861dfc7ca9d588$var$slowToString.apply(this, arguments);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.toLocaleString = $51861dfc7ca9d588$var$Buffer.prototype.toString;\n$51861dfc7ca9d588$var$Buffer.prototype.equals = function equals(b) {\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n if (this === b) return true;\n return $51861dfc7ca9d588$var$Buffer.compare(this, b) === 0;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.inspect = function inspect() {\n let str = '';\n const max = $51861dfc7ca9d588$export$f99ded8fe4b79145;\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n if (this.length > max) str += ' ... ';\n return '';\n};\nif ($51861dfc7ca9d588$var$customInspectSymbol) $51861dfc7ca9d588$var$Buffer.prototype[$51861dfc7ca9d588$var$customInspectSymbol] = $51861dfc7ca9d588$var$Buffer.prototype.inspect;\n$51861dfc7ca9d588$var$Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if ($51861dfc7ca9d588$var$isInstance(target, Uint8Array)) target = $51861dfc7ca9d588$var$Buffer.from(target, target.offset, target.byteLength);\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(target)) throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n if (start === undefined) start = 0;\n if (end === undefined) end = target ? target.length : 0;\n if (thisStart === undefined) thisStart = 0;\n if (thisEnd === undefined) thisEnd = this.length;\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw new RangeError('out of range index');\n if (thisStart >= thisEnd && start >= end) return 0;\n if (thisStart >= thisEnd) return -1;\n if (start >= end) return 1;\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target) return 0;\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for(let i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction $51861dfc7ca9d588$var$bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1;\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff;\n else if (byteOffset < -2147483648) byteOffset = -2147483648;\n byteOffset = +byteOffset // Coerce to Number.\n ;\n if ($51861dfc7ca9d588$var$numberIsNaN(byteOffset)) // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1;\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1;\n }\n // Normalize val\n if (typeof val === 'string') val = $51861dfc7ca9d588$var$Buffer.from(val, encoding);\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if ($51861dfc7ca9d588$var$Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) return -1;\n return $51861dfc7ca9d588$var$arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n ;\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n else return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n return $51861dfc7ca9d588$var$arrayIndexOf(buffer, [\n val\n ], byteOffset, encoding, dir);\n }\n throw new TypeError('val must be string, number or Buffer');\n}\nfunction $51861dfc7ca9d588$var$arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) return -1;\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i) {\n if (indexSize === 1) return buf[i];\n else return buf.readUInt16BE(i * indexSize);\n }\n let i;\n if (dir) {\n let foundIndex = -1;\n for(i = byteOffset; i < arrLength; i++)if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for(i = byteOffset; i >= 0; i--){\n let found = true;\n for(let j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n if (found) return i;\n }\n }\n return -1;\n}\n$51861dfc7ca9d588$var$Buffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return $51861dfc7ca9d588$var$bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return $51861dfc7ca9d588$var$bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction $51861dfc7ca9d588$var$hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) length = remaining;\n else {\n length = Number(length);\n if (length > remaining) length = remaining;\n }\n const strLen = string.length;\n if (length > strLen / 2) length = strLen / 2;\n let i;\n for(i = 0; i < length; ++i){\n const parsed = parseInt(string.substr(i * 2, 2), 16);\n if ($51861dfc7ca9d588$var$numberIsNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n return i;\n}\nfunction $51861dfc7ca9d588$var$utf8Write(buf, string, offset, length) {\n return $51861dfc7ca9d588$var$blitBuffer($51861dfc7ca9d588$var$utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction $51861dfc7ca9d588$var$asciiWrite(buf, string, offset, length) {\n return $51861dfc7ca9d588$var$blitBuffer($51861dfc7ca9d588$var$asciiToBytes(string), buf, offset, length);\n}\nfunction $51861dfc7ca9d588$var$base64Write(buf, string, offset, length) {\n return $51861dfc7ca9d588$var$blitBuffer($51861dfc7ca9d588$var$base64ToBytes(string), buf, offset, length);\n}\nfunction $51861dfc7ca9d588$var$ucs2Write(buf, string, offset, length) {\n return $51861dfc7ca9d588$var$blitBuffer($51861dfc7ca9d588$var$utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\n$51861dfc7ca9d588$var$Buffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n } else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n const remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw new RangeError('Attempt to write outside buffer bounds');\n if (!encoding) encoding = 'utf8';\n let loweredCase = false;\n for(;;)switch(encoding){\n case 'hex':\n return $51861dfc7ca9d588$var$hexWrite(this, string, offset, length);\n case 'utf8':\n case 'utf-8':\n return $51861dfc7ca9d588$var$utf8Write(this, string, offset, length);\n case 'ascii':\n case 'latin1':\n case 'binary':\n return $51861dfc7ca9d588$var$asciiWrite(this, string, offset, length);\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return $51861dfc7ca9d588$var$base64Write(this, string, offset, length);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return $51861dfc7ca9d588$var$ucs2Write(this, string, offset, length);\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n};\n$51861dfc7ca9d588$var$Buffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n};\nfunction $51861dfc7ca9d588$var$base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) return $kuxul.fromByteArray(buf);\n else return $kuxul.fromByteArray(buf.slice(start, end));\n}\nfunction $51861dfc7ca9d588$var$utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i = start;\n while(i < end){\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch(bytesPerSequence){\n case 1:\n if (firstByte < 0x80) codePoint = firstByte;\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n if (tempCodePoint > 0x7F) codePoint = tempCodePoint;\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) codePoint = tempCodePoint;\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) codePoint = tempCodePoint;\n }\n }\n }\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return $51861dfc7ca9d588$var$decodeCodePointsArray(res);\n}\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst $51861dfc7ca9d588$var$MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction $51861dfc7ca9d588$var$decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= $51861dfc7ca9d588$var$MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n ;\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = '';\n let i = 0;\n while(i < len)res += String.fromCharCode.apply(String, codePoints.slice(i, i += $51861dfc7ca9d588$var$MAX_ARGUMENTS_LENGTH));\n return res;\n}\nfunction $51861dfc7ca9d588$var$asciiSlice(buf, start, end) {\n let ret = '';\n end = Math.min(buf.length, end);\n for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i] & 0x7F);\n return ret;\n}\nfunction $51861dfc7ca9d588$var$latin1Slice(buf, start, end) {\n let ret = '';\n end = Math.min(buf.length, end);\n for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i]);\n return ret;\n}\nfunction $51861dfc7ca9d588$var$hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n let out = '';\n for(let i = start; i < end; ++i)out += $51861dfc7ca9d588$var$hexSliceLookupTable[buf[i]];\n return out;\n}\nfunction $51861dfc7ca9d588$var$utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = '';\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for(let i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n return res;\n}\n$51861dfc7ca9d588$var$Buffer.prototype.slice = function slice(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) start = len;\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) end = len;\n if (end < start) end = start;\n const newBuf = this.subarray(start, end);\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, $51861dfc7ca9d588$var$Buffer.prototype);\n return newBuf;\n};\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */ function $51861dfc7ca9d588$var$checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\n$51861dfc7ca9d588$var$Buffer.prototype.readUintLE = $51861dfc7ca9d588$var$Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, byteLength, this.length);\n let val = this[offset];\n let mul = 1;\n let i = 0;\n while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;\n return val;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readUintBE = $51861dfc7ca9d588$var$Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, byteLength, this.length);\n let val = this[offset + --byteLength];\n let mul = 1;\n while(byteLength > 0 && (mul *= 0x100))val += this[offset + --byteLength] * mul;\n return val;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readUint8 = $51861dfc7ca9d588$var$Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 1, this.length);\n return this[offset];\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readUint16LE = $51861dfc7ca9d588$var$Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readUint16BE = $51861dfc7ca9d588$var$Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readUint32LE = $51861dfc7ca9d588$var$Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readUint32BE = $51861dfc7ca9d588$var$Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 4, this.length);\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readBigUInt64LE = $51861dfc7ca9d588$var$defineBigIntMethod(function readBigUInt64LE(offset) {\n offset = offset >>> 0;\n $51861dfc7ca9d588$var$validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) $51861dfc7ca9d588$var$boundsError(offset, this.length - 8);\n const lo = first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n const hi = this[++offset] + this[++offset] * 256 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n});\n$51861dfc7ca9d588$var$Buffer.prototype.readBigUInt64BE = $51861dfc7ca9d588$var$defineBigIntMethod(function readBigUInt64BE(offset) {\n offset = offset >>> 0;\n $51861dfc7ca9d588$var$validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) $51861dfc7ca9d588$var$boundsError(offset, this.length - 8);\n const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset];\n const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n});\n$51861dfc7ca9d588$var$Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, byteLength, this.length);\n let val = this[offset];\n let mul = 1;\n let i = 0;\n while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, byteLength, this.length);\n let i = byteLength;\n let mul = 1;\n let val = this[offset + --i];\n while(i > 0 && (mul *= 0x100))val += this[offset + --i] * mul;\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 2, this.length);\n const val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readBigInt64LE = $51861dfc7ca9d588$var$defineBigIntMethod(function readBigInt64LE(offset) {\n offset = offset >>> 0;\n $51861dfc7ca9d588$var$validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) $51861dfc7ca9d588$var$boundsError(offset, this.length - 8);\n const val = this[offset + 4] + this[offset + 5] * 256 + this[offset + 6] * 2 ** 16 + (last << 24 // Overflow\n );\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n});\n$51861dfc7ca9d588$var$Buffer.prototype.readBigInt64BE = $51861dfc7ca9d588$var$defineBigIntMethod(function readBigInt64BE(offset) {\n offset = offset >>> 0;\n $51861dfc7ca9d588$var$validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) $51861dfc7ca9d588$var$boundsError(offset, this.length - 8);\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last);\n});\n$51861dfc7ca9d588$var$Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 4, this.length);\n return $9NvM5.read(this, offset, true, 23, 4);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 4, this.length);\n return $9NvM5.read(this, offset, false, 23, 4);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 8, this.length);\n return $9NvM5.read(this, offset, true, 52, 8);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkOffset(offset, 8, this.length);\n return $9NvM5.read(this, offset, false, 52, 8);\n};\nfunction $51861dfc7ca9d588$var$checkInt(buf, value, offset, ext, max, min) {\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\n$51861dfc7ca9d588$var$Buffer.prototype.writeUintLE = $51861dfc7ca9d588$var$Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n $51861dfc7ca9d588$var$checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n let mul = 1;\n let i = 0;\n this[offset] = value & 0xFF;\n while(++i < byteLength && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;\n return offset + byteLength;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeUintBE = $51861dfc7ca9d588$var$Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n $51861dfc7ca9d588$var$checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n let i = byteLength - 1;\n let mul = 1;\n this[offset + i] = value & 0xFF;\n while(--i >= 0 && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;\n return offset + byteLength;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeUint8 = $51861dfc7ca9d588$var$Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 1, 0xff, 0);\n this[offset] = value & 0xff;\n return offset + 1;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeUint16LE = $51861dfc7ca9d588$var$Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 2, 0xffff, 0);\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeUint16BE = $51861dfc7ca9d588$var$Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 2, 0xffff, 0);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n return offset + 2;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeUint32LE = $51861dfc7ca9d588$var$Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 4, 0xffffffff, 0);\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n return offset + 4;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeUint32BE = $51861dfc7ca9d588$var$Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 4, 0xffffffff, 0);\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n return offset + 4;\n};\nfunction $51861dfc7ca9d588$var$wrtBigUInt64LE(buf, value, offset, min, max) {\n $51861dfc7ca9d588$var$checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(0xffffffff));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset;\n}\nfunction $51861dfc7ca9d588$var$wrtBigUInt64BE(buf, value, offset, min, max) {\n $51861dfc7ca9d588$var$checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(0xffffffff));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8;\n}\n$51861dfc7ca9d588$var$Buffer.prototype.writeBigUInt64LE = $51861dfc7ca9d588$var$defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n return $51861dfc7ca9d588$var$wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\n$51861dfc7ca9d588$var$Buffer.prototype.writeBigUInt64BE = $51861dfc7ca9d588$var$defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n return $51861dfc7ca9d588$var$wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\n$51861dfc7ca9d588$var$Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength - 1);\n $51861dfc7ca9d588$var$checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 0xFF;\n while(++i < byteLength && (mul *= 0x100)){\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) sub = 1;\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n return offset + byteLength;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength - 1);\n $51861dfc7ca9d588$var$checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n let i = byteLength - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i] = value & 0xFF;\n while(--i >= 0 && (mul *= 0x100)){\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) sub = 1;\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n return offset + byteLength;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 1, 0x7f, -128);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 2, 0x7fff, -32768);\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 2, 0x7fff, -32768);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n return offset + 2;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n return offset + 4;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);\n if (value < 0) value = 0xffffffff + value + 1;\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n return offset + 4;\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeBigInt64LE = $51861dfc7ca9d588$var$defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n return $51861dfc7ca9d588$var$wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\n$51861dfc7ca9d588$var$Buffer.prototype.writeBigInt64BE = $51861dfc7ca9d588$var$defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n return $51861dfc7ca9d588$var$wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\nfunction $51861dfc7ca9d588$var$checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n if (offset < 0) throw new RangeError('Index out of range');\n}\nfunction $51861dfc7ca9d588$var$writeFloat(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -340282346638528860000000000000000000000);\n $9NvM5.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n}\n$51861dfc7ca9d588$var$Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return $51861dfc7ca9d588$var$writeFloat(this, value, offset, true, noAssert);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return $51861dfc7ca9d588$var$writeFloat(this, value, offset, false, noAssert);\n};\nfunction $51861dfc7ca9d588$var$writeDouble(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) $51861dfc7ca9d588$var$checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);\n $9NvM5.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n}\n$51861dfc7ca9d588$var$Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return $51861dfc7ca9d588$var$writeDouble(this, value, offset, true, noAssert);\n};\n$51861dfc7ca9d588$var$Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return $51861dfc7ca9d588$var$writeDouble(this, value, offset, false, noAssert);\n};\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n$51861dfc7ca9d588$var$Buffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!$51861dfc7ca9d588$var$Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n // Copy 0 bytes; we're done\n if (end === start) return 0;\n if (target.length === 0 || this.length === 0) return 0;\n // Fatal error conditions\n if (targetStart < 0) throw new RangeError('targetStart out of bounds');\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range');\n if (end < 0) throw new RangeError('sourceEnd out of bounds');\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) end = target.length - targetStart + start;\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end);\n else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n return len;\n};\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\n$51861dfc7ca9d588$var$Buffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (encoding !== undefined && typeof encoding !== 'string') throw new TypeError('encoding must be a string');\n if (typeof encoding === 'string' && !$51861dfc7ca9d588$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === 'utf8' && code < 128 || encoding === 'latin1') // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code;\n }\n } else if (typeof val === 'number') val = val & 255;\n else if (typeof val === 'boolean') val = Number(val);\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) throw new RangeError('Out of range index');\n if (end <= start) return this;\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n if (!val) val = 0;\n let i;\n if (typeof val === 'number') for(i = start; i < end; ++i)this[i] = val;\n else {\n const bytes = $51861dfc7ca9d588$var$Buffer.isBuffer(val) ? val : $51861dfc7ca9d588$var$Buffer.from(val, encoding);\n const len = bytes.length;\n if (len === 0) throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len];\n }\n return this;\n};\n// CUSTOM ERRORS\n// =============\n// Simplified versions from Node, changed for Buffer-only usage\nconst $51861dfc7ca9d588$var$errors = {};\nfunction $51861dfc7ca9d588$var$E(sym, getMessage, Base) {\n $51861dfc7ca9d588$var$errors[sym] = class NodeError extends Base {\n constructor(){\n super();\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`;\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n ;\n // Reset the name to the actual name.\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value: value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n}\n$51861dfc7ca9d588$var$E('ERR_BUFFER_OUT_OF_BOUNDS', function(name) {\n if (name) return `${name} is outside of buffer bounds`;\n return 'Attempt to access memory outside buffer bounds';\n}, RangeError);\n$51861dfc7ca9d588$var$E('ERR_INVALID_ARG_TYPE', function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n}, TypeError);\n$51861dfc7ca9d588$var$E('ERR_OUT_OF_RANGE', function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) received = $51861dfc7ca9d588$var$addNumericalSeparator(String(input));\n else if (typeof input === 'bigint') {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) received = $51861dfc7ca9d588$var$addNumericalSeparator(received);\n received += 'n';\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n}, RangeError);\nfunction $51861dfc7ca9d588$var$addNumericalSeparator(val) {\n let res = '';\n let i = val.length;\n const start = val[0] === '-' ? 1 : 0;\n for(; i >= start + 4; i -= 3)res = `_${val.slice(i - 3, i)}${res}`;\n return `${val.slice(0, i)}${res}`;\n}\n// CHECK FUNCTIONS\n// ===============\nfunction $51861dfc7ca9d588$var$checkBounds(buf, offset, byteLength) {\n $51861dfc7ca9d588$var$validateNumber(offset, 'offset');\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) $51861dfc7ca9d588$var$boundsError(offset, buf.length - (byteLength + 1));\n}\nfunction $51861dfc7ca9d588$var$checkIntBI(value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : '';\n let range;\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n else range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + `${(byteLength + 1) * 8 - 1}${n}`;\n } else range = `>= ${min}${n} and <= ${max}${n}`;\n throw new $51861dfc7ca9d588$var$errors.ERR_OUT_OF_RANGE('value', range, value);\n }\n $51861dfc7ca9d588$var$checkBounds(buf, offset, byteLength);\n}\nfunction $51861dfc7ca9d588$var$validateNumber(value, name) {\n if (typeof value !== 'number') throw new $51861dfc7ca9d588$var$errors.ERR_INVALID_ARG_TYPE(name, 'number', value);\n}\nfunction $51861dfc7ca9d588$var$boundsError(value, length, type) {\n if (Math.floor(value) !== value) {\n $51861dfc7ca9d588$var$validateNumber(value, type);\n throw new $51861dfc7ca9d588$var$errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);\n }\n if (length < 0) throw new $51861dfc7ca9d588$var$errors.ERR_BUFFER_OUT_OF_BOUNDS();\n throw new $51861dfc7ca9d588$var$errors.ERR_OUT_OF_RANGE(type || 'offset', `>= ${type ? 1 : 0} and <= ${length}`, value);\n}\n// HELPER FUNCTIONS\n// ================\nconst $51861dfc7ca9d588$var$INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\nfunction $51861dfc7ca9d588$var$base64clean(str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0];\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace($51861dfc7ca9d588$var$INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return '';\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while(str.length % 4 !== 0)str = str + '=';\n return str;\n}\nfunction $51861dfc7ca9d588$var$utf8ToBytes(string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n for(let i = 0; i < length; ++i){\n codePoint = string.charCodeAt(i);\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n }\n // valid lead\n leadSurrogate = codePoint;\n continue;\n }\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue;\n }\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) // valid bmp char, but last char was a lead\n {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n leadSurrogate = null;\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break;\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break;\n bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break;\n bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break;\n bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else throw new Error('Invalid code point');\n }\n return bytes;\n}\nfunction $51861dfc7ca9d588$var$asciiToBytes(str) {\n const byteArray = [];\n for(let i = 0; i < str.length; ++i)// Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n return byteArray;\n}\nfunction $51861dfc7ca9d588$var$utf16leToBytes(str, units) {\n let c, hi, lo;\n const byteArray = [];\n for(let i = 0; i < str.length; ++i){\n if ((units -= 2) < 0) break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n}\nfunction $51861dfc7ca9d588$var$base64ToBytes(str) {\n return $kuxul.toByteArray($51861dfc7ca9d588$var$base64clean(str));\n}\nfunction $51861dfc7ca9d588$var$blitBuffer(src, dst, offset, length) {\n let i;\n for(i = 0; i < length; ++i){\n if (i + offset >= dst.length || i >= src.length) break;\n dst[i + offset] = src[i];\n }\n return i;\n}\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction $51861dfc7ca9d588$var$isInstance(obj, type) {\n return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n}\nfunction $51861dfc7ca9d588$var$numberIsNaN(obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n ;\n}\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst $51861dfc7ca9d588$var$hexSliceLookupTable = function() {\n const alphabet = '0123456789abcdef';\n const table = new Array(256);\n for(let i = 0; i < 16; ++i){\n const i16 = i * 16;\n for(let j = 0; j < 16; ++j)table[i16 + j] = alphabet[i] + alphabet[j];\n }\n return table;\n}();\n// Return not function with Error if BigInt not supported\nfunction $51861dfc7ca9d588$var$defineBigIntMethod(fn) {\n return typeof BigInt === 'undefined' ? $51861dfc7ca9d588$var$BufferBigIntNotDefined : fn;\n}\nfunction $51861dfc7ca9d588$var$BufferBigIntNotDefined() {\n throw new Error('BigInt not supported');\n}\n\n});\nparcelRegister(\"kuxul\", function(module, exports) {\n\n$parcel$export(module.exports, \"toByteArray\", () => $eeb0961446aae8e3$export$d622b2ad8d90c771, (v) => $eeb0961446aae8e3$export$d622b2ad8d90c771 = v);\n$parcel$export(module.exports, \"fromByteArray\", () => $eeb0961446aae8e3$export$6100ba28696e12de, (v) => $eeb0961446aae8e3$export$6100ba28696e12de = v);\nvar $eeb0961446aae8e3$export$a48f0734ac7c2329;\nvar $eeb0961446aae8e3$export$d622b2ad8d90c771;\nvar $eeb0961446aae8e3$export$6100ba28696e12de;\n'use strict';\n$eeb0961446aae8e3$export$a48f0734ac7c2329 = $eeb0961446aae8e3$var$byteLength;\n$eeb0961446aae8e3$export$d622b2ad8d90c771 = $eeb0961446aae8e3$var$toByteArray;\n$eeb0961446aae8e3$export$6100ba28696e12de = $eeb0961446aae8e3$var$fromByteArray;\nvar $eeb0961446aae8e3$var$lookup = [];\nvar $eeb0961446aae8e3$var$revLookup = [];\nvar $eeb0961446aae8e3$var$Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar $eeb0961446aae8e3$var$code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor(var $eeb0961446aae8e3$var$i = 0, $eeb0961446aae8e3$var$len = $eeb0961446aae8e3$var$code.length; $eeb0961446aae8e3$var$i < $eeb0961446aae8e3$var$len; ++$eeb0961446aae8e3$var$i){\n $eeb0961446aae8e3$var$lookup[$eeb0961446aae8e3$var$i] = $eeb0961446aae8e3$var$code[$eeb0961446aae8e3$var$i];\n $eeb0961446aae8e3$var$revLookup[$eeb0961446aae8e3$var$code.charCodeAt($eeb0961446aae8e3$var$i)] = $eeb0961446aae8e3$var$i;\n}\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\n$eeb0961446aae8e3$var$revLookup['-'.charCodeAt(0)] = 62;\n$eeb0961446aae8e3$var$revLookup['_'.charCodeAt(0)] = 63;\nfunction $eeb0961446aae8e3$var$getLens(b64) {\n var len = b64.length;\n if (len % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4');\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n return [\n validLen,\n placeHoldersLen\n ];\n}\n// base64 is 4/3 + up to two characters of the original data\nfunction $eeb0961446aae8e3$var$byteLength(b64) {\n var lens = $eeb0961446aae8e3$var$getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction $eeb0961446aae8e3$var$_byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction $eeb0961446aae8e3$var$toByteArray(b64) {\n var tmp;\n var lens = $eeb0961446aae8e3$var$getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new $eeb0961446aae8e3$var$Arr($eeb0961446aae8e3$var$_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i;\n for(i = 0; i < len; i += 4){\n tmp = $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i)] << 18 | $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i + 1)] << 12 | $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i + 2)] << 6 | $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = tmp >> 16 & 0xFF;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 2) {\n tmp = $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i)] << 2 | $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i + 1)] >> 4;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 1) {\n tmp = $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i)] << 10 | $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i + 1)] << 4 | $eeb0961446aae8e3$var$revLookup[b64.charCodeAt(i + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n return arr;\n}\nfunction $eeb0961446aae8e3$var$tripletToBase64(num) {\n return $eeb0961446aae8e3$var$lookup[num >> 18 & 0x3F] + $eeb0961446aae8e3$var$lookup[num >> 12 & 0x3F] + $eeb0961446aae8e3$var$lookup[num >> 6 & 0x3F] + $eeb0961446aae8e3$var$lookup[num & 0x3F];\n}\nfunction $eeb0961446aae8e3$var$encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for(var i = start; i < end; i += 3){\n tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n output.push($eeb0961446aae8e3$var$tripletToBase64(tmp));\n }\n return output.join('');\n}\nfunction $eeb0961446aae8e3$var$fromByteArray(uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n ;\n var parts = [];\n var maxChunkLength = 16383 // must be multiple of 3\n ;\n // go through the array every three bytes, we'll deal with trailing stuff later\n for(var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push($eeb0961446aae8e3$var$encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push($eeb0961446aae8e3$var$lookup[tmp >> 2] + $eeb0961446aae8e3$var$lookup[tmp << 4 & 0x3F] + '==');\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push($eeb0961446aae8e3$var$lookup[tmp >> 10] + $eeb0961446aae8e3$var$lookup[tmp >> 4 & 0x3F] + $eeb0961446aae8e3$var$lookup[tmp << 2 & 0x3F] + '=');\n }\n return parts.join('');\n}\n\n});\n\nparcelRegister(\"9NvM5\", function(module, exports) {\n\n$parcel$export(module.exports, \"read\", () => $7221566bd4d49f44$export$aafa59e2e03f2942, (v) => $7221566bd4d49f44$export$aafa59e2e03f2942 = v);\n$parcel$export(module.exports, \"write\", () => $7221566bd4d49f44$export$68d8715fc104d294, (v) => $7221566bd4d49f44$export$68d8715fc104d294 = v);\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ var $7221566bd4d49f44$export$aafa59e2e03f2942;\nvar $7221566bd4d49f44$export$68d8715fc104d294;\n$7221566bd4d49f44$export$aafa59e2e03f2942 = function(buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? nBytes - 1 : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for(; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for(; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);\n if (e === 0) e = 1 - eBias;\n else if (e === eMax) return m ? NaN : (s ? -1 : 1) * Infinity;\n else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n};\n$7221566bd4d49f44$export$68d8715fc104d294 = function(buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE ? 0 : nBytes - 1;\n var d = isLE ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) value += rt / c;\n else value += rt * Math.pow(2, 1 - eBias);\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for(; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for(; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\n buffer[offset + i - d] |= s * 128;\n};\n\n});\n\n\n\nparcelRegister(\"ZB00P\", function(module, exports) {\n\n$parcel$export(module.exports, \"isEmptyData\", () => $0b9265e3f06832e9$export$ea55f474a468804e);\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $0b9265e3f06832e9$export$ea55f474a468804e(data) {\n if (typeof data === \"string\") return data.length === 0;\n return data.byteLength === 0;\n}\n\n});\n\nparcelRegister(\"aecxA\", function(module, exports) {\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $7724f0827d728d87$export$2527dfa2a193fcfa(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff\n ]);\n}\n\n});\n\nparcelRegister(\"kjfFh\", function(module, exports) {\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// IE 11 does not support Array.from, so we do it manually\nfunction $ec91bbb6f0039d68$export$b6739cd5a63159f9(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while(a_index < a_lookUpTable.length){\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\n\n});\n\n\n\n\nparcelRegister(\"lUOK3\", function(module, exports) {\nconst $ff463032e6a14a0a$var$SHORT_TO_HEX = {};\nconst $ff463032e6a14a0a$var$HEX_TO_SHORT = {};\nfor(let i = 0; i < 256; i++){\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) encodedByte = `0${encodedByte}`;\n $ff463032e6a14a0a$var$SHORT_TO_HEX[i] = encodedByte;\n $ff463032e6a14a0a$var$HEX_TO_SHORT[encodedByte] = i;\n}\nfunction $ff463032e6a14a0a$export$1a8ceedbd5845648(encoded) {\n if (encoded.length % 2 !== 0) throw new Error(\"Hex encoded strings must have an even number length\");\n const out = new Uint8Array(encoded.length / 2);\n for(let i = 0; i < encoded.length; i += 2){\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in $ff463032e6a14a0a$var$HEX_TO_SHORT) out[i / 2] = $ff463032e6a14a0a$var$HEX_TO_SHORT[encodedByte];\n else throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n return out;\n}\nfunction $ff463032e6a14a0a$export$7ea66e3774a60b67(bytes) {\n let out = \"\";\n for(let i = 0; i < bytes.byteLength; i++)out += $ff463032e6a14a0a$var$SHORT_TO_HEX[bytes[i]];\n return out;\n}\n\n});\n\nparcelRegister(\"hMbLp\", function(module, exports) {\n\n$parcel$export(module.exports, \"AuthClass\", () => $af0fe83fb084e5d7$export$eeff9d1a8b8c057b);\nclass $af0fe83fb084e5d7$export$eeff9d1a8b8c057b {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */ configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */ async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId = await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens: tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh\n });\n } else // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId = await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh\n });\n return {\n tokens: tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub: userSub\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return await this.authOptions?.tokenProvider?.getTokens(options) ?? undefined;\n }\n}\n\n});\n\n\nparcelRegister(\"lKsZv\", function(module, exports) {\n\n$parcel$export(module.exports, \"CookieStorage\", () => $8a827f16696ff978$export$dae7d845015939d5);\n\nvar $8Nbse = parcelRequire(\"8Nbse\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $8a827f16696ff978$export$dae7d845015939d5 {\n constructor(data = {}){\n const { path: path, domain: domain, expires: expires, sameSite: sameSite, secure: secure } = data;\n this.domain = domain;\n this.path = path || '/';\n this.expires = Object.prototype.hasOwnProperty.call(data, 'expires') ? expires : 365;\n this.secure = Object.prototype.hasOwnProperty.call(data, 'secure') ? secure : true;\n if (Object.prototype.hasOwnProperty.call(data, 'sameSite')) {\n if (!sameSite || ![\n 'strict',\n 'lax',\n 'none'\n ].includes(sameSite)) throw new Error('The sameSite value of cookieStorage must be \"lax\", \"strict\" or \"none\".');\n if (sameSite === 'none' && !this.secure) throw new Error('sameSite = None requires the Secure attribute in latest browser versions.');\n this.sameSite = sameSite;\n }\n }\n async setItem(key, value) {\n (0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).set(key, value, this.getData());\n }\n async getItem(key) {\n const item = (0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).get(key);\n return item ?? null;\n }\n async removeItem(key) {\n (0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).remove(key, this.getData());\n }\n async clear() {\n const cookie = (0, (/*@__PURE__*/$parcel$interopDefault($8Nbse))).get();\n const promises = Object.keys(cookie).map((key)=>this.removeItem(key));\n await Promise.all(promises);\n }\n getData() {\n return {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n ...this.sameSite && {\n sameSite: this.sameSite\n }\n };\n }\n}\n\n});\nparcelRegister(\"8Nbse\", function(module, exports) {\n(function(global, factory) {\n module.exports = factory();\n})(module.exports, function() {\n 'use strict';\n /* eslint-disable no-var */ function assign(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source)target[key] = source[key];\n }\n return target;\n }\n /* eslint-enable no-var */ /* eslint-disable no-var */ var defaultConverter = {\n read: function(value) {\n if (value[0] === '\"') value = value.slice(1, -1);\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function(value) {\n return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);\n }\n };\n /* eslint-enable no-var */ /* eslint-disable no-var */ function init(converter, defaultAttributes) {\n function set(name, value, attributes) {\n if (typeof document === 'undefined') return;\n attributes = assign({}, defaultAttributes, attributes);\n if (typeof attributes.expires === 'number') attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n if (attributes.expires) attributes.expires = attributes.expires.toUTCString();\n name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var stringifiedAttributes = '';\n for(var attributeName in attributes){\n if (!attributes[attributeName]) continue;\n stringifiedAttributes += '; ' + attributeName;\n if (attributes[attributeName] === true) continue;\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n return document.cookie = name + '=' + converter.write(value, name) + stringifiedAttributes;\n }\n function get(name) {\n if (typeof document === 'undefined' || arguments.length && !name) return;\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for(var i = 0; i < cookies.length; i++){\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n if (name === found) break;\n } catch (e) {}\n }\n return name ? jar[name] : jar;\n }\n return Object.create({\n set: set,\n get: get,\n remove: function(name, attributes) {\n set(name, '', assign({}, attributes, {\n expires: -1\n }));\n },\n withAttributes: function(attributes) {\n return init(this.converter, assign({}, this.attributes, attributes));\n },\n withConverter: function(converter) {\n return init(assign({}, this.converter, converter), this.attributes);\n }\n }, {\n attributes: {\n value: Object.freeze(defaultAttributes)\n },\n converter: {\n value: Object.freeze(converter)\n }\n });\n }\n var api = init(defaultConverter, {\n path: '/'\n });\n /* eslint-enable no-var */ return api;\n});\n\n});\n\n\nparcelRegister(\"57Of0\", function(module, exports) {\n\n$parcel$export(module.exports, \"defaultStorage\", () => $c47f21f216a22ace$export$586b30dcaeecb901);\n$parcel$export(module.exports, \"syncSessionStorage\", () => $c47f21f216a22ace$export$9015f19b74348a18);\n\nvar $ejny4 = parcelRequire(\"ejny4\");\n\nvar $g1gqr = parcelRequire(\"g1gqr\");\n\nvar $ceLb3 = parcelRequire(\"ceLb3\");\n\nvar $4EL3H = parcelRequire(\"4EL3H\");\n\nvar $eygwb = parcelRequire(\"eygwb\");\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $c47f21f216a22ace$export$586b30dcaeecb901 = new (0, $ejny4.DefaultStorage)();\nconst $c47f21f216a22ace$export$f119d83aa936d634 = new (0, $4EL3H.SessionStorage)();\nconst $c47f21f216a22ace$export$9015f19b74348a18 = new (0, $eygwb.SyncSessionStorage)();\nconst $c47f21f216a22ace$export$41feb988b3a84f03 = new (0, $ceLb3.KeyValueStorage)(new (0, $g1gqr.InMemoryStorage)());\n\n});\nparcelRegister(\"ejny4\", function(module, exports) {\n\n$parcel$export(module.exports, \"DefaultStorage\", () => $9f78cbd356024b7e$export$bec45e7703e93690);\n\nvar $ceLb3 = parcelRequire(\"ceLb3\");\n\nvar $5Y39P = parcelRequire(\"5Y39P\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ class $9f78cbd356024b7e$export$bec45e7703e93690 extends (0, $ceLb3.KeyValueStorage) {\n constructor(){\n super((0, $5Y39P.getLocalStorageWithFallback)());\n }\n}\n\n});\nparcelRegister(\"ceLb3\", function(module, exports) {\n\n$parcel$export(module.exports, \"KeyValueStorage\", () => $0d6aa7e6d5a3429c$export$8536778e426ddf92);\n\nvar $fngA0 = parcelRequire(\"fngA0\");\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ class $0d6aa7e6d5a3429c$export$8536778e426ddf92 {\n constructor(storage){\n this.storage = storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */ async setItem(key, value) {\n if (!this.storage) throw new (0, $fngA0.PlatformNotSupportedError)();\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */ async getItem(key) {\n if (!this.storage) throw new (0, $fngA0.PlatformNotSupportedError)();\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */ async removeItem(key) {\n if (!this.storage) throw new (0, $fngA0.PlatformNotSupportedError)();\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */ async clear() {\n if (!this.storage) throw new (0, $fngA0.PlatformNotSupportedError)();\n this.storage.clear();\n }\n}\n\n});\nparcelRegister(\"fngA0\", function(module, exports) {\n\n$parcel$export(module.exports, \"PlatformNotSupportedError\", () => $a91ea1244b77fef7$export$f5362e8a6666a455);\n\nvar $8rSHg = parcelRequire(\"8rSHg\");\n\nvar $e0exy = parcelRequire(\"e0exy\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $a91ea1244b77fef7$export$f5362e8a6666a455 extends (0, $e0exy.AmplifyError) {\n constructor(){\n super({\n name: (0, $8rSHg.AmplifyErrorCode).PlatformNotSupported,\n message: 'Function not supported on current platform'\n });\n }\n}\n\n});\nparcelRegister(\"8rSHg\", function(module, exports) {\n\n$parcel$export(module.exports, \"AmplifyErrorCode\", () => $032079a569aa4e0d$export$4e712df6b850c8d0);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $032079a569aa4e0d$export$4e712df6b850c8d0;\n(function(AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})($032079a569aa4e0d$export$4e712df6b850c8d0 || ($032079a569aa4e0d$export$4e712df6b850c8d0 = {}));\n\n});\n\n\n\nparcelRegister(\"5Y39P\", function(module, exports) {\n\n$parcel$export(module.exports, \"getLocalStorageWithFallback\", () => $a932b92f8e337975$export$5d9abaf8ff62cd65);\n$parcel$export(module.exports, \"getSessionStorageWithFallback\", () => $a932b92f8e337975$export$518dcc1598f87b);\n\nvar $gJw02 = parcelRequire(\"gJw02\");\n\nvar $g1gqr = parcelRequire(\"g1gqr\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */ const $a932b92f8e337975$var$logger = new (0, $gJw02.ConsoleLogger)('CoreStorageUtils');\nconst $a932b92f8e337975$export$5d9abaf8ff62cd65 = ()=>{\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) return window.localStorage;\n } catch (e) {\n // Handle any errors related to localStorage access\n $a932b92f8e337975$var$logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new (0, $g1gqr.InMemoryStorage)();\n};\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */ const $a932b92f8e337975$export$518dcc1598f87b = ()=>{\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n } catch (e) {\n // Handle any errors related to sessionStorage access\n $a932b92f8e337975$var$logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new (0, $g1gqr.InMemoryStorage)();\n }\n};\n\n});\nparcelRegister(\"g1gqr\", function(module, exports) {\n\n$parcel$export(module.exports, \"InMemoryStorage\", () => $2875d3cc5c2dfbf0$export$e4315e25b840a0ea);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ class $2875d3cc5c2dfbf0$export$e4315e25b840a0ea {\n constructor(){\n this.storage = new Map();\n }\n get length() {\n return this.storage.size;\n }\n key(index) {\n if (index > this.length - 1) return null;\n return Array.from(this.storage.keys())[index];\n }\n setItem(key, value) {\n this.storage.set(key, value);\n }\n getItem(key) {\n return this.storage.get(key) ?? null;\n }\n removeItem(key) {\n this.storage.delete(key);\n }\n clear() {\n this.storage.clear();\n }\n}\n\n});\n\n\n\nparcelRegister(\"4EL3H\", function(module, exports) {\n\n$parcel$export(module.exports, \"SessionStorage\", () => $a3c2eb980ed98e6f$export$2c4b17e1c2e0931);\n\nvar $ceLb3 = parcelRequire(\"ceLb3\");\n\nvar $5Y39P = parcelRequire(\"5Y39P\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ class $a3c2eb980ed98e6f$export$2c4b17e1c2e0931 extends (0, $ceLb3.KeyValueStorage) {\n constructor(){\n super((0, $5Y39P.getSessionStorageWithFallback)());\n }\n}\n\n});\n\nparcelRegister(\"eygwb\", function(module, exports) {\n\n$parcel$export(module.exports, \"SyncSessionStorage\", () => $9fd79fe0a753d145$export$eb7b875b75a2c8df);\n\nvar $3Ebx5 = parcelRequire(\"3Ebx5\");\n\nvar $5Y39P = parcelRequire(\"5Y39P\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ class $9fd79fe0a753d145$export$eb7b875b75a2c8df extends (0, $3Ebx5.SyncKeyValueStorage) {\n constructor(){\n super((0, $5Y39P.getSessionStorageWithFallback)());\n }\n}\n\n});\nparcelRegister(\"3Ebx5\", function(module, exports) {\n\n$parcel$export(module.exports, \"SyncKeyValueStorage\", () => $9cf2f49300c31e72$export$f7640313c5d17c27);\n\nvar $fngA0 = parcelRequire(\"fngA0\");\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ class $9cf2f49300c31e72$export$f7640313c5d17c27 {\n constructor(storage){\n this._storage = storage;\n }\n get storage() {\n if (!this._storage) throw new (0, $fngA0.PlatformNotSupportedError)();\n return this._storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */ setItem(key, value) {\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */ getItem(key) {\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */ removeItem(key) {\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */ clear() {\n this.storage.clear();\n }\n}\n\n});\n\n\n\nparcelRegister(\"e2NQk\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoCredentialsProvider\", () => $58a834a1218aacfd$export$be43b753aec531e2);\n\nvar $57Of0 = parcelRequire(\"57Of0\");\n\nvar $2vm2m = parcelRequire(\"2vm2m\");\n\nvar $5rVdp = parcelRequire(\"5rVdp\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cognito specific implmentation of the CredentialsProvider interface\n * that manages setting and getting of AWS Credentials.\n *\n * @throws configuration expections: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service expections: {@link GetCredentialsForIdentityException}, {@link GetIdException}\n *\n */ const $58a834a1218aacfd$export$be43b753aec531e2 = new (0, $5rVdp.CognitoAWSCredentialsAndIdentityIdProvider)(new (0, $2vm2m.DefaultIdentityIdStore)((0, $57Of0.defaultStorage)));\n\n});\nparcelRegister(\"2vm2m\", function(module, exports) {\n\n$parcel$export(module.exports, \"DefaultIdentityIdStore\", () => $9f93ccdc5f95c7af$export$3e97b78667a539a0);\n\nvar $gJw02 = parcelRequire(\"gJw02\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $029ov = parcelRequire(\"029ov\");\n\nvar $88z72 = parcelRequire(\"88z72\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $9f93ccdc5f95c7af$var$logger = new (0, $gJw02.ConsoleLogger)('DefaultIdentityIdStore');\nclass $9f93ccdc5f95c7af$export$3e97b78667a539a0 {\n setAuthConfig(authConfigParam) {\n (0, $bfiP6.assertIdentityPoolIdConfig)(authConfigParam.Cognito);\n this.authConfig = authConfigParam;\n this._authKeys = $9f93ccdc5f95c7af$var$createKeysForAuthStorage('Cognito', authConfigParam.Cognito.identityPoolId);\n }\n constructor(keyValueStorage){\n this._authKeys = {};\n this._hasGuestIdentityId = false;\n this.keyValueStorage = keyValueStorage;\n }\n async loadIdentityId() {\n (0, $bfiP6.assertIdentityPoolIdConfig)(this.authConfig?.Cognito);\n try {\n if (this._primaryIdentityId) return {\n id: this._primaryIdentityId,\n type: 'primary'\n };\n else {\n const storedIdentityId = await this.keyValueStorage.getItem(this._authKeys.identityId);\n if (storedIdentityId) {\n this._hasGuestIdentityId = true;\n return {\n id: storedIdentityId,\n type: 'guest'\n };\n }\n return null;\n }\n } catch (err) {\n $9f93ccdc5f95c7af$var$logger.log('Error getting stored IdentityId.', err);\n return null;\n }\n }\n async storeIdentityId(identity) {\n (0, $bfiP6.assertIdentityPoolIdConfig)(this.authConfig?.Cognito);\n if (identity.type === 'guest') {\n this.keyValueStorage.setItem(this._authKeys.identityId, identity.id);\n // Clear in-memory storage of primary identityId\n this._primaryIdentityId = undefined;\n this._hasGuestIdentityId = true;\n } else {\n this._primaryIdentityId = identity.id;\n // Clear locally stored guest id\n if (this._hasGuestIdentityId) {\n this.keyValueStorage.removeItem(this._authKeys.identityId);\n this._hasGuestIdentityId = false;\n }\n }\n }\n async clearIdentityId() {\n this._primaryIdentityId = undefined;\n await this.keyValueStorage.removeItem(this._authKeys.identityId);\n }\n}\nconst $9f93ccdc5f95c7af$var$createKeysForAuthStorage = (provider, identifier)=>{\n return (0, $029ov.getAuthStorageKeys)((0, $88z72.IdentityIdStorageKeys))(`com.amplify.${provider}`, identifier);\n};\n\n});\nparcelRegister(\"bfiP6\", function(module, exports) {\n\n$parcel$export(module.exports, \"assertTokenProviderConfig\", () => $47b41f0bc3dcf730$export$80c92581e59ed502);\n$parcel$export(module.exports, \"assertOAuthConfig\", () => $47b41f0bc3dcf730$export$c13e6dbaf90a8e5f);\n$parcel$export(module.exports, \"assertIdentityPoolIdConfig\", () => $47b41f0bc3dcf730$export$8a2f5318ea3215e3);\n$parcel$export(module.exports, \"decodeJWT\", () => $47b41f0bc3dcf730$export$9a62e6c0a30e00bc);\n\nvar $iLExi = parcelRequire(\"iLExi\");\n\n\n\nvar $cYnY3 = parcelRequire(\"cYnY3\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $47b41f0bc3dcf730$export$80c92581e59ed502(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) assertionValid = false;\n else assertionValid = !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n (0, $cYnY3.assert)(assertionValid, (0, $cYnY3.AuthConfigurationErrorCode).AuthUserPoolException);\n}\nfunction $47b41f0bc3dcf730$export$c13e6dbaf90a8e5f(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain && !!cognitoConfig?.loginWith?.oauth?.redirectSignOut && !!cognitoConfig?.loginWith?.oauth?.redirectSignIn && !!cognitoConfig?.loginWith?.oauth?.responseType;\n (0, $cYnY3.assert)(validOAuthConfig, (0, $cYnY3.AuthConfigurationErrorCode).OAuthNotConfigureException);\n}\nfunction $47b41f0bc3dcf730$export$8a2f5318ea3215e3(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n (0, $cYnY3.assert)(validConfig, (0, $cYnY3.AuthConfigurationErrorCode).InvalidIdentityPoolIdException);\n}\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */ function $47b41f0bc3dcf730$export$9a62e6c0a30e00bc(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) throw new Error('Invalid token');\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent((0, $iLExi.base64Decoder).convert(base64).split('').map((char)=>`%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`).join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: ()=>token,\n payload: payload\n };\n } catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n\n});\nparcelRegister(\"iLExi\", function(module, exports) {\n\n$parcel$export(module.exports, \"base64Decoder\", () => $0a6173e3df3e7293$export$1e303d38dab7b376);\n\nvar $dfMUF = parcelRequire(\"dfMUF\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $0a6173e3df3e7293$export$1e303d38dab7b376 = {\n convert (input, options) {\n let inputStr = input;\n // urlSafe character replacement options conform to the base64 url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#page-7\n if (options?.urlSafe) inputStr = inputStr.replace(/-/g, '+').replace(/_/g, '/');\n return (0, $dfMUF.getAtob)()(inputStr);\n }\n};\n\n});\nparcelRegister(\"dfMUF\", function(module, exports) {\n\n$parcel$export(module.exports, \"getCrypto\", () => $6f3b4030fc0f3ef5$export$e003cc239f955cb6);\n$parcel$export(module.exports, \"getBtoa\", () => $6f3b4030fc0f3ef5$export$94f295707b435c6d);\n$parcel$export(module.exports, \"getAtob\", () => $6f3b4030fc0f3ef5$export$ea737e7700106b27);\n\nvar $e0exy = parcelRequire(\"e0exy\");\n\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $6f3b4030fc0f3ef5$export$e003cc239f955cb6 = ()=>{\n if (typeof window === 'object' && typeof window.crypto === 'object') return window.crypto;\n // Next.js global polyfill\n if (typeof crypto === 'object') return crypto;\n throw new (0, $e0exy.AmplifyError)({\n name: 'MissingPolyfill',\n message: 'Cannot resolve the `crypto` function from the environment.'\n });\n};\nconst $6f3b4030fc0f3ef5$export$94f295707b435c6d = ()=>{\n // browser\n if (typeof window !== 'undefined' && typeof window.btoa === 'function') return window.btoa;\n // Next.js global polyfill\n if (typeof btoa === 'function') return btoa;\n throw new (0, $e0exy.AmplifyError)({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `btoa` function from the environment.'\n });\n};\nconst $6f3b4030fc0f3ef5$export$ea737e7700106b27 = ()=>{\n // browser\n if (typeof window !== 'undefined' && typeof window.atob === 'function') return window.atob;\n // Next.js global polyfill\n if (typeof atob === 'function') return atob;\n throw new (0, $e0exy.AmplifyError)({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `atob` function from the environment.'\n });\n};\n\n});\n\n\nparcelRegister(\"cYnY3\", function(module, exports) {\n\n$parcel$export(module.exports, \"AuthConfigurationErrorCode\", () => $c43ab8490e8ade2c$export$7b5c8b570ea8407);\n$parcel$export(module.exports, \"assert\", () => $c43ab8490e8ade2c$export$a7a9523472993e97);\n\nvar $bggJy = parcelRequire(\"bggJy\");\n\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $c43ab8490e8ade2c$export$7b5c8b570ea8407;\n(function(AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})($c43ab8490e8ade2c$export$7b5c8b570ea8407 || ($c43ab8490e8ade2c$export$7b5c8b570ea8407 = {}));\nconst $c43ab8490e8ade2c$var$authConfigurationErrorMap = {\n [$c43ab8490e8ade2c$export$7b5c8b570ea8407.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.'\n },\n [$c43ab8490e8ade2c$export$7b5c8b570ea8407.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.'\n },\n [$c43ab8490e8ade2c$export$7b5c8b570ea8407.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.'\n },\n [$c43ab8490e8ade2c$export$7b5c8b570ea8407.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.'\n },\n [$c43ab8490e8ade2c$export$7b5c8b570ea8407.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.'\n }\n};\nconst $c43ab8490e8ade2c$export$a7a9523472993e97 = (0, $bggJy.createAssertionFunction)($c43ab8490e8ade2c$var$authConfigurationErrorMap);\n\n});\nparcelRegister(\"bggJy\", function(module, exports) {\n\n$parcel$export(module.exports, \"createAssertionFunction\", () => $0d1a22fb669c23b6$export$5cb8fc27ccbe9d40);\n\nvar $e0exy = parcelRequire(\"e0exy\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $0d1a22fb669c23b6$export$5cb8fc27ccbe9d40 = (errorMap, AssertionError = (0, $e0exy.AmplifyError))=>(assertion, name, additionalContext)=>{\n const { message: message, recoverySuggestion: recoverySuggestion } = errorMap[name];\n if (!assertion) throw new AssertionError({\n name: name,\n message: additionalContext ? `${message} ${additionalContext}` : message,\n recoverySuggestion: recoverySuggestion\n });\n };\n\n});\n\n\n\nparcelRegister(\"029ov\", function(module, exports) {\n\n$parcel$export(module.exports, \"DefaultTokenStore\", () => $bfc286311b85b781$export$a36be852d43d512);\n$parcel$export(module.exports, \"getAuthStorageKeys\", () => $bfc286311b85b781$export$dfb8da757ca62eed);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $3O5pD = parcelRequire(\"3O5pD\");\n\nvar $dvCiI = parcelRequire(\"dvCiI\");\n\nvar $fa9cv = parcelRequire(\"fa9cv\");\nclass $bfc286311b85b781$export$a36be852d43d512 {\n getKeyValueStorage() {\n if (!this.keyValueStorage) throw new (0, $b62N7.AuthError)({\n name: 'KeyValueStorageNotFoundException',\n message: 'KeyValueStorage was not found in TokenStore'\n });\n return this.keyValueStorage;\n }\n setKeyValueStorage(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n setAuthConfig(authConfig) {\n this.authConfig = authConfig;\n }\n async loadTokens() {\n // TODO(v6): migration logic should be here\n // Reading V5 tokens old format\n try {\n const authKeys = await this.getAuthKeys();\n const accessTokenString = await this.getKeyValueStorage().getItem(authKeys.accessToken);\n if (!accessTokenString) throw new (0, $b62N7.AuthError)({\n name: 'NoSessionFoundException',\n message: 'Auth session was not found. Make sure to call signIn.'\n });\n const accessToken = (0, $bfiP6.decodeJWT)(accessTokenString);\n const itString = await this.getKeyValueStorage().getItem(authKeys.idToken);\n const idToken = itString ? (0, $bfiP6.decodeJWT)(itString) : undefined;\n const refreshToken = await this.getKeyValueStorage().getItem(authKeys.refreshToken) ?? undefined;\n const clockDriftString = await this.getKeyValueStorage().getItem(authKeys.clockDrift) ?? '0';\n const clockDrift = Number.parseInt(clockDriftString);\n const signInDetails = await this.getKeyValueStorage().getItem(authKeys.signInDetails);\n const tokens = {\n accessToken: accessToken,\n idToken: idToken,\n refreshToken: refreshToken,\n deviceMetadata: await this.getDeviceMetadata() ?? undefined,\n clockDrift: clockDrift,\n username: await this.getLastAuthUser()\n };\n if (signInDetails) tokens.signInDetails = JSON.parse(signInDetails);\n return tokens;\n } catch (err) {\n return null;\n }\n }\n async storeTokens(tokens) {\n (0, $dvCiI.assert)(tokens !== undefined, (0, $dvCiI.TokenProviderErrorCode).InvalidAuthTokens);\n const lastAuthUser = tokens.username;\n await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(), lastAuthUser);\n const authKeys = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(authKeys.accessToken, tokens.accessToken.toString());\n if (tokens.idToken) await this.getKeyValueStorage().setItem(authKeys.idToken, tokens.idToken.toString());\n else await this.getKeyValueStorage().removeItem(authKeys.idToken);\n if (tokens.refreshToken) await this.getKeyValueStorage().setItem(authKeys.refreshToken, tokens.refreshToken);\n else await this.getKeyValueStorage().removeItem(authKeys.refreshToken);\n if (tokens.deviceMetadata) {\n if (tokens.deviceMetadata.deviceKey) await this.getKeyValueStorage().setItem(authKeys.deviceKey, tokens.deviceMetadata.deviceKey);\n if (tokens.deviceMetadata.deviceGroupKey) await this.getKeyValueStorage().setItem(authKeys.deviceGroupKey, tokens.deviceMetadata.deviceGroupKey);\n await this.getKeyValueStorage().setItem(authKeys.randomPasswordKey, tokens.deviceMetadata.randomPassword);\n }\n if (tokens.signInDetails) await this.getKeyValueStorage().setItem(authKeys.signInDetails, JSON.stringify(tokens.signInDetails));\n else await this.getKeyValueStorage().removeItem(authKeys.signInDetails);\n await this.getKeyValueStorage().setItem(authKeys.clockDrift, `${tokens.clockDrift}`);\n }\n async clearTokens() {\n const authKeys = await this.getAuthKeys();\n // Not calling clear because it can remove data that is not managed by AuthTokenStore\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.accessToken),\n this.getKeyValueStorage().removeItem(authKeys.idToken),\n this.getKeyValueStorage().removeItem(authKeys.clockDrift),\n this.getKeyValueStorage().removeItem(authKeys.refreshToken),\n this.getKeyValueStorage().removeItem(authKeys.signInDetails),\n this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),\n this.getKeyValueStorage().removeItem(authKeys.oauthMetadata)\n ]);\n }\n async getDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n const deviceKey = await this.getKeyValueStorage().getItem(authKeys.deviceKey);\n const deviceGroupKey = await this.getKeyValueStorage().getItem(authKeys.deviceGroupKey);\n const randomPassword = await this.getKeyValueStorage().getItem(authKeys.randomPasswordKey);\n return randomPassword && deviceGroupKey && deviceKey ? {\n deviceKey: deviceKey,\n deviceGroupKey: deviceGroupKey,\n randomPassword: randomPassword\n } : null;\n }\n async clearDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.deviceKey),\n this.getKeyValueStorage().removeItem(authKeys.deviceGroupKey),\n this.getKeyValueStorage().removeItem(authKeys.randomPasswordKey)\n ]);\n }\n async getAuthKeys(username) {\n (0, $bfiP6.assertTokenProviderConfig)(this.authConfig?.Cognito);\n const lastAuthUser = username ?? await this.getLastAuthUser();\n return $bfc286311b85b781$export$4647c72f6828a74d((0, $fa9cv.AUTH_KEY_PREFIX), `${this.authConfig.Cognito.userPoolClientId}.${lastAuthUser}`);\n }\n getLastAuthUserKey() {\n (0, $bfiP6.assertTokenProviderConfig)(this.authConfig?.Cognito);\n const identifier = this.authConfig.Cognito.userPoolClientId;\n return `${0, $fa9cv.AUTH_KEY_PREFIX}.${identifier}.LastAuthUser`;\n }\n async getLastAuthUser() {\n const lastAuthUser = await this.getKeyValueStorage().getItem(this.getLastAuthUserKey()) ?? 'username';\n return lastAuthUser;\n }\n async setOAuthMetadata(metadata) {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(oauthMetadataKey, JSON.stringify(metadata));\n }\n async getOAuthMetadata() {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n const oauthMetadata = await this.getKeyValueStorage().getItem(oauthMetadataKey);\n return oauthMetadata && JSON.parse(oauthMetadata);\n }\n}\nconst $bfc286311b85b781$export$4647c72f6828a74d = (provider, identifier)=>{\n return $bfc286311b85b781$export$dfb8da757ca62eed((0, $3O5pD.AuthTokenStorageKeys))(`${provider}`, identifier);\n};\nfunction $bfc286311b85b781$export$dfb8da757ca62eed(authKeys) {\n const keys = Object.values({\n ...authKeys\n });\n return (prefix, identifier)=>keys.reduce((acc, authKey)=>({\n ...acc,\n [authKey]: `${prefix}.${identifier}.${authKey}`\n }), {});\n}\n\n});\nparcelRegister(\"b62N7\", function(module, exports) {\n\n$parcel$export(module.exports, \"AuthError\", () => $0bd2271901d3ce8f$export$145273558d58e0ac);\n\nvar $e0exy = parcelRequire(\"e0exy\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $0bd2271901d3ce8f$export$145273558d58e0ac extends (0, $e0exy.AmplifyError) {\n constructor(params){\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = $0bd2271901d3ce8f$export$145273558d58e0ac;\n Object.setPrototypeOf(this, $0bd2271901d3ce8f$export$145273558d58e0ac.prototype);\n }\n}\n\n});\n\nparcelRegister(\"3O5pD\", function(module, exports) {\n\n$parcel$export(module.exports, \"AuthTokenStorageKeys\", () => $338fa29dda4a9a9e$export$b8429d1428aad8ba);\nconst $338fa29dda4a9a9e$export$b8429d1428aad8ba = {\n accessToken: 'accessToken',\n idToken: 'idToken',\n oidcProvider: 'oidcProvider',\n clockDrift: 'clockDrift',\n refreshToken: 'refreshToken',\n deviceKey: 'deviceKey',\n randomPasswordKey: 'randomPasswordKey',\n deviceGroupKey: 'deviceGroupKey',\n signInDetails: 'signInDetails',\n oauthMetadata: 'oauthMetadata'\n};\n\n});\n\nparcelRegister(\"dvCiI\", function(module, exports) {\n\n$parcel$export(module.exports, \"TokenProviderErrorCode\", () => $40486dcb7c4675e2$export$cc5909720f29144);\n$parcel$export(module.exports, \"assert\", () => $40486dcb7c4675e2$export$a7a9523472993e97);\n\nvar $bggJy = parcelRequire(\"bggJy\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $40486dcb7c4675e2$export$cc5909720f29144;\n(function(TokenProviderErrorCode) {\n TokenProviderErrorCode[\"InvalidAuthTokens\"] = \"InvalidAuthTokens\";\n})($40486dcb7c4675e2$export$cc5909720f29144 || ($40486dcb7c4675e2$export$cc5909720f29144 = {}));\nconst $40486dcb7c4675e2$var$tokenValidationErrorMap = {\n [$40486dcb7c4675e2$export$cc5909720f29144.InvalidAuthTokens]: {\n message: 'Invalid tokens.',\n recoverySuggestion: 'Make sure the tokens are valid.'\n }\n};\nconst $40486dcb7c4675e2$export$a7a9523472993e97 = (0, $bggJy.createAssertionFunction)($40486dcb7c4675e2$var$tokenValidationErrorMap);\n\n});\n\nparcelRegister(\"fa9cv\", function(module, exports) {\n\n$parcel$export(module.exports, \"AUTH_KEY_PREFIX\", () => $639183b62dc5e02d$export$2c8f6d7ed1534551);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $639183b62dc5e02d$export$2c8f6d7ed1534551 = 'CognitoIdentityServiceProvider';\n\n});\n\n\nparcelRegister(\"88z72\", function(module, exports) {\n\n$parcel$export(module.exports, \"IdentityIdStorageKeys\", () => $c1ea576318e91128$export$dad1700b96c3a835);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $c1ea576318e91128$export$dad1700b96c3a835 = {\n identityId: 'identityId'\n};\n\n});\n\n\nparcelRegister(\"5rVdp\", function(module, exports) {\n\n$parcel$export(module.exports, \"CognitoAWSCredentialsAndIdentityIdProvider\", () => $1b1ef4a1e101da96$export$be6550e37264dc26);\n\nvar $gJw02 = parcelRequire(\"gJw02\");\nvar $avjBi = parcelRequire(\"avjBi\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\nvar $4a2RL = parcelRequire(\"4a2RL\");\n\nvar $inqgD = parcelRequire(\"inqgD\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $1b1ef4a1e101da96$var$logger = new (0, $gJw02.ConsoleLogger)('CognitoCredentialsProvider');\nconst $1b1ef4a1e101da96$var$CREDENTIALS_TTL = 3000000; // 50 min, can be modified on config if required in the future\nclass $1b1ef4a1e101da96$export$be6550e37264dc26 {\n constructor(identityIdStore){\n this._nextCredentialsRefresh = 0;\n this._identityIdStore = identityIdStore;\n }\n async clearCredentialsAndIdentityId() {\n $1b1ef4a1e101da96$var$logger.debug('Clearing out credentials and identityId');\n this._credentialsAndIdentityId = undefined;\n await this._identityIdStore.clearIdentityId();\n }\n async clearCredentials() {\n $1b1ef4a1e101da96$var$logger.debug('Clearing out in-memory credentials');\n this._credentialsAndIdentityId = undefined;\n }\n async getCredentialsAndIdentityId(getCredentialsOptions) {\n const isAuthenticated = getCredentialsOptions.authenticated;\n const { tokens: tokens } = getCredentialsOptions;\n const { authConfig: authConfig } = getCredentialsOptions;\n try {\n (0, $bfiP6.assertIdentityPoolIdConfig)(authConfig?.Cognito);\n } catch {\n // No identity pool configured, skipping\n return;\n }\n if (!isAuthenticated && !authConfig.Cognito.allowGuestAccess) // TODO(V6): return partial result like Native platforms\n return;\n const { forceRefresh: forceRefresh } = getCredentialsOptions;\n const tokenHasChanged = this.hasTokenChanged(tokens);\n const identityId = await (0, $4a2RL.cognitoIdentityIdProvider)({\n tokens: tokens,\n authConfig: authConfig.Cognito,\n identityIdStore: this._identityIdStore\n });\n // Clear cached credentials when forceRefresh is true OR the cache token has changed\n if (forceRefresh || tokenHasChanged) this.clearCredentials();\n if (!isAuthenticated) return this.getGuestCredentials(identityId, authConfig.Cognito);\n else {\n (0, $kOfpC.assertIdTokenInAuthTokens)(tokens);\n return this.credsForOIDCTokens(authConfig.Cognito, tokens, identityId);\n }\n }\n async getGuestCredentials(identityId, authConfig) {\n // Return existing in-memory cached credentials only if it exists, is not past it's lifetime and is unauthenticated credentials\n if (this._credentialsAndIdentityId && !this.isPastTTL() && this._credentialsAndIdentityId.isAuthenticatedCreds === false) {\n $1b1ef4a1e101da96$var$logger.info('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any authenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const region = (0, $hXC67.getRegionFromIdentityPoolId)(authConfig.identityPoolId);\n // use identityId to obtain guest credentials\n // save credentials in-memory\n // No logins params should be passed for guest creds:\n // https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html\n const clientResult = await (0, $avjBi.getCredentialsForIdentity)({\n region: region\n }, {\n IdentityId: identityId\n });\n if (clientResult.Credentials && clientResult.Credentials.AccessKeyId && clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + $1b1ef4a1e101da96$var$CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration\n },\n identityId: identityId\n };\n if (clientResult.IdentityId) {\n res.identityId = clientResult.IdentityId;\n this._identityIdStore.storeIdentityId({\n id: clientResult.IdentityId,\n type: 'guest'\n });\n }\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: false\n };\n return res;\n } else throw new (0, $b62N7.AuthError)({\n name: 'CredentialsNotFoundException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`\n });\n }\n async credsForOIDCTokens(authConfig, authTokens, identityId) {\n if (this._credentialsAndIdentityId && !this.isPastTTL() && this._credentialsAndIdentityId.isAuthenticatedCreds === true) {\n $1b1ef4a1e101da96$var$logger.debug('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any unauthenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const logins = authTokens.idToken ? (0, $inqgD.formLoginsMap)(authTokens.idToken.toString()) : {};\n const region = (0, $hXC67.getRegionFromIdentityPoolId)(authConfig.identityPoolId);\n const clientResult = await (0, $avjBi.getCredentialsForIdentity)({\n region: region\n }, {\n IdentityId: identityId,\n Logins: logins\n });\n if (clientResult.Credentials && clientResult.Credentials.AccessKeyId && clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + $1b1ef4a1e101da96$var$CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration\n },\n identityId: identityId\n };\n if (clientResult.IdentityId) {\n res.identityId = clientResult.IdentityId;\n // note: the following call removes guest identityId from the persistent store (localStorage)\n this._identityIdStore.storeIdentityId({\n id: clientResult.IdentityId,\n type: 'primary'\n });\n }\n // Store the credentials in-memory along with the expiration\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: true,\n associatedIdToken: authTokens.idToken?.toString()\n };\n return res;\n } else throw new (0, $b62N7.AuthError)({\n name: 'CredentialsException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`\n });\n }\n isPastTTL() {\n return this._nextCredentialsRefresh === undefined ? true : this._nextCredentialsRefresh <= Date.now();\n }\n hasTokenChanged(tokens) {\n return !!tokens && !!this._credentialsAndIdentityId?.associatedIdToken && tokens.idToken?.toString() !== this._credentialsAndIdentityId.associatedIdToken;\n }\n}\n\n});\nparcelRegister(\"avjBi\", function(module, exports) {\n\n$parcel$export(module.exports, \"getCredentialsForIdentity\", () => $585cd79baee831be$export$a49c1c173ab96b58);\n\n\n\n\nparcelRequire(\"78v1Z\");\nparcelRequire(\"lUOK3\");\n\nvar $7ecIZ = parcelRequire(\"7ecIZ\");\n\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $lL7zI = parcelRequire(\"lL7zI\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $585cd79baee831be$var$getCredentialsForIdentitySerializer = (input, endpoint)=>{\n const headers = (0, $lL7zI.getSharedHeaders)('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return (0, $lL7zI.buildHttpRpcRequest)(endpoint, headers, body);\n};\nconst $585cd79baee831be$var$getCredentialsForIdentityDeserializer = async (response)=>{\n if (response.statusCode >= 300) {\n const error = await (0, $bM38a.parseJsonError)(response);\n throw error;\n } else {\n const body = await (0, $bM38a.parseJsonBody)(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: $585cd79baee831be$var$deserializeCredentials(body.Credentials),\n $metadata: (0, $7ecIZ.parseMetadata)(response)\n };\n }\n};\nconst $585cd79baee831be$var$deserializeCredentials = ({ AccessKeyId: AccessKeyId, SecretKey: SecretKey, SessionToken: SessionToken, Expiration: Expiration } = {})=>{\n return {\n AccessKeyId: AccessKeyId,\n SecretKey: SecretKey,\n SessionToken: SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000)\n };\n};\n/**\n * @internal\n */ const $585cd79baee831be$export$a49c1c173ab96b58 = (0, $6vbP8.composeServiceApi)((0, $lL7zI.cognitoIdentityTransferHandler), $585cd79baee831be$var$getCredentialsForIdentitySerializer, $585cd79baee831be$var$getCredentialsForIdentityDeserializer, (0, $lL7zI.defaultConfig));\n\n});\nparcelRegister(\"7ecIZ\", function(module, exports) {\n\n$parcel$export(module.exports, \"parseMetadata\", () => $f4d14d043a6280d5$export$978f9418fe0cb26c);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $f4d14d043a6280d5$export$978f9418fe0cb26c = (response)=>{\n const { headers: headers, statusCode: statusCode } = response;\n return {\n ...$f4d14d043a6280d5$var$isMetadataBearer(response) ? response.$metadata : {},\n httpStatusCode: statusCode,\n requestId: headers['x-amzn-requestid'] ?? headers['x-amzn-request-id'] ?? headers['x-amz-request-id'],\n extendedRequestId: headers['x-amz-id-2'],\n cfId: headers['x-amz-cf-id']\n };\n};\nconst $f4d14d043a6280d5$var$isMetadataBearer = (response)=>typeof response?.$metadata === 'object';\n\n});\n\nparcelRegister(\"bM38a\", function(module, exports) {\n\n$parcel$export(module.exports, \"parseJsonError\", () => $79d947bf5668e8ed$export$be467dfcc0538e25);\n$parcel$export(module.exports, \"parseJsonBody\", () => $79d947bf5668e8ed$export$759bcb35b0d1bf81);\n\nvar $7ecIZ = parcelRequire(\"7ecIZ\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Utility functions for serializing and deserializing of JSON protocol in general(including: REST-JSON, JSON-RPC, etc.)\n */ /**\n * Error parser for AWS JSON protocol.\n */ const $79d947bf5668e8ed$export$be467dfcc0538e25 = async (response)=>{\n if (!response || response.statusCode < 300) return;\n const body = await $79d947bf5668e8ed$export$759bcb35b0d1bf81(response);\n const sanitizeErrorCode = (rawValue)=>{\n const [cleanValue] = rawValue.toString().split(/[,:]+/);\n if (cleanValue.includes('#')) return cleanValue.split('#')[1];\n return cleanValue;\n };\n const code = sanitizeErrorCode(response.headers['x-amzn-errortype'] ?? body.code ?? body.__type ?? 'UnknownError');\n const message = body.message ?? body.Message ?? 'Unknown error';\n const error = new Error(message);\n return Object.assign(error, {\n name: code,\n $metadata: (0, $7ecIZ.parseMetadata)(response)\n });\n};\n/**\n * Parse JSON response body to JavaScript object.\n */ const $79d947bf5668e8ed$export$759bcb35b0d1bf81 = async (response)=>{\n if (!response.body) throw new Error('Missing response payload');\n const output = await response.body.json();\n return Object.assign(output, {\n $metadata: (0, $7ecIZ.parseMetadata)(response)\n });\n};\n\n});\n\nparcelRegister(\"6vbP8\", function(module, exports) {\n\n$parcel$export(module.exports, \"composeServiceApi\", () => $8099fb84e4081018$export$880429a8ae983d4d);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a service API handler that accepts input as defined shape and responds conforming to defined output shape.\n * A service API handler is composed with:\n * * A transfer handler\n * * A serializer function\n * * A deserializer function\n * * A default config object\n *\n * The returned service API handler, when called, will trigger the following workflow:\n * 1. When calling the service API handler function, the default config object is merged into the input config\n * object to assign the default values of some omitted configs, resulting to a resolved config object.\n * 2. The `endpointResolver` function from the default config object will be invoked with the resolved config object and\n * API input object resulting to an endpoint instance.\n * 3. The serializer function is invoked with API input object and the endpoint instance resulting to an HTTP request\n * instance.\n * 4. The HTTP request instance and the resolved config object is passed to the transfer handler function.\n * 5. The transfer handler function resolves to an HTTP response instance(can be either successful or failed status code).\n * 6. The deserializer function is invoked with the HTTP response instance resulting to the API output object, and\n * return to the caller.\n *\n *\n * @param transferHandler Async function for dispatching HTTP requests and returning HTTP response.\n * @param serializer Async function for converting object in defined input shape into HTTP request targeting a given\n * \tendpoint.\n * @param deserializer Async function for converting HTTP response into output object in defined output shape, or error\n * \tshape.\n * @param defaultConfig object containing default options to be consumed by transfer handler, serializer and\n * deserializer.\n * @returns a async service API handler function that accepts a config object and input object in defined shape, returns\n * \tan output object in defined shape. It may also throw error instance in defined shape in deserializer. The config\n * object type is composed with options type of transferHandler, endpointResolver function as well as endpointResolver\n * function's input options type, region string. The config object property will be marked as optional if it's also\n * \tdefined in defaultConfig.\n *\n * @internal\n */ const $8099fb84e4081018$export$880429a8ae983d4d = (transferHandler, serializer, deserializer, defaultConfig)=>{\n return async (config, input)=>{\n const resolvedConfig = {\n ...defaultConfig,\n ...config\n };\n // We need to allow different endpoints based on both given config(other than region) and input.\n // However for most of non-S3 services, region is the only input for endpoint resolver.\n const endpoint = await resolvedConfig.endpointResolver(resolvedConfig, input);\n // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.\n // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).\n // They will be populated automatically by browser, or node-fetch polyfill.\n const request = await serializer(input, endpoint);\n const response = await transferHandler(request, {\n ...resolvedConfig\n });\n return deserializer(response);\n };\n};\n\n});\n\nparcelRegister(\"lL7zI\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoIdentityTransferHandler\", () => $875b0abd80166f32$export$8029646671d2c482);\n$parcel$export(module.exports, \"defaultConfig\", () => $875b0abd80166f32$export$f84bd70098573c5c);\n$parcel$export(module.exports, \"getSharedHeaders\", () => $875b0abd80166f32$export$a46bbeaba09f7285);\n$parcel$export(module.exports, \"buildHttpRpcRequest\", () => $875b0abd80166f32$export$a692bdb7eb624f96);\n\nvar $fqhqt = parcelRequire(\"fqhqt\");\n\n\n\nvar $itEnq = parcelRequire(\"itEnq\");\n\nvar $5D9nd = parcelRequire(\"5D9nd\");\n\nvar $4ZD6k = parcelRequire(\"4ZD6k\");\nparcelRequire(\"78v1Z\");\nparcelRequire(\"lUOK3\");\n\nvar $7Ar4G = parcelRequire(\"7Ar4G\");\n\nvar $8e8Xp = parcelRequire(\"8e8Xp\");\n\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $dj9FS = parcelRequire(\"dj9FS\");\n\nvar $iHOzP = parcelRequire(\"iHOzP\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */ const $875b0abd80166f32$var$SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */ const $875b0abd80166f32$var$endpointResolver = ({ region: region })=>({\n url: new (0, $7Ar4G.AmplifyUrl)(`https://cognito-identity.${region}.${(0, $fqhqt.getDnsSuffix)(region)}`)\n });\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */ const $875b0abd80166f32$var$disableCacheMiddlewareFactory = ()=>(next)=>async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n };\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */ const $875b0abd80166f32$export$8029646671d2c482 = (0, $8e8Xp.composeTransferHandler)((0, $itEnq.unauthenticatedHandler), [\n $875b0abd80166f32$var$disableCacheMiddlewareFactory\n]);\n/**\n * @internal\n */ const $875b0abd80166f32$export$f84bd70098573c5c = {\n service: $875b0abd80166f32$var$SERVICE_NAME,\n endpointResolver: $875b0abd80166f32$var$endpointResolver,\n retryDecider: (0, $4ZD6k.getRetryDecider)((0, $bM38a.parseJsonError)),\n computeDelay: (0, $5D9nd.jitteredBackoff),\n userAgentValue: (0, $dj9FS.getAmplifyUserAgent)(),\n cache: 'no-store'\n};\n(0, $iHOzP.observeFrameworkChanges)(()=>{\n $875b0abd80166f32$export$f84bd70098573c5c.userAgentValue = (0, $dj9FS.getAmplifyUserAgent)();\n});\n/**\n * @internal\n */ const $875b0abd80166f32$export$a46bbeaba09f7285 = (operation)=>({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`\n });\n/**\n * @internal\n */ const $875b0abd80166f32$export$a692bdb7eb624f96 = ({ url: url }, headers, body)=>({\n headers: headers,\n url: url,\n body: body,\n method: 'POST'\n });\n\n});\nparcelRegister(\"fqhqt\", function(module, exports) {\n\n$parcel$export(module.exports, \"getDnsSuffix\", () => $8ce7edd304848afd$export$1c28e37cdcc37f6d);\n\nvar $amVal = parcelRequire(\"amVal\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get the AWS Services endpoint URL's DNS suffix for a given region. A typical AWS regional service endpoint URL will\n * follow this pattern: {endpointPrefix}.{region}.{dnsSuffix}. For example, the endpoint URL for Cognito Identity in\n * us-east-1 will be cognito-identity.us-east-1.amazonaws.com. Here the DnsSuffix is `amazonaws.com`.\n *\n * @param region\n * @returns The DNS suffix\n *\n * @internal\n */ const $8ce7edd304848afd$export$1c28e37cdcc37f6d = (region)=>{\n const { partitions: partitions } = (0, $amVal.partitionsInfo);\n for (const { regions: regions, outputs: outputs, regionRegex: regionRegex } of partitions){\n const regex = new RegExp(regionRegex);\n if (regions.includes(region) || regex.test(region)) return outputs.dnsSuffix;\n }\n return (0, $amVal.defaultPartition).outputs.dnsSuffix;\n};\n\n});\nparcelRegister(\"amVal\", function(module, exports) {\n\n$parcel$export(module.exports, \"defaultPartition\", () => $5c61b283b1e239d9$export$72f3cee421ee8a74);\n$parcel$export(module.exports, \"partitionsInfo\", () => $5c61b283b1e239d9$export$d7c12af0c0f12206);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default partition for AWS services. This is used when the region is not provided or the region is not recognized.\n *\n * @internal\n */ const $5c61b283b1e239d9$export$72f3cee421ee8a74 = {\n id: 'aws',\n outputs: {\n dnsSuffix: 'amazonaws.com'\n },\n regionRegex: '^(us|eu|ap|sa|ca|me|af)\\\\-\\\\w+\\\\-\\\\d+$',\n regions: [\n 'aws-global'\n ]\n};\n/**\n * This data is adapted from the partition file from AWS SDK shared utilities but remove some contents for bundle size\n * concern. Information removed are `dualStackDnsSuffix`, `supportDualStack`, `supportFIPS`, restricted partitions, and\n * list of regions for each partition other than global regions.\n *\n * * Ref: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints\n * * Ref: https://github.com/aws/aws-sdk-js-v3/blob/0201baef03c2379f1f6f7150b9d401d4b230d488/packages/util-endpoints/src/lib/aws/partitions.json#L1\n *\n * @internal\n */ const $5c61b283b1e239d9$export$d7c12af0c0f12206 = {\n partitions: [\n $5c61b283b1e239d9$export$72f3cee421ee8a74,\n {\n id: 'aws-cn',\n outputs: {\n dnsSuffix: 'amazonaws.com.cn'\n },\n regionRegex: '^cn\\\\-\\\\w+\\\\-\\\\d+$',\n regions: [\n 'aws-cn-global'\n ]\n }\n ]\n};\n\n});\n\n\nparcelRegister(\"itEnq\", function(module, exports) {\n\n$parcel$export(module.exports, \"unauthenticatedHandler\", () => $156379934f867ed3$export$ed7e1ccf00f39c4a);\n\nvar $aWNly = parcelRequire(\"aWNly\");\n\n\n\n\n\nvar $aBoxv = parcelRequire(\"aBoxv\");\n\nvar $8e8Xp = parcelRequire(\"8e8Xp\");\n\nvar $anVi4 = parcelRequire(\"anVi4\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $156379934f867ed3$export$ed7e1ccf00f39c4a = (0, $8e8Xp.composeTransferHandler)((0, $anVi4.fetchTransferHandler), [\n (0, $aBoxv.userAgentMiddlewareFactory),\n (0, $aWNly.retryMiddlewareFactory)\n]);\n\n});\nparcelRegister(\"aWNly\", function(module, exports) {\n\n$parcel$export(module.exports, \"retryMiddlewareFactory\", () => $60f584ba62481a94$export$72f002d3da1a429f);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $60f584ba62481a94$var$DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */ const $60f584ba62481a94$export$72f002d3da1a429f = ({ maxAttempts: maxAttempts = $60f584ba62481a94$var$DEFAULT_RETRY_ATTEMPTS, retryDecider: retryDecider, computeDelay: computeDelay, abortSignal: abortSignal })=>{\n if (maxAttempts < 1) throw new Error('maxAttempts must be greater than 0');\n return (next, context)=>async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = ()=>{\n if (response) {\n $60f584ba62481a94$var$addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n } else {\n $60f584ba62481a94$var$addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while(!abortSignal?.aborted && attemptsCount < maxAttempts){\n try {\n response = await next(request);\n error = undefined;\n } catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount = (context.attemptsCount ?? 0) > attemptsCount ? context.attemptsCount ?? 0 : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n const { isCredentialsExpiredError: isCredentialsExpiredError, retryable: retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\n if (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n // prevent sleep for last attempt or cancelled request;\n const delay = computeDelay(attemptsCount);\n await $60f584ba62481a94$var$cancellableSleep(delay, abortSignal);\n }\n continue;\n } else return handleTerminalErrorOrResponse();\n }\n if (abortSignal?.aborted) throw new Error('Request aborted.');\n else return handleTerminalErrorOrResponse();\n };\n};\nconst $60f584ba62481a94$var$cancellableSleep = (timeoutMs, abortSignal)=>{\n if (abortSignal?.aborted) return Promise.resolve();\n let timeoutId;\n let sleepPromiseResolveFn;\n const sleepPromise = new Promise((resolve)=>{\n sleepPromiseResolveFn = resolve;\n timeoutId = setTimeout(resolve, timeoutMs);\n });\n abortSignal?.addEventListener('abort', function cancelSleep(_) {\n clearTimeout(timeoutId);\n abortSignal?.removeEventListener('abort', cancelSleep);\n sleepPromiseResolveFn();\n });\n return sleepPromise;\n};\nconst $60f584ba62481a94$var$addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts)=>{\n if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') return;\n nextHandlerOutput.$metadata = {\n ...nextHandlerOutput.$metadata ?? {},\n attempts: attempts\n };\n};\n\n});\n\nparcelRegister(\"aBoxv\", function(module, exports) {\n\n$parcel$export(module.exports, \"userAgentMiddlewareFactory\", () => $2b3779b84f2cce55$export$ff28171a05413bc5);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Middleware injects user agent string to specified header(default to 'x-amz-user-agent'),\n * if the header is not set already.\n *\n * TODO: incorporate new user agent design\n */ const $2b3779b84f2cce55$export$ff28171a05413bc5 = ({ userAgentHeader: userAgentHeader = 'x-amz-user-agent', userAgentValue: userAgentValue = '' })=>(next)=>{\n return async function userAgentMiddleware(request) {\n if (userAgentValue.trim().length === 0) {\n const result = await next(request);\n return result;\n } else {\n const headerName = userAgentHeader.toLowerCase();\n request.headers[headerName] = request.headers[headerName] ? `${request.headers[headerName]} ${userAgentValue}` : userAgentValue;\n const response = await next(request);\n return response;\n }\n };\n };\n\n});\n\nparcelRegister(\"8e8Xp\", function(module, exports) {\n\n$parcel$export(module.exports, \"composeTransferHandler\", () => $faf95af99f8b5697$export$f074d76e52925468);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a transfer handler with a core transfer handler and a list of middleware.\n * @param coreHandler Core transfer handler\n * @param middleware\tList of middleware\n * @returns A transfer handler whose option type is the union of the core\n * \ttransfer handler's option type and the middleware's option type.\n * @internal\n */ const $faf95af99f8b5697$export$f074d76e52925468 = (coreHandler, middleware)=>(request, options)=>{\n const context = {};\n let composedHandler = (composeHandlerRequest)=>coreHandler(composeHandlerRequest, options);\n for(let i = middleware.length - 1; i >= 0; i--){\n const m = middleware[i];\n const resolvedMiddleware = m(options);\n composedHandler = resolvedMiddleware(composedHandler, context);\n }\n return composedHandler(request);\n };\n\n});\n\nparcelRegister(\"anVi4\", function(module, exports) {\n\n$parcel$export(module.exports, \"fetchTransferHandler\", () => $c6ff1f678a0bf7c2$export$d2573baf35521e4c);\n\nvar $e0exy = parcelRequire(\"e0exy\");\n\nvar $8rSHg = parcelRequire(\"8rSHg\");\n\n\nvar $joNXB = parcelRequire(\"joNXB\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $c6ff1f678a0bf7c2$var$shouldSendBody = (method)=>![\n 'HEAD',\n 'GET',\n 'DELETE'\n ].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nconst $c6ff1f678a0bf7c2$export$d2573baf35521e4c = async ({ url: url, method: method, headers: headers, body: body }, { abortSignal: abortSignal, cache: cache, withCrossDomainCredentials: withCrossDomainCredentials })=>{\n let resp;\n try {\n resp = await fetch(url, {\n method: method,\n headers: headers,\n body: $c6ff1f678a0bf7c2$var$shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache: cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin'\n });\n } catch (e) {\n if (e instanceof TypeError) throw new (0, $e0exy.AmplifyError)({\n name: (0, $8rSHg.AmplifyErrorCode).NetworkError,\n message: 'A network error has occurred.',\n underlyingError: e\n });\n throw e;\n }\n const responseHeaders = {};\n resp.headers?.forEach((value, key)=>{\n responseHeaders[key.toLowerCase()] = value;\n });\n const httpResponse = {\n statusCode: resp.status,\n headers: responseHeaders,\n body: null\n };\n // resp.body is a ReadableStream according to Fetch API spec, but React Native\n // does not implement it.\n const bodyWithMixin = Object.assign(resp.body ?? {}, {\n text: (0, $joNXB.withMemoization)(()=>resp.text()),\n blob: (0, $joNXB.withMemoization)(()=>resp.blob()),\n json: (0, $joNXB.withMemoization)(()=>resp.json())\n });\n return {\n ...httpResponse,\n body: bodyWithMixin\n };\n};\n\n});\nparcelRegister(\"joNXB\", function(module, exports) {\n\n$parcel$export(module.exports, \"withMemoization\", () => $0cf8b26b324855c8$export$580ad1ce15092b15);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cache the payload of a response body. It allows multiple calls to the body,\n * for example, when reading the body in both retry decider and error deserializer.\n * Caching body is allowed here because we call the body accessor(blob(), json(),\n * etc.) when body is small or streaming implementation is not available(RN).\n *\n * @internal\n */ const $0cf8b26b324855c8$export$580ad1ce15092b15 = (payloadAccessor)=>{\n let cached;\n return ()=>{\n if (!cached) // Explicitly not awaiting. Intermediate await would add overhead and\n // introduce a possible race in the event that this wrapper is called\n // again before the first `payloadAccessor` call resolves.\n cached = payloadAccessor();\n return cached;\n };\n};\n\n});\n\n\n\nparcelRegister(\"5D9nd\", function(module, exports) {\n\n$parcel$export(module.exports, \"jitteredBackoff\", () => $6b984381f509b0c4$export$caea50bde345f648);\n\n\n\n\nvar $h05tY = parcelRequire(\"h05tY\");\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst $6b984381f509b0c4$var$DEFAULT_MAX_DELAY_MS = 300000;\nconst $6b984381f509b0c4$export$caea50bde345f648 = (attempt)=>{\n const delayFunction = (0, $h05tY.jitteredBackoff)($6b984381f509b0c4$var$DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? $6b984381f509b0c4$var$DEFAULT_MAX_DELAY_MS : delay;\n};\n\n});\nparcelRegister(\"h05tY\", function(module, exports) {\n\n$parcel$export(module.exports, \"jitteredBackoff\", () => $bb00929d82f30d06$export$caea50bde345f648);\n\nvar $1Ns4m = parcelRequire(\"1Ns4m\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private\n * Internal use of Amplify only\n */ function $bb00929d82f30d06$export$caea50bde345f648(maxDelayMs = (0, $1Ns4m.MAX_DELAY_MS)) {\n const BASE_TIME_MS = 100;\n const JITTER_FACTOR = 100;\n return (attempt)=>{\n const delay = 2 ** attempt * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n\n});\nparcelRegister(\"1Ns4m\", function(module, exports) {\n\n$parcel$export(module.exports, \"MAX_DELAY_MS\", () => $2ebb2babc51c1967$export$76041b1400befb8b);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $2ebb2babc51c1967$export$76041b1400befb8b = 300000;\n\n});\n\n\n\nparcelRegister(\"4ZD6k\", function(module, exports) {\n\n$parcel$export(module.exports, \"getRetryDecider\", () => $8eda02c680edd0d6$export$b919d98317a7685f);\n\nvar $8rSHg = parcelRequire(\"8rSHg\");\n\nvar $i3rGM = parcelRequire(\"i3rGM\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */ const $8eda02c680edd0d6$export$b919d98317a7685f = (errorParser)=>async (response, error)=>{\n const parsedError = error ?? await errorParser(response) ?? undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n const isRetryable = $8eda02c680edd0d6$var$isConnectionError(error) || $8eda02c680edd0d6$var$isThrottlingError(statusCode, errorCode) || (0, $i3rGM.isClockSkewError)(errorCode) || $8eda02c680edd0d6$var$isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable\n };\n };\n// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37\nconst $8eda02c680edd0d6$var$THROTTLING_ERROR_CODES = [\n 'BandwidthLimitExceeded',\n 'EC2ThrottledException',\n 'LimitExceededException',\n 'PriorRequestNotComplete',\n 'ProvisionedThroughputExceededException',\n 'RequestLimitExceeded',\n 'RequestThrottled',\n 'RequestThrottledException',\n 'SlowDown',\n 'ThrottledException',\n 'Throttling',\n 'ThrottlingException',\n 'TooManyRequestsException'\n];\nconst $8eda02c680edd0d6$var$TIMEOUT_ERROR_CODES = [\n 'TimeoutError',\n 'RequestTimeout',\n 'RequestTimeoutException'\n];\nconst $8eda02c680edd0d6$var$isThrottlingError = (statusCode, errorCode)=>statusCode === 429 || !!errorCode && $8eda02c680edd0d6$var$THROTTLING_ERROR_CODES.includes(errorCode);\nconst $8eda02c680edd0d6$var$isConnectionError = (error)=>[\n (0, $8rSHg.AmplifyErrorCode).NetworkError,\n // TODO(vNext): unify the error code `ERR_NETWORK` used by the Storage XHR handler\n 'ERR_NETWORK'\n ].includes(error?.name);\nconst $8eda02c680edd0d6$var$isServerSideError = (statusCode, errorCode)=>!!statusCode && [\n 500,\n 502,\n 503,\n 504\n ].includes(statusCode) || !!errorCode && $8eda02c680edd0d6$var$TIMEOUT_ERROR_CODES.includes(errorCode);\n\n});\nparcelRegister(\"i3rGM\", function(module, exports) {\n\n$parcel$export(module.exports, \"isClockSkewError\", () => $25c9c2f444e10e78$export$7b87435661177a94);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// via https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L8\nconst $25c9c2f444e10e78$var$CLOCK_SKEW_ERROR_CODES = [\n 'AuthFailure',\n 'InvalidSignatureException',\n 'RequestExpired',\n 'RequestInTheFuture',\n 'RequestTimeTooSkewed',\n 'SignatureDoesNotMatch',\n 'BadRequestException'\n];\n/**\n * Given an error code, returns true if it is related to a clock skew error.\n *\n * @param errorCode String representation of some error.\n * @returns True if given error is present in `CLOCK_SKEW_ERROR_CODES`, false otherwise.\n *\n * @internal\n */ const $25c9c2f444e10e78$export$7b87435661177a94 = (errorCode)=>!!errorCode && $25c9c2f444e10e78$var$CLOCK_SKEW_ERROR_CODES.includes(errorCode);\n\n});\n\n\nparcelRegister(\"7Ar4G\", function(module, exports) {\n\n$parcel$export(module.exports, \"AmplifyUrl\", () => $69ea4819ac006867$export$beb82d9d9136c16e);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $69ea4819ac006867$export$beb82d9d9136c16e = URL;\nconst $69ea4819ac006867$export$4ea7bbdac595b5fb = URLSearchParams;\n\n});\n\nparcelRegister(\"dj9FS\", function(module, exports) {\n\n$parcel$export(module.exports, \"getAmplifyUserAgent\", () => $a3c63f83cda4eabf$export$ede38edb26c0bfdf);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $bJXer = parcelRequire(\"bJXer\");\n\nvar $iHOzP = parcelRequire(\"iHOzP\");\n\nvar $lA3xE = parcelRequire(\"lA3xE\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $a3c63f83cda4eabf$var$BASE_USER_AGENT = `aws-amplify`;\n/** Sanitize Amplify version string be removing special character + and character post the special character */ const $a3c63f83cda4eabf$export$b8f78c57ec316f83 = (amplifyVersion)=>amplifyVersion.replace(/\\+.*/, '');\nclass $a3c63f83cda4eabf$var$PlatformBuilder {\n constructor(){\n this.userAgent = `${$a3c63f83cda4eabf$var$BASE_USER_AGENT}/${$a3c63f83cda4eabf$export$b8f78c57ec316f83((0, $bJXer.version))}`;\n }\n get framework() {\n return (0, $iHOzP.detectFramework)();\n }\n get isReactNative() {\n return this.framework === (0, $k2DuP.Framework).ReactNative || this.framework === (0, $k2DuP.Framework).Expo;\n }\n observeFrameworkChanges(fcn) {\n (0, $iHOzP.observeFrameworkChanges)(fcn);\n }\n}\nconst $a3c63f83cda4eabf$export$2dffd0b5373a4389 = new $a3c63f83cda4eabf$var$PlatformBuilder();\nconst $a3c63f83cda4eabf$export$7d201307d8979e21 = ({ category: category, action: action } = {})=>{\n const userAgent = [\n [\n $a3c63f83cda4eabf$var$BASE_USER_AGENT,\n $a3c63f83cda4eabf$export$b8f78c57ec316f83((0, $bJXer.version))\n ]\n ];\n if (category) userAgent.push([\n category,\n action\n ]);\n userAgent.push([\n 'framework',\n (0, $iHOzP.detectFramework)()\n ]);\n if (category && action) {\n const customState = (0, $lA3xE.getCustomUserAgent)(category, action);\n if (customState) customState.forEach((state)=>{\n userAgent.push(state);\n });\n }\n return userAgent;\n};\nconst $a3c63f83cda4eabf$export$ede38edb26c0bfdf = (customUserAgentDetails)=>{\n const userAgent = $a3c63f83cda4eabf$export$7d201307d8979e21(customUserAgentDetails);\n const userAgentString = userAgent.map(([agentKey, agentValue])=>agentKey && agentValue ? `${agentKey}/${agentValue}` : agentKey).join(' ');\n return userAgentString;\n};\n\n});\nparcelRegister(\"k2DuP\", function(module, exports) {\n\n$parcel$export(module.exports, \"Framework\", () => $03a78c53205d4e48$export$638889172ebce0c4);\n$parcel$export(module.exports, \"Category\", () => $03a78c53205d4e48$export$3a8840c5b2ecf003);\n$parcel$export(module.exports, \"AuthAction\", () => $03a78c53205d4e48$export$900b1436d7e65f4);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $03a78c53205d4e48$export$638889172ebce0c4;\n(function(Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})($03a78c53205d4e48$export$638889172ebce0c4 || ($03a78c53205d4e48$export$638889172ebce0c4 = {}));\nvar $03a78c53205d4e48$export$3a8840c5b2ecf003;\n(function(Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})($03a78c53205d4e48$export$3a8840c5b2ecf003 || ($03a78c53205d4e48$export$3a8840c5b2ecf003 = {}));\nvar $03a78c53205d4e48$export$89656a7f296a8665;\n(function(AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})($03a78c53205d4e48$export$89656a7f296a8665 || ($03a78c53205d4e48$export$89656a7f296a8665 = {}));\nvar $03a78c53205d4e48$export$30c16f5c43437fd7;\n(function(AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})($03a78c53205d4e48$export$30c16f5c43437fd7 || ($03a78c53205d4e48$export$30c16f5c43437fd7 = {}));\nvar $03a78c53205d4e48$export$126e20fdc0f0d34b;\n(function(ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})($03a78c53205d4e48$export$126e20fdc0f0d34b || ($03a78c53205d4e48$export$126e20fdc0f0d34b = {}));\nvar $03a78c53205d4e48$export$900b1436d7e65f4;\n(function(AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})($03a78c53205d4e48$export$900b1436d7e65f4 || ($03a78c53205d4e48$export$900b1436d7e65f4 = {}));\nvar $03a78c53205d4e48$export$2f5a715aba4cde93;\n(function(DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})($03a78c53205d4e48$export$2f5a715aba4cde93 || ($03a78c53205d4e48$export$2f5a715aba4cde93 = {}));\nvar $03a78c53205d4e48$export$afafab3eb8fc6fef;\n(function(GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})($03a78c53205d4e48$export$afafab3eb8fc6fef || ($03a78c53205d4e48$export$afafab3eb8fc6fef = {}));\nvar $03a78c53205d4e48$export$c01a8c16ffda791e;\n(function(InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})($03a78c53205d4e48$export$c01a8c16ffda791e || ($03a78c53205d4e48$export$c01a8c16ffda791e = {}));\nvar $03a78c53205d4e48$export$68e0695a774ab7fa;\n(function(InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})($03a78c53205d4e48$export$68e0695a774ab7fa || ($03a78c53205d4e48$export$68e0695a774ab7fa = {}));\nvar $03a78c53205d4e48$export$aa89b4c447a07cee;\n(function(PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})($03a78c53205d4e48$export$aa89b4c447a07cee || ($03a78c53205d4e48$export$aa89b4c447a07cee = {}));\nvar $03a78c53205d4e48$export$ade48b30f1e78672;\n(function(PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})($03a78c53205d4e48$export$ade48b30f1e78672 || ($03a78c53205d4e48$export$ade48b30f1e78672 = {}));\nvar $03a78c53205d4e48$export$2c5ee06ab9fa5040;\n(function(PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})($03a78c53205d4e48$export$2c5ee06ab9fa5040 || ($03a78c53205d4e48$export$2c5ee06ab9fa5040 = {}));\nvar $03a78c53205d4e48$export$d4f3c54b808b00ce;\n(function(StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})($03a78c53205d4e48$export$d4f3c54b808b00ce || ($03a78c53205d4e48$export$d4f3c54b808b00ce = {}));\n\n});\n\nparcelRegister(\"bJXer\", function(module, exports) {\n\n$parcel$export(module.exports, \"version\", () => $f2bdc992a31a3840$export$83d89fbfd8236492);\n// generated by genversion\nconst $f2bdc992a31a3840$export$83d89fbfd8236492 = '6.13.6';\n\n});\n\nparcelRegister(\"iHOzP\", function(module, exports) {\n\n$parcel$export(module.exports, \"detectFramework\", () => $8e898e8be4dc09ea$export$9ce73e459ec93b6a);\n$parcel$export(module.exports, \"observeFrameworkChanges\", () => $8e898e8be4dc09ea$export$5d5c467ce0b213f);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $1XCWz = parcelRequire(\"1XCWz\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// We want to cache detection since the framework won't change\nlet $8e898e8be4dc09ea$var$frameworkCache;\nconst $8e898e8be4dc09ea$export$d56891f33aa26edc = [];\n// Setup the detection reset tracking / timeout delays\nlet $8e898e8be4dc09ea$var$resetTriggered = false;\nconst $8e898e8be4dc09ea$var$SSR_RESET_TIMEOUT = 10; // ms\nconst $8e898e8be4dc09ea$var$WEB_RESET_TIMEOUT = 10; // ms\nconst $8e898e8be4dc09ea$var$PRIME_FRAMEWORK_DELAY = 1000; // ms\nconst $8e898e8be4dc09ea$export$9ce73e459ec93b6a = ()=>{\n if (!$8e898e8be4dc09ea$var$frameworkCache) {\n $8e898e8be4dc09ea$var$frameworkCache = (0, $1XCWz.detect)();\n if ($8e898e8be4dc09ea$var$resetTriggered) // The final run of detectFramework:\n // Starting from this point, the `frameworkCache` becomes \"final\".\n // So we don't need to notify the observers again so the observer\n // can be removed after the final notice.\n while($8e898e8be4dc09ea$export$d56891f33aa26edc.length)$8e898e8be4dc09ea$export$d56891f33aa26edc.pop()?.();\n else // The first run of detectFramework:\n // Every time we update the cache, call each observer function\n $8e898e8be4dc09ea$export$d56891f33aa26edc.forEach((fcn)=>{\n fcn();\n });\n // Retry once for either Unknown type after a delay (explained below)\n $8e898e8be4dc09ea$var$resetTimeout((0, $k2DuP.Framework).ServerSideUnknown, $8e898e8be4dc09ea$var$SSR_RESET_TIMEOUT);\n $8e898e8be4dc09ea$var$resetTimeout((0, $k2DuP.Framework).WebUnknown, $8e898e8be4dc09ea$var$WEB_RESET_TIMEOUT);\n }\n return $8e898e8be4dc09ea$var$frameworkCache;\n};\n/**\n * @internal Setup observer callback that will be called everytime the framework changes\n */ const $8e898e8be4dc09ea$export$5d5c467ce0b213f = (fcn)=>{\n // When the `frameworkCache` won't be updated again, we ignore all incoming\n // observers.\n if ($8e898e8be4dc09ea$var$resetTriggered) return;\n $8e898e8be4dc09ea$export$d56891f33aa26edc.push(fcn);\n};\nfunction $8e898e8be4dc09ea$export$d2adf65b87e47523() {\n $8e898e8be4dc09ea$var$frameworkCache = undefined;\n}\n// For a framework type and a delay amount, setup the event to re-detect\n// During the runtime boot, it is possible that framework detection will\n// be triggered before the framework has made modifications to the\n// global/window/etc needed for detection. When no framework is detected\n// we will reset and try again to ensure we don't use a cached\n// non-framework detection result for all requests.\nfunction $8e898e8be4dc09ea$var$resetTimeout(framework, delay) {\n if ($8e898e8be4dc09ea$var$frameworkCache === framework && !$8e898e8be4dc09ea$var$resetTriggered) setTimeout(()=>{\n $8e898e8be4dc09ea$export$d2adf65b87e47523();\n $8e898e8be4dc09ea$var$resetTriggered = true;\n setTimeout($8e898e8be4dc09ea$export$9ce73e459ec93b6a, $8e898e8be4dc09ea$var$PRIME_FRAMEWORK_DELAY);\n }, delay);\n}\n\n});\nparcelRegister(\"1XCWz\", function(module, exports) {\n\n$parcel$export(module.exports, \"detect\", () => $4f5e49be6c2f4c6b$export$17b446b869dad473);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $5SWUB = parcelRequire(\"5SWUB\");\n\nvar $89E5v = parcelRequire(\"89E5v\");\n\nvar $dXsZ3 = parcelRequire(\"dXsZ3\");\n\nvar $3uPOM = parcelRequire(\"3uPOM\");\n\nvar $7wUjf = parcelRequire(\"7wUjf\");\n\nvar $cZAgk = parcelRequire(\"cZAgk\");\n\nvar $04Bbd = parcelRequire(\"04Bbd\");\n\nvar $cN0eS = parcelRequire(\"cN0eS\");\n\nvar $SrjZ5 = parcelRequire(\"SrjZ5\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// These are in the order of detection where when both are detectable, the early Framework will be reported\nconst $4f5e49be6c2f4c6b$var$detectionMap = [\n // First, detect mobile\n {\n platform: (0, $k2DuP.Framework).Expo,\n detectionMethod: (0, $cN0eS.expoDetect)\n },\n {\n platform: (0, $k2DuP.Framework).ReactNative,\n detectionMethod: (0, $04Bbd.reactNativeDetect)\n },\n // Next, detect web frameworks\n {\n platform: (0, $k2DuP.Framework).NextJs,\n detectionMethod: (0, $3uPOM.nextWebDetect)\n },\n {\n platform: (0, $k2DuP.Framework).Nuxt,\n detectionMethod: (0, $7wUjf.nuxtWebDetect)\n },\n {\n platform: (0, $k2DuP.Framework).Angular,\n detectionMethod: (0, $cZAgk.angularWebDetect)\n },\n {\n platform: (0, $k2DuP.Framework).React,\n detectionMethod: (0, $5SWUB.reactWebDetect)\n },\n {\n platform: (0, $k2DuP.Framework).VueJs,\n detectionMethod: (0, $89E5v.vueWebDetect)\n },\n {\n platform: (0, $k2DuP.Framework).Svelte,\n detectionMethod: (0, $dXsZ3.svelteWebDetect)\n },\n {\n platform: (0, $k2DuP.Framework).WebUnknown,\n detectionMethod: (0, $SrjZ5.webDetect)\n },\n // Last, detect ssr frameworks\n {\n platform: (0, $k2DuP.Framework).NextJsSSR,\n detectionMethod: (0, $3uPOM.nextSSRDetect)\n },\n {\n platform: (0, $k2DuP.Framework).NuxtSSR,\n detectionMethod: (0, $7wUjf.nuxtSSRDetect)\n },\n {\n platform: (0, $k2DuP.Framework).ReactSSR,\n detectionMethod: (0, $5SWUB.reactSSRDetect)\n },\n {\n platform: (0, $k2DuP.Framework).VueJsSSR,\n detectionMethod: (0, $89E5v.vueSSRDetect)\n },\n {\n platform: (0, $k2DuP.Framework).AngularSSR,\n detectionMethod: (0, $cZAgk.angularSSRDetect)\n },\n {\n platform: (0, $k2DuP.Framework).SvelteSSR,\n detectionMethod: (0, $dXsZ3.svelteSSRDetect)\n }\n];\nfunction $4f5e49be6c2f4c6b$export$17b446b869dad473() {\n return $4f5e49be6c2f4c6b$var$detectionMap.find((detectionEntry)=>detectionEntry.detectionMethod())?.platform || (0, $k2DuP.Framework).ServerSideUnknown;\n}\n\n});\nparcelRegister(\"5SWUB\", function(module, exports) {\n\n$parcel$export(module.exports, \"reactWebDetect\", () => $627d0a27c40192cb$export$ba3f37c54f0f7805);\n$parcel$export(module.exports, \"reactSSRDetect\", () => $627d0a27c40192cb$export$86269c582305790);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n\nvar $hPtJY = parcelRequire(\"hPtJY\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react 18.2 - built using Vite\nfunction $627d0a27c40192cb$export$ba3f37c54f0f7805() {\n const elementKeyPrefixedWithReact = (key)=>{\n return key.startsWith('_react') || key.startsWith('__react');\n };\n const elementIsReactEnabled = (element)=>{\n return Object.keys(element).find(elementKeyPrefixedWithReact);\n };\n const allElementsWithId = ()=>Array.from(document.querySelectorAll('[id]'));\n return (0, $i0jHL.documentExists)() && allElementsWithId().some(elementIsReactEnabled);\n}\nfunction $627d0a27c40192cb$export$86269c582305790() {\n return (0, $i0jHL.processExists)() && typeof $hPtJY.env !== 'undefined' && !!Object.keys($hPtJY.env).find((key)=>key.includes('react'));\n}\n\n});\nparcelRegister(\"i0jHL\", function(module, exports) {\n\n$parcel$export(module.exports, \"globalExists\", () => $143673b599f131f0$export$a15eed0e463030a9);\n$parcel$export(module.exports, \"windowExists\", () => $143673b599f131f0$export$daba2802a1a41c1f);\n$parcel$export(module.exports, \"documentExists\", () => $143673b599f131f0$export$b949ebcb877faa59);\n$parcel$export(module.exports, \"processExists\", () => $143673b599f131f0$export$ba10401363d0f7f6);\n$parcel$export(module.exports, \"keyPrefixMatch\", () => $143673b599f131f0$export$252f88727cff70c7);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $143673b599f131f0$export$a15eed0e463030a9 = ()=>{\n return typeof $parcel$global !== 'undefined';\n};\nconst $143673b599f131f0$export$a5e7eb32e5221222 = ()=>{\n return typeof globalThis !== 'undefined';\n};\nconst $143673b599f131f0$export$daba2802a1a41c1f = ()=>{\n return typeof window !== 'undefined';\n};\nconst $143673b599f131f0$export$b949ebcb877faa59 = ()=>{\n return typeof document !== 'undefined';\n};\nconst $143673b599f131f0$export$ba10401363d0f7f6 = ()=>{\n return false;\n};\nconst $143673b599f131f0$export$252f88727cff70c7 = (object, prefix)=>{\n return !!Object.keys(object).find((key)=>key.startsWith(prefix));\n};\n\n});\n\nparcelRegister(\"hPtJY\", function(module, exports) {\n// shim for using process in browser\nvar $cfae44f0dfdf62c0$var$process = module.exports = {};\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\nvar $cfae44f0dfdf62c0$var$cachedSetTimeout;\nvar $cfae44f0dfdf62c0$var$cachedClearTimeout;\nfunction $cfae44f0dfdf62c0$var$defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction $cfae44f0dfdf62c0$var$defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function() {\n try {\n if (typeof setTimeout === 'function') $cfae44f0dfdf62c0$var$cachedSetTimeout = setTimeout;\n else $cfae44f0dfdf62c0$var$cachedSetTimeout = $cfae44f0dfdf62c0$var$defaultSetTimout;\n } catch (e) {\n $cfae44f0dfdf62c0$var$cachedSetTimeout = $cfae44f0dfdf62c0$var$defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') $cfae44f0dfdf62c0$var$cachedClearTimeout = clearTimeout;\n else $cfae44f0dfdf62c0$var$cachedClearTimeout = $cfae44f0dfdf62c0$var$defaultClearTimeout;\n } catch (e) {\n $cfae44f0dfdf62c0$var$cachedClearTimeout = $cfae44f0dfdf62c0$var$defaultClearTimeout;\n }\n})();\nfunction $cfae44f0dfdf62c0$var$runTimeout(fun) {\n if ($cfae44f0dfdf62c0$var$cachedSetTimeout === setTimeout) //normal enviroments in sane situations\n return setTimeout(fun, 0);\n // if setTimeout wasn't available but was latter defined\n if (($cfae44f0dfdf62c0$var$cachedSetTimeout === $cfae44f0dfdf62c0$var$defaultSetTimout || !$cfae44f0dfdf62c0$var$cachedSetTimeout) && setTimeout) {\n $cfae44f0dfdf62c0$var$cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return $cfae44f0dfdf62c0$var$cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return $cfae44f0dfdf62c0$var$cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return $cfae44f0dfdf62c0$var$cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction $cfae44f0dfdf62c0$var$runClearTimeout(marker) {\n if ($cfae44f0dfdf62c0$var$cachedClearTimeout === clearTimeout) //normal enviroments in sane situations\n return clearTimeout(marker);\n // if clearTimeout wasn't available but was latter defined\n if (($cfae44f0dfdf62c0$var$cachedClearTimeout === $cfae44f0dfdf62c0$var$defaultClearTimeout || !$cfae44f0dfdf62c0$var$cachedClearTimeout) && clearTimeout) {\n $cfae44f0dfdf62c0$var$cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return $cfae44f0dfdf62c0$var$cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return $cfae44f0dfdf62c0$var$cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return $cfae44f0dfdf62c0$var$cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar $cfae44f0dfdf62c0$var$queue = [];\nvar $cfae44f0dfdf62c0$var$draining = false;\nvar $cfae44f0dfdf62c0$var$currentQueue;\nvar $cfae44f0dfdf62c0$var$queueIndex = -1;\nfunction $cfae44f0dfdf62c0$var$cleanUpNextTick() {\n if (!$cfae44f0dfdf62c0$var$draining || !$cfae44f0dfdf62c0$var$currentQueue) return;\n $cfae44f0dfdf62c0$var$draining = false;\n if ($cfae44f0dfdf62c0$var$currentQueue.length) $cfae44f0dfdf62c0$var$queue = $cfae44f0dfdf62c0$var$currentQueue.concat($cfae44f0dfdf62c0$var$queue);\n else $cfae44f0dfdf62c0$var$queueIndex = -1;\n if ($cfae44f0dfdf62c0$var$queue.length) $cfae44f0dfdf62c0$var$drainQueue();\n}\nfunction $cfae44f0dfdf62c0$var$drainQueue() {\n if ($cfae44f0dfdf62c0$var$draining) return;\n var timeout = $cfae44f0dfdf62c0$var$runTimeout($cfae44f0dfdf62c0$var$cleanUpNextTick);\n $cfae44f0dfdf62c0$var$draining = true;\n var len = $cfae44f0dfdf62c0$var$queue.length;\n while(len){\n $cfae44f0dfdf62c0$var$currentQueue = $cfae44f0dfdf62c0$var$queue;\n $cfae44f0dfdf62c0$var$queue = [];\n while(++$cfae44f0dfdf62c0$var$queueIndex < len)if ($cfae44f0dfdf62c0$var$currentQueue) $cfae44f0dfdf62c0$var$currentQueue[$cfae44f0dfdf62c0$var$queueIndex].run();\n $cfae44f0dfdf62c0$var$queueIndex = -1;\n len = $cfae44f0dfdf62c0$var$queue.length;\n }\n $cfae44f0dfdf62c0$var$currentQueue = null;\n $cfae44f0dfdf62c0$var$draining = false;\n $cfae44f0dfdf62c0$var$runClearTimeout(timeout);\n}\n$cfae44f0dfdf62c0$var$process.nextTick = function(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) for(var i = 1; i < arguments.length; i++)args[i - 1] = arguments[i];\n $cfae44f0dfdf62c0$var$queue.push(new $cfae44f0dfdf62c0$var$Item(fun, args));\n if ($cfae44f0dfdf62c0$var$queue.length === 1 && !$cfae44f0dfdf62c0$var$draining) $cfae44f0dfdf62c0$var$runTimeout($cfae44f0dfdf62c0$var$drainQueue);\n};\n// v8 likes predictible objects\nfunction $cfae44f0dfdf62c0$var$Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n$cfae44f0dfdf62c0$var$Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n};\n$cfae44f0dfdf62c0$var$process.title = 'browser';\n$cfae44f0dfdf62c0$var$process.browser = true;\n$cfae44f0dfdf62c0$var$process.env = {};\n$cfae44f0dfdf62c0$var$process.argv = [];\n$cfae44f0dfdf62c0$var$process.version = ''; // empty string to avoid regexp issues\n$cfae44f0dfdf62c0$var$process.versions = {};\nfunction $cfae44f0dfdf62c0$var$noop() {}\n$cfae44f0dfdf62c0$var$process.on = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.addListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.once = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.off = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.removeListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.removeAllListeners = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.emit = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.prependListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.prependOnceListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.listeners = function(name) {\n return [];\n};\n$cfae44f0dfdf62c0$var$process.binding = function(name) {\n throw new Error('process.binding is not supported');\n};\n$cfae44f0dfdf62c0$var$process.cwd = function() {\n return '/';\n};\n$cfae44f0dfdf62c0$var$process.chdir = function(dir) {\n throw new Error('process.chdir is not supported');\n};\n$cfae44f0dfdf62c0$var$process.umask = function() {\n return 0;\n};\n\n});\n\n\nparcelRegister(\"89E5v\", function(module, exports) {\n\n$parcel$export(module.exports, \"vueWebDetect\", () => $ca4f85d593562053$export$d91d90d62b78936d);\n$parcel$export(module.exports, \"vueSSRDetect\", () => $ca4f85d593562053$export$257a4c0f8294a101);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with vue 3.3.2\nfunction $ca4f85d593562053$export$d91d90d62b78936d() {\n return (0, $i0jHL.windowExists)() && (0, $i0jHL.keyPrefixMatch)(window, '__VUE');\n}\nfunction $ca4f85d593562053$export$257a4c0f8294a101() {\n return (0, $i0jHL.globalExists)() && (0, $i0jHL.keyPrefixMatch)($parcel$global, '__VUE');\n}\n\n});\n\nparcelRegister(\"dXsZ3\", function(module, exports) {\n\n$parcel$export(module.exports, \"svelteWebDetect\", () => $10841416b19b9aca$export$6dafc32a94edaed3);\n$parcel$export(module.exports, \"svelteSSRDetect\", () => $10841416b19b9aca$export$819dcb7fe144d8b0);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n\nvar $hPtJY = parcelRequire(\"hPtJY\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with svelte 3.59\nfunction $10841416b19b9aca$export$6dafc32a94edaed3() {\n return (0, $i0jHL.windowExists)() && (0, $i0jHL.keyPrefixMatch)(window, '__SVELTE');\n}\nfunction $10841416b19b9aca$export$819dcb7fe144d8b0() {\n return (0, $i0jHL.processExists)() && typeof $hPtJY.env !== 'undefined' && !!Object.keys($hPtJY.env).find((key)=>key.includes('svelte'));\n}\n\n});\n\nparcelRegister(\"3uPOM\", function(module, exports) {\n\n$parcel$export(module.exports, \"nextWebDetect\", () => $da3905a0dc1faf56$export$f8462bcf03110eff);\n$parcel$export(module.exports, \"nextSSRDetect\", () => $da3905a0dc1faf56$export$61c08ed144a5d4ca);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with next 13.4 / react 18.2\nfunction $da3905a0dc1faf56$export$f8462bcf03110eff() {\n return (0, $i0jHL.windowExists)() && window.next && typeof window.next === 'object';\n}\nfunction $da3905a0dc1faf56$export$61c08ed144a5d4ca() {\n return (0, $i0jHL.globalExists)() && ((0, $i0jHL.keyPrefixMatch)($parcel$global, '__next') || (0, $i0jHL.keyPrefixMatch)($parcel$global, '__NEXT'));\n}\n\n});\n\nparcelRegister(\"7wUjf\", function(module, exports) {\n\n$parcel$export(module.exports, \"nuxtWebDetect\", () => $24fea5be4f379b80$export$bed54a4e6d9d25fb);\n$parcel$export(module.exports, \"nuxtSSRDetect\", () => $24fea5be4f379b80$export$fb3ce982948d27e8);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with nuxt 2.15 / vue 2.7\nfunction $24fea5be4f379b80$export$bed54a4e6d9d25fb() {\n return (0, $i0jHL.windowExists)() && (window.__NUXT__ !== undefined || window.$nuxt !== undefined);\n}\nfunction $24fea5be4f379b80$export$fb3ce982948d27e8() {\n return (0, $i0jHL.globalExists)() && typeof $parcel$global.__NUXT_PATHS__ !== 'undefined';\n}\n\n});\n\nparcelRegister(\"cZAgk\", function(module, exports) {\n\n$parcel$export(module.exports, \"angularWebDetect\", () => $f97e986d2a7067a7$export$b5a20bd39eb02ba0);\n$parcel$export(module.exports, \"angularSSRDetect\", () => $f97e986d2a7067a7$export$8ab518c8987c870f);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n\nvar $hPtJY = parcelRequire(\"hPtJY\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with @angular/core 16.0.0\nfunction $f97e986d2a7067a7$export$b5a20bd39eb02ba0() {\n const angularVersionSetInDocument = Boolean((0, $i0jHL.documentExists)() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean((0, $i0jHL.windowExists)() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nfunction $f97e986d2a7067a7$export$8ab518c8987c870f() {\n return (0, $i0jHL.processExists)() && typeof $hPtJY.env === 'object' && undefined?.startsWith('ng ') || false;\n}\n\n});\n\nparcelRegister(\"04Bbd\", function(module, exports) {\n\n$parcel$export(module.exports, \"reactNativeDetect\", () => $ea500a36684bbe73$export$1c8414c1859e3748);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react-native 0.17.7\nfunction $ea500a36684bbe73$export$1c8414c1859e3748() {\n return typeof navigator !== 'undefined' && typeof navigator.product !== 'undefined' && navigator.product === 'ReactNative';\n}\n\n});\n\nparcelRegister(\"cN0eS\", function(module, exports) {\n\n$parcel$export(module.exports, \"expoDetect\", () => $0b4145bd3be7264c$export$85fd46d5e29a4f7e);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with expo 48 / react-native 0.71.3\nfunction $0b4145bd3be7264c$export$85fd46d5e29a4f7e() {\n return (0, $i0jHL.globalExists)() && typeof $parcel$global.expo !== 'undefined';\n}\n\n});\n\nparcelRegister(\"SrjZ5\", function(module, exports) {\n\n$parcel$export(module.exports, \"webDetect\", () => $86fec584d392e5dc$export$41b1270b988065fb);\n\nvar $i0jHL = parcelRequire(\"i0jHL\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $86fec584d392e5dc$export$41b1270b988065fb() {\n return (0, $i0jHL.windowExists)();\n}\n\n});\n\n\n\nparcelRegister(\"lA3xE\", function(module, exports) {\n\n$parcel$export(module.exports, \"getCustomUserAgent\", () => $aeac22076f27cf78$export$e399dbcfd99a2928);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Maintains custom user-agent state set by external consumers.\nconst $aeac22076f27cf78$var$customUserAgentState = {};\n/**\n * Sets custom user agent state which will be appended to applicable requests. Returns a function that can be used to\n * clean up any custom state set with this API.\n *\n * @note\n * This API operates globally. Calling this API multiple times will result in the most recently set values for a\n * particular API being used.\n *\n * @note\n * This utility IS NOT compatible with SSR.\n *\n * @param input - SetCustomUserAgentInput that defines custom state to apply to the specified APIs.\n */ const $aeac22076f27cf78$export$20cd2fa9001e90da = (input)=>{\n // Save custom user-agent state & increment reference counter\n // TODO Remove `any` when we upgrade to TypeScript 5.2, see: https://github.com/microsoft/TypeScript/issues/44373\n $aeac22076f27cf78$var$customUserAgentState[input.category] = input.apis.reduce((acc, api)=>({\n ...acc,\n [api]: {\n refCount: acc[api]?.refCount ? acc[api].refCount + 1 : 1,\n additionalDetails: input.additionalDetails\n }\n }), $aeac22076f27cf78$var$customUserAgentState[input.category] ?? {});\n // Callback that cleans up state for APIs recorded by this call\n let cleanUpCallbackCalled = false;\n const cleanUpCallback = ()=>{\n // Only allow the cleanup callback to be called once\n if (cleanUpCallbackCalled) return;\n cleanUpCallbackCalled = true;\n input.apis.forEach((api)=>{\n const apiRefCount = $aeac22076f27cf78$var$customUserAgentState[input.category][api].refCount;\n if (apiRefCount > 1) $aeac22076f27cf78$var$customUserAgentState[input.category][api].refCount = apiRefCount - 1;\n else {\n delete $aeac22076f27cf78$var$customUserAgentState[input.category][api];\n // Clean up category if no more APIs set\n if (!Object.keys($aeac22076f27cf78$var$customUserAgentState[input.category]).length) delete $aeac22076f27cf78$var$customUserAgentState[input.category];\n }\n });\n };\n return cleanUpCallback;\n};\nconst $aeac22076f27cf78$export$e399dbcfd99a2928 = (category, api)=>$aeac22076f27cf78$var$customUserAgentState[category]?.[api]?.additionalDetails;\n\n});\n\n\n\n\nparcelRegister(\"hXC67\", function(module, exports) {\n\n$parcel$export(module.exports, \"getRegionFromUserPoolId\", () => $911ca14fd2d79250$export$5f7eb9761ac2d0d9);\n$parcel$export(module.exports, \"getRegionFromIdentityPoolId\", () => $911ca14fd2d79250$export$8fb32fba519c460);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $911ca14fd2d79250$export$5f7eb9761ac2d0d9(userPoolId) {\n const region = userPoolId?.split('_')[0];\n if (!userPoolId || userPoolId.indexOf('_') < 0 || !region || typeof region !== 'string') throw new (0, $b62N7.AuthError)({\n name: 'InvalidUserPoolId',\n message: 'Invalid user pool id provided.'\n });\n return region;\n}\nfunction $911ca14fd2d79250$export$8fb32fba519c460(identityPoolId) {\n if (!identityPoolId || !identityPoolId.includes(':')) throw new (0, $b62N7.AuthError)({\n name: 'InvalidIdentityPoolIdException',\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.'\n });\n return identityPoolId.split(':')[0];\n}\n\n});\n\nparcelRegister(\"kOfpC\", function(module, exports) {\n\n$parcel$export(module.exports, \"assertAuthTokens\", () => $611242aba31f7515$export$77712ea5882cac9f);\n$parcel$export(module.exports, \"assertIdTokenInAuthTokens\", () => $611242aba31f7515$export$f4d99632f0717a4b);\n$parcel$export(module.exports, \"assertAuthTokensWithRefreshToken\", () => $611242aba31f7515$export$be38b2d22222d505);\n$parcel$export(module.exports, \"assertDeviceMetadata\", () => $611242aba31f7515$export$b6f03be79626ab0f);\n$parcel$export(module.exports, \"OAuthStorageKeys\", () => $611242aba31f7515$export$3820b4ff343394ea);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $611242aba31f7515$export$d76f9f8544dc304d(authConfig) {\n if (authConfig && authConfig.Cognito.userPoolId && authConfig.Cognito.userPoolClientId) return true;\n return false;\n}\nfunction $611242aba31f7515$export$77712ea5882cac9f(tokens) {\n if (!tokens || !tokens.accessToken) throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.USER_UNAUTHENTICATED_EXCEPTION),\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.'\n });\n}\nfunction $611242aba31f7515$export$f4d99632f0717a4b(tokens) {\n if (!tokens || !tokens.idToken) throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.USER_UNAUTHENTICATED_EXCEPTION),\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.'\n });\n}\nconst $611242aba31f7515$export$31fce2aaeafa4b60 = new (0, $b62N7.AuthError)({\n name: (0, $cutI2.TOKEN_REFRESH_EXCEPTION),\n message: `Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.`,\n recoverySuggestion: `Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }`\n});\nconst $611242aba31f7515$export$35cfa8cbd2d5bcdd = new (0, $b62N7.AuthError)({\n name: (0, $cutI2.USER_UNAUTHENTICATED_EXCEPTION),\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.'\n});\nfunction $611242aba31f7515$export$be38b2d22222d505(tokens) {\n if ($611242aba31f7515$var$isAuthenticatedWithImplicitOauthFlow(tokens)) throw $611242aba31f7515$export$31fce2aaeafa4b60;\n if (!$611242aba31f7515$var$isAuthenticatedWithRefreshToken(tokens)) throw $611242aba31f7515$export$35cfa8cbd2d5bcdd;\n}\nfunction $611242aba31f7515$export$b6f03be79626ab0f(deviceMetadata) {\n if (!deviceMetadata || !deviceMetadata.deviceKey || !deviceMetadata.deviceGroupKey || !deviceMetadata.randomPassword) throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.DEVICE_METADATA_NOT_FOUND_EXCEPTION),\n message: 'Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.',\n recoverySuggestion: 'Make sure to not clear storage after calling the signIn API.'\n });\n}\nconst $611242aba31f7515$export$3820b4ff343394ea = {\n inflightOAuth: 'inflightOAuth',\n oauthSignIn: 'oauthSignIn',\n oauthPKCE: 'oauthPKCE',\n oauthState: 'oauthState'\n};\nfunction $611242aba31f7515$var$isAuthenticated(tokens) {\n return tokens?.accessToken || tokens?.idToken;\n}\nfunction $611242aba31f7515$var$isAuthenticatedWithRefreshToken(tokens) {\n return $611242aba31f7515$var$isAuthenticated(tokens) && tokens?.refreshToken;\n}\nfunction $611242aba31f7515$var$isAuthenticatedWithImplicitOauthFlow(tokens) {\n return $611242aba31f7515$var$isAuthenticated(tokens) && !tokens?.refreshToken;\n}\n\n});\nparcelRegister(\"cutI2\", function(module, exports) {\n\n$parcel$export(module.exports, \"USER_UNAUTHENTICATED_EXCEPTION\", () => $5d443480af2ea56c$export$d29d1996d6b6f5e3);\n$parcel$export(module.exports, \"USER_ALREADY_AUTHENTICATED_EXCEPTION\", () => $5d443480af2ea56c$export$bdd0e7e9babcd5c8);\n$parcel$export(module.exports, \"DEVICE_METADATA_NOT_FOUND_EXCEPTION\", () => $5d443480af2ea56c$export$740e7000ac27ebf3);\n$parcel$export(module.exports, \"AUTO_SIGN_IN_EXCEPTION\", () => $5d443480af2ea56c$export$fe46a12932d2550a);\n$parcel$export(module.exports, \"invalidRedirectException\", () => $5d443480af2ea56c$export$60b68b138a52e5ae);\n$parcel$export(module.exports, \"invalidPreferredRedirectUrlException\", () => $5d443480af2ea56c$export$41a56a70fc1a4962);\n$parcel$export(module.exports, \"invalidOriginException\", () => $5d443480af2ea56c$export$c01b4acd6291e035);\n$parcel$export(module.exports, \"OAUTH_SIGNOUT_EXCEPTION\", () => $5d443480af2ea56c$export$625255707e22459c);\n$parcel$export(module.exports, \"TOKEN_REFRESH_EXCEPTION\", () => $5d443480af2ea56c$export$a0a904daf48e2c33);\n$parcel$export(module.exports, \"UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION\", () => $5d443480af2ea56c$export$606cffc85964c24b);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $5d443480af2ea56c$export$d29d1996d6b6f5e3 = 'UserUnAuthenticatedException';\nconst $5d443480af2ea56c$export$bdd0e7e9babcd5c8 = 'UserAlreadyAuthenticatedException';\nconst $5d443480af2ea56c$export$740e7000ac27ebf3 = 'DeviceMetadataNotFoundException';\nconst $5d443480af2ea56c$export$fe46a12932d2550a = 'AutoSignInException';\nconst $5d443480af2ea56c$export$36f9d08d6bc647dd = 'InvalidRedirectException';\nconst $5d443480af2ea56c$export$a2095d473f418f40 = 'InvalidAppSchemeException';\nconst $5d443480af2ea56c$export$818bb4aeac915442 = 'InvalidPreferredRedirectUrlException';\nconst $5d443480af2ea56c$export$60b68b138a52e5ae = new (0, $b62N7.AuthError)({\n name: $5d443480af2ea56c$export$36f9d08d6bc647dd,\n message: 'signInRedirect or signOutRedirect had an invalid format or was not found.',\n recoverySuggestion: 'Please make sure the signIn/Out redirect in your oauth config is valid.'\n});\nconst $5d443480af2ea56c$export$c1829c2a0b9b2e21 = new (0, $b62N7.AuthError)({\n name: $5d443480af2ea56c$export$a2095d473f418f40,\n message: 'A valid non-http app scheme was not found in the config.',\n recoverySuggestion: 'Please make sure a valid custom app scheme is present in the config.'\n});\nconst $5d443480af2ea56c$export$41a56a70fc1a4962 = new (0, $b62N7.AuthError)({\n name: $5d443480af2ea56c$export$818bb4aeac915442,\n message: 'The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.',\n recoverySuggestion: 'Please make sure a matching preferredRedirectUrl is provided.'\n});\nconst $5d443480af2ea56c$export$27ddc47447101bcf = 'InvalidOriginException';\nconst $5d443480af2ea56c$export$c01b4acd6291e035 = new (0, $b62N7.AuthError)({\n name: $5d443480af2ea56c$export$27ddc47447101bcf,\n message: 'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',\n recoverySuggestion: 'Please call signInWithRedirect from the same origin.'\n});\nconst $5d443480af2ea56c$export$625255707e22459c = 'OAuthSignOutException';\nconst $5d443480af2ea56c$export$a0a904daf48e2c33 = 'TokenRefreshException';\nconst $5d443480af2ea56c$export$606cffc85964c24b = 'UnexpectedSignInInterruptionException';\n\n});\n\n\nparcelRegister(\"4a2RL\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoIdentityIdProvider\", () => $afb7bce2c184eee7$export$7c3e576630d5e301);\n\nvar $0D2gL = parcelRequire(\"0D2gL\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $inqgD = parcelRequire(\"inqgD\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Provides a Cognito identityId\n *\n * @param tokens - The AuthTokens received after SignIn\n * @returns string\n * @throws configuration exceptions: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service exceptions: {@link GetIdException }\n */ async function $afb7bce2c184eee7$export$7c3e576630d5e301({ tokens: tokens, authConfig: authConfig, identityIdStore: identityIdStore }) {\n identityIdStore.setAuthConfig({\n Cognito: authConfig\n });\n // will return null only if there is no identityId cached or if there is an error retrieving it\n const identityId = await identityIdStore.loadIdentityId();\n if (identityId) return identityId.id;\n const logins = tokens?.idToken ? (0, $inqgD.formLoginsMap)(tokens.idToken.toString()) : {};\n const generatedIdentityId = await $afb7bce2c184eee7$var$generateIdentityId(logins, authConfig);\n // Store generated identityId\n identityIdStore.storeIdentityId({\n id: generatedIdentityId,\n type: tokens ? 'primary' : 'guest'\n });\n return generatedIdentityId;\n}\nasync function $afb7bce2c184eee7$var$generateIdentityId(logins, authConfig) {\n const identityPoolId = authConfig?.identityPoolId;\n const region = (0, $hXC67.getRegionFromIdentityPoolId)(identityPoolId);\n // IdentityId is absent so get it using IdentityPoolId with Cognito's GetId API\n const idResult = // for a first-time user, this will return a brand new identity\n // for a returning user, this will retrieve the previous identity assocaited with the logins\n (await (0, $0D2gL.getId)({\n region: region\n }, {\n IdentityPoolId: identityPoolId,\n Logins: logins\n })).IdentityId;\n if (!idResult) throw new (0, $b62N7.AuthError)({\n name: 'GetIdResponseException',\n message: 'Received undefined response from getId operation',\n recoverySuggestion: 'Make sure to pass a valid identityPoolId in the configuration.'\n });\n return idResult;\n}\n\n});\nparcelRegister(\"0D2gL\", function(module, exports) {\n\n$parcel$export(module.exports, \"getId\", () => $0a5974c6b22efc6b$export$218c8c3169c024d2);\n\n\n\n\nparcelRequire(\"78v1Z\");\nparcelRequire(\"lUOK3\");\n\nvar $7ecIZ = parcelRequire(\"7ecIZ\");\n\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $lL7zI = parcelRequire(\"lL7zI\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $0a5974c6b22efc6b$var$getIdSerializer = (input, endpoint)=>{\n const headers = (0, $lL7zI.getSharedHeaders)('GetId');\n const body = JSON.stringify(input);\n return (0, $lL7zI.buildHttpRpcRequest)(endpoint, headers, body);\n};\nconst $0a5974c6b22efc6b$var$getIdDeserializer = async (response)=>{\n if (response.statusCode >= 300) {\n const error = await (0, $bM38a.parseJsonError)(response);\n throw error;\n } else {\n const body = await (0, $bM38a.parseJsonBody)(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: (0, $7ecIZ.parseMetadata)(response)\n };\n }\n};\n/**\n * @internal\n */ const $0a5974c6b22efc6b$export$218c8c3169c024d2 = (0, $6vbP8.composeServiceApi)((0, $lL7zI.cognitoIdentityTransferHandler), $0a5974c6b22efc6b$var$getIdSerializer, $0a5974c6b22efc6b$var$getIdDeserializer, (0, $lL7zI.defaultConfig));\n\n});\n\nparcelRegister(\"inqgD\", function(module, exports) {\n\n$parcel$export(module.exports, \"formLoginsMap\", () => $1f210c15c4cfce94$export$edfb13e85a2c0dc4);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $1f210c15c4cfce94$export$edfb13e85a2c0dc4(idToken) {\n const issuer = (0, $bfiP6.decodeJWT)(idToken).payload.iss;\n const res = {};\n if (!issuer) throw new (0, $b62N7.AuthError)({\n name: 'InvalidIdTokenException',\n message: 'Invalid Idtoken.'\n });\n const domainName = issuer.replace(/(^\\w+:|^)\\/\\//, '');\n res[domainName] = idToken;\n return res;\n}\n\n});\n\n\n\n\nparcelRegister(\"54W3M\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoUserPoolsTokenProvider\", () => $f908ae8342f11964$export$18e158b80aac31a7);\n$parcel$export(module.exports, \"tokenOrchestrator\", () => $f908ae8342f11964$export$66561e66d62991d0);\n\nvar $cNsoR = parcelRequire(\"cNsoR\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The default provider for the JWT access token and ID token issued from the configured Cognito user pool. It manages\n * the refresh and storage of the tokens. It stores the tokens in `window.localStorage` if available, and falls back to\n * in-memory storage if not.\n */ const $f908ae8342f11964$export$18e158b80aac31a7 = new (0, $cNsoR.CognitoUserPoolsTokenProvider)();\nconst { tokenOrchestrator: $f908ae8342f11964$export$66561e66d62991d0 } = $f908ae8342f11964$export$18e158b80aac31a7;\n\n});\nparcelRegister(\"cNsoR\", function(module, exports) {\n\n$parcel$export(module.exports, \"CognitoUserPoolsTokenProvider\", () => $50ac27d44f503ae7$export$85b743bbda58cb6c);\n\nvar $57Of0 = parcelRequire(\"57Of0\");\n\nvar $fNgI2 = parcelRequire(\"fNgI2\");\n\nvar $029ov = parcelRequire(\"029ov\");\n\nvar $8sJng = parcelRequire(\"8sJng\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $50ac27d44f503ae7$export$85b743bbda58cb6c {\n constructor(){\n this.authTokenStore = new (0, $029ov.DefaultTokenStore)();\n this.authTokenStore.setKeyValueStorage((0, $57Of0.defaultStorage));\n this.tokenOrchestrator = new (0, $8sJng.TokenOrchestrator)();\n this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore);\n this.tokenOrchestrator.setTokenRefresher((0, $fNgI2.refreshAuthTokens));\n }\n getTokens({ forceRefresh: forceRefresh } = {\n forceRefresh: false\n }) {\n return this.tokenOrchestrator.getTokens({\n forceRefresh: forceRefresh\n });\n }\n setKeyValueStorage(keyValueStorage) {\n this.authTokenStore.setKeyValueStorage(keyValueStorage);\n }\n setAuthConfig(authConfig) {\n this.authTokenStore.setAuthConfig(authConfig);\n this.tokenOrchestrator.setAuthConfig(authConfig);\n }\n}\n\n});\nparcelRegister(\"fNgI2\", function(module, exports) {\n\n$parcel$export(module.exports, \"refreshAuthTokens\", () => $ec8c93d7f96724a1$export$ab413c2cb4a135d9);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $fEpEV = parcelRequire(\"fEpEV\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $4FP28 = parcelRequire(\"4FP28\");\n\n\n\n\n\n\n\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $ec8c93d7f96724a1$var$refreshAuthTokensFunction = async ({ tokens: tokens, authConfig: authConfig, username: username })=>{\n (0, $bfiP6.assertTokenProviderConfig)(authConfig?.Cognito);\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = authConfig.Cognito;\n const region = (0, $hXC67.getRegionFromUserPoolId)(userPoolId);\n (0, $kOfpC.assertAuthTokensWithRefreshToken)(tokens);\n const refreshTokenString = tokens.refreshToken;\n const AuthParameters = {\n REFRESH_TOKEN: refreshTokenString\n };\n if (tokens.deviceMetadata?.deviceKey) AuthParameters.DEVICE_KEY = tokens.deviceMetadata.deviceKey;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const initiateAuth = (0, $4FP28.createInitiateAuthClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { AuthenticationResult: AuthenticationResult } = await initiateAuth({\n region: region\n }, {\n ClientId: userPoolClientId,\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters: AuthParameters,\n UserContextData: UserContextData\n });\n const accessToken = (0, $bfiP6.decodeJWT)(AuthenticationResult?.AccessToken ?? '');\n const idToken = AuthenticationResult?.IdToken ? (0, $bfiP6.decodeJWT)(AuthenticationResult.IdToken) : undefined;\n const { iat: iat } = accessToken.payload;\n // This should never happen. If it does, it's a bug from the service.\n if (!iat) throw new (0, $b62N7.AuthError)({\n name: 'iatNotFoundException',\n message: 'iat not found in access token'\n });\n const clockDrift = iat * 1000 - new Date().getTime();\n return {\n accessToken: accessToken,\n idToken: idToken,\n clockDrift: clockDrift,\n refreshToken: refreshTokenString,\n username: username\n };\n};\nconst $ec8c93d7f96724a1$export$ab413c2cb4a135d9 = (0, $fEpEV.deDupeAsyncFunction)($ec8c93d7f96724a1$var$refreshAuthTokensFunction);\nconst $ec8c93d7f96724a1$export$d5c14381105da273 = $ec8c93d7f96724a1$var$refreshAuthTokensFunction;\n\n});\nparcelRegister(\"fEpEV\", function(module, exports) {\n\n$parcel$export(module.exports, \"deDupeAsyncFunction\", () => $f03ecb0e97a4a66d$export$cd8d22e3dc00ae5a);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * returns in-flight promise if there is one\n *\n * @param asyncFunction - asyncFunction to be deduped.\n * @returns - the return type of the callback\n */ const $f03ecb0e97a4a66d$export$cd8d22e3dc00ae5a = (asyncFunction)=>{\n let inflightPromise;\n return async (...args)=>{\n if (inflightPromise) return inflightPromise;\n inflightPromise = new Promise((resolve, reject)=>{\n asyncFunction(...args).then((result)=>{\n resolve(result);\n }).catch((error)=>{\n reject(error);\n }).finally(()=>{\n inflightPromise = undefined;\n });\n });\n return inflightPromise;\n };\n};\n\n});\n\nparcelRegister(\"4FP28\", function(module, exports) {\n\n$parcel$export(module.exports, \"createInitiateAuthClient\", () => $366edd25a776ae61$export$91f349d78bea7765);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $366edd25a776ae61$export$91f349d78bea7765 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('InitiateAuth'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\nparcelRegister(\"2qp1o\", function(module, exports) {\n\n$parcel$export(module.exports, \"createUserPoolSerializer\", () => $55e831673135f9bc$export$1113413e6e842bef);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $55e831673135f9bc$export$1113413e6e842bef = (operation)=>(input, endpoint)=>{\n const headers = $55e831673135f9bc$var$getSharedHeaders(operation);\n const body = JSON.stringify(input);\n return $55e831673135f9bc$var$buildHttpRpcRequest(endpoint, headers, body);\n };\nconst $55e831673135f9bc$var$getSharedHeaders = (operation)=>({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityProviderService.${operation}`\n });\nconst $55e831673135f9bc$var$buildHttpRpcRequest = ({ url: url }, headers, body)=>({\n headers: headers,\n url: url,\n body: body,\n method: 'POST'\n });\n\n});\n\nparcelRegister(\"7OD1Z\", function(module, exports) {\n\n$parcel$export(module.exports, \"createUserPoolDeserializer\", () => $c23928af209b7a43$export$8159795418a3e796);\n\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $c23928af209b7a43$export$8159795418a3e796 = ()=>async (response)=>{\n if (response.statusCode >= 300) {\n const error = await (0, $bM38a.parseJsonError)(response);\n (0, $iNzmv.assertServiceError)(error);\n throw new (0, $b62N7.AuthError)({\n name: error.name,\n message: error.message\n });\n }\n return (0, $bM38a.parseJsonBody)(response);\n };\n\n});\nparcelRegister(\"iNzmv\", function(module, exports) {\n\n$parcel$export(module.exports, \"assertServiceError\", () => $97dc54107f586751$export$5b3890f50cd4853f);\n\nvar $8rSHg = parcelRequire(\"8rSHg\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $97dc54107f586751$export$5b3890f50cd4853f(error) {\n if (!error || error.name === 'Error' || error instanceof TypeError) throw new (0, $b62N7.AuthError)({\n name: (0, $8rSHg.AmplifyErrorCode).Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error\n });\n}\n\n});\n\n\nparcelRegister(\"bdRfK\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoUserPoolTransferHandler\", () => $8adeed53cf0c96fd$export$10f11e95d7a96f7b);\n\nvar $8e8Xp = parcelRequire(\"8e8Xp\");\n\nvar $itEnq = parcelRequire(\"itEnq\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */ const $8adeed53cf0c96fd$var$disableCacheMiddlewareFactory = ()=>(next, _)=>async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n };\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */ const $8adeed53cf0c96fd$export$10f11e95d7a96f7b = (0, $8e8Xp.composeTransferHandler)((0, $itEnq.unauthenticatedHandler), [\n $8adeed53cf0c96fd$var$disableCacheMiddlewareFactory\n]);\n\n});\n\nparcelRegister(\"luL8F\", function(module, exports) {\n\n$parcel$export(module.exports, \"DEFAULT_SERVICE_CLIENT_API_CONFIG\", () => $7e2fded04fb92020$export$22a3716e7860147a);\n\nvar $4ZD6k = parcelRequire(\"4ZD6k\");\nvar $5D9nd = parcelRequire(\"5D9nd\");\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $dj9FS = parcelRequire(\"dj9FS\");\n\nvar $5l8w8 = parcelRequire(\"5l8w8\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $7e2fded04fb92020$export$22a3716e7860147a = {\n service: (0, $5l8w8.COGNITO_IDP_SERVICE_NAME),\n retryDecider: (0, $4ZD6k.getRetryDecider)((0, $bM38a.parseJsonError)),\n computeDelay: (0, $5D9nd.jitteredBackoff),\n userAgentValue: (0, $dj9FS.getAmplifyUserAgent)(),\n cache: 'no-store'\n};\n\n});\nparcelRegister(\"5l8w8\", function(module, exports) {\n\n$parcel$export(module.exports, \"COGNITO_IDP_SERVICE_NAME\", () => $87e7d4635adc81eb$export$a0efffb4b0c72e04);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */ const $87e7d4635adc81eb$export$a0efffb4b0c72e04 = 'cognito-idp';\n\n});\n\n\n\nparcelRegister(\"eAu1N\", function(module, exports) {\n\n$parcel$export(module.exports, \"createCognitoUserPoolEndpointResolver\", () => $f24e571831226942$export$9fc8f7dceefe00a6);\n\nvar $7Ar4G = parcelRequire(\"7Ar4G\");\n\nvar $Reymm = parcelRequire(\"Reymm\");\nconst $f24e571831226942$export$9fc8f7dceefe00a6 = ({ endpointOverride: endpointOverride })=>(input)=>{\n if (endpointOverride) return {\n url: new (0, $7Ar4G.AmplifyUrl)(endpointOverride)\n };\n return (0, $Reymm.cognitoUserPoolEndpointResolver)(input);\n };\n\n});\nparcelRegister(\"Reymm\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoUserPoolEndpointResolver\", () => $0c02ab99f864ae06$export$54dd9d9496cb66b9);\n\nvar $fqhqt = parcelRequire(\"fqhqt\");\n\nvar $7Ar4G = parcelRequire(\"7Ar4G\");\n\nvar $5l8w8 = parcelRequire(\"5l8w8\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $0c02ab99f864ae06$export$54dd9d9496cb66b9 = ({ region: region })=>({\n url: new (0, $7Ar4G.AmplifyUrl)(`https://${(0, $5l8w8.COGNITO_IDP_SERVICE_NAME)}.${region}.${(0, $fqhqt.getDnsSuffix)(region)}`)\n });\n\n});\n\n\nparcelRegister(\"7fUr4\", function(module, exports) {\n\n$parcel$export(module.exports, \"getUserContextData\", () => $166ed226583428f1$export$b6e6cdd1f90faa62);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $166ed226583428f1$export$b6e6cdd1f90faa62({ username: username, userPoolId: userPoolId, userPoolClientId: userPoolClientId }) {\n if (typeof window === 'undefined') return undefined;\n const amazonCognitoAdvancedSecurityData = window.AmazonCognitoAdvancedSecurityData;\n if (typeof amazonCognitoAdvancedSecurityData === 'undefined') return undefined;\n const advancedSecurityData = amazonCognitoAdvancedSecurityData.getData(username, userPoolId, userPoolClientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData\n };\n return userContextData;\n }\n return {};\n}\n\n});\n\n\nparcelRegister(\"8sJng\", function(module, exports) {\n\n$parcel$export(module.exports, \"TokenOrchestrator\", () => $67be88f695aa02a6$export$ba2f3fbc8979d2e6);\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\nvar $8rSHg = parcelRequire(\"8rSHg\");\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $a93i9 = parcelRequire(\"a93i9\");\nvar $5ZJQw = parcelRequire(\"5ZJQw\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $hHV4w = parcelRequire(\"hHV4w\");\n\nvar $gwp96 = parcelRequire(\"gwp96\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $67be88f695aa02a6$export$ba2f3fbc8979d2e6 {\n constructor(){\n this.waitForInflightOAuth = (0, $a93i9.isBrowser)() ? async ()=>{\n if (!await (0, $hHV4w.oAuthStore).loadOAuthInFlight()) return;\n if (this.inflightPromise) return this.inflightPromise;\n // when there is valid oauth config and there is an inflight oauth flow, try\n // to block async calls that require fetching tokens before the oauth flow completes\n // e.g. getCurrentUser, fetchAuthSession etc.\n this.inflightPromise = new Promise((resolve, _reject)=>{\n (0, $gwp96.addInflightPromise)(resolve);\n });\n return this.inflightPromise;\n } : async ()=>{\n // no-op for non-browser environments\n };\n }\n setAuthConfig(authConfig) {\n (0, $hHV4w.oAuthStore).setAuthConfig(authConfig.Cognito);\n this.authConfig = authConfig;\n }\n setTokenRefresher(tokenRefresher) {\n this.tokenRefresher = tokenRefresher;\n }\n setAuthTokenStore(tokenStore) {\n this.tokenStore = tokenStore;\n }\n getTokenStore() {\n if (!this.tokenStore) throw new (0, $b62N7.AuthError)({\n name: 'EmptyTokenStoreException',\n message: 'TokenStore not set'\n });\n return this.tokenStore;\n }\n getTokenRefresher() {\n if (!this.tokenRefresher) throw new (0, $b62N7.AuthError)({\n name: 'EmptyTokenRefresherException',\n message: 'TokenRefresher not set'\n });\n return this.tokenRefresher;\n }\n async getTokens(options) {\n let tokens;\n try {\n (0, $bfiP6.assertTokenProviderConfig)(this.authConfig?.Cognito);\n } catch (_err) {\n // Token provider not configured\n return null;\n }\n await this.waitForInflightOAuth();\n this.inflightPromise = undefined;\n tokens = await this.getTokenStore().loadTokens();\n const username = await this.getTokenStore().getLastAuthUser();\n if (tokens === null) return null;\n const idTokenExpired = !!tokens?.idToken && (0, $5ZJQw.isTokenExpired)({\n expiresAt: (tokens.idToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0\n });\n const accessTokenExpired = (0, $5ZJQw.isTokenExpired)({\n expiresAt: (tokens.accessToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0\n });\n if (options?.forceRefresh || idTokenExpired || accessTokenExpired) {\n tokens = await this.refreshTokens({\n tokens: tokens,\n username: username\n });\n if (tokens === null) return null;\n }\n return {\n accessToken: tokens?.accessToken,\n idToken: tokens?.idToken,\n signInDetails: tokens?.signInDetails\n };\n }\n async refreshTokens({ tokens: tokens, username: username }) {\n try {\n const { signInDetails: signInDetails } = tokens;\n const newTokens = await this.getTokenRefresher()({\n tokens: tokens,\n authConfig: this.authConfig,\n username: username\n });\n newTokens.signInDetails = signInDetails;\n await this.setTokens({\n tokens: newTokens\n });\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'tokenRefresh'\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n return newTokens;\n } catch (err) {\n return this.handleErrors(err);\n }\n }\n handleErrors(err) {\n (0, $iNzmv.assertServiceError)(err);\n if (err.name !== (0, $8rSHg.AmplifyErrorCode).NetworkError) // TODO(v6): Check errors on client\n this.clearTokens();\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'tokenRefresh_failure',\n data: {\n error: err\n }\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n if (err.name.startsWith('NotAuthorizedException')) return null;\n throw err;\n }\n async setTokens({ tokens: tokens }) {\n return this.getTokenStore().storeTokens(tokens);\n }\n async clearTokens() {\n return this.getTokenStore().clearTokens();\n }\n getDeviceMetadata(username) {\n return this.getTokenStore().getDeviceMetadata(username);\n }\n clearDeviceMetadata(username) {\n return this.getTokenStore().clearDeviceMetadata(username);\n }\n setOAuthMetadata(metadata) {\n return this.getTokenStore().setOAuthMetadata(metadata);\n }\n getOAuthMetadata() {\n return this.getTokenStore().getOAuthMetadata();\n }\n}\n\n});\nparcelRegister(\"a93i9\", function(module, exports) {\n\n$parcel$export(module.exports, \"isBrowser\", () => $138054732e02d887$export$4e09c449d6c407f7);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $138054732e02d887$export$4e09c449d6c407f7 = ()=>typeof window !== 'undefined' && typeof window.document !== 'undefined';\n\n});\n\nparcelRegister(\"5ZJQw\", function(module, exports) {\n\n$parcel$export(module.exports, \"isTokenExpired\", () => $3ec585405a56a5d2$export$b007d77a962aa175);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $3ec585405a56a5d2$export$b007d77a962aa175({ expiresAt: expiresAt, clockDrift: clockDrift, tolerance: tolerance = 5000 }) {\n const currentTime = Date.now();\n return currentTime + clockDrift + tolerance > expiresAt;\n}\n\n});\n\nparcelRegister(\"hHV4w\", function(module, exports) {\n\n$parcel$export(module.exports, \"oAuthStore\", () => $a07429c4e1a8223f$export$2ed0ec267eb6cb1c);\n\nvar $57Of0 = parcelRequire(\"57Of0\");\n\nvar $DNF8t = parcelRequire(\"DNF8t\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $a07429c4e1a8223f$export$2ed0ec267eb6cb1c = new (0, $DNF8t.DefaultOAuthStore)((0, $57Of0.defaultStorage));\n\n});\nparcelRegister(\"DNF8t\", function(module, exports) {\n\n$parcel$export(module.exports, \"DefaultOAuthStore\", () => $c561250709ea1156$export$9b2cef5d94f9b6e8);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $029ov = parcelRequire(\"029ov\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $c561250709ea1156$var$V5_HOSTED_UI_KEY = 'amplify-signin-with-hostedUI';\nconst $c561250709ea1156$var$name = 'CognitoIdentityServiceProvider';\nclass $c561250709ea1156$export$9b2cef5d94f9b6e8 {\n constructor(keyValueStorage){\n this.keyValueStorage = keyValueStorage;\n }\n async clearOAuthInflightData() {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n await Promise.all([\n this.keyValueStorage.removeItem(authKeys.inflightOAuth),\n this.keyValueStorage.removeItem(authKeys.oauthPKCE),\n this.keyValueStorage.removeItem(authKeys.oauthState)\n ]);\n }\n async clearOAuthData() {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n await this.clearOAuthInflightData();\n await this.keyValueStorage.removeItem($c561250709ea1156$var$V5_HOSTED_UI_KEY); // remove in case a customer migrated an App from v5 to v6\n return this.keyValueStorage.removeItem(authKeys.oauthSignIn);\n }\n loadOAuthState() {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthState);\n }\n storeOAuthState(state) {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthState, state);\n }\n loadPKCE() {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthPKCE);\n }\n storePKCE(pkce) {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthPKCE, pkce);\n }\n setAuthConfig(authConfigParam) {\n this.cognitoConfig = authConfigParam;\n }\n async loadOAuthInFlight() {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n return await this.keyValueStorage.getItem(authKeys.inflightOAuth) === 'true';\n }\n async storeOAuthInFlight(inflight) {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.inflightOAuth, `${inflight}`);\n }\n async loadOAuthSignIn() {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n const isLegacyHostedUISignIn = await this.keyValueStorage.getItem($c561250709ea1156$var$V5_HOSTED_UI_KEY);\n const [isOAuthSignIn, preferPrivateSession] = (await this.keyValueStorage.getItem(authKeys.oauthSignIn))?.split(',') ?? [];\n return {\n isOAuthSignIn: isOAuthSignIn === 'true' || isLegacyHostedUISignIn === 'true',\n preferPrivateSession: preferPrivateSession === 'true'\n };\n }\n async storeOAuthSignIn(oauthSignIn, preferPrivateSession = false) {\n (0, $bfiP6.assertTokenProviderConfig)(this.cognitoConfig);\n const authKeys = $c561250709ea1156$var$createKeysForAuthStorage($c561250709ea1156$var$name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.oauthSignIn, `${oauthSignIn},${preferPrivateSession}`);\n }\n}\nconst $c561250709ea1156$var$createKeysForAuthStorage = (provider, identifier)=>{\n return (0, $029ov.getAuthStorageKeys)((0, $kOfpC.OAuthStorageKeys))(provider, identifier);\n};\n\n});\n\n\nparcelRegister(\"gwp96\", function(module, exports) {\n\n$parcel$export(module.exports, \"addInflightPromise\", () => $7b9efa68fb4ba4e8$export$c55b09e0e9be0d04);\n$parcel$export(module.exports, \"resolveAndClearInflightPromises\", () => $7b9efa68fb4ba4e8$export$bcb0b7a105a5df59);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $7b9efa68fb4ba4e8$var$inflightPromises = [];\nconst $7b9efa68fb4ba4e8$export$c55b09e0e9be0d04 = (resolver)=>{\n $7b9efa68fb4ba4e8$var$inflightPromises.push(resolver);\n};\nconst $7b9efa68fb4ba4e8$export$bcb0b7a105a5df59 = ()=>{\n while($7b9efa68fb4ba4e8$var$inflightPromises.length)$7b9efa68fb4ba4e8$var$inflightPromises.pop()?.();\n};\n\n});\n\n\n\n\n\nparcelRegister(\"2yfk2\", function(module, exports) {\n\n$parcel$export(module.exports, \"getCurrentUser\", () => $5d92bddd58c7fd2f$export$e5432d4c8eb97ea7);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $emFmE = parcelRequire(\"emFmE\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Gets the current user from the idToken.\n *\n * @param input - The GetCurrentUserInput object.\n * @returns GetCurrentUserOutput\n * @throws - {@link InitiateAuthException} - Thrown when the service fails to refresh the tokens.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ const $5d92bddd58c7fd2f$export$e5432d4c8eb97ea7 = async ()=>{\n return (0, $emFmE.getCurrentUser)((0, $1qbEC.Amplify));\n};\n\n});\nparcelRegister(\"emFmE\", function(module, exports) {\n\n$parcel$export(module.exports, \"getCurrentUser\", () => $966807e07f0c8ebe$export$e5432d4c8eb97ea7);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $966807e07f0c8ebe$export$e5432d4c8eb97ea7 = async (amplify)=>{\n const authConfig = amplify.getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const tokens = await amplify.Auth.getTokens({\n forceRefresh: false\n });\n (0, $kOfpC.assertAuthTokens)(tokens);\n const { 'cognito:username': username, sub: sub } = tokens.idToken?.payload ?? {};\n const authUser = {\n username: username,\n userId: sub\n };\n const signInDetails = $966807e07f0c8ebe$var$getSignInDetailsFromTokens(tokens);\n if (signInDetails) authUser.signInDetails = signInDetails;\n return authUser;\n};\nfunction $966807e07f0c8ebe$var$getSignInDetailsFromTokens(tokens) {\n return tokens?.signInDetails;\n}\n\n});\n\n\nparcelRegister(\"kwYKv\", function(module, exports) {\n\n$parcel$export(module.exports, \"fetchAuthSession\", () => $83614fd30266723c$export$39430dfe49142ae);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $eL2i9 = parcelRequire(\"eL2i9\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetch the auth session including the tokens and credentials if they are available. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n * @throws {@link AuthError} - Throws error when session information cannot be refreshed.\n * @returns Promise\n */ const $83614fd30266723c$export$39430dfe49142ae = (options)=>{\n return (0, $eL2i9.fetchAuthSession)((0, $1qbEC.Amplify), options);\n};\n\n});\nparcelRegister(\"eL2i9\", function(module, exports) {\n\n$parcel$export(module.exports, \"fetchAuthSession\", () => $bb56c3c3b8aca32b$export$39430dfe49142ae);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $bb56c3c3b8aca32b$export$39430dfe49142ae = (amplify, options)=>{\n return amplify.Auth.fetchAuthSession(options);\n};\n\n});\n\n\nparcelRegister(\"2Izdj\", function(module, exports) {\n\n$parcel$export(module.exports, \"fetchUserAttributes\", () => $bb923765bb002412$export$5dc95ecf3f16c6c9);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $hdrpg = parcelRequire(\"hdrpg\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetches the current user attributes while authenticated.\n *\n * @throws - {@link GetUserException} - Cognito service errors thrown when the service is not able to get the user.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ const $bb923765bb002412$export$5dc95ecf3f16c6c9 = ()=>{\n return (0, $hdrpg.fetchUserAttributes)((0, $1qbEC.Amplify));\n};\n\n});\nparcelRegister(\"hdrpg\", function(module, exports) {\n\n$parcel$export(module.exports, \"fetchUserAttributes\", () => $8b11ddb4b86043a5$export$5dc95ecf3f16c6c9);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\nvar $eL2i9 = parcelRequire(\"eL2i9\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\nvar $ZiWkh = parcelRequire(\"ZiWkh\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\n\n\n\n\n\n\n\nvar $fNWle = parcelRequire(\"fNWle\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $8b11ddb4b86043a5$export$5dc95ecf3f16c6c9 = async (amplify)=>{\n const authConfig = amplify.getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolEndpoint: userPoolEndpoint, userPoolId: userPoolId } = authConfig;\n const { tokens: tokens } = await (0, $eL2i9.fetchAuthSession)(amplify, {\n forceRefresh: false\n });\n (0, $kOfpC.assertAuthTokens)(tokens);\n const getUser = (0, $fNWle.createGetUserClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { UserAttributes: UserAttributes } = await getUser({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).FetchUserAttributes)\n }, {\n AccessToken: tokens.accessToken.toString()\n });\n return (0, $ZiWkh.toAuthUserAttribute)(UserAttributes);\n};\n\n});\nparcelRegister(\"ZiWkh\", function(module, exports) {\n\n$parcel$export(module.exports, \"toAttributeType\", () => $037da67d5e4435f8$export$720a7caa078a04b0);\n$parcel$export(module.exports, \"toAuthUserAttribute\", () => $037da67d5e4435f8$export$1b975641d03f3b17);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Transforms a user attributes object into an array of AttributeType objects.\n * @param attributes user attributes to be mapped to AttributeType objects.\n * @returns an array of AttributeType objects.\n */ function $037da67d5e4435f8$export$720a7caa078a04b0(attributes) {\n return Object.entries(attributes).map(([key, value])=>({\n Name: key,\n Value: value\n }));\n}\n/**\n * Transforms an array of AttributeType objects into a user attributes object.\n *\n * @param attributes - an array of AttributeType objects.\n * @returns AuthUserAttributes object.\n */ function $037da67d5e4435f8$export$1b975641d03f3b17(attributes) {\n const userAttributes = {};\n attributes?.forEach((attribute)=>{\n if (attribute.Name) userAttributes[attribute.Name] = attribute.Value;\n });\n return userAttributes;\n}\n\n});\n\nparcelRegister(\"aEls4\", function(module, exports) {\n\n$parcel$export(module.exports, \"getAuthUserAgentValue\", () => $3bebc22382ede2ae$export$d6cd780379f37dae);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\nvar $dj9FS = parcelRequire(\"dj9FS\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $3bebc22382ede2ae$export$d6cd780379f37dae = (action, customUserAgentDetails)=>(0, $dj9FS.getAmplifyUserAgent)({\n category: (0, $k2DuP.Category).Auth,\n action: action,\n ...customUserAgentDetails\n });\n\n});\n\nparcelRegister(\"fNWle\", function(module, exports) {\n\n$parcel$export(module.exports, \"createGetUserClient\", () => $f661ac5f22d02ec1$export$9b3b12a535efe659);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $f661ac5f22d02ec1$export$9b3b12a535efe659 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('GetUser'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\n\nparcelRegister(\"xBcsQ\", function(module, exports) {\n\n$parcel$export(module.exports, \"signUp\", () => $abc82bc09222a7fb$export$cf64224bcd829024);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $ZiWkh = parcelRequire(\"ZiWkh\");\n\nvar $lFCWu = parcelRequire(\"lFCWu\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\n\n\n\n\nvar $kNTsK = parcelRequire(\"kNTsK\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $5XcLh = parcelRequire(\"5XcLh\");\n\n\nvar $epZMx = parcelRequire(\"epZMx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Creates a user\n *\n * @param input - The SignUpInput object\n * @returns SignUpOutput\n * @throws service: {@link SignUpException } - Cognito service errors thrown during the sign-up process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $abc82bc09222a7fb$export$cf64224bcd829024(input) {\n const { username: username, password: password, options: options } = input;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n const signUpVerificationMethod = authConfig?.signUpVerificationMethod ?? 'code';\n const { clientMetadata: clientMetadata, validationData: validationData, autoSignIn: autoSignIn } = input.options ?? {};\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignUpUsername);\n const signInServiceOptions = typeof autoSignIn !== 'boolean' ? autoSignIn : undefined;\n const signInInput = {\n username: username,\n options: signInServiceOptions\n };\n // if the authFlowType is 'CUSTOM_WITHOUT_SRP' then we don't include the password\n if (signInServiceOptions?.authFlowType !== 'CUSTOM_WITHOUT_SRP') signInInput.password = password;\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = authConfig;\n const signUpClient = (0, $kNTsK.createSignUpClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const signUpClientInput = {\n Username: username,\n Password: undefined,\n UserAttributes: options?.userAttributes && (0, $ZiWkh.toAttributeType)(options?.userAttributes),\n ClientMetadata: clientMetadata,\n ValidationData: validationData && (0, $ZiWkh.toAttributeType)(validationData),\n ClientId: userPoolClientId,\n UserContextData: (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n })\n };\n if (password) signUpClientInput.Password = password;\n const { UserSub: userId, CodeDeliveryDetails: cdd, UserConfirmed: userConfirmed, Session: session } = await signUpClient({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignUp)\n }, signUpClientInput);\n if (signInServiceOptions || autoSignIn === true) {\n (0, $5XcLh.autoSignInStore).dispatch({\n type: 'START'\n });\n (0, $5XcLh.autoSignInStore).dispatch({\n type: 'SET_USERNAME',\n value: username\n });\n (0, $5XcLh.autoSignInStore).dispatch({\n type: 'SET_SESSION',\n value: session\n });\n }\n const codeDeliveryDetails = {\n destination: cdd?.Destination,\n deliveryMedium: cdd?.DeliveryMedium,\n attributeName: cdd?.AttributeName\n };\n const isSignUpComplete = !!userConfirmed;\n const isAutoSignInStarted = (0, $5XcLh.autoSignInStore).getState().active;\n // Sign Up Complete\n // No Confirm Sign In Step Required\n if (isSignUpComplete) {\n if (isAutoSignInStarted) {\n (0, $epZMx.setAutoSignIn)((0, $lFCWu.autoSignInUserConfirmed)(signInInput));\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN'\n },\n userId: userId\n };\n }\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE'\n },\n userId: userId\n };\n }\n // Sign Up Not Complete\n // Confirm Sign Up Step Required\n if (isAutoSignInStarted) {\n // Confirmation Via Link Occurs In Separate Context\n // AutoSignIn Fn Will Initiate Polling Once Executed\n if (signUpVerificationMethod === 'link') {\n (0, $epZMx.setAutoSignIn)((0, $lFCWu.autoSignInWhenUserIsConfirmedWithLink)(signInInput));\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n codeDeliveryDetails: codeDeliveryDetails\n },\n userId: userId\n };\n }\n // Confirmation Via Code Occurs In Same Context\n // AutoSignIn Next Step Will Be Returned From Confirm Sign Up\n (0, $lFCWu.handleCodeAutoSignIn)(signInInput);\n }\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'CONFIRM_SIGN_UP',\n codeDeliveryDetails: codeDeliveryDetails\n },\n userId: userId\n };\n}\n\n});\nparcelRegister(\"7XpgE\", function(module, exports) {\n\n$parcel$export(module.exports, \"assertValidationError\", () => $7b94ec505a14c4da$export$45936001d12f9b53);\n\nvar $fjlOG = parcelRequire(\"fjlOG\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $7b94ec505a14c4da$export$45936001d12f9b53(assertion, name) {\n const { message: message, recoverySuggestion: recoverySuggestion } = (0, $fjlOG.validationErrorMap)[name];\n if (!assertion) throw new (0, $b62N7.AuthError)({\n name: name,\n message: message,\n recoverySuggestion: recoverySuggestion\n });\n}\n\n});\nparcelRegister(\"fjlOG\", function(module, exports) {\n\n$parcel$export(module.exports, \"validationErrorMap\", () => $1be4bde6f9a6f509$export$195137955146d376);\n$parcel$export(module.exports, \"AuthErrorStrings\", () => $1be4bde6f9a6f509$export$c3070468b9d65120);\n$parcel$export(module.exports, \"AuthErrorCodes\", () => $1be4bde6f9a6f509$export$473ab0b56598aacd);\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $1be4bde6f9a6f509$export$195137955146d376 = {\n [(0, $ewkqX.AuthValidationErrorCode).EmptyChallengeResponse]: {\n message: 'challengeResponse is required to confirmSignIn'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyConfirmResetPasswordUsername]: {\n message: 'username is required to confirmResetPassword'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyConfirmSignUpCode]: {\n message: 'code is required to confirmSignUp'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyConfirmSignUpUsername]: {\n message: 'username is required to confirmSignUp'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyConfirmResetPasswordConfirmationCode]: {\n message: 'confirmationCode is required to confirmResetPassword'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyConfirmResetPasswordNewPassword]: {\n message: 'newPassword is required to confirmResetPassword'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyResendSignUpCodeUsername]: {\n message: 'username is required to confirmSignUp'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyResetPasswordUsername]: {\n message: 'username is required to resetPassword'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptySignInPassword]: {\n message: 'password is required to signIn'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptySignInUsername]: {\n message: 'username is required to signIn'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptySignUpPassword]: {\n message: 'password is required to signUp'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptySignUpUsername]: {\n message: 'username is required to signUp'\n },\n [(0, $ewkqX.AuthValidationErrorCode).CustomAuthSignInPassword]: {\n message: 'A password is not needed when signing in with CUSTOM_WITHOUT_SRP',\n recoverySuggestion: 'Do not include a password in your signIn call.'\n },\n [(0, $ewkqX.AuthValidationErrorCode).IncorrectMFAMethod]: {\n message: 'Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL',\n recoverySuggestion: 'Try to pass SMS, TOTP, or EMAIL as the challengeResponse'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyVerifyTOTPSetupCode]: {\n message: 'code is required to verifyTotpSetup'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyUpdatePassword]: {\n message: 'oldPassword and newPassword are required to changePassword'\n },\n [(0, $ewkqX.AuthValidationErrorCode).EmptyConfirmUserAttributeCode]: {\n message: 'confirmation code is required to confirmUserAttribute'\n }\n};\n// TODO: delete this code when the Auth class is removed.\nvar $1be4bde6f9a6f509$export$c3070468b9d65120;\n(function(AuthErrorStrings) {\n AuthErrorStrings[\"DEFAULT_MSG\"] = \"Authentication Error\";\n AuthErrorStrings[\"EMPTY_EMAIL\"] = \"Email cannot be empty\";\n AuthErrorStrings[\"EMPTY_PHONE\"] = \"Phone number cannot be empty\";\n AuthErrorStrings[\"EMPTY_USERNAME\"] = \"Username cannot be empty\";\n AuthErrorStrings[\"INVALID_USERNAME\"] = \"The username should either be a string or one of the sign in types\";\n AuthErrorStrings[\"EMPTY_PASSWORD\"] = \"Password cannot be empty\";\n AuthErrorStrings[\"EMPTY_CODE\"] = \"Confirmation code cannot be empty\";\n AuthErrorStrings[\"SIGN_UP_ERROR\"] = \"Error creating account\";\n AuthErrorStrings[\"NO_MFA\"] = \"No valid MFA method provided\";\n AuthErrorStrings[\"INVALID_MFA\"] = \"Invalid MFA type\";\n AuthErrorStrings[\"EMPTY_CHALLENGE\"] = \"Challenge response cannot be empty\";\n AuthErrorStrings[\"NO_USER_SESSION\"] = \"Failed to get the session because the user is empty\";\n AuthErrorStrings[\"NETWORK_ERROR\"] = \"Network Error\";\n AuthErrorStrings[\"DEVICE_CONFIG\"] = \"Device tracking has not been configured in this User Pool\";\n AuthErrorStrings[\"AUTOSIGNIN_ERROR\"] = \"Please use your credentials to sign in\";\n AuthErrorStrings[\"OAUTH_ERROR\"] = \"Couldn't finish OAuth flow, check your User Pool HostedUI settings\";\n})($1be4bde6f9a6f509$export$c3070468b9d65120 || ($1be4bde6f9a6f509$export$c3070468b9d65120 = {}));\nvar $1be4bde6f9a6f509$export$473ab0b56598aacd;\n(function(AuthErrorCodes) {\n AuthErrorCodes[\"SignInException\"] = \"SignInException\";\n AuthErrorCodes[\"OAuthSignInError\"] = \"OAuthSignInException\";\n})($1be4bde6f9a6f509$export$473ab0b56598aacd || ($1be4bde6f9a6f509$export$473ab0b56598aacd = {}));\n\n});\nparcelRegister(\"ewkqX\", function(module, exports) {\n\n$parcel$export(module.exports, \"AuthValidationErrorCode\", () => $fe1cf33beea6c7e2$export$12d5c695b2213c4a);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $fe1cf33beea6c7e2$export$12d5c695b2213c4a;\n(function(AuthValidationErrorCode) {\n AuthValidationErrorCode[\"EmptySignInUsername\"] = \"EmptySignInUsername\";\n AuthValidationErrorCode[\"EmptySignInPassword\"] = \"EmptySignInPassword\";\n AuthValidationErrorCode[\"CustomAuthSignInPassword\"] = \"CustomAuthSignInPassword\";\n AuthValidationErrorCode[\"EmptySignUpUsername\"] = \"EmptySignUpUsername\";\n AuthValidationErrorCode[\"EmptySignUpPassword\"] = \"EmptySignUpPassword\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpUsername\"] = \"EmptyConfirmSignUpUsername\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpCode\"] = \"EmptyConfirmSignUpCode\";\n AuthValidationErrorCode[\"EmptyResendSignUpCodeUsername\"] = \"EmptyresendSignUpCodeUsername\";\n AuthValidationErrorCode[\"EmptyChallengeResponse\"] = \"EmptyChallengeResponse\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordUsername\"] = \"EmptyConfirmResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordNewPassword\"] = \"EmptyConfirmResetPasswordNewPassword\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordConfirmationCode\"] = \"EmptyConfirmResetPasswordConfirmationCode\";\n AuthValidationErrorCode[\"EmptyResetPasswordUsername\"] = \"EmptyResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyVerifyTOTPSetupCode\"] = \"EmptyVerifyTOTPSetupCode\";\n AuthValidationErrorCode[\"EmptyConfirmUserAttributeCode\"] = \"EmptyConfirmUserAttributeCode\";\n AuthValidationErrorCode[\"IncorrectMFAMethod\"] = \"IncorrectMFAMethod\";\n AuthValidationErrorCode[\"EmptyUpdatePassword\"] = \"EmptyUpdatePassword\";\n})($fe1cf33beea6c7e2$export$12d5c695b2213c4a || ($fe1cf33beea6c7e2$export$12d5c695b2213c4a = {}));\n\n});\n\n\n\nparcelRegister(\"lFCWu\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleCodeAutoSignIn\", () => $167b4f920a0b30b9$export$385d6b43f72ecccf);\n$parcel$export(module.exports, \"autoSignInWhenUserIsConfirmedWithLink\", () => $167b4f920a0b30b9$export$feaed4858b71e8a);\n$parcel$export(module.exports, \"autoSignInUserConfirmed\", () => $167b4f920a0b30b9$export$9ec2c3d010185172);\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $aqcy4 = parcelRequire(\"aqcy4\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $epZMx = parcelRequire(\"epZMx\");\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n\nvar $jqRoP = parcelRequire(\"jqRoP\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $167b4f920a0b30b9$var$MAX_AUTOSIGNIN_POLLING_MS = 180000;\nfunction $167b4f920a0b30b9$export$385d6b43f72ecccf(signInInput) {\n const stopHubListener = (0, $5RCQ5.HubInternal).listen('auth-internal', async ({ payload: payload })=>{\n switch(payload.event){\n case 'confirmSignUp':\n {\n const response = payload.data;\n if (response?.isSignUpComplete) {\n (0, $5RCQ5.HubInternal).dispatch('auth-internal', {\n event: 'autoSignIn'\n });\n (0, $epZMx.setAutoSignIn)($167b4f920a0b30b9$var$autoSignInWithCode(signInInput));\n stopHubListener();\n }\n }\n }\n });\n // This will stop the listener if confirmSignUp is not resolved.\n const timeOutId = setTimeout(()=>{\n stopHubListener();\n clearTimeout(timeOutId);\n (0, $epZMx.resetAutoSignIn)();\n }, $167b4f920a0b30b9$var$MAX_AUTOSIGNIN_POLLING_MS);\n}\nfunction $167b4f920a0b30b9$var$debounce(fun, delay) {\n let timer;\n return (args)=>{\n if (!timer) fun(...args);\n clearTimeout(timer);\n timer = setTimeout(()=>{\n timer = undefined;\n }, delay);\n };\n}\nfunction $167b4f920a0b30b9$var$handleAutoSignInWithLink(signInInput, resolve, reject) {\n const start = Date.now();\n const autoSignInPollingIntervalId = setInterval(async ()=>{\n const elapsedTime = Date.now() - start;\n const maxTime = $167b4f920a0b30b9$var$MAX_AUTOSIGNIN_POLLING_MS;\n if (elapsedTime > maxTime) {\n clearInterval(autoSignInPollingIntervalId);\n reject(new (0, $b62N7.AuthError)({\n name: (0, $cutI2.AUTO_SIGN_IN_EXCEPTION),\n message: 'The account was not confirmed on time.',\n recoverySuggestion: 'Try to verify your account by clicking the link sent your email or phone and then login manually.'\n }));\n (0, $epZMx.resetAutoSignIn)();\n } else try {\n const signInOutput = await (0, $aqcy4.signIn)(signInInput);\n if (signInOutput.nextStep.signInStep !== 'CONFIRM_SIGN_UP') {\n resolve(signInOutput);\n clearInterval(autoSignInPollingIntervalId);\n (0, $epZMx.resetAutoSignIn)();\n }\n } catch (error) {\n clearInterval(autoSignInPollingIntervalId);\n reject(error);\n (0, $epZMx.resetAutoSignIn)();\n }\n }, 5000);\n}\nconst $167b4f920a0b30b9$var$debouncedAutoSignInWithLink = $167b4f920a0b30b9$var$debounce($167b4f920a0b30b9$var$handleAutoSignInWithLink, 300);\nconst $167b4f920a0b30b9$var$debouncedAutoSignWithCodeOrUserConfirmed = $167b4f920a0b30b9$var$debounce($167b4f920a0b30b9$var$handleAutoSignInWithCodeOrUserConfirmed, 300);\nfunction $167b4f920a0b30b9$export$feaed4858b71e8a(signInInput) {\n return async ()=>{\n return new Promise((resolve, reject)=>{\n $167b4f920a0b30b9$var$debouncedAutoSignInWithLink([\n signInInput,\n resolve,\n reject\n ]);\n });\n };\n}\nasync function $167b4f920a0b30b9$var$handleAutoSignInWithCodeOrUserConfirmed(signInInput, resolve, reject) {\n try {\n const output = signInInput?.options?.authFlowType === 'USER_AUTH' ? await (0, $jqRoP.signInWithUserAuth)(signInInput) : await (0, $aqcy4.signIn)(signInInput);\n resolve(output);\n (0, $epZMx.resetAutoSignIn)();\n } catch (error) {\n reject(error);\n (0, $epZMx.resetAutoSignIn)();\n }\n}\nfunction $167b4f920a0b30b9$var$autoSignInWithCode(signInInput) {\n return async ()=>{\n return new Promise((resolve, reject)=>{\n $167b4f920a0b30b9$var$debouncedAutoSignWithCodeOrUserConfirmed([\n signInInput,\n resolve,\n reject\n ]);\n });\n };\n}\nconst $167b4f920a0b30b9$export$9ec2c3d010185172 = $167b4f920a0b30b9$var$autoSignInWithCode;\n\n});\nparcelRegister(\"aqcy4\", function(module, exports) {\n\n$parcel$export(module.exports, \"signIn\", () => $864ab8669b105bc5$export$9670d83f11d4b64a);\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $2ob6P = parcelRequire(\"2ob6P\");\n\nvar $hfsLE = parcelRequire(\"hfsLE\");\n\nvar $aplbo = parcelRequire(\"aplbo\");\n\nvar $j3ZKM = parcelRequire(\"j3ZKM\");\n\nvar $jqRoP = parcelRequire(\"jqRoP\");\n\nvar $epZMx = parcelRequire(\"epZMx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in\n *\n * @param input - The SignInInput object\n * @returns SignInOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException }\n * - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $864ab8669b105bc5$export$9670d83f11d4b64a(input) {\n // Here we want to reset the store but not reassign the callback.\n // The callback is reset when the underlying promise resolves or rejects.\n // With the advent of session based sign in, this guarantees that the signIn API initiates a new auth flow,\n // regardless of whether it is called for a user currently engaged in an active auto sign in session.\n (0, $epZMx.resetAutoSignIn)(false);\n const authFlowType = input.options?.authFlowType;\n await (0, $4DGDz.assertUserNotAuthenticated)();\n switch(authFlowType){\n case 'USER_SRP_AUTH':\n return (0, $aplbo.signInWithSRP)(input);\n case 'USER_PASSWORD_AUTH':\n return (0, $j3ZKM.signInWithUserPassword)(input);\n case 'CUSTOM_WITHOUT_SRP':\n return (0, $2ob6P.signInWithCustomAuth)(input);\n case 'CUSTOM_WITH_SRP':\n return (0, $hfsLE.signInWithCustomSRPAuth)(input);\n case 'USER_AUTH':\n return (0, $jqRoP.signInWithUserAuth)(input);\n default:\n return (0, $aplbo.signInWithSRP)(input);\n }\n}\n\n});\nparcelRegister(\"4DGDz\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleUserPasswordAuthFlow\", () => $6fab2921b1277409$export$29fb48d356e16a7);\n$parcel$export(module.exports, \"handleUserSRPAuthFlow\", () => $6fab2921b1277409$export$13a3ef5ef8cac338);\n$parcel$export(module.exports, \"handleCustomAuthFlowWithoutSRP\", () => $6fab2921b1277409$export$1a654dcab55e0de5);\n$parcel$export(module.exports, \"handleCustomSRPAuthFlow\", () => $6fab2921b1277409$export$9ce9dd351616104c);\n$parcel$export(module.exports, \"getSignInResult\", () => $6fab2921b1277409$export$cf152400b58b8e65);\n$parcel$export(module.exports, \"getSignInResultFromError\", () => $6fab2921b1277409$export$cafe99bb44d49edb);\n$parcel$export(module.exports, \"assertUserNotAuthenticated\", () => $6fab2921b1277409$export$8061cd07f982ef08);\n$parcel$export(module.exports, \"getActiveSignInUsername\", () => $6fab2921b1277409$export$cc3585de146a51be);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $7Ar4G = parcelRequire(\"7Ar4G\");\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $kxGIY = parcelRequire(\"kxGIY\");\n\nvar $fjlOG = parcelRequire(\"fjlOG\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n\nvar $2yfk2 = parcelRequire(\"2yfk2\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $4FP28 = parcelRequire(\"4FP28\");\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $d6Akq = parcelRequire(\"d6Akq\");\n\nvar $jWmGf = parcelRequire(\"jWmGf\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $g8535 = parcelRequire(\"g8535\");\n\nvar $85LUF = parcelRequire(\"85LUF\");\n\nvar $Es9Vl = parcelRequire(\"Es9Vl\");\n\nvar $6CDe7 = parcelRequire(\"6CDe7\");\n\nvar $9uTeX = parcelRequire(\"9uTeX\");\n\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $14Fuc = parcelRequire(\"14Fuc\");\n\nparcelRequire(\"78v1Z\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $gGTf9 = parcelRequire(\"gGTf9\");\n\nvar $SXwmC = parcelRequire(\"SXwmC\");\n\nvar $eL1Oc = parcelRequire(\"eL1Oc\");\n\nvar $ePagu = parcelRequire(\"ePagu\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $6fab2921b1277409$var$USER_ATTRIBUTES = 'userAttributes.';\nfunction $6fab2921b1277409$var$isWebAuthnResultAuthSignInOutput(result) {\n return 'isSignedIn' in result && 'nextStep' in result;\n}\nasync function $6fab2921b1277409$export$6fe6331471b54d26({ challengeResponse: challengeResponse, clientMetadata: clientMetadata, session: session, username: username, config: config, tokenOrchestrator: tokenOrchestrator }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n ANSWER: challengeResponse\n };\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, jsonReq);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') return (0, $SXwmC.handleDeviceSRPAuth)({\n username: username,\n config: config,\n clientMetadata: clientMetadata,\n session: response.Session,\n tokenOrchestrator: tokenOrchestrator\n });\n return response;\n}\nasync function $6fab2921b1277409$export$9b78cd405a35bccd({ challengeResponse: challengeResponse, username: username, clientMetadata: clientMetadata, session: session, deviceName: deviceName, config: config }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n if (challengeResponse === 'EMAIL') return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"EMAIL_OTP\"]'\n },\n $metadata: {}\n };\n if (challengeResponse === 'TOTP') return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"SOFTWARE_TOKEN_MFA\"]'\n },\n $metadata: {}\n };\n const challengeResponses = {\n USERNAME: username\n };\n const isTOTPCode = /^\\d+$/.test(challengeResponse);\n if (isTOTPCode) {\n const verifySoftwareToken = (0, $d6Akq.createVerifySoftwareTokenClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { Session: Session } = await verifySoftwareToken({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, {\n UserCode: challengeResponse,\n Session: session,\n FriendlyDeviceName: deviceName\n });\n (0, $71859.signInStore).dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session\n });\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session: Session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, jsonReq);\n }\n const isEmail = challengeResponse.includes('@');\n if (isEmail) {\n challengeResponses.EMAIL = challengeResponse;\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, jsonReq);\n }\n throw new (0, $b62N7.AuthError)({\n name: (0, $fjlOG.AuthErrorCodes).SignInException,\n message: `Cannot proceed with MFA setup using challengeResponse: ${challengeResponse}`,\n recoverySuggestion: 'Try passing \"EMAIL\", \"TOTP\", a valid email, or OTP code as the challengeResponse.'\n });\n}\nasync function $6fab2921b1277409$export$f0699fc2b71f49c0({ challengeResponse: challengeResponse, username: username, clientMetadata: clientMetadata, session: session, config: config }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n (0, $7XpgE.assertValidationError)(challengeResponse === 'TOTP' || challengeResponse === 'SMS' || challengeResponse === 'EMAIL', (0, $ewkqX.AuthValidationErrorCode).IncorrectMFAMethod);\n const challengeResponses = {\n USERNAME: username,\n ANSWER: $6fab2921b1277409$export$7e7902092e38fcff(challengeResponse)\n };\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, jsonReq);\n}\nasync function $6fab2921b1277409$export$df3f8a8c68da6a2e({ challengeResponse: challengeResponse, clientMetadata: clientMetadata, session: session, username: username, requiredAttributes: requiredAttributes, config: config }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const challengeResponses = {\n ...$6fab2921b1277409$export$c7c9603a6b1fd815(requiredAttributes),\n NEW_PASSWORD: challengeResponse,\n USERNAME: username\n };\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, jsonReq);\n}\nasync function $6fab2921b1277409$export$29fb48d356e16a7(username, password, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId: userPoolClientId, userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n PASSWORD: password\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const initiateAuth = (0, $4FP28.createInitiateAuthClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await initiateAuth({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignIn)\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ?? response.ChallengeParameters?.USER_ID_FOR_SRP ?? username;\n (0, $ePagu.setActiveSignInUsername)(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') return (0, $SXwmC.handleDeviceSRPAuth)({\n username: activeUsername,\n config: config,\n clientMetadata: clientMetadata,\n session: response.Session,\n tokenOrchestrator: tokenOrchestrator\n });\n return response;\n}\nasync function $6fab2921b1277409$export$13a3ef5ef8cac338(username, password, clientMetadata, config, tokenOrchestrator) {\n return (0, $85LUF.handlePasswordSRP)({\n username: username,\n password: password,\n clientMetadata: clientMetadata,\n config: config,\n tokenOrchestrator: tokenOrchestrator,\n authFlow: 'USER_SRP_AUTH'\n });\n}\nasync function $6fab2921b1277409$export$1a654dcab55e0de5(username, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId: userPoolClientId, userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const initiateAuth = (0, $4FP28.createInitiateAuthClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await initiateAuth({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignIn)\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n (0, $ePagu.setActiveSignInUsername)(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') return (0, $SXwmC.handleDeviceSRPAuth)({\n username: activeUsername,\n config: config,\n clientMetadata: clientMetadata,\n session: response.Session,\n tokenOrchestrator: tokenOrchestrator\n });\n return response;\n}\nasync function $6fab2921b1277409$export$9ce9dd351616104c(username, password, clientMetadata, config, tokenOrchestrator) {\n (0, $bfiP6.assertTokenProviderConfig)(config);\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await (0, $14Fuc.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n CHALLENGE_NAME: 'SRP_A'\n };\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const initiateAuth = (0, $4FP28.createInitiateAuthClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { ChallengeParameters: challengeParameters, Session: session } = await initiateAuth({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignIn)\n }, jsonReq);\n const activeUsername = challengeParameters?.USERNAME ?? username;\n (0, $ePagu.setActiveSignInUsername)(activeUsername);\n return (0, $eL1Oc.retryOnResourceNotFoundException)((0, $gGTf9.handlePasswordVerifierChallenge), [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator\n ], activeUsername, tokenOrchestrator);\n}\nasync function $6fab2921b1277409$export$cf152400b58b8e65(params) {\n const { challengeName: challengeName, challengeParameters: challengeParameters, availableChallenges: availableChallenges } = params;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n switch(challengeName){\n case 'CUSTOM_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE',\n additionalInfo: challengeParameters\n }\n };\n case 'MFA_SETUP':\n {\n const { signInSession: signInSession, username: username } = (0, $71859.signInStore).getState();\n const mfaSetupTypes = $6fab2921b1277409$export$d70c792e078766ea($6fab2921b1277409$export$4055ded9e78438ba(challengeParameters.MFAS_CAN_SETUP)) || [];\n const allowedMfaSetupTypes = $6fab2921b1277409$export$343435e7c7c3ff0f(mfaSetupTypes);\n const isTotpMfaSetupAvailable = allowedMfaSetupTypes.includes('TOTP');\n const isEmailMfaSetupAvailable = allowedMfaSetupTypes.includes('EMAIL');\n if (isTotpMfaSetupAvailable && isEmailMfaSetupAvailable) return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION',\n allowedMFATypes: allowedMfaSetupTypes\n }\n };\n if (isEmailMfaSetupAvailable) return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_EMAIL_SETUP'\n }\n };\n if (isTotpMfaSetupAvailable) {\n const associateSoftwareToken = (0, $jWmGf.createAssociateSoftwareTokenClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: authConfig.userPoolEndpoint\n })\n });\n const { Session: Session, SecretCode: secretCode } = await associateSoftwareToken({\n region: (0, $hXC67.getRegionFromUserPoolId)(authConfig.userPoolId)\n }, {\n Session: signInSession\n });\n (0, $71859.signInStore).dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session\n });\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP',\n totpSetupDetails: $6fab2921b1277409$export$b105c3e8e4f5ce91(secretCode, username)\n }\n };\n }\n throw new (0, $b62N7.AuthError)({\n name: (0, $fjlOG.AuthErrorCodes).SignInException,\n message: `Cannot initiate MFA setup from available types: ${mfaSetupTypes}`\n });\n }\n case 'NEW_PASSWORD_REQUIRED':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED',\n missingAttributes: $6fab2921b1277409$export$fbe550151e406473(challengeParameters.requiredAttributes)\n }\n };\n case 'SELECT_MFA_TYPE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION',\n allowedMFATypes: $6fab2921b1277409$export$d70c792e078766ea($6fab2921b1277409$export$4055ded9e78438ba(challengeParameters.MFAS_CAN_CHOOSE))\n }\n };\n case 'SMS_OTP':\n case 'SMS_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_SMS_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION\n }\n }\n };\n case 'SOFTWARE_TOKEN_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_TOTP_CODE'\n }\n };\n case 'EMAIL_OTP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_EMAIL_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION\n }\n }\n };\n case 'WEB_AUTHN':\n {\n const result = await (0, $g8535.handleWebAuthnSignInResult)(challengeParameters);\n if ($6fab2921b1277409$var$isWebAuthnResultAuthSignInOutput(result)) return result;\n return $6fab2921b1277409$export$cf152400b58b8e65(result);\n }\n case 'PASSWORD':\n case 'PASSWORD_SRP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_PASSWORD'\n }\n };\n case 'SELECT_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION',\n availableChallenges: availableChallenges\n }\n };\n }\n // TODO: remove this error message for production apps\n throw new (0, $b62N7.AuthError)({\n name: (0, $fjlOG.AuthErrorCodes).SignInException,\n message: 'An error occurred during the sign in process. ' + `${challengeName} challengeName returned by the underlying service was not addressed.`\n });\n}\nfunction $6fab2921b1277409$export$b105c3e8e4f5ce91(secretCode, username) {\n return {\n sharedSecret: secretCode,\n getSetupUri: (appName, accountName)=>{\n const totpUri = `otpauth://totp/${appName}:${accountName ?? username}?secret=${secretCode}&issuer=${appName}`;\n return new (0, $7Ar4G.AmplifyUrl)(totpUri);\n }\n };\n}\nfunction $6fab2921b1277409$export$cafe99bb44d49edb(errorName) {\n if (errorName === (0, $kxGIY.InitiateAuthException).PasswordResetRequiredException) return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'RESET_PASSWORD'\n }\n };\n else if (errorName === (0, $kxGIY.InitiateAuthException).UserNotConfirmedException) return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_UP'\n }\n };\n}\nfunction $6fab2921b1277409$export$fbe550151e406473(attributes) {\n if (!attributes) return [];\n const parsedAttributes = JSON.parse(attributes).map((att)=>att.includes($6fab2921b1277409$var$USER_ATTRIBUTES) ? att.replace($6fab2921b1277409$var$USER_ATTRIBUTES, '') : att);\n return parsedAttributes;\n}\nfunction $6fab2921b1277409$export$c7c9603a6b1fd815(attributes) {\n if (!attributes) return {};\n const newAttributes = {};\n Object.entries(attributes).forEach(([key, value])=>{\n if (value) newAttributes[`${$6fab2921b1277409$var$USER_ATTRIBUTES}${key}`] = value;\n });\n return newAttributes;\n}\nasync function $6fab2921b1277409$export$cfd8b50d0f78e4fa(username, challengeName, session, challengeResponse, config, tokenOrchestrator, clientMetadata, options) {\n const userAttributes = options?.userAttributes;\n const deviceName = options?.friendlyDeviceName;\n switch(challengeName){\n case 'WEB_AUTHN':\n case 'SELECT_CHALLENGE':\n if (challengeResponse === 'PASSWORD_SRP' || challengeResponse === 'PASSWORD') return {\n ChallengeName: challengeResponse,\n Session: session,\n $metadata: {}\n };\n return (0, $Es9Vl.initiateSelectedChallenge)({\n username: username,\n session: session,\n selectedChallenge: challengeResponse,\n config: config,\n clientMetadata: clientMetadata\n });\n case 'SELECT_MFA_TYPE':\n return $6fab2921b1277409$export$f0699fc2b71f49c0({\n challengeResponse: challengeResponse,\n clientMetadata: clientMetadata,\n session: session,\n username: username,\n config: config\n });\n case 'MFA_SETUP':\n return $6fab2921b1277409$export$9b78cd405a35bccd({\n challengeResponse: challengeResponse,\n clientMetadata: clientMetadata,\n session: session,\n username: username,\n deviceName: deviceName,\n config: config\n });\n case 'NEW_PASSWORD_REQUIRED':\n return $6fab2921b1277409$export$df3f8a8c68da6a2e({\n challengeResponse: challengeResponse,\n clientMetadata: clientMetadata,\n session: session,\n username: username,\n requiredAttributes: userAttributes,\n config: config\n });\n case 'CUSTOM_CHALLENGE':\n return (0, $eL1Oc.retryOnResourceNotFoundException)($6fab2921b1277409$export$6fe6331471b54d26, [\n {\n challengeResponse: challengeResponse,\n clientMetadata: clientMetadata,\n session: session,\n username: username,\n config: config,\n tokenOrchestrator: tokenOrchestrator\n }\n ], username, tokenOrchestrator);\n case 'SMS_MFA':\n case 'SOFTWARE_TOKEN_MFA':\n case 'SMS_OTP':\n case 'EMAIL_OTP':\n return $6fab2921b1277409$export$1ec196d12cb921db({\n challengeName: challengeName,\n challengeResponse: challengeResponse,\n clientMetadata: clientMetadata,\n session: session,\n username: username,\n config: config\n });\n case 'PASSWORD':\n return (0, $6CDe7.handleSelectChallengeWithPassword)(username, challengeResponse, clientMetadata, config, session);\n case 'PASSWORD_SRP':\n return (0, $9uTeX.handleSelectChallengeWithPasswordSRP)(username, challengeResponse, clientMetadata, config, session, tokenOrchestrator);\n }\n // TODO: remove this error message for production apps\n throw new (0, $b62N7.AuthError)({\n name: (0, $fjlOG.AuthErrorCodes).SignInException,\n message: `An error occurred during the sign in process.\n\t\t${challengeName} challengeName returned by the underlying service was not addressed.`\n });\n}\nfunction $6fab2921b1277409$export$7e7902092e38fcff(mfa) {\n let mfaType = 'SMS_MFA';\n if (mfa === 'TOTP') mfaType = 'SOFTWARE_TOKEN_MFA';\n if (mfa === 'EMAIL') mfaType = 'EMAIL_OTP';\n return mfaType;\n}\nfunction $6fab2921b1277409$export$6ce04ce89055b1fe(type) {\n if (type === 'SMS_MFA') return 'SMS';\n if (type === 'SOFTWARE_TOKEN_MFA') return 'TOTP';\n if (type === 'EMAIL_OTP') return 'EMAIL';\n// TODO: log warning for unknown MFA type\n}\nfunction $6fab2921b1277409$export$d70c792e078766ea(types) {\n if (!types) return undefined;\n return types.map($6fab2921b1277409$export$6ce04ce89055b1fe).filter(Boolean);\n}\nfunction $6fab2921b1277409$export$4055ded9e78438ba(mfa) {\n if (!mfa) return [];\n return JSON.parse(mfa);\n}\nfunction $6fab2921b1277409$export$343435e7c7c3ff0f(availableMfaSetupTypes) {\n return availableMfaSetupTypes.filter((authMfaType)=>authMfaType === 'EMAIL' || authMfaType === 'TOTP');\n}\nasync function $6fab2921b1277409$export$8061cd07f982ef08() {\n let authUser;\n try {\n authUser = await (0, $2yfk2.getCurrentUser)();\n } catch (error) {}\n if (authUser && authUser.userId && authUser.username) throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.USER_ALREADY_AUTHENTICATED_EXCEPTION),\n message: 'There is already a signed in user.',\n recoverySuggestion: 'Call signOut before calling signIn again.'\n });\n}\nfunction $6fab2921b1277409$export$cc3585de146a51be(username) {\n const state = (0, $71859.signInStore).getState();\n return state.username ?? username;\n}\nasync function $6fab2921b1277409$export$1ec196d12cb921db({ challengeName: challengeName, challengeResponse: challengeResponse, clientMetadata: clientMetadata, session: session, username: username, config: config }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username\n };\n if (challengeName === 'EMAIL_OTP') challengeResponses.EMAIL_OTP_CODE = challengeResponse;\n if (challengeName === 'SMS_MFA') challengeResponses.SMS_MFA_CODE = challengeResponse;\n if (challengeName === 'SMS_OTP') challengeResponses.SMS_OTP_CODE = challengeResponse;\n if (challengeName === 'SOFTWARE_TOKEN_MFA') challengeResponses.SOFTWARE_TOKEN_MFA_CODE = challengeResponse;\n const userContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n ChallengeName: challengeName,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: userContextData\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, jsonReq);\n}\n\n});\nparcelRegister(\"kxGIY\", function(module, exports) {\n\n$parcel$export(module.exports, \"InitiateAuthException\", () => $38f3777598d063a4$export$43ac0110dfdad33b);\n$parcel$export(module.exports, \"SignUpException\", () => $38f3777598d063a4$export$d0816902ed99fce6);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $38f3777598d063a4$export$3cc5c71ef5f25e57;\n(function(AssociateSoftwareTokenException) {\n AssociateSoftwareTokenException[\"ConcurrentModificationException\"] = \"ConcurrentModificationException\";\n AssociateSoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n AssociateSoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n AssociateSoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n AssociateSoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n AssociateSoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n AssociateSoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n})($38f3777598d063a4$export$3cc5c71ef5f25e57 || ($38f3777598d063a4$export$3cc5c71ef5f25e57 = {}));\nvar $38f3777598d063a4$export$4327725e8bb80c51;\n(function(ChangePasswordException) {\n ChangePasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ChangePasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ChangePasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ChangePasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ChangePasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ChangePasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ChangePasswordException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ChangePasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ChangePasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ChangePasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ChangePasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$4327725e8bb80c51 || ($38f3777598d063a4$export$4327725e8bb80c51 = {}));\nvar $38f3777598d063a4$export$87a956d0b1b725a1;\n(function(ConfirmDeviceException) {\n ConfirmDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmDeviceException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmDeviceException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ConfirmDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ConfirmDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmDeviceException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n ConfirmDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$87a956d0b1b725a1 || ($38f3777598d063a4$export$87a956d0b1b725a1 = {}));\nvar $38f3777598d063a4$export$b86a388af82085af;\n(function(ConfirmForgotPasswordException) {\n ConfirmForgotPasswordException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmForgotPasswordException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmForgotPasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmForgotPasswordException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmForgotPasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$b86a388af82085af || ($38f3777598d063a4$export$b86a388af82085af = {}));\nvar $38f3777598d063a4$export$2ec29642a27fd055;\n(function(ConfirmSignUpException) {\n ConfirmSignUpException[\"AliasExistsException\"] = \"AliasExistsException\";\n ConfirmSignUpException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmSignUpException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmSignUpException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmSignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmSignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmSignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmSignUpException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmSignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmSignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmSignUpException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmSignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmSignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmSignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmSignUpException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$2ec29642a27fd055 || ($38f3777598d063a4$export$2ec29642a27fd055 = {}));\nvar $38f3777598d063a4$export$c6d546f0ab5ecb26;\n(function(DeleteUserAttributesException) {\n DeleteUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$c6d546f0ab5ecb26 || ($38f3777598d063a4$export$c6d546f0ab5ecb26 = {}));\nvar $38f3777598d063a4$export$315864c77a135492;\n(function(DeleteUserException) {\n DeleteUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$315864c77a135492 || ($38f3777598d063a4$export$315864c77a135492 = {}));\nvar $38f3777598d063a4$export$622cff54bc9a0bb0;\n(function(ForgetDeviceException) {\n ForgetDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgetDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgetDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgetDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ForgetDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgetDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ForgetDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgetDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgetDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ForgetDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$622cff54bc9a0bb0 || ($38f3777598d063a4$export$622cff54bc9a0bb0 = {}));\nvar $38f3777598d063a4$export$cedaef1e1242f8be;\n(function(ForgotPasswordException) {\n ForgotPasswordException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgotPasswordException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgotPasswordException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$cedaef1e1242f8be || ($38f3777598d063a4$export$cedaef1e1242f8be = {}));\nvar $38f3777598d063a4$export$8d5b6b7a140e0c94;\n(function(GetUserException) {\n GetUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$8d5b6b7a140e0c94 || ($38f3777598d063a4$export$8d5b6b7a140e0c94 = {}));\nvar $38f3777598d063a4$export$506f117795ed2bb2;\n(function(GetIdException) {\n GetIdException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetIdException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetIdException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetIdException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetIdException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetIdException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetIdException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetIdException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})($38f3777598d063a4$export$506f117795ed2bb2 || ($38f3777598d063a4$export$506f117795ed2bb2 = {}));\nvar $38f3777598d063a4$export$9bff15c85d75f437;\n(function(GetCredentialsForIdentityException) {\n GetCredentialsForIdentityException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetCredentialsForIdentityException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetCredentialsForIdentityException[\"InvalidIdentityPoolConfigurationException\"] = \"InvalidIdentityPoolConfigurationException\";\n GetCredentialsForIdentityException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetCredentialsForIdentityException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetCredentialsForIdentityException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetCredentialsForIdentityException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetCredentialsForIdentityException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})($38f3777598d063a4$export$9bff15c85d75f437 || ($38f3777598d063a4$export$9bff15c85d75f437 = {}));\nvar $38f3777598d063a4$export$2a6bba23fbf84d1b;\n(function(GetUserAttributeVerificationException) {\n GetUserAttributeVerificationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n GetUserAttributeVerificationException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserAttributeVerificationException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserAttributeVerificationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n GetUserAttributeVerificationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n GetUserAttributeVerificationException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetUserAttributeVerificationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserAttributeVerificationException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserAttributeVerificationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserAttributeVerificationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserAttributeVerificationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n GetUserAttributeVerificationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n GetUserAttributeVerificationException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserAttributeVerificationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$2a6bba23fbf84d1b || ($38f3777598d063a4$export$2a6bba23fbf84d1b = {}));\nvar $38f3777598d063a4$export$3f7e490ba4e0b71e;\n(function(GlobalSignOutException) {\n GlobalSignOutException[\"ForbiddenException\"] = \"ForbiddenException\";\n GlobalSignOutException[\"InternalErrorException\"] = \"InternalErrorException\";\n GlobalSignOutException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GlobalSignOutException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GlobalSignOutException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GlobalSignOutException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GlobalSignOutException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GlobalSignOutException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n})($38f3777598d063a4$export$3f7e490ba4e0b71e || ($38f3777598d063a4$export$3f7e490ba4e0b71e = {}));\nvar $38f3777598d063a4$export$43ac0110dfdad33b;\n(function(InitiateAuthException) {\n InitiateAuthException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n InitiateAuthException[\"ForbiddenException\"] = \"ForbiddenException\";\n InitiateAuthException[\"InternalErrorException\"] = \"InternalErrorException\";\n InitiateAuthException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n InitiateAuthException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n InitiateAuthException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n InitiateAuthException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n InitiateAuthException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n InitiateAuthException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n InitiateAuthException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n InitiateAuthException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n InitiateAuthException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n InitiateAuthException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n InitiateAuthException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n InitiateAuthException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$43ac0110dfdad33b || ($38f3777598d063a4$export$43ac0110dfdad33b = {}));\nvar $38f3777598d063a4$export$8807b62ddb0e4d9d;\n(function(ResendConfirmationException) {\n ResendConfirmationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ResendConfirmationException[\"ForbiddenException\"] = \"ForbiddenException\";\n ResendConfirmationException[\"InternalErrorException\"] = \"InternalErrorException\";\n ResendConfirmationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ResendConfirmationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ResendConfirmationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ResendConfirmationException[\"LimitExceededException\"] = \"LimitExceededException\";\n ResendConfirmationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ResendConfirmationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ResendConfirmationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ResendConfirmationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ResendConfirmationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ResendConfirmationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$8807b62ddb0e4d9d || ($38f3777598d063a4$export$8807b62ddb0e4d9d = {}));\nvar $38f3777598d063a4$export$da9908386393628f;\n(function(RespondToAuthChallengeException) {\n RespondToAuthChallengeException[\"AliasExistsException\"] = \"AliasExistsException\";\n RespondToAuthChallengeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n RespondToAuthChallengeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n RespondToAuthChallengeException[\"ForbiddenException\"] = \"ForbiddenException\";\n RespondToAuthChallengeException[\"InternalErrorException\"] = \"InternalErrorException\";\n RespondToAuthChallengeException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n RespondToAuthChallengeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n RespondToAuthChallengeException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n RespondToAuthChallengeException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n RespondToAuthChallengeException[\"MFAMethodNotFoundException\"] = \"MFAMethodNotFoundException\";\n RespondToAuthChallengeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n RespondToAuthChallengeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n RespondToAuthChallengeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n RespondToAuthChallengeException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n RespondToAuthChallengeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n RespondToAuthChallengeException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n RespondToAuthChallengeException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n RespondToAuthChallengeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n RespondToAuthChallengeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$da9908386393628f || ($38f3777598d063a4$export$da9908386393628f = {}));\nvar $38f3777598d063a4$export$23ea34859d89459d;\n(function(SetUserMFAPreferenceException) {\n SetUserMFAPreferenceException[\"ForbiddenException\"] = \"ForbiddenException\";\n SetUserMFAPreferenceException[\"InternalErrorException\"] = \"InternalErrorException\";\n SetUserMFAPreferenceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SetUserMFAPreferenceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SetUserMFAPreferenceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n SetUserMFAPreferenceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SetUserMFAPreferenceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n SetUserMFAPreferenceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$23ea34859d89459d || ($38f3777598d063a4$export$23ea34859d89459d = {}));\nvar $38f3777598d063a4$export$d0816902ed99fce6;\n(function(SignUpException) {\n SignUpException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n SignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n SignUpException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n SignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n SignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SignUpException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n SignUpException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n SignUpException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n SignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n SignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n SignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n SignUpException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n})($38f3777598d063a4$export$d0816902ed99fce6 || ($38f3777598d063a4$export$d0816902ed99fce6 = {}));\nvar $38f3777598d063a4$export$44cb15f260897376;\n(function(UpdateUserAttributesException) {\n UpdateUserAttributesException[\"AliasExistsException\"] = \"AliasExistsException\";\n UpdateUserAttributesException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n UpdateUserAttributesException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n UpdateUserAttributesException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n UpdateUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateUserAttributesException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n UpdateUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateUserAttributesException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n UpdateUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateUserAttributesException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n UpdateUserAttributesException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n UpdateUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$44cb15f260897376 || ($38f3777598d063a4$export$44cb15f260897376 = {}));\nvar $38f3777598d063a4$export$a974f64d24be573a;\n(function(VerifySoftwareTokenException) {\n VerifySoftwareTokenException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifySoftwareTokenException[\"EnableSoftwareTokenMFAException\"] = \"EnableSoftwareTokenMFAException\";\n VerifySoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifySoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifySoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifySoftwareTokenException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n VerifySoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifySoftwareTokenException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifySoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifySoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n VerifySoftwareTokenException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifySoftwareTokenException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifySoftwareTokenException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$a974f64d24be573a || ($38f3777598d063a4$export$a974f64d24be573a = {}));\nvar $38f3777598d063a4$export$527caabb62d14fe3;\n(function(VerifyUserAttributeException) {\n VerifyUserAttributeException[\"AliasExistsException\"] = \"AliasExistsException\";\n VerifyUserAttributeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifyUserAttributeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n VerifyUserAttributeException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifyUserAttributeException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifyUserAttributeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifyUserAttributeException[\"LimitExceededException\"] = \"LimitExceededException\";\n VerifyUserAttributeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifyUserAttributeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifyUserAttributeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifyUserAttributeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifyUserAttributeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifyUserAttributeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$527caabb62d14fe3 || ($38f3777598d063a4$export$527caabb62d14fe3 = {}));\nvar $38f3777598d063a4$export$de57be1863bdb9d6;\n(function(UpdateDeviceStatusException) {\n UpdateDeviceStatusException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateDeviceStatusException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateDeviceStatusException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateDeviceStatusException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n UpdateDeviceStatusException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateDeviceStatusException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateDeviceStatusException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateDeviceStatusException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateDeviceStatusException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateDeviceStatusException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$de57be1863bdb9d6 || ($38f3777598d063a4$export$de57be1863bdb9d6 = {}));\nvar $38f3777598d063a4$export$eb8cb06bdb07bf0c;\n(function(ListDevicesException) {\n ListDevicesException[\"ForbiddenException\"] = \"ForbiddenException\";\n ListDevicesException[\"InternalErrorException\"] = \"InternalErrorException\";\n ListDevicesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ListDevicesException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ListDevicesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ListDevicesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ListDevicesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ListDevicesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ListDevicesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ListDevicesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})($38f3777598d063a4$export$eb8cb06bdb07bf0c || ($38f3777598d063a4$export$eb8cb06bdb07bf0c = {}));\nconst $38f3777598d063a4$export$ecd3eb1722b48d26 = 'SetUpTOTPException';\n\n});\n\nparcelRegister(\"cTNcW\", function(module, exports) {\n\n$parcel$export(module.exports, \"createRespondToAuthChallengeClient\", () => $c7cfea3fbbdba519$export$11329f5ae466ab5d);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $c7cfea3fbbdba519$export$11329f5ae466ab5d = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('RespondToAuthChallenge'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\nparcelRegister(\"d6Akq\", function(module, exports) {\n\n$parcel$export(module.exports, \"createVerifySoftwareTokenClient\", () => $87be50599779ca89$export$cf5dd9429415aa98);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $87be50599779ca89$export$cf5dd9429415aa98 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('VerifySoftwareToken'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\nparcelRegister(\"jWmGf\", function(module, exports) {\n\n$parcel$export(module.exports, \"createAssociateSoftwareTokenClient\", () => $42d51ce9ec3a689b$export$6bff32634453de2a);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $42d51ce9ec3a689b$export$6bff32634453de2a = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('AssociateSoftwareToken'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\nparcelRegister(\"g8535\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleWebAuthnSignInResult\", () => $ed8b85eec8f7d712$export$77701654924537aa);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $fjlOG = parcelRequire(\"fjlOG\");\n\n\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $23mcB = parcelRequire(\"23mcB\");\n\nvar $3fXpj = parcelRequire(\"3fXpj\");\n\nvar $1oMYx = parcelRequire(\"1oMYx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function $ed8b85eec8f7d712$export$77701654924537aa(challengeParameters) {\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { username: username, signInSession: signInSession, signInDetails: signInDetails, challengeName: challengeName } = (0, $71859.signInStore).getState();\n if (challengeName !== 'WEB_AUTHN' || !username) throw new (0, $b62N7.AuthError)({\n name: (0, $fjlOG.AuthErrorCodes).SignInException,\n message: 'Unable to proceed due to invalid sign in state.'\n });\n const { CREDENTIAL_REQUEST_OPTIONS: credentialRequestOptions } = challengeParameters;\n (0, $23mcB.assertPasskeyError)(!!credentialRequestOptions, (0, $23mcB.PasskeyErrorCode).InvalidPasskeyAuthenticationOptions);\n const cred = await (0, $3fXpj.getPasskey)(JSON.parse(credentialRequestOptions));\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: authConfig.userPoolEndpoint\n })\n });\n const { ChallengeName: nextChallengeName, ChallengeParameters: nextChallengeParameters, AuthenticationResult: authenticationResult, Session: nextSession } = await respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(authConfig.userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, {\n ChallengeName: 'WEB_AUTHN',\n ChallengeResponses: {\n USERNAME: username,\n CREDENTIAL: JSON.stringify(cred)\n },\n ClientId: authConfig.userPoolClientId,\n Session: signInSession\n });\n (0, $71859.setActiveSignInState)({\n signInSession: nextSession,\n username: username,\n challengeName: nextChallengeName,\n signInDetails: signInDetails\n });\n if (authenticationResult) {\n await (0, $eQv6f.cacheCognitoTokens)({\n ...authenticationResult,\n username: username,\n NewDeviceMetadata: await (0, $1oMYx.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: authenticationResult.NewDeviceMetadata,\n accessToken: authenticationResult.AccessToken\n }),\n signInDetails: signInDetails\n });\n (0, $71859.signInStore).dispatch({\n type: 'RESET_STATE'\n });\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n return {\n isSignedIn: true,\n nextStep: {\n signInStep: 'DONE'\n }\n };\n }\n if (nextChallengeName === 'WEB_AUTHN') throw new (0, $b62N7.AuthError)({\n name: (0, $fjlOG.AuthErrorCodes).SignInException,\n message: 'Sequential WEB_AUTHN challenges returned from underlying service cannot be handled.'\n });\n return {\n challengeName: nextChallengeName,\n challengeParameters: nextChallengeParameters\n };\n}\n\n});\nparcelRegister(\"eQv6f\", function(module, exports) {\n\n$parcel$export(module.exports, \"cacheCognitoTokens\", () => $a779287bf2b03a51$export$729df6fdd19b8b0d);\n\nvar $e0exy = parcelRequire(\"e0exy\");\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $54W3M = parcelRequire(\"54W3M\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function $a779287bf2b03a51$export$729df6fdd19b8b0d(AuthenticationResult) {\n if (AuthenticationResult.AccessToken) {\n const accessToken = (0, $bfiP6.decodeJWT)(AuthenticationResult.AccessToken);\n const accessTokenIssuedAtInMillis = (accessToken.payload.iat || 0) * 1000;\n const currentTime = new Date().getTime();\n const clockDrift = accessTokenIssuedAtInMillis > 0 ? accessTokenIssuedAtInMillis - currentTime : 0;\n let idToken;\n let refreshToken;\n let deviceMetadata;\n if (AuthenticationResult.RefreshToken) refreshToken = AuthenticationResult.RefreshToken;\n if (AuthenticationResult.IdToken) idToken = (0, $bfiP6.decodeJWT)(AuthenticationResult.IdToken);\n if (AuthenticationResult?.NewDeviceMetadata) deviceMetadata = AuthenticationResult.NewDeviceMetadata;\n const tokens = {\n accessToken: accessToken,\n idToken: idToken,\n refreshToken: refreshToken,\n clockDrift: clockDrift,\n deviceMetadata: deviceMetadata,\n username: AuthenticationResult.username\n };\n if (AuthenticationResult?.signInDetails) tokens.signInDetails = AuthenticationResult.signInDetails;\n await (0, $54W3M.tokenOrchestrator).setTokens({\n tokens: tokens\n });\n } else // This would be a service error\n throw new (0, $e0exy.AmplifyError)({\n message: 'Invalid tokens',\n name: 'InvalidTokens',\n recoverySuggestion: 'Check Cognito UserPool settings'\n });\n}\n\n});\n\nparcelRegister(\"8Z7oT\", function(module, exports) {\n\n$parcel$export(module.exports, \"dispatchSignedInHubEvent\", () => $6be4baea9bcbd5e1$export$4d78d2ee899572ab);\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $2yfk2 = parcelRequire(\"2yfk2\");\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $6be4baea9bcbd5e1$export$3f27bc10068ef877 = 'Unable to get user session following successful sign-in.';\nconst $6be4baea9bcbd5e1$export$4d78d2ee899572ab = async ()=>{\n try {\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'signedIn',\n data: await (0, $2yfk2.getCurrentUser)()\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n } catch (error) {\n if (error.name === (0, $cutI2.USER_UNAUTHENTICATED_EXCEPTION)) throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION),\n message: $6be4baea9bcbd5e1$export$3f27bc10068ef877,\n 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.'\n });\n throw error;\n }\n};\n\n});\n\nparcelRegister(\"71859\", function(module, exports) {\n\n$parcel$export(module.exports, \"resetActiveSignInState\", () => $5c2e856f6dc0fa98$export$ddfd5a0262ce9df3);\n$parcel$export(module.exports, \"signInStore\", () => $5c2e856f6dc0fa98$export$390d5da4c63a4a41);\n$parcel$export(module.exports, \"setActiveSignInState\", () => $5c2e856f6dc0fa98$export$bae72361b690e075);\n\nvar $57Of0 = parcelRequire(\"57Of0\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Minutes until stored session invalidates is defaulted to 3 minutes\n// to maintain parity with Amazon Cognito user pools API behavior\nconst $5c2e856f6dc0fa98$var$MS_TO_EXPIRY = 180000;\nconst $5c2e856f6dc0fa98$var$TGT_STATE = 'CognitoSignInState';\nconst $5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS = {\n username: `${$5c2e856f6dc0fa98$var$TGT_STATE}.username`,\n challengeName: `${$5c2e856f6dc0fa98$var$TGT_STATE}.challengeName`,\n signInSession: `${$5c2e856f6dc0fa98$var$TGT_STATE}.signInSession`,\n expiry: `${$5c2e856f6dc0fa98$var$TGT_STATE}.expiry`\n};\nconst $5c2e856f6dc0fa98$var$signInReducer = (state, action)=>{\n switch(action.type){\n case 'SET_SIGN_IN_SESSION':\n $5c2e856f6dc0fa98$export$f0d4bc0f1640c562({\n signInSession: action.value\n });\n return {\n ...state,\n signInSession: action.value\n };\n case 'SET_SIGN_IN_STATE':\n $5c2e856f6dc0fa98$export$f0d4bc0f1640c562(action.value);\n return {\n ...action.value\n };\n case 'SET_CHALLENGE_NAME':\n $5c2e856f6dc0fa98$export$f0d4bc0f1640c562({\n challengeName: action.value\n });\n return {\n ...state,\n challengeName: action.value\n };\n case 'SET_USERNAME':\n $5c2e856f6dc0fa98$export$f0d4bc0f1640c562({\n username: action.value\n });\n return {\n ...state,\n username: action.value\n };\n case 'SET_INITIAL_STATE':\n return $5c2e856f6dc0fa98$var$getInitialState();\n case 'RESET_STATE':\n $5c2e856f6dc0fa98$var$clearPersistedSignInState();\n return $5c2e856f6dc0fa98$var$getDefaultState();\n // this state is never reachable\n default:\n return state;\n }\n};\nconst $5c2e856f6dc0fa98$var$isExpired = (expiryDate)=>{\n const expiryTimestamp = Number(expiryDate);\n const currentTimestamp = Date.now();\n return expiryTimestamp <= currentTimestamp;\n};\nconst $5c2e856f6dc0fa98$export$ddfd5a0262ce9df3 = ()=>{\n $5c2e856f6dc0fa98$export$390d5da4c63a4a41.dispatch({\n type: 'RESET_STATE'\n });\n};\nconst $5c2e856f6dc0fa98$var$clearPersistedSignInState = ()=>{\n for (const stateKey of Object.values($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS))(0, $57Of0.syncSessionStorage).removeItem(stateKey);\n};\nconst $5c2e856f6dc0fa98$var$getDefaultState = ()=>({\n username: undefined,\n challengeName: undefined,\n signInSession: undefined\n });\n// Hydrate signInStore from syncSessionStorage if the session has not expired\nconst $5c2e856f6dc0fa98$var$getInitialState = ()=>{\n const expiry = (0, $57Of0.syncSessionStorage).getItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.expiry);\n if (!expiry || $5c2e856f6dc0fa98$var$isExpired(expiry)) {\n $5c2e856f6dc0fa98$var$clearPersistedSignInState();\n return $5c2e856f6dc0fa98$var$getDefaultState();\n }\n const username = (0, $57Of0.syncSessionStorage).getItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.username) ?? undefined;\n const challengeName = (0, $57Of0.syncSessionStorage).getItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.challengeName) ?? undefined;\n const signInSession = (0, $57Of0.syncSessionStorage).getItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.signInSession) ?? undefined;\n return {\n username: username,\n challengeName: challengeName,\n signInSession: signInSession\n };\n};\nconst $5c2e856f6dc0fa98$var$createStore = (reducer)=>{\n let currentState = reducer($5c2e856f6dc0fa98$var$getDefaultState(), {\n type: 'SET_INITIAL_STATE'\n });\n return {\n getState: ()=>currentState,\n dispatch: (action)=>{\n currentState = reducer(currentState, action);\n }\n };\n};\nconst $5c2e856f6dc0fa98$export$390d5da4c63a4a41 = $5c2e856f6dc0fa98$var$createStore($5c2e856f6dc0fa98$var$signInReducer);\nfunction $5c2e856f6dc0fa98$export$bae72361b690e075(state) {\n $5c2e856f6dc0fa98$export$390d5da4c63a4a41.dispatch({\n type: 'SET_SIGN_IN_STATE',\n value: state\n });\n}\n// Save local state into Session Storage\nconst $5c2e856f6dc0fa98$export$f0d4bc0f1640c562 = ({ challengeName: challengeName, signInSession: signInSession, username: username })=>{\n username && (0, $57Of0.syncSessionStorage).setItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.username, username);\n challengeName && (0, $57Of0.syncSessionStorage).setItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.challengeName, challengeName);\n if (signInSession) {\n (0, $57Of0.syncSessionStorage).setItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.signInSession, signInSession);\n // Updates expiry when session is passed\n (0, $57Of0.syncSessionStorage).setItem($5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS.expiry, String(Date.now() + $5c2e856f6dc0fa98$var$MS_TO_EXPIRY));\n }\n};\n\n});\n\nparcelRegister(\"23mcB\", function(module, exports) {\n\n$parcel$export(module.exports, \"PasskeyErrorCode\", () => $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e);\n$parcel$export(module.exports, \"assertPasskeyError\", () => $d08027fec3d3ccf3$export$3145abf24cf8a54e);\n$parcel$export(module.exports, \"handlePasskeyAuthenticationError\", () => $d08027fec3d3ccf3$export$6abde9ceb8dfddc0);\n\nvar $e0exy = parcelRequire(\"e0exy\");\nvar $8rSHg = parcelRequire(\"8rSHg\");\nvar $bggJy = parcelRequire(\"bggJy\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90 extends (0, $e0exy.AmplifyError) {\n constructor(params){\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90;\n Object.setPrototypeOf(this, $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90.prototype);\n }\n}\nvar $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e;\n(function(PasskeyErrorCode) {\n // not supported\n PasskeyErrorCode[\"PasskeyNotSupported\"] = \"PasskeyNotSupported\";\n // duplicate passkey\n PasskeyErrorCode[\"PasskeyAlreadyExists\"] = \"PasskeyAlreadyExists\";\n // misconfigurations\n PasskeyErrorCode[\"InvalidPasskeyRegistrationOptions\"] = \"InvalidPasskeyRegistrationOptions\";\n PasskeyErrorCode[\"InvalidPasskeyAuthenticationOptions\"] = \"InvalidPasskeyAuthenticationOptions\";\n PasskeyErrorCode[\"RelyingPartyMismatch\"] = \"RelyingPartyMismatch\";\n // failed credential creation / retrieval\n PasskeyErrorCode[\"PasskeyRegistrationFailed\"] = \"PasskeyRegistrationFailed\";\n PasskeyErrorCode[\"PasskeyRetrievalFailed\"] = \"PasskeyRetrievalFailed\";\n // cancel / aborts\n PasskeyErrorCode[\"PasskeyRegistrationCanceled\"] = \"PasskeyRegistrationCanceled\";\n PasskeyErrorCode[\"PasskeyAuthenticationCanceled\"] = \"PasskeyAuthenticationCanceled\";\n PasskeyErrorCode[\"PasskeyOperationAborted\"] = \"PasskeyOperationAborted\";\n})($d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e || ($d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e = {}));\nconst $d08027fec3d3ccf3$var$notSupportedRecoverySuggestion = 'Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.';\nconst $d08027fec3d3ccf3$var$abortOrCancelRecoverySuggestion = 'User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.';\nconst $d08027fec3d3ccf3$var$misconfigurationRecoverySuggestion = 'Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.';\nconst $d08027fec3d3ccf3$var$passkeyErrorMap = {\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyNotSupported]: {\n message: 'Passkeys may not be supported on this device.',\n recoverySuggestion: $d08027fec3d3ccf3$var$notSupportedRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.InvalidPasskeyRegistrationOptions]: {\n message: 'Invalid passkey registration options.',\n recoverySuggestion: $d08027fec3d3ccf3$var$misconfigurationRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.InvalidPasskeyAuthenticationOptions]: {\n message: 'Invalid passkey authentication options.',\n recoverySuggestion: $d08027fec3d3ccf3$var$misconfigurationRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyRegistrationFailed]: {\n message: 'Device failed to create passkey.',\n recoverySuggestion: $d08027fec3d3ccf3$var$notSupportedRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyRetrievalFailed]: {\n message: 'Device failed to retrieve passkey.',\n recoverySuggestion: 'Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP.'\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyAlreadyExists]: {\n message: 'Passkey already exists in authenticator.',\n recoverySuggestion: 'Proceed with existing passkey or try again after deleting the credential.'\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyRegistrationCanceled]: {\n message: 'Passkey registration ceremony has been canceled.',\n recoverySuggestion: $d08027fec3d3ccf3$var$abortOrCancelRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyAuthenticationCanceled]: {\n message: 'Passkey authentication ceremony has been canceled.',\n recoverySuggestion: $d08027fec3d3ccf3$var$abortOrCancelRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyOperationAborted]: {\n message: 'Passkey operation has been aborted.',\n recoverySuggestion: $d08027fec3d3ccf3$var$abortOrCancelRecoverySuggestion\n },\n [$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.RelyingPartyMismatch]: {\n message: 'Relying party does not match current domain.',\n recoverySuggestion: 'Ensure relying party identifier matches current domain.'\n }\n};\nconst $d08027fec3d3ccf3$export$3145abf24cf8a54e = (0, $bggJy.createAssertionFunction)($d08027fec3d3ccf3$var$passkeyErrorMap, $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90);\n/**\n * Handle Passkey Authentication Errors\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */ const $d08027fec3d3ccf3$export$6abde9ceb8dfddc0 = (err)=>{\n if (err instanceof $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90) return err;\n if (err instanceof Error) {\n if (err.name === 'NotAllowedError') {\n const { message: message, recoverySuggestion: recoverySuggestion } = $d08027fec3d3ccf3$var$passkeyErrorMap[$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyAuthenticationCanceled];\n return new $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90({\n name: $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyAuthenticationCanceled,\n message: message,\n recoverySuggestion: recoverySuggestion,\n underlyingError: err\n });\n }\n }\n return $d08027fec3d3ccf3$var$handlePasskeyError(err);\n};\n/**\n * Handle Passkey Registration Errors\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */ const $d08027fec3d3ccf3$export$7460eb590a766e24 = (err)=>{\n if (err instanceof $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90) return err;\n if (err instanceof Error) {\n // Duplicate Passkey\n if (err.name === 'InvalidStateError') {\n const { message: message, recoverySuggestion: recoverySuggestion } = $d08027fec3d3ccf3$var$passkeyErrorMap[$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyAlreadyExists];\n return new $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90({\n name: $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyAlreadyExists,\n message: message,\n recoverySuggestion: recoverySuggestion,\n underlyingError: err\n });\n }\n // User Cancels Ceremony / Generic Catch All\n if (err.name === 'NotAllowedError') {\n const { message: message, recoverySuggestion: recoverySuggestion } = $d08027fec3d3ccf3$var$passkeyErrorMap[$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyRegistrationCanceled];\n return new $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90({\n name: $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyRegistrationCanceled,\n message: message,\n recoverySuggestion: recoverySuggestion,\n underlyingError: err\n });\n }\n }\n return $d08027fec3d3ccf3$var$handlePasskeyError(err);\n};\n/**\n * Handles Overlapping Passkey Errors Between Registration & Authentication\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */ const $d08027fec3d3ccf3$var$handlePasskeyError = (err)=>{\n if (err instanceof Error) {\n // Passkey Operation Aborted\n if (err.name === 'AbortError') {\n const { message: message, recoverySuggestion: recoverySuggestion } = $d08027fec3d3ccf3$var$passkeyErrorMap[$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyOperationAborted];\n return new $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90({\n name: $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.PasskeyOperationAborted,\n message: message,\n recoverySuggestion: recoverySuggestion,\n underlyingError: err\n });\n }\n // Relying Party / Domain Mismatch\n if (err.name === 'SecurityError') {\n const { message: message, recoverySuggestion: recoverySuggestion } = $d08027fec3d3ccf3$var$passkeyErrorMap[$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.RelyingPartyMismatch];\n return new $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90({\n name: $d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e.RelyingPartyMismatch,\n message: message,\n recoverySuggestion: recoverySuggestion,\n underlyingError: err\n });\n }\n }\n return new $d08027fec3d3ccf3$export$bf0fd5fd31fb5a90({\n name: (0, $8rSHg.AmplifyErrorCode).Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: err\n });\n};\n\n});\n\nparcelRegister(\"3fXpj\", function(module, exports) {\n\n$parcel$export(module.exports, \"getPasskey\", () => $6be855fabffe2ac3$export$d7f92bd7f1e366c1);\n\nvar $23mcB = parcelRequire(\"23mcB\");\n\nvar $lk459 = parcelRequire(\"lk459\");\n\nvar $4u189 = parcelRequire(\"4u189\");\n\nvar $eCia3 = parcelRequire(\"eCia3\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $6be855fabffe2ac3$export$d7f92bd7f1e366c1 = async (input)=>{\n try {\n const isPasskeySupported = (0, $lk459.getIsPasskeySupported)();\n (0, $23mcB.assertPasskeyError)(isPasskeySupported, (0, $23mcB.PasskeyErrorCode).PasskeyNotSupported);\n const passkeyGetOptions = (0, $4u189.deserializeJsonToPkcGetOptions)(input);\n const credential = await navigator.credentials.get({\n publicKey: passkeyGetOptions\n });\n (0, $eCia3.assertCredentialIsPkcWithAuthenticatorAssertionResponse)(credential);\n return (0, $4u189.serializePkcWithAssertionToJson)(credential);\n } catch (err) {\n throw (0, $23mcB.handlePasskeyAuthenticationError)(err);\n }\n};\n\n});\nparcelRegister(\"lk459\", function(module, exports) {\n\n$parcel$export(module.exports, \"getIsPasskeySupported\", () => $9915447356888d62$export$3b0e0bb0e9c22c1a);\n\nvar $a93i9 = parcelRequire(\"a93i9\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Determines if passkey is supported in current context\n * Will return false if executed in non-secure context\n * @returns boolean\n */ const $9915447356888d62$export$3b0e0bb0e9c22c1a = ()=>{\n return (0, $a93i9.isBrowser)() && window.isSecureContext && 'credentials' in navigator && typeof window.PublicKeyCredential === 'function';\n};\n\n});\n\nparcelRegister(\"4u189\", function(module, exports) {\n\n$parcel$export(module.exports, \"deserializeJsonToPkcGetOptions\", () => $89a0679f7bc4b028$export$d3f47ce866c52e8e);\n$parcel$export(module.exports, \"serializePkcWithAssertionToJson\", () => $89a0679f7bc4b028$export$1f22b133ac0d2a5);\n\nvar $gd5C0 = parcelRequire(\"gd5C0\");\n\nvar $jjzUG = parcelRequire(\"jjzUG\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deserializes Public Key Credential Creation Options JSON\n * @param input PasskeyCreateOptionsJson\n * @returns PublicKeyCredentialCreationOptions\n */ const $89a0679f7bc4b028$export$a8f43933ee13e976 = (input)=>{\n const userIdBuffer = (0, $jjzUG.convertBase64UrlToArrayBuffer)(input.user.id);\n const challengeBuffer = (0, $jjzUG.convertBase64UrlToArrayBuffer)(input.challenge);\n const excludeCredentialsWithBuffer = (input.excludeCredentials || []).map((excludeCred)=>({\n ...excludeCred,\n id: (0, $jjzUG.convertBase64UrlToArrayBuffer)(excludeCred.id)\n }));\n return {\n ...input,\n excludeCredentials: excludeCredentialsWithBuffer,\n challenge: challengeBuffer,\n user: {\n ...input.user,\n id: userIdBuffer\n }\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyCreateResult\n * @returns PasskeyCreateResultJson\n */ const $89a0679f7bc4b028$export$f686d838e2fa9da3 = (input)=>{\n const response = {\n clientDataJSON: (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.clientDataJSON),\n attestationObject: (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.attestationObject),\n transports: input.response.getTransports(),\n publicKeyAlgorithm: input.response.getPublicKeyAlgorithm(),\n authenticatorData: (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.getAuthenticatorData())\n };\n const publicKey = input.response.getPublicKey();\n if (publicKey) response.publicKey = (0, $gd5C0.convertArrayBufferToBase64Url)(publicKey);\n const resultJson = {\n type: input.type,\n id: input.id,\n rawId: (0, $gd5C0.convertArrayBufferToBase64Url)(input.rawId),\n clientExtensionResults: input.getClientExtensionResults(),\n response: response\n };\n if (input.authenticatorAttachment) resultJson.authenticatorAttachment = input.authenticatorAttachment;\n return resultJson;\n};\n/**\n * Deserializes Public Key Credential Get Options JSON\n * @param input PasskeyGetOptionsJson\n * @returns PublicKeyCredentialRequestOptions\n */ const $89a0679f7bc4b028$export$d3f47ce866c52e8e = (input)=>{\n const challengeBuffer = (0, $jjzUG.convertBase64UrlToArrayBuffer)(input.challenge);\n const allowedCredentialsWithBuffer = (input.allowCredentials || []).map((allowedCred)=>({\n ...allowedCred,\n id: (0, $jjzUG.convertBase64UrlToArrayBuffer)(allowedCred.id)\n }));\n return {\n ...input,\n challenge: challengeBuffer,\n allowCredentials: allowedCredentialsWithBuffer\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyGetResult\n * @returns PasskeyGetResultJson\n */ const $89a0679f7bc4b028$export$1f22b133ac0d2a5 = (input)=>{\n const response = {\n clientDataJSON: (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.clientDataJSON),\n authenticatorData: (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.authenticatorData),\n signature: (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.signature)\n };\n if (input.response.userHandle) response.userHandle = (0, $gd5C0.convertArrayBufferToBase64Url)(input.response.userHandle);\n const resultJson = {\n id: input.id,\n rawId: (0, $gd5C0.convertArrayBufferToBase64Url)(input.rawId),\n type: input.type,\n clientExtensionResults: input.getClientExtensionResults(),\n response: response\n };\n if (input.authenticatorAttachment) resultJson.authenticatorAttachment = input.authenticatorAttachment;\n return resultJson;\n};\n\n});\nparcelRegister(\"gd5C0\", function(module, exports) {\n\n$parcel$export(module.exports, \"convertArrayBufferToBase64Url\", () => $ea04d9a299f79266$export$442d4feb149fcd32);\n\nvar $ijwDq = parcelRequire(\"ijwDq\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// https://datatracker.ietf.org/doc/html/rfc4648#page-7\n/**\n * Converts an ArrayBuffer to a base64url encoded string\n * @param buffer - the ArrayBuffer instance of a Uint8Array\n * @returns string - a base64url encoded string\n */ const $ea04d9a299f79266$export$442d4feb149fcd32 = (buffer)=>{\n return (0, $ijwDq.base64Encoder).convert(new Uint8Array(buffer), {\n urlSafe: true,\n skipPadding: true\n });\n};\n\n});\nparcelRegister(\"ijwDq\", function(module, exports) {\n\n$parcel$export(module.exports, \"base64Encoder\", () => $a67be9353d05d3e6$export$695b149896bd3e2a);\n\nvar $dfMUF = parcelRequire(\"dfMUF\");\n\nvar $1AT8d = parcelRequire(\"1AT8d\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $a67be9353d05d3e6$export$695b149896bd3e2a = {\n /**\n * Convert input to base64-encoded string\n * @param input - string to convert to base64\n * @param options - encoding options that can optionally produce a base64url string\n * @returns base64-encoded string\n */ convert (input, options = {\n urlSafe: false,\n skipPadding: false\n }) {\n const inputStr = typeof input === 'string' ? input : (0, $1AT8d.bytesToString)(input);\n let encodedStr = (0, $dfMUF.getBtoa)()(inputStr);\n // urlSafe char replacement and skipPadding options conform to the base64url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#section-5\n if (options.urlSafe) encodedStr = encodedStr.replace(/\\+/g, '-').replace(/\\//g, '_');\n if (options.skipPadding) encodedStr = encodedStr.replace(/=/g, '');\n return encodedStr;\n }\n};\n\n});\nparcelRegister(\"1AT8d\", function(module, exports) {\n\n$parcel$export(module.exports, \"bytesToString\", () => $2388b4cedba94ebc$export$7c746b75f47c9c7d);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $2388b4cedba94ebc$export$7c746b75f47c9c7d(input) {\n return Array.from(input, (byte)=>String.fromCodePoint(byte)).join('');\n}\n\n});\n\n\n\nparcelRegister(\"jjzUG\", function(module, exports) {\n\n$parcel$export(module.exports, \"convertBase64UrlToArrayBuffer\", () => $26da68f5470f1f69$export$9cebd483a59f0168);\n\nvar $iLExi = parcelRequire(\"iLExi\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a base64url encoded string to an ArrayBuffer\n * @param base64url - a base64url encoded string\n * @returns ArrayBuffer\n */ const $26da68f5470f1f69$export$9cebd483a59f0168 = (base64url)=>{\n return Uint8Array.from((0, $iLExi.base64Decoder).convert(base64url, {\n urlSafe: true\n }), (x)=>x.charCodeAt(0)).buffer;\n};\n\n});\n\n\nparcelRegister(\"eCia3\", function(module, exports) {\n\n$parcel$export(module.exports, \"assertCredentialIsPkcWithAuthenticatorAssertionResponse\", () => $fbaa07247a5cfdde$export$4f19e511a89efed7);\n\nvar $23mcB = parcelRequire(\"23mcB\");\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $fbaa07247a5cfdde$export$c7806094d9c936a2(credential) {\n (0, $23mcB.assertPasskeyError)(credential && credential instanceof PublicKeyCredential && credential.response instanceof AuthenticatorAttestationResponse, (0, $23mcB.PasskeyErrorCode).PasskeyRegistrationFailed);\n}\nfunction $fbaa07247a5cfdde$export$4f19e511a89efed7(credential) {\n (0, $23mcB.assertPasskeyError)(credential && credential instanceof PublicKeyCredential && credential.response instanceof AuthenticatorAssertionResponse, (0, $23mcB.PasskeyErrorCode).PasskeyRetrievalFailed);\n}\n\n});\n\n\nparcelRegister(\"1oMYx\", function(module, exports) {\n\n$parcel$export(module.exports, \"getNewDeviceMetadata\", () => $139a547276a916a7$export$548ed8ad974a8b30);\n\nvar $ijwDq = parcelRequire(\"ijwDq\");\nvar $3DkEi = parcelRequire(\"3DkEi\");\n\n\n\n\n\n\n\n\nvar $ibiNz = parcelRequire(\"ibiNz\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $14Fuc = parcelRequire(\"14Fuc\");\n\nvar $gOOIy = parcelRequire(\"gOOIy\");\nparcelRequire(\"78v1Z\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * This function is used to kick off the device management flow.\n *\n * If an error is thrown while generating a hash device or calling the `ConfirmDevice`\n * client, then this API will ignore the error and return undefined. Otherwise the authentication\n * flow will not complete and the user won't be able to be signed in.\n *\n * @returns DeviceMetadata | undefined\n */ async function $139a547276a916a7$export$548ed8ad974a8b30({ userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint, newDeviceMetadata: newDeviceMetadata, accessToken: accessToken }) {\n if (!newDeviceMetadata) return undefined;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await (0, $14Fuc.getAuthenticationHelper)(userPoolName);\n const deviceKey = newDeviceMetadata?.DeviceKey;\n const deviceGroupKey = newDeviceMetadata?.DeviceGroupKey;\n try {\n await authenticationHelper.generateHashDevice(deviceGroupKey ?? '', deviceKey ?? '');\n } catch (errGenHash) {\n // TODO: log error here\n return undefined;\n }\n const deviceSecretVerifierConfig = {\n Salt: (0, $ijwDq.base64Encoder).convert((0, $gOOIy.getBytesFromHex)(authenticationHelper.getSaltToHashDevices())),\n PasswordVerifier: (0, $ijwDq.base64Encoder).convert((0, $gOOIy.getBytesFromHex)(authenticationHelper.getVerifierDevices()))\n };\n const randomPassword = authenticationHelper.getRandomPassword();\n try {\n const confirmDevice = (0, $ibiNz.createConfirmDeviceClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n await confirmDevice({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId)\n }, {\n AccessToken: accessToken,\n DeviceName: await (0, $3DkEi.getDeviceName)(),\n DeviceKey: newDeviceMetadata?.DeviceKey,\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig\n });\n return {\n deviceKey: deviceKey,\n deviceGroupKey: deviceGroupKey,\n randomPassword: randomPassword\n };\n } catch (error) {\n // TODO: log error here\n return undefined;\n }\n}\n\n});\nparcelRegister(\"3DkEi\", function(module, exports) {\n\n$parcel$export(module.exports, \"getDeviceName\", () => $f87660ead8de1984$export$98f0aedb14d75123);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Retrieves the device name using the User-Agent Client Hints API if available,\n * falling back to the traditional userAgent string if not.\n *\n * @returns {Promise} A promise that resolves with a string representing the device name.\n *\n * Example Output:\n * navigator.userAgentData:\n * 'macOS 14.2.1 arm macOS Not A(Brand/99.0.0.0;Google Chrome/121.0.6167.160;Chromium/121.0.6167.160'\n * navigator.userAgent:\n * 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0'\n */ const $f87660ead8de1984$export$98f0aedb14d75123 = async ()=>{\n const { userAgentData: userAgentData } = navigator;\n if (!userAgentData) return navigator.userAgent;\n const { platform: platform = '', platformVersion: platformVersion = '', model: model = '', architecture: architecture = '', fullVersionList: fullVersionList = [] } = await userAgentData.getHighEntropyValues([\n 'platform',\n 'platformVersion',\n 'architecture',\n 'model',\n 'fullVersionList'\n ]);\n const versionList = fullVersionList.map((v)=>`${v.brand}/${v.version}`).join(';');\n const deviceName = [\n platform,\n platformVersion,\n architecture,\n model,\n platform,\n versionList\n ].filter((value)=>value).join(' ');\n return deviceName || navigator.userAgent;\n};\n\n});\n\nparcelRegister(\"ibiNz\", function(module, exports) {\n\n$parcel$export(module.exports, \"createConfirmDeviceClient\", () => $d7dd34d7361c5e05$export$d88a63af6351a7c3);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $d7dd34d7361c5e05$export$d88a63af6351a7c3 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('ConfirmDevice'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\nparcelRegister(\"14Fuc\", function(module, exports) {\n\n$parcel$export(module.exports, \"getAuthenticationHelper\", () => $d15f25b735660378$export$47560e2dc89f678c);\n\nvar $ek3O0 = parcelRequire(\"ek3O0\");\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n\nvar $6kGvi = parcelRequire(\"6kGvi\");\n\nvar $3mAEj = parcelRequire(\"3mAEj\");\nparcelRequire(\"78v1Z\");\n\nvar $5msoD = parcelRequire(\"5msoD\");\n\nvar $cX45s = parcelRequire(\"cX45s\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a new {@link AuthenticationHelper} instance with randomly generated BigInteger seed\n *\n * @param userPoolName Cognito user pool name.\n * @returns An {@link AuthenticationHelper} instance.\n *\n * @internal\n */ const $d15f25b735660378$export$47560e2dc89f678c = async (userPoolName)=>{\n const N = new (0, $ok6jc.default)((0, $3mAEj.INIT_N), 16);\n const g = new (0, $ok6jc.default)('2', 16);\n const a = $d15f25b735660378$var$generateRandomBigInteger();\n const A = await (0, $6kGvi.calculateA)({\n a: a,\n g: g,\n N: N\n });\n return new (0, $ek3O0.default)({\n userPoolName: userPoolName,\n a: a,\n g: g,\n A: A,\n N: N\n });\n};\n/**\n * Generates a random BigInteger.\n *\n * @returns {BigInteger} a random value.\n */ const $d15f25b735660378$var$generateRandomBigInteger = ()=>{\n // This will be interpreted as a postive 128-bit integer\n const hexRandom = (0, $5msoD.getHexFromBytes)((0, $cX45s.getRandomBytes)(128));\n // There is no need to do randomBigInt.mod(this.N - 1) as N (3072-bit) is > 128 bytes (1024-bit)\n return new (0, $ok6jc.default)(hexRandom, 16);\n};\n\n});\nparcelRegister(\"ek3O0\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $760f4b32a6e27466$export$2e2bcd8739ae039);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $1lplT = parcelRequire(\"1lplT\");\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n\nvar $2qVuC = parcelRequire(\"2qVuC\");\n\nvar $hXRGV = parcelRequire(\"hXRGV\");\n\nvar $gOOIy = parcelRequire(\"gOOIy\");\n\nvar $1z3WR = parcelRequire(\"1z3WR\");\n\nvar $8LNxk = parcelRequire(\"8LNxk\");\n\nvar $5msoD = parcelRequire(\"5msoD\");\n\nvar $bL5rc = parcelRequire(\"bL5rc\");\n\nvar $dmuLi = parcelRequire(\"dmuLi\");\n\nvar $cX45s = parcelRequire(\"cX45s\");\n\nvar $gB3lp = parcelRequire(\"gB3lp\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/** @class */ class $760f4b32a6e27466$export$2e2bcd8739ae039 {\n constructor({ userPoolName: userPoolName, a: a, g: g, A: A, N: N }){\n this.encoder = (0, $1lplT.textEncoder);\n this.userPoolName = userPoolName;\n this.a = a;\n this.g = g;\n this.A = A;\n this.N = N;\n this.k = new (0, $ok6jc.default)((0, $8LNxk.getHashFromHex)(`${(0, $dmuLi.getPaddedHex)(N)}${(0, $dmuLi.getPaddedHex)(g)}`), 16);\n }\n /**\n * @returns {string} Generated random value included in password hash.\n */ getRandomPassword() {\n if (!this.randomPassword) throw new (0, $b62N7.AuthError)({\n name: 'EmptyBigIntegerRandomPassword',\n message: 'random password is empty'\n });\n return this.randomPassword;\n }\n /**\n * @returns {string} Generated random value included in devices hash.\n */ getSaltToHashDevices() {\n if (!this.saltToHashDevices) throw new (0, $b62N7.AuthError)({\n name: 'EmptyBigIntegersaltToHashDevices',\n message: 'saltToHashDevices is empty'\n });\n return this.saltToHashDevices;\n }\n /**\n * @returns {string} Value used to verify devices.\n */ getVerifierDevices() {\n if (!this.verifierDevices) throw new (0, $b62N7.AuthError)({\n name: 'EmptyBigIntegerVerifierDevices',\n message: 'verifyDevices is empty'\n });\n return this.verifierDevices;\n }\n /**\n * Generate salts and compute verifier.\n *\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n *\n * @returns {Promise}\n */ async generateHashDevice(deviceGroupKey, username) {\n this.randomPassword = (0, $gB3lp.getRandomString)();\n const combinedString = `${deviceGroupKey}${username}:${this.randomPassword}`;\n const hashedString = (0, $1z3WR.getHashFromData)(combinedString);\n const hexRandom = (0, $5msoD.getHexFromBytes)((0, $cX45s.getRandomBytes)(16));\n // The random hex will be unambiguously represented as a postive integer\n this.saltToHashDevices = (0, $dmuLi.getPaddedHex)(new (0, $ok6jc.default)(hexRandom, 16));\n return new Promise((resolve, reject)=>{\n this.g.modPow(new (0, $ok6jc.default)((0, $8LNxk.getHashFromHex)(this.saltToHashDevices + hashedString), 16), this.N, (err, result)=>{\n if (err) {\n reject(err);\n return;\n }\n this.verifierDevices = (0, $dmuLi.getPaddedHex)(result);\n resolve();\n });\n });\n }\n /**\n * Calculates the final HKDF key based on computed S value, computed U value and the key\n *\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {AuthBigInteger} B Server B value.\n * @param {AuthBigInteger} salt Generated salt.\n */ async getPasswordAuthenticationKey({ username: username, password: password, serverBValue: serverBValue, salt: salt }) {\n if (serverBValue.mod(this.N).equals((0, $ok6jc.default).ZERO)) throw new Error('B cannot be zero.');\n const U = (0, $hXRGV.calculateU)({\n A: this.A,\n B: serverBValue\n });\n const usernamePassword = `${this.userPoolName}${username}:${password}`;\n const usernamePasswordHash = (0, $1z3WR.getHashFromData)(usernamePassword);\n const x = new (0, $ok6jc.default)((0, $8LNxk.getHashFromHex)((0, $dmuLi.getPaddedHex)(salt) + usernamePasswordHash), 16);\n const S = await (0, $2qVuC.calculateS)({\n a: this.a,\n g: this.g,\n k: this.k,\n x: x,\n B: serverBValue,\n N: this.N,\n U: U\n });\n const context = this.encoder.convert('Caldera Derived Key');\n const spacer = this.encoder.convert(String.fromCharCode(1));\n const info = new Uint8Array(context.byteLength + spacer.byteLength);\n info.set(context, 0);\n info.set(spacer, context.byteLength);\n const hkdfKey = (0, $bL5rc.getHkdfKey)((0, $gOOIy.getBytesFromHex)((0, $dmuLi.getPaddedHex)(S)), (0, $gOOIy.getBytesFromHex)((0, $dmuLi.getPaddedHex)(U)), info);\n return hkdfKey;\n }\n}\n\n});\nparcelRegister(\"1lplT\", function(module, exports) {\n\n$parcel$export(module.exports, \"textEncoder\", () => $447c9600b59ec805$export$f5d75491a17f02c);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $447c9600b59ec805$export$f5d75491a17f02c = {\n convert (input) {\n return new TextEncoder().encode(input);\n }\n};\n\n});\n\nparcelRegister(\"ok6jc\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $269edab20268b88d$export$2e2bcd8739ae039);\n/* eslint-disable */ // @ts-nocheck -> BigInteger is already a vended utility\n// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */ // (public) Constructor\nfunction $269edab20268b88d$export$2e2bcd8739ae039(a, b) {\n if (a != null) this.fromString(a, b);\n}\n// return new, unset BigInteger\nfunction $269edab20268b88d$var$nbi() {\n return new $269edab20268b88d$export$2e2bcd8739ae039(null, null);\n}\n// Bits per digit\nlet $269edab20268b88d$var$dbits;\n// JavaScript engine analysis\nconst $269edab20268b88d$var$canary = 0xdeadbeefcafe;\nconst $269edab20268b88d$var$j_lm = ($269edab20268b88d$var$canary & 0xffffff) === 0xefcafe;\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction $269edab20268b88d$var$am1(i, x, w, j, c, n) {\n while(--n >= 0){\n const v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction $269edab20268b88d$var$am2(i, x, w, j, c, n) {\n const xl = x & 0x7fff;\n const xh = x >> 15;\n while(--n >= 0){\n let l = this[i] & 0x7fff;\n const h = this[i++] >> 15;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction $269edab20268b88d$var$am3(i, x, w, j, c, n) {\n const xl = x & 0x3fff;\n const xh = x >> 14;\n while(--n >= 0){\n let l = this[i] & 0x3fff;\n const h = this[i++] >> 14;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n}\nconst $269edab20268b88d$var$inBrowser = typeof navigator !== 'undefined';\nif ($269edab20268b88d$var$inBrowser && $269edab20268b88d$var$j_lm && navigator.appName === 'Microsoft Internet Explorer') {\n $269edab20268b88d$export$2e2bcd8739ae039.prototype.am = $269edab20268b88d$var$am2;\n $269edab20268b88d$var$dbits = 30;\n} else if ($269edab20268b88d$var$inBrowser && $269edab20268b88d$var$j_lm && navigator.appName !== 'Netscape') {\n $269edab20268b88d$export$2e2bcd8739ae039.prototype.am = $269edab20268b88d$var$am1;\n $269edab20268b88d$var$dbits = 26;\n} else {\n // Mozilla/Netscape seems to prefer am3\n $269edab20268b88d$export$2e2bcd8739ae039.prototype.am = $269edab20268b88d$var$am3;\n $269edab20268b88d$var$dbits = 28;\n}\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.DB = $269edab20268b88d$var$dbits;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.DM = (1 << $269edab20268b88d$var$dbits) - 1;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.DV = 1 << $269edab20268b88d$var$dbits;\nconst $269edab20268b88d$var$BI_FP = 52;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.FV = Math.pow(2, $269edab20268b88d$var$BI_FP);\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.F1 = $269edab20268b88d$var$BI_FP - $269edab20268b88d$var$dbits;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.F2 = 2 * $269edab20268b88d$var$dbits - $269edab20268b88d$var$BI_FP;\n// Digit conversions\nconst $269edab20268b88d$var$BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';\nconst $269edab20268b88d$var$BI_RC = [];\nlet $269edab20268b88d$var$rr, $269edab20268b88d$var$vv;\n$269edab20268b88d$var$rr = '0'.charCodeAt(0);\nfor($269edab20268b88d$var$vv = 0; $269edab20268b88d$var$vv <= 9; ++$269edab20268b88d$var$vv)$269edab20268b88d$var$BI_RC[$269edab20268b88d$var$rr++] = $269edab20268b88d$var$vv;\n$269edab20268b88d$var$rr = 'a'.charCodeAt(0);\nfor($269edab20268b88d$var$vv = 10; $269edab20268b88d$var$vv < 36; ++$269edab20268b88d$var$vv)$269edab20268b88d$var$BI_RC[$269edab20268b88d$var$rr++] = $269edab20268b88d$var$vv;\n$269edab20268b88d$var$rr = 'A'.charCodeAt(0);\nfor($269edab20268b88d$var$vv = 10; $269edab20268b88d$var$vv < 36; ++$269edab20268b88d$var$vv)$269edab20268b88d$var$BI_RC[$269edab20268b88d$var$rr++] = $269edab20268b88d$var$vv;\nfunction $269edab20268b88d$var$int2char(n) {\n return $269edab20268b88d$var$BI_RM.charAt(n);\n}\nfunction $269edab20268b88d$var$intAt(s, i) {\n const c = $269edab20268b88d$var$BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n}\n// (protected) copy this to r\nfunction $269edab20268b88d$var$bnpCopyTo(r) {\n for(let i = this.t - 1; i >= 0; --i)r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n// (protected) set from integer value x, -DV <= x < DV\nfunction $269edab20268b88d$var$bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0) this[0] = x;\n else if (x < -1) this[0] = x + this.DV;\n else this.t = 0;\n}\n// return bigint initialized to value\nfunction $269edab20268b88d$var$nbv(i) {\n const r = $269edab20268b88d$var$nbi();\n r.fromInt(i);\n return r;\n}\n// (protected) set from string and radix\nfunction $269edab20268b88d$var$bnpFromString(s, b) {\n let k;\n if (b === 16) k = 4;\n else if (b === 8) k = 3;\n else if (b === 2) k = 1;\n else if (b === 32) k = 5;\n else if (b === 4) k = 2;\n else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n this.t = 0;\n this.s = 0;\n let i = s.length;\n let mi = false;\n let sh = 0;\n while(--i >= 0){\n const x = $269edab20268b88d$var$intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) === '-') mi = true;\n continue;\n }\n mi = false;\n if (sh === 0) this[this.t++] = x;\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;\n this[this.t++] = x >> this.DB - sh;\n } else this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB) sh -= this.DB;\n }\n this.clamp();\n if (mi) $269edab20268b88d$export$2e2bcd8739ae039.ZERO.subTo(this, this);\n}\n// (protected) clamp off excess high words\nfunction $269edab20268b88d$var$bnpClamp() {\n const c = this.s & this.DM;\n while(this.t > 0 && this[this.t - 1] == c)--this.t;\n}\n// (public) return string representation in given radix\nfunction $269edab20268b88d$var$bnToString(b) {\n if (this.s < 0) return '-' + this.negate().toString(b);\n let k;\n if (b == 16) k = 4;\n else if (b === 8) k = 3;\n else if (b === 2) k = 1;\n else if (b === 32) k = 5;\n else if (b === 4) k = 2;\n else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n const km = (1 << k) - 1;\n let d;\n let m = false;\n let r = '';\n let i = this.t;\n let p = this.DB - i * this.DB % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = $269edab20268b88d$var$int2char(d);\n }\n while(i >= 0){\n if (p < k) {\n d = (this[i] & (1 << p) - 1) << k - p;\n d |= this[--i] >> (p += this.DB - k);\n } else {\n d = this[i] >> (p -= k) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) m = true;\n if (m) r += $269edab20268b88d$var$int2char(d);\n }\n }\n return m ? r : '0';\n}\n// (public) -this\nfunction $269edab20268b88d$var$bnNegate() {\n const r = $269edab20268b88d$var$nbi();\n $269edab20268b88d$export$2e2bcd8739ae039.ZERO.subTo(this, r);\n return r;\n}\n// (public) |this|\nfunction $269edab20268b88d$var$bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction $269edab20268b88d$var$bnCompareTo(a) {\n let r = this.s - a.s;\n if (r != 0) return r;\n let i = this.t;\n r = i - a.t;\n if (r != 0) return this.s < 0 ? -r : r;\n while(--i >= 0)if ((r = this[i] - a[i]) != 0) return r;\n return 0;\n}\n// returns bit length of the integer x\nfunction $269edab20268b88d$var$nbits(x) {\n let r = 1;\n let t;\n if ((t = x >>> 16) !== 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) !== 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) !== 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) !== 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) !== 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// (public) return the number of bits in \"this\"\nfunction $269edab20268b88d$var$bnBitLength() {\n if (this.t <= 0) return 0;\n return this.DB * (this.t - 1) + $269edab20268b88d$var$nbits(this[this.t - 1] ^ this.s & this.DM);\n}\n// (protected) r = this << n*DB\nfunction $269edab20268b88d$var$bnpDLShiftTo(n, r) {\n let i;\n for(i = this.t - 1; i >= 0; --i)r[i + n] = this[i];\n for(i = n - 1; i >= 0; --i)r[i] = 0;\n r.t = this.t + n;\n r.s = this.s;\n}\n// (protected) r = this >> n*DB\nfunction $269edab20268b88d$var$bnpDRShiftTo(n, r) {\n for(let i = n; i < this.t; ++i)r[i - n] = this[i];\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n}\n// (protected) r = this << n\nfunction $269edab20268b88d$var$bnpLShiftTo(n, r) {\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << cbs) - 1;\n const ds = Math.floor(n / this.DB);\n let c = this.s << bs & this.DM;\n let i;\n for(i = this.t - 1; i >= 0; --i){\n r[i + ds + 1] = this[i] >> cbs | c;\n c = (this[i] & bm) << bs;\n }\n for(i = ds - 1; i >= 0; --i)r[i] = 0;\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n}\n// (protected) r = this >> n\nfunction $269edab20268b88d$var$bnpRShiftTo(n, r) {\n r.s = this.s;\n const ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for(let i = ds + 1; i < this.t; ++i){\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n}\n// (protected) r = this - a\nfunction $269edab20268b88d$var$bnpSubTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while(i < m){\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while(i < this.t){\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while(i < a.t){\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c < -1) r[i++] = this.DV + c;\n else if (c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n}\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction $269edab20268b88d$var$bnpMultiplyTo(a, r) {\n const x = this.abs();\n const y = a.abs();\n let i = x.t;\n r.t = i + y.t;\n while(--i >= 0)r[i] = 0;\n for(i = 0; i < y.t; ++i)r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n r.s = 0;\n r.clamp();\n if (this.s !== a.s) $269edab20268b88d$export$2e2bcd8739ae039.ZERO.subTo(r, r);\n}\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction $269edab20268b88d$var$bnpSquareTo(r) {\n const x = this.abs();\n let i = r.t = 2 * x.t;\n while(--i >= 0)r[i] = 0;\n for(i = 0; i < x.t - 1; ++i){\n const c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n}\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction $269edab20268b88d$var$bnpDivRemTo(m, q, r) {\n const pm = m.abs();\n if (pm.t <= 0) return;\n const pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) q.fromInt(0);\n if (r != null) this.copyTo(r);\n return;\n }\n if (r === null) r = $269edab20268b88d$var$nbi();\n const y = $269edab20268b88d$var$nbi();\n const ts = this.s;\n const ms = m.s;\n const nsh = this.DB - $269edab20268b88d$var$nbits(pm[pm.t - 1]);\n // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n } else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n const ys = y.t;\n const y0 = y[ys - 1];\n if (y0 === 0) return;\n const yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n const d1 = this.FV / yt;\n const d2 = (1 << this.F1) / yt;\n const e = 1 << this.F2;\n let i = r.t;\n let j = i - ys;\n const t = q === null ? $269edab20268b88d$var$nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n $269edab20268b88d$export$2e2bcd8739ae039.ONE.dlShiftTo(ys, t);\n t.subTo(y, y);\n // \"negative\" y so we can replace sub with am later\n while(y.t < ys)y[y.t++] = 0;\n while(--j >= 0){\n // Estimate quotient digit\n let qd = r[--i] === y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while(r[i] < --qd)r.subTo(t, r);\n }\n }\n if (q !== null) {\n r.drShiftTo(ys, q);\n if (ts !== ms) $269edab20268b88d$export$2e2bcd8739ae039.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) r.rShiftTo(nsh, r);\n // Denormalize remainder\n if (ts < 0) $269edab20268b88d$export$2e2bcd8739ae039.ZERO.subTo(r, r);\n}\n// (public) this mod a\nfunction $269edab20268b88d$var$bnMod(a) {\n const r = $269edab20268b88d$var$nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo($269edab20268b88d$export$2e2bcd8739ae039.ZERO) > 0) a.subTo(r, r);\n return r;\n}\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction $269edab20268b88d$var$bnpInvDigit() {\n if (this.t < 1) return 0;\n const x = this[0];\n if ((x & 1) === 0) return 0;\n let y = x & 3;\n // y == 1/x mod 2^2\n y = y * (2 - (x & 0xf) * y) & 0xf;\n // y == 1/x mod 2^4\n y = y * (2 - (x & 0xff) * y) & 0xff;\n // y == 1/x mod 2^8\n y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff;\n // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = y * (2 - x * y % this.DV) % this.DV;\n // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return y > 0 ? this.DV - y : -y;\n}\nfunction $269edab20268b88d$var$bnEquals(a) {\n return this.compareTo(a) === 0;\n}\n// (protected) r = this + a\nfunction $269edab20268b88d$var$bnpAddTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while(i < m){\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while(i < this.t){\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while(i < a.t){\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c > 0) r[i++] = c;\n else if (c < -1) r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n}\n// (public) this + a\nfunction $269edab20268b88d$var$bnAdd(a) {\n const r = $269edab20268b88d$var$nbi();\n this.addTo(a, r);\n return r;\n}\n// (public) this - a\nfunction $269edab20268b88d$var$bnSubtract(a) {\n const r = $269edab20268b88d$var$nbi();\n this.subTo(a, r);\n return r;\n}\n// (public) this * a\nfunction $269edab20268b88d$var$bnMultiply(a) {\n const r = $269edab20268b88d$var$nbi();\n this.multiplyTo(a, r);\n return r;\n}\n// (public) this / a\nfunction $269edab20268b88d$var$bnDivide(a) {\n const r = $269edab20268b88d$var$nbi();\n this.divRemTo(a, r, null);\n return r;\n}\n// Montgomery reduction\nfunction $269edab20268b88d$var$Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << m.DB - 15) - 1;\n this.mt2 = 2 * m.t;\n}\n// xR mod m\nfunction $269edab20268b88d$var$montConvert(x) {\n const r = $269edab20268b88d$var$nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo($269edab20268b88d$export$2e2bcd8739ae039.ZERO) > 0) this.m.subTo(r, r);\n return r;\n}\n// x/R mod m\nfunction $269edab20268b88d$var$montRevert(x) {\n const r = $269edab20268b88d$var$nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n// x = x/R mod m (HAC 14.32)\nfunction $269edab20268b88d$var$montReduce(x) {\n while(x.t <= this.mt2)// pad x so am has enough room later\n x[x.t++] = 0;\n for(let i = 0; i < this.m.t; ++i){\n // faster way of calculating u0 = x[i]*mp mod DV\n let j = x[i] & 0x7fff;\n const u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) & x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while(x[j] >= x.DV){\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n}\n// r = \"x^2/R mod m\"; x != r\nfunction $269edab20268b88d$var$montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n}\n// r = \"xy/R mod m\"; x,y != r\nfunction $269edab20268b88d$var$montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n}\n$269edab20268b88d$var$Montgomery.prototype.convert = $269edab20268b88d$var$montConvert;\n$269edab20268b88d$var$Montgomery.prototype.revert = $269edab20268b88d$var$montRevert;\n$269edab20268b88d$var$Montgomery.prototype.reduce = $269edab20268b88d$var$montReduce;\n$269edab20268b88d$var$Montgomery.prototype.mulTo = $269edab20268b88d$var$montMulTo;\n$269edab20268b88d$var$Montgomery.prototype.sqrTo = $269edab20268b88d$var$montSqrTo;\n// (public) this^e % m (HAC 14.85)\nfunction $269edab20268b88d$var$bnModPow(e, m, callback) {\n let i = e.bitLength();\n let k;\n let r = $269edab20268b88d$var$nbv(1);\n const z = new $269edab20268b88d$var$Montgomery(m);\n if (i <= 0) return r;\n else if (i < 18) k = 1;\n else if (i < 48) k = 3;\n else if (i < 144) k = 4;\n else if (i < 768) k = 5;\n else k = 6;\n // precomputation\n const g = [];\n let n = 3;\n const k1 = k - 1;\n const km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n const g2 = $269edab20268b88d$var$nbi();\n z.sqrTo(g[1], g2);\n while(n <= km){\n g[n] = $269edab20268b88d$var$nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n let j = e.t - 1;\n let w;\n let is1 = true;\n let r2 = $269edab20268b88d$var$nbi();\n let t;\n i = $269edab20268b88d$var$nbits(e[j]) - 1;\n while(j >= 0){\n if (i >= k1) w = e[j] >> i - k1 & km;\n else {\n w = (e[j] & (1 << i + 1) - 1) << k1 - i;\n if (j > 0) w |= e[j - 1] >> this.DB + i - k1;\n }\n n = k;\n while((w & 1) === 0){\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n } else {\n while(n > 1){\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) z.sqrTo(r, r2);\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while(j >= 0 && (e[j] & 1 << i) === 0){\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n const result = z.revert(r);\n callback(null, result);\n return result;\n}\n// protected\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.copyTo = $269edab20268b88d$var$bnpCopyTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.fromInt = $269edab20268b88d$var$bnpFromInt;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.fromString = $269edab20268b88d$var$bnpFromString;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.clamp = $269edab20268b88d$var$bnpClamp;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.dlShiftTo = $269edab20268b88d$var$bnpDLShiftTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.drShiftTo = $269edab20268b88d$var$bnpDRShiftTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.lShiftTo = $269edab20268b88d$var$bnpLShiftTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.rShiftTo = $269edab20268b88d$var$bnpRShiftTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.subTo = $269edab20268b88d$var$bnpSubTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.multiplyTo = $269edab20268b88d$var$bnpMultiplyTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.squareTo = $269edab20268b88d$var$bnpSquareTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.divRemTo = $269edab20268b88d$var$bnpDivRemTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.invDigit = $269edab20268b88d$var$bnpInvDigit;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.addTo = $269edab20268b88d$var$bnpAddTo;\n// public\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.toString = $269edab20268b88d$var$bnToString;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.negate = $269edab20268b88d$var$bnNegate;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.abs = $269edab20268b88d$var$bnAbs;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.compareTo = $269edab20268b88d$var$bnCompareTo;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.bitLength = $269edab20268b88d$var$bnBitLength;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.mod = $269edab20268b88d$var$bnMod;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.equals = $269edab20268b88d$var$bnEquals;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.add = $269edab20268b88d$var$bnAdd;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.subtract = $269edab20268b88d$var$bnSubtract;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.multiply = $269edab20268b88d$var$bnMultiply;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.divide = $269edab20268b88d$var$bnDivide;\n$269edab20268b88d$export$2e2bcd8739ae039.prototype.modPow = $269edab20268b88d$var$bnModPow;\n// \"constants\"\n$269edab20268b88d$export$2e2bcd8739ae039.ZERO = $269edab20268b88d$var$nbv(0);\n$269edab20268b88d$export$2e2bcd8739ae039.ONE = $269edab20268b88d$var$nbv(1);\n\n});\n\nparcelRegister(\"2qVuC\", function(module, exports) {\n\n$parcel$export(module.exports, \"calculateS\", () => $945c853bac04b61f$export$f7340100dd3acd38);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ const $945c853bac04b61f$export$f7340100dd3acd38 = async ({ a: a, g: g, k: k, x: x, B: B, N: N, U: U })=>{\n return new Promise((resolve, reject)=>{\n g.modPow(x, N, (outerErr, outerResult)=>{\n if (outerErr) {\n reject(outerErr);\n return;\n }\n B.subtract(k.multiply(outerResult)).modPow(a.add(U.multiply(x)), N, (innerErr, innerResult)=>{\n if (innerErr) {\n reject(innerErr);\n return;\n }\n resolve(innerResult.mod(N));\n });\n });\n });\n};\n\n});\n\nparcelRegister(\"hXRGV\", function(module, exports) {\n\n$parcel$export(module.exports, \"calculateU\", () => $16d75dffdce97d80$export$e2f40082638513e7);\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n\nvar $8LNxk = parcelRequire(\"8LNxk\");\n\nvar $dmuLi = parcelRequire(\"dmuLi\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ const $16d75dffdce97d80$export$e2f40082638513e7 = ({ A: A, B: B })=>{\n const U = new (0, $ok6jc.default)((0, $8LNxk.getHashFromHex)((0, $dmuLi.getPaddedHex)(A) + (0, $dmuLi.getPaddedHex)(B)), 16);\n if (U.equals((0, $ok6jc.default).ZERO)) throw new Error('U cannot be zero.');\n return U;\n};\n\n});\nparcelRegister(\"8LNxk\", function(module, exports) {\n\n$parcel$export(module.exports, \"getHashFromHex\", () => $5452175c610a592a$export$8b112e065a8843a);\n\nvar $gOOIy = parcelRequire(\"gOOIy\");\n\nvar $1z3WR = parcelRequire(\"1z3WR\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculate a hash from a hex string\n * @param {string} hexStr Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */ const $5452175c610a592a$export$8b112e065a8843a = (hexStr)=>(0, $1z3WR.getHashFromData)((0, $gOOIy.getBytesFromHex)(hexStr));\n\n});\nparcelRegister(\"gOOIy\", function(module, exports) {\n\n$parcel$export(module.exports, \"getBytesFromHex\", () => $bb91d8c38bb50a76$export$b772e43c3daf2e7a);\n\nvar $3mAEj = parcelRequire(\"3mAEj\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\n */ const $bb91d8c38bb50a76$export$b772e43c3daf2e7a = (encoded)=>{\n if (encoded.length % 2 !== 0) throw new Error('Hex encoded strings must have an even number length');\n const out = new Uint8Array(encoded.length / 2);\n for(let i = 0; i < encoded.length; i += 2){\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in (0, $3mAEj.HEX_TO_SHORT)) out[i / 2] = (0, $3mAEj.HEX_TO_SHORT)[encodedByte];\n else throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n return out;\n};\n\n});\nparcelRegister(\"3mAEj\", function(module, exports) {\n\n$parcel$export(module.exports, \"INIT_N\", () => $7244f7f7c06e57df$export$baab4dd8c7240846);\n$parcel$export(module.exports, \"SHORT_TO_HEX\", () => $7244f7f7c06e57df$export$a0f75f7d2f3bd702);\n$parcel$export(module.exports, \"HEX_TO_SHORT\", () => $7244f7f7c06e57df$export$fcb552daf117d7e3);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $7244f7f7c06e57df$export$baab4dd8c7240846 = \"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF\";\nconst $7244f7f7c06e57df$export$a0f75f7d2f3bd702 = {};\nconst $7244f7f7c06e57df$export$fcb552daf117d7e3 = {};\nfor(let i = 0; i < 256; i++){\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) encodedByte = `0${encodedByte}`;\n $7244f7f7c06e57df$export$a0f75f7d2f3bd702[i] = encodedByte;\n $7244f7f7c06e57df$export$fcb552daf117d7e3[encodedByte] = i;\n}\n\n});\n\n\nparcelRegister(\"1z3WR\", function(module, exports) {\n\n$parcel$export(module.exports, \"getHashFromData\", () => $d21e32da99de5341$export$629ee8d7d3ebacd1);\nparcelRequire(\"78v1Z\");\nvar $4xNDb = parcelRequire(\"4xNDb\");\n\nvar $5msoD = parcelRequire(\"5msoD\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculate a hash from a `SourceData`\n * @param {SourceData} data Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */ const $d21e32da99de5341$export$629ee8d7d3ebacd1 = (data)=>{\n const sha256 = new (0, $4xNDb.Sha256)();\n sha256.update(data);\n const hashedData = sha256.digestSync();\n const hashHexFromUint8 = (0, $5msoD.getHexFromBytes)(hashedData);\n return new Array(64 - hashHexFromUint8.length).join('0') + hashHexFromUint8;\n};\n\n});\nparcelRegister(\"5msoD\", function(module, exports) {\n\n$parcel$export(module.exports, \"getHexFromBytes\", () => $dd5b862882054689$export$22a20ab34c1d7a2b);\n\nvar $3mAEj = parcelRequire(\"3mAEj\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */ const $dd5b862882054689$export$22a20ab34c1d7a2b = (bytes)=>{\n let out = '';\n for(let i = 0; i < bytes.byteLength; i++)out += (0, $3mAEj.SHORT_TO_HEX)[bytes[i]];\n return out;\n};\n\n});\n\n\n\nparcelRegister(\"dmuLi\", function(module, exports) {\n\n$parcel$export(module.exports, \"getPaddedHex\", () => $3d8d70f7a33f07e0$export$35d4ea07514a0402);\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Tests if a hex string has it most significant bit set (case-insensitive regex)\n */ const $3d8d70f7a33f07e0$var$HEX_MSB_REGEX = /^[89a-f]/i;\n/**\n * Returns an unambiguous, even-length hex string of the two's complement encoding of an integer.\n *\n * It is compatible with the hex encoding of Java's BigInteger's toByteArray(), wich returns a\n * byte array containing the two's-complement representation of a BigInteger. The array contains\n * the minimum number of bytes required to represent the BigInteger, including at least one sign bit.\n *\n * Examples showing how ambiguity is avoided by left padding with:\n * \t\"00\" (for positive values where the most-significant-bit is set)\n * \"FF\" (for negative values where the most-significant-bit is set)\n *\n * padHex(bigInteger.fromInt(-236)) === \"FF14\"\n * padHex(bigInteger.fromInt(20)) === \"14\"\n *\n * padHex(bigInteger.fromInt(-200)) === \"FF38\"\n * padHex(bigInteger.fromInt(56)) === \"38\"\n *\n * padHex(bigInteger.fromInt(-20)) === \"EC\"\n * padHex(bigInteger.fromInt(236)) === \"00EC\"\n *\n * padHex(bigInteger.fromInt(-56)) === \"C8\"\n * padHex(bigInteger.fromInt(200)) === \"00C8\"\n *\n * @param {AuthBigInteger} bigInt Number to encode.\n * @returns {String} even-length hex string of the two's complement encoding.\n */ const $3d8d70f7a33f07e0$export$35d4ea07514a0402 = (bigInt)=>{\n if (!(bigInt instanceof (0, $ok6jc.default))) throw new Error('Not a BigInteger');\n const isNegative = bigInt.compareTo((0, $ok6jc.default).ZERO) < 0;\n /* Get a hex string for abs(bigInt) */ let hexStr = bigInt.abs().toString(16);\n /* Pad hex to even length if needed */ hexStr = hexStr.length % 2 !== 0 ? `0${hexStr}` : hexStr;\n /* Prepend \"00\" if the most significant bit is set */ hexStr = $3d8d70f7a33f07e0$var$HEX_MSB_REGEX.test(hexStr) ? `00${hexStr}` : hexStr;\n if (isNegative) {\n /* Flip the bits of the representation */ const invertedNibbles = hexStr.split('').map((x)=>{\n const invertedNibble = ~parseInt(x, 16) & 0xf;\n return '0123456789ABCDEF'.charAt(invertedNibble);\n }).join('');\n /* After flipping the bits, add one to get the 2's complement representation */ const flippedBitsBI = new (0, $ok6jc.default)(invertedNibbles, 16).add((0, $ok6jc.default).ONE);\n hexStr = flippedBitsBI.toString(16);\n /*\n For hex strings starting with 'FF8', 'FF' can be dropped, e.g. 0xFFFF80=0xFF80=0x80=-128\n\n Any sequence of '1' bits on the left can always be substituted with a single '1' bit\n without changing the represented value.\n\n This only happens in the case when the input is 80...00\n */ if (hexStr.toUpperCase().startsWith('FF8')) hexStr = hexStr.substring(2);\n }\n return hexStr;\n};\n\n});\n\n\nparcelRegister(\"bL5rc\", function(module, exports) {\n\n$parcel$export(module.exports, \"getHkdfKey\", () => $28002858051d1a75$export$295a0a5429217d03);\nparcelRequire(\"78v1Z\");\nvar $4xNDb = parcelRequire(\"4xNDb\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Standard HKDF algorithm.\n *\n * @param {Uint8Array} ikm Input key material.\n * @param {Uint8Array} salt Salt value.\n * @param {Uint8Array} info Context and application specific info.\n *\n * @returns {Uint8Array} Strong key material.\n *\n * @internal\n */ const $28002858051d1a75$export$295a0a5429217d03 = (ikm, salt, info)=>{\n const awsCryptoHash = new (0, $4xNDb.Sha256)(salt);\n awsCryptoHash.update(ikm);\n const resultFromAWSCryptoPrk = awsCryptoHash.digestSync();\n const awsCryptoHashHmac = new (0, $4xNDb.Sha256)(resultFromAWSCryptoPrk);\n awsCryptoHashHmac.update(info);\n const resultFromAWSCryptoHmac = awsCryptoHashHmac.digestSync();\n const hashHexFromAWSCrypto = resultFromAWSCryptoHmac;\n return hashHexFromAWSCrypto.slice(0, 16);\n};\n\n});\n\nparcelRegister(\"cX45s\", function(module, exports) {\n\n$parcel$export(module.exports, \"getRandomBytes\", () => $ea26a5d759f277cb$export$763d6fc7c4b5dc52);\n\nvar $4bS7L = parcelRequire(\"4bS7L\");\n\nvar $gOOIy = parcelRequire(\"gOOIy\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a Uint8Array with a sequence of random nBytes\n *\n * @param {number} nBytes\n * @returns {Uint8Array} fixed-length sequence of random bytes\n */ const $ea26a5d759f277cb$export$763d6fc7c4b5dc52 = (nBytes)=>{\n const str = new (0, $4bS7L.WordArray)().random(nBytes).toString();\n return (0, $gOOIy.getBytesFromHex)(str);\n};\n\n});\nparcelRegister(\"4bS7L\", function(module, exports) {\n\n$parcel$export(module.exports, \"WordArray\", () => $cb70c0153e6ac4fa$export$4cd4919e303276a6);\n\nvar $h5M04 = parcelRequire(\"h5M04\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */ function $cb70c0153e6ac4fa$var$hexStringify(wordArray) {\n // Shortcuts\n const { words: words } = wordArray;\n const { sigBytes: sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for(let i = 0; i < sigBytes; i++){\n const bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nclass $cb70c0153e6ac4fa$export$4cd4919e303276a6 {\n constructor(words, sigBytes){\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) this.sigBytes = sigBytes;\n else this.sigBytes = Words.length * 4;\n }\n random(nBytes) {\n const words = [];\n for(let i = 0; i < nBytes; i += 4)words.push((0, $h5M04.cryptoSecureRandomInt)());\n return new $cb70c0153e6ac4fa$export$4cd4919e303276a6(words, nBytes);\n }\n toString() {\n return $cb70c0153e6ac4fa$var$hexStringify(this);\n }\n}\n\n});\nparcelRegister(\"h5M04\", function(module, exports) {\n\n$parcel$export(module.exports, \"cryptoSecureRandomInt\", () => $5b803445a1f5d830$export$d265930babe23ca5);\n\nvar $dfMUF = parcelRequire(\"dfMUF\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/*\n * Cryptographically secure pseudorandom number generator\n * As Math.random() is cryptographically not safe to use\n */ function $5b803445a1f5d830$export$d265930babe23ca5() {\n const crypto = (0, $dfMUF.getCrypto)();\n const randomResult = crypto.getRandomValues(new Uint32Array(1))[0];\n return randomResult;\n}\n\n});\n\n\n\nparcelRegister(\"gB3lp\", function(module, exports) {\n\n$parcel$export(module.exports, \"getRandomString\", () => $92410000a09bb1b4$export$8c487394e1c35fbe);\n\nvar $ijwDq = parcelRequire(\"ijwDq\");\n\nvar $cX45s = parcelRequire(\"cX45s\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Helper function to generate a random string\n * @returns {string} a random value.\n *\n * @internal\n */ const $92410000a09bb1b4$export$8c487394e1c35fbe = ()=>(0, $ijwDq.base64Encoder).convert((0, $cX45s.getRandomBytes)(40));\n\n});\n\n\nparcelRegister(\"6kGvi\", function(module, exports) {\n\n$parcel$export(module.exports, \"calculateA\", () => $8c72c04ce2eadc2a$export$53a55138f9e96c65);\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */ const $8c72c04ce2eadc2a$export$53a55138f9e96c65 = async ({ a: a, g: g, N: N })=>{\n return new Promise((resolve, reject)=>{\n g.modPow(a, N, (err, A)=>{\n if (err) {\n reject(err);\n return;\n }\n if (A.mod(N).equals((0, $ok6jc.default).ZERO)) {\n reject(new Error('Illegal parameter. A mod N cannot be 0.'));\n return;\n }\n resolve(A);\n });\n });\n};\n\n});\n\n\n\n\nparcelRegister(\"85LUF\", function(module, exports) {\n\n$parcel$export(module.exports, \"handlePasswordSRP\", () => $cef49f7d7f833655$export$169bd15774e46c56);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $14Fuc = parcelRequire(\"14Fuc\");\n\nparcelRequire(\"78v1Z\");\n\nvar $4FP28 = parcelRequire(\"4FP28\");\n\n\n\n\n\n\n\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $gGTf9 = parcelRequire(\"gGTf9\");\n\nvar $eL1Oc = parcelRequire(\"eL1Oc\");\n\nvar $ePagu = parcelRequire(\"ePagu\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the Password SRP (Secure Remote Password) authentication flow.\n * This function can be used with both USER_SRP_AUTH and USER_AUTH flows.\n *\n * @param {Object} params - The parameters for the Password SRP authentication\n * @param {string} params.username - The username for authentication\n * @param {string} params.password - The user's password\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Token orchestrator for managing auth tokens\n * @param {AuthFlowType} params.authFlow - The type of authentication flow ('USER_SRP_AUTH' or 'USER_AUTH')\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred challenge type when using USER_AUTH flow\n *\n * @returns {Promise} The authentication response\n */ async function $cef49f7d7f833655$export$169bd15774e46c56({ username: username, password: password, clientMetadata: clientMetadata, config: config, tokenOrchestrator: tokenOrchestrator, authFlow: authFlow, preferredChallenge: preferredChallenge }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await (0, $14Fuc.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16)\n };\n if (authFlow === 'USER_AUTH' && preferredChallenge) authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReq = {\n AuthFlow: authFlow,\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const initiateAuth = (0, $4FP28.createInitiateAuthClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const resp = await initiateAuth({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignIn)\n }, jsonReq);\n const { ChallengeParameters: challengeParameters, Session: session } = resp;\n const activeUsername = challengeParameters?.USERNAME ?? username;\n (0, $ePagu.setActiveSignInUsername)(activeUsername);\n if (resp.ChallengeName === 'PASSWORD_VERIFIER') return (0, $eL1Oc.retryOnResourceNotFoundException)((0, $gGTf9.handlePasswordVerifierChallenge), [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator\n ], activeUsername, tokenOrchestrator);\n return resp;\n}\n\n});\nparcelRegister(\"gGTf9\", function(module, exports) {\n\n$parcel$export(module.exports, \"handlePasswordVerifierChallenge\", () => $fcc86b81e031e695$export$7f7b64167822fe34);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\n\n\n\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n\nparcelRequire(\"78v1Z\");\n\nvar $3mpPC = parcelRequire(\"3mpPC\");\n\nvar $k62lC = parcelRequire(\"k62lC\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $SXwmC = parcelRequire(\"SXwmC\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function $fcc86b81e031e695$export$7f7b64167822fe34(password, challengeParameters, clientMetadata, session, authenticationHelper, config, tokenOrchestrator) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const serverBValue = new (0, $ok6jc.default)(challengeParameters?.SRP_B, 16);\n const salt = new (0, $ok6jc.default)(challengeParameters?.SALT, 16);\n const username = challengeParameters?.USER_ID_FOR_SRP;\n if (!username) throw new (0, $b62N7.AuthError)({\n name: 'EmptyUserIdForSRPException',\n message: 'USER_ID_FOR_SRP was not found in challengeParameters'\n });\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username: username,\n password: password,\n serverBValue: serverBValue,\n salt: salt\n });\n const dateNow = (0, $3mpPC.getNowString)();\n const challengeResponses = {\n USERNAME: username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: (0, $k62lC.getSignatureString)({\n username: username,\n userPoolName: userPoolName,\n challengeParameters: challengeParameters,\n dateNow: dateNow,\n hkdf: hkdf\n })\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId)\n }, jsonReqResponseChallenge);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') return (0, $SXwmC.handleDeviceSRPAuth)({\n username: username,\n config: config,\n clientMetadata: clientMetadata,\n session: response.Session,\n tokenOrchestrator: tokenOrchestrator\n });\n return response;\n}\n\n});\nparcelRegister(\"3mpPC\", function(module, exports) {\n\n$parcel$export(module.exports, \"getNowString\", () => $8c823c7638666426$export$218a6e05f05aec48);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $8c823c7638666426$var$MONTH_NAMES = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n];\nconst $8c823c7638666426$var$WEEK_NAMES = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat'\n];\nconst $8c823c7638666426$export$218a6e05f05aec48 = ()=>{\n const now = new Date();\n const weekDay = $8c823c7638666426$var$WEEK_NAMES[now.getUTCDay()];\n const month = $8c823c7638666426$var$MONTH_NAMES[now.getUTCMonth()];\n const day = now.getUTCDate();\n let hours = now.getUTCHours();\n if (hours < 10) hours = `0${hours}`;\n let minutes = now.getUTCMinutes();\n if (minutes < 10) minutes = `0${minutes}`;\n let seconds = now.getUTCSeconds();\n if (seconds < 10) seconds = `0${seconds}`;\n const year = now.getUTCFullYear();\n // ddd MMM D HH:mm:ss UTC YYYY\n const dateNow = `${weekDay} ${month} ${day} ${hours}:${minutes}:${seconds} UTC ${year}`;\n return dateNow;\n};\n\n});\n\nparcelRegister(\"k62lC\", function(module, exports) {\n\n$parcel$export(module.exports, \"getSignatureString\", () => $e417beecdfa0e838$export$577b7d8a4f1b23fd);\nparcelRequire(\"78v1Z\");\nvar $4xNDb = parcelRequire(\"4xNDb\");\n\nvar $iLExi = parcelRequire(\"iLExi\");\nvar $ijwDq = parcelRequire(\"ijwDq\");\n\nvar $1lplT = parcelRequire(\"1lplT\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $e417beecdfa0e838$export$577b7d8a4f1b23fd = ({ userPoolName: userPoolName, username: username, challengeParameters: challengeParameters, dateNow: dateNow, hkdf: hkdf })=>{\n const bufUPIDaToB = (0, $1lplT.textEncoder).convert(userPoolName);\n const bufUNaToB = (0, $1lplT.textEncoder).convert(username);\n const bufSBaToB = $e417beecdfa0e838$var$urlB64ToUint8Array(challengeParameters.SECRET_BLOCK);\n const bufDNaToB = (0, $1lplT.textEncoder).convert(dateNow);\n const bufConcat = new Uint8Array(bufUPIDaToB.byteLength + bufUNaToB.byteLength + bufSBaToB.byteLength + bufDNaToB.byteLength);\n bufConcat.set(bufUPIDaToB, 0);\n bufConcat.set(bufUNaToB, bufUPIDaToB.byteLength);\n bufConcat.set(bufSBaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength);\n bufConcat.set(bufDNaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength + bufSBaToB.byteLength);\n const awsCryptoHash = new (0, $4xNDb.Sha256)(hkdf);\n awsCryptoHash.update(bufConcat);\n const resultFromAWSCrypto = awsCryptoHash.digestSync();\n const signatureString = (0, $ijwDq.base64Encoder).convert(resultFromAWSCrypto);\n return signatureString;\n};\nconst $e417beecdfa0e838$var$urlB64ToUint8Array = (base64String)=>{\n const padding = '='.repeat((4 - base64String.length % 4) % 4);\n const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');\n const rawData = (0, $iLExi.base64Decoder).convert(base64);\n const outputArray = new Uint8Array(rawData.length);\n for(let i = 0; i < rawData.length; ++i)outputArray[i] = rawData.charCodeAt(i);\n return outputArray;\n};\n\n});\n\nparcelRegister(\"SXwmC\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleDeviceSRPAuth\", () => $ec7a9c80addbf1f8$export$18ec6b77c0b7fafe);\n\n\n\n\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\nvar $14Fuc = parcelRequire(\"14Fuc\");\n\n\nvar $3mpPC = parcelRequire(\"3mpPC\");\n\nvar $k62lC = parcelRequire(\"k62lC\");\n\nvar $ok6jc = parcelRequire(\"ok6jc\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function $ec7a9c80addbf1f8$export$18ec6b77c0b7fafe({ username: username, config: config, clientMetadata: clientMetadata, session: session, tokenOrchestrator: tokenOrchestrator }) {\n const { userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint } = config;\n const clientId = config.userPoolClientId;\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n (0, $kOfpC.assertDeviceMetadata)(deviceMetadata);\n const authenticationHelper = await (0, $14Fuc.getAuthenticationHelper)(deviceMetadata.deviceGroupKey);\n const challengeResponses = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n DEVICE_KEY: deviceMetadata.deviceKey\n };\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: clientId,\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { ChallengeParameters: respondedChallengeParameters, Session: Session } = await respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId)\n }, jsonReqResponseChallenge);\n return $ec7a9c80addbf1f8$var$handleDevicePasswordVerifier(username, respondedChallengeParameters, clientMetadata, Session, authenticationHelper, config, tokenOrchestrator);\n}\nasync function $ec7a9c80addbf1f8$var$handleDevicePasswordVerifier(username, challengeParameters, clientMetadata, session, authenticationHelper, { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint }, tokenOrchestrator) {\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n (0, $kOfpC.assertDeviceMetadata)(deviceMetadata);\n const serverBValue = new (0, $ok6jc.default)(challengeParameters?.SRP_B, 16);\n const salt = new (0, $ok6jc.default)(challengeParameters?.SALT, 16);\n const { deviceKey: deviceKey } = deviceMetadata;\n const { deviceGroupKey: deviceGroupKey } = deviceMetadata;\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username: deviceMetadata.deviceKey,\n password: deviceMetadata.randomPassword,\n serverBValue: serverBValue,\n salt: salt\n });\n const dateNow = (0, $3mpPC.getNowString)();\n const challengeResponses = {\n USERNAME: challengeParameters?.USERNAME ?? username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: (0, $k62lC.getSignatureString)({\n username: deviceKey,\n userPoolName: deviceGroupKey,\n challengeParameters: challengeParameters,\n dateNow: dateNow,\n hkdf: hkdf\n }),\n DEVICE_KEY: deviceKey\n };\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: userPoolClientId,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n UserContextData: UserContextData\n };\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId)\n }, jsonReqResponseChallenge);\n}\n\n});\n\n\nparcelRegister(\"eL1Oc\", function(module, exports) {\n\n$parcel$export(module.exports, \"retryOnResourceNotFoundException\", () => $428e905853406c74$export$30f932fe98713ccc);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * It will retry the function if the error is a `ResourceNotFoundException` and\n * will clean the device keys stored in the storage mechanism.\n *\n */ async function $428e905853406c74$export$30f932fe98713ccc(func, args, username, tokenOrchestrator) {\n try {\n return await func(...args);\n } catch (error) {\n if (error instanceof (0, $b62N7.AuthError) && error.name === 'ResourceNotFoundException' && error.message.includes('Device does not exist.')) {\n await tokenOrchestrator.clearDeviceMetadata(username);\n return func(...args);\n }\n throw error;\n }\n}\n\n});\n\nparcelRegister(\"ePagu\", function(module, exports) {\n\n$parcel$export(module.exports, \"setActiveSignInUsername\", () => $4b4488e0c553cfd2$export$fecfbc200868d412);\n\n\nvar $71859 = parcelRequire(\"71859\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $4b4488e0c553cfd2$export$fecfbc200868d412(username) {\n const { dispatch: dispatch } = (0, $71859.signInStore);\n dispatch({\n type: 'SET_USERNAME',\n value: username\n });\n}\n\n});\n\n\nparcelRegister(\"Es9Vl\", function(module, exports) {\n\n$parcel$export(module.exports, \"initiateSelectedChallenge\", () => $a957b41983199458$export$4eb37109154e77c1);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\n\n\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response for authentication.\n * Initiates the selected authentication challenge based on user choice.\n *\n * @param {Object} params - The parameters for handling the selected challenge\n * @param {string} params.username - The username for authentication\n * @param {string} params.session - The current authentication session token\n * @param {string} params.selectedChallenge - The challenge type selected by the user\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n *\n * @returns {Promise} The challenge response\n */ async function $a957b41983199458$export$4eb37109154e77c1({ username: username, session: session, selectedChallenge: selectedChallenge, config: config, clientMetadata: clientMetadata }) {\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: config.userPoolEndpoint\n })\n });\n return respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(config.userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: {\n USERNAME: username,\n ANSWER: selectedChallenge\n },\n ClientId: config.userPoolClientId,\n Session: session,\n ClientMetadata: clientMetadata\n });\n}\n\n});\n\nparcelRegister(\"6CDe7\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleSelectChallengeWithPassword\", () => $fe9378541d191193$export$cca550d6560f23b8);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\n\n\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $ePagu = parcelRequire(\"ePagu\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password authentication.\n * This function combines the SELECT_CHALLENGE flow with standard password authentication.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n *\n * @returns {Promise} The challenge response\n */ async function $fe9378541d191193$export$cca550d6560f23b8(username, password, clientMetadata, config, session) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const authParameters = {\n ANSWER: 'PASSWORD',\n USERNAME: username,\n PASSWORD: password\n };\n const userContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n (0, $ePagu.setActiveSignInUsername)(activeUsername);\n return response;\n}\n\n});\n\nparcelRegister(\"9uTeX\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleSelectChallengeWithPasswordSRP\", () => $bec1e93568b5a0d4$export$e496ff225fdec499);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\n\n\n\n\n\n\n\nvar $cTNcW = parcelRequire(\"cTNcW\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $14Fuc = parcelRequire(\"14Fuc\");\n\nparcelRequire(\"78v1Z\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $ePagu = parcelRequire(\"ePagu\");\n\nvar $eL1Oc = parcelRequire(\"eL1Oc\");\n\nvar $gGTf9 = parcelRequire(\"gGTf9\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password SRP authentication.\n * This function combines the SELECT_CHALLENGE flow with Password SRP protocol.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n * @param {AuthTokenOrchestrator} tokenOrchestrator - Token orchestrator for managing auth tokens\n *\n * @returns {Promise} The challenge response\n */ async function $bec1e93568b5a0d4$export$e496ff225fdec499(username, password, clientMetadata, config, session, tokenOrchestrator) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await (0, $14Fuc.getAuthenticationHelper)(userPoolName);\n const authParameters = {\n ANSWER: 'PASSWORD_SRP',\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16)\n };\n const userContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const respondToAuthChallenge = (0, $cTNcW.createRespondToAuthChallengeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await respondToAuthChallenge({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignIn)\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n (0, $ePagu.setActiveSignInUsername)(activeUsername);\n if (response.ChallengeName === 'PASSWORD_VERIFIER') return (0, $eL1Oc.retryOnResourceNotFoundException)((0, $gGTf9.handlePasswordVerifierChallenge), [\n password,\n response.ChallengeParameters,\n clientMetadata,\n response.Session,\n authenticationHelper,\n config,\n tokenOrchestrator\n ], activeUsername, tokenOrchestrator);\n return response;\n}\n\n});\n\n\nparcelRegister(\"2ob6P\", function(module, exports) {\n\n$parcel$export(module.exports, \"signInWithCustomAuth\", () => $451baf7edf1404bd$export$7f948971bcf643ff);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\nvar $eL1Oc = parcelRequire(\"eL1Oc\");\n\nvar $1oMYx = parcelRequire(\"1oMYx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using a custom authentication flow without password\n *\n * @param input - The SignInWithCustomAuthInput object\n * @returns AuthSignInResult\n * @throws service: {@link InitiateAuthException } - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws SignInWithCustomAuthOutput - Thrown when the token provider config is invalid.\n */ async function $451baf7edf1404bd$export$7f948971bcf643ff(input) {\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { username: username, password: password, options: options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITHOUT_SRP'\n };\n const metadata = options?.clientMetadata;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignInUsername);\n (0, $7XpgE.assertValidationError)(!password, (0, $ewkqX.AuthValidationErrorCode).CustomAuthSignInPassword);\n try {\n const { ChallengeName: retriedChallengeName, ChallengeParameters: retiredChallengeParameters, AuthenticationResult: AuthenticationResult, Session: Session } = await (0, $eL1Oc.retryOnResourceNotFoundException)((0, $4DGDz.handleCustomAuthFlowWithoutSRP), [\n username,\n metadata,\n authConfig,\n (0, $54W3M.tokenOrchestrator)\n ], username, (0, $54W3M.tokenOrchestrator));\n const activeUsername = (0, $4DGDz.getActiveSignInUsername)(username);\n // sets up local state used during the sign-in process\n (0, $71859.setActiveSignInState)({\n signInSession: Session,\n username: activeUsername,\n challengeName: retriedChallengeName,\n signInDetails: signInDetails\n });\n if (AuthenticationResult) {\n await (0, $eQv6f.cacheCognitoTokens)({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await (0, $1oMYx.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken\n }),\n signInDetails: signInDetails\n });\n (0, $71859.resetActiveSignInState)();\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n return {\n isSignedIn: true,\n nextStep: {\n signInStep: 'DONE'\n }\n };\n }\n return (0, $4DGDz.getSignInResult)({\n challengeName: retriedChallengeName,\n challengeParameters: retiredChallengeParameters\n });\n } catch (error) {\n (0, $71859.resetActiveSignInState)();\n (0, $iNzmv.assertServiceError)(error);\n const result = (0, $4DGDz.getSignInResultFromError)(error.name);\n if (result) return result;\n throw error;\n }\n}\n\n});\n\nparcelRegister(\"hfsLE\", function(module, exports) {\n\n$parcel$export(module.exports, \"signInWithCustomSRPAuth\", () => $cd166219c01c9bb4$export$2c0317ed1bbb0787);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\nvar $1oMYx = parcelRequire(\"1oMYx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using a custom authentication flow with SRP\n *\n * @param input - The SignInWithCustomSRPAuthInput object\n * @returns SignInWithCustomSRPAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito\n * service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $cd166219c01c9bb4$export$2c0317ed1bbb0787(input) {\n const { username: username, password: password, options: options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITH_SRP'\n };\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const metadata = options?.clientMetadata;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignInUsername);\n (0, $7XpgE.assertValidationError)(!!password, (0, $ewkqX.AuthValidationErrorCode).EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult: AuthenticationResult, Session: Session } = await (0, $4DGDz.handleCustomSRPAuthFlow)(username, password, metadata, authConfig, (0, $54W3M.tokenOrchestrator));\n const activeUsername = (0, $4DGDz.getActiveSignInUsername)(username);\n // sets up local state used during the sign-in process\n (0, $71859.setActiveSignInState)({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails: signInDetails\n });\n if (AuthenticationResult) {\n await (0, $eQv6f.cacheCognitoTokens)({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await (0, $1oMYx.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken\n }),\n signInDetails: signInDetails\n });\n (0, $71859.resetActiveSignInState)();\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n return {\n isSignedIn: true,\n nextStep: {\n signInStep: 'DONE'\n }\n };\n }\n return (0, $4DGDz.getSignInResult)({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters\n });\n } catch (error) {\n (0, $71859.resetActiveSignInState)();\n (0, $iNzmv.assertServiceError)(error);\n const result = (0, $4DGDz.getSignInResultFromError)(error.name);\n if (result) return result;\n throw error;\n }\n}\n\n});\n\nparcelRegister(\"aplbo\", function(module, exports) {\n\n$parcel$export(module.exports, \"signInWithSRP\", () => $516e29f1528090e0$export$728178cf826a5ab9);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\nvar $1oMYx = parcelRequire(\"1oMYx\");\n\nvar $epZMx = parcelRequire(\"epZMx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in\n *\n * @param input - The SignInWithSRPInput object\n * @returns SignInWithSRPOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $516e29f1528090e0$export$728178cf826a5ab9(input) {\n const { username: username, password: password } = input;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_SRP_AUTH'\n };\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const clientMetaData = input.options?.clientMetadata;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignInUsername);\n (0, $7XpgE.assertValidationError)(!!password, (0, $ewkqX.AuthValidationErrorCode).EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult: AuthenticationResult, Session: Session } = await (0, $4DGDz.handleUserSRPAuthFlow)(username, password, clientMetaData, authConfig, (0, $54W3M.tokenOrchestrator));\n const activeUsername = (0, $4DGDz.getActiveSignInUsername)(username);\n // sets up local state used during the sign-in process\n (0, $71859.setActiveSignInState)({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails: signInDetails\n });\n if (AuthenticationResult) {\n await (0, $eQv6f.cacheCognitoTokens)({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await (0, $1oMYx.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken\n }),\n signInDetails: signInDetails\n });\n (0, $71859.resetActiveSignInState)();\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n (0, $epZMx.resetAutoSignIn)();\n return {\n isSignedIn: true,\n nextStep: {\n signInStep: 'DONE'\n }\n };\n }\n return (0, $4DGDz.getSignInResult)({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters\n });\n } catch (error) {\n (0, $71859.resetActiveSignInState)();\n (0, $epZMx.resetAutoSignIn)();\n (0, $iNzmv.assertServiceError)(error);\n const result = (0, $4DGDz.getSignInResultFromError)(error.name);\n if (result) return result;\n throw error;\n }\n}\n\n});\nparcelRegister(\"epZMx\", function(module, exports) {\n\n$parcel$export(module.exports, \"setAutoSignIn\", () => $0f083c64fe957751$export$7dcbf67a23c27835);\n$parcel$export(module.exports, \"resetAutoSignIn\", () => $0f083c64fe957751$export$1ffa2742ce5c589b);\n\nvar $5XcLh = parcelRequire(\"5XcLh\");\n\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $0f083c64fe957751$var$initialAutoSignIn = async ()=>{\n throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.AUTO_SIGN_IN_EXCEPTION),\n message: 'The autoSignIn flow has not started, or has been cancelled/completed.',\n recoverySuggestion: 'Please try to use the signIn API or log out before starting a new autoSignIn flow.'\n });\n};\n/**\n * Signs a user in automatically after finishing the sign-up process.\n *\n * This API will automatically sign a user in if the autoSignIn flow has been completed in the following cases:\n * - User confirmed their account with a verification code sent to their phone or email (default option).\n * - User confirmed their account with a verification link sent to their phone or email. In order to\n * enable this option you need to go to the Amazon Cognito [console](https://aws.amazon.com/pm/cognito),\n * look for your userpool, then go to the `Messaging` tab and enable `link` mode inside the `Verification message` option.\n * Finally you need to define the `signUpVerificationMethod` in your `Auth` config.\n *\n * @example\n * ```typescript\n * Amplify.configure({\n * Auth: {\n * Cognito: {\n * ...cognitoConfig,\n * signUpVerificationMethod: \"link\" // the default value is \"code\"\n * }\n *\t}});\n * ```\n *\n * @throws AutoSignInException - Thrown when the autoSignIn flow has not started, or has been cancelled/completed.\n * @returns The signInOutput.\n *\n * @example\n * ```typescript\n * // handleSignUp.ts\n * async function handleSignUp(\n * username:string,\n * password:string\n * ){\n * try {\n * const { nextStep } = await signUp({\n * username,\n * password,\n * options: {\n * userAttributes:{ email:'email@email.com'},\n * autoSignIn: true // This enables the auto sign-in flow.\n * },\n * });\n *\n * handleSignUpStep(nextStep);\n *\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // handleConfirmSignUp.ts\n * async function handleConfirmSignUp(username:string, confirmationCode:string) {\n * try {\n * const { nextStep } = await confirmSignUp({\n * username,\n * confirmationCode,\n * });\n *\n * handleSignUpStep(nextStep);\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // signUpUtils.ts\n * async function handleSignUpStep( step: SignUpOutput[\"nextStep\"]) {\n * switch (step.signUpStep) {\n * case \"CONFIRM_SIGN_UP\":\n *\n * // Redirect end-user to confirm-sign up screen.\n *\n * case \"COMPLETE_AUTO_SIGN_IN\":\n *\t const codeDeliveryDetails = step.codeDeliveryDetails;\n * if (codeDeliveryDetails) {\n * // Redirect user to confirm-sign-up with link screen.\n * }\n * const signInOutput = await autoSignIn();\n * // handle sign-in steps\n * }\n *\n * ```\n */ // TODO(Eslint): can this be refactored not using `let` on exported member?\n// eslint-disable-next-line import/no-mutable-exports\nlet $0f083c64fe957751$export$c5378dc7d6787fa5 = $0f083c64fe957751$var$initialAutoSignIn;\n/**\n * Sets the context of autoSignIn at run time.\n * @internal\n */ function $0f083c64fe957751$export$7dcbf67a23c27835(callback) {\n $0f083c64fe957751$export$c5378dc7d6787fa5 = callback;\n}\n/**\n * Resets the context\n *\n * @internal\n */ function $0f083c64fe957751$export$1ffa2742ce5c589b(resetCallback = true) {\n if (resetCallback) $0f083c64fe957751$export$c5378dc7d6787fa5 = $0f083c64fe957751$var$initialAutoSignIn;\n (0, $5XcLh.autoSignInStore).dispatch({\n type: 'RESET'\n });\n}\n\n});\nparcelRegister(\"5XcLh\", function(module, exports) {\n\n$parcel$export(module.exports, \"autoSignInStore\", () => $aea1b9aba7ad98d4$export$ef87a9980a3566ca);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $aea1b9aba7ad98d4$var$defaultState() {\n return {\n active: false\n };\n}\nconst $aea1b9aba7ad98d4$var$autoSignInReducer = (state, action)=>{\n switch(action.type){\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value\n };\n case 'SET_SESSION':\n return {\n ...state,\n session: action.value\n };\n case 'START':\n return {\n ...state,\n active: true\n };\n case 'RESET':\n return $aea1b9aba7ad98d4$var$defaultState();\n default:\n return state;\n }\n};\nconst $aea1b9aba7ad98d4$var$createAutoSignInStore = (reducer)=>{\n let currentState = reducer($aea1b9aba7ad98d4$var$defaultState(), {\n type: 'RESET'\n });\n return {\n getState: ()=>currentState,\n dispatch: (action)=>{\n currentState = reducer(currentState, action);\n }\n };\n};\nconst $aea1b9aba7ad98d4$export$ef87a9980a3566ca = $aea1b9aba7ad98d4$var$createAutoSignInStore($aea1b9aba7ad98d4$var$autoSignInReducer);\n\n});\n\n\n\nparcelRegister(\"j3ZKM\", function(module, exports) {\n\n$parcel$export(module.exports, \"signInWithUserPassword\", () => $eed1c95609c0ace9$export$200af5a623414b2b);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\nvar $eL1Oc = parcelRequire(\"eL1Oc\");\n\nvar $1oMYx = parcelRequire(\"1oMYx\");\n\nvar $epZMx = parcelRequire(\"epZMx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using USER_PASSWORD_AUTH AuthFlowType\n *\n * @param input - The SignInWithUserPasswordInput object\n * @returns SignInWithUserPasswordOutput\n * @throws service: {@link InitiateAuthException } - Cognito service error thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $eed1c95609c0ace9$export$200af5a623414b2b(input) {\n const { username: username, password: password, options: options } = input;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_PASSWORD_AUTH'\n };\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const metadata = options?.clientMetadata;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignInUsername);\n (0, $7XpgE.assertValidationError)(!!password, (0, $ewkqX.AuthValidationErrorCode).EmptySignInPassword);\n try {\n const { ChallengeName: retiredChallengeName, ChallengeParameters: retriedChallengeParameters, AuthenticationResult: AuthenticationResult, Session: Session } = await (0, $eL1Oc.retryOnResourceNotFoundException)((0, $4DGDz.handleUserPasswordAuthFlow), [\n username,\n password,\n metadata,\n authConfig,\n (0, $54W3M.tokenOrchestrator)\n ], username, (0, $54W3M.tokenOrchestrator));\n const activeUsername = (0, $4DGDz.getActiveSignInUsername)(username);\n // sets up local state used during the sign-in process\n (0, $71859.setActiveSignInState)({\n signInSession: Session,\n username: activeUsername,\n challengeName: retiredChallengeName,\n signInDetails: signInDetails\n });\n if (AuthenticationResult) {\n await (0, $eQv6f.cacheCognitoTokens)({\n ...AuthenticationResult,\n username: activeUsername,\n NewDeviceMetadata: await (0, $1oMYx.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken\n }),\n signInDetails: signInDetails\n });\n (0, $71859.resetActiveSignInState)();\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n (0, $epZMx.resetAutoSignIn)();\n return {\n isSignedIn: true,\n nextStep: {\n signInStep: 'DONE'\n }\n };\n }\n return (0, $4DGDz.getSignInResult)({\n challengeName: retiredChallengeName,\n challengeParameters: retriedChallengeParameters\n });\n } catch (error) {\n (0, $71859.resetActiveSignInState)();\n (0, $epZMx.resetAutoSignIn)();\n (0, $iNzmv.assertServiceError)(error);\n const result = (0, $4DGDz.getSignInResultFromError)(error.name);\n if (result) return result;\n throw error;\n }\n}\n\n});\n\nparcelRegister(\"jqRoP\", function(module, exports) {\n\n$parcel$export(module.exports, \"signInWithUserAuth\", () => $2d79d2359823a418$export$fcfa00cf0f5ec937);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $5XcLh = parcelRequire(\"5XcLh\");\n\nvar $71859 = parcelRequire(\"71859\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $iz7yG = parcelRequire(\"iz7yG\");\n\nvar $1oMYx = parcelRequire(\"1oMYx\");\n\nvar $epZMx = parcelRequire(\"epZMx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in through a registered email or phone number without a password by by receiving and entering an OTP.\n *\n * @param input - The SignInWithUserAuthInput object\n * @returns SignInWithUserAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password -- needs to change\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $2d79d2359823a418$export$fcfa00cf0f5ec937(input) {\n const { username: username, password: password, options: options } = input;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_AUTH'\n };\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const clientMetaData = options?.clientMetadata;\n const preferredChallenge = options?.preferredChallenge;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignInUsername);\n try {\n const handleUserAuthFlowInput = {\n username: username,\n config: authConfig,\n tokenOrchestrator: $54W3M.tokenOrchestrator,\n clientMetadata: clientMetaData,\n preferredChallenge: preferredChallenge,\n password: password\n };\n const autoSignInStoreState = (0, $5XcLh.autoSignInStore).getState();\n if (autoSignInStoreState.active && autoSignInStoreState.username === username) handleUserAuthFlowInput.session = autoSignInStoreState.session;\n const response = await (0, $iz7yG.handleUserAuthFlow)(handleUserAuthFlowInput);\n const activeUsername = (0, $4DGDz.getActiveSignInUsername)(username);\n (0, $71859.setActiveSignInState)({\n signInSession: response.Session,\n username: activeUsername,\n challengeName: response.ChallengeName,\n signInDetails: signInDetails\n });\n if (response.AuthenticationResult) {\n await (0, $eQv6f.cacheCognitoTokens)({\n username: activeUsername,\n ...response.AuthenticationResult,\n NewDeviceMetadata: await (0, $1oMYx.getNewDeviceMetadata)({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: response.AuthenticationResult.NewDeviceMetadata,\n accessToken: response.AuthenticationResult.AccessToken\n }),\n signInDetails: signInDetails\n });\n (0, $71859.resetActiveSignInState)();\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n (0, $epZMx.resetAutoSignIn)();\n return {\n isSignedIn: true,\n nextStep: {\n signInStep: 'DONE'\n }\n };\n }\n return (0, $4DGDz.getSignInResult)({\n challengeName: response.ChallengeName,\n challengeParameters: response.ChallengeParameters,\n availableChallenges: 'AvailableChallenges' in response ? response.AvailableChallenges : undefined\n });\n } catch (error) {\n (0, $71859.resetActiveSignInState)();\n (0, $epZMx.resetAutoSignIn)();\n (0, $iNzmv.assertServiceError)(error);\n const result = (0, $4DGDz.getSignInResultFromError)(error.name);\n if (result) return result;\n throw error;\n }\n}\n\n});\nparcelRegister(\"iz7yG\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleUserAuthFlow\", () => $5e9a62a2e3e8e51a$export$f21455679019a68e);\n\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\nvar $4FP28 = parcelRequire(\"4FP28\");\n\n\n\n\n\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $85LUF = parcelRequire(\"85LUF\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $ePagu = parcelRequire(\"ePagu\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles user authentication flow with configurable challenge preferences.\n * Supports AuthFactorType challenges through the USER_AUTH flow.\n *\n * @param {HandleUserAuthFlowInput} params - Authentication flow parameters\n * @param {string} params.username - The username for authentication\n * @param {Record} [params.clientMetadata] - Optional metadata to pass to authentication service\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Manages authentication tokens and device tracking\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred authentication method\n * @param {string} [params.password] - Required when preferredChallenge is 'PASSWORD' or 'PASSWORD_SRP'\n *\n * @returns {Promise} The authentication response from Cognito\n */ async function $5e9a62a2e3e8e51a$export$f21455679019a68e({ username: username, clientMetadata: clientMetadata, config: config, tokenOrchestrator: tokenOrchestrator, preferredChallenge: preferredChallenge, password: password, session: session }) {\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = config;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const authParameters = {\n USERNAME: username\n };\n if (preferredChallenge) {\n if (preferredChallenge === 'PASSWORD_SRP') {\n (0, $7XpgE.assertValidationError)(!!password, (0, $ewkqX.AuthValidationErrorCode).EmptySignInPassword);\n return (0, $85LUF.handlePasswordSRP)({\n username: username,\n password: password,\n clientMetadata: clientMetadata,\n config: config,\n tokenOrchestrator: tokenOrchestrator,\n authFlow: 'USER_AUTH',\n preferredChallenge: preferredChallenge\n });\n }\n if (preferredChallenge === 'PASSWORD') {\n (0, $7XpgE.assertValidationError)(!!password, (0, $ewkqX.AuthValidationErrorCode).EmptySignInPassword);\n authParameters.PASSWORD = password;\n }\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const jsonReq = {\n AuthFlow: 'USER_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n };\n if (session) jsonReq.Session = session;\n const initiateAuth = (0, $4FP28.createInitiateAuthClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const response = await initiateAuth({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignIn)\n }, jsonReq);\n // Set the active username immediately after successful authentication attempt\n // If a user starts a new sign-in while another sign-in is incomplete,\n // this ensures we're tracking the correct user for subsequent auth challenges.\n (0, $ePagu.setActiveSignInUsername)(username);\n return response;\n}\n\n});\n\n\n\n\nparcelRegister(\"kNTsK\", function(module, exports) {\n\n$parcel$export(module.exports, \"createSignUpClient\", () => $d7ebde2d5c788863$export$99fa98564ba4db04);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $fjlOG = parcelRequire(\"fjlOG\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $kxGIY = parcelRequire(\"kxGIY\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $d7ebde2d5c788863$export$f9d992c2ce90154a = ()=>async (response)=>{\n if (response.statusCode >= 300) {\n const error = await (0, $bM38a.parseJsonError)(response);\n (0, $iNzmv.assertServiceError)(error);\n if (// Missing Password Error\n // 1 validation error detected: Value at 'password'failed to satisfy constraint: Member must not be null\n error.name === (0, $kxGIY.SignUpException).InvalidParameterException && /'password'/.test(error.message) && /Member must not be null/.test(error.message)) {\n const name = (0, $ewkqX.AuthValidationErrorCode).EmptySignUpPassword;\n const { message: message, recoverySuggestion: recoverySuggestion } = (0, $fjlOG.validationErrorMap)[name];\n throw new (0, $b62N7.AuthError)({\n name: name,\n message: message,\n recoverySuggestion: recoverySuggestion\n });\n }\n throw new (0, $b62N7.AuthError)({\n name: error.name,\n message: error.message\n });\n }\n return (0, $bM38a.parseJsonBody)(response);\n };\nconst $d7ebde2d5c788863$export$99fa98564ba4db04 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('SignUp'), $d7ebde2d5c788863$export$f9d992c2ce90154a(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"c7Zwg\", function(module, exports) {\n\n$parcel$export(module.exports, \"confirmSignUp\", () => $3b67ce6a1604acf5$export$2ce39ab6662e8c24);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\n\n\n\n\n\n\nvar $kDFKP = parcelRequire(\"kDFKP\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $5XcLh = parcelRequire(\"5XcLh\");\n\n\nvar $epZMx = parcelRequire(\"epZMx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms a new user account.\n *\n * @param input - The ConfirmSignUpInput object.\n * @returns ConfirmSignUpOutput\n * @throws -{@link ConfirmSignUpException }\n * Thrown due to an invalid confirmation code.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $3b67ce6a1604acf5$export$2ce39ab6662e8c24(input) {\n const { username: username, confirmationCode: confirmationCode, options: options } = input;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolId: userPoolId, userPoolClientId: userPoolClientId, userPoolEndpoint: userPoolEndpoint } = authConfig;\n const clientMetadata = options?.clientMetadata;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptyConfirmSignUpUsername);\n (0, $7XpgE.assertValidationError)(!!confirmationCode, (0, $ewkqX.AuthValidationErrorCode).EmptyConfirmSignUpCode);\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const confirmSignUpClient = (0, $kDFKP.createConfirmSignUpClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { Session: session } = await confirmSignUpClient({\n region: (0, $hXC67.getRegionFromUserPoolId)(authConfig.userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmSignUp)\n }, {\n Username: username,\n ConfirmationCode: confirmationCode,\n ClientMetadata: clientMetadata,\n ForceAliasCreation: options?.forceAliasCreation,\n ClientId: authConfig.userPoolClientId,\n UserContextData: UserContextData\n });\n return new Promise((resolve, reject)=>{\n try {\n const signUpOut = {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE'\n }\n };\n const autoSignInStoreState = (0, $5XcLh.autoSignInStore).getState();\n if (!autoSignInStoreState.active || autoSignInStoreState.username !== username) {\n resolve(signUpOut);\n (0, $epZMx.resetAutoSignIn)();\n return;\n }\n (0, $5XcLh.autoSignInStore).dispatch({\n type: 'SET_SESSION',\n value: session\n });\n const stopListener = (0, $5RCQ5.HubInternal).listen('auth-internal', ({ payload: payload })=>{\n switch(payload.event){\n case 'autoSignIn':\n resolve({\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN'\n }\n });\n stopListener();\n }\n });\n (0, $5RCQ5.HubInternal).dispatch('auth-internal', {\n event: 'confirmSignUp',\n data: signUpOut\n });\n } catch (error) {\n reject(error);\n }\n });\n}\n\n});\nparcelRegister(\"kDFKP\", function(module, exports) {\n\n$parcel$export(module.exports, \"createConfirmSignUpClient\", () => $90cfaee3eca5312c$export$f182f73f82c5c23a);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $luL8F = parcelRequire(\"luL8F\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $90cfaee3eca5312c$export$f182f73f82c5c23a = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('ConfirmSignUp'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"8XrSp\", function(module, exports) {\n\n$parcel$export(module.exports, \"resendSignUpCode\", () => $d2f19f127c92a1d4$export$b295e842f1d42d13);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\n\n\n\n\n\n\nvar $foJAH = parcelRequire(\"foJAH\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resend the confirmation code while signing up\n *\n * @param input - The ResendSignUpCodeInput object\n * @returns ResendSignUpCodeOutput\n * @throws service: {@link ResendConfirmationException } - Cognito service errors thrown when resending the code.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $d2f19f127c92a1d4$export$b295e842f1d42d13(input) {\n const { username: username } = input;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptySignUpUsername);\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolClientId: userPoolClientId, userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const resendConfirmationCode = (0, $foJAH.createResendConfirmationCodeClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { CodeDeliveryDetails: CodeDeliveryDetails } = await resendConfirmationCode({\n region: (0, $hXC67.getRegionFromUserPoolId)(authConfig.userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ResendSignUpCode)\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData: UserContextData\n });\n const { DeliveryMedium: DeliveryMedium, AttributeName: AttributeName, Destination: Destination } = {\n ...CodeDeliveryDetails\n };\n return {\n destination: Destination,\n deliveryMedium: DeliveryMedium,\n attributeName: AttributeName ? AttributeName : undefined\n };\n}\n\n});\nparcelRegister(\"foJAH\", function(module, exports) {\n\n$parcel$export(module.exports, \"createResendConfirmationCodeClient\", () => $5d9a1b3270d661d0$export$cf53d1782ddbc93c);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $5d9a1b3270d661d0$export$cf53d1782ddbc93c = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('ResendConfirmationCode'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"1YUHk\", function(module, exports) {\n\n$parcel$export(module.exports, \"signInWithRedirect\", () => $2a61feae3eb8b76b$export$3d0a7d1372e866bb);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\nvar $a93i9 = parcelRequire(\"a93i9\");\nvar $55jvH = parcelRequire(\"55jvH\");\nparcelRequire(\"6l9Ty\");\n\nvar $bQcc4 = parcelRequire(\"bQcc4\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $auw7m = parcelRequire(\"auw7m\");\n\nvar $4DGDz = parcelRequire(\"4DGDz\");\n\nvar $4X7aw = parcelRequire(\"4X7aw\");\n\nvar $32ee8 = parcelRequire(\"32ee8\");\n\n\n\nvar $hHV4w = parcelRequire(\"hHV4w\");\n\n\nvar $1h78R = parcelRequire(\"1h78R\");\n\nvar $TW1z3 = parcelRequire(\"TW1z3\");\n\nvar $4gG3S = parcelRequire(\"4gG3S\");\n\n\nvar $2zc4m = parcelRequire(\"2zc4m\");\n\nvar $dV7E9 = parcelRequire(\"dV7E9\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs in a user with OAuth. Redirects the application to an Identity Provider.\n *\n * @param input - The SignInWithRedirectInput object, if empty it will redirect to Cognito HostedUI\n *\n * @throws AuthTokenConfigException - Thrown when the user pool config is invalid.\n * @throws OAuthNotConfigureException - Thrown when the oauth config is invalid.\n */ async function $2a61feae3eb8b76b$export$3d0a7d1372e866bb(input) {\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n (0, $bfiP6.assertOAuthConfig)(authConfig);\n (0, $hHV4w.oAuthStore).setAuthConfig(authConfig);\n await (0, $4DGDz.assertUserNotAuthenticated)();\n let provider = 'COGNITO'; // Default\n if (typeof input?.provider === 'string') provider = (0, $bQcc4.cognitoHostedUIIdentityProviderMap)[input.provider];\n else if (input?.provider?.custom) provider = input.provider.custom;\n return $2a61feae3eb8b76b$var$oauthSignIn({\n oauthConfig: authConfig.loginWith.oauth,\n clientId: authConfig.userPoolClientId,\n provider: provider,\n customState: input?.customState,\n preferPrivateSession: input?.options?.preferPrivateSession,\n options: {\n loginHint: input?.options?.loginHint,\n lang: input?.options?.lang,\n nonce: input?.options?.nonce\n }\n });\n}\nconst $2a61feae3eb8b76b$var$oauthSignIn = async ({ oauthConfig: oauthConfig, provider: provider, clientId: clientId, customState: customState, preferPrivateSession: preferPrivateSession, options: options })=>{\n const { domain: domain, redirectSignIn: redirectSignIn, responseType: responseType, scopes: scopes } = oauthConfig;\n const { loginHint: loginHint, lang: lang, nonce: nonce } = options ?? {};\n const randomState = (0, $32ee8.generateState)();\n /* encodeURIComponent is not URL safe, use urlSafeEncode instead. Cognito\n single-encodes/decodes url on first sign in and double-encodes/decodes url\n when user already signed in. Using encodeURIComponent, Base32, Base64 add\n characters % or = which on further encoding becomes unsafe. '=' create issue\n for parsing query params.\n Refer: https://github.com/aws-amplify/amplify-js/issues/5218 */ const state = customState ? `${randomState}-${(0, $55jvH.urlSafeEncode)(customState)}` : randomState;\n const { value: value, method: method, toCodeChallenge: toCodeChallenge } = (0, $4X7aw.generateCodeVerifier)(128);\n const redirectUri = (0, $1h78R.getRedirectUrl)(oauthConfig.redirectSignIn);\n if ((0, $a93i9.isBrowser)()) (0, $hHV4w.oAuthStore).storeOAuthInFlight(true);\n (0, $hHV4w.oAuthStore).storeOAuthState(state);\n (0, $hHV4w.oAuthStore).storePKCE(value);\n const queryString = Object.entries({\n redirect_uri: redirectUri,\n response_type: responseType,\n client_id: clientId,\n identity_provider: provider,\n scope: scopes.join(' '),\n // eslint-disable-next-line camelcase\n ...loginHint && {\n login_hint: loginHint\n },\n ...lang && {\n lang: lang\n },\n ...nonce && {\n nonce: nonce\n },\n state: state,\n ...responseType === 'code' && {\n code_challenge: toCodeChallenge(),\n code_challenge_method: method\n }\n }).map(([k, v])=>`${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join('&');\n // TODO(v6): use URL object instead\n const oAuthUrl = `https://${domain}/oauth2/authorize?${queryString}`;\n // this will only take effect in the following scenarios:\n // 1. the user cancels the OAuth flow on web via back button, and\n // 2. when bfcache is enabled\n (0, $dV7E9.listenForOAuthFlowCancellation)((0, $hHV4w.oAuthStore));\n // the following is effective only in react-native as openAuthSession resolves only in react-native\n const { type: type, error: error, url: url } = await (0, $auw7m.openAuthSession)(oAuthUrl) ?? {};\n try {\n if (type === 'error') throw (0, $2zc4m.createOAuthError)(String(error));\n if (type === 'success' && url) await (0, $4gG3S.completeOAuthFlow)({\n currentUrl: url,\n clientId: clientId,\n domain: domain,\n redirectUri: redirectUri,\n responseType: responseType,\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignInWithRedirect),\n preferPrivateSession: preferPrivateSession\n });\n } catch (err) {\n await (0, $TW1z3.handleFailure)(err);\n // rethrow the error so it can be caught by `await signInWithRedirect()` in react-native\n throw err;\n }\n};\n\n});\nparcelRegister(\"55jvH\", function(module, exports) {\n\n$parcel$export(module.exports, \"urlSafeEncode\", () => $d8fdc91f49fb3a33$export$b855308a44508212);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $d8fdc91f49fb3a33$export$b855308a44508212(str) {\n return str.split('').map((char)=>char.charCodeAt(0).toString(16).padStart(2, '0')).join('');\n}\n\n});\n\nparcelRegister(\"6l9Ty\", function(module, exports) {\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $43O8I = parcelRequire(\"43O8I\");\nvar $a93i9 = parcelRequire(\"a93i9\");\n\nvar $1CB81 = parcelRequire(\"1CB81\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// attach the side effect for handling the completion of an inflight oauth flow\n// this side effect works only on Web\n(0, $a93i9.isBrowser)() && (()=>{\n // add the listener to the singleton for triggering\n (0, $1qbEC.Amplify)[0, $43O8I.ADD_OAUTH_LISTENER]((0, $1CB81.attemptCompleteOAuthFlow));\n})();\n\n});\nparcelRegister(\"1CB81\", function(module, exports) {\n\n$parcel$export(module.exports, \"attemptCompleteOAuthFlow\", () => $14b380e89e9c9cdd$export$602253b28f67ef40);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $hHV4w = parcelRequire(\"hHV4w\");\n\nvar $4gG3S = parcelRequire(\"4gG3S\");\n\nvar $1h78R = parcelRequire(\"1h78R\");\n\nvar $TW1z3 = parcelRequire(\"TW1z3\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $14b380e89e9c9cdd$export$602253b28f67ef40 = async (authConfig)=>{\n try {\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n (0, $bfiP6.assertOAuthConfig)(authConfig);\n (0, $hHV4w.oAuthStore).setAuthConfig(authConfig);\n } catch (_) {\n // no-op\n // This should not happen as Amplify singleton checks the oauth config key\n // unless the oauth config object doesn't contain required properties\n return;\n }\n // No inflight OAuth\n if (!await (0, $hHV4w.oAuthStore).loadOAuthInFlight()) return;\n try {\n const currentUrl = window.location.href;\n const { loginWith: loginWith, userPoolClientId: userPoolClientId } = authConfig;\n const { domain: domain, redirectSignIn: redirectSignIn, responseType: responseType } = loginWith.oauth;\n const redirectUri = (0, $1h78R.getRedirectUrl)(redirectSignIn);\n await (0, $4gG3S.completeOAuthFlow)({\n currentUrl: currentUrl,\n clientId: userPoolClientId,\n domain: domain,\n redirectUri: redirectUri,\n responseType: responseType,\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignInWithRedirect)\n });\n } catch (err) {\n await (0, $TW1z3.handleFailure)(err);\n }\n};\n\n});\nparcelRegister(\"4gG3S\", function(module, exports) {\n\n$parcel$export(module.exports, \"completeOAuthFlow\", () => $1c8e6ba4c10eb22c$export$342f5c7ddb2087ec);\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\nvar $7Ar4G = parcelRequire(\"7Ar4G\");\nvar $kvo3D = parcelRequire(\"kvo3D\");\nvar $1ZViM = parcelRequire(\"1ZViM\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $eQv6f = parcelRequire(\"eQv6f\");\n\nvar $8Z7oT = parcelRequire(\"8Z7oT\");\n\n\n\nvar $hHV4w = parcelRequire(\"hHV4w\");\n\nvar $gwp96 = parcelRequire(\"gwp96\");\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $2zc4m = parcelRequire(\"2zc4m\");\n\nvar $2KXuW = parcelRequire(\"2KXuW\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $1c8e6ba4c10eb22c$export$342f5c7ddb2087ec = async ({ currentUrl: currentUrl, userAgentValue: userAgentValue, clientId: clientId, redirectUri: redirectUri, responseType: responseType, domain: domain, preferPrivateSession: preferPrivateSession })=>{\n const urlParams = new (0, $7Ar4G.AmplifyUrl)(currentUrl);\n const error = urlParams.searchParams.get('error');\n const errorMessage = urlParams.searchParams.get('error_description');\n if (error) throw (0, $2zc4m.createOAuthError)(errorMessage ?? error);\n if (responseType === 'code') return $1c8e6ba4c10eb22c$var$handleCodeFlow({\n currentUrl: currentUrl,\n userAgentValue: userAgentValue,\n clientId: clientId,\n redirectUri: redirectUri,\n domain: domain,\n preferPrivateSession: preferPrivateSession\n });\n return $1c8e6ba4c10eb22c$var$handleImplicitFlow({\n currentUrl: currentUrl,\n redirectUri: redirectUri,\n preferPrivateSession: preferPrivateSession\n });\n};\nconst $1c8e6ba4c10eb22c$var$handleCodeFlow = async ({ currentUrl: currentUrl, userAgentValue: userAgentValue, clientId: clientId, redirectUri: redirectUri, domain: domain, preferPrivateSession: preferPrivateSession })=>{\n /* Convert URL into an object with parameters as keys\n{ redirect_uri: 'http://localhost:3000/', response_type: 'code', ...} */ const url = new (0, $7Ar4G.AmplifyUrl)(currentUrl);\n const code = url.searchParams.get('code');\n const state = url.searchParams.get('state');\n // if `code` or `state` is not presented in the redirect url, most likely\n // that the end user cancelled the inflight oauth flow by:\n // 1. clicking the back button of browser\n // 2. closing the provider hosted UI page and coming back to the app\n if (!code || !state) throw (0, $2zc4m.createOAuthError)('User cancelled OAuth flow.');\n // may throw error is being caught in attemptCompleteOAuthFlow.ts\n const validatedState = await (0, $2KXuW.validateState)(state);\n const oAuthTokenEndpoint = 'https://' + domain + '/oauth2/token';\n // TODO(v6): check hub events\n // dispatchAuthEvent(\n // \t'codeFlow',\n // \t{},\n // \t`Retrieving tokens from ${oAuthTokenEndpoint}`\n // );\n const codeVerifier = await (0, $hHV4w.oAuthStore).loadPKCE();\n const oAuthTokenBody = {\n grant_type: 'authorization_code',\n code: code,\n client_id: clientId,\n redirect_uri: redirectUri,\n ...codeVerifier ? {\n code_verifier: codeVerifier\n } : {}\n };\n const body = Object.entries(oAuthTokenBody).map(([k, v])=>`${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join('&');\n const { access_token: access_token, refresh_token: refreshToken, id_token: id_token, error: error, error_message: errorMessage, token_type: token_type, expires_in: expires_in } = await (await fetch(oAuthTokenEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n [(0, $1ZViM.USER_AGENT_HEADER)]: userAgentValue\n },\n body: body\n })).json();\n if (error) // error is being caught in attemptCompleteOAuthFlow.ts\n throw (0, $2zc4m.createOAuthError)(errorMessage ?? error);\n const username = (access_token && (0, $bfiP6.decodeJWT)(access_token).payload.username) ?? 'username';\n await (0, $eQv6f.cacheCognitoTokens)({\n username: username,\n AccessToken: access_token,\n IdToken: id_token,\n RefreshToken: refreshToken\n });\n return $1c8e6ba4c10eb22c$var$completeFlow({\n redirectUri: redirectUri,\n state: validatedState,\n preferPrivateSession: preferPrivateSession\n });\n};\nconst $1c8e6ba4c10eb22c$var$handleImplicitFlow = async ({ currentUrl: currentUrl, redirectUri: redirectUri, preferPrivateSession: preferPrivateSession })=>{\n // hash is `null` if `#` doesn't exist on URL\n const url = new (0, $7Ar4G.AmplifyUrl)(currentUrl);\n const { id_token: id_token, access_token: access_token, state: state, token_type: token_type, expires_in: expires_in, error_description: error_description, error: error } = (url.hash ?? '#').substring(1) // Remove # from returned code\n .split('&').map((pairings)=>pairings.split('=')).reduce((accum, [k, v])=>({\n ...accum,\n [k]: v\n }), {\n id_token: undefined,\n access_token: undefined,\n state: undefined,\n token_type: undefined,\n expires_in: undefined,\n error_description: undefined,\n error: undefined\n });\n if (error) throw (0, $2zc4m.createOAuthError)(error_description ?? error);\n if (!access_token) // error is being caught in attemptCompleteOAuthFlow.ts\n throw (0, $2zc4m.createOAuthError)('No access token returned from OAuth flow.');\n const validatedState = await (0, $2KXuW.validateState)(state);\n const username = (access_token && (0, $bfiP6.decodeJWT)(access_token).payload.username) ?? 'username';\n await (0, $eQv6f.cacheCognitoTokens)({\n username: username,\n AccessToken: access_token,\n IdToken: id_token\n });\n return $1c8e6ba4c10eb22c$var$completeFlow({\n redirectUri: redirectUri,\n state: validatedState,\n preferPrivateSession: preferPrivateSession\n });\n};\nconst $1c8e6ba4c10eb22c$var$completeFlow = async ({ redirectUri: redirectUri, state: state, preferPrivateSession: preferPrivateSession })=>{\n await (0, $54W3M.tokenOrchestrator).setOAuthMetadata({\n oauthSignIn: true\n });\n await (0, $hHV4w.oAuthStore).clearOAuthData();\n await (0, $hHV4w.oAuthStore).storeOAuthSignIn(true, preferPrivateSession);\n // this should be called before any call that involves `fetchAuthSession`\n // e.g. `getCurrentUser()` below, so it allows every inflight async calls to\n // `fetchAuthSession` can be resolved\n (0, $gwp96.resolveAndClearInflightPromises)();\n // clear history before sending out final Hub events\n $1c8e6ba4c10eb22c$var$clearHistory(redirectUri);\n if ($1c8e6ba4c10eb22c$var$isCustomState(state)) (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'customOAuthState',\n data: (0, $kvo3D.urlSafeDecode)($1c8e6ba4c10eb22c$var$getCustomState(state))\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'signInWithRedirect'\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n await (0, $8Z7oT.dispatchSignedInHubEvent)();\n};\nconst $1c8e6ba4c10eb22c$var$isCustomState = (state)=>{\n return /-/.test(state);\n};\nconst $1c8e6ba4c10eb22c$var$getCustomState = (state)=>{\n return state.split('-').splice(1).join('-');\n};\nconst $1c8e6ba4c10eb22c$var$clearHistory = (redirectUri)=>{\n if (typeof window !== 'undefined' && typeof window.history !== 'undefined') window.history.replaceState(window.history.state, '', redirectUri);\n};\n\n});\nparcelRegister(\"kvo3D\", function(module, exports) {\n\n$parcel$export(module.exports, \"urlSafeDecode\", () => $29fa13b94cecde02$export$a7ea17e93539f9a5);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $29fa13b94cecde02$export$a7ea17e93539f9a5(hex) {\n const matchArr = hex.match(/.{2}/g) || [];\n return matchArr.map((char)=>String.fromCharCode(parseInt(char, 16))).join('');\n}\n\n});\n\nparcelRegister(\"2zc4m\", function(module, exports) {\n\n$parcel$export(module.exports, \"createOAuthError\", () => $2b449213a3e5f199$export$84cc8f04e08ffc24);\n\nvar $ff1q1 = parcelRequire(\"ff1q1\");\n\nvar $fjlOG = parcelRequire(\"fjlOG\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $2b449213a3e5f199$export$84cc8f04e08ffc24 = (message, recoverySuggestion)=>new (0, $b62N7.AuthError)({\n message: message ?? 'An error has occurred during the oauth process.',\n name: (0, $fjlOG.AuthErrorCodes).OAuthSignInError,\n recoverySuggestion: recoverySuggestion ?? (0, $ff1q1.authErrorMessages).oauthSignInError.log\n });\n\n});\nparcelRegister(\"ff1q1\", function(module, exports) {\n\n$parcel$export(module.exports, \"authErrorMessages\", () => $8b8020e75b9c26f2$export$d8113b8d790509a4);\n\nvar $gJw02 = parcelRequire(\"gJw02\");\n\nvar $fjlOG = parcelRequire(\"fjlOG\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: delete this module when the Auth class is removed.\nconst $8b8020e75b9c26f2$var$logger = new (0, $gJw02.ConsoleLogger)('AuthError');\nclass $8b8020e75b9c26f2$export$145273558d58e0ac extends Error {\n constructor(type){\n const { message: message, log: log } = $8b8020e75b9c26f2$export$d8113b8d790509a4[type];\n super(message);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = $8b8020e75b9c26f2$export$145273558d58e0ac;\n Object.setPrototypeOf(this, $8b8020e75b9c26f2$export$145273558d58e0ac.prototype);\n this.name = 'AuthError';\n this.log = log || message;\n $8b8020e75b9c26f2$var$logger.error(this.log);\n }\n}\nclass $8b8020e75b9c26f2$export$71192787e041818c extends $8b8020e75b9c26f2$export$145273558d58e0ac {\n constructor(type){\n super(type);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = $8b8020e75b9c26f2$export$71192787e041818c;\n Object.setPrototypeOf(this, $8b8020e75b9c26f2$export$71192787e041818c.prototype);\n this.name = 'NoUserPoolError';\n }\n}\nconst $8b8020e75b9c26f2$export$d8113b8d790509a4 = {\n oauthSignInError: {\n message: (0, $fjlOG.AuthErrorStrings).OAUTH_ERROR,\n log: 'Make sure Cognito Hosted UI has been configured correctly'\n },\n noConfig: {\n message: (0, $fjlOG.AuthErrorStrings).DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n `\n },\n missingAuthConfig: {\n message: (0, $fjlOG.AuthErrorStrings).DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run \\`amplify push\\` after adding auth via \\`amplify add auth\\`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 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.\n `\n },\n emptyUsername: {\n message: (0, $fjlOG.AuthErrorStrings).EMPTY_USERNAME\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: (0, $fjlOG.AuthErrorStrings).INVALID_USERNAME\n },\n emptyPassword: {\n message: (0, $fjlOG.AuthErrorStrings).EMPTY_PASSWORD\n },\n emptyCode: {\n message: (0, $fjlOG.AuthErrorStrings).EMPTY_CODE\n },\n signUpError: {\n message: (0, $fjlOG.AuthErrorStrings).SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object'\n },\n noMFA: {\n message: (0, $fjlOG.AuthErrorStrings).NO_MFA\n },\n invalidMFA: {\n message: (0, $fjlOG.AuthErrorStrings).INVALID_MFA\n },\n emptyChallengeResponse: {\n message: (0, $fjlOG.AuthErrorStrings).EMPTY_CHALLENGE\n },\n noUserSession: {\n message: (0, $fjlOG.AuthErrorStrings).NO_USER_SESSION\n },\n deviceConfig: {\n message: (0, $fjlOG.AuthErrorStrings).DEVICE_CONFIG\n },\n networkError: {\n message: (0, $fjlOG.AuthErrorStrings).NETWORK_ERROR\n },\n autoSignInError: {\n message: (0, $fjlOG.AuthErrorStrings).AUTOSIGNIN_ERROR\n },\n default: {\n message: (0, $fjlOG.AuthErrorStrings).DEFAULT_MSG\n }\n};\n\n});\n\n\nparcelRegister(\"2KXuW\", function(module, exports) {\n\n$parcel$export(module.exports, \"validateState\", () => $446eb4a4334c6c7b$export$6925991e7e736e7);\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\nvar $lUuyP = parcelRequire(\"lUuyP\");\n\nvar $hHV4w = parcelRequire(\"hHV4w\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $446eb4a4334c6c7b$export$8963ba4ccadccff8 = '`signInWithRedirect` has been canceled.';\nconst $446eb4a4334c6c7b$export$72e3479c52537deb = 'An error occurred while validating the state.';\nconst $446eb4a4334c6c7b$export$80dc16ad7fef6c6 = 'Try to initiate an OAuth flow from Amplify';\nconst $446eb4a4334c6c7b$export$6925991e7e736e7 = async (state)=>{\n const savedState = await (0, $hHV4w.oAuthStore).loadOAuthState();\n // This is because savedState only exists if the flow was initiated by Amplify\n const validatedState = state === savedState ? savedState : undefined;\n if (!validatedState) throw new (0, $b62N7.AuthError)({\n name: (0, $lUuyP.AuthErrorTypes).OAuthSignInError,\n message: state === null ? $446eb4a4334c6c7b$export$8963ba4ccadccff8 : $446eb4a4334c6c7b$export$72e3479c52537deb,\n recoverySuggestion: state === null ? undefined : $446eb4a4334c6c7b$export$80dc16ad7fef6c6\n });\n return validatedState;\n};\n\n});\nparcelRegister(\"lUuyP\", function(module, exports) {\n\n$parcel$export(module.exports, \"AuthErrorTypes\", () => $ad899c5d321359e1$export$edb367c0a140d3db);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar $ad899c5d321359e1$export$edb367c0a140d3db;\n(function(AuthErrorTypes) {\n AuthErrorTypes[\"NoConfig\"] = \"noConfig\";\n AuthErrorTypes[\"MissingAuthConfig\"] = \"missingAuthConfig\";\n AuthErrorTypes[\"EmptyUsername\"] = \"emptyUsername\";\n AuthErrorTypes[\"InvalidUsername\"] = \"invalidUsername\";\n AuthErrorTypes[\"EmptyPassword\"] = \"emptyPassword\";\n AuthErrorTypes[\"EmptyCode\"] = \"emptyCode\";\n AuthErrorTypes[\"SignUpError\"] = \"signUpError\";\n AuthErrorTypes[\"NoMFA\"] = \"noMFA\";\n AuthErrorTypes[\"InvalidMFA\"] = \"invalidMFA\";\n AuthErrorTypes[\"EmptyChallengeResponse\"] = \"emptyChallengeResponse\";\n AuthErrorTypes[\"NoUserSession\"] = \"noUserSession\";\n AuthErrorTypes[\"Default\"] = \"default\";\n AuthErrorTypes[\"DeviceConfig\"] = \"deviceConfig\";\n AuthErrorTypes[\"NetworkError\"] = \"networkError\";\n AuthErrorTypes[\"AutoSignInError\"] = \"autoSignInError\";\n AuthErrorTypes[\"OAuthSignInError\"] = \"oauthSignInError\";\n})($ad899c5d321359e1$export$edb367c0a140d3db || ($ad899c5d321359e1$export$edb367c0a140d3db = {}));\n\n});\n\n\n\nparcelRegister(\"1h78R\", function(module, exports) {\n\n$parcel$export(module.exports, \"getRedirectUrl\", () => $0dc0bdec7396afa7$export$93832c3affb240d3);\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/** @internal */ function $0dc0bdec7396afa7$export$93832c3affb240d3(redirects, preferredRedirectUrl) {\n if (preferredRedirectUrl) {\n const redirectUrl = redirects?.find((redirect)=>redirect === preferredRedirectUrl);\n if (!redirectUrl) throw 0, $cutI2.invalidPreferredRedirectUrlException;\n return redirectUrl;\n } else {\n const redirectUrlFromTheSameOrigin = redirects?.find($0dc0bdec7396afa7$var$isSameOriginAndPathName) ?? redirects?.find($0dc0bdec7396afa7$var$isTheSameDomain);\n const redirectUrlFromDifferentOrigin = redirects?.find($0dc0bdec7396afa7$var$isHttps) ?? redirects?.find($0dc0bdec7396afa7$var$isHttp);\n if (redirectUrlFromTheSameOrigin) return redirectUrlFromTheSameOrigin;\n else if (redirectUrlFromDifferentOrigin) throw 0, $cutI2.invalidOriginException;\n throw 0, $cutI2.invalidRedirectException;\n }\n}\n// origin + pathname => https://example.com/app\nconst $0dc0bdec7396afa7$var$isSameOriginAndPathName = (redirect)=>redirect.startsWith(// eslint-disable-next-line no-constant-binary-expression\n String((window.location.origin + window.location.pathname) ?? '/'));\n// domain => outlook.live.com, github.com\nconst $0dc0bdec7396afa7$var$isTheSameDomain = (redirect)=>redirect.includes(String(window.location.hostname));\nconst $0dc0bdec7396afa7$var$isHttp = (redirect)=>redirect.startsWith('http://');\nconst $0dc0bdec7396afa7$var$isHttps = (redirect)=>redirect.startsWith('https://');\n\n});\n\nparcelRegister(\"TW1z3\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleFailure\", () => $896412fdbf818f41$export$9adf33f0521751a3);\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $hHV4w = parcelRequire(\"hHV4w\");\n\nvar $gwp96 = parcelRequire(\"gwp96\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $896412fdbf818f41$export$9adf33f0521751a3 = async (error)=>{\n (0, $gwp96.resolveAndClearInflightPromises)();\n await (0, $hHV4w.oAuthStore).clearOAuthInflightData();\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'signInWithRedirect_failure',\n data: {\n error: error\n }\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n};\n\n});\n\n\n\nparcelRegister(\"bQcc4\", function(module, exports) {\n\n$parcel$export(module.exports, \"cognitoHostedUIIdentityProviderMap\", () => $52bd9e18179053e3$export$6893de5f4e1216c3);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $52bd9e18179053e3$export$6893de5f4e1216c3 = {\n Google: 'Google',\n Facebook: 'Facebook',\n Amazon: 'LoginWithAmazon',\n Apple: 'SignInWithApple'\n};\n\n});\n\nparcelRegister(\"auw7m\", function(module, exports) {\n\n$parcel$export(module.exports, \"openAuthSession\", () => $fa2b9f18d5964de0$export$a673d54799039714);\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $fa2b9f18d5964de0$export$a673d54799039714 = async (url)=>{\n if (!window?.location) return;\n // enforce HTTPS\n window.location.href = url.replace('http://', 'https://');\n};\n\n});\n\nparcelRegister(\"4X7aw\", function(module, exports) {\n\n$parcel$export(module.exports, \"generateCodeVerifier\", () => $8c9d81203c070bf5$export$cf1891f923f5943a);\nparcelRequire(\"78v1Z\");\nvar $4xNDb = parcelRequire(\"4xNDb\");\n\nvar $ijwDq = parcelRequire(\"ijwDq\");\nvar $dfMUF = parcelRequire(\"dfMUF\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $8c9d81203c070bf5$var$CODE_VERIFIER_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n/**\n *\n * @param length Desired length of the code verifier.\n *\n * **NOTE:** According to the [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1)\n * A code verifier must be with a length >= 43 and <= 128.\n *\n * @returns An object that contains the generated `codeVerifier` and a method\n * `toCodeChallenge` to generate the code challenge from the `codeVerifier`\n * following the spec of [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.2).\n */ const $8c9d81203c070bf5$export$cf1891f923f5943a = (length)=>{\n const randomBytes = new Uint8Array(length);\n (0, $dfMUF.getCrypto)().getRandomValues(randomBytes);\n let value = '';\n let codeChallenge;\n for (const byte of randomBytes)value += $8c9d81203c070bf5$var$CODE_VERIFIER_CHARSET.charAt(byte % $8c9d81203c070bf5$var$CODE_VERIFIER_CHARSET.length);\n return {\n value: value,\n method: 'S256',\n toCodeChallenge () {\n if (codeChallenge) return codeChallenge;\n codeChallenge = $8c9d81203c070bf5$var$generateCodeChallenge(value);\n return codeChallenge;\n }\n };\n};\nfunction $8c9d81203c070bf5$var$generateCodeChallenge(codeVerifier) {\n const awsCryptoHash = new (0, $4xNDb.Sha256)();\n awsCryptoHash.update(codeVerifier);\n const codeChallenge = $8c9d81203c070bf5$var$removePaddingChar((0, $ijwDq.base64Encoder).convert(awsCryptoHash.digestSync(), {\n urlSafe: true\n }));\n return codeChallenge;\n}\nfunction $8c9d81203c070bf5$var$removePaddingChar(base64Encoded) {\n return base64Encoded.replace(/=/g, '');\n}\n\n});\n\nparcelRegister(\"32ee8\", function(module, exports) {\n\n$parcel$export(module.exports, \"generateState\", () => $a52abdb62a8948e7$export$9ccd2716e53a229b);\n\nvar $iKJxr = parcelRequire(\"iKJxr\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $a52abdb62a8948e7$export$9ccd2716e53a229b = ()=>{\n return (0, $iKJxr.generateRandomString)(32);\n};\n\n});\nparcelRegister(\"iKJxr\", function(module, exports) {\n\n$parcel$export(module.exports, \"generateRandomString\", () => $34423d94dc1bf184$export$9e15fb06e64c4810);\n\nvar $dfMUF = parcelRequire(\"dfMUF\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $34423d94dc1bf184$export$9e15fb06e64c4810 = (length)=>{\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const result = [];\n const randomNums = new Uint8Array(length);\n (0, $dfMUF.getCrypto)().getRandomValues(randomNums);\n for (const num of randomNums)result.push(STATE_CHARSET[num % STATE_CHARSET.length]);\n return result.join('');\n};\n\n});\n\n\nparcelRegister(\"dV7E9\", function(module, exports) {\n\n$parcel$export(module.exports, \"listenForOAuthFlowCancellation\", () => $ab54fc76b8b12938$export$35c17f3730c1b943);\n\nvar $2zc4m = parcelRequire(\"2zc4m\");\n\nvar $TW1z3 = parcelRequire(\"TW1z3\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $ab54fc76b8b12938$export$35c17f3730c1b943 = (store)=>{\n async function handleCancelOAuthFlow(event) {\n const isBfcache = event.persisted;\n if (isBfcache && await store.loadOAuthInFlight()) {\n const error = (0, $2zc4m.createOAuthError)('User cancelled OAuth flow.');\n await (0, $TW1z3.handleFailure)(error);\n }\n window.removeEventListener('pageshow', handleCancelOAuthFlow);\n }\n window.addEventListener('pageshow', handleCancelOAuthFlow);\n};\n\n});\n\n\nparcelRegister(\"eARfH\", function(module, exports) {\n\n$parcel$export(module.exports, \"signOut\", () => $4ce3e2cfb4e79cdf$export$b0ac3a1c242cb1ea);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\nvar $2MTK0 = parcelRequire(\"2MTK0\");\nvar $gJw02 = parcelRequire(\"gJw02\");\nvar $57Of0 = parcelRequire(\"57Of0\");\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n\n\nvar $DNF8t = parcelRequire(\"DNF8t\");\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\nparcelRequire(\"78v1Z\");\n\nvar $uI0hk = parcelRequire(\"uI0hk\");\n\nvar $cutI2 = parcelRequire(\"cutI2\");\n\n\n\n\n\n\n\n\nvar $1aiax = parcelRequire(\"1aiax\");\n\n\n\nvar $h13nl = parcelRequire(\"h13nl\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $4ce3e2cfb4e79cdf$var$logger = new (0, $gJw02.ConsoleLogger)('Auth');\n/**\n * Signs a user out\n *\n * @param input - The SignOutInput object\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $4ce3e2cfb4e79cdf$export$b0ac3a1c242cb1ea(input) {\n const cognitoConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(cognitoConfig);\n if (input?.global) await $4ce3e2cfb4e79cdf$var$globalSignOut(cognitoConfig);\n else await $4ce3e2cfb4e79cdf$var$clientSignOut(cognitoConfig);\n let hasOAuthConfig;\n try {\n (0, $bfiP6.assertOAuthConfig)(cognitoConfig);\n hasOAuthConfig = true;\n } catch (err) {\n hasOAuthConfig = false;\n }\n if (hasOAuthConfig) {\n const oAuthStore = new (0, $DNF8t.DefaultOAuthStore)((0, $57Of0.defaultStorage));\n oAuthStore.setAuthConfig(cognitoConfig);\n const { type: type } = await (0, $uI0hk.handleOAuthSignOut)(cognitoConfig, oAuthStore, (0, $54W3M.tokenOrchestrator), input?.oauth?.redirectUrl) ?? {};\n if (type === 'error') throw new (0, $b62N7.AuthError)({\n name: (0, $cutI2.OAUTH_SIGNOUT_EXCEPTION),\n message: `An error occurred when attempting to log out from OAuth provider.`\n });\n } else {\n // complete sign out\n (0, $54W3M.tokenOrchestrator).clearTokens();\n await (0, $2MTK0.clearCredentials)();\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'signedOut'\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n }\n}\nasync function $4ce3e2cfb4e79cdf$var$clientSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint: userPoolEndpoint, userPoolId: userPoolId, userPoolClientId: userPoolClientId } = cognitoConfig;\n const authTokens = await (0, $54W3M.tokenOrchestrator).getTokenStore().loadTokens();\n (0, $kOfpC.assertAuthTokensWithRefreshToken)(authTokens);\n if ($4ce3e2cfb4e79cdf$var$isSessionRevocable(authTokens.accessToken)) {\n const revokeToken = (0, $1aiax.createRevokeTokenClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n await revokeToken({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignOut)\n }, {\n ClientId: userPoolClientId,\n Token: authTokens.refreshToken\n });\n }\n } catch (err) {\n // this shouldn't throw\n $4ce3e2cfb4e79cdf$var$logger.debug('Client signOut error caught but will proceed with token removal');\n }\n}\nasync function $4ce3e2cfb4e79cdf$var$globalSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint: userPoolEndpoint, userPoolId: userPoolId } = cognitoConfig;\n const authTokens = await (0, $54W3M.tokenOrchestrator).getTokenStore().loadTokens();\n (0, $kOfpC.assertAuthTokens)(authTokens);\n const globalSignOutClient = (0, $h13nl.createGlobalSignOutClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n await globalSignOutClient({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).SignOut)\n }, {\n AccessToken: authTokens.accessToken.toString()\n });\n } catch (err) {\n // it should not throw\n $4ce3e2cfb4e79cdf$var$logger.debug('Global signOut error caught but will proceed with token removal');\n }\n}\nconst $4ce3e2cfb4e79cdf$var$isSessionRevocable = (token)=>!!token?.payload?.origin_jti;\n\n});\nparcelRegister(\"2MTK0\", function(module, exports) {\n\n$parcel$export(module.exports, \"clearCredentials\", () => $f55a993678066c0e$export$d1b63878dfcc70a6);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction $f55a993678066c0e$export$d1b63878dfcc70a6() {\n return (0, $1qbEC.Amplify).Auth.clearCredentials();\n}\n\n});\n\nparcelRegister(\"uI0hk\", function(module, exports) {\n\n$parcel$export(module.exports, \"handleOAuthSignOut\", () => $41ee35784e19ee93$export$74290142c99a2f64);\n\nvar $eWE9N = parcelRequire(\"eWE9N\");\n\nvar $3U8kx = parcelRequire(\"3U8kx\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $41ee35784e19ee93$export$74290142c99a2f64 = async (cognitoConfig, store, tokenOrchestrator, redirectUrl)=>{\n const { isOAuthSignIn: isOAuthSignIn } = await store.loadOAuthSignIn();\n const oauthMetadata = await tokenOrchestrator.getOAuthMetadata();\n // Clear everything before attempting to visted logout endpoint since the current application\n // state could be wiped away on redirect\n await (0, $eWE9N.completeOAuthSignOut)(store);\n // The isOAuthSignIn flag is propagated by the oAuthToken store which manages oauth keys in local storage only.\n // These keys are used to determine if a user is in an inflight or signedIn oauth states.\n // However, this behavior represents an issue when 2 apps share the same set of tokens in Cookie storage because the app that didn't\n // start the OAuth will not have access to the oauth keys.\n // A heuristic solution is to add oauth metadata to the tokenOrchestrator which will have access to the underlying\n // storage mechanism that is used by Amplify.\n if (isOAuthSignIn || oauthMetadata?.oauthSignIn) // On web, this will always end up being a void action\n return (0, $3U8kx.oAuthSignOutRedirect)(cognitoConfig, false, redirectUrl);\n};\n\n});\nparcelRegister(\"eWE9N\", function(module, exports) {\n\n$parcel$export(module.exports, \"completeOAuthSignOut\", () => $628fca0455275a7f$export$f8a4fedaab76b065);\n\nvar $2MTK0 = parcelRequire(\"2MTK0\");\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\nvar $5RCQ5 = parcelRequire(\"5RCQ5\");\n\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $628fca0455275a7f$export$f8a4fedaab76b065 = async (store)=>{\n await store.clearOAuthData();\n (0, $54W3M.tokenOrchestrator).clearTokens();\n await (0, $2MTK0.clearCredentials)();\n (0, $5RCQ5.Hub).dispatch('auth', {\n event: 'signedOut'\n }, 'Auth', (0, $5RCQ5.AMPLIFY_SYMBOL));\n};\n\n});\n\nparcelRegister(\"3U8kx\", function(module, exports) {\n\n$parcel$export(module.exports, \"oAuthSignOutRedirect\", () => $6bba6d02e2943231$export$a20426d3d43ad21f);\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\n\nvar $auw7m = parcelRequire(\"auw7m\");\n\nvar $1h78R = parcelRequire(\"1h78R\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $6bba6d02e2943231$export$a20426d3d43ad21f = async (authConfig, preferPrivateSession = false, redirectUrl)=>{\n (0, $bfiP6.assertOAuthConfig)(authConfig);\n const { loginWith: loginWith, userPoolClientId: userPoolClientId } = authConfig;\n const { domain: domain, redirectSignOut: redirectSignOut } = loginWith.oauth;\n const signoutUri = (0, $1h78R.getRedirectUrl)(redirectSignOut, redirectUrl);\n const oAuthLogoutEndpoint = `https://${domain}/logout?${Object.entries({\n client_id: userPoolClientId,\n logout_uri: encodeURIComponent(signoutUri)\n }).map(([k, v])=>`${k}=${v}`).join('&')}`;\n return (0, $auw7m.openAuthSession)(oAuthLogoutEndpoint);\n};\n\n});\n\n\nparcelRegister(\"1aiax\", function(module, exports) {\n\n$parcel$export(module.exports, \"createRevokeTokenClient\", () => $cf10247bfd8abe18$export$93ed00c43cc3ad50);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $cf10247bfd8abe18$export$93ed00c43cc3ad50 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('RevokeToken'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\nparcelRegister(\"h13nl\", function(module, exports) {\n\n$parcel$export(module.exports, \"createGlobalSignOutClient\", () => $3fce074ac5ce43b6$export$9ebd23b04fdf4c3a);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $3fce074ac5ce43b6$export$9ebd23b04fdf4c3a = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('GlobalSignOut'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"hPpH6\", function(module, exports) {\n\n$parcel$export(module.exports, \"resetPassword\", () => $fab9e02a7dab98ac$export$dc726c8e334dd814);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\n\n\n\n\n\n\nvar $2NBLh = parcelRequire(\"2NBLh\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resets a user's password.\n *\n * @param input - The ResetPasswordInput object.\n * @returns ResetPasswordOutput\n * @throws -{@link ForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n **/ async function $fab9e02a7dab98ac$export$dc726c8e334dd814(input) {\n const { username: username } = input;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptyResetPasswordUsername);\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolClientId: userPoolClientId, userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const forgotPassword = (0, $2NBLh.createForgotPasswordClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const res = await forgotPassword({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ResetPassword)\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: UserContextData\n });\n const codeDeliveryDetails = res.CodeDeliveryDetails;\n return {\n isPasswordReset: false,\n nextStep: {\n resetPasswordStep: 'CONFIRM_RESET_PASSWORD_WITH_CODE',\n codeDeliveryDetails: {\n deliveryMedium: codeDeliveryDetails?.DeliveryMedium,\n destination: codeDeliveryDetails?.Destination,\n attributeName: codeDeliveryDetails?.AttributeName\n }\n }\n };\n}\n\n});\nparcelRegister(\"2NBLh\", function(module, exports) {\n\n$parcel$export(module.exports, \"createForgotPasswordClient\", () => $f5e6df3ae946b543$export$f8a72614a2df8d41);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $f5e6df3ae946b543$export$f8a72614a2df8d41 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('ForgotPassword'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"1XYd7\", function(module, exports) {\n\n$parcel$export(module.exports, \"confirmResetPassword\", () => $cc655f1c8d2537cd$export$890261705c8ce36b);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\nvar $7fUr4 = parcelRequire(\"7fUr4\");\n\n\n\n\n\n\n\nvar $7Ww7D = parcelRequire(\"7Ww7D\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms the new password and verification code to reset the password.\n *\n * @param input - The ConfirmResetPasswordInput object.\n * @throws -{@link ConfirmForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code, password or username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $cc655f1c8d2537cd$export$890261705c8ce36b(input) {\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolClientId: userPoolClientId, userPoolId: userPoolId, userPoolEndpoint: userPoolEndpoint } = authConfig;\n const { username: username, newPassword: newPassword } = input;\n (0, $7XpgE.assertValidationError)(!!username, (0, $ewkqX.AuthValidationErrorCode).EmptyConfirmResetPasswordUsername);\n (0, $7XpgE.assertValidationError)(!!newPassword, (0, $ewkqX.AuthValidationErrorCode).EmptyConfirmResetPasswordNewPassword);\n const code = input.confirmationCode;\n (0, $7XpgE.assertValidationError)(!!code, (0, $ewkqX.AuthValidationErrorCode).EmptyConfirmResetPasswordConfirmationCode);\n const metadata = input.options?.clientMetadata;\n const UserContextData = (0, $7fUr4.getUserContextData)({\n username: username,\n userPoolId: userPoolId,\n userPoolClientId: userPoolClientId\n });\n const confirmForgotPassword = (0, $7Ww7D.createConfirmForgotPasswordClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n await confirmForgotPassword({\n region: (0, $hXC67.getRegionFromUserPoolId)(authConfig.userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).ConfirmResetPassword)\n }, {\n Username: username,\n ConfirmationCode: code,\n Password: newPassword,\n ClientMetadata: metadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData: UserContextData\n });\n}\n\n});\nparcelRegister(\"7Ww7D\", function(module, exports) {\n\n$parcel$export(module.exports, \"createConfirmForgotPasswordClient\", () => $dc007ddd858e29b1$export$966c1bde6d375783);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $dc007ddd858e29b1$export$966c1bde6d375783 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('ConfirmForgotPassword'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"2q8Iv\", function(module, exports) {\n\n$parcel$export(module.exports, \"updatePassword\", () => $a150190450f16c3a$export$e2853351e15b7895);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\nvar $kwYKv = parcelRequire(\"kwYKv\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $ewkqX = parcelRequire(\"ewkqX\");\n\nvar $7XpgE = parcelRequire(\"7XpgE\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\n\n\n\n\n\n\nvar $acyfS = parcelRequire(\"acyfS\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's password while authenticated.\n *\n * @param input - The UpdatePasswordInput object.\n * @throws - {@link ChangePasswordException} - Cognito service errors thrown when updating a password.\n * @throws - {@link AuthValidationErrorCode} - Validation errors thrown when oldPassword or newPassword are empty.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $a150190450f16c3a$export$e2853351e15b7895(input) {\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolEndpoint: userPoolEndpoint, userPoolId: userPoolId } = authConfig;\n const { oldPassword: oldPassword, newPassword: newPassword } = input;\n (0, $7XpgE.assertValidationError)(!!oldPassword, (0, $ewkqX.AuthValidationErrorCode).EmptyUpdatePassword);\n (0, $7XpgE.assertValidationError)(!!newPassword, (0, $ewkqX.AuthValidationErrorCode).EmptyUpdatePassword);\n const { tokens: tokens } = await (0, $kwYKv.fetchAuthSession)({\n forceRefresh: false\n });\n (0, $kOfpC.assertAuthTokens)(tokens);\n const changePassword = (0, $acyfS.createChangePasswordClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n await changePassword({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).UpdatePassword)\n }, {\n AccessToken: tokens.accessToken.toString(),\n PreviousPassword: oldPassword,\n ProposedPassword: newPassword\n });\n}\n\n});\nparcelRegister(\"acyfS\", function(module, exports) {\n\n$parcel$export(module.exports, \"createChangePasswordClient\", () => $062e760129ec1e9c$export$240a6a56ebfd6264);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $062e760129ec1e9c$export$240a6a56ebfd6264 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('ChangePassword'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"bykg2\", function(module, exports) {\n\n$parcel$export(module.exports, \"updateUserAttributes\", () => $c1c529a335aaa923$export$16ff8cb4f547be0);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\nvar $kwYKv = parcelRequire(\"kwYKv\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $ZiWkh = parcelRequire(\"ZiWkh\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\n\n\n\n\n\n\n\nvar $kU6O7 = parcelRequire(\"kU6O7\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's attributes while authenticated.\n *\n * @param input - The UpdateUserAttributesInput object\n * @returns UpdateUserAttributesOutput\n * @throws - {@link UpdateUserAttributesException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ const $c1c529a335aaa923$export$16ff8cb4f547be0 = async (input)=>{\n const { userAttributes: userAttributes, options: options } = input;\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n const clientMetadata = options?.clientMetadata;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolEndpoint: userPoolEndpoint, userPoolId: userPoolId } = authConfig;\n const { tokens: tokens } = await (0, $kwYKv.fetchAuthSession)({\n forceRefresh: false\n });\n (0, $kOfpC.assertAuthTokens)(tokens);\n const updateUserAttributesClient = (0, $kU6O7.createUpdateUserAttributesClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n const { CodeDeliveryDetailsList: CodeDeliveryDetailsList } = await updateUserAttributesClient({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).UpdateUserAttributes)\n }, {\n AccessToken: tokens.accessToken.toString(),\n ClientMetadata: clientMetadata,\n UserAttributes: (0, $ZiWkh.toAttributeType)(userAttributes)\n });\n return {\n ...$c1c529a335aaa923$var$getConfirmedAttributes(userAttributes),\n ...$c1c529a335aaa923$var$getUnConfirmedAttributes(CodeDeliveryDetailsList)\n };\n};\nfunction $c1c529a335aaa923$var$getConfirmedAttributes(attributes) {\n const confirmedAttributes = {};\n Object.keys(attributes)?.forEach((key)=>{\n confirmedAttributes[key] = {\n isUpdated: true,\n nextStep: {\n updateAttributeStep: 'DONE'\n }\n };\n });\n return confirmedAttributes;\n}\nfunction $c1c529a335aaa923$var$getUnConfirmedAttributes(codeDeliveryDetailsList) {\n const unConfirmedAttributes = {};\n codeDeliveryDetailsList?.forEach((codeDeliveryDetails)=>{\n const { AttributeName: AttributeName, DeliveryMedium: DeliveryMedium, Destination: Destination } = codeDeliveryDetails;\n if (AttributeName) unConfirmedAttributes[AttributeName] = {\n isUpdated: false,\n nextStep: {\n updateAttributeStep: 'CONFIRM_ATTRIBUTE_WITH_CODE',\n codeDeliveryDetails: {\n attributeName: AttributeName,\n deliveryMedium: DeliveryMedium,\n destination: Destination\n }\n }\n };\n });\n return unConfirmedAttributes;\n}\n\n});\nparcelRegister(\"kU6O7\", function(module, exports) {\n\n$parcel$export(module.exports, \"createUpdateUserAttributesClient\", () => $9e3e6b28dfccad5c$export$c388d1c910c14d32);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\nvar $7OD1Z = parcelRequire(\"7OD1Z\");\n\n\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $9e3e6b28dfccad5c$export$c388d1c910c14d32 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('UpdateUserAttributes'), (0, $7OD1Z.createUserPoolDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\n\n\nparcelRegister(\"ifW8F\", function(module, exports) {\n\n$parcel$export(module.exports, \"deleteUser\", () => $98b7095079a1f535$export$7d0f10f273c0438a);\n\nvar $1qbEC = parcelRequire(\"1qbEC\");\nvar $kwYKv = parcelRequire(\"kwYKv\");\n\nvar $bfiP6 = parcelRequire(\"bfiP6\");\nvar $k2DuP = parcelRequire(\"k2DuP\");\n\nvar $hXC67 = parcelRequire(\"hXC67\");\n\nvar $kOfpC = parcelRequire(\"kOfpC\");\n\n\n\nvar $54W3M = parcelRequire(\"54W3M\");\n\nvar $aEls4 = parcelRequire(\"aEls4\");\n\n\n\n\n\n\n\n\nvar $lVqBy = parcelRequire(\"lVqBy\");\n\nvar $eAu1N = parcelRequire(\"eAu1N\");\n\nvar $eARfH = parcelRequire(\"eARfH\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deletes a user from the user pool while authenticated.\n *\n * @throws - {@link DeleteUserException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */ async function $98b7095079a1f535$export$7d0f10f273c0438a() {\n const authConfig = (0, $1qbEC.Amplify).getConfig().Auth?.Cognito;\n (0, $bfiP6.assertTokenProviderConfig)(authConfig);\n const { userPoolEndpoint: userPoolEndpoint, userPoolId: userPoolId } = authConfig;\n const { tokens: tokens } = await (0, $kwYKv.fetchAuthSession)();\n (0, $kOfpC.assertAuthTokens)(tokens);\n const serviceDeleteUser = (0, $lVqBy.createDeleteUserClient)({\n endpointResolver: (0, $eAu1N.createCognitoUserPoolEndpointResolver)({\n endpointOverride: userPoolEndpoint\n })\n });\n await serviceDeleteUser({\n region: (0, $hXC67.getRegionFromUserPoolId)(userPoolId),\n userAgentValue: (0, $aEls4.getAuthUserAgentValue)((0, $k2DuP.AuthAction).DeleteUser)\n }, {\n AccessToken: tokens.accessToken.toString()\n });\n await (0, $54W3M.tokenOrchestrator).clearDeviceMetadata();\n await (0, $eARfH.signOut)();\n}\n\n});\nparcelRegister(\"lVqBy\", function(module, exports) {\n\n$parcel$export(module.exports, \"createDeleteUserClient\", () => $7a067637f3db309d$export$eb26e48faf9e639);\n\nvar $6vbP8 = parcelRequire(\"6vbP8\");\n\nvar $bdRfK = parcelRequire(\"bdRfK\");\n\nvar $2qp1o = parcelRequire(\"2qp1o\");\n\n\n\nvar $hOqDc = parcelRequire(\"hOqDc\");\n\nvar $luL8F = parcelRequire(\"luL8F\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $7a067637f3db309d$export$eb26e48faf9e639 = (config)=>(0, $6vbP8.composeServiceApi)((0, $bdRfK.cognitoUserPoolTransferHandler), (0, $2qp1o.createUserPoolSerializer)('DeleteUser'), (0, $hOqDc.createEmptyResponseDeserializer)(), {\n ...(0, $luL8F.DEFAULT_SERVICE_CLIENT_API_CONFIG),\n ...config\n });\n\n});\nparcelRegister(\"hOqDc\", function(module, exports) {\n\n$parcel$export(module.exports, \"createEmptyResponseDeserializer\", () => $2d8ac22d50148a4b$export$1579770e607c002a);\n\nvar $bM38a = parcelRequire(\"bM38a\");\n\nvar $iNzmv = parcelRequire(\"iNzmv\");\n\nvar $b62N7 = parcelRequire(\"b62N7\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst $2d8ac22d50148a4b$export$1579770e607c002a = ()=>async (response)=>{\n if (response.statusCode >= 300) {\n const error = await (0, $bM38a.parseJsonError)(response);\n (0, $iNzmv.assertServiceError)(error);\n throw new (0, $b62N7.AuthError)({\n name: error.name,\n message: error.message\n });\n } else return undefined;\n };\n\n});\n\n\n\nparcelRegister(\"jpubH\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $e217c4ca59519318$export$2e2bcd8739ae039);\n// Cookie utility functions for secure data storage\n\nvar $fjftb = parcelRequire(\"fjftb\");\nconst $e217c4ca59519318$var$CookieUtils = {\n // Check if user has accepted cookies\n hasAcceptedCookies: function() {\n return this.getCookie('cookieConsent') === 'accepted';\n },\n // Set a cookie with security options\n setCookie: function(name, value, options = {}) {\n // For essential cookies or if user has accepted cookies\n const isEssential = options.essential || false;\n if (!isEssential && !(0, $fjftb.cookiesAccepted)()) {\n console.log('Cookie not set as consent not given:', name);\n return false;\n }\n // Remove our custom option before setting the cookie\n delete options.essential;\n const defaultOptions = {\n path: '/',\n maxAge: 2592000,\n secure: location.protocol === 'https:',\n sameSite: 'strict' // Protect against CSRF\n };\n const cookieOptions = {\n ...defaultOptions,\n ...options\n };\n let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;\n for(const optionKey in cookieOptions){\n if (cookieOptions[optionKey] === true) cookieString += `; ${optionKey}`;\n else if (cookieOptions[optionKey] !== false) cookieString += `; ${optionKey}=${cookieOptions[optionKey]}`;\n }\n document.cookie = cookieString;\n return true;\n },\n // Get a cookie by name\n getCookie: function(name) {\n const matches = document.cookie.match(new RegExp(\"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"));\n return matches ? decodeURIComponent(matches[1]) : undefined;\n },\n // Delete a cookie by name\n deleteCookie: function(name) {\n this.setCookie(name, \"\", {\n maxAge: -1,\n essential: true // Allow deletion regardless of consent\n });\n },\n // Accept cookies and set the consent cookie\n acceptCookies: function() {\n this.setCookie('cookieConsent', 'accepted', {\n essential: true,\n maxAge: 31536000 // 1 year\n });\n // Hide the cookie banner\n const banner = document.getElementById('cookie-banner');\n if (banner) banner.classList.add('hidden');\n return true;\n },\n // Decline cookies\n declineCookies: function() {\n this.setCookie('cookieConsent', 'declined', {\n essential: true,\n maxAge: 31536000 // 1 year\n });\n // Hide the cookie banner\n const banner = document.getElementById('cookie-banner');\n if (banner) banner.classList.add('hidden');\n return true;\n }\n};\nvar $e217c4ca59519318$export$2e2bcd8739ae039 = $e217c4ca59519318$var$CookieUtils;\n\n});\nparcelRegister(\"fjftb\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $b254a14f29d64933$export$2e2bcd8739ae039);\n$parcel$export(module.exports, \"cookiesAccepted\", () => $b254a14f29d64933$export$cccf74d9f2dbedc5);\n// Central cookie management module\nconst $b254a14f29d64933$var$CookieManager = {\n init: function() {\n // Only initialize if consent hasn't been given yet\n if (!this.hasConsentBeenSet()) this.createBanner();\n },\n hasConsentBeenSet: function() {\n return this.getCookie('cookieConsent') !== undefined;\n },\n // Create and attach the banner to the DOM\n createBanner: function() {\n // Only create if it doesn't already exist\n if (document.getElementById('cookie-banner')) return;\n const banner = document.createElement('div');\n banner.id = 'cookie-banner';\n banner.className = 'cookie-banner';\n banner.innerHTML = `\n
\n
\n

\\u{1F36A} We use cookies

\n

This website uses cookies to ensure you get the best experience. Learn more in our Privacy Policy.

\n
\n
\n \n \n
\n
\n `;\n document.body.appendChild(banner);\n this.addStyles();\n this.addEventListeners();\n },\n // Add CSS for the banner\n addStyles: function() {\n if (document.getElementById('cookie-banner-styles')) return;\n const style = document.createElement('style');\n style.id = 'cookie-banner-styles';\n style.textContent = `\n .cookie-banner {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: #7D7D7D;\n color: white;\n padding: 1rem;\n z-index: 9999;\n border-top: 4px solid #000;\n font-family: 'VT323', monospace;\n }\n \n .cookie-content {\n max-width: 1200px;\n margin: 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .cookie-text {\n flex: 1;\n min-width: 300px;\n }\n \n .cookie-buttons {\n display: flex;\n gap: 1rem;\n margin-left: 1rem;\n }\n \n .button-green {\n background-color: #5da444;\n padding: 0.5rem 1rem;\n border: 3px solid #111;\n border-bottom: 6px solid #111;\n cursor: pointer;\n color: white;\n font-family: 'VT323', monospace;\n }\n \n .button-red {\n background-color: #d13112;\n padding: 0.5rem 1rem;\n border: 3px solid #111;\n border-bottom: 6px solid #111;\n cursor: pointer;\n color: white;\n font-family: 'VT323', monospace;\n }\n \n @media (max-width: 768px) {\n .cookie-content {\n flex-direction: column;\n }\n \n .cookie-buttons {\n margin-top: 1rem;\n margin-left: 0;\n width: 100%;\n justify-content: center;\n }\n }\n `;\n document.head.appendChild(style);\n },\n // Add event listeners to the buttons\n addEventListeners: function() {\n const acceptBtn = document.getElementById('accept-cookies');\n const declineBtn = document.getElementById('decline-cookies');\n acceptBtn.addEventListener('click', ()=>{\n this.setCookie('cookieConsent', 'accepted', {\n maxAge: 31536000 // 1 year\n });\n this.hideBanner();\n });\n declineBtn.addEventListener('click', ()=>{\n this.setCookie('cookieConsent', 'declined', {\n maxAge: 31536000 // 1 year\n });\n this.hideBanner();\n });\n },\n // Hide the banner\n hideBanner: function() {\n const banner = document.getElementById('cookie-banner');\n if (banner) {\n banner.style.display = 'none';\n // Optional: remove completely after animation\n setTimeout(()=>{\n banner.parentNode.removeChild(banner);\n }, 500);\n }\n },\n // Cookie utility functions\n setCookie: function(name, value, options = {}) {\n const defaultOptions = {\n path: '/',\n maxAge: 2592000,\n secure: location.protocol === 'https:',\n sameSite: 'strict'\n };\n const cookieOptions = {\n ...defaultOptions,\n ...options\n };\n let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;\n for(const optionKey in cookieOptions){\n if (cookieOptions[optionKey] === true) cookieString += `; ${optionKey}`;\n else if (cookieOptions[optionKey] !== false) cookieString += `; ${optionKey}=${cookieOptions[optionKey]}`;\n }\n document.cookie = cookieString;\n },\n getCookie: function(name) {\n const matches = document.cookie.match(new RegExp(\"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"));\n return matches ? decodeURIComponent(matches[1]) : undefined;\n },\n // Check if cookies have been accepted\n hasAcceptedCookies: function() {\n return this.getCookie('cookieConsent') === 'accepted';\n }\n};\nvar // Export the full manager and also a convenient check function\n$b254a14f29d64933$export$2e2bcd8739ae039 = $b254a14f29d64933$var$CookieManager;\nconst $b254a14f29d64933$export$cccf74d9f2dbedc5 = ()=>$b254a14f29d64933$var$CookieManager.hasAcceptedCookies();\n\n});\n\n\n\n\nparcelRequire(\"jUUxy\");\n\n//# sourceMappingURL=auth.856e296b.js.map\n","import { Amplify } from 'aws-amplify';\nimport { \n signUp, \n confirmSignUp, \n resendSignUpCode, \n signIn, \n signOut,\n resetPassword, \n confirmResetPassword, \n getCurrentUser, \n fetchUserAttributes, \n fetchAuthSession, \n updatePassword, \n updateUserAttributes, \n deleteUser, \n signInWithRedirect\n} from 'aws-amplify/auth';\nimport CookieUtils from './cookie-utils.js';\n\nconst amplifyConfig = {\n Auth: {\n Cognito: {\n // Amazon Cognito Region\n region: 'ap-south-1',\n \n // Amazon Cognito User Pool ID\n userPoolId: 'ap-south-1_Nj3Dolrle',\n \n // Amazon Cognito Web Client ID\n userPoolClientId: '1ceovld7tjvubmpv7a81f6i00v',\n \n // OAuth configuration\n loginWith: {\n oauth: {\n domain: 'terraless-auth.auth.ap-south-1.amazoncognito.com',\n scope: ['email', 'openid', 'profile'],\n redirectSignIn: [window.location.origin],\n redirectSignOut: [window.location.origin],\n responseType: 'code'\n }\n }\n }\n }\n};\n\n// Initialize AWS Amplify\nAmplify.configure(amplifyConfig);\n\n// Simple Authentication module that leverages Cognito for auth operations\nconst Authentication = {\n // Check if user is authenticated\n checkStatus: async function() {\n try {\n const user = await getCurrentUser();\n const session = await fetchAuthSession();\n const attributes = await fetchUserAttributes();\n \n return {\n isAuthenticated: true,\n user: {\n username: user.username,\n email: attributes.email,\n sub: attributes.sub,\n name: attributes.name || attributes.email\n }\n };\n } catch (error) {\n return {\n isAuthenticated: false,\n user: null\n };\n }\n },\n\n // Sign up with email and password (Cognito handles the rest)\n signUp: async function(email, password) {\n try {\n // Use email directly as the username - this will throw an error if email already exists\n \n const result = await signUp({\n username: email,\n password,\n options: {\n userAttributes: {\n email,\n },\n autoSignIn: true\n }\n });\n \n console.log(\"User signup result:\", result);\n \n return {\n success: true,\n message: result.isSignUpComplete ? \n 'Registration successful! You can now sign in.' : \n 'Registration successful! Please check your email for a verification code.',\n userConfirmed: result.isSignUpComplete,\n username: email,\n email: email\n };\n } catch (error) {\n console.error('Error signing up:', error);\n loadingContainer.classList.remove('hidden');\n \n // Check if error is due to email already existing\n if (error.name === 'UsernameExistsException' || \n error.code === 'UsernameExistsException' ||\n (error.message && error.message.includes(\"User already exists\"))) {\n return {\n success: false,\n isExistingEmail: true,\n message: 'An account with this email already exists. Please sign in instead.'\n };\n }\n \n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Confirm signup\n confirmSignUp: async function(username, code) {\n try {\n await confirmSignUp({\n username,\n confirmationCode: code\n });\n \n return {\n success: true,\n message: 'Account confirmed successfully! You can now sign in.',\n username: username\n };\n } catch (error) {\n console.error('Error confirming sign up:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Resend confirmation code\n resendConfirmationCode: async function(username) {\n try {\n await resendSignUpCode({\n username\n });\n \n return {\n success: true,\n message: 'Confirmation code has been resent successfully! Please check your email.'\n };\n } catch (error) {\n console.error('Error resending confirmation code:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Sign in with email and password\n signIn: async function(email, password) {\n try {\n // Since we're using email as username, no need for lookup\n const username = email;\n \n const { isSignedIn, nextStep } = await signIn({\n username,\n password\n });\n \n // Check for challenges\n if (nextStep && nextStep.signInStep !== 'DONE') {\n return {\n success: false,\n challengeName: nextStep.signInStep,\n message: 'Additional action required to complete sign-in.',\n user: {\n username\n }\n };\n }\n \n // Get user attributes after successful sign-in\n const attributes = await fetchUserAttributes();\n \n // Set authentication cookie (more secure than localStorage)\n CookieUtils.setCookie('isAuthenticated', 'true', {\n maxAge: 60 * 60 * 24 * 7, // 7 days\n secure: true,\n sameSite: 'strict'\n });\n \n return {\n success: true,\n message: 'Login successful!',\n user: {\n username,\n email: attributes.email,\n sub: attributes.sub\n }\n };\n } catch (error) {\n console.error('Error signing in:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Sign in with social provider\n federatedSignIn: async function(provider) {\n try {\n await signInWithRedirect({\n provider: provider.toLowerCase(),\n customState: window.location.origin\n });\n \n // This will redirect to the provider's login page,\n // so the code below won't execute until after redirect back\n return {\n success: true,\n message: `Redirecting to ${provider} login...`\n };\n } catch (error) {\n console.error(`Error signing in with ${provider}:`, error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Sign out\n signOut: async function() {\n try {\n await signOut();\n \n // Clear authentication cookie\n CookieUtils.deleteCookie('isAuthenticated');\n CookieUtils.deleteCookie('serverStatus');\n \n return {\n success: true,\n message: 'Logged out successfully!'\n };\n } catch (error) {\n console.error('Error signing out:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Forgot password - request reset code\n forgotPassword: async function(email) {\n try {\n // Since we're using email as username, they are the same\n \n const { nextStep } = await resetPassword({\n email\n });\n \n return {\n success: true,\n message: 'Password reset code sent. Please check your email.',\n email: email\n };\n } catch (error) {\n console.error('Error in forgot password:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Reset password with verification code\n resetPassword: async function(email, code, newPassword) {\n try {\n await confirmResetPassword({\n email,\n confirmationCode: code,\n newPassword\n });\n \n return {\n success: true,\n message: 'Password has been reset successfully. You can now log in with your new password.'\n };\n } catch (error) {\n console.error('Error in reset password:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Get user-friendly authentication error messages\n getAuthErrorMessage: function(error) {\n const errorCode = error.code || error.name;\n \n switch (errorCode) {\n case 'UserNotFoundException':\n return 'No account found with this username or email.';\n case 'NotAuthorizedException':\n return 'Incorrect username or password. Please try again.';\n case 'InvalidParameterException':\n return 'Invalid input. Please check your information and try again.';\n case 'UsernameExistsException':\n return 'An account with this username already exists.';\n case 'CodeMismatchException':\n return 'Invalid verification code. Please try again.';\n case 'UserNotConfirmedException':\n return 'Account not confirmed. Please check your email for confirmation code or go to the confirmation page.';\n case 'InvalidPasswordException':\n return 'Password does not meet requirements. Password must be at least 8 characters long with uppercase and lowercase letters, numbers, and special characters.';\n case 'LimitExceededException':\n return 'Attempt limit exceeded. Please try again later.';\n case 'ExpiredCodeException':\n return 'Verification code has expired. Please request a new one.';\n case 'NetworkError':\n return 'Network error. Please check your internet connection and try again.';\n case 'ResourceNotFoundException':\n return 'The requested resource was not found.';\n default:\n return error.message || 'An error occurred during authentication. Please try again.';\n }\n },\n\n // Get current authenticated user data\n getCurrentUser: async function() {\n try {\n const currentUser = await getCurrentUser();\n const attributes = await fetchUserAttributes();\n \n return {\n success: true,\n user: {\n username: currentUser.username,\n email: attributes.email,\n name: attributes.name || attributes.email,\n attributes: attributes\n }\n };\n } catch (error) {\n console.error('Error getting current user:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error),\n user: null\n };\n }\n },\n\n // Get JWT token for API calls\n getAuthToken: async function() {\n try {\n const session = await fetchAuthSession();\n return session.tokens.idToken.toString();\n } catch (error) {\n console.error('Error getting auth token:', error);\n return null;\n }\n },\n\n // Change the password for the currently authenticated user\n changePassword: async function(oldPassword, newPassword) {\n try {\n await updatePassword({\n oldPassword,\n newPassword\n });\n return {\n success: true,\n message: 'Password changed successfully!'\n };\n } catch (error) {\n console.error('Error changing password:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Update user attributes for the currently authenticated user\n updateUserAttributes: async function(attributes) {\n try {\n await updateUserAttributes({\n userAttributes: attributes\n });\n return {\n success: true,\n message: 'User attributes updated successfully!'\n };\n } catch (error) {\n console.error('Error updating user attributes:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n },\n\n // Delete the currently authenticated user's account\n deleteAccount: async function() {\n try {\n await deleteUser();\n return {\n success: true,\n message: 'Account deleted successfully!'\n };\n } catch (error) {\n console.error('Error deleting account:', error);\n return {\n success: false,\n message: this.getAuthErrorMessage(error)\n };\n }\n }\n};\n\n// Initialize page based on URL\nfunction initPage() {\n const path = window.location.pathname;\n const pageName = path.split('/').pop();\n \n // Check if user is authenticated\n Authentication.checkStatus().then(result => {\n const isAuthenticated = result.isAuthenticated;\n \n // Update auth-dependent UI elements\n updateAuthUI(isAuthenticated);\n \n // Initialize page-specific functionality\n if (pageName === 'auth.html' || pageName === '') {\n setupLoginPage();\n } else if (pageName === 'signup.html') {\n setupSignupPage();\n } else if (pageName === 'forgot-password.html') {\n setupForgotPasswordPage();\n }\n \n // Set up logout button on all pages\n setupLogoutButton();\n });\n}\n\n// Function to update UI elements based on authentication state\nfunction updateAuthUI(isAuthenticated) {\n const authLinks = document.querySelectorAll('.auth-dependent');\n \n if (authLinks) {\n authLinks.forEach(link => {\n if (isAuthenticated) {\n link.classList.remove('hidden');\n } else {\n link.classList.add('hidden');\n }\n });\n }\n \n const nonAuthLinks = document.querySelectorAll('.non-auth-dependent');\n \n if (nonAuthLinks) {\n nonAuthLinks.forEach(link => {\n if (isAuthenticated) {\n link.classList.add('hidden');\n } else {\n link.classList.remove('hidden');\n }\n });\n }\n}\n\n// Setup login page\nfunction setupLoginPage() {\n const loginForm = document.getElementById('login-form');\n if (!loginForm) return;\n \n const errorMessage = document.getElementById('error-message');\n const loadingContainer = document.getElementById('loading-container');\n \n // Set up login form submission\n loginForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n \n const email = document.getElementById('email').value;\n const password = document.getElementById('password').value;\n \n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n \n // Disable the submit button\n const submitButton = document.getElementById('submit-button');\n if (submitButton) submitButton.disabled = true;\n \n // Attempt to sign in\n const result = await Authentication.signIn(email, password);\n \n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n \n if (result.success) {\n // Redirect on successful login\n window.location.href = 'index.html';\n } else {\n // Check for UserNotConfirmedException\n if (result.message && result.message.includes('not confirmed')) {\n // Store the email for the confirmation page\n localStorage.setItem('signup_email', email);\n \n // Ask user if they want to go to confirmation page\n if (confirm('Your account needs to be confirmed. Go to confirmation page?')) {\n window.location.href = 'confirmation.html?email=' + encodeURIComponent(email);\n return;\n }\n }\n \n // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n }\n });\n \n // Set up social login buttons\n const googleButton = document.getElementById('google-signin');\n if (googleButton) {\n googleButton.addEventListener('click', async function() {\n await Authentication.federatedSignIn('Google');\n });\n }\n \n const amazonButton = document.getElementById('amazon-signin');\n if (amazonButton) {\n amazonButton.addEventListener('click', async function() {\n await Authentication.federatedSignIn('Amazon');\n });\n }\n}\n\n// Setup signup page\nfunction setupSignupPage() {\n const signupForm = document.getElementById('signup-form');\n if (!signupForm) return;\n \n const errorMessage = document.getElementById('error-message');\n const loadingContainer = document.getElementById('loading-container');\n \n // Set up signup form submission\n signupForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n \n const email = document.getElementById('email').value;\n const password = document.getElementById('password').value;\n const confirmPassword = document.getElementById('confirm-password').value;\n \n // Validate passwords match\n if (password !== confirmPassword) {\n if (errorMessage) {\n errorMessage.textContent = 'Passwords do not match.';\n errorMessage.classList.remove('hidden');\n }\n return;\n }\n \n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n \n // Disable the submit button\n const submitButton = document.getElementById('signup-button');\n if (submitButton) submitButton.disabled = true;\n \n // Attempt to sign up\n console.log(email, password);\n const result = await Authentication.signUp(email, password);\n console.log(result);\n \n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n \n if (result.success) {\n // Store the email for the confirmation page\n localStorage.setItem('signup_email', email);\n \n // Store password temporarily for auto-signin after confirmation\n localStorage.setItem('temp_password_' + email, password);\n \n // Check if user needs confirmation (in case auto sign-in is disabled)\n if (!result.userConfirmed) {\n // Redirect to confirmation page\n window.location.href = 'confirmation.html?email=' + encodeURIComponent(email);\n } else {\n // Auto sign-in enabled, redirect to login page\n window.location.href = 'auth.html';\n }\n } else {\n // Check if this is an existing email case\n if (result.isExistingEmail) {\n // Store the email for the login page\n localStorage.setItem('login_email', email);\n \n // Provide a clear message and option to redirect\n if (confirm(result.message + \" Would you like to go to the login page?\")) {\n window.location.href = 'auth.html';\n return;\n }\n }\n \n // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n }\n });\n}\n\n// Setup forgot password page\nfunction setupForgotPasswordPage() {\n const requestForm = document.getElementById('request-code-form');\n const resetForm = document.getElementById('reset-password-form');\n \n if (!requestForm && !resetForm) return;\n \n // Setup request password reset form\n if (requestForm) {\n const errorMessage = document.getElementById('request-error-message');\n const loadingContainer = document.getElementById('request-loading-container');\n \n requestForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n \n const username = document.getElementById('email').value;\n \n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n \n // Disable the submit button\n const submitButton = document.getElementById('request-button');\n if (submitButton) submitButton.disabled = true;\n \n // Attempt to send reset code\n const result = await Authentication.forgotPassword(username);\n \n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n \n if (result.success) {\n // Store username for reset form\n sessionStorage.setItem('resetUsername', username);\n \n // Show reset form and hide request form\n requestForm.classList.add('hidden');\n if (resetForm) resetForm.classList.remove('hidden');\n } else {\n // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n }\n });\n }\n \n // Setup reset password form\n if (resetForm) {\n const errorMessage = document.getElementById('reset-error-message');\n const successMessage = document.getElementById('reset-success-message');\n const loadingContainer = document.getElementById('reset-loading-container');\n \n // Try to get username from session storage\n const username = sessionStorage.getItem('resetUsername');\n \n resetForm.addEventListener('submit', async function(e) {\n e.preventDefault();\n \n const code = document.getElementById('verification-code').value;\n const newPassword = document.getElementById('new-password').value;\n \n // Show loading state\n if (errorMessage) errorMessage.classList.add('hidden');\n if (successMessage) successMessage.classList.add('hidden');\n if (loadingContainer) loadingContainer.classList.remove('hidden');\n \n // Disable the submit button\n const submitButton = document.getElementById('reset-button');\n if (submitButton) submitButton.disabled = true;\n \n // Attempt to reset password\n const result = await Authentication.resetPassword(username, code, newPassword);\n \n // Hide loading state\n if (loadingContainer) loadingContainer.classList.add('hidden');\n if (submitButton) submitButton.disabled = false;\n \n if (result.success) {\n // Show success message\n if (successMessage) {\n successMessage.textContent = result.message;\n successMessage.classList.remove('hidden');\n }\n \n // Redirect to login after a delay\n setTimeout(() => {\n window.location.href = 'auth.html';\n }, 2000);\n } else {\n // Show error message\n if (errorMessage) {\n errorMessage.textContent = result.message;\n errorMessage.classList.remove('hidden');\n }\n }\n });\n }\n}\n\n// Setup logout button\nfunction setupLogoutButton() {\n const logoutButton = document.getElementById('logout-button');\n if (!logoutButton) return;\n \n logoutButton.addEventListener('click', async function() {\n await Authentication.signOut();\n window.location.href = 'index.html';\n });\n}\n\n// Initialize the page when DOM is loaded\ndocument.addEventListener('DOMContentLoaded', initPage);\n\n// Export the authentication module\n\nconst loadingContainer = document.getElementById('loading-container');\n document.addEventListener('DOMContentLoaded', () => {\n if (loadingContainer) {\n loadingContainer.classList.add('hidden');\n }\n }); \n\nexport { Authentication }; \n","import { Amplify, CookieStorage, defaultStorage } from '@aws-amplify/core';\nimport { parseAmplifyConfig } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolsTokenProvider, cognitoCredentialsProvider } from '@aws-amplify/auth/cognito';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DefaultAmplify = {\n /**\n * Configures Amplify with the {@link resourceConfig} and {@link libraryOptions}.\n *\n * @param resourceConfig The {@link ResourcesConfig} object that is typically imported from the\n * `amplifyconfiguration.json` file. It can also be an object literal created inline when calling `Amplify.configure`.\n * @param libraryOptions The {@link LibraryOptions} additional options for the library.\n *\n * @example\n * import config from './amplifyconfiguration.json';\n *\n * Amplify.configure(config);\n */\n configure(resourceConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourceConfig);\n // If no Auth config is provided, no special handling will be required, configure as is.\n // Otherwise, we can assume an Auth config is provided from here on.\n if (!resolvedResourceConfig.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If Auth options are provided, always just configure as is.\n // Otherwise, we can assume no Auth libraryOptions were provided from here on.\n if (libraryOptions?.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If no Auth libraryOptions were previously configured, then always add default providers.\n if (!Amplify.libraryOptions.Auth) {\n cognitoUserPoolsTokenProvider.setAuthConfig(resolvedResourceConfig.Auth);\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions?.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n Amplify.configure(resolvedResourceConfig, {\n ...libraryOptions,\n Auth: {\n tokenProvider: cognitoUserPoolsTokenProvider,\n credentialsProvider: cognitoCredentialsProvider,\n },\n });\n return;\n }\n // At this point, Auth libraryOptions would have been previously configured and no overriding\n // Auth options were given, so we should preserve the currently configured Auth libraryOptions.\n if (libraryOptions) {\n // If ssr is provided through libraryOptions, we should respect the intentional reconfiguration.\n if (libraryOptions.ssr !== undefined) {\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n }\n Amplify.configure(resolvedResourceConfig, {\n Auth: Amplify.libraryOptions.Auth,\n ...libraryOptions,\n });\n return;\n }\n // Finally, if there were no libraryOptions given at all, we should simply not touch the currently\n // configured libraryOptions.\n Amplify.configure(resolvedResourceConfig);\n },\n /**\n * Returns the {@link ResourcesConfig} object passed in as the `resourceConfig` parameter when calling\n * `Amplify.configure`.\n *\n * @returns An {@link ResourcesConfig} object.\n */\n getConfig() {\n return Amplify.getConfig();\n },\n};\n\nexport { DefaultAmplify };\n//# sourceMappingURL=initSingleton.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify, CookieStorage, defaultStorage, } from '@aws-amplify/core';\nimport { parseAmplifyConfig, } from '@aws-amplify/core/internals/utils';\nimport { cognitoCredentialsProvider, cognitoUserPoolsTokenProvider, } from './auth/cognito';\nexport const DefaultAmplify = {\n /**\n * Configures Amplify with the {@link resourceConfig} and {@link libraryOptions}.\n *\n * @param resourceConfig The {@link ResourcesConfig} object that is typically imported from the\n * `amplifyconfiguration.json` file. It can also be an object literal created inline when calling `Amplify.configure`.\n * @param libraryOptions The {@link LibraryOptions} additional options for the library.\n *\n * @example\n * import config from './amplifyconfiguration.json';\n *\n * Amplify.configure(config);\n */\n configure(resourceConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourceConfig);\n // If no Auth config is provided, no special handling will be required, configure as is.\n // Otherwise, we can assume an Auth config is provided from here on.\n if (!resolvedResourceConfig.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If Auth options are provided, always just configure as is.\n // Otherwise, we can assume no Auth libraryOptions were provided from here on.\n if (libraryOptions?.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If no Auth libraryOptions were previously configured, then always add default providers.\n if (!Amplify.libraryOptions.Auth) {\n cognitoUserPoolsTokenProvider.setAuthConfig(resolvedResourceConfig.Auth);\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions?.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n Amplify.configure(resolvedResourceConfig, {\n ...libraryOptions,\n Auth: {\n tokenProvider: cognitoUserPoolsTokenProvider,\n credentialsProvider: cognitoCredentialsProvider,\n },\n });\n return;\n }\n // At this point, Auth libraryOptions would have been previously configured and no overriding\n // Auth options were given, so we should preserve the currently configured Auth libraryOptions.\n if (libraryOptions) {\n // If ssr is provided through libraryOptions, we should respect the intentional reconfiguration.\n if (libraryOptions.ssr !== undefined) {\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n }\n Amplify.configure(resolvedResourceConfig, {\n Auth: Amplify.libraryOptions.Auth,\n ...libraryOptions,\n });\n return;\n }\n // Finally, if there were no libraryOptions given at all, we should simply not touch the currently\n // configured libraryOptions.\n Amplify.configure(resolvedResourceConfig);\n },\n /**\n * Returns the {@link ResourcesConfig} object passed in as the `resourceConfig` parameter when calling\n * `Amplify.configure`.\n *\n * @returns An {@link ResourcesConfig} object.\n */\n getConfig() {\n return Amplify.getConfig();\n },\n};\n","import { Hub, AMPLIFY_SYMBOL } from '../Hub/index.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\nimport '../utils/getClientInfo/getClientInfo.mjs';\nimport '../utils/retry/retry.mjs';\nimport { deepFreeze } from '../utils/deepFreeze.mjs';\nimport '../parseAWSExports.mjs';\nimport { ADD_OAUTH_LISTENER } from './constants.mjs';\nimport 'uuid';\nimport { parseAmplifyConfig } from '../utils/parseAmplifyConfig.mjs';\nimport './Auth/utils/errorHelpers.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport '../Platform/index.mjs';\nimport '../Platform/types.mjs';\nimport '../BackgroundProcessManager/types.mjs';\nimport '../Reachability/Reachability.mjs';\nimport '../utils/sessionListener/index.mjs';\nimport { AuthClass } from './Auth/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AmplifyClass {\n constructor() {\n this.oAuthListener = undefined;\n this.resourcesConfig = {};\n this.libraryOptions = {};\n this.Auth = new AuthClass();\n }\n /**\n * Configures Amplify for use with your back-end resources.\n *\n * @remarks\n * This API does not perform any merging of either `resourcesConfig` or `libraryOptions`. The most recently\n * provided values will be used after configuration.\n *\n * @remarks\n * `configure` can be used to specify additional library options where available for supported categories.\n *\n * @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.\n * @param libraryOptions - Additional options for customizing the behavior of the library.\n */\n configure(resourcesConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourcesConfig);\n this.resourcesConfig = resolvedResourceConfig;\n if (libraryOptions) {\n this.libraryOptions = libraryOptions;\n }\n // Make resource config immutable\n this.resourcesConfig = deepFreeze(this.resourcesConfig);\n this.Auth.configure(this.resourcesConfig.Auth, this.libraryOptions.Auth);\n Hub.dispatch('core', {\n event: 'configure',\n data: this.resourcesConfig,\n }, 'Configure', AMPLIFY_SYMBOL);\n this.notifyOAuthListener();\n }\n /**\n * Provides access to the current back-end resource configuration for the Library.\n *\n * @returns Returns the immutable back-end resource configuration.\n */\n getConfig() {\n return this.resourcesConfig;\n }\n /** @internal */\n [ADD_OAUTH_LISTENER](listener) {\n if (this.resourcesConfig.Auth?.Cognito.loginWith?.oauth) {\n // when Amplify has been configured with a valid OAuth config while adding the listener, run it directly\n listener(this.resourcesConfig.Auth?.Cognito);\n }\n else {\n // otherwise register the listener and run it later when Amplify gets configured with a valid oauth config\n this.oAuthListener = listener;\n }\n }\n notifyOAuthListener() {\n if (!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth ||\n !this.oAuthListener) {\n return;\n }\n this.oAuthListener(this.resourcesConfig.Auth?.Cognito);\n // the listener should only be notified once with a valid oauth config\n this.oAuthListener = undefined;\n }\n}\n/**\n * The `Amplify` utility is used to configure the library.\n *\n * @remarks\n * `Amplify` orchestrates cross-category communication within the library.\n */\nconst Amplify = new AmplifyClass();\n\nexport { Amplify, AmplifyClass };\n//# sourceMappingURL=Amplify.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AMPLIFY_SYMBOL, Hub } from '../Hub';\nimport { deepFreeze } from '../utils';\nimport { parseAmplifyConfig } from '../libraryUtils';\nimport { AuthClass } from './Auth';\nimport { ADD_OAUTH_LISTENER } from './constants';\nexport class AmplifyClass {\n constructor() {\n this.oAuthListener = undefined;\n this.resourcesConfig = {};\n this.libraryOptions = {};\n this.Auth = new AuthClass();\n }\n /**\n * Configures Amplify for use with your back-end resources.\n *\n * @remarks\n * This API does not perform any merging of either `resourcesConfig` or `libraryOptions`. The most recently\n * provided values will be used after configuration.\n *\n * @remarks\n * `configure` can be used to specify additional library options where available for supported categories.\n *\n * @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.\n * @param libraryOptions - Additional options for customizing the behavior of the library.\n */\n configure(resourcesConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourcesConfig);\n this.resourcesConfig = resolvedResourceConfig;\n if (libraryOptions) {\n this.libraryOptions = libraryOptions;\n }\n // Make resource config immutable\n this.resourcesConfig = deepFreeze(this.resourcesConfig);\n this.Auth.configure(this.resourcesConfig.Auth, this.libraryOptions.Auth);\n Hub.dispatch('core', {\n event: 'configure',\n data: this.resourcesConfig,\n }, 'Configure', AMPLIFY_SYMBOL);\n this.notifyOAuthListener();\n }\n /**\n * Provides access to the current back-end resource configuration for the Library.\n *\n * @returns Returns the immutable back-end resource configuration.\n */\n getConfig() {\n return this.resourcesConfig;\n }\n /** @internal */\n [ADD_OAUTH_LISTENER](listener) {\n if (this.resourcesConfig.Auth?.Cognito.loginWith?.oauth) {\n // when Amplify has been configured with a valid OAuth config while adding the listener, run it directly\n listener(this.resourcesConfig.Auth?.Cognito);\n }\n else {\n // otherwise register the listener and run it later when Amplify gets configured with a valid oauth config\n this.oAuthListener = listener;\n }\n }\n notifyOAuthListener() {\n if (!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth ||\n !this.oAuthListener) {\n return;\n }\n this.oAuthListener(this.resourcesConfig.Auth?.Cognito);\n // the listener should only be notified once with a valid oauth config\n this.oAuthListener = undefined;\n }\n}\n/**\n * The `Amplify` utility is used to configure the library.\n *\n * @remarks\n * `Amplify` orchestrates cross-category communication within the library.\n */\nexport const Amplify = new AmplifyClass();\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { NO_HUBCALLBACK_PROVIDED_EXCEPTION } from '../constants.mjs';\nimport { AmplifyError } from '../errors/AmplifyError.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined'\n ? Symbol('amplify_default')\n : '@@amplify_default');\nconst logger = new ConsoleLogger('Hub');\nclass HubClass {\n constructor(name) {\n this.listeners = new Map();\n this.protectedChannels = [\n 'core',\n 'auth',\n 'api',\n 'analytics',\n 'interactions',\n 'pubsub',\n 'storage',\n 'ui',\n 'xr',\n ];\n this.name = name;\n }\n /**\n * Used internally to remove a Hub listener.\n *\n * @remarks\n * This private method is for internal use only. Instead of calling Hub.remove, call the result of Hub.listen.\n */\n _remove(channel, listener) {\n const holder = this.listeners.get(channel);\n if (!holder) {\n logger.warn(`No listeners for ${channel}`);\n return;\n }\n this.listeners.set(channel, [\n ...holder.filter(({ callback }) => callback !== listener),\n ]);\n }\n dispatch(channel, payload, source, ampSymbol) {\n if (typeof channel === 'string' &&\n this.protectedChannels.indexOf(channel) > -1) {\n const hasAccess = ampSymbol === AMPLIFY_SYMBOL;\n if (!hasAccess) {\n logger.warn(`WARNING: ${channel} is protected and dispatching on it can have unintended consequences`);\n }\n }\n const capsule = {\n channel,\n payload: { ...payload },\n source,\n patternInfo: [],\n };\n try {\n this._toListeners(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n }\n listen(channel, callback, listenerName = 'noname') {\n let cb;\n if (typeof callback !== 'function') {\n throw new AmplifyError({\n name: NO_HUBCALLBACK_PROVIDED_EXCEPTION,\n message: 'No callback supplied to Hub',\n });\n }\n else {\n // Needs to be casted as a more generic type\n cb = callback;\n }\n let holder = this.listeners.get(channel);\n if (!holder) {\n holder = [];\n this.listeners.set(channel, holder);\n }\n holder.push({\n name: listenerName,\n callback: cb,\n });\n return () => {\n this._remove(channel, cb);\n };\n }\n _toListeners(capsule) {\n const { channel, payload } = capsule;\n const holder = this.listeners.get(channel);\n if (holder) {\n holder.forEach(listener => {\n logger.debug(`Dispatching to ${channel} with `, payload);\n try {\n listener.callback(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n }\n}\n/* We export a __default__ instance of HubClass to use it as a\npseudo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events. */\nconst Hub = new HubClass('__default__');\n/**\n * @internal\n *\n * Internal hub used for core Amplify functionality. Not intended for use outside of Amplify.\n *\n */\nconst HubInternal = new HubClass('internal-hub');\n\nexport { AMPLIFY_SYMBOL, Hub, HubClass, HubInternal };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '../Logger';\nimport { NO_HUBCALLBACK_PROVIDED_EXCEPTION } from '../constants';\nimport { AmplifyError } from '../errors';\nexport const AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined'\n ? Symbol('amplify_default')\n : '@@amplify_default');\nconst logger = new ConsoleLogger('Hub');\nexport class HubClass {\n constructor(name) {\n this.listeners = new Map();\n this.protectedChannels = [\n 'core',\n 'auth',\n 'api',\n 'analytics',\n 'interactions',\n 'pubsub',\n 'storage',\n 'ui',\n 'xr',\n ];\n this.name = name;\n }\n /**\n * Used internally to remove a Hub listener.\n *\n * @remarks\n * This private method is for internal use only. Instead of calling Hub.remove, call the result of Hub.listen.\n */\n _remove(channel, listener) {\n const holder = this.listeners.get(channel);\n if (!holder) {\n logger.warn(`No listeners for ${channel}`);\n return;\n }\n this.listeners.set(channel, [\n ...holder.filter(({ callback }) => callback !== listener),\n ]);\n }\n dispatch(channel, payload, source, ampSymbol) {\n if (typeof channel === 'string' &&\n this.protectedChannels.indexOf(channel) > -1) {\n const hasAccess = ampSymbol === AMPLIFY_SYMBOL;\n if (!hasAccess) {\n logger.warn(`WARNING: ${channel} is protected and dispatching on it can have unintended consequences`);\n }\n }\n const capsule = {\n channel,\n payload: { ...payload },\n source,\n patternInfo: [],\n };\n try {\n this._toListeners(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n }\n listen(channel, callback, listenerName = 'noname') {\n let cb;\n if (typeof callback !== 'function') {\n throw new AmplifyError({\n name: NO_HUBCALLBACK_PROVIDED_EXCEPTION,\n message: 'No callback supplied to Hub',\n });\n }\n else {\n // Needs to be casted as a more generic type\n cb = callback;\n }\n let holder = this.listeners.get(channel);\n if (!holder) {\n holder = [];\n this.listeners.set(channel, holder);\n }\n holder.push({\n name: listenerName,\n callback: cb,\n });\n return () => {\n this._remove(channel, cb);\n };\n }\n _toListeners(capsule) {\n const { channel, payload } = capsule;\n const holder = this.listeners.get(channel);\n if (holder) {\n holder.forEach(listener => {\n logger.debug(`Dispatching to ${channel} with `, payload);\n try {\n listener.callback(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n }\n}\n/* We export a __default__ instance of HubClass to use it as a\npseudo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events. */\nexport const Hub = new HubClass('__default__');\n/**\n * @internal\n *\n * Internal hub used for core Amplify functionality. Not intended for use outside of Amplify.\n *\n */\nexport const HubInternal = new HubClass('internal-hub');\n","import { AWS_CLOUDWATCH_CATEGORY } from '../constants.mjs';\nimport { LogType } from './types.mjs';\n\n/* eslint-disable no-console */\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nclass ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {\n if (type === LogType.INFO && console.info) {\n log = console.info.bind(console);\n }\n if (type === LogType.DEBUG && console.debug) {\n log = console.debug.bind(console);\n }\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nConsoleLogger.LOG_LEVEL = null;\nConsoleLogger.BIND_ALL_LOG_LEVELS = false;\n\nexport { ConsoleLogger };\n//# sourceMappingURL=ConsoleLogger.mjs.map\n","/* eslint-disable no-console */\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AWS_CLOUDWATCH_CATEGORY } from '../constants';\nimport { LogType } from './types';\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nexport class ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {\n if (type === LogType.INFO && console.info) {\n log = console.info.bind(console);\n }\n if (type === LogType.DEBUG && console.debug) {\n log = console.debug.bind(console);\n }\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nConsoleLogger.LOG_LEVEL = null;\nConsoleLogger.BIND_ALL_LOG_LEVELS = false;\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Logging constants\nconst AWS_CLOUDWATCH_CATEGORY = 'Logging';\nconst USER_AGENT_HEADER = 'x-amz-user-agent';\n// Error exception code constants\nconst NO_HUBCALLBACK_PROVIDED_EXCEPTION = 'NoHubcallbackProvidedException';\n\nexport { AWS_CLOUDWATCH_CATEGORY, NO_HUBCALLBACK_PROVIDED_EXCEPTION, USER_AGENT_HEADER };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Logging constants\nexport const AWS_CLOUDWATCH_CATEGORY = 'Logging';\nexport const USER_AGENT_HEADER = 'x-amz-user-agent';\n// Error exception code constants\nexport const NO_HUBCALLBACK_PROVIDED_EXCEPTION = 'NoHubcallbackProvidedException';\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar LogType;\n(function (LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})(LogType || (LogType = {}));\n\nexport { LogType };\n//# sourceMappingURL=types.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var LogType;\n(function (LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})(LogType || (LogType = {}));\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AmplifyError extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */\n constructor({ message, name, recoverySuggestion, underlyingError, }) {\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AmplifyError;\n Object.setPrototypeOf(this, AmplifyError.prototype);\n }\n}\n\nexport { AmplifyError };\n//# sourceMappingURL=AmplifyError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport class AmplifyError extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */\n constructor({ message, name, recoverySuggestion, underlyingError, }) {\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AmplifyError;\n Object.setPrototypeOf(this, AmplifyError.prototype);\n }\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst deepFreeze = (object) => {\n const propNames = Reflect.ownKeys(object);\n for (const name of propNames) {\n const value = object[name];\n if ((value && typeof value === 'object') || typeof value === 'function') {\n deepFreeze(value);\n }\n }\n return Object.freeze(object);\n};\n\nexport { deepFreeze };\n//# sourceMappingURL=deepFreeze.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const deepFreeze = (object) => {\n const propNames = Reflect.ownKeys(object);\n for (const name of propNames) {\n const value = object[name];\n if ((value && typeof value === 'object') || typeof value === 'function') {\n deepFreeze(value);\n }\n }\n return Object.freeze(object);\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ADD_OAUTH_LISTENER = Symbol('oauth-listener');\n\nexport { ADD_OAUTH_LISTENER };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const ADD_OAUTH_LISTENER = Symbol('oauth-listener');\n","import { parseAWSExports } from '../parseAWSExports.mjs';\nimport { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.\n *\n * @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.\n * @return A ResourcesConfig for the provided configuration object.\n */\nconst parseAmplifyConfig = (amplifyConfig) => {\n if (Object.keys(amplifyConfig).some(key => key.startsWith('aws_'))) {\n return parseAWSExports(amplifyConfig);\n }\n else if (isAmplifyOutputs(amplifyConfig)) {\n return parseAmplifyOutputs(amplifyConfig);\n }\n else {\n return amplifyConfig;\n }\n};\n\nexport { parseAmplifyConfig };\n//# sourceMappingURL=parseAmplifyConfig.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseAWSExports } from '../parseAWSExports';\nimport { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs';\n/**\n * Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.\n *\n * @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.\n * @return A ResourcesConfig for the provided configuration object.\n */\nexport const parseAmplifyConfig = (amplifyConfig) => {\n if (Object.keys(amplifyConfig).some(key => key.startsWith('aws_'))) {\n return parseAWSExports(amplifyConfig);\n }\n else if (isAmplifyOutputs(amplifyConfig)) {\n return parseAmplifyOutputs(amplifyConfig);\n }\n else {\n return amplifyConfig;\n }\n};\n","import { ConsoleLogger } from './Logger/ConsoleLogger.mjs';\nimport { AmplifyError } from './errors/AmplifyError.mjs';\nimport './types/errors.mjs';\nimport './errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('parseAWSExports');\nconst authTypeMapping = {\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n OPENID_CONNECT: 'oidc',\n NONE: 'none',\n AWS_LAMBDA: 'lambda',\n // `LAMBDA` is an incorrect value that was added during the v6 rewrite.\n // Keeping it as a valid value until v7 to prevent breaking customers who might\n // be relying on it as a workaround.\n // ref: https://github.com/aws-amplify/amplify-js/pull/12922\n // TODO: @v7 remove next line\n LAMBDA: 'lambda',\n};\n/**\n * Converts the object imported from `aws-exports.js` or `amplifyconfiguration.json` files generated by\n * the Amplify CLI into an object that conforms to the {@link ResourcesConfig}.\n *\n * @param config A configuration object imported from `aws-exports.js` or `amplifyconfiguration.json`.\n *\n * @returns An object that conforms to the {@link ResourcesConfig} .\n */\nconst parseAWSExports = (config = {}) => {\n if (!Object.prototype.hasOwnProperty.call(config, 'aws_project_region')) {\n throw new AmplifyError({\n name: 'InvalidParameterException',\n message: 'Invalid config parameter.',\n recoverySuggestion: 'Ensure passing the config object imported from `amplifyconfiguration.json`.',\n });\n }\n const { aws_appsync_apiKey, aws_appsync_authenticationType, aws_appsync_graphqlEndpoint, aws_appsync_region, aws_bots_config, aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration, aws_cognito_mfa_types, aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms, aws_cognito_signup_attributes, aws_cognito_social_providers, aws_cognito_username_attributes, aws_mandatory_sign_in, aws_mobile_analytics_app_id, aws_mobile_analytics_app_region, aws_user_files_s3_bucket, aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id, aws_user_pools_web_client_id, geo, oauth, predictions, aws_cloud_logic_custom, Notifications, modelIntrospection, } = config;\n const amplifyConfig = {};\n // Analytics\n if (aws_mobile_analytics_app_id) {\n amplifyConfig.Analytics = {\n Pinpoint: {\n appId: aws_mobile_analytics_app_id,\n region: aws_mobile_analytics_app_region,\n },\n };\n }\n // Notifications\n const { InAppMessaging, Push } = Notifications ?? {};\n if (InAppMessaging?.AWSPinpoint || Push?.AWSPinpoint) {\n if (InAppMessaging?.AWSPinpoint) {\n const { appId, region } = InAppMessaging.AWSPinpoint;\n amplifyConfig.Notifications = {\n InAppMessaging: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n if (Push?.AWSPinpoint) {\n const { appId, region } = Push.AWSPinpoint;\n amplifyConfig.Notifications = {\n ...amplifyConfig.Notifications,\n PushNotification: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n }\n // Interactions\n if (Array.isArray(aws_bots_config)) {\n amplifyConfig.Interactions = {\n LexV1: Object.fromEntries(aws_bots_config.map(bot => [bot.name, bot])),\n };\n }\n // API\n if (aws_appsync_graphqlEndpoint) {\n const defaultAuthMode = authTypeMapping[aws_appsync_authenticationType];\n if (!defaultAuthMode) {\n logger.debug(`Invalid authentication type ${aws_appsync_authenticationType}. Falling back to IAM.`);\n }\n amplifyConfig.API = {\n GraphQL: {\n endpoint: aws_appsync_graphqlEndpoint,\n apiKey: aws_appsync_apiKey,\n region: aws_appsync_region,\n defaultAuthMode: defaultAuthMode ?? 'iam',\n },\n };\n if (modelIntrospection) {\n amplifyConfig.API.GraphQL.modelIntrospection = modelIntrospection;\n }\n }\n // Auth\n const mfaConfig = aws_cognito_mfa_configuration\n ? {\n status: aws_cognito_mfa_configuration &&\n aws_cognito_mfa_configuration.toLowerCase(),\n totpEnabled: aws_cognito_mfa_types?.includes('TOTP') ?? false,\n smsEnabled: aws_cognito_mfa_types?.includes('SMS') ?? false,\n }\n : undefined;\n const passwordFormatConfig = aws_cognito_password_protection_settings\n ? {\n minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,\n requireLowercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_LOWERCASE') ?? false,\n requireUppercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_UPPERCASE') ?? false,\n requireNumbers: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_NUMBERS') ?? false,\n requireSpecialCharacters: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_SYMBOLS') ?? false,\n }\n : undefined;\n const mergedUserAttributes = Array.from(new Set([\n ...(aws_cognito_verification_mechanisms ?? []),\n ...(aws_cognito_signup_attributes ?? []),\n ]));\n const userAttributes = mergedUserAttributes.reduce((attributes, key) => ({\n ...attributes,\n // All user attributes generated by the CLI are required\n [key.toLowerCase()]: { required: true },\n }), {});\n const loginWithEmailEnabled = aws_cognito_username_attributes?.includes('EMAIL') ?? false;\n const loginWithPhoneEnabled = aws_cognito_username_attributes?.includes('PHONE_NUMBER') ?? false;\n if (aws_cognito_identity_pool_id || aws_user_pools_id) {\n amplifyConfig.Auth = {\n Cognito: {\n identityPoolId: aws_cognito_identity_pool_id,\n allowGuestAccess: aws_mandatory_sign_in !== 'enable',\n signUpVerificationMethod: aws_cognito_sign_up_verification_method,\n userAttributes,\n userPoolClientId: aws_user_pools_web_client_id,\n userPoolId: aws_user_pools_id,\n mfa: mfaConfig,\n passwordFormat: passwordFormatConfig,\n loginWith: {\n username: !(loginWithEmailEnabled || loginWithPhoneEnabled),\n email: loginWithEmailEnabled,\n phone: loginWithPhoneEnabled,\n },\n },\n };\n }\n const hasOAuthConfig = oauth ? Object.keys(oauth).length > 0 : false;\n const hasSocialProviderConfig = aws_cognito_social_providers\n ? aws_cognito_social_providers.length > 0\n : false;\n if (amplifyConfig.Auth && hasOAuthConfig) {\n amplifyConfig.Auth.Cognito.loginWith = {\n ...amplifyConfig.Auth.Cognito.loginWith,\n oauth: {\n ...getOAuthConfig(oauth),\n ...(hasSocialProviderConfig && {\n providers: parseSocialProviders(aws_cognito_social_providers),\n }),\n },\n };\n }\n // Storage\n if (aws_user_files_s3_bucket) {\n amplifyConfig.Storage = {\n S3: {\n bucket: aws_user_files_s3_bucket,\n region: aws_user_files_s3_bucket_region,\n dangerouslyConnectToHttpEndpointForTesting: aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing,\n },\n };\n }\n // Geo\n if (geo) {\n const { amazon_location_service } = geo;\n amplifyConfig.Geo = {\n LocationService: {\n maps: amazon_location_service.maps,\n geofenceCollections: amazon_location_service.geofenceCollections,\n searchIndices: amazon_location_service.search_indices,\n region: amazon_location_service.region,\n },\n };\n }\n // REST API\n if (aws_cloud_logic_custom) {\n amplifyConfig.API = {\n ...amplifyConfig.API,\n REST: aws_cloud_logic_custom.reduce((acc, api) => {\n const { name, endpoint, region, service } = api;\n return {\n ...acc,\n [name]: {\n endpoint,\n ...(service ? { service } : undefined),\n ...(region ? { region } : undefined),\n },\n };\n }, {}),\n };\n }\n // Predictions\n if (predictions) {\n // map VoiceId from speechGenerator defaults to voiceId\n const { VoiceId: voiceId } = predictions?.convert?.speechGenerator?.defaults ?? {};\n amplifyConfig.Predictions = voiceId\n ? {\n ...predictions,\n convert: {\n ...predictions.convert,\n speechGenerator: {\n ...predictions.convert.speechGenerator,\n defaults: { voiceId },\n },\n },\n }\n : predictions;\n }\n return amplifyConfig;\n};\nconst getRedirectUrl = (redirectStr) => redirectStr?.split(',') ?? [];\nconst getOAuthConfig = ({ domain, scope, redirectSignIn, redirectSignOut, responseType, }) => ({\n domain,\n scopes: scope,\n redirectSignIn: getRedirectUrl(redirectSignIn),\n redirectSignOut: getRedirectUrl(redirectSignOut),\n responseType,\n});\nconst parseSocialProviders = (aws_cognito_social_providers) => {\n return aws_cognito_social_providers.map((provider) => {\n const updatedProvider = provider.toLowerCase();\n return updatedProvider.charAt(0).toUpperCase() + updatedProvider.slice(1);\n });\n};\n\nexport { parseAWSExports };\n//# sourceMappingURL=parseAWSExports.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from './Logger';\nimport { AmplifyError } from './errors';\nconst logger = new ConsoleLogger('parseAWSExports');\nconst authTypeMapping = {\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n OPENID_CONNECT: 'oidc',\n NONE: 'none',\n AWS_LAMBDA: 'lambda',\n // `LAMBDA` is an incorrect value that was added during the v6 rewrite.\n // Keeping it as a valid value until v7 to prevent breaking customers who might\n // be relying on it as a workaround.\n // ref: https://github.com/aws-amplify/amplify-js/pull/12922\n // TODO: @v7 remove next line\n LAMBDA: 'lambda',\n};\n/**\n * Converts the object imported from `aws-exports.js` or `amplifyconfiguration.json` files generated by\n * the Amplify CLI into an object that conforms to the {@link ResourcesConfig}.\n *\n * @param config A configuration object imported from `aws-exports.js` or `amplifyconfiguration.json`.\n *\n * @returns An object that conforms to the {@link ResourcesConfig} .\n */\nexport const parseAWSExports = (config = {}) => {\n if (!Object.prototype.hasOwnProperty.call(config, 'aws_project_region')) {\n throw new AmplifyError({\n name: 'InvalidParameterException',\n message: 'Invalid config parameter.',\n recoverySuggestion: 'Ensure passing the config object imported from `amplifyconfiguration.json`.',\n });\n }\n const { aws_appsync_apiKey, aws_appsync_authenticationType, aws_appsync_graphqlEndpoint, aws_appsync_region, aws_bots_config, aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration, aws_cognito_mfa_types, aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms, aws_cognito_signup_attributes, aws_cognito_social_providers, aws_cognito_username_attributes, aws_mandatory_sign_in, aws_mobile_analytics_app_id, aws_mobile_analytics_app_region, aws_user_files_s3_bucket, aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id, aws_user_pools_web_client_id, geo, oauth, predictions, aws_cloud_logic_custom, Notifications, modelIntrospection, } = config;\n const amplifyConfig = {};\n // Analytics\n if (aws_mobile_analytics_app_id) {\n amplifyConfig.Analytics = {\n Pinpoint: {\n appId: aws_mobile_analytics_app_id,\n region: aws_mobile_analytics_app_region,\n },\n };\n }\n // Notifications\n const { InAppMessaging, Push } = Notifications ?? {};\n if (InAppMessaging?.AWSPinpoint || Push?.AWSPinpoint) {\n if (InAppMessaging?.AWSPinpoint) {\n const { appId, region } = InAppMessaging.AWSPinpoint;\n amplifyConfig.Notifications = {\n InAppMessaging: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n if (Push?.AWSPinpoint) {\n const { appId, region } = Push.AWSPinpoint;\n amplifyConfig.Notifications = {\n ...amplifyConfig.Notifications,\n PushNotification: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n }\n // Interactions\n if (Array.isArray(aws_bots_config)) {\n amplifyConfig.Interactions = {\n LexV1: Object.fromEntries(aws_bots_config.map(bot => [bot.name, bot])),\n };\n }\n // API\n if (aws_appsync_graphqlEndpoint) {\n const defaultAuthMode = authTypeMapping[aws_appsync_authenticationType];\n if (!defaultAuthMode) {\n logger.debug(`Invalid authentication type ${aws_appsync_authenticationType}. Falling back to IAM.`);\n }\n amplifyConfig.API = {\n GraphQL: {\n endpoint: aws_appsync_graphqlEndpoint,\n apiKey: aws_appsync_apiKey,\n region: aws_appsync_region,\n defaultAuthMode: defaultAuthMode ?? 'iam',\n },\n };\n if (modelIntrospection) {\n amplifyConfig.API.GraphQL.modelIntrospection = modelIntrospection;\n }\n }\n // Auth\n const mfaConfig = aws_cognito_mfa_configuration\n ? {\n status: aws_cognito_mfa_configuration &&\n aws_cognito_mfa_configuration.toLowerCase(),\n totpEnabled: aws_cognito_mfa_types?.includes('TOTP') ?? false,\n smsEnabled: aws_cognito_mfa_types?.includes('SMS') ?? false,\n }\n : undefined;\n const passwordFormatConfig = aws_cognito_password_protection_settings\n ? {\n minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,\n requireLowercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_LOWERCASE') ?? false,\n requireUppercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_UPPERCASE') ?? false,\n requireNumbers: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_NUMBERS') ?? false,\n requireSpecialCharacters: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_SYMBOLS') ?? false,\n }\n : undefined;\n const mergedUserAttributes = Array.from(new Set([\n ...(aws_cognito_verification_mechanisms ?? []),\n ...(aws_cognito_signup_attributes ?? []),\n ]));\n const userAttributes = mergedUserAttributes.reduce((attributes, key) => ({\n ...attributes,\n // All user attributes generated by the CLI are required\n [key.toLowerCase()]: { required: true },\n }), {});\n const loginWithEmailEnabled = aws_cognito_username_attributes?.includes('EMAIL') ?? false;\n const loginWithPhoneEnabled = aws_cognito_username_attributes?.includes('PHONE_NUMBER') ?? false;\n if (aws_cognito_identity_pool_id || aws_user_pools_id) {\n amplifyConfig.Auth = {\n Cognito: {\n identityPoolId: aws_cognito_identity_pool_id,\n allowGuestAccess: aws_mandatory_sign_in !== 'enable',\n signUpVerificationMethod: aws_cognito_sign_up_verification_method,\n userAttributes,\n userPoolClientId: aws_user_pools_web_client_id,\n userPoolId: aws_user_pools_id,\n mfa: mfaConfig,\n passwordFormat: passwordFormatConfig,\n loginWith: {\n username: !(loginWithEmailEnabled || loginWithPhoneEnabled),\n email: loginWithEmailEnabled,\n phone: loginWithPhoneEnabled,\n },\n },\n };\n }\n const hasOAuthConfig = oauth ? Object.keys(oauth).length > 0 : false;\n const hasSocialProviderConfig = aws_cognito_social_providers\n ? aws_cognito_social_providers.length > 0\n : false;\n if (amplifyConfig.Auth && hasOAuthConfig) {\n amplifyConfig.Auth.Cognito.loginWith = {\n ...amplifyConfig.Auth.Cognito.loginWith,\n oauth: {\n ...getOAuthConfig(oauth),\n ...(hasSocialProviderConfig && {\n providers: parseSocialProviders(aws_cognito_social_providers),\n }),\n },\n };\n }\n // Storage\n if (aws_user_files_s3_bucket) {\n amplifyConfig.Storage = {\n S3: {\n bucket: aws_user_files_s3_bucket,\n region: aws_user_files_s3_bucket_region,\n dangerouslyConnectToHttpEndpointForTesting: aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing,\n },\n };\n }\n // Geo\n if (geo) {\n const { amazon_location_service } = geo;\n amplifyConfig.Geo = {\n LocationService: {\n maps: amazon_location_service.maps,\n geofenceCollections: amazon_location_service.geofenceCollections,\n searchIndices: amazon_location_service.search_indices,\n region: amazon_location_service.region,\n },\n };\n }\n // REST API\n if (aws_cloud_logic_custom) {\n amplifyConfig.API = {\n ...amplifyConfig.API,\n REST: aws_cloud_logic_custom.reduce((acc, api) => {\n const { name, endpoint, region, service } = api;\n return {\n ...acc,\n [name]: {\n endpoint,\n ...(service ? { service } : undefined),\n ...(region ? { region } : undefined),\n },\n };\n }, {}),\n };\n }\n // Predictions\n if (predictions) {\n // map VoiceId from speechGenerator defaults to voiceId\n const { VoiceId: voiceId } = predictions?.convert?.speechGenerator?.defaults ?? {};\n amplifyConfig.Predictions = voiceId\n ? {\n ...predictions,\n convert: {\n ...predictions.convert,\n speechGenerator: {\n ...predictions.convert.speechGenerator,\n defaults: { voiceId },\n },\n },\n }\n : predictions;\n }\n return amplifyConfig;\n};\nconst getRedirectUrl = (redirectStr) => redirectStr?.split(',') ?? [];\nconst getOAuthConfig = ({ domain, scope, redirectSignIn, redirectSignOut, responseType, }) => ({\n domain,\n scopes: scope,\n redirectSignIn: getRedirectUrl(redirectSignIn),\n redirectSignOut: getRedirectUrl(redirectSignOut),\n responseType,\n});\nconst parseSocialProviders = (aws_cognito_social_providers) => {\n return aws_cognito_social_providers.map((provider) => {\n const updatedProvider = provider.toLowerCase();\n return updatedProvider.charAt(0).toUpperCase() + updatedProvider.slice(1);\n });\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isAmplifyOutputs(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version } = config;\n if (!version) {\n return false;\n }\n return version.startsWith('1');\n}\nfunction parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) {\n return undefined;\n }\n const { bucket_name, aws_region, buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && createBucketInfoMap(buckets),\n },\n };\n}\nfunction parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) {\n return undefined;\n }\n const { user_pool_id, user_pool_client_id, identity_pool_id, password_policy, mfa_configuration, mfa_methods, unauthenticated_identities_enabled, oauth, username_attributes, standard_required_attributes, groups, } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups,\n },\n };\n if (identity_pool_id) {\n authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id,\n };\n }\n if (password_policy) {\n authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6,\n };\n }\n if (mfa_configuration) {\n authConfig.Cognito.mfa = {\n status: getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP'),\n };\n }\n if (unauthenticated_identities_enabled) {\n authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n }\n if (oauth) {\n authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: getOAuthProviders(oauth.identity_providers),\n },\n };\n }\n if (username_attributes) {\n authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username'),\n };\n }\n if (standard_required_attributes) {\n authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr) => ({ ...acc, [curr]: { required: true } }), {});\n }\n return authConfig;\n}\nfunction parseAnalytics(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) {\n return undefined;\n }\n const { amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region,\n },\n };\n}\nfunction parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) {\n return undefined;\n }\n const { aws_region, geofence_collections, maps, search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps,\n },\n };\n}\nfunction parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) {\n return undefined;\n }\n const { aws_region, default_authorization_type, url, api_key, model_introspection, } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection,\n };\n return {\n GraphQL,\n };\n}\nfunction parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) {\n return undefined;\n }\n const { url, aws_region, api_key, default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n };\n return {\n Events,\n };\n}\nfunction parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) {\n return undefined;\n }\n const { aws_region, channels, amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) {\n return undefined;\n }\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) {\n notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n if (hasPushNotification) {\n notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n return notificationsConfig;\n}\nfunction parseAmplifyOutputs(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) {\n resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);\n }\n if (amplifyOutputs.auth) {\n resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);\n }\n if (amplifyOutputs.analytics) {\n resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);\n }\n if (amplifyOutputs.geo) {\n resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);\n }\n if (amplifyOutputs.data) {\n resourcesConfig.API = parseData(amplifyOutputs.data);\n }\n if (amplifyOutputs.custom) {\n const customConfig = parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) {\n resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };\n }\n }\n if (amplifyOutputs.notifications) {\n resourcesConfig.Notifications = parseNotifications(amplifyOutputs.notifications);\n }\n return resourcesConfig;\n}\nconst authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc',\n};\nfunction getGraphQLAuthMode(authType) {\n return authModeNames[authType];\n}\nconst providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple',\n};\nfunction getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider) => {\n if (providerNames[provider] !== undefined) {\n oAuthProviders.push(providerNames[provider]);\n }\n return oAuthProviders;\n }, []);\n}\nfunction getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL')\n return 'optional';\n if (mfaConfiguration === 'REQUIRED')\n return 'on';\n return 'off';\n}\nfunction createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name, bucket_name: bucketName, aws_region: region, paths }) => {\n if (name in mappedBuckets) {\n throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n }\n const sanitizedPaths = paths\n ? Object.entries(paths).reduce((acc, [key, value]) => {\n if (value !== undefined) {\n acc[key] = value;\n }\n return acc;\n }, {})\n : undefined;\n mappedBuckets[name] = {\n bucketName,\n region,\n paths: sanitizedPaths,\n };\n });\n return mappedBuckets;\n}\n\nexport { isAmplifyOutputs, parseAmplifyOutputs, parseAnalytics };\n//# sourceMappingURL=parseAmplifyOutputs.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function isAmplifyOutputs(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version } = config;\n if (!version) {\n return false;\n }\n return version.startsWith('1');\n}\nfunction parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) {\n return undefined;\n }\n const { bucket_name, aws_region, buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && createBucketInfoMap(buckets),\n },\n };\n}\nfunction parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) {\n return undefined;\n }\n const { user_pool_id, user_pool_client_id, identity_pool_id, password_policy, mfa_configuration, mfa_methods, unauthenticated_identities_enabled, oauth, username_attributes, standard_required_attributes, groups, } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups,\n },\n };\n if (identity_pool_id) {\n authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id,\n };\n }\n if (password_policy) {\n authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6,\n };\n }\n if (mfa_configuration) {\n authConfig.Cognito.mfa = {\n status: getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP'),\n };\n }\n if (unauthenticated_identities_enabled) {\n authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n }\n if (oauth) {\n authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: getOAuthProviders(oauth.identity_providers),\n },\n };\n }\n if (username_attributes) {\n authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username'),\n };\n }\n if (standard_required_attributes) {\n authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr) => ({ ...acc, [curr]: { required: true } }), {});\n }\n return authConfig;\n}\nexport function parseAnalytics(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) {\n return undefined;\n }\n const { amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region,\n },\n };\n}\nfunction parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) {\n return undefined;\n }\n const { aws_region, geofence_collections, maps, search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps,\n },\n };\n}\nfunction parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) {\n return undefined;\n }\n const { aws_region, default_authorization_type, url, api_key, model_introspection, } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection,\n };\n return {\n GraphQL,\n };\n}\nfunction parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) {\n return undefined;\n }\n const { url, aws_region, api_key, default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n };\n return {\n Events,\n };\n}\nfunction parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) {\n return undefined;\n }\n const { aws_region, channels, amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) {\n return undefined;\n }\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) {\n notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n if (hasPushNotification) {\n notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n return notificationsConfig;\n}\nexport function parseAmplifyOutputs(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) {\n resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);\n }\n if (amplifyOutputs.auth) {\n resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);\n }\n if (amplifyOutputs.analytics) {\n resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);\n }\n if (amplifyOutputs.geo) {\n resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);\n }\n if (amplifyOutputs.data) {\n resourcesConfig.API = parseData(amplifyOutputs.data);\n }\n if (amplifyOutputs.custom) {\n const customConfig = parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) {\n resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };\n }\n }\n if (amplifyOutputs.notifications) {\n resourcesConfig.Notifications = parseNotifications(amplifyOutputs.notifications);\n }\n return resourcesConfig;\n}\nconst authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc',\n};\nfunction getGraphQLAuthMode(authType) {\n return authModeNames[authType];\n}\nconst providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple',\n};\nfunction getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider) => {\n if (providerNames[provider] !== undefined) {\n oAuthProviders.push(providerNames[provider]);\n }\n return oAuthProviders;\n }, []);\n}\nfunction getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL')\n return 'optional';\n if (mfaConfiguration === 'REQUIRED')\n return 'on';\n return 'off';\n}\nfunction createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name, bucket_name: bucketName, aws_region: region, paths }) => {\n if (name in mappedBuckets) {\n throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n }\n const sanitizedPaths = paths\n ? Object.entries(paths).reduce((acc, [key, value]) => {\n if (value !== undefined) {\n acc[key] = value;\n }\n return acc;\n }, {})\n : undefined;\n mappedBuckets[name] = {\n bucketName,\n region,\n paths: sanitizedPaths,\n };\n });\n return mappedBuckets;\n}\n","export * from \"./jsSha256\";\n","import { __awaiter, __generator } from \"tslib\";\nimport { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n Sha256.prototype.update = function (toHash) {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n try {\n this.hash.update(convertToBuffer(toHash));\n }\n catch (e) {\n this.error = e;\n }\n };\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n Sha256.prototype.digestSync = function () {\n if (this.error) {\n throw this.error;\n }\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n return this.outer.digest();\n }\n return this.hash.digest();\n };\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n Sha256.prototype.digest = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.digestSync()];\n });\n });\n };\n Sha256.prototype.reset = function () {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n var inner = bufferFromSecret(this.secret);\n var outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n for (var i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n this.hash.update(inner);\n this.outer.update(outer);\n // overwrite the copied key in memory\n for (var i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n };\n return Sha256;\n}());\nexport { Sha256 };\nfunction bufferFromSecret(secret) {\n var input = convertToBuffer(secret);\n if (input.byteLength > BLOCK_SIZE) {\n var bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n//# sourceMappingURL=jsSha256.js.map","import { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private hash: RawSha256;\n private outer?: RawSha256;\n private error: any;\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n\n update(toHash: SourceData): void {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n\n try {\n this.hash.update(convertToBuffer(toHash));\n } catch (e) {\n this.error = e;\n }\n }\n\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n digestSync(): Uint8Array {\n if (this.error) {\n throw this.error;\n }\n\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n\n return this.outer.digest();\n }\n\n return this.hash.digest();\n }\n\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n async digest(): Promise {\n return this.digestSync();\n }\n\n reset(): void {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n const inner = bufferFromSecret(this.secret);\n const outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n\n this.hash.update(inner);\n this.outer.update(outer);\n\n // overwrite the copied key in memory\n for (let i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n }\n}\n\nfunction bufferFromSecret(secret: SourceData): Uint8Array {\n let input = convertToBuffer(secret);\n\n if (input.byteLength > BLOCK_SIZE) {\n const bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n\n const buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @internal\n */\nexport var BLOCK_SIZE = 64;\n/**\n * @internal\n */\nexport var DIGEST_LENGTH = 32;\n/**\n * @internal\n */\nexport var KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n/**\n * @internal\n */\nexport var INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n/**\n * @internal\n */\nexport var MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;\n//# sourceMappingURL=constants.js.map","/**\n * @internal\n */\nexport const BLOCK_SIZE: number = 64;\n\n/**\n * @internal\n */\nexport const DIGEST_LENGTH: number = 32;\n\n/**\n * @internal\n */\nexport const KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n\n/**\n * @internal\n */\nexport const INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n\n/**\n * @internal\n */\nexport const MAX_HASHABLE_LENGTH = 2 ** 53 - 1;\n","import { BLOCK_SIZE, DIGEST_LENGTH, INIT, KEY, MAX_HASHABLE_LENGTH } from \"./constants\";\n/**\n * @internal\n */\nvar RawSha256 = /** @class */ (function () {\n function RawSha256() {\n this.state = Int32Array.from(INIT);\n this.temp = new Int32Array(64);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n /**\n * @internal\n */\n this.finished = false;\n }\n RawSha256.prototype.update = function (data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n };\n RawSha256.prototype.digest = function () {\n if (!this.finished) {\n var bitsHashed = this.bytesHashed * 8;\n var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);\n var undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n this.hashBuffer();\n this.finished = true;\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Uint8Array(DIGEST_LENGTH);\n for (var i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return out;\n };\n RawSha256.prototype.hashBuffer = function () {\n var _a = this, buffer = _a.buffer, state = _a.state;\n var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7];\n for (var i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n }\n else {\n var u = this.temp[i - 2];\n var t1_1 = ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n u = this.temp[i - 15];\n var t2_1 = ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n this.temp[i] =\n ((t1_1 + this.temp[i - 7]) | 0) + ((t2_1 + this.temp[i - 16]) | 0);\n }\n var t1 = ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n var t2 = ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n };\n return RawSha256;\n}());\nexport { RawSha256 };\n//# sourceMappingURL=RawSha256.js.map","import {\n BLOCK_SIZE,\n DIGEST_LENGTH,\n INIT,\n KEY,\n MAX_HASHABLE_LENGTH\n} from \"./constants\";\n\n/**\n * @internal\n */\nexport class RawSha256 {\n private state: Int32Array = Int32Array.from(INIT);\n private temp: Int32Array = new Int32Array(64);\n private buffer: Uint8Array = new Uint8Array(64);\n private bufferLength: number = 0;\n private bytesHashed: number = 0;\n\n /**\n * @internal\n */\n finished: boolean = false;\n\n update(data: Uint8Array): void {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n\n digest(): Uint8Array {\n if (!this.finished) {\n const bitsHashed = this.bytesHashed * 8;\n const bufferView = new DataView(\n this.buffer.buffer,\n this.buffer.byteOffset,\n this.buffer.byteLength\n );\n\n const undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(\n BLOCK_SIZE - 8,\n Math.floor(bitsHashed / 0x100000000),\n true\n );\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n\n this.hashBuffer();\n\n this.finished = true;\n }\n\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n const out = new Uint8Array(DIGEST_LENGTH);\n for (let i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n\n return out;\n }\n\n private hashBuffer(): void {\n const { buffer, state } = this;\n\n let state0 = state[0],\n state1 = state[1],\n state2 = state[2],\n state3 = state[3],\n state4 = state[4],\n state5 = state[5],\n state6 = state[6],\n state7 = state[7];\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n } else {\n let u = this.temp[i - 2];\n const t1 =\n ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n\n u = this.temp[i - 15];\n const t2 =\n ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n\n this.temp[i] =\n ((t1 + this.temp[i - 7]) | 0) + ((t2 + this.temp[i - 16]) | 0);\n }\n\n const t1 =\n ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n\n const t2 =\n ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n }\n}\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport { uint32ArrayFrom } from './uint32ArrayFrom';\n//# sourceMappingURL=index.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport {uint32ArrayFrom} from './uint32ArrayFrom';\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : fromUtf8Browser;\nexport function convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n//# sourceMappingURL=convertToBuffer.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n\n// Quick polyfill\nconst fromUtf8 =\n typeof Buffer !== \"undefined\" && Buffer.from\n ? (input: string) => Buffer.from(input, \"utf8\")\n : fromUtf8Browser;\n\nexport function convertToBuffer(data: SourceData): Uint8Array {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) return data;\n\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n","export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n","export const fromUtf8 = (input) => new TextEncoder().encode(input);\n","import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n","export const toUtf8 = (input) => new TextDecoder(\"utf-8\").decode(input);\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\n//# sourceMappingURL=isEmptyData.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n//# sourceMappingURL=numToUint8.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function numToUint8(num: number) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\n//# sourceMappingURL=uint32ArrayFrom.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array {\n if (!Uint32Array.from) {\n const return_array = new Uint32Array(a_lookUpTable.length)\n let a_index = 0\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index]\n a_index += 1\n }\n return return_array\n }\n return Uint32Array.from(a_lookUpTable)\n}\n","const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n","class AuthClass {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */\n configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */\n async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh,\n });\n }\n else {\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh,\n });\n }\n return {\n tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub,\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return ((await this.authOptions?.tokenProvider?.getTokens(options)) ?? undefined);\n }\n}\n\nexport { AuthClass };\n//# sourceMappingURL=index.mjs.map\n","export class AuthClass {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */\n configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */\n async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh,\n });\n }\n else {\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh,\n });\n }\n return {\n tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub,\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return ((await this.authOptions?.tokenProvider?.getTokens(options)) ?? undefined);\n }\n}\n","import JsCookie from 'js-cookie';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass CookieStorage {\n constructor(data = {}) {\n const { path, domain, expires, sameSite, secure } = data;\n this.domain = domain;\n this.path = path || '/';\n this.expires = Object.prototype.hasOwnProperty.call(data, 'expires')\n ? expires\n : 365;\n this.secure = Object.prototype.hasOwnProperty.call(data, 'secure')\n ? secure\n : true;\n if (Object.prototype.hasOwnProperty.call(data, 'sameSite')) {\n if (!sameSite || !['strict', 'lax', 'none'].includes(sameSite)) {\n throw new Error('The sameSite value of cookieStorage must be \"lax\", \"strict\" or \"none\".');\n }\n if (sameSite === 'none' && !this.secure) {\n throw new Error('sameSite = None requires the Secure attribute in latest browser versions.');\n }\n this.sameSite = sameSite;\n }\n }\n async setItem(key, value) {\n JsCookie.set(key, value, this.getData());\n }\n async getItem(key) {\n const item = JsCookie.get(key);\n return item ?? null;\n }\n async removeItem(key) {\n JsCookie.remove(key, this.getData());\n }\n async clear() {\n const cookie = JsCookie.get();\n const promises = Object.keys(cookie).map(key => this.removeItem(key));\n await Promise.all(promises);\n }\n getData() {\n return {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n ...(this.sameSite && { sameSite: this.sameSite }),\n };\n }\n}\n\nexport { CookieStorage };\n//# sourceMappingURL=CookieStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport JsCookie from 'js-cookie';\nexport class CookieStorage {\n constructor(data = {}) {\n const { path, domain, expires, sameSite, secure } = data;\n this.domain = domain;\n this.path = path || '/';\n this.expires = Object.prototype.hasOwnProperty.call(data, 'expires')\n ? expires\n : 365;\n this.secure = Object.prototype.hasOwnProperty.call(data, 'secure')\n ? secure\n : true;\n if (Object.prototype.hasOwnProperty.call(data, 'sameSite')) {\n if (!sameSite || !['strict', 'lax', 'none'].includes(sameSite)) {\n throw new Error('The sameSite value of cookieStorage must be \"lax\", \"strict\" or \"none\".');\n }\n if (sameSite === 'none' && !this.secure) {\n throw new Error('sameSite = None requires the Secure attribute in latest browser versions.');\n }\n this.sameSite = sameSite;\n }\n }\n async setItem(key, value) {\n JsCookie.set(key, value, this.getData());\n }\n async getItem(key) {\n const item = JsCookie.get(key);\n return item ?? null;\n }\n async removeItem(key) {\n JsCookie.remove(key, this.getData());\n }\n async clear() {\n const cookie = JsCookie.get();\n const promises = Object.keys(cookie).map(key => this.removeItem(key));\n await Promise.all(promises);\n }\n getData() {\n return {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n ...(this.sameSite && { sameSite: this.sameSite }),\n };\n }\n}\n","/*! js-cookie v3.0.5 | MIT */\n;\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {\n var current = global.Cookies;\n var exports = global.Cookies = factory();\n exports.noConflict = function () { global.Cookies = current; return exports; };\n })());\n})(this, (function () { 'use strict';\n\n /* eslint-disable no-var */\n function assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n }\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n var defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n };\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n\n function init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n }\n\n var api = init(defaultConverter, { path: '/' });\n /* eslint-enable no-var */\n\n return api;\n\n}));\n","import { DefaultStorage } from './DefaultStorage.mjs';\nimport { InMemoryStorage } from './InMemoryStorage.mjs';\nimport { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { SessionStorage } from './SessionStorage.mjs';\nimport { SyncSessionStorage } from './SyncSessionStorage.mjs';\nexport { CookieStorage } from './CookieStorage.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst defaultStorage = new DefaultStorage();\nconst sessionStorage = new SessionStorage();\nconst syncSessionStorage = new SyncSessionStorage();\nconst sharedInMemoryStorage = new KeyValueStorage(new InMemoryStorage());\n\nexport { defaultStorage, sessionStorage, sharedInMemoryStorage, syncSessionStorage };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DefaultStorage } from './DefaultStorage';\nimport { InMemoryStorage } from './InMemoryStorage';\nimport { KeyValueStorage } from './KeyValueStorage';\nimport { SessionStorage } from './SessionStorage';\nimport { SyncSessionStorage } from './SyncSessionStorage';\nexport { CookieStorage } from './CookieStorage';\nexport const defaultStorage = new DefaultStorage();\nexport const sessionStorage = new SessionStorage();\nexport const syncSessionStorage = new SyncSessionStorage();\nexport const sharedInMemoryStorage = new KeyValueStorage(new InMemoryStorage());\n","import { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { getLocalStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass DefaultStorage extends KeyValueStorage {\n constructor() {\n super(getLocalStorageWithFallback());\n }\n}\n\nexport { DefaultStorage };\n//# sourceMappingURL=DefaultStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { KeyValueStorage } from './KeyValueStorage';\nimport { getLocalStorageWithFallback } from './utils';\n/**\n * @internal\n */\nexport class DefaultStorage extends KeyValueStorage {\n constructor() {\n super(getLocalStorageWithFallback());\n }\n}\n","import { PlatformNotSupportedError } from '../errors/PlatformNotSupportedError.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass KeyValueStorage {\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n async setItem(key, value) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n async getItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n async removeItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n async clear() {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.clear();\n }\n}\n\nexport { KeyValueStorage };\n//# sourceMappingURL=KeyValueStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '../errors';\n/**\n * @internal\n */\nexport class KeyValueStorage {\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n async setItem(key, value) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n async getItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n async removeItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n async clear() {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.clear();\n }\n}\n","import { AmplifyErrorCode } from '../types/errors.mjs';\nimport { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass PlatformNotSupportedError extends AmplifyError {\n constructor() {\n super({\n name: AmplifyErrorCode.PlatformNotSupported,\n message: 'Function not supported on current platform',\n });\n }\n}\n\nexport { PlatformNotSupportedError };\n//# sourceMappingURL=PlatformNotSupportedError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyErrorCode } from '../types';\nimport { AmplifyError } from './AmplifyError';\nexport class PlatformNotSupportedError extends AmplifyError {\n constructor() {\n super({\n name: AmplifyErrorCode.PlatformNotSupported,\n message: 'Function not supported on current platform',\n });\n }\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode || (AmplifyErrorCode = {}));\n\nexport { AmplifyErrorCode };\n//# sourceMappingURL=errors.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode || (AmplifyErrorCode = {}));\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { InMemoryStorage } from './InMemoryStorage.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new ConsoleLogger('CoreStorageUtils');\nconst getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new InMemoryStorage();\n};\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */\nconst getSessionStorageWithFallback = () => {\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n }\n catch (e) {\n // Handle any errors related to sessionStorage access\n logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new InMemoryStorage();\n }\n};\n\nexport { getLocalStorageWithFallback, getSessionStorageWithFallback };\n//# sourceMappingURL=utils.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '../Logger';\nimport { InMemoryStorage } from './InMemoryStorage';\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new ConsoleLogger('CoreStorageUtils');\nexport const getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new InMemoryStorage();\n};\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */\nexport const getSessionStorageWithFallback = () => {\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n }\n catch (e) {\n // Handle any errors related to sessionStorage access\n logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new InMemoryStorage();\n }\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass InMemoryStorage {\n constructor() {\n this.storage = new Map();\n }\n get length() {\n return this.storage.size;\n }\n key(index) {\n if (index > this.length - 1) {\n return null;\n }\n return Array.from(this.storage.keys())[index];\n }\n setItem(key, value) {\n this.storage.set(key, value);\n }\n getItem(key) {\n return this.storage.get(key) ?? null;\n }\n removeItem(key) {\n this.storage.delete(key);\n }\n clear() {\n this.storage.clear();\n }\n}\n\nexport { InMemoryStorage };\n//# sourceMappingURL=InMemoryStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nexport class InMemoryStorage {\n constructor() {\n this.storage = new Map();\n }\n get length() {\n return this.storage.size;\n }\n key(index) {\n if (index > this.length - 1) {\n return null;\n }\n return Array.from(this.storage.keys())[index];\n }\n setItem(key, value) {\n this.storage.set(key, value);\n }\n getItem(key) {\n return this.storage.get(key) ?? null;\n }\n removeItem(key) {\n this.storage.delete(key);\n }\n clear() {\n this.storage.clear();\n }\n}\n","import { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { getSessionStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SessionStorage extends KeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n\nexport { SessionStorage };\n//# sourceMappingURL=SessionStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { KeyValueStorage } from './KeyValueStorage';\nimport { getSessionStorageWithFallback } from './utils';\n/**\n * @internal\n */\nexport class SessionStorage extends KeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n","import { SyncKeyValueStorage } from './SyncKeyValueStorage.mjs';\nimport { getSessionStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SyncSessionStorage extends SyncKeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n\nexport { SyncSessionStorage };\n//# sourceMappingURL=SyncSessionStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SyncKeyValueStorage } from './SyncKeyValueStorage';\nimport { getSessionStorageWithFallback } from './utils';\n/**\n * @internal\n */\nexport class SyncSessionStorage extends SyncKeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n","import { PlatformNotSupportedError } from '../errors/PlatformNotSupportedError.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SyncKeyValueStorage {\n constructor(storage) {\n this._storage = storage;\n }\n get storage() {\n if (!this._storage)\n throw new PlatformNotSupportedError();\n return this._storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n setItem(key, value) {\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n getItem(key) {\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n removeItem(key) {\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n clear() {\n this.storage.clear();\n }\n}\n\nexport { SyncKeyValueStorage };\n//# sourceMappingURL=SyncKeyValueStorage.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '../errors';\n/**\n * @internal\n */\nexport class SyncKeyValueStorage {\n constructor(storage) {\n this._storage = storage;\n }\n get storage() {\n if (!this._storage)\n throw new PlatformNotSupportedError();\n return this._storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n setItem(key, value) {\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n getItem(key) {\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n removeItem(key) {\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n clear() {\n this.storage.clear();\n }\n}\n","import { defaultStorage } from '@aws-amplify/core';\nimport { DefaultIdentityIdStore } from './IdentityIdStore.mjs';\nimport { CognitoAWSCredentialsAndIdentityIdProvider } from './credentialsProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cognito specific implmentation of the CredentialsProvider interface\n * that manages setting and getting of AWS Credentials.\n *\n * @throws configuration expections: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service expections: {@link GetCredentialsForIdentityException}, {@link GetIdException}\n *\n */\nconst cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider(new DefaultIdentityIdStore(defaultStorage));\n\nexport { CognitoAWSCredentialsAndIdentityIdProvider, DefaultIdentityIdStore, cognitoCredentialsProvider };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { defaultStorage } from '@aws-amplify/core';\nimport { DefaultIdentityIdStore } from './IdentityIdStore';\nimport { CognitoAWSCredentialsAndIdentityIdProvider } from './credentialsProvider';\n/**\n * Cognito specific implmentation of the CredentialsProvider interface\n * that manages setting and getting of AWS Credentials.\n *\n * @throws configuration expections: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service expections: {@link GetCredentialsForIdentityException}, {@link GetIdException}\n *\n */\nexport const cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider(new DefaultIdentityIdStore(defaultStorage));\nexport { CognitoAWSCredentialsAndIdentityIdProvider, DefaultIdentityIdStore };\n","import { ConsoleLogger } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore.mjs';\nimport { IdentityIdStorageKeys } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('DefaultIdentityIdStore');\nclass DefaultIdentityIdStore {\n setAuthConfig(authConfigParam) {\n assertIdentityPoolIdConfig(authConfigParam.Cognito);\n this.authConfig = authConfigParam;\n this._authKeys = createKeysForAuthStorage('Cognito', authConfigParam.Cognito.identityPoolId);\n }\n constructor(keyValueStorage) {\n this._authKeys = {};\n this._hasGuestIdentityId = false;\n this.keyValueStorage = keyValueStorage;\n }\n async loadIdentityId() {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n try {\n if (this._primaryIdentityId) {\n return {\n id: this._primaryIdentityId,\n type: 'primary',\n };\n }\n else {\n const storedIdentityId = await this.keyValueStorage.getItem(this._authKeys.identityId);\n if (storedIdentityId) {\n this._hasGuestIdentityId = true;\n return {\n id: storedIdentityId,\n type: 'guest',\n };\n }\n return null;\n }\n }\n catch (err) {\n logger.log('Error getting stored IdentityId.', err);\n return null;\n }\n }\n async storeIdentityId(identity) {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n if (identity.type === 'guest') {\n this.keyValueStorage.setItem(this._authKeys.identityId, identity.id);\n // Clear in-memory storage of primary identityId\n this._primaryIdentityId = undefined;\n this._hasGuestIdentityId = true;\n }\n else {\n this._primaryIdentityId = identity.id;\n // Clear locally stored guest id\n if (this._hasGuestIdentityId) {\n this.keyValueStorage.removeItem(this._authKeys.identityId);\n this._hasGuestIdentityId = false;\n }\n }\n }\n async clearIdentityId() {\n this._primaryIdentityId = undefined;\n await this.keyValueStorage.removeItem(this._authKeys.identityId);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(IdentityIdStorageKeys)(`com.amplify.${provider}`, identifier);\n};\n\nexport { DefaultIdentityIdStore };\n//# sourceMappingURL=IdentityIdStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger, } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore';\nimport { IdentityIdStorageKeys } from './types';\nconst logger = new ConsoleLogger('DefaultIdentityIdStore');\nexport class DefaultIdentityIdStore {\n setAuthConfig(authConfigParam) {\n assertIdentityPoolIdConfig(authConfigParam.Cognito);\n this.authConfig = authConfigParam;\n this._authKeys = createKeysForAuthStorage('Cognito', authConfigParam.Cognito.identityPoolId);\n }\n constructor(keyValueStorage) {\n this._authKeys = {};\n this._hasGuestIdentityId = false;\n this.keyValueStorage = keyValueStorage;\n }\n async loadIdentityId() {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n try {\n if (this._primaryIdentityId) {\n return {\n id: this._primaryIdentityId,\n type: 'primary',\n };\n }\n else {\n const storedIdentityId = await this.keyValueStorage.getItem(this._authKeys.identityId);\n if (storedIdentityId) {\n this._hasGuestIdentityId = true;\n return {\n id: storedIdentityId,\n type: 'guest',\n };\n }\n return null;\n }\n }\n catch (err) {\n logger.log('Error getting stored IdentityId.', err);\n return null;\n }\n }\n async storeIdentityId(identity) {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n if (identity.type === 'guest') {\n this.keyValueStorage.setItem(this._authKeys.identityId, identity.id);\n // Clear in-memory storage of primary identityId\n this._primaryIdentityId = undefined;\n this._hasGuestIdentityId = true;\n }\n else {\n this._primaryIdentityId = identity.id;\n // Clear locally stored guest id\n if (this._hasGuestIdentityId) {\n this.keyValueStorage.removeItem(this._authKeys.identityId);\n this._hasGuestIdentityId = false;\n }\n }\n }\n async clearIdentityId() {\n this._primaryIdentityId = undefined;\n await this.keyValueStorage.removeItem(this._authKeys.identityId);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(IdentityIdStorageKeys)(`com.amplify.${provider}`, identifier);\n};\n","import { base64Decoder } from '../../../utils/convert/base64/base64Decoder.mjs';\nimport '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\nimport { assert, AuthConfigurationErrorCode } from './errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n assert(assertionValid, AuthConfigurationErrorCode.AuthUserPoolException);\n}\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n assert(validOAuthConfig, AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n\nexport { assertIdentityPoolIdConfig, assertOAuthConfig, assertTokenProviderConfig, decodeJWT };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Decoder } from '../../../utils/convert';\nimport { AuthConfigurationErrorCode, assert } from './errorHelpers';\nexport function assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n assert(assertionValid, AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexport function assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n assert(validOAuthConfig, AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexport function assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */\nexport function decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n","import { getAtob } from '../../globalHelpers/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst base64Decoder = {\n convert(input, options) {\n let inputStr = input;\n // urlSafe character replacement options conform to the base64 url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#page-7\n if (options?.urlSafe) {\n inputStr = inputStr.replace(/-/g, '+').replace(/_/g, '/');\n }\n return getAtob()(inputStr);\n },\n};\n\nexport { base64Decoder };\n//# sourceMappingURL=base64Decoder.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getAtob } from '../../globalHelpers';\nexport const base64Decoder = {\n convert(input, options) {\n let inputStr = input;\n // urlSafe character replacement options conform to the base64 url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#page-7\n if (options?.urlSafe) {\n inputStr = inputStr.replace(/-/g, '+').replace(/_/g, '/');\n }\n return getAtob()(inputStr);\n },\n};\n","import { AmplifyError } from '../../errors/AmplifyError.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCrypto = () => {\n if (typeof window === 'object' && typeof window.crypto === 'object') {\n return window.crypto;\n }\n // Next.js global polyfill\n if (typeof crypto === 'object') {\n return crypto;\n }\n throw new AmplifyError({\n name: 'MissingPolyfill',\n message: 'Cannot resolve the `crypto` function from the environment.',\n });\n};\nconst getBtoa = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n return window.btoa;\n }\n // Next.js global polyfill\n if (typeof btoa === 'function') {\n return btoa;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `btoa` function from the environment.',\n });\n};\nconst getAtob = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.atob === 'function') {\n return window.atob;\n }\n // Next.js global polyfill\n if (typeof atob === 'function') {\n return atob;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `atob` function from the environment.',\n });\n};\n\nexport { getAtob, getBtoa, getCrypto };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError } from '../../errors';\nexport const getCrypto = () => {\n if (typeof window === 'object' && typeof window.crypto === 'object') {\n return window.crypto;\n }\n // Next.js global polyfill\n if (typeof crypto === 'object') {\n return crypto;\n }\n throw new AmplifyError({\n name: 'MissingPolyfill',\n message: 'Cannot resolve the `crypto` function from the environment.',\n });\n};\nexport const getBtoa = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n return window.btoa;\n }\n // Next.js global polyfill\n if (typeof btoa === 'function') {\n return btoa;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `btoa` function from the environment.',\n });\n};\nexport const getAtob = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.atob === 'function') {\n return window.atob;\n }\n // Next.js global polyfill\n if (typeof atob === 'function') {\n return atob;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `atob` function from the environment.',\n });\n};\n","import { createAssertionFunction } from '../../../errors/createAssertionFunction.mjs';\nimport '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode || (AuthConfigurationErrorCode = {}));\nconst authConfigurationErrorMap = {\n [AuthConfigurationErrorCode.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.',\n },\n [AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n },\n [AuthConfigurationErrorCode.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.',\n },\n};\nconst assert = createAssertionFunction(authConfigurationErrorMap);\n\nexport { AuthConfigurationErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createAssertionFunction } from '../../../errors';\nexport var AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode || (AuthConfigurationErrorCode = {}));\nconst authConfigurationErrorMap = {\n [AuthConfigurationErrorCode.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.',\n },\n [AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n },\n [AuthConfigurationErrorCode.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.',\n },\n};\nexport const assert = createAssertionFunction(authConfigurationErrorMap);\n","import { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createAssertionFunction = (errorMap, AssertionError = AmplifyError) => (assertion, name, additionalContext) => {\n const { message, recoverySuggestion } = errorMap[name];\n if (!assertion) {\n throw new AssertionError({\n name,\n message: additionalContext\n ? `${message} ${additionalContext}`\n : message,\n recoverySuggestion,\n });\n }\n};\n\nexport { createAssertionFunction };\n//# sourceMappingURL=createAssertionFunction.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError } from './AmplifyError';\nexport const createAssertionFunction = (errorMap, AssertionError = AmplifyError) => (assertion, name, additionalContext) => {\n const { message, recoverySuggestion } = errorMap[name];\n if (!assertion) {\n throw new AssertionError({\n name,\n message: additionalContext\n ? `${message} ${additionalContext}`\n : message,\n recoverySuggestion,\n });\n }\n};\n","import { decodeJWT, assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { AuthTokenStorageKeys } from './types.mjs';\nimport { assert, TokenProviderErrorCode } from './errorHelpers.mjs';\nimport { AUTH_KEY_PREFIX } from './constants.mjs';\n\nclass DefaultTokenStore {\n getKeyValueStorage() {\n if (!this.keyValueStorage) {\n throw new AuthError({\n name: 'KeyValueStorageNotFoundException',\n message: 'KeyValueStorage was not found in TokenStore',\n });\n }\n return this.keyValueStorage;\n }\n setKeyValueStorage(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n setAuthConfig(authConfig) {\n this.authConfig = authConfig;\n }\n async loadTokens() {\n // TODO(v6): migration logic should be here\n // Reading V5 tokens old format\n try {\n const authKeys = await this.getAuthKeys();\n const accessTokenString = await this.getKeyValueStorage().getItem(authKeys.accessToken);\n if (!accessTokenString) {\n throw new AuthError({\n name: 'NoSessionFoundException',\n message: 'Auth session was not found. Make sure to call signIn.',\n });\n }\n const accessToken = decodeJWT(accessTokenString);\n const itString = await this.getKeyValueStorage().getItem(authKeys.idToken);\n const idToken = itString ? decodeJWT(itString) : undefined;\n const refreshToken = (await this.getKeyValueStorage().getItem(authKeys.refreshToken)) ??\n undefined;\n const clockDriftString = (await this.getKeyValueStorage().getItem(authKeys.clockDrift)) ?? '0';\n const clockDrift = Number.parseInt(clockDriftString);\n const signInDetails = await this.getKeyValueStorage().getItem(authKeys.signInDetails);\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n deviceMetadata: (await this.getDeviceMetadata()) ?? undefined,\n clockDrift,\n username: await this.getLastAuthUser(),\n };\n if (signInDetails) {\n tokens.signInDetails = JSON.parse(signInDetails);\n }\n return tokens;\n }\n catch (err) {\n return null;\n }\n }\n async storeTokens(tokens) {\n assert(tokens !== undefined, TokenProviderErrorCode.InvalidAuthTokens);\n const lastAuthUser = tokens.username;\n await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(), lastAuthUser);\n const authKeys = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(authKeys.accessToken, tokens.accessToken.toString());\n if (tokens.idToken) {\n await this.getKeyValueStorage().setItem(authKeys.idToken, tokens.idToken.toString());\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.idToken);\n }\n if (tokens.refreshToken) {\n await this.getKeyValueStorage().setItem(authKeys.refreshToken, tokens.refreshToken);\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.refreshToken);\n }\n if (tokens.deviceMetadata) {\n if (tokens.deviceMetadata.deviceKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceKey, tokens.deviceMetadata.deviceKey);\n }\n if (tokens.deviceMetadata.deviceGroupKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceGroupKey, tokens.deviceMetadata.deviceGroupKey);\n }\n await this.getKeyValueStorage().setItem(authKeys.randomPasswordKey, tokens.deviceMetadata.randomPassword);\n }\n if (tokens.signInDetails) {\n await this.getKeyValueStorage().setItem(authKeys.signInDetails, JSON.stringify(tokens.signInDetails));\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.signInDetails);\n }\n await this.getKeyValueStorage().setItem(authKeys.clockDrift, `${tokens.clockDrift}`);\n }\n async clearTokens() {\n const authKeys = await this.getAuthKeys();\n // Not calling clear because it can remove data that is not managed by AuthTokenStore\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.accessToken),\n this.getKeyValueStorage().removeItem(authKeys.idToken),\n this.getKeyValueStorage().removeItem(authKeys.clockDrift),\n this.getKeyValueStorage().removeItem(authKeys.refreshToken),\n this.getKeyValueStorage().removeItem(authKeys.signInDetails),\n this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),\n this.getKeyValueStorage().removeItem(authKeys.oauthMetadata),\n ]);\n }\n async getDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n const deviceKey = await this.getKeyValueStorage().getItem(authKeys.deviceKey);\n const deviceGroupKey = await this.getKeyValueStorage().getItem(authKeys.deviceGroupKey);\n const randomPassword = await this.getKeyValueStorage().getItem(authKeys.randomPasswordKey);\n return randomPassword && deviceGroupKey && deviceKey\n ? {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n }\n : null;\n }\n async clearDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.deviceKey),\n this.getKeyValueStorage().removeItem(authKeys.deviceGroupKey),\n this.getKeyValueStorage().removeItem(authKeys.randomPasswordKey),\n ]);\n }\n async getAuthKeys(username) {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const lastAuthUser = username ?? (await this.getLastAuthUser());\n return createKeysForAuthStorage(AUTH_KEY_PREFIX, `${this.authConfig.Cognito.userPoolClientId}.${lastAuthUser}`);\n }\n getLastAuthUserKey() {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const identifier = this.authConfig.Cognito.userPoolClientId;\n return `${AUTH_KEY_PREFIX}.${identifier}.LastAuthUser`;\n }\n async getLastAuthUser() {\n const lastAuthUser = (await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())) ??\n 'username';\n return lastAuthUser;\n }\n async setOAuthMetadata(metadata) {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(oauthMetadataKey, JSON.stringify(metadata));\n }\n async getOAuthMetadata() {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n const oauthMetadata = await this.getKeyValueStorage().getItem(oauthMetadataKey);\n return oauthMetadata && JSON.parse(oauthMetadata);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(AuthTokenStorageKeys)(`${provider}`, identifier);\n};\nfunction getAuthStorageKeys(authKeys) {\n const keys = Object.values({ ...authKeys });\n return (prefix, identifier) => keys.reduce((acc, authKey) => ({\n ...acc,\n [authKey]: `${prefix}.${identifier}.${authKey}`,\n }), {});\n}\n\nexport { DefaultTokenStore, createKeysForAuthStorage, getAuthStorageKeys };\n//# sourceMappingURL=TokenStore.mjs.map\n","import { assertTokenProviderConfig, decodeJWT, } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError';\nimport { AuthTokenStorageKeys, } from './types';\nimport { TokenProviderErrorCode, assert } from './errorHelpers';\nimport { AUTH_KEY_PREFIX } from './constants';\nexport class DefaultTokenStore {\n getKeyValueStorage() {\n if (!this.keyValueStorage) {\n throw new AuthError({\n name: 'KeyValueStorageNotFoundException',\n message: 'KeyValueStorage was not found in TokenStore',\n });\n }\n return this.keyValueStorage;\n }\n setKeyValueStorage(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n setAuthConfig(authConfig) {\n this.authConfig = authConfig;\n }\n async loadTokens() {\n // TODO(v6): migration logic should be here\n // Reading V5 tokens old format\n try {\n const authKeys = await this.getAuthKeys();\n const accessTokenString = await this.getKeyValueStorage().getItem(authKeys.accessToken);\n if (!accessTokenString) {\n throw new AuthError({\n name: 'NoSessionFoundException',\n message: 'Auth session was not found. Make sure to call signIn.',\n });\n }\n const accessToken = decodeJWT(accessTokenString);\n const itString = await this.getKeyValueStorage().getItem(authKeys.idToken);\n const idToken = itString ? decodeJWT(itString) : undefined;\n const refreshToken = (await this.getKeyValueStorage().getItem(authKeys.refreshToken)) ??\n undefined;\n const clockDriftString = (await this.getKeyValueStorage().getItem(authKeys.clockDrift)) ?? '0';\n const clockDrift = Number.parseInt(clockDriftString);\n const signInDetails = await this.getKeyValueStorage().getItem(authKeys.signInDetails);\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n deviceMetadata: (await this.getDeviceMetadata()) ?? undefined,\n clockDrift,\n username: await this.getLastAuthUser(),\n };\n if (signInDetails) {\n tokens.signInDetails = JSON.parse(signInDetails);\n }\n return tokens;\n }\n catch (err) {\n return null;\n }\n }\n async storeTokens(tokens) {\n assert(tokens !== undefined, TokenProviderErrorCode.InvalidAuthTokens);\n const lastAuthUser = tokens.username;\n await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(), lastAuthUser);\n const authKeys = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(authKeys.accessToken, tokens.accessToken.toString());\n if (tokens.idToken) {\n await this.getKeyValueStorage().setItem(authKeys.idToken, tokens.idToken.toString());\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.idToken);\n }\n if (tokens.refreshToken) {\n await this.getKeyValueStorage().setItem(authKeys.refreshToken, tokens.refreshToken);\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.refreshToken);\n }\n if (tokens.deviceMetadata) {\n if (tokens.deviceMetadata.deviceKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceKey, tokens.deviceMetadata.deviceKey);\n }\n if (tokens.deviceMetadata.deviceGroupKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceGroupKey, tokens.deviceMetadata.deviceGroupKey);\n }\n await this.getKeyValueStorage().setItem(authKeys.randomPasswordKey, tokens.deviceMetadata.randomPassword);\n }\n if (tokens.signInDetails) {\n await this.getKeyValueStorage().setItem(authKeys.signInDetails, JSON.stringify(tokens.signInDetails));\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.signInDetails);\n }\n await this.getKeyValueStorage().setItem(authKeys.clockDrift, `${tokens.clockDrift}`);\n }\n async clearTokens() {\n const authKeys = await this.getAuthKeys();\n // Not calling clear because it can remove data that is not managed by AuthTokenStore\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.accessToken),\n this.getKeyValueStorage().removeItem(authKeys.idToken),\n this.getKeyValueStorage().removeItem(authKeys.clockDrift),\n this.getKeyValueStorage().removeItem(authKeys.refreshToken),\n this.getKeyValueStorage().removeItem(authKeys.signInDetails),\n this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),\n this.getKeyValueStorage().removeItem(authKeys.oauthMetadata),\n ]);\n }\n async getDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n const deviceKey = await this.getKeyValueStorage().getItem(authKeys.deviceKey);\n const deviceGroupKey = await this.getKeyValueStorage().getItem(authKeys.deviceGroupKey);\n const randomPassword = await this.getKeyValueStorage().getItem(authKeys.randomPasswordKey);\n return randomPassword && deviceGroupKey && deviceKey\n ? {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n }\n : null;\n }\n async clearDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.deviceKey),\n this.getKeyValueStorage().removeItem(authKeys.deviceGroupKey),\n this.getKeyValueStorage().removeItem(authKeys.randomPasswordKey),\n ]);\n }\n async getAuthKeys(username) {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const lastAuthUser = username ?? (await this.getLastAuthUser());\n return createKeysForAuthStorage(AUTH_KEY_PREFIX, `${this.authConfig.Cognito.userPoolClientId}.${lastAuthUser}`);\n }\n getLastAuthUserKey() {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const identifier = this.authConfig.Cognito.userPoolClientId;\n return `${AUTH_KEY_PREFIX}.${identifier}.LastAuthUser`;\n }\n async getLastAuthUser() {\n const lastAuthUser = (await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())) ??\n 'username';\n return lastAuthUser;\n }\n async setOAuthMetadata(metadata) {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(oauthMetadataKey, JSON.stringify(metadata));\n }\n async getOAuthMetadata() {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n const oauthMetadata = await this.getKeyValueStorage().getItem(oauthMetadataKey);\n return oauthMetadata && JSON.parse(oauthMetadata);\n }\n}\nexport const createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(AuthTokenStorageKeys)(`${provider}`, identifier);\n};\nexport function getAuthStorageKeys(authKeys) {\n const keys = Object.values({ ...authKeys });\n return (prefix, identifier) => keys.reduce((acc, authKey) => ({\n ...acc,\n [authKey]: `${prefix}.${identifier}.${authKey}`,\n }), {});\n}\n","import { AmplifyError } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AuthError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n }\n}\n\nexport { AuthError };\n//# sourceMappingURL=AuthError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError, } from '@aws-amplify/core/internals/utils';\nexport class AuthError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n }\n}\n","const AuthTokenStorageKeys = {\n accessToken: 'accessToken',\n idToken: 'idToken',\n oidcProvider: 'oidcProvider',\n clockDrift: 'clockDrift',\n refreshToken: 'refreshToken',\n deviceKey: 'deviceKey',\n randomPasswordKey: 'randomPasswordKey',\n deviceGroupKey: 'deviceGroupKey',\n signInDetails: 'signInDetails',\n oauthMetadata: 'oauthMetadata',\n};\n\nexport { AuthTokenStorageKeys };\n//# sourceMappingURL=types.mjs.map\n","export const AuthTokenStorageKeys = {\n accessToken: 'accessToken',\n idToken: 'idToken',\n oidcProvider: 'oidcProvider',\n clockDrift: 'clockDrift',\n refreshToken: 'refreshToken',\n deviceKey: 'deviceKey',\n randomPasswordKey: 'randomPasswordKey',\n deviceGroupKey: 'deviceGroupKey',\n signInDetails: 'signInDetails',\n oauthMetadata: 'oauthMetadata',\n};\n","import { createAssertionFunction } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar TokenProviderErrorCode;\n(function (TokenProviderErrorCode) {\n TokenProviderErrorCode[\"InvalidAuthTokens\"] = \"InvalidAuthTokens\";\n})(TokenProviderErrorCode || (TokenProviderErrorCode = {}));\nconst tokenValidationErrorMap = {\n [TokenProviderErrorCode.InvalidAuthTokens]: {\n message: 'Invalid tokens.',\n recoverySuggestion: 'Make sure the tokens are valid.',\n },\n};\nconst assert = createAssertionFunction(tokenValidationErrorMap);\n\nexport { TokenProviderErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createAssertionFunction, } from '@aws-amplify/core/internals/utils';\nexport var TokenProviderErrorCode;\n(function (TokenProviderErrorCode) {\n TokenProviderErrorCode[\"InvalidAuthTokens\"] = \"InvalidAuthTokens\";\n})(TokenProviderErrorCode || (TokenProviderErrorCode = {}));\nconst tokenValidationErrorMap = {\n [TokenProviderErrorCode.InvalidAuthTokens]: {\n message: 'Invalid tokens.',\n recoverySuggestion: 'Make sure the tokens are valid.',\n },\n};\nexport const assert = createAssertionFunction(tokenValidationErrorMap);\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AUTH_KEY_PREFIX = 'CognitoIdentityServiceProvider';\n\nexport { AUTH_KEY_PREFIX };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const AUTH_KEY_PREFIX = 'CognitoIdentityServiceProvider';\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst IdentityIdStorageKeys = {\n identityId: 'identityId',\n};\n\nexport { IdentityIdStorageKeys };\n//# sourceMappingURL=types.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const IdentityIdStorageKeys = {\n identityId: 'identityId',\n};\n","import { ConsoleLogger, getCredentialsForIdentity } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertIdTokenInAuthTokens } from '../utils/types.mjs';\nimport { cognitoIdentityIdProvider } from './IdentityIdProvider.mjs';\nimport { formLoginsMap } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('CognitoCredentialsProvider');\nconst CREDENTIALS_TTL = 50 * 60 * 1000; // 50 min, can be modified on config if required in the future\nclass CognitoAWSCredentialsAndIdentityIdProvider {\n constructor(identityIdStore) {\n this._nextCredentialsRefresh = 0;\n this._identityIdStore = identityIdStore;\n }\n async clearCredentialsAndIdentityId() {\n logger.debug('Clearing out credentials and identityId');\n this._credentialsAndIdentityId = undefined;\n await this._identityIdStore.clearIdentityId();\n }\n async clearCredentials() {\n logger.debug('Clearing out in-memory credentials');\n this._credentialsAndIdentityId = undefined;\n }\n async getCredentialsAndIdentityId(getCredentialsOptions) {\n const isAuthenticated = getCredentialsOptions.authenticated;\n const { tokens } = getCredentialsOptions;\n const { authConfig } = getCredentialsOptions;\n try {\n assertIdentityPoolIdConfig(authConfig?.Cognito);\n }\n catch {\n // No identity pool configured, skipping\n return;\n }\n if (!isAuthenticated && !authConfig.Cognito.allowGuestAccess) {\n // TODO(V6): return partial result like Native platforms\n return;\n }\n const { forceRefresh } = getCredentialsOptions;\n const tokenHasChanged = this.hasTokenChanged(tokens);\n const identityId = await cognitoIdentityIdProvider({\n tokens,\n authConfig: authConfig.Cognito,\n identityIdStore: this._identityIdStore,\n });\n // Clear cached credentials when forceRefresh is true OR the cache token has changed\n if (forceRefresh || tokenHasChanged) {\n this.clearCredentials();\n }\n if (!isAuthenticated) {\n return this.getGuestCredentials(identityId, authConfig.Cognito);\n }\n else {\n assertIdTokenInAuthTokens(tokens);\n return this.credsForOIDCTokens(authConfig.Cognito, tokens, identityId);\n }\n }\n async getGuestCredentials(identityId, authConfig) {\n // Return existing in-memory cached credentials only if it exists, is not past it's lifetime and is unauthenticated credentials\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === false) {\n logger.info('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any authenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n // use identityId to obtain guest credentials\n // save credentials in-memory\n // No logins params should be passed for guest creds:\n // https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n if (clientResult.IdentityId) {\n res.identityId = clientResult.IdentityId;\n this._identityIdStore.storeIdentityId({\n id: clientResult.IdentityId,\n type: 'guest',\n });\n }\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: false,\n };\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsNotFoundException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n async credsForOIDCTokens(authConfig, authTokens, identityId) {\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === true) {\n logger.debug('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any unauthenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const logins = authTokens.idToken\n ? formLoginsMap(authTokens.idToken.toString())\n : {};\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n Logins: logins,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n if (clientResult.IdentityId) {\n res.identityId = clientResult.IdentityId;\n // note: the following call removes guest identityId from the persistent store (localStorage)\n this._identityIdStore.storeIdentityId({\n id: clientResult.IdentityId,\n type: 'primary',\n });\n }\n // Store the credentials in-memory along with the expiration\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: true,\n associatedIdToken: authTokens.idToken?.toString(),\n };\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n isPastTTL() {\n return this._nextCredentialsRefresh === undefined\n ? true\n : this._nextCredentialsRefresh <= Date.now();\n }\n hasTokenChanged(tokens) {\n return (!!tokens &&\n !!this._credentialsAndIdentityId?.associatedIdToken &&\n tokens.idToken?.toString() !==\n this._credentialsAndIdentityId.associatedIdToken);\n }\n}\n\nexport { CognitoAWSCredentialsAndIdentityIdProvider };\n//# sourceMappingURL=credentialsProvider.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger, getCredentialsForIdentity, } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig, } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers';\nimport { assertIdTokenInAuthTokens } from '../utils/types';\nimport { cognitoIdentityIdProvider } from './IdentityIdProvider';\nimport { formLoginsMap } from './utils';\nconst logger = new ConsoleLogger('CognitoCredentialsProvider');\nconst CREDENTIALS_TTL = 50 * 60 * 1000; // 50 min, can be modified on config if required in the future\nexport class CognitoAWSCredentialsAndIdentityIdProvider {\n constructor(identityIdStore) {\n this._nextCredentialsRefresh = 0;\n this._identityIdStore = identityIdStore;\n }\n async clearCredentialsAndIdentityId() {\n logger.debug('Clearing out credentials and identityId');\n this._credentialsAndIdentityId = undefined;\n await this._identityIdStore.clearIdentityId();\n }\n async clearCredentials() {\n logger.debug('Clearing out in-memory credentials');\n this._credentialsAndIdentityId = undefined;\n }\n async getCredentialsAndIdentityId(getCredentialsOptions) {\n const isAuthenticated = getCredentialsOptions.authenticated;\n const { tokens } = getCredentialsOptions;\n const { authConfig } = getCredentialsOptions;\n try {\n assertIdentityPoolIdConfig(authConfig?.Cognito);\n }\n catch {\n // No identity pool configured, skipping\n return;\n }\n if (!isAuthenticated && !authConfig.Cognito.allowGuestAccess) {\n // TODO(V6): return partial result like Native platforms\n return;\n }\n const { forceRefresh } = getCredentialsOptions;\n const tokenHasChanged = this.hasTokenChanged(tokens);\n const identityId = await cognitoIdentityIdProvider({\n tokens,\n authConfig: authConfig.Cognito,\n identityIdStore: this._identityIdStore,\n });\n // Clear cached credentials when forceRefresh is true OR the cache token has changed\n if (forceRefresh || tokenHasChanged) {\n this.clearCredentials();\n }\n if (!isAuthenticated) {\n return this.getGuestCredentials(identityId, authConfig.Cognito);\n }\n else {\n assertIdTokenInAuthTokens(tokens);\n return this.credsForOIDCTokens(authConfig.Cognito, tokens, identityId);\n }\n }\n async getGuestCredentials(identityId, authConfig) {\n // Return existing in-memory cached credentials only if it exists, is not past it's lifetime and is unauthenticated credentials\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === false) {\n logger.info('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any authenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n // use identityId to obtain guest credentials\n // save credentials in-memory\n // No logins params should be passed for guest creds:\n // https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n if (clientResult.IdentityId) {\n res.identityId = clientResult.IdentityId;\n this._identityIdStore.storeIdentityId({\n id: clientResult.IdentityId,\n type: 'guest',\n });\n }\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: false,\n };\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsNotFoundException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n async credsForOIDCTokens(authConfig, authTokens, identityId) {\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === true) {\n logger.debug('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any unauthenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const logins = authTokens.idToken\n ? formLoginsMap(authTokens.idToken.toString())\n : {};\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n Logins: logins,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n if (clientResult.IdentityId) {\n res.identityId = clientResult.IdentityId;\n // note: the following call removes guest identityId from the persistent store (localStorage)\n this._identityIdStore.storeIdentityId({\n id: clientResult.IdentityId,\n type: 'primary',\n });\n }\n // Store the credentials in-memory along with the expiration\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: true,\n associatedIdToken: authTokens.idToken?.toString(),\n };\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n isPastTTL() {\n return this._nextCredentialsRefresh === undefined\n ? true\n : this._nextCredentialsRefresh <= Date.now();\n }\n hasTokenChanged(tokens) {\n return (!!tokens &&\n !!this._credentialsAndIdentityId?.associatedIdToken &&\n tokens.idToken?.toString() !==\n this._credentialsAndIdentityId.associatedIdToken);\n }\n}\n","import '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nconst getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n\nexport { getCredentialsForIdentity };\n//# sourceMappingURL=getCredentialsForIdentity.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, parseMetadata, } from '../../clients';\nimport { composeServiceApi } from '../../clients/internal';\nimport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders, } from './base';\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nexport const getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst parseMetadata = (response) => {\n const { headers, statusCode } = response;\n return {\n ...(isMetadataBearer(response) ? response.$metadata : {}),\n httpStatusCode: statusCode,\n requestId: headers['x-amzn-requestid'] ??\n headers['x-amzn-request-id'] ??\n headers['x-amz-request-id'],\n extendedRequestId: headers['x-amz-id-2'],\n cfId: headers['x-amz-cf-id'],\n };\n};\nconst isMetadataBearer = (response) => typeof response?.$metadata === 'object';\n\nexport { parseMetadata };\n//# sourceMappingURL=responseInfo.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const parseMetadata = (response) => {\n const { headers, statusCode } = response;\n return {\n ...(isMetadataBearer(response) ? response.$metadata : {}),\n httpStatusCode: statusCode,\n requestId: headers['x-amzn-requestid'] ??\n headers['x-amzn-request-id'] ??\n headers['x-amz-request-id'],\n extendedRequestId: headers['x-amz-id-2'],\n cfId: headers['x-amz-cf-id'],\n };\n};\nconst isMetadataBearer = (response) => typeof response?.$metadata === 'object';\n","import { parseMetadata } from './responseInfo.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Utility functions for serializing and deserializing of JSON protocol in general(including: REST-JSON, JSON-RPC, etc.)\n */\n/**\n * Error parser for AWS JSON protocol.\n */\nconst parseJsonError = async (response) => {\n if (!response || response.statusCode < 300) {\n return;\n }\n const body = await parseJsonBody(response);\n const sanitizeErrorCode = (rawValue) => {\n const [cleanValue] = rawValue.toString().split(/[,:]+/);\n if (cleanValue.includes('#')) {\n return cleanValue.split('#')[1];\n }\n return cleanValue;\n };\n const code = sanitizeErrorCode(response.headers['x-amzn-errortype'] ??\n body.code ??\n body.__type ??\n 'UnknownError');\n const message = body.message ?? body.Message ?? 'Unknown error';\n const error = new Error(message);\n return Object.assign(error, {\n name: code,\n $metadata: parseMetadata(response),\n });\n};\n/**\n * Parse JSON response body to JavaScript object.\n */\nconst parseJsonBody = async (response) => {\n if (!response.body) {\n throw new Error('Missing response payload');\n }\n const output = await response.body.json();\n return Object.assign(output, {\n $metadata: parseMetadata(response),\n });\n};\n\nexport { parseJsonBody, parseJsonError };\n//# sourceMappingURL=json.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseMetadata } from './responseInfo';\n/**\n * Utility functions for serializing and deserializing of JSON protocol in general(including: REST-JSON, JSON-RPC, etc.)\n */\n/**\n * Error parser for AWS JSON protocol.\n */\nexport const parseJsonError = async (response) => {\n if (!response || response.statusCode < 300) {\n return;\n }\n const body = await parseJsonBody(response);\n const sanitizeErrorCode = (rawValue) => {\n const [cleanValue] = rawValue.toString().split(/[,:]+/);\n if (cleanValue.includes('#')) {\n return cleanValue.split('#')[1];\n }\n return cleanValue;\n };\n const code = sanitizeErrorCode(response.headers['x-amzn-errortype'] ??\n body.code ??\n body.__type ??\n 'UnknownError');\n const message = body.message ?? body.Message ?? 'Unknown error';\n const error = new Error(message);\n return Object.assign(error, {\n name: code,\n $metadata: parseMetadata(response),\n });\n};\n/**\n * Parse JSON response body to JavaScript object.\n */\nexport const parseJsonBody = async (response) => {\n if (!response.body) {\n throw new Error('Missing response payload');\n }\n const output = await response.body.json();\n return Object.assign(output, {\n $metadata: parseMetadata(response),\n });\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a service API handler that accepts input as defined shape and responds conforming to defined output shape.\n * A service API handler is composed with:\n * * A transfer handler\n * * A serializer function\n * * A deserializer function\n * * A default config object\n *\n * The returned service API handler, when called, will trigger the following workflow:\n * 1. When calling the service API handler function, the default config object is merged into the input config\n * object to assign the default values of some omitted configs, resulting to a resolved config object.\n * 2. The `endpointResolver` function from the default config object will be invoked with the resolved config object and\n * API input object resulting to an endpoint instance.\n * 3. The serializer function is invoked with API input object and the endpoint instance resulting to an HTTP request\n * instance.\n * 4. The HTTP request instance and the resolved config object is passed to the transfer handler function.\n * 5. The transfer handler function resolves to an HTTP response instance(can be either successful or failed status code).\n * 6. The deserializer function is invoked with the HTTP response instance resulting to the API output object, and\n * return to the caller.\n *\n *\n * @param transferHandler Async function for dispatching HTTP requests and returning HTTP response.\n * @param serializer Async function for converting object in defined input shape into HTTP request targeting a given\n * \tendpoint.\n * @param deserializer Async function for converting HTTP response into output object in defined output shape, or error\n * \tshape.\n * @param defaultConfig object containing default options to be consumed by transfer handler, serializer and\n * deserializer.\n * @returns a async service API handler function that accepts a config object and input object in defined shape, returns\n * \tan output object in defined shape. It may also throw error instance in defined shape in deserializer. The config\n * object type is composed with options type of transferHandler, endpointResolver function as well as endpointResolver\n * function's input options type, region string. The config object property will be marked as optional if it's also\n * \tdefined in defaultConfig.\n *\n * @internal\n */\nconst composeServiceApi = (transferHandler, serializer, deserializer, defaultConfig) => {\n return async (config, input) => {\n const resolvedConfig = {\n ...defaultConfig,\n ...config,\n };\n // We need to allow different endpoints based on both given config(other than region) and input.\n // However for most of non-S3 services, region is the only input for endpoint resolver.\n const endpoint = await resolvedConfig.endpointResolver(resolvedConfig, input);\n // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.\n // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).\n // They will be populated automatically by browser, or node-fetch polyfill.\n const request = await serializer(input, endpoint);\n const response = await transferHandler(request, {\n ...resolvedConfig,\n });\n return deserializer(response);\n };\n};\n\nexport { composeServiceApi };\n//# sourceMappingURL=composeServiceApi.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a service API handler that accepts input as defined shape and responds conforming to defined output shape.\n * A service API handler is composed with:\n * * A transfer handler\n * * A serializer function\n * * A deserializer function\n * * A default config object\n *\n * The returned service API handler, when called, will trigger the following workflow:\n * 1. When calling the service API handler function, the default config object is merged into the input config\n * object to assign the default values of some omitted configs, resulting to a resolved config object.\n * 2. The `endpointResolver` function from the default config object will be invoked with the resolved config object and\n * API input object resulting to an endpoint instance.\n * 3. The serializer function is invoked with API input object and the endpoint instance resulting to an HTTP request\n * instance.\n * 4. The HTTP request instance and the resolved config object is passed to the transfer handler function.\n * 5. The transfer handler function resolves to an HTTP response instance(can be either successful or failed status code).\n * 6. The deserializer function is invoked with the HTTP response instance resulting to the API output object, and\n * return to the caller.\n *\n *\n * @param transferHandler Async function for dispatching HTTP requests and returning HTTP response.\n * @param serializer Async function for converting object in defined input shape into HTTP request targeting a given\n * \tendpoint.\n * @param deserializer Async function for converting HTTP response into output object in defined output shape, or error\n * \tshape.\n * @param defaultConfig object containing default options to be consumed by transfer handler, serializer and\n * deserializer.\n * @returns a async service API handler function that accepts a config object and input object in defined shape, returns\n * \tan output object in defined shape. It may also throw error instance in defined shape in deserializer. The config\n * object type is composed with options type of transferHandler, endpointResolver function as well as endpointResolver\n * function's input options type, region string. The config object property will be marked as optional if it's also\n * \tdefined in defaultConfig.\n *\n * @internal\n */\nexport const composeServiceApi = (transferHandler, serializer, deserializer, defaultConfig) => {\n return async (config, input) => {\n const resolvedConfig = {\n ...defaultConfig,\n ...config,\n };\n // We need to allow different endpoints based on both given config(other than region) and input.\n // However for most of non-S3 services, region is the only input for endpoint resolver.\n const endpoint = await resolvedConfig.endpointResolver(resolvedConfig, input);\n // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.\n // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).\n // They will be populated automatically by browser, or node-fetch polyfill.\n const request = await serializer(input, endpoint);\n const response = await transferHandler(request, {\n ...resolvedConfig,\n });\n return deserializer(response);\n };\n};\n","import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport { unauthenticatedHandler } from '../../clients/handlers/unauthenticated.mjs';\nimport { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';\nimport { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler.mjs';\nimport { parseJsonError } from '../../clients/serde/json.mjs';\nimport { getAmplifyUserAgent } from '../../Platform/index.mjs';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nconst cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nconst defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n\nexport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders };\n//# sourceMappingURL=base.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getDnsSuffix, parseJsonError, unauthenticatedHandler, } from '../../clients';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler';\nimport { getRetryDecider, jitteredBackoff, } from '../../clients/middleware/retry';\nimport { getAmplifyUserAgent } from '../../Platform';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework';\nimport { AmplifyUrl } from '../../utils/amplifyUrl';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nexport const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nexport const getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nexport const buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n","import { partitionsInfo, defaultPartition } from './partitions.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get the AWS Services endpoint URL's DNS suffix for a given region. A typical AWS regional service endpoint URL will\n * follow this pattern: {endpointPrefix}.{region}.{dnsSuffix}. For example, the endpoint URL for Cognito Identity in\n * us-east-1 will be cognito-identity.us-east-1.amazonaws.com. Here the DnsSuffix is `amazonaws.com`.\n *\n * @param region\n * @returns The DNS suffix\n *\n * @internal\n */\nconst getDnsSuffix = (region) => {\n const { partitions } = partitionsInfo;\n for (const { regions, outputs, regionRegex } of partitions) {\n const regex = new RegExp(regionRegex);\n if (regions.includes(region) || regex.test(region)) {\n return outputs.dnsSuffix;\n }\n }\n return defaultPartition.outputs.dnsSuffix;\n};\n\nexport { getDnsSuffix };\n//# sourceMappingURL=getDnsSuffix.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { defaultPartition, partitionsInfo } from './partitions';\n/**\n * Get the AWS Services endpoint URL's DNS suffix for a given region. A typical AWS regional service endpoint URL will\n * follow this pattern: {endpointPrefix}.{region}.{dnsSuffix}. For example, the endpoint URL for Cognito Identity in\n * us-east-1 will be cognito-identity.us-east-1.amazonaws.com. Here the DnsSuffix is `amazonaws.com`.\n *\n * @param region\n * @returns The DNS suffix\n *\n * @internal\n */\nexport const getDnsSuffix = (region) => {\n const { partitions } = partitionsInfo;\n for (const { regions, outputs, regionRegex } of partitions) {\n const regex = new RegExp(regionRegex);\n if (regions.includes(region) || regex.test(region)) {\n return outputs.dnsSuffix;\n }\n }\n return defaultPartition.outputs.dnsSuffix;\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default partition for AWS services. This is used when the region is not provided or the region is not recognized.\n *\n * @internal\n */\nconst defaultPartition = {\n id: 'aws',\n outputs: {\n dnsSuffix: 'amazonaws.com',\n },\n regionRegex: '^(us|eu|ap|sa|ca|me|af)\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-global'],\n};\n/**\n * This data is adapted from the partition file from AWS SDK shared utilities but remove some contents for bundle size\n * concern. Information removed are `dualStackDnsSuffix`, `supportDualStack`, `supportFIPS`, restricted partitions, and\n * list of regions for each partition other than global regions.\n *\n * * Ref: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints\n * * Ref: https://github.com/aws/aws-sdk-js-v3/blob/0201baef03c2379f1f6f7150b9d401d4b230d488/packages/util-endpoints/src/lib/aws/partitions.json#L1\n *\n * @internal\n */\nconst partitionsInfo = {\n partitions: [\n defaultPartition,\n {\n id: 'aws-cn',\n outputs: {\n dnsSuffix: 'amazonaws.com.cn',\n },\n regionRegex: '^cn\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-cn-global'],\n },\n ],\n};\n\nexport { defaultPartition, partitionsInfo };\n//# sourceMappingURL=partitions.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default partition for AWS services. This is used when the region is not provided or the region is not recognized.\n *\n * @internal\n */\nexport const defaultPartition = {\n id: 'aws',\n outputs: {\n dnsSuffix: 'amazonaws.com',\n },\n regionRegex: '^(us|eu|ap|sa|ca|me|af)\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-global'],\n};\n/**\n * This data is adapted from the partition file from AWS SDK shared utilities but remove some contents for bundle size\n * concern. Information removed are `dualStackDnsSuffix`, `supportDualStack`, `supportFIPS`, restricted partitions, and\n * list of regions for each partition other than global regions.\n *\n * * Ref: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints\n * * Ref: https://github.com/aws/aws-sdk-js-v3/blob/0201baef03c2379f1f6f7150b9d401d4b230d488/packages/util-endpoints/src/lib/aws/partitions.json#L1\n *\n * @internal\n */\nexport const partitionsInfo = {\n partitions: [\n defaultPartition,\n {\n id: 'aws-cn',\n outputs: {\n dnsSuffix: 'amazonaws.com.cn',\n },\n regionRegex: '^cn\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-cn-global'],\n },\n ],\n};\n","import { retryMiddlewareFactory } from '../middleware/retry/middleware.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport { userAgentMiddlewareFactory } from '../middleware/userAgent/middleware.mjs';\nimport { composeTransferHandler } from '../internal/composeTransferHandler.mjs';\nimport { fetchTransferHandler } from './fetch.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst unauthenticatedHandler = composeTransferHandler(fetchTransferHandler, [userAgentMiddlewareFactory, retryMiddlewareFactory]);\n\nexport { unauthenticatedHandler };\n//# sourceMappingURL=unauthenticated.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { retryMiddlewareFactory } from '../middleware/retry';\nimport { userAgentMiddlewareFactory, } from '../middleware/userAgent';\nimport { composeTransferHandler } from '../internal/composeTransferHandler';\nimport { fetchTransferHandler } from './fetch';\nexport const unauthenticatedHandler = composeTransferHandler(fetchTransferHandler, [userAgentMiddlewareFactory, retryMiddlewareFactory]);\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nconst retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {\n if (maxAttempts < 1) {\n throw new Error('maxAttempts must be greater than 0');\n }\n return (next, context) => async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = () => {\n if (response) {\n addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n }\n else {\n addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n try {\n response = await next(request);\n error = undefined;\n }\n catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount =\n (context.attemptsCount ?? 0) > attemptsCount\n ? (context.attemptsCount ?? 0)\n : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\n if (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n // prevent sleep for last attempt or cancelled request;\n const delay = computeDelay(attemptsCount);\n await cancellableSleep(delay, abortSignal);\n }\n continue;\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n }\n if (abortSignal?.aborted) {\n throw new Error('Request aborted.');\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n };\n};\nconst cancellableSleep = (timeoutMs, abortSignal) => {\n if (abortSignal?.aborted) {\n return Promise.resolve();\n }\n let timeoutId;\n let sleepPromiseResolveFn;\n const sleepPromise = new Promise(resolve => {\n sleepPromiseResolveFn = resolve;\n timeoutId = setTimeout(resolve, timeoutMs);\n });\n abortSignal?.addEventListener('abort', function cancelSleep(_) {\n clearTimeout(timeoutId);\n abortSignal?.removeEventListener('abort', cancelSleep);\n sleepPromiseResolveFn();\n });\n return sleepPromise;\n};\nconst addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts) => {\n if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') {\n return;\n }\n nextHandlerOutput.$metadata = {\n ...(nextHandlerOutput.$metadata ?? {}),\n attempts,\n };\n};\n\nexport { retryMiddlewareFactory };\n//# sourceMappingURL=middleware.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nexport const retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {\n if (maxAttempts < 1) {\n throw new Error('maxAttempts must be greater than 0');\n }\n return (next, context) => async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = () => {\n if (response) {\n addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n }\n else {\n addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n try {\n response = await next(request);\n error = undefined;\n }\n catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount =\n (context.attemptsCount ?? 0) > attemptsCount\n ? (context.attemptsCount ?? 0)\n : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\n if (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n // prevent sleep for last attempt or cancelled request;\n const delay = computeDelay(attemptsCount);\n await cancellableSleep(delay, abortSignal);\n }\n continue;\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n }\n if (abortSignal?.aborted) {\n throw new Error('Request aborted.');\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n };\n};\nconst cancellableSleep = (timeoutMs, abortSignal) => {\n if (abortSignal?.aborted) {\n return Promise.resolve();\n }\n let timeoutId;\n let sleepPromiseResolveFn;\n const sleepPromise = new Promise(resolve => {\n sleepPromiseResolveFn = resolve;\n timeoutId = setTimeout(resolve, timeoutMs);\n });\n abortSignal?.addEventListener('abort', function cancelSleep(_) {\n clearTimeout(timeoutId);\n abortSignal?.removeEventListener('abort', cancelSleep);\n sleepPromiseResolveFn();\n });\n return sleepPromise;\n};\nconst addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts) => {\n if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') {\n return;\n }\n nextHandlerOutput.$metadata = {\n ...(nextHandlerOutput.$metadata ?? {}),\n attempts,\n };\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Middleware injects user agent string to specified header(default to 'x-amz-user-agent'),\n * if the header is not set already.\n *\n * TODO: incorporate new user agent design\n */\nconst userAgentMiddlewareFactory = ({ userAgentHeader = 'x-amz-user-agent', userAgentValue = '', }) => next => {\n return async function userAgentMiddleware(request) {\n if (userAgentValue.trim().length === 0) {\n const result = await next(request);\n return result;\n }\n else {\n const headerName = userAgentHeader.toLowerCase();\n request.headers[headerName] = request.headers[headerName]\n ? `${request.headers[headerName]} ${userAgentValue}`\n : userAgentValue;\n const response = await next(request);\n return response;\n }\n };\n};\n\nexport { userAgentMiddlewareFactory };\n//# sourceMappingURL=middleware.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Middleware injects user agent string to specified header(default to 'x-amz-user-agent'),\n * if the header is not set already.\n *\n * TODO: incorporate new user agent design\n */\nexport const userAgentMiddlewareFactory = ({ userAgentHeader = 'x-amz-user-agent', userAgentValue = '', }) => next => {\n return async function userAgentMiddleware(request) {\n if (userAgentValue.trim().length === 0) {\n const result = await next(request);\n return result;\n }\n else {\n const headerName = userAgentHeader.toLowerCase();\n request.headers[headerName] = request.headers[headerName]\n ? `${request.headers[headerName]} ${userAgentValue}`\n : userAgentValue;\n const response = await next(request);\n return response;\n }\n };\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a transfer handler with a core transfer handler and a list of middleware.\n * @param coreHandler Core transfer handler\n * @param middleware\tList of middleware\n * @returns A transfer handler whose option type is the union of the core\n * \ttransfer handler's option type and the middleware's option type.\n * @internal\n */\nconst composeTransferHandler = (coreHandler, middleware) => (request, options) => {\n const context = {};\n let composedHandler = (composeHandlerRequest) => coreHandler(composeHandlerRequest, options);\n for (let i = middleware.length - 1; i >= 0; i--) {\n const m = middleware[i];\n const resolvedMiddleware = m(options);\n composedHandler = resolvedMiddleware(composedHandler, context);\n }\n return composedHandler(request);\n};\n\nexport { composeTransferHandler };\n//# sourceMappingURL=composeTransferHandler.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a transfer handler with a core transfer handler and a list of middleware.\n * @param coreHandler Core transfer handler\n * @param middleware\tList of middleware\n * @returns A transfer handler whose option type is the union of the core\n * \ttransfer handler's option type and the middleware's option type.\n * @internal\n */\nexport const composeTransferHandler = (coreHandler, middleware) => (request, options) => {\n const context = {};\n let composedHandler = (composeHandlerRequest) => coreHandler(composeHandlerRequest, options);\n for (let i = middleware.length - 1; i >= 0; i--) {\n const m = middleware[i];\n const resolvedMiddleware = m(options);\n composedHandler = resolvedMiddleware(composedHandler, context);\n }\n return composedHandler(request);\n};\n","import { AmplifyError } from '../../errors/AmplifyError.mjs';\nimport { AmplifyErrorCode } from '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport { withMemoization } from '../utils/memoization.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nconst fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {\n let resp;\n try {\n resp = await fetch(url, {\n method,\n headers,\n body: shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin',\n });\n }\n catch (e) {\n if (e instanceof TypeError) {\n throw new AmplifyError({\n name: AmplifyErrorCode.NetworkError,\n message: 'A network error has occurred.',\n underlyingError: e,\n });\n }\n throw e;\n }\n const responseHeaders = {};\n resp.headers?.forEach((value, key) => {\n responseHeaders[key.toLowerCase()] = value;\n });\n const httpResponse = {\n statusCode: resp.status,\n headers: responseHeaders,\n body: null,\n };\n // resp.body is a ReadableStream according to Fetch API spec, but React Native\n // does not implement it.\n const bodyWithMixin = Object.assign(resp.body ?? {}, {\n text: withMemoization(() => resp.text()),\n blob: withMemoization(() => resp.blob()),\n json: withMemoization(() => resp.json()),\n });\n return {\n ...httpResponse,\n body: bodyWithMixin,\n };\n};\n\nexport { fetchTransferHandler };\n//# sourceMappingURL=fetch.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError } from '../../errors';\nimport { withMemoization } from '../utils/memoization';\nimport { AmplifyErrorCode } from '../../types';\nconst shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nexport const fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {\n let resp;\n try {\n resp = await fetch(url, {\n method,\n headers,\n body: shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin',\n });\n }\n catch (e) {\n if (e instanceof TypeError) {\n throw new AmplifyError({\n name: AmplifyErrorCode.NetworkError,\n message: 'A network error has occurred.',\n underlyingError: e,\n });\n }\n throw e;\n }\n const responseHeaders = {};\n resp.headers?.forEach((value, key) => {\n responseHeaders[key.toLowerCase()] = value;\n });\n const httpResponse = {\n statusCode: resp.status,\n headers: responseHeaders,\n body: null,\n };\n // resp.body is a ReadableStream according to Fetch API spec, but React Native\n // does not implement it.\n const bodyWithMixin = Object.assign(resp.body ?? {}, {\n text: withMemoization(() => resp.text()),\n blob: withMemoization(() => resp.blob()),\n json: withMemoization(() => resp.json()),\n });\n return {\n ...httpResponse,\n body: bodyWithMixin,\n };\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cache the payload of a response body. It allows multiple calls to the body,\n * for example, when reading the body in both retry decider and error deserializer.\n * Caching body is allowed here because we call the body accessor(blob(), json(),\n * etc.) when body is small or streaming implementation is not available(RN).\n *\n * @internal\n */\nconst withMemoization = (payloadAccessor) => {\n let cached;\n return () => {\n if (!cached) {\n // Explicitly not awaiting. Intermediate await would add overhead and\n // introduce a possible race in the event that this wrapper is called\n // again before the first `payloadAccessor` call resolves.\n cached = payloadAccessor();\n }\n return cached;\n };\n};\n\nexport { withMemoization };\n//# sourceMappingURL=memoization.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cache the payload of a response body. It allows multiple calls to the body,\n * for example, when reading the body in both retry decider and error deserializer.\n * Caching body is allowed here because we call the body accessor(blob(), json(),\n * etc.) when body is small or streaming implementation is not available(RN).\n *\n * @internal\n */\nexport const withMemoization = (payloadAccessor) => {\n let cached;\n return () => {\n if (!cached) {\n // Explicitly not awaiting. Intermediate await would add overhead and\n // introduce a possible race in the event that this wrapper is called\n // again before the first `payloadAccessor` call resolves.\n cached = payloadAccessor();\n }\n return cached;\n };\n};\n","import '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\nimport '../../../utils/getClientInfo/getClientInfo.mjs';\nimport { jitteredBackoff as jitteredBackoff$1 } from '../../../utils/retry/jitteredBackoff.mjs';\nimport '../../../utils/retry/retry.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\nconst jitteredBackoff = attempt => {\n const delayFunction = jitteredBackoff$1(DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? DEFAULT_MAX_DELAY_MS : delay;\n};\n\nexport { jitteredBackoff };\n//# sourceMappingURL=jitteredBackoff.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { jitteredBackoff as jitteredBackoffUtil } from '../../../utils';\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\nexport const jitteredBackoff = attempt => {\n const delayFunction = jitteredBackoffUtil(DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? DEFAULT_MAX_DELAY_MS : delay;\n};\n","import { MAX_DELAY_MS } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private\n * Internal use of Amplify only\n */\nfunction jitteredBackoff(maxDelayMs = MAX_DELAY_MS) {\n const BASE_TIME_MS = 100;\n const JITTER_FACTOR = 100;\n return attempt => {\n const delay = 2 ** attempt * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n\nexport { jitteredBackoff };\n//# sourceMappingURL=jitteredBackoff.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { MAX_DELAY_MS } from './constants';\n/**\n * @private\n * Internal use of Amplify only\n */\nexport function jitteredBackoff(maxDelayMs = MAX_DELAY_MS) {\n const BASE_TIME_MS = 100;\n const JITTER_FACTOR = 100;\n return attempt => {\n const delay = 2 ** attempt * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MAX_DELAY_MS = 5 * 60 * 1000;\n\nexport { MAX_DELAY_MS };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const MAX_DELAY_MS = 5 * 60 * 1000;\n","import { AmplifyErrorCode } from '../../../types/errors.mjs';\nimport { isClockSkewError } from './isClockSkewError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nconst getRetryDecider = (errorParser) => async (response, error) => {\n const parsedError = error ??\n (await errorParser(response)) ??\n undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n const isRetryable = isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n isClockSkewError(errorCode) ||\n isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable,\n };\n};\n// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37\nconst THROTTLING_ERROR_CODES = [\n 'BandwidthLimitExceeded',\n 'EC2ThrottledException',\n 'LimitExceededException',\n 'PriorRequestNotComplete',\n 'ProvisionedThroughputExceededException',\n 'RequestLimitExceeded',\n 'RequestThrottled',\n 'RequestThrottledException',\n 'SlowDown',\n 'ThrottledException',\n 'Throttling',\n 'ThrottlingException',\n 'TooManyRequestsException',\n];\nconst TIMEOUT_ERROR_CODES = [\n 'TimeoutError',\n 'RequestTimeout',\n 'RequestTimeoutException',\n];\nconst isThrottlingError = (statusCode, errorCode) => statusCode === 429 ||\n (!!errorCode && THROTTLING_ERROR_CODES.includes(errorCode));\nconst isConnectionError = (error) => [\n AmplifyErrorCode.NetworkError,\n // TODO(vNext): unify the error code `ERR_NETWORK` used by the Storage XHR handler\n 'ERR_NETWORK',\n].includes(error?.name);\nconst isServerSideError = (statusCode, errorCode) => (!!statusCode && [500, 502, 503, 504].includes(statusCode)) ||\n (!!errorCode && TIMEOUT_ERROR_CODES.includes(errorCode));\n\nexport { getRetryDecider };\n//# sourceMappingURL=defaultRetryDecider.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyErrorCode } from '../../../types';\nimport { isClockSkewError } from './isClockSkewError';\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nexport const getRetryDecider = (errorParser) => async (response, error) => {\n const parsedError = error ??\n (await errorParser(response)) ??\n undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n const isRetryable = isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n isClockSkewError(errorCode) ||\n isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable,\n };\n};\n// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37\nconst THROTTLING_ERROR_CODES = [\n 'BandwidthLimitExceeded',\n 'EC2ThrottledException',\n 'LimitExceededException',\n 'PriorRequestNotComplete',\n 'ProvisionedThroughputExceededException',\n 'RequestLimitExceeded',\n 'RequestThrottled',\n 'RequestThrottledException',\n 'SlowDown',\n 'ThrottledException',\n 'Throttling',\n 'ThrottlingException',\n 'TooManyRequestsException',\n];\nconst TIMEOUT_ERROR_CODES = [\n 'TimeoutError',\n 'RequestTimeout',\n 'RequestTimeoutException',\n];\nconst isThrottlingError = (statusCode, errorCode) => statusCode === 429 ||\n (!!errorCode && THROTTLING_ERROR_CODES.includes(errorCode));\nconst isConnectionError = (error) => [\n AmplifyErrorCode.NetworkError,\n // TODO(vNext): unify the error code `ERR_NETWORK` used by the Storage XHR handler\n 'ERR_NETWORK',\n].includes(error?.name);\nconst isServerSideError = (statusCode, errorCode) => (!!statusCode && [500, 502, 503, 504].includes(statusCode)) ||\n (!!errorCode && TIMEOUT_ERROR_CODES.includes(errorCode));\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// via https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L8\nconst CLOCK_SKEW_ERROR_CODES = [\n 'AuthFailure',\n 'InvalidSignatureException',\n 'RequestExpired',\n 'RequestInTheFuture',\n 'RequestTimeTooSkewed',\n 'SignatureDoesNotMatch',\n 'BadRequestException', // API Gateway\n];\n/**\n * Given an error code, returns true if it is related to a clock skew error.\n *\n * @param errorCode String representation of some error.\n * @returns True if given error is present in `CLOCK_SKEW_ERROR_CODES`, false otherwise.\n *\n * @internal\n */\nconst isClockSkewError = (errorCode) => !!errorCode && CLOCK_SKEW_ERROR_CODES.includes(errorCode);\n\nexport { isClockSkewError };\n//# sourceMappingURL=isClockSkewError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// via https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L8\nconst CLOCK_SKEW_ERROR_CODES = [\n 'AuthFailure',\n 'InvalidSignatureException',\n 'RequestExpired',\n 'RequestInTheFuture',\n 'RequestTimeTooSkewed',\n 'SignatureDoesNotMatch',\n 'BadRequestException', // API Gateway\n];\n/**\n * Given an error code, returns true if it is related to a clock skew error.\n *\n * @param errorCode String representation of some error.\n * @returns True if given error is present in `CLOCK_SKEW_ERROR_CODES`, false otherwise.\n *\n * @internal\n */\nexport const isClockSkewError = (errorCode) => !!errorCode && CLOCK_SKEW_ERROR_CODES.includes(errorCode);\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AmplifyUrl = URL;\nconst AmplifyUrlSearchParams = URLSearchParams;\n\nexport { AmplifyUrl, AmplifyUrlSearchParams };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AmplifyUrl = URL;\nconst AmplifyUrlSearchParams = URLSearchParams;\nexport { AmplifyUrl, AmplifyUrlSearchParams };\n","import { Framework } from './types.mjs';\nimport { version } from './version.mjs';\nimport { detectFramework, observeFrameworkChanges } from './detectFramework.mjs';\nimport { getCustomUserAgent } from './customUserAgent.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst BASE_USER_AGENT = `aws-amplify`;\n/** Sanitize Amplify version string be removing special character + and character post the special character */\nconst sanitizeAmplifyVersion = (amplifyVersion) => amplifyVersion.replace(/\\+.*/, '');\nclass PlatformBuilder {\n constructor() {\n this.userAgent = `${BASE_USER_AGENT}/${sanitizeAmplifyVersion(version)}`;\n }\n get framework() {\n return detectFramework();\n }\n get isReactNative() {\n return (this.framework === Framework.ReactNative ||\n this.framework === Framework.Expo);\n }\n observeFrameworkChanges(fcn) {\n observeFrameworkChanges(fcn);\n }\n}\nconst Platform = new PlatformBuilder();\nconst getAmplifyUserAgentObject = ({ category, action, } = {}) => {\n const userAgent = [\n [BASE_USER_AGENT, sanitizeAmplifyVersion(version)],\n ];\n if (category) {\n userAgent.push([category, action]);\n }\n userAgent.push(['framework', detectFramework()]);\n if (category && action) {\n const customState = getCustomUserAgent(category, action);\n if (customState) {\n customState.forEach(state => {\n userAgent.push(state);\n });\n }\n }\n return userAgent;\n};\nconst getAmplifyUserAgent = (customUserAgentDetails) => {\n const userAgent = getAmplifyUserAgentObject(customUserAgentDetails);\n const userAgentString = userAgent\n .map(([agentKey, agentValue]) => agentKey && agentValue ? `${agentKey}/${agentValue}` : agentKey)\n .join(' ');\n return userAgentString;\n};\n\nexport { Platform, getAmplifyUserAgent, getAmplifyUserAgentObject, sanitizeAmplifyVersion };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Framework } from './types';\nimport { version } from './version';\nimport { detectFramework, observeFrameworkChanges } from './detectFramework';\nimport { getCustomUserAgent } from './customUserAgent';\nconst BASE_USER_AGENT = `aws-amplify`;\n/** Sanitize Amplify version string be removing special character + and character post the special character */\nexport const sanitizeAmplifyVersion = (amplifyVersion) => amplifyVersion.replace(/\\+.*/, '');\nclass PlatformBuilder {\n constructor() {\n this.userAgent = `${BASE_USER_AGENT}/${sanitizeAmplifyVersion(version)}`;\n }\n get framework() {\n return detectFramework();\n }\n get isReactNative() {\n return (this.framework === Framework.ReactNative ||\n this.framework === Framework.Expo);\n }\n observeFrameworkChanges(fcn) {\n observeFrameworkChanges(fcn);\n }\n}\nexport const Platform = new PlatformBuilder();\nexport const getAmplifyUserAgentObject = ({ category, action, } = {}) => {\n const userAgent = [\n [BASE_USER_AGENT, sanitizeAmplifyVersion(version)],\n ];\n if (category) {\n userAgent.push([category, action]);\n }\n userAgent.push(['framework', detectFramework()]);\n if (category && action) {\n const customState = getCustomUserAgent(category, action);\n if (customState) {\n customState.forEach(state => {\n userAgent.push(state);\n });\n }\n }\n return userAgent;\n};\nexport const getAmplifyUserAgent = (customUserAgentDetails) => {\n const userAgent = getAmplifyUserAgentObject(customUserAgentDetails);\n const userAgentString = userAgent\n .map(([agentKey, agentValue]) => agentKey && agentValue ? `${agentKey}/${agentValue}` : agentKey)\n .join(' ');\n return userAgentString;\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (Category = {}));\nvar AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})(AuthAction || (AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction || (StorageAction = {}));\n\nexport { AiAction, AnalyticsAction, ApiAction, AuthAction, Category, DataStoreAction, Framework, GeoAction, InAppMessagingAction, InteractionsAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction };\n//# sourceMappingURL=types.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (Framework = {}));\nexport var Category;\n(function (Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (Category = {}));\nexport var AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\nexport var AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (AnalyticsAction = {}));\nexport var ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (ApiAction = {}));\nexport var AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})(AuthAction || (AuthAction = {}));\nexport var DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (DataStoreAction = {}));\nexport var GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (GeoAction = {}));\nexport var InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (InAppMessagingAction = {}));\nexport var InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (InteractionsAction = {}));\nexport var PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (PredictionsAction = {}));\nexport var PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (PubSubAction = {}));\nexport var PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (PushNotificationAction = {}));\nexport var StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction || (StorageAction = {}));\n","// generated by genversion\nconst version = '6.13.6';\n\nexport { version };\n//# sourceMappingURL=version.mjs.map\n","// generated by genversion\nexport const version = '6.13.6';\n","import { Framework } from './types.mjs';\nimport { detect } from './detection/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// We want to cache detection since the framework won't change\nlet frameworkCache;\nconst frameworkChangeObservers = [];\n// Setup the detection reset tracking / timeout delays\nlet resetTriggered = false;\nconst SSR_RESET_TIMEOUT = 10; // ms\nconst WEB_RESET_TIMEOUT = 10; // ms\nconst PRIME_FRAMEWORK_DELAY = 1000; // ms\nconst detectFramework = () => {\n if (!frameworkCache) {\n frameworkCache = detect();\n if (resetTriggered) {\n // The final run of detectFramework:\n // Starting from this point, the `frameworkCache` becomes \"final\".\n // So we don't need to notify the observers again so the observer\n // can be removed after the final notice.\n while (frameworkChangeObservers.length) {\n frameworkChangeObservers.pop()?.();\n }\n }\n else {\n // The first run of detectFramework:\n // Every time we update the cache, call each observer function\n frameworkChangeObservers.forEach(fcn => {\n fcn();\n });\n }\n // Retry once for either Unknown type after a delay (explained below)\n resetTimeout(Framework.ServerSideUnknown, SSR_RESET_TIMEOUT);\n resetTimeout(Framework.WebUnknown, WEB_RESET_TIMEOUT);\n }\n return frameworkCache;\n};\n/**\n * @internal Setup observer callback that will be called everytime the framework changes\n */\nconst observeFrameworkChanges = (fcn) => {\n // When the `frameworkCache` won't be updated again, we ignore all incoming\n // observers.\n if (resetTriggered) {\n return;\n }\n frameworkChangeObservers.push(fcn);\n};\nfunction clearCache() {\n frameworkCache = undefined;\n}\n// For a framework type and a delay amount, setup the event to re-detect\n// During the runtime boot, it is possible that framework detection will\n// be triggered before the framework has made modifications to the\n// global/window/etc needed for detection. When no framework is detected\n// we will reset and try again to ensure we don't use a cached\n// non-framework detection result for all requests.\nfunction resetTimeout(framework, delay) {\n if (frameworkCache === framework && !resetTriggered) {\n setTimeout(() => {\n clearCache();\n resetTriggered = true;\n setTimeout(detectFramework, PRIME_FRAMEWORK_DELAY);\n }, delay);\n }\n}\n\nexport { clearCache, detectFramework, frameworkChangeObservers, observeFrameworkChanges };\n//# sourceMappingURL=detectFramework.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Framework } from './types';\nimport { detect } from './detection';\n// We want to cache detection since the framework won't change\nlet frameworkCache;\nexport const frameworkChangeObservers = [];\n// Setup the detection reset tracking / timeout delays\nlet resetTriggered = false;\nconst SSR_RESET_TIMEOUT = 10; // ms\nconst WEB_RESET_TIMEOUT = 10; // ms\nconst PRIME_FRAMEWORK_DELAY = 1000; // ms\nexport const detectFramework = () => {\n if (!frameworkCache) {\n frameworkCache = detect();\n if (resetTriggered) {\n // The final run of detectFramework:\n // Starting from this point, the `frameworkCache` becomes \"final\".\n // So we don't need to notify the observers again so the observer\n // can be removed after the final notice.\n while (frameworkChangeObservers.length) {\n frameworkChangeObservers.pop()?.();\n }\n }\n else {\n // The first run of detectFramework:\n // Every time we update the cache, call each observer function\n frameworkChangeObservers.forEach(fcn => {\n fcn();\n });\n }\n // Retry once for either Unknown type after a delay (explained below)\n resetTimeout(Framework.ServerSideUnknown, SSR_RESET_TIMEOUT);\n resetTimeout(Framework.WebUnknown, WEB_RESET_TIMEOUT);\n }\n return frameworkCache;\n};\n/**\n * @internal Setup observer callback that will be called everytime the framework changes\n */\nexport const observeFrameworkChanges = (fcn) => {\n // When the `frameworkCache` won't be updated again, we ignore all incoming\n // observers.\n if (resetTriggered) {\n return;\n }\n frameworkChangeObservers.push(fcn);\n};\nexport function clearCache() {\n frameworkCache = undefined;\n}\n// For a framework type and a delay amount, setup the event to re-detect\n// During the runtime boot, it is possible that framework detection will\n// be triggered before the framework has made modifications to the\n// global/window/etc needed for detection. When no framework is detected\n// we will reset and try again to ensure we don't use a cached\n// non-framework detection result for all requests.\nfunction resetTimeout(framework, delay) {\n if (frameworkCache === framework && !resetTriggered) {\n setTimeout(() => {\n clearCache();\n resetTriggered = true;\n setTimeout(detectFramework, PRIME_FRAMEWORK_DELAY);\n }, delay);\n }\n}\n","import { Framework } from '../types.mjs';\nimport { reactWebDetect, reactSSRDetect } from './React.mjs';\nimport { vueWebDetect, vueSSRDetect } from './Vue.mjs';\nimport { svelteWebDetect, svelteSSRDetect } from './Svelte.mjs';\nimport { nextWebDetect, nextSSRDetect } from './Next.mjs';\nimport { nuxtWebDetect, nuxtSSRDetect } from './Nuxt.mjs';\nimport { angularWebDetect, angularSSRDetect } from './Angular.mjs';\nimport { reactNativeDetect } from './ReactNative.mjs';\nimport { expoDetect } from './Expo.mjs';\nimport { webDetect } from './Web.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// These are in the order of detection where when both are detectable, the early Framework will be reported\nconst detectionMap = [\n // First, detect mobile\n { platform: Framework.Expo, detectionMethod: expoDetect },\n { platform: Framework.ReactNative, detectionMethod: reactNativeDetect },\n // Next, detect web frameworks\n { platform: Framework.NextJs, detectionMethod: nextWebDetect },\n { platform: Framework.Nuxt, detectionMethod: nuxtWebDetect },\n { platform: Framework.Angular, detectionMethod: angularWebDetect },\n { platform: Framework.React, detectionMethod: reactWebDetect },\n { platform: Framework.VueJs, detectionMethod: vueWebDetect },\n { platform: Framework.Svelte, detectionMethod: svelteWebDetect },\n { platform: Framework.WebUnknown, detectionMethod: webDetect },\n // Last, detect ssr frameworks\n { platform: Framework.NextJsSSR, detectionMethod: nextSSRDetect },\n { platform: Framework.NuxtSSR, detectionMethod: nuxtSSRDetect },\n { platform: Framework.ReactSSR, detectionMethod: reactSSRDetect },\n { platform: Framework.VueJsSSR, detectionMethod: vueSSRDetect },\n { platform: Framework.AngularSSR, detectionMethod: angularSSRDetect },\n { platform: Framework.SvelteSSR, detectionMethod: svelteSSRDetect },\n];\nfunction detect() {\n return (detectionMap.find(detectionEntry => detectionEntry.detectionMethod())\n ?.platform || Framework.ServerSideUnknown);\n}\n\nexport { detect };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Framework } from '../types';\nimport { reactSSRDetect, reactWebDetect } from './React';\nimport { vueSSRDetect, vueWebDetect } from './Vue';\nimport { svelteSSRDetect, svelteWebDetect } from './Svelte';\nimport { nextSSRDetect, nextWebDetect } from './Next';\nimport { nuxtSSRDetect, nuxtWebDetect } from './Nuxt';\nimport { angularSSRDetect, angularWebDetect } from './Angular';\nimport { reactNativeDetect } from './ReactNative';\nimport { expoDetect } from './Expo';\nimport { webDetect } from './Web';\n// These are in the order of detection where when both are detectable, the early Framework will be reported\nconst detectionMap = [\n // First, detect mobile\n { platform: Framework.Expo, detectionMethod: expoDetect },\n { platform: Framework.ReactNative, detectionMethod: reactNativeDetect },\n // Next, detect web frameworks\n { platform: Framework.NextJs, detectionMethod: nextWebDetect },\n { platform: Framework.Nuxt, detectionMethod: nuxtWebDetect },\n { platform: Framework.Angular, detectionMethod: angularWebDetect },\n { platform: Framework.React, detectionMethod: reactWebDetect },\n { platform: Framework.VueJs, detectionMethod: vueWebDetect },\n { platform: Framework.Svelte, detectionMethod: svelteWebDetect },\n { platform: Framework.WebUnknown, detectionMethod: webDetect },\n // Last, detect ssr frameworks\n { platform: Framework.NextJsSSR, detectionMethod: nextSSRDetect },\n { platform: Framework.NuxtSSR, detectionMethod: nuxtSSRDetect },\n { platform: Framework.ReactSSR, detectionMethod: reactSSRDetect },\n { platform: Framework.VueJsSSR, detectionMethod: vueSSRDetect },\n { platform: Framework.AngularSSR, detectionMethod: angularSSRDetect },\n { platform: Framework.SvelteSSR, detectionMethod: svelteSSRDetect },\n];\nexport function detect() {\n return (detectionMap.find(detectionEntry => detectionEntry.detectionMethod())\n ?.platform || Framework.ServerSideUnknown);\n}\n","import { documentExists, processExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react 18.2 - built using Vite\nfunction reactWebDetect() {\n const elementKeyPrefixedWithReact = (key) => {\n return key.startsWith('_react') || key.startsWith('__react');\n };\n const elementIsReactEnabled = (element) => {\n return Object.keys(element).find(elementKeyPrefixedWithReact);\n };\n const allElementsWithId = () => Array.from(document.querySelectorAll('[id]'));\n return documentExists() && allElementsWithId().some(elementIsReactEnabled);\n}\nfunction reactSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('react')));\n}\n// use the some\n\nexport { reactSSRDetect, reactWebDetect };\n//# sourceMappingURL=React.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { documentExists, processExists } from './helpers';\n// Tested with react 18.2 - built using Vite\nexport function reactWebDetect() {\n const elementKeyPrefixedWithReact = (key) => {\n return key.startsWith('_react') || key.startsWith('__react');\n };\n const elementIsReactEnabled = (element) => {\n return Object.keys(element).find(elementKeyPrefixedWithReact);\n };\n const allElementsWithId = () => Array.from(document.querySelectorAll('[id]'));\n return documentExists() && allElementsWithId().some(elementIsReactEnabled);\n}\nexport function reactSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('react')));\n}\n// use the some\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst globalExists = () => {\n return typeof global !== 'undefined';\n};\nconst globalThisExists = () => {\n return typeof globalThis !== 'undefined';\n};\nconst windowExists = () => {\n return typeof window !== 'undefined';\n};\nconst documentExists = () => {\n return typeof document !== 'undefined';\n};\nconst processExists = () => {\n return typeof process !== 'undefined';\n};\nconst keyPrefixMatch = (object, prefix) => {\n return !!Object.keys(object).find(key => key.startsWith(prefix));\n};\n\nexport { documentExists, globalExists, globalThisExists, keyPrefixMatch, processExists, windowExists };\n//# sourceMappingURL=helpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const globalExists = () => {\n return typeof global !== 'undefined';\n};\nexport const globalThisExists = () => {\n return typeof globalThis !== 'undefined';\n};\nexport const windowExists = () => {\n return typeof window !== 'undefined';\n};\nexport const documentExists = () => {\n return typeof document !== 'undefined';\n};\nexport const processExists = () => {\n return typeof process !== 'undefined';\n};\nexport const keyPrefixMatch = (object, prefix) => {\n return !!Object.keys(object).find(key => key.startsWith(prefix));\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import { windowExists, keyPrefixMatch, globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with vue 3.3.2\nfunction vueWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__VUE');\n}\nfunction vueSSRDetect() {\n return globalExists() && keyPrefixMatch(global, '__VUE');\n}\n\nexport { vueSSRDetect, vueWebDetect };\n//# sourceMappingURL=Vue.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { globalExists, keyPrefixMatch, windowExists } from './helpers';\n// Tested with vue 3.3.2\nexport function vueWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__VUE');\n}\nexport function vueSSRDetect() {\n return globalExists() && keyPrefixMatch(global, '__VUE');\n}\n","import { windowExists, keyPrefixMatch, processExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with svelte 3.59\nfunction svelteWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__SVELTE');\n}\nfunction svelteSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('svelte')));\n}\n\nexport { svelteSSRDetect, svelteWebDetect };\n//# sourceMappingURL=Svelte.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { keyPrefixMatch, processExists, windowExists } from './helpers';\n// Tested with svelte 3.59\nexport function svelteWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__SVELTE');\n}\nexport function svelteSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('svelte')));\n}\n","import { windowExists, globalExists, keyPrefixMatch } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with next 13.4 / react 18.2\nfunction nextWebDetect() {\n return (windowExists() &&\n window.next &&\n typeof window.next === 'object');\n}\nfunction nextSSRDetect() {\n return (globalExists() &&\n (keyPrefixMatch(global, '__next') || keyPrefixMatch(global, '__NEXT')));\n}\n\nexport { nextSSRDetect, nextWebDetect };\n//# sourceMappingURL=Next.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { globalExists, keyPrefixMatch, windowExists } from './helpers';\n// Tested with next 13.4 / react 18.2\nexport function nextWebDetect() {\n return (windowExists() &&\n window.next &&\n typeof window.next === 'object');\n}\nexport function nextSSRDetect() {\n return (globalExists() &&\n (keyPrefixMatch(global, '__next') || keyPrefixMatch(global, '__NEXT')));\n}\n","import { windowExists, globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with nuxt 2.15 / vue 2.7\nfunction nuxtWebDetect() {\n return (windowExists() &&\n (window.__NUXT__ !== undefined ||\n window.$nuxt !== undefined));\n}\nfunction nuxtSSRDetect() {\n return (globalExists() && typeof global.__NUXT_PATHS__ !== 'undefined');\n}\n\nexport { nuxtSSRDetect, nuxtWebDetect };\n//# sourceMappingURL=Nuxt.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { globalExists, windowExists } from './helpers';\n// Tested with nuxt 2.15 / vue 2.7\nexport function nuxtWebDetect() {\n return (windowExists() &&\n (window.__NUXT__ !== undefined ||\n window.$nuxt !== undefined));\n}\nexport function nuxtSSRDetect() {\n return (globalExists() && typeof global.__NUXT_PATHS__ !== 'undefined');\n}\n","import { documentExists, processExists, windowExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with @angular/core 16.0.0\nfunction angularWebDetect() {\n const angularVersionSetInDocument = Boolean(documentExists() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean(windowExists() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nfunction angularSSRDetect() {\n return ((processExists() &&\n typeof process.env === 'object' &&\n process.env.npm_lifecycle_script?.startsWith('ng ')) ||\n false);\n}\n\nexport { angularSSRDetect, angularWebDetect };\n//# sourceMappingURL=Angular.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { documentExists, processExists, windowExists } from './helpers';\n// Tested with @angular/core 16.0.0\nexport function angularWebDetect() {\n const angularVersionSetInDocument = Boolean(documentExists() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean(windowExists() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nexport function angularSSRDetect() {\n return ((processExists() &&\n typeof process.env === 'object' &&\n process.env.npm_lifecycle_script?.startsWith('ng ')) ||\n false);\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react-native 0.17.7\nfunction reactNativeDetect() {\n return (typeof navigator !== 'undefined' &&\n typeof navigator.product !== 'undefined' &&\n navigator.product === 'ReactNative');\n}\n\nexport { reactNativeDetect };\n//# sourceMappingURL=ReactNative.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react-native 0.17.7\nexport function reactNativeDetect() {\n return (typeof navigator !== 'undefined' &&\n typeof navigator.product !== 'undefined' &&\n navigator.product === 'ReactNative');\n}\n","import { globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with expo 48 / react-native 0.71.3\nfunction expoDetect() {\n return globalExists() && typeof global.expo !== 'undefined';\n}\n\nexport { expoDetect };\n//# sourceMappingURL=Expo.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { globalExists } from './helpers';\n// Tested with expo 48 / react-native 0.71.3\nexport function expoDetect() {\n return globalExists() && typeof global.expo !== 'undefined';\n}\n","import { windowExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction webDetect() {\n return windowExists();\n}\n\nexport { webDetect };\n//# sourceMappingURL=Web.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { windowExists } from './helpers';\nexport function webDetect() {\n return windowExists();\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Maintains custom user-agent state set by external consumers.\nconst customUserAgentState = {};\n/**\n * Sets custom user agent state which will be appended to applicable requests. Returns a function that can be used to\n * clean up any custom state set with this API.\n *\n * @note\n * This API operates globally. Calling this API multiple times will result in the most recently set values for a\n * particular API being used.\n *\n * @note\n * This utility IS NOT compatible with SSR.\n *\n * @param input - SetCustomUserAgentInput that defines custom state to apply to the specified APIs.\n */\nconst setCustomUserAgent = (input) => {\n // Save custom user-agent state & increment reference counter\n // TODO Remove `any` when we upgrade to TypeScript 5.2, see: https://github.com/microsoft/TypeScript/issues/44373\n customUserAgentState[input.category] = input.apis.reduce((acc, api) => ({\n ...acc,\n [api]: {\n refCount: acc[api]?.refCount ? acc[api].refCount + 1 : 1,\n additionalDetails: input.additionalDetails,\n },\n }), customUserAgentState[input.category] ?? {});\n // Callback that cleans up state for APIs recorded by this call\n let cleanUpCallbackCalled = false;\n const cleanUpCallback = () => {\n // Only allow the cleanup callback to be called once\n if (cleanUpCallbackCalled) {\n return;\n }\n cleanUpCallbackCalled = true;\n input.apis.forEach(api => {\n const apiRefCount = customUserAgentState[input.category][api].refCount;\n if (apiRefCount > 1) {\n customUserAgentState[input.category][api].refCount = apiRefCount - 1;\n }\n else {\n delete customUserAgentState[input.category][api];\n // Clean up category if no more APIs set\n if (!Object.keys(customUserAgentState[input.category]).length) {\n delete customUserAgentState[input.category];\n }\n }\n });\n };\n return cleanUpCallback;\n};\nconst getCustomUserAgent = (category, api) => customUserAgentState[category]?.[api]?.additionalDetails;\n\nexport { getCustomUserAgent, setCustomUserAgent };\n//# sourceMappingURL=customUserAgent.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Maintains custom user-agent state set by external consumers.\nconst customUserAgentState = {};\n/**\n * Sets custom user agent state which will be appended to applicable requests. Returns a function that can be used to\n * clean up any custom state set with this API.\n *\n * @note\n * This API operates globally. Calling this API multiple times will result in the most recently set values for a\n * particular API being used.\n *\n * @note\n * This utility IS NOT compatible with SSR.\n *\n * @param input - SetCustomUserAgentInput that defines custom state to apply to the specified APIs.\n */\nexport const setCustomUserAgent = (input) => {\n // Save custom user-agent state & increment reference counter\n // TODO Remove `any` when we upgrade to TypeScript 5.2, see: https://github.com/microsoft/TypeScript/issues/44373\n customUserAgentState[input.category] = input.apis.reduce((acc, api) => ({\n ...acc,\n [api]: {\n refCount: acc[api]?.refCount ? acc[api].refCount + 1 : 1,\n additionalDetails: input.additionalDetails,\n },\n }), customUserAgentState[input.category] ?? {});\n // Callback that cleans up state for APIs recorded by this call\n let cleanUpCallbackCalled = false;\n const cleanUpCallback = () => {\n // Only allow the cleanup callback to be called once\n if (cleanUpCallbackCalled) {\n return;\n }\n cleanUpCallbackCalled = true;\n input.apis.forEach(api => {\n const apiRefCount = customUserAgentState[input.category][api].refCount;\n if (apiRefCount > 1) {\n customUserAgentState[input.category][api].refCount = apiRefCount - 1;\n }\n else {\n delete customUserAgentState[input.category][api];\n // Clean up category if no more APIs set\n if (!Object.keys(customUserAgentState[input.category]).length) {\n delete customUserAgentState[input.category];\n }\n }\n });\n };\n return cleanUpCallback;\n};\nexport const getCustomUserAgent = (category, api) => customUserAgentState[category]?.[api]?.additionalDetails;\n","import { AuthError } from '../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction getRegionFromUserPoolId(userPoolId) {\n const region = userPoolId?.split('_')[0];\n if (!userPoolId ||\n userPoolId.indexOf('_') < 0 ||\n !region ||\n typeof region !== 'string')\n throw new AuthError({\n name: 'InvalidUserPoolId',\n message: 'Invalid user pool id provided.',\n });\n return region;\n}\nfunction getRegionFromIdentityPoolId(identityPoolId) {\n if (!identityPoolId || !identityPoolId.includes(':')) {\n throw new AuthError({\n name: 'InvalidIdentityPoolIdException',\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n });\n }\n return identityPoolId.split(':')[0];\n}\n\nexport { getRegionFromIdentityPoolId, getRegionFromUserPoolId };\n//# sourceMappingURL=regionParsers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from '../../errors/AuthError';\nexport function getRegionFromUserPoolId(userPoolId) {\n const region = userPoolId?.split('_')[0];\n if (!userPoolId ||\n userPoolId.indexOf('_') < 0 ||\n !region ||\n typeof region !== 'string')\n throw new AuthError({\n name: 'InvalidUserPoolId',\n message: 'Invalid user pool id provided.',\n });\n return region;\n}\nexport function getRegionFromIdentityPoolId(identityPoolId) {\n if (!identityPoolId || !identityPoolId.includes(':')) {\n throw new AuthError({\n name: 'InvalidIdentityPoolIdException',\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n });\n }\n return identityPoolId.split(':')[0];\n}\n","import { AuthError } from '../../../errors/AuthError.mjs';\nimport { TOKEN_REFRESH_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, DEVICE_METADATA_NOT_FOUND_EXCEPTION } from '../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isTypeUserPoolConfig(authConfig) {\n if (authConfig &&\n authConfig.Cognito.userPoolId &&\n authConfig.Cognito.userPoolClientId) {\n return true;\n }\n return false;\n}\nfunction assertAuthTokens(tokens) {\n if (!tokens || !tokens.accessToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nfunction assertIdTokenInAuthTokens(tokens) {\n if (!tokens || !tokens.idToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nconst oAuthTokenRefreshException = new AuthError({\n name: TOKEN_REFRESH_EXCEPTION,\n message: `Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.`,\n recoverySuggestion: `Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }`,\n});\nconst tokenRefreshException = new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n});\nfunction assertAuthTokensWithRefreshToken(tokens) {\n if (isAuthenticatedWithImplicitOauthFlow(tokens)) {\n throw oAuthTokenRefreshException;\n }\n if (!isAuthenticatedWithRefreshToken(tokens)) {\n throw tokenRefreshException;\n }\n}\nfunction assertDeviceMetadata(deviceMetadata) {\n if (!deviceMetadata ||\n !deviceMetadata.deviceKey ||\n !deviceMetadata.deviceGroupKey ||\n !deviceMetadata.randomPassword) {\n throw new AuthError({\n name: DEVICE_METADATA_NOT_FOUND_EXCEPTION,\n message: 'Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.',\n recoverySuggestion: 'Make sure to not clear storage after calling the signIn API.',\n });\n }\n}\nconst OAuthStorageKeys = {\n inflightOAuth: 'inflightOAuth',\n oauthSignIn: 'oauthSignIn',\n oauthPKCE: 'oauthPKCE',\n oauthState: 'oauthState',\n};\nfunction isAuthenticated(tokens) {\n return tokens?.accessToken || tokens?.idToken;\n}\nfunction isAuthenticatedWithRefreshToken(tokens) {\n return isAuthenticated(tokens) && tokens?.refreshToken;\n}\nfunction isAuthenticatedWithImplicitOauthFlow(tokens) {\n return isAuthenticated(tokens) && !tokens?.refreshToken;\n}\n\nexport { OAuthStorageKeys, assertAuthTokens, assertAuthTokensWithRefreshToken, assertDeviceMetadata, assertIdTokenInAuthTokens, isTypeUserPoolConfig, oAuthTokenRefreshException, tokenRefreshException };\n//# sourceMappingURL=types.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from '../../../errors/AuthError';\nimport { DEVICE_METADATA_NOT_FOUND_EXCEPTION, TOKEN_REFRESH_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, } from '../../../errors/constants';\nexport function isTypeUserPoolConfig(authConfig) {\n if (authConfig &&\n authConfig.Cognito.userPoolId &&\n authConfig.Cognito.userPoolClientId) {\n return true;\n }\n return false;\n}\nexport function assertAuthTokens(tokens) {\n if (!tokens || !tokens.accessToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nexport function assertIdTokenInAuthTokens(tokens) {\n if (!tokens || !tokens.idToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nexport const oAuthTokenRefreshException = new AuthError({\n name: TOKEN_REFRESH_EXCEPTION,\n message: `Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.`,\n recoverySuggestion: `Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }`,\n});\nexport const tokenRefreshException = new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n});\nexport function assertAuthTokensWithRefreshToken(tokens) {\n if (isAuthenticatedWithImplicitOauthFlow(tokens)) {\n throw oAuthTokenRefreshException;\n }\n if (!isAuthenticatedWithRefreshToken(tokens)) {\n throw tokenRefreshException;\n }\n}\nexport function assertDeviceMetadata(deviceMetadata) {\n if (!deviceMetadata ||\n !deviceMetadata.deviceKey ||\n !deviceMetadata.deviceGroupKey ||\n !deviceMetadata.randomPassword) {\n throw new AuthError({\n name: DEVICE_METADATA_NOT_FOUND_EXCEPTION,\n message: 'Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.',\n recoverySuggestion: 'Make sure to not clear storage after calling the signIn API.',\n });\n }\n}\nexport const OAuthStorageKeys = {\n inflightOAuth: 'inflightOAuth',\n oauthSignIn: 'oauthSignIn',\n oauthPKCE: 'oauthPKCE',\n oauthState: 'oauthState',\n};\nfunction isAuthenticated(tokens) {\n return tokens?.accessToken || tokens?.idToken;\n}\nfunction isAuthenticatedWithRefreshToken(tokens) {\n return isAuthenticated(tokens) && tokens?.refreshToken;\n}\nfunction isAuthenticatedWithImplicitOauthFlow(tokens) {\n return isAuthenticated(tokens) && !tokens?.refreshToken;\n}\n","import { AuthError } from './AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst USER_UNAUTHENTICATED_EXCEPTION = 'UserUnAuthenticatedException';\nconst USER_ALREADY_AUTHENTICATED_EXCEPTION = 'UserAlreadyAuthenticatedException';\nconst DEVICE_METADATA_NOT_FOUND_EXCEPTION = 'DeviceMetadataNotFoundException';\nconst AUTO_SIGN_IN_EXCEPTION = 'AutoSignInException';\nconst INVALID_REDIRECT_EXCEPTION = 'InvalidRedirectException';\nconst INVALID_APP_SCHEME_EXCEPTION = 'InvalidAppSchemeException';\nconst INVALID_PREFERRED_REDIRECT_EXCEPTION = 'InvalidPreferredRedirectUrlException';\nconst invalidRedirectException = new AuthError({\n name: INVALID_REDIRECT_EXCEPTION,\n message: 'signInRedirect or signOutRedirect had an invalid format or was not found.',\n recoverySuggestion: 'Please make sure the signIn/Out redirect in your oauth config is valid.',\n});\nconst invalidAppSchemeException = new AuthError({\n name: INVALID_APP_SCHEME_EXCEPTION,\n message: 'A valid non-http app scheme was not found in the config.',\n recoverySuggestion: 'Please make sure a valid custom app scheme is present in the config.',\n});\nconst invalidPreferredRedirectUrlException = new AuthError({\n name: INVALID_PREFERRED_REDIRECT_EXCEPTION,\n message: 'The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.',\n recoverySuggestion: 'Please make sure a matching preferredRedirectUrl is provided.',\n});\nconst INVALID_ORIGIN_EXCEPTION = 'InvalidOriginException';\nconst invalidOriginException = new AuthError({\n name: INVALID_ORIGIN_EXCEPTION,\n message: 'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',\n recoverySuggestion: 'Please call signInWithRedirect from the same origin.',\n});\nconst OAUTH_SIGNOUT_EXCEPTION = 'OAuthSignOutException';\nconst TOKEN_REFRESH_EXCEPTION = 'TokenRefreshException';\nconst UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION = 'UnexpectedSignInInterruptionException';\n\nexport { AUTO_SIGN_IN_EXCEPTION, DEVICE_METADATA_NOT_FOUND_EXCEPTION, INVALID_APP_SCHEME_EXCEPTION, INVALID_ORIGIN_EXCEPTION, INVALID_PREFERRED_REDIRECT_EXCEPTION, INVALID_REDIRECT_EXCEPTION, OAUTH_SIGNOUT_EXCEPTION, TOKEN_REFRESH_EXCEPTION, UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION, USER_ALREADY_AUTHENTICATED_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, invalidAppSchemeException, invalidOriginException, invalidPreferredRedirectUrlException, invalidRedirectException };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from './AuthError';\nexport const USER_UNAUTHENTICATED_EXCEPTION = 'UserUnAuthenticatedException';\nexport const USER_ALREADY_AUTHENTICATED_EXCEPTION = 'UserAlreadyAuthenticatedException';\nexport const DEVICE_METADATA_NOT_FOUND_EXCEPTION = 'DeviceMetadataNotFoundException';\nexport const AUTO_SIGN_IN_EXCEPTION = 'AutoSignInException';\nexport const INVALID_REDIRECT_EXCEPTION = 'InvalidRedirectException';\nexport const INVALID_APP_SCHEME_EXCEPTION = 'InvalidAppSchemeException';\nexport const INVALID_PREFERRED_REDIRECT_EXCEPTION = 'InvalidPreferredRedirectUrlException';\nexport const invalidRedirectException = new AuthError({\n name: INVALID_REDIRECT_EXCEPTION,\n message: 'signInRedirect or signOutRedirect had an invalid format or was not found.',\n recoverySuggestion: 'Please make sure the signIn/Out redirect in your oauth config is valid.',\n});\nexport const invalidAppSchemeException = new AuthError({\n name: INVALID_APP_SCHEME_EXCEPTION,\n message: 'A valid non-http app scheme was not found in the config.',\n recoverySuggestion: 'Please make sure a valid custom app scheme is present in the config.',\n});\nexport const invalidPreferredRedirectUrlException = new AuthError({\n name: INVALID_PREFERRED_REDIRECT_EXCEPTION,\n message: 'The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.',\n recoverySuggestion: 'Please make sure a matching preferredRedirectUrl is provided.',\n});\nexport const INVALID_ORIGIN_EXCEPTION = 'InvalidOriginException';\nexport const invalidOriginException = new AuthError({\n name: INVALID_ORIGIN_EXCEPTION,\n message: 'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',\n recoverySuggestion: 'Please call signInWithRedirect from the same origin.',\n});\nexport const OAUTH_SIGNOUT_EXCEPTION = 'OAuthSignOutException';\nexport const TOKEN_REFRESH_EXCEPTION = 'TokenRefreshException';\nexport const UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION = 'UnexpectedSignInInterruptionException';\n","import { getId } from '@aws-amplify/core';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { formLoginsMap } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Provides a Cognito identityId\n *\n * @param tokens - The AuthTokens received after SignIn\n * @returns string\n * @throws configuration exceptions: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service exceptions: {@link GetIdException }\n */\nasync function cognitoIdentityIdProvider({ tokens, authConfig, identityIdStore, }) {\n identityIdStore.setAuthConfig({ Cognito: authConfig });\n // will return null only if there is no identityId cached or if there is an error retrieving it\n const identityId = await identityIdStore.loadIdentityId();\n if (identityId) {\n return identityId.id;\n }\n const logins = tokens?.idToken\n ? formLoginsMap(tokens.idToken.toString())\n : {};\n const generatedIdentityId = await generateIdentityId(logins, authConfig);\n // Store generated identityId\n identityIdStore.storeIdentityId({\n id: generatedIdentityId,\n type: tokens ? 'primary' : 'guest',\n });\n return generatedIdentityId;\n}\nasync function generateIdentityId(logins, authConfig) {\n const identityPoolId = authConfig?.identityPoolId;\n const region = getRegionFromIdentityPoolId(identityPoolId);\n // IdentityId is absent so get it using IdentityPoolId with Cognito's GetId API\n const idResult = \n // for a first-time user, this will return a brand new identity\n // for a returning user, this will retrieve the previous identity assocaited with the logins\n (await getId({\n region,\n }, {\n IdentityPoolId: identityPoolId,\n Logins: logins,\n })).IdentityId;\n if (!idResult) {\n throw new AuthError({\n name: 'GetIdResponseException',\n message: 'Received undefined response from getId operation',\n recoverySuggestion: 'Make sure to pass a valid identityPoolId in the configuration.',\n });\n }\n return idResult;\n}\n\nexport { cognitoIdentityIdProvider };\n//# sourceMappingURL=IdentityIdProvider.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getId } from '@aws-amplify/core';\nimport { AuthError } from '../../../errors/AuthError';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers';\nimport { formLoginsMap } from './utils';\n/**\n * Provides a Cognito identityId\n *\n * @param tokens - The AuthTokens received after SignIn\n * @returns string\n * @throws configuration exceptions: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service exceptions: {@link GetIdException }\n */\nexport async function cognitoIdentityIdProvider({ tokens, authConfig, identityIdStore, }) {\n identityIdStore.setAuthConfig({ Cognito: authConfig });\n // will return null only if there is no identityId cached or if there is an error retrieving it\n const identityId = await identityIdStore.loadIdentityId();\n if (identityId) {\n return identityId.id;\n }\n const logins = tokens?.idToken\n ? formLoginsMap(tokens.idToken.toString())\n : {};\n const generatedIdentityId = await generateIdentityId(logins, authConfig);\n // Store generated identityId\n identityIdStore.storeIdentityId({\n id: generatedIdentityId,\n type: tokens ? 'primary' : 'guest',\n });\n return generatedIdentityId;\n}\nasync function generateIdentityId(logins, authConfig) {\n const identityPoolId = authConfig?.identityPoolId;\n const region = getRegionFromIdentityPoolId(identityPoolId);\n // IdentityId is absent so get it using IdentityPoolId with Cognito's GetId API\n const idResult = \n // for a first-time user, this will return a brand new identity\n // for a returning user, this will retrieve the previous identity assocaited with the logins\n (await getId({\n region,\n }, {\n IdentityPoolId: identityPoolId,\n Logins: logins,\n })).IdentityId;\n if (!idResult) {\n throw new AuthError({\n name: 'GetIdResponseException',\n message: 'Received undefined response from getId operation',\n recoverySuggestion: 'Make sure to pass a valid identityPoolId in the configuration.',\n });\n }\n return idResult;\n}\n","import '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getIdSerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetId');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getIdDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: parseMetadata(response),\n };\n }\n};\n/**\n * @internal\n */\nconst getId = composeServiceApi(cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, defaultConfig);\n\nexport { getId };\n//# sourceMappingURL=getId.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, parseMetadata, } from '../../clients';\nimport { composeServiceApi } from '../../clients/internal';\nimport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders, } from './base';\nconst getIdSerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetId');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getIdDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: parseMetadata(response),\n };\n }\n};\n/**\n * @internal\n */\nexport const getId = composeServiceApi(cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, defaultConfig);\n","import { decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction formLoginsMap(idToken) {\n const issuer = decodeJWT(idToken).payload.iss;\n const res = {};\n if (!issuer) {\n throw new AuthError({\n name: 'InvalidIdTokenException',\n message: 'Invalid Idtoken.',\n });\n }\n const domainName = issuer.replace(/(^\\w+:|^)\\/\\//, '');\n res[domainName] = idToken;\n return res;\n}\n\nexport { formLoginsMap };\n//# sourceMappingURL=utils.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError';\nexport function formLoginsMap(idToken) {\n const issuer = decodeJWT(idToken).payload.iss;\n const res = {};\n if (!issuer) {\n throw new AuthError({\n name: 'InvalidIdTokenException',\n message: 'Invalid Idtoken.',\n });\n }\n const domainName = issuer.replace(/(^\\w+:|^)\\/\\//, '');\n res[domainName] = idToken;\n return res;\n}\n","import { CognitoUserPoolsTokenProvider } from './CognitoUserPoolsTokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The default provider for the JWT access token and ID token issued from the configured Cognito user pool. It manages\n * the refresh and storage of the tokens. It stores the tokens in `window.localStorage` if available, and falls back to\n * in-memory storage if not.\n */\nconst cognitoUserPoolsTokenProvider = new CognitoUserPoolsTokenProvider();\nconst { tokenOrchestrator } = cognitoUserPoolsTokenProvider;\n\nexport { cognitoUserPoolsTokenProvider, tokenOrchestrator };\n//# sourceMappingURL=tokenProvider.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CognitoUserPoolsTokenProvider } from './CognitoUserPoolsTokenProvider';\n/**\n * The default provider for the JWT access token and ID token issued from the configured Cognito user pool. It manages\n * the refresh and storage of the tokens. It stores the tokens in `window.localStorage` if available, and falls back to\n * in-memory storage if not.\n */\nexport const cognitoUserPoolsTokenProvider = new CognitoUserPoolsTokenProvider();\nexport const { tokenOrchestrator } = cognitoUserPoolsTokenProvider;\n","import { defaultStorage } from '@aws-amplify/core';\nimport { refreshAuthTokens } from '../utils/refreshAuthTokens.mjs';\nimport { DefaultTokenStore } from './TokenStore.mjs';\nimport { TokenOrchestrator } from './TokenOrchestrator.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass CognitoUserPoolsTokenProvider {\n constructor() {\n this.authTokenStore = new DefaultTokenStore();\n this.authTokenStore.setKeyValueStorage(defaultStorage);\n this.tokenOrchestrator = new TokenOrchestrator();\n this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore);\n this.tokenOrchestrator.setTokenRefresher(refreshAuthTokens);\n }\n getTokens({ forceRefresh } = { forceRefresh: false }) {\n return this.tokenOrchestrator.getTokens({ forceRefresh });\n }\n setKeyValueStorage(keyValueStorage) {\n this.authTokenStore.setKeyValueStorage(keyValueStorage);\n }\n setAuthConfig(authConfig) {\n this.authTokenStore.setAuthConfig(authConfig);\n this.tokenOrchestrator.setAuthConfig(authConfig);\n }\n}\n\nexport { CognitoUserPoolsTokenProvider };\n//# sourceMappingURL=CognitoUserPoolsTokenProvider.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { defaultStorage, } from '@aws-amplify/core';\nimport { refreshAuthTokens } from '../utils/refreshAuthTokens';\nimport { DefaultTokenStore } from './TokenStore';\nimport { TokenOrchestrator } from './TokenOrchestrator';\nexport class CognitoUserPoolsTokenProvider {\n constructor() {\n this.authTokenStore = new DefaultTokenStore();\n this.authTokenStore.setKeyValueStorage(defaultStorage);\n this.tokenOrchestrator = new TokenOrchestrator();\n this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore);\n this.tokenOrchestrator.setTokenRefresher(refreshAuthTokens);\n }\n getTokens({ forceRefresh } = { forceRefresh: false }) {\n return this.tokenOrchestrator.getTokens({ forceRefresh });\n }\n setKeyValueStorage(keyValueStorage) {\n this.authTokenStore.setKeyValueStorage(keyValueStorage);\n }\n setAuthConfig(authConfig) {\n this.authTokenStore.setAuthConfig(authConfig);\n this.tokenOrchestrator.setAuthConfig(authConfig);\n }\n}\n","import { deDupeAsyncFunction, assertTokenProviderConfig, decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokensWithRefreshToken } from './types.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getUserContextData } from './userContextData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst refreshAuthTokensFunction = async ({ tokens, authConfig, username, }) => {\n assertTokenProviderConfig(authConfig?.Cognito);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig.Cognito;\n const region = getRegionFromUserPoolId(userPoolId);\n assertAuthTokensWithRefreshToken(tokens);\n const refreshTokenString = tokens.refreshToken;\n const AuthParameters = {\n REFRESH_TOKEN: refreshTokenString,\n };\n if (tokens.deviceMetadata?.deviceKey) {\n AuthParameters.DEVICE_KEY = tokens.deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { AuthenticationResult } = await initiateAuth({ region }, {\n ClientId: userPoolClientId,\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters,\n UserContextData,\n });\n const accessToken = decodeJWT(AuthenticationResult?.AccessToken ?? '');\n const idToken = AuthenticationResult?.IdToken\n ? decodeJWT(AuthenticationResult.IdToken)\n : undefined;\n const { iat } = accessToken.payload;\n // This should never happen. If it does, it's a bug from the service.\n if (!iat) {\n throw new AuthError({\n name: 'iatNotFoundException',\n message: 'iat not found in access token',\n });\n }\n const clockDrift = iat * 1000 - new Date().getTime();\n return {\n accessToken,\n idToken,\n clockDrift,\n refreshToken: refreshTokenString,\n username,\n };\n};\nconst refreshAuthTokens = deDupeAsyncFunction(refreshAuthTokensFunction);\nconst refreshAuthTokensWithoutDedupe = refreshAuthTokensFunction;\n\nexport { refreshAuthTokens, refreshAuthTokensWithoutDedupe };\n//# sourceMappingURL=refreshAuthTokens.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { assertTokenProviderConfig, deDupeAsyncFunction, decodeJWT, } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { assertAuthTokensWithRefreshToken } from '../utils/types';\nimport { AuthError } from '../../../errors/AuthError';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { getUserContextData } from './userContextData';\nconst refreshAuthTokensFunction = async ({ tokens, authConfig, username, }) => {\n assertTokenProviderConfig(authConfig?.Cognito);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig.Cognito;\n const region = getRegionFromUserPoolId(userPoolId);\n assertAuthTokensWithRefreshToken(tokens);\n const refreshTokenString = tokens.refreshToken;\n const AuthParameters = {\n REFRESH_TOKEN: refreshTokenString,\n };\n if (tokens.deviceMetadata?.deviceKey) {\n AuthParameters.DEVICE_KEY = tokens.deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { AuthenticationResult } = await initiateAuth({ region }, {\n ClientId: userPoolClientId,\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters,\n UserContextData,\n });\n const accessToken = decodeJWT(AuthenticationResult?.AccessToken ?? '');\n const idToken = AuthenticationResult?.IdToken\n ? decodeJWT(AuthenticationResult.IdToken)\n : undefined;\n const { iat } = accessToken.payload;\n // This should never happen. If it does, it's a bug from the service.\n if (!iat) {\n throw new AuthError({\n name: 'iatNotFoundException',\n message: 'iat not found in access token',\n });\n }\n const clockDrift = iat * 1000 - new Date().getTime();\n return {\n accessToken,\n idToken,\n clockDrift,\n refreshToken: refreshTokenString,\n username,\n };\n};\nexport const refreshAuthTokens = deDupeAsyncFunction(refreshAuthTokensFunction);\nexport const refreshAuthTokensWithoutDedupe = refreshAuthTokensFunction;\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * returns in-flight promise if there is one\n *\n * @param asyncFunction - asyncFunction to be deduped.\n * @returns - the return type of the callback\n */\nconst deDupeAsyncFunction = (asyncFunction) => {\n let inflightPromise;\n return async (...args) => {\n if (inflightPromise)\n return inflightPromise;\n inflightPromise = new Promise((resolve, reject) => {\n asyncFunction(...args)\n .then(result => {\n resolve(result);\n })\n .catch(error => {\n reject(error);\n })\n .finally(() => {\n inflightPromise = undefined;\n });\n });\n return inflightPromise;\n };\n};\n\nexport { deDupeAsyncFunction };\n//# sourceMappingURL=deDupeAsyncFunction.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * returns in-flight promise if there is one\n *\n * @param asyncFunction - asyncFunction to be deduped.\n * @returns - the return type of the callback\n */\nexport const deDupeAsyncFunction = (asyncFunction) => {\n let inflightPromise;\n return async (...args) => {\n if (inflightPromise)\n return inflightPromise;\n inflightPromise = new Promise((resolve, reject) => {\n asyncFunction(...args)\n .then(result => {\n resolve(result);\n })\n .catch(error => {\n reject(error);\n })\n .finally(() => {\n inflightPromise = undefined;\n });\n });\n return inflightPromise;\n };\n};\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createInitiateAuthClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('InitiateAuth'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createInitiateAuthClient };\n//# sourceMappingURL=createInitiateAuthClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createInitiateAuthClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('InitiateAuth'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUserPoolSerializer = (operation) => (input, endpoint) => {\n const headers = getSharedHeaders(operation);\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityProviderService.${operation}`,\n});\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n\nexport { createUserPoolSerializer };\n//# sourceMappingURL=createUserPoolSerializer.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const createUserPoolSerializer = (operation) => (input, endpoint) => {\n const headers = getSharedHeaders(operation);\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityProviderService.${operation}`,\n});\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n","import { parseJsonError, parseJsonBody } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUserPoolDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\n\nexport { createUserPoolDeserializer };\n//# sourceMappingURL=createUserPoolDeserializer.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError';\nimport { AuthError } from '../../../../../../errors/AuthError';\nexport const createUserPoolDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\n","import { AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new AuthError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n\nexport { assertServiceError };\n//# sourceMappingURL=assertServiceError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyErrorCode, } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../AuthError';\nexport function assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new AuthError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n","import { composeTransferHandler } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { unauthenticatedHandler } from '@aws-amplify/core/internals/aws-client-utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => (next, _) => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nconst cognitoUserPoolTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n\nexport { cognitoUserPoolTransferHandler };\n//# sourceMappingURL=cognitoUserPoolTransferHandler.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeTransferHandler } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { unauthenticatedHandler, } from '@aws-amplify/core/internals/aws-client-utils';\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => (next, _) => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nexport const cognitoUserPoolTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n","import { getRetryDecider, parseJsonError, jitteredBackoff } from '@aws-amplify/core/internals/aws-client-utils';\nimport { getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from '../../../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: COGNITO_IDP_SERVICE_NAME,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\n\nexport { DEFAULT_SERVICE_CLIENT_API_CONFIG };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getRetryDecider, jitteredBackoff, parseJsonError, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from '../../../constants';\nexport const DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: COGNITO_IDP_SERVICE_NAME,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst COGNITO_IDP_SERVICE_NAME = 'cognito-idp';\n\nexport { COGNITO_IDP_SERVICE_NAME };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexport const COGNITO_IDP_SERVICE_NAME = 'cognito-idp';\n","import { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolEndpointResolver } from '../../../foundation/cognitoUserPoolEndpointResolver.mjs';\n\nconst createCognitoUserPoolEndpointResolver = ({ endpointOverride }) => (input) => {\n if (endpointOverride) {\n return { url: new AmplifyUrl(endpointOverride) };\n }\n return cognitoUserPoolEndpointResolver(input);\n};\n\nexport { createCognitoUserPoolEndpointResolver };\n//# sourceMappingURL=createCognitoUserPoolEndpointResolver.mjs.map\n","import { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolEndpointResolver } from '../../../foundation/cognitoUserPoolEndpointResolver';\nexport const createCognitoUserPoolEndpointResolver = ({ endpointOverride }) => (input) => {\n if (endpointOverride) {\n return { url: new AmplifyUrl(endpointOverride) };\n }\n return cognitoUserPoolEndpointResolver(input);\n};\n","import { getDnsSuffix } from '@aws-amplify/core/internals/aws-client-utils';\nimport { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst cognitoUserPoolEndpointResolver = ({ region, }) => ({\n url: new AmplifyUrl(`https://${COGNITO_IDP_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`),\n});\n\nexport { cognitoUserPoolEndpointResolver };\n//# sourceMappingURL=cognitoUserPoolEndpointResolver.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getDnsSuffix, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from './constants';\nexport const cognitoUserPoolEndpointResolver = ({ region, }) => ({\n url: new AmplifyUrl(`https://${COGNITO_IDP_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`),\n});\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction getUserContextData({ username, userPoolId, userPoolClientId, }) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n const amazonCognitoAdvancedSecurityData = window\n .AmazonCognitoAdvancedSecurityData;\n if (typeof amazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n const advancedSecurityData = amazonCognitoAdvancedSecurityData.getData(username, userPoolId, userPoolClientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData,\n };\n return userContextData;\n }\n return {};\n}\n\nexport { getUserContextData };\n//# sourceMappingURL=userContextData.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function getUserContextData({ username, userPoolId, userPoolClientId, }) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n const amazonCognitoAdvancedSecurityData = window\n .AmazonCognitoAdvancedSecurityData;\n if (typeof amazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n const advancedSecurityData = amazonCognitoAdvancedSecurityData.getData(username, userPoolId, userPoolClientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData,\n };\n return userContextData;\n }\n return {};\n}\n","import { Hub } from '@aws-amplify/core';\nimport { isBrowser, assertTokenProviderConfig, isTokenExpired, AMPLIFY_SYMBOL, AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { oAuthStore } from '../utils/oauth/oAuthStore.mjs';\nimport { addInflightPromise } from '../utils/oauth/inflightPromise.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass TokenOrchestrator {\n constructor() {\n this.waitForInflightOAuth = isBrowser()\n ? async () => {\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n if (this.inflightPromise) {\n return this.inflightPromise;\n }\n // when there is valid oauth config and there is an inflight oauth flow, try\n // to block async calls that require fetching tokens before the oauth flow completes\n // e.g. getCurrentUser, fetchAuthSession etc.\n this.inflightPromise = new Promise((resolve, _reject) => {\n addInflightPromise(resolve);\n });\n return this.inflightPromise;\n }\n : async () => {\n // no-op for non-browser environments\n };\n }\n setAuthConfig(authConfig) {\n oAuthStore.setAuthConfig(authConfig.Cognito);\n this.authConfig = authConfig;\n }\n setTokenRefresher(tokenRefresher) {\n this.tokenRefresher = tokenRefresher;\n }\n setAuthTokenStore(tokenStore) {\n this.tokenStore = tokenStore;\n }\n getTokenStore() {\n if (!this.tokenStore) {\n throw new AuthError({\n name: 'EmptyTokenStoreException',\n message: 'TokenStore not set',\n });\n }\n return this.tokenStore;\n }\n getTokenRefresher() {\n if (!this.tokenRefresher) {\n throw new AuthError({\n name: 'EmptyTokenRefresherException',\n message: 'TokenRefresher not set',\n });\n }\n return this.tokenRefresher;\n }\n async getTokens(options) {\n let tokens;\n try {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n }\n catch (_err) {\n // Token provider not configured\n return null;\n }\n await this.waitForInflightOAuth();\n this.inflightPromise = undefined;\n tokens = await this.getTokenStore().loadTokens();\n const username = await this.getTokenStore().getLastAuthUser();\n if (tokens === null) {\n return null;\n }\n const idTokenExpired = !!tokens?.idToken &&\n isTokenExpired({\n expiresAt: (tokens.idToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n const accessTokenExpired = isTokenExpired({\n expiresAt: (tokens.accessToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n if (options?.forceRefresh || idTokenExpired || accessTokenExpired) {\n tokens = await this.refreshTokens({\n tokens,\n username,\n });\n if (tokens === null) {\n return null;\n }\n }\n return {\n accessToken: tokens?.accessToken,\n idToken: tokens?.idToken,\n signInDetails: tokens?.signInDetails,\n };\n }\n async refreshTokens({ tokens, username, }) {\n try {\n const { signInDetails } = tokens;\n const newTokens = await this.getTokenRefresher()({\n tokens,\n authConfig: this.authConfig,\n username,\n });\n newTokens.signInDetails = signInDetails;\n await this.setTokens({ tokens: newTokens });\n Hub.dispatch('auth', { event: 'tokenRefresh' }, 'Auth', AMPLIFY_SYMBOL);\n return newTokens;\n }\n catch (err) {\n return this.handleErrors(err);\n }\n }\n handleErrors(err) {\n assertServiceError(err);\n if (err.name !== AmplifyErrorCode.NetworkError) {\n // TODO(v6): Check errors on client\n this.clearTokens();\n }\n Hub.dispatch('auth', {\n event: 'tokenRefresh_failure',\n data: { error: err },\n }, 'Auth', AMPLIFY_SYMBOL);\n if (err.name.startsWith('NotAuthorizedException')) {\n return null;\n }\n throw err;\n }\n async setTokens({ tokens }) {\n return this.getTokenStore().storeTokens(tokens);\n }\n async clearTokens() {\n return this.getTokenStore().clearTokens();\n }\n getDeviceMetadata(username) {\n return this.getTokenStore().getDeviceMetadata(username);\n }\n clearDeviceMetadata(username) {\n return this.getTokenStore().clearDeviceMetadata(username);\n }\n setOAuthMetadata(metadata) {\n return this.getTokenStore().setOAuthMetadata(metadata);\n }\n getOAuthMetadata() {\n return this.getTokenStore().getOAuthMetadata();\n }\n}\n\nexport { TokenOrchestrator };\n//# sourceMappingURL=TokenOrchestrator.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Hub, } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL, AmplifyErrorCode, assertTokenProviderConfig, isBrowser, isTokenExpired, } from '@aws-amplify/core/internals/utils';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError';\nimport { AuthError } from '../../../errors/AuthError';\nimport { oAuthStore } from '../utils/oauth/oAuthStore';\nimport { addInflightPromise } from '../utils/oauth/inflightPromise';\nexport class TokenOrchestrator {\n constructor() {\n this.waitForInflightOAuth = isBrowser()\n ? async () => {\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n if (this.inflightPromise) {\n return this.inflightPromise;\n }\n // when there is valid oauth config and there is an inflight oauth flow, try\n // to block async calls that require fetching tokens before the oauth flow completes\n // e.g. getCurrentUser, fetchAuthSession etc.\n this.inflightPromise = new Promise((resolve, _reject) => {\n addInflightPromise(resolve);\n });\n return this.inflightPromise;\n }\n : async () => {\n // no-op for non-browser environments\n };\n }\n setAuthConfig(authConfig) {\n oAuthStore.setAuthConfig(authConfig.Cognito);\n this.authConfig = authConfig;\n }\n setTokenRefresher(tokenRefresher) {\n this.tokenRefresher = tokenRefresher;\n }\n setAuthTokenStore(tokenStore) {\n this.tokenStore = tokenStore;\n }\n getTokenStore() {\n if (!this.tokenStore) {\n throw new AuthError({\n name: 'EmptyTokenStoreException',\n message: 'TokenStore not set',\n });\n }\n return this.tokenStore;\n }\n getTokenRefresher() {\n if (!this.tokenRefresher) {\n throw new AuthError({\n name: 'EmptyTokenRefresherException',\n message: 'TokenRefresher not set',\n });\n }\n return this.tokenRefresher;\n }\n async getTokens(options) {\n let tokens;\n try {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n }\n catch (_err) {\n // Token provider not configured\n return null;\n }\n await this.waitForInflightOAuth();\n this.inflightPromise = undefined;\n tokens = await this.getTokenStore().loadTokens();\n const username = await this.getTokenStore().getLastAuthUser();\n if (tokens === null) {\n return null;\n }\n const idTokenExpired = !!tokens?.idToken &&\n isTokenExpired({\n expiresAt: (tokens.idToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n const accessTokenExpired = isTokenExpired({\n expiresAt: (tokens.accessToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n if (options?.forceRefresh || idTokenExpired || accessTokenExpired) {\n tokens = await this.refreshTokens({\n tokens,\n username,\n });\n if (tokens === null) {\n return null;\n }\n }\n return {\n accessToken: tokens?.accessToken,\n idToken: tokens?.idToken,\n signInDetails: tokens?.signInDetails,\n };\n }\n async refreshTokens({ tokens, username, }) {\n try {\n const { signInDetails } = tokens;\n const newTokens = await this.getTokenRefresher()({\n tokens,\n authConfig: this.authConfig,\n username,\n });\n newTokens.signInDetails = signInDetails;\n await this.setTokens({ tokens: newTokens });\n Hub.dispatch('auth', { event: 'tokenRefresh' }, 'Auth', AMPLIFY_SYMBOL);\n return newTokens;\n }\n catch (err) {\n return this.handleErrors(err);\n }\n }\n handleErrors(err) {\n assertServiceError(err);\n if (err.name !== AmplifyErrorCode.NetworkError) {\n // TODO(v6): Check errors on client\n this.clearTokens();\n }\n Hub.dispatch('auth', {\n event: 'tokenRefresh_failure',\n data: { error: err },\n }, 'Auth', AMPLIFY_SYMBOL);\n if (err.name.startsWith('NotAuthorizedException')) {\n return null;\n }\n throw err;\n }\n async setTokens({ tokens }) {\n return this.getTokenStore().storeTokens(tokens);\n }\n async clearTokens() {\n return this.getTokenStore().clearTokens();\n }\n getDeviceMetadata(username) {\n return this.getTokenStore().getDeviceMetadata(username);\n }\n clearDeviceMetadata(username) {\n return this.getTokenStore().clearDeviceMetadata(username);\n }\n setOAuthMetadata(metadata) {\n return this.getTokenStore().setOAuthMetadata(metadata);\n }\n getOAuthMetadata() {\n return this.getTokenStore().getOAuthMetadata();\n }\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isTokenExpired({ expiresAt, clockDrift, tolerance = 5000, }) {\n const currentTime = Date.now();\n return currentTime + clockDrift + tolerance > expiresAt;\n}\n\nexport { isTokenExpired };\n//# sourceMappingURL=isTokenExpired.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function isTokenExpired({ expiresAt, clockDrift, tolerance = 5000, }) {\n const currentTime = Date.now();\n return currentTime + clockDrift + tolerance > expiresAt;\n}\n","import { defaultStorage } from '@aws-amplify/core';\nimport { DefaultOAuthStore } from '../signInWithRedirectStore.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst oAuthStore = new DefaultOAuthStore(defaultStorage);\n\nexport { oAuthStore };\n//# sourceMappingURL=oAuthStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { defaultStorage } from '@aws-amplify/core';\nimport { DefaultOAuthStore } from '../signInWithRedirectStore';\nexport const oAuthStore = new DefaultOAuthStore(defaultStorage);\n","import { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore.mjs';\nimport { OAuthStorageKeys } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst V5_HOSTED_UI_KEY = 'amplify-signin-with-hostedUI';\nconst name = 'CognitoIdentityServiceProvider';\nclass DefaultOAuthStore {\n constructor(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n async clearOAuthInflightData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await Promise.all([\n this.keyValueStorage.removeItem(authKeys.inflightOAuth),\n this.keyValueStorage.removeItem(authKeys.oauthPKCE),\n this.keyValueStorage.removeItem(authKeys.oauthState),\n ]);\n }\n async clearOAuthData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.clearOAuthInflightData();\n await this.keyValueStorage.removeItem(V5_HOSTED_UI_KEY); // remove in case a customer migrated an App from v5 to v6\n return this.keyValueStorage.removeItem(authKeys.oauthSignIn);\n }\n loadOAuthState() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthState);\n }\n storeOAuthState(state) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthState, state);\n }\n loadPKCE() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthPKCE);\n }\n storePKCE(pkce) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthPKCE, pkce);\n }\n setAuthConfig(authConfigParam) {\n this.cognitoConfig = authConfigParam;\n }\n async loadOAuthInFlight() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return ((await this.keyValueStorage.getItem(authKeys.inflightOAuth)) === 'true');\n }\n async storeOAuthInFlight(inflight) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.inflightOAuth, `${inflight}`);\n }\n async loadOAuthSignIn() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n const isLegacyHostedUISignIn = await this.keyValueStorage.getItem(V5_HOSTED_UI_KEY);\n const [isOAuthSignIn, preferPrivateSession] = (await this.keyValueStorage.getItem(authKeys.oauthSignIn))?.split(',') ??\n [];\n return {\n isOAuthSignIn: isOAuthSignIn === 'true' || isLegacyHostedUISignIn === 'true',\n preferPrivateSession: preferPrivateSession === 'true',\n };\n }\n async storeOAuthSignIn(oauthSignIn, preferPrivateSession = false) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.oauthSignIn, `${oauthSignIn},${preferPrivateSession}`);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(OAuthStorageKeys)(provider, identifier);\n};\n\nexport { DefaultOAuthStore };\n//# sourceMappingURL=signInWithRedirectStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore';\nimport { OAuthStorageKeys } from './types';\nconst V5_HOSTED_UI_KEY = 'amplify-signin-with-hostedUI';\nconst name = 'CognitoIdentityServiceProvider';\nexport class DefaultOAuthStore {\n constructor(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n async clearOAuthInflightData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await Promise.all([\n this.keyValueStorage.removeItem(authKeys.inflightOAuth),\n this.keyValueStorage.removeItem(authKeys.oauthPKCE),\n this.keyValueStorage.removeItem(authKeys.oauthState),\n ]);\n }\n async clearOAuthData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.clearOAuthInflightData();\n await this.keyValueStorage.removeItem(V5_HOSTED_UI_KEY); // remove in case a customer migrated an App from v5 to v6\n return this.keyValueStorage.removeItem(authKeys.oauthSignIn);\n }\n loadOAuthState() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthState);\n }\n storeOAuthState(state) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthState, state);\n }\n loadPKCE() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthPKCE);\n }\n storePKCE(pkce) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthPKCE, pkce);\n }\n setAuthConfig(authConfigParam) {\n this.cognitoConfig = authConfigParam;\n }\n async loadOAuthInFlight() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return ((await this.keyValueStorage.getItem(authKeys.inflightOAuth)) === 'true');\n }\n async storeOAuthInFlight(inflight) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.inflightOAuth, `${inflight}`);\n }\n async loadOAuthSignIn() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n const isLegacyHostedUISignIn = await this.keyValueStorage.getItem(V5_HOSTED_UI_KEY);\n const [isOAuthSignIn, preferPrivateSession] = (await this.keyValueStorage.getItem(authKeys.oauthSignIn))?.split(',') ??\n [];\n return {\n isOAuthSignIn: isOAuthSignIn === 'true' || isLegacyHostedUISignIn === 'true',\n preferPrivateSession: preferPrivateSession === 'true',\n };\n }\n async storeOAuthSignIn(oauthSignIn, preferPrivateSession = false) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.oauthSignIn, `${oauthSignIn},${preferPrivateSession}`);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(OAuthStorageKeys)(provider, identifier);\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst inflightPromises = [];\nconst addInflightPromise = (resolver) => {\n inflightPromises.push(resolver);\n};\nconst resolveAndClearInflightPromises = () => {\n while (inflightPromises.length) {\n inflightPromises.pop()?.();\n }\n};\n\nexport { addInflightPromise, resolveAndClearInflightPromises };\n//# sourceMappingURL=inflightPromise.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst inflightPromises = [];\nexport const addInflightPromise = (resolver) => {\n inflightPromises.push(resolver);\n};\nexport const resolveAndClearInflightPromises = () => {\n while (inflightPromises.length) {\n inflightPromises.pop()?.();\n }\n};\n","import { Amplify } from '@aws-amplify/core';\nimport { getCurrentUser as getCurrentUser$1 } from './internal/getCurrentUser.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Gets the current user from the idToken.\n *\n * @param input - The GetCurrentUserInput object.\n * @returns GetCurrentUserOutput\n * @throws - {@link InitiateAuthException} - Thrown when the service fails to refresh the tokens.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst getCurrentUser = async () => {\n return getCurrentUser$1(Amplify);\n};\n\nexport { getCurrentUser };\n//# sourceMappingURL=getCurrentUser.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { getCurrentUser as getCurrentUserInternal } from './internal/getCurrentUser';\n/**\n * Gets the current user from the idToken.\n *\n * @param input - The GetCurrentUserInput object.\n * @returns GetCurrentUserOutput\n * @throws - {@link InitiateAuthException} - Thrown when the service fails to refresh the tokens.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport const getCurrentUser = async () => {\n return getCurrentUserInternal(Amplify);\n};\n","import { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../../utils/types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCurrentUser = async (amplify) => {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const tokens = await amplify.Auth.getTokens({ forceRefresh: false });\n assertAuthTokens(tokens);\n const { 'cognito:username': username, sub } = tokens.idToken?.payload ?? {};\n const authUser = {\n username: username,\n userId: sub,\n };\n const signInDetails = getSignInDetailsFromTokens(tokens);\n if (signInDetails) {\n authUser.signInDetails = signInDetails;\n }\n return authUser;\n};\nfunction getSignInDetailsFromTokens(tokens) {\n return tokens?.signInDetails;\n}\n\nexport { getCurrentUser };\n//# sourceMappingURL=getCurrentUser.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../../utils/types';\nexport const getCurrentUser = async (amplify) => {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const tokens = await amplify.Auth.getTokens({ forceRefresh: false });\n assertAuthTokens(tokens);\n const { 'cognito:username': username, sub } = tokens.idToken?.payload ?? {};\n const authUser = {\n username: username,\n userId: sub,\n };\n const signInDetails = getSignInDetailsFromTokens(tokens);\n if (signInDetails) {\n authUser.signInDetails = signInDetails;\n }\n return authUser;\n};\nfunction getSignInDetailsFromTokens(tokens) {\n return tokens?.signInDetails;\n}\n","import { Amplify } from '../Amplify.mjs';\nimport { fetchAuthSession as fetchAuthSession$1 } from './internal/fetchAuthSession.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetch the auth session including the tokens and credentials if they are available. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n * @throws {@link AuthError} - Throws error when session information cannot be refreshed.\n * @returns Promise\n */\nconst fetchAuthSession = (options) => {\n return fetchAuthSession$1(Amplify, options);\n};\n\nexport { fetchAuthSession };\n//# sourceMappingURL=fetchAuthSession.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '../Amplify';\nimport { fetchAuthSession as fetchAuthSessionInternal } from './internal/fetchAuthSession';\n/**\n * Fetch the auth session including the tokens and credentials if they are available. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n * @throws {@link AuthError} - Throws error when session information cannot be refreshed.\n * @returns Promise\n */\nexport const fetchAuthSession = (options) => {\n return fetchAuthSessionInternal(Amplify, options);\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst fetchAuthSession = (amplify, options) => {\n return amplify.Auth.fetchAuthSession(options);\n};\n\nexport { fetchAuthSession };\n//# sourceMappingURL=fetchAuthSession.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const fetchAuthSession = (amplify, options) => {\n return amplify.Auth.fetchAuthSession(options);\n};\n","import { Amplify } from '@aws-amplify/core';\nimport { fetchUserAttributes as fetchUserAttributes$1 } from './internal/fetchUserAttributes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetches the current user attributes while authenticated.\n *\n * @throws - {@link GetUserException} - Cognito service errors thrown when the service is not able to get the user.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst fetchUserAttributes = () => {\n return fetchUserAttributes$1(Amplify);\n};\n\nexport { fetchUserAttributes };\n//# sourceMappingURL=fetchUserAttributes.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { fetchUserAttributes as fetchUserAttributesInternal } from './internal/fetchUserAttributes';\n/**\n * Fetches the current user attributes while authenticated.\n *\n * @throws - {@link GetUserException} - Cognito service errors thrown when the service is not able to get the user.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport const fetchUserAttributes = () => {\n return fetchUserAttributesInternal(Amplify);\n};\n","import { assertTokenProviderConfig, fetchAuthSession, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../../utils/types.mjs';\nimport { toAuthUserAttribute } from '../../utils/apiHelpers.mjs';\nimport { getAuthUserAgentValue } from '../../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../../common/AuthErrorStrings.mjs';\nimport '../../../../errors/types/validation.mjs';\nimport '../../types/errors.mjs';\nimport { createGetUserClient } from '../../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst fetchUserAttributes = async (amplify) => {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession(amplify, {\n forceRefresh: false,\n });\n assertAuthTokens(tokens);\n const getUser = createGetUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { UserAttributes } = await getUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.FetchUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n return toAuthUserAttribute(UserAttributes);\n};\n\nexport { fetchUserAttributes };\n//# sourceMappingURL=fetchUserAttributes.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction, assertTokenProviderConfig, fetchAuthSession, } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../../foundation/parsers';\nimport { assertAuthTokens } from '../../utils/types';\nimport { toAuthUserAttribute } from '../../utils/apiHelpers';\nimport { getAuthUserAgentValue } from '../../../../utils';\nimport { createGetUserClient } from '../../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../../factories';\nexport const fetchUserAttributes = async (amplify) => {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession(amplify, {\n forceRefresh: false,\n });\n assertAuthTokens(tokens);\n const getUser = createGetUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { UserAttributes } = await getUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.FetchUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n return toAuthUserAttribute(UserAttributes);\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Transforms a user attributes object into an array of AttributeType objects.\n * @param attributes user attributes to be mapped to AttributeType objects.\n * @returns an array of AttributeType objects.\n */\nfunction toAttributeType(attributes) {\n return Object.entries(attributes).map(([key, value]) => ({\n Name: key,\n Value: value,\n }));\n}\n/**\n * Transforms an array of AttributeType objects into a user attributes object.\n *\n * @param attributes - an array of AttributeType objects.\n * @returns AuthUserAttributes object.\n */\nfunction toAuthUserAttribute(attributes) {\n const userAttributes = {};\n attributes?.forEach(attribute => {\n if (attribute.Name)\n userAttributes[attribute.Name] = attribute.Value;\n });\n return userAttributes;\n}\n\nexport { toAttributeType, toAuthUserAttribute };\n//# sourceMappingURL=apiHelpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Transforms a user attributes object into an array of AttributeType objects.\n * @param attributes user attributes to be mapped to AttributeType objects.\n * @returns an array of AttributeType objects.\n */\nexport function toAttributeType(attributes) {\n return Object.entries(attributes).map(([key, value]) => ({\n Name: key,\n Value: value,\n }));\n}\n/**\n * Transforms an array of AttributeType objects into a user attributes object.\n *\n * @param attributes - an array of AttributeType objects.\n * @returns AuthUserAttributes object.\n */\nexport function toAuthUserAttribute(attributes) {\n const userAttributes = {};\n attributes?.forEach(attribute => {\n if (attribute.Name)\n userAttributes[attribute.Name] = attribute.Value;\n });\n return userAttributes;\n}\n","import { getAmplifyUserAgent, Category } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getAuthUserAgentValue = (action, customUserAgentDetails) => getAmplifyUserAgent({\n category: Category.Auth,\n action,\n ...customUserAgentDetails,\n});\n\nexport { getAuthUserAgentValue };\n//# sourceMappingURL=getAuthUserAgentValue.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Category, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nexport const getAuthUserAgentValue = (action, customUserAgentDetails) => getAmplifyUserAgent({\n category: Category.Auth,\n action,\n ...customUserAgentDetails,\n});\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGetUserClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GetUser'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createGetUserClient };\n//# sourceMappingURL=createGetUserClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createGetUserClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GetUser'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { toAttributeType } from '../utils/apiHelpers.mjs';\nimport { handleCodeAutoSignIn, autoSignInUserConfirmed, autoSignInWhenUserIsConfirmedWithLink } from '../utils/signUpHelpers.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport { createSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { setAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Creates a user\n *\n * @param input - The SignUpInput object\n * @returns SignUpOutput\n * @throws service: {@link SignUpException } - Cognito service errors thrown during the sign-up process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signUp(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signUpVerificationMethod = authConfig?.signUpVerificationMethod ?? 'code';\n const { clientMetadata, validationData, autoSignIn } = input.options ?? {};\n assertTokenProviderConfig(authConfig);\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignUpUsername);\n const signInServiceOptions = typeof autoSignIn !== 'boolean' ? autoSignIn : undefined;\n const signInInput = {\n username,\n options: signInServiceOptions,\n };\n // if the authFlowType is 'CUSTOM_WITHOUT_SRP' then we don't include the password\n if (signInServiceOptions?.authFlowType !== 'CUSTOM_WITHOUT_SRP') {\n signInInput.password = password;\n }\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const signUpClient = createSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const signUpClientInput = {\n Username: username,\n Password: undefined,\n UserAttributes: options?.userAttributes && toAttributeType(options?.userAttributes),\n ClientMetadata: clientMetadata,\n ValidationData: validationData && toAttributeType(validationData),\n ClientId: userPoolClientId,\n UserContextData: getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n }),\n };\n if (password) {\n signUpClientInput.Password = password;\n }\n const { UserSub: userId, CodeDeliveryDetails: cdd, UserConfirmed: userConfirmed, Session: session, } = await signUpClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignUp),\n }, signUpClientInput);\n if (signInServiceOptions || autoSignIn === true) {\n autoSignInStore.dispatch({ type: 'START' });\n autoSignInStore.dispatch({ type: 'SET_USERNAME', value: username });\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n }\n const codeDeliveryDetails = {\n destination: cdd?.Destination,\n deliveryMedium: cdd?.DeliveryMedium,\n attributeName: cdd?.AttributeName,\n };\n const isSignUpComplete = !!userConfirmed;\n const isAutoSignInStarted = autoSignInStore.getState().active;\n // Sign Up Complete\n // No Confirm Sign In Step Required\n if (isSignUpComplete) {\n if (isAutoSignInStarted) {\n setAutoSignIn(autoSignInUserConfirmed(signInInput));\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n userId,\n };\n }\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n userId,\n };\n }\n // Sign Up Not Complete\n // Confirm Sign Up Step Required\n if (isAutoSignInStarted) {\n // Confirmation Via Link Occurs In Separate Context\n // AutoSignIn Fn Will Initiate Polling Once Executed\n if (signUpVerificationMethod === 'link') {\n setAutoSignIn(autoSignInWhenUserIsConfirmedWithLink(signInInput));\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n codeDeliveryDetails,\n },\n userId,\n };\n }\n // Confirmation Via Code Occurs In Same Context\n // AutoSignIn Next Step Will Be Returned From Confirm Sign Up\n handleCodeAutoSignIn(signInInput);\n }\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'CONFIRM_SIGN_UP',\n codeDeliveryDetails,\n },\n userId,\n };\n}\n\nexport { signUp };\n//# sourceMappingURL=signUp.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { toAttributeType } from '../utils/apiHelpers';\nimport { autoSignInUserConfirmed, autoSignInWhenUserIsConfirmedWithLink, handleCodeAutoSignIn, } from '../utils/signUpHelpers';\nimport { getUserContextData } from '../utils/userContextData';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { createSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { autoSignInStore } from '../../../client/utils/store';\nimport { setAutoSignIn } from './autoSignIn';\n/**\n * Creates a user\n *\n * @param input - The SignUpInput object\n * @returns SignUpOutput\n * @throws service: {@link SignUpException } - Cognito service errors thrown during the sign-up process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signUp(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signUpVerificationMethod = authConfig?.signUpVerificationMethod ?? 'code';\n const { clientMetadata, validationData, autoSignIn } = input.options ?? {};\n assertTokenProviderConfig(authConfig);\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignUpUsername);\n const signInServiceOptions = typeof autoSignIn !== 'boolean' ? autoSignIn : undefined;\n const signInInput = {\n username,\n options: signInServiceOptions,\n };\n // if the authFlowType is 'CUSTOM_WITHOUT_SRP' then we don't include the password\n if (signInServiceOptions?.authFlowType !== 'CUSTOM_WITHOUT_SRP') {\n signInInput.password = password;\n }\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const signUpClient = createSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const signUpClientInput = {\n Username: username,\n Password: undefined,\n UserAttributes: options?.userAttributes && toAttributeType(options?.userAttributes),\n ClientMetadata: clientMetadata,\n ValidationData: validationData && toAttributeType(validationData),\n ClientId: userPoolClientId,\n UserContextData: getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n }),\n };\n if (password) {\n signUpClientInput.Password = password;\n }\n const { UserSub: userId, CodeDeliveryDetails: cdd, UserConfirmed: userConfirmed, Session: session, } = await signUpClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignUp),\n }, signUpClientInput);\n if (signInServiceOptions || autoSignIn === true) {\n autoSignInStore.dispatch({ type: 'START' });\n autoSignInStore.dispatch({ type: 'SET_USERNAME', value: username });\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n }\n const codeDeliveryDetails = {\n destination: cdd?.Destination,\n deliveryMedium: cdd?.DeliveryMedium,\n attributeName: cdd?.AttributeName,\n };\n const isSignUpComplete = !!userConfirmed;\n const isAutoSignInStarted = autoSignInStore.getState().active;\n // Sign Up Complete\n // No Confirm Sign In Step Required\n if (isSignUpComplete) {\n if (isAutoSignInStarted) {\n setAutoSignIn(autoSignInUserConfirmed(signInInput));\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n userId,\n };\n }\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n userId,\n };\n }\n // Sign Up Not Complete\n // Confirm Sign Up Step Required\n if (isAutoSignInStarted) {\n // Confirmation Via Link Occurs In Separate Context\n // AutoSignIn Fn Will Initiate Polling Once Executed\n if (signUpVerificationMethod === 'link') {\n setAutoSignIn(autoSignInWhenUserIsConfirmedWithLink(signInInput));\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n codeDeliveryDetails,\n },\n userId,\n };\n }\n // Confirmation Via Code Occurs In Same Context\n // AutoSignIn Next Step Will Be Returned From Confirm Sign Up\n handleCodeAutoSignIn(signInInput);\n }\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'CONFIRM_SIGN_UP',\n codeDeliveryDetails,\n },\n userId,\n };\n}\n","import { validationErrorMap } from '../../common/AuthErrorStrings.mjs';\nimport { AuthError } from '../AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new AuthError({ name, message, recoverySuggestion });\n }\n}\n\nexport { assertValidationError };\n//# sourceMappingURL=assertValidationError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { validationErrorMap } from '../../common/AuthErrorStrings';\nimport { AuthError } from '../AuthError';\nexport function assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new AuthError({ name, message, recoverySuggestion });\n }\n}\n","import { AuthValidationErrorCode } from '../errors/types/validation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst validationErrorMap = {\n [AuthValidationErrorCode.EmptyChallengeResponse]: {\n message: 'challengeResponse is required to confirmSignIn',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordUsername]: {\n message: 'username is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyConfirmSignUpCode]: {\n message: 'code is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyConfirmSignUpUsername]: {\n message: 'username is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode]: {\n message: 'confirmationCode is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword]: {\n message: 'newPassword is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyResendSignUpCodeUsername]: {\n message: 'username is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyResetPasswordUsername]: {\n message: 'username is required to resetPassword',\n },\n [AuthValidationErrorCode.EmptySignInPassword]: {\n message: 'password is required to signIn',\n },\n [AuthValidationErrorCode.EmptySignInUsername]: {\n message: 'username is required to signIn',\n },\n [AuthValidationErrorCode.EmptySignUpPassword]: {\n message: 'password is required to signUp',\n },\n [AuthValidationErrorCode.EmptySignUpUsername]: {\n message: 'username is required to signUp',\n },\n [AuthValidationErrorCode.CustomAuthSignInPassword]: {\n message: 'A password is not needed when signing in with CUSTOM_WITHOUT_SRP',\n recoverySuggestion: 'Do not include a password in your signIn call.',\n },\n [AuthValidationErrorCode.IncorrectMFAMethod]: {\n message: 'Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL',\n recoverySuggestion: 'Try to pass SMS, TOTP, or EMAIL as the challengeResponse',\n },\n [AuthValidationErrorCode.EmptyVerifyTOTPSetupCode]: {\n message: 'code is required to verifyTotpSetup',\n },\n [AuthValidationErrorCode.EmptyUpdatePassword]: {\n message: 'oldPassword and newPassword are required to changePassword',\n },\n [AuthValidationErrorCode.EmptyConfirmUserAttributeCode]: {\n message: 'confirmation code is required to confirmUserAttribute',\n },\n};\n// TODO: delete this code when the Auth class is removed.\nvar AuthErrorStrings;\n(function (AuthErrorStrings) {\n AuthErrorStrings[\"DEFAULT_MSG\"] = \"Authentication Error\";\n AuthErrorStrings[\"EMPTY_EMAIL\"] = \"Email cannot be empty\";\n AuthErrorStrings[\"EMPTY_PHONE\"] = \"Phone number cannot be empty\";\n AuthErrorStrings[\"EMPTY_USERNAME\"] = \"Username cannot be empty\";\n AuthErrorStrings[\"INVALID_USERNAME\"] = \"The username should either be a string or one of the sign in types\";\n AuthErrorStrings[\"EMPTY_PASSWORD\"] = \"Password cannot be empty\";\n AuthErrorStrings[\"EMPTY_CODE\"] = \"Confirmation code cannot be empty\";\n AuthErrorStrings[\"SIGN_UP_ERROR\"] = \"Error creating account\";\n AuthErrorStrings[\"NO_MFA\"] = \"No valid MFA method provided\";\n AuthErrorStrings[\"INVALID_MFA\"] = \"Invalid MFA type\";\n AuthErrorStrings[\"EMPTY_CHALLENGE\"] = \"Challenge response cannot be empty\";\n AuthErrorStrings[\"NO_USER_SESSION\"] = \"Failed to get the session because the user is empty\";\n AuthErrorStrings[\"NETWORK_ERROR\"] = \"Network Error\";\n AuthErrorStrings[\"DEVICE_CONFIG\"] = \"Device tracking has not been configured in this User Pool\";\n AuthErrorStrings[\"AUTOSIGNIN_ERROR\"] = \"Please use your credentials to sign in\";\n AuthErrorStrings[\"OAUTH_ERROR\"] = \"Couldn't finish OAuth flow, check your User Pool HostedUI settings\";\n})(AuthErrorStrings || (AuthErrorStrings = {}));\nvar AuthErrorCodes;\n(function (AuthErrorCodes) {\n AuthErrorCodes[\"SignInException\"] = \"SignInException\";\n AuthErrorCodes[\"OAuthSignInError\"] = \"OAuthSignInException\";\n})(AuthErrorCodes || (AuthErrorCodes = {}));\n\nexport { AuthErrorCodes, AuthErrorStrings, validationErrorMap };\n//# sourceMappingURL=AuthErrorStrings.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthValidationErrorCode } from '../errors/types/validation';\nexport const validationErrorMap = {\n [AuthValidationErrorCode.EmptyChallengeResponse]: {\n message: 'challengeResponse is required to confirmSignIn',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordUsername]: {\n message: 'username is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyConfirmSignUpCode]: {\n message: 'code is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyConfirmSignUpUsername]: {\n message: 'username is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode]: {\n message: 'confirmationCode is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword]: {\n message: 'newPassword is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyResendSignUpCodeUsername]: {\n message: 'username is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyResetPasswordUsername]: {\n message: 'username is required to resetPassword',\n },\n [AuthValidationErrorCode.EmptySignInPassword]: {\n message: 'password is required to signIn',\n },\n [AuthValidationErrorCode.EmptySignInUsername]: {\n message: 'username is required to signIn',\n },\n [AuthValidationErrorCode.EmptySignUpPassword]: {\n message: 'password is required to signUp',\n },\n [AuthValidationErrorCode.EmptySignUpUsername]: {\n message: 'username is required to signUp',\n },\n [AuthValidationErrorCode.CustomAuthSignInPassword]: {\n message: 'A password is not needed when signing in with CUSTOM_WITHOUT_SRP',\n recoverySuggestion: 'Do not include a password in your signIn call.',\n },\n [AuthValidationErrorCode.IncorrectMFAMethod]: {\n message: 'Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL',\n recoverySuggestion: 'Try to pass SMS, TOTP, or EMAIL as the challengeResponse',\n },\n [AuthValidationErrorCode.EmptyVerifyTOTPSetupCode]: {\n message: 'code is required to verifyTotpSetup',\n },\n [AuthValidationErrorCode.EmptyUpdatePassword]: {\n message: 'oldPassword and newPassword are required to changePassword',\n },\n [AuthValidationErrorCode.EmptyConfirmUserAttributeCode]: {\n message: 'confirmation code is required to confirmUserAttribute',\n },\n};\n// TODO: delete this code when the Auth class is removed.\nexport var AuthErrorStrings;\n(function (AuthErrorStrings) {\n AuthErrorStrings[\"DEFAULT_MSG\"] = \"Authentication Error\";\n AuthErrorStrings[\"EMPTY_EMAIL\"] = \"Email cannot be empty\";\n AuthErrorStrings[\"EMPTY_PHONE\"] = \"Phone number cannot be empty\";\n AuthErrorStrings[\"EMPTY_USERNAME\"] = \"Username cannot be empty\";\n AuthErrorStrings[\"INVALID_USERNAME\"] = \"The username should either be a string or one of the sign in types\";\n AuthErrorStrings[\"EMPTY_PASSWORD\"] = \"Password cannot be empty\";\n AuthErrorStrings[\"EMPTY_CODE\"] = \"Confirmation code cannot be empty\";\n AuthErrorStrings[\"SIGN_UP_ERROR\"] = \"Error creating account\";\n AuthErrorStrings[\"NO_MFA\"] = \"No valid MFA method provided\";\n AuthErrorStrings[\"INVALID_MFA\"] = \"Invalid MFA type\";\n AuthErrorStrings[\"EMPTY_CHALLENGE\"] = \"Challenge response cannot be empty\";\n AuthErrorStrings[\"NO_USER_SESSION\"] = \"Failed to get the session because the user is empty\";\n AuthErrorStrings[\"NETWORK_ERROR\"] = \"Network Error\";\n AuthErrorStrings[\"DEVICE_CONFIG\"] = \"Device tracking has not been configured in this User Pool\";\n AuthErrorStrings[\"AUTOSIGNIN_ERROR\"] = \"Please use your credentials to sign in\";\n AuthErrorStrings[\"OAUTH_ERROR\"] = \"Couldn't finish OAuth flow, check your User Pool HostedUI settings\";\n})(AuthErrorStrings || (AuthErrorStrings = {}));\nexport var AuthErrorCodes;\n(function (AuthErrorCodes) {\n AuthErrorCodes[\"SignInException\"] = \"SignInException\";\n AuthErrorCodes[\"OAuthSignInError\"] = \"OAuthSignInException\";\n})(AuthErrorCodes || (AuthErrorCodes = {}));\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthValidationErrorCode;\n(function (AuthValidationErrorCode) {\n AuthValidationErrorCode[\"EmptySignInUsername\"] = \"EmptySignInUsername\";\n AuthValidationErrorCode[\"EmptySignInPassword\"] = \"EmptySignInPassword\";\n AuthValidationErrorCode[\"CustomAuthSignInPassword\"] = \"CustomAuthSignInPassword\";\n AuthValidationErrorCode[\"EmptySignUpUsername\"] = \"EmptySignUpUsername\";\n AuthValidationErrorCode[\"EmptySignUpPassword\"] = \"EmptySignUpPassword\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpUsername\"] = \"EmptyConfirmSignUpUsername\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpCode\"] = \"EmptyConfirmSignUpCode\";\n AuthValidationErrorCode[\"EmptyResendSignUpCodeUsername\"] = \"EmptyresendSignUpCodeUsername\";\n AuthValidationErrorCode[\"EmptyChallengeResponse\"] = \"EmptyChallengeResponse\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordUsername\"] = \"EmptyConfirmResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordNewPassword\"] = \"EmptyConfirmResetPasswordNewPassword\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordConfirmationCode\"] = \"EmptyConfirmResetPasswordConfirmationCode\";\n AuthValidationErrorCode[\"EmptyResetPasswordUsername\"] = \"EmptyResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyVerifyTOTPSetupCode\"] = \"EmptyVerifyTOTPSetupCode\";\n AuthValidationErrorCode[\"EmptyConfirmUserAttributeCode\"] = \"EmptyConfirmUserAttributeCode\";\n AuthValidationErrorCode[\"IncorrectMFAMethod\"] = \"IncorrectMFAMethod\";\n AuthValidationErrorCode[\"EmptyUpdatePassword\"] = \"EmptyUpdatePassword\";\n})(AuthValidationErrorCode || (AuthValidationErrorCode = {}));\n\nexport { AuthValidationErrorCode };\n//# sourceMappingURL=validation.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var AuthValidationErrorCode;\n(function (AuthValidationErrorCode) {\n AuthValidationErrorCode[\"EmptySignInUsername\"] = \"EmptySignInUsername\";\n AuthValidationErrorCode[\"EmptySignInPassword\"] = \"EmptySignInPassword\";\n AuthValidationErrorCode[\"CustomAuthSignInPassword\"] = \"CustomAuthSignInPassword\";\n AuthValidationErrorCode[\"EmptySignUpUsername\"] = \"EmptySignUpUsername\";\n AuthValidationErrorCode[\"EmptySignUpPassword\"] = \"EmptySignUpPassword\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpUsername\"] = \"EmptyConfirmSignUpUsername\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpCode\"] = \"EmptyConfirmSignUpCode\";\n AuthValidationErrorCode[\"EmptyResendSignUpCodeUsername\"] = \"EmptyresendSignUpCodeUsername\";\n AuthValidationErrorCode[\"EmptyChallengeResponse\"] = \"EmptyChallengeResponse\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordUsername\"] = \"EmptyConfirmResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordNewPassword\"] = \"EmptyConfirmResetPasswordNewPassword\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordConfirmationCode\"] = \"EmptyConfirmResetPasswordConfirmationCode\";\n AuthValidationErrorCode[\"EmptyResetPasswordUsername\"] = \"EmptyResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyVerifyTOTPSetupCode\"] = \"EmptyVerifyTOTPSetupCode\";\n AuthValidationErrorCode[\"EmptyConfirmUserAttributeCode\"] = \"EmptyConfirmUserAttributeCode\";\n AuthValidationErrorCode[\"IncorrectMFAMethod\"] = \"IncorrectMFAMethod\";\n AuthValidationErrorCode[\"EmptyUpdatePassword\"] = \"EmptyUpdatePassword\";\n})(AuthValidationErrorCode || (AuthValidationErrorCode = {}));\n","import { HubInternal } from '@aws-amplify/core/internals/utils';\nimport { signIn } from '../apis/signIn.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { setAutoSignIn, resetAutoSignIn } from '../apis/autoSignIn.mjs';\nimport { AUTO_SIGN_IN_EXCEPTION } from '../../../errors/constants.mjs';\nimport { signInWithUserAuth } from '../apis/signInWithUserAuth.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MAX_AUTOSIGNIN_POLLING_MS = 3 * 60 * 1000;\nfunction handleCodeAutoSignIn(signInInput) {\n const stopHubListener = HubInternal.listen('auth-internal', async ({ payload }) => {\n switch (payload.event) {\n case 'confirmSignUp': {\n const response = payload.data;\n if (response?.isSignUpComplete) {\n HubInternal.dispatch('auth-internal', {\n event: 'autoSignIn',\n });\n setAutoSignIn(autoSignInWithCode(signInInput));\n stopHubListener();\n }\n }\n }\n });\n // This will stop the listener if confirmSignUp is not resolved.\n const timeOutId = setTimeout(() => {\n stopHubListener();\n clearTimeout(timeOutId);\n resetAutoSignIn();\n }, MAX_AUTOSIGNIN_POLLING_MS);\n}\nfunction debounce(fun, delay) {\n let timer;\n return (args) => {\n if (!timer) {\n fun(...args);\n }\n clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n }, delay);\n };\n}\nfunction handleAutoSignInWithLink(signInInput, resolve, reject) {\n const start = Date.now();\n const autoSignInPollingIntervalId = setInterval(async () => {\n const elapsedTime = Date.now() - start;\n const maxTime = MAX_AUTOSIGNIN_POLLING_MS;\n if (elapsedTime > maxTime) {\n clearInterval(autoSignInPollingIntervalId);\n reject(new AuthError({\n name: AUTO_SIGN_IN_EXCEPTION,\n message: 'The account was not confirmed on time.',\n recoverySuggestion: 'Try to verify your account by clicking the link sent your email or phone and then login manually.',\n }));\n resetAutoSignIn();\n }\n else {\n try {\n const signInOutput = await signIn(signInInput);\n if (signInOutput.nextStep.signInStep !== 'CONFIRM_SIGN_UP') {\n resolve(signInOutput);\n clearInterval(autoSignInPollingIntervalId);\n resetAutoSignIn();\n }\n }\n catch (error) {\n clearInterval(autoSignInPollingIntervalId);\n reject(error);\n resetAutoSignIn();\n }\n }\n }, 5000);\n}\nconst debouncedAutoSignInWithLink = debounce(handleAutoSignInWithLink, 300);\nconst debouncedAutoSignWithCodeOrUserConfirmed = debounce(handleAutoSignInWithCodeOrUserConfirmed, 300);\nfunction autoSignInWhenUserIsConfirmedWithLink(signInInput) {\n return async () => {\n return new Promise((resolve, reject) => {\n debouncedAutoSignInWithLink([signInInput, resolve, reject]);\n });\n };\n}\nasync function handleAutoSignInWithCodeOrUserConfirmed(signInInput, resolve, reject) {\n try {\n const output = signInInput?.options?.authFlowType === 'USER_AUTH'\n ? await signInWithUserAuth(signInInput)\n : await signIn(signInInput);\n resolve(output);\n resetAutoSignIn();\n }\n catch (error) {\n reject(error);\n resetAutoSignIn();\n }\n}\nfunction autoSignInWithCode(signInInput) {\n return async () => {\n return new Promise((resolve, reject) => {\n debouncedAutoSignWithCodeOrUserConfirmed([signInInput, resolve, reject]);\n });\n };\n}\nconst autoSignInUserConfirmed = autoSignInWithCode;\n\nexport { autoSignInUserConfirmed, autoSignInWhenUserIsConfirmedWithLink, handleCodeAutoSignIn };\n//# sourceMappingURL=signUpHelpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { HubInternal } from '@aws-amplify/core/internals/utils';\nimport { signIn } from '../apis/signIn';\nimport { AuthError } from '../../../errors/AuthError';\nimport { resetAutoSignIn, setAutoSignIn } from '../apis/autoSignIn';\nimport { AUTO_SIGN_IN_EXCEPTION } from '../../../errors/constants';\nimport { signInWithUserAuth } from '../apis/signInWithUserAuth';\nconst MAX_AUTOSIGNIN_POLLING_MS = 3 * 60 * 1000;\nexport function handleCodeAutoSignIn(signInInput) {\n const stopHubListener = HubInternal.listen('auth-internal', async ({ payload }) => {\n switch (payload.event) {\n case 'confirmSignUp': {\n const response = payload.data;\n if (response?.isSignUpComplete) {\n HubInternal.dispatch('auth-internal', {\n event: 'autoSignIn',\n });\n setAutoSignIn(autoSignInWithCode(signInInput));\n stopHubListener();\n }\n }\n }\n });\n // This will stop the listener if confirmSignUp is not resolved.\n const timeOutId = setTimeout(() => {\n stopHubListener();\n clearTimeout(timeOutId);\n resetAutoSignIn();\n }, MAX_AUTOSIGNIN_POLLING_MS);\n}\nfunction debounce(fun, delay) {\n let timer;\n return (args) => {\n if (!timer) {\n fun(...args);\n }\n clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n }, delay);\n };\n}\nfunction handleAutoSignInWithLink(signInInput, resolve, reject) {\n const start = Date.now();\n const autoSignInPollingIntervalId = setInterval(async () => {\n const elapsedTime = Date.now() - start;\n const maxTime = MAX_AUTOSIGNIN_POLLING_MS;\n if (elapsedTime > maxTime) {\n clearInterval(autoSignInPollingIntervalId);\n reject(new AuthError({\n name: AUTO_SIGN_IN_EXCEPTION,\n message: 'The account was not confirmed on time.',\n recoverySuggestion: 'Try to verify your account by clicking the link sent your email or phone and then login manually.',\n }));\n resetAutoSignIn();\n }\n else {\n try {\n const signInOutput = await signIn(signInInput);\n if (signInOutput.nextStep.signInStep !== 'CONFIRM_SIGN_UP') {\n resolve(signInOutput);\n clearInterval(autoSignInPollingIntervalId);\n resetAutoSignIn();\n }\n }\n catch (error) {\n clearInterval(autoSignInPollingIntervalId);\n reject(error);\n resetAutoSignIn();\n }\n }\n }, 5000);\n}\nconst debouncedAutoSignInWithLink = debounce(handleAutoSignInWithLink, 300);\nconst debouncedAutoSignWithCodeOrUserConfirmed = debounce(handleAutoSignInWithCodeOrUserConfirmed, 300);\nexport function autoSignInWhenUserIsConfirmedWithLink(signInInput) {\n return async () => {\n return new Promise((resolve, reject) => {\n debouncedAutoSignInWithLink([signInInput, resolve, reject]);\n });\n };\n}\nasync function handleAutoSignInWithCodeOrUserConfirmed(signInInput, resolve, reject) {\n try {\n const output = signInInput?.options?.authFlowType === 'USER_AUTH'\n ? await signInWithUserAuth(signInInput)\n : await signIn(signInInput);\n resolve(output);\n resetAutoSignIn();\n }\n catch (error) {\n reject(error);\n resetAutoSignIn();\n }\n}\nfunction autoSignInWithCode(signInInput) {\n return async () => {\n return new Promise((resolve, reject) => {\n debouncedAutoSignWithCodeOrUserConfirmed([signInInput, resolve, reject]);\n });\n };\n}\nexport const autoSignInUserConfirmed = autoSignInWithCode;\n","import { assertUserNotAuthenticated } from '../utils/signInHelpers.mjs';\nimport { signInWithCustomAuth } from './signInWithCustomAuth.mjs';\nimport { signInWithCustomSRPAuth } from './signInWithCustomSRPAuth.mjs';\nimport { signInWithSRP } from './signInWithSRP.mjs';\nimport { signInWithUserPassword } from './signInWithUserPassword.mjs';\nimport { signInWithUserAuth } from './signInWithUserAuth.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in\n *\n * @param input - The SignInInput object\n * @returns SignInOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException }\n * - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signIn(input) {\n // Here we want to reset the store but not reassign the callback.\n // The callback is reset when the underlying promise resolves or rejects.\n // With the advent of session based sign in, this guarantees that the signIn API initiates a new auth flow,\n // regardless of whether it is called for a user currently engaged in an active auto sign in session.\n resetAutoSignIn(false);\n const authFlowType = input.options?.authFlowType;\n await assertUserNotAuthenticated();\n switch (authFlowType) {\n case 'USER_SRP_AUTH':\n return signInWithSRP(input);\n case 'USER_PASSWORD_AUTH':\n return signInWithUserPassword(input);\n case 'CUSTOM_WITHOUT_SRP':\n return signInWithCustomAuth(input);\n case 'CUSTOM_WITH_SRP':\n return signInWithCustomSRPAuth(input);\n case 'USER_AUTH':\n return signInWithUserAuth(input);\n default:\n return signInWithSRP(input);\n }\n}\n\nexport { signIn };\n//# sourceMappingURL=signIn.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { assertUserNotAuthenticated } from '../utils/signInHelpers';\nimport { signInWithCustomAuth } from './signInWithCustomAuth';\nimport { signInWithCustomSRPAuth } from './signInWithCustomSRPAuth';\nimport { signInWithSRP } from './signInWithSRP';\nimport { signInWithUserPassword } from './signInWithUserPassword';\nimport { signInWithUserAuth } from './signInWithUserAuth';\nimport { resetAutoSignIn } from './autoSignIn';\n/**\n * Signs a user in\n *\n * @param input - The SignInInput object\n * @returns SignInOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException }\n * - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signIn(input) {\n // Here we want to reset the store but not reassign the callback.\n // The callback is reset when the underlying promise resolves or rejects.\n // With the advent of session based sign in, this guarantees that the signIn API initiates a new auth flow,\n // regardless of whether it is called for a user currently engaged in an active auto sign in session.\n resetAutoSignIn(false);\n const authFlowType = input.options?.authFlowType;\n await assertUserNotAuthenticated();\n switch (authFlowType) {\n case 'USER_SRP_AUTH':\n return signInWithSRP(input);\n case 'USER_PASSWORD_AUTH':\n return signInWithUserPassword(input);\n case 'CUSTOM_WITHOUT_SRP':\n return signInWithCustomAuth(input);\n case 'CUSTOM_WITH_SRP':\n return signInWithCustomSRPAuth(input);\n case 'USER_AUTH':\n return signInWithUserAuth(input);\n default:\n return signInWithSRP(input);\n }\n}\n","import { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { InitiateAuthException } from '../types/errors.mjs';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { USER_ALREADY_AUTHENTICATED_EXCEPTION } from '../../../errors/constants.mjs';\nimport { getCurrentUser } from '../apis/getCurrentUser.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createVerifySoftwareTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createVerifySoftwareTokenClient.mjs';\nimport { createAssociateSoftwareTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createAssociateSoftwareTokenClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { handleWebAuthnSignInResult } from '../../../client/flows/userAuth/handleWebAuthnSignInResult.mjs';\nimport { handlePasswordSRP } from '../../../client/flows/shared/handlePasswordSRP.mjs';\nimport { initiateSelectedChallenge } from '../../../client/flows/userAuth/handleSelectChallenge.mjs';\nimport { handleSelectChallengeWithPassword } from '../../../client/flows/userAuth/handleSelectChallengeWithPassword.mjs';\nimport { handleSelectChallengeWithPasswordSRP } from '../../../client/flows/userAuth/handleSelectChallengeWithPasswordSRP.mjs';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { signInStore } from '../../../client/utils/store/signInStore.mjs';\nimport { getAuthenticationHelper } from './srp/getAuthenticationHelper.mjs';\nimport './srp/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { getUserContextData } from './userContextData.mjs';\nimport { handlePasswordVerifierChallenge } from './handlePasswordVerifierChallenge.mjs';\nimport { handleDeviceSRPAuth } from './handleDeviceSRPAuth.mjs';\nimport { retryOnResourceNotFoundException } from './retryOnResourceNotFoundException.mjs';\nimport { setActiveSignInUsername } from './setActiveSignInUsername.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst USER_ATTRIBUTES = 'userAttributes.';\nfunction isWebAuthnResultAuthSignInOutput(result) {\n return 'isSignedIn' in result && 'nextStep' in result;\n}\nasync function handleCustomChallenge({ challengeResponse, clientMetadata, session, username, config, tokenOrchestrator, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n ANSWER: challengeResponse,\n };\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') {\n return handleDeviceSRPAuth({\n username,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n }\n return response;\n}\nasync function handleMFASetupChallenge({ challengeResponse, username, clientMetadata, session, deviceName, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n if (challengeResponse === 'EMAIL') {\n return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"EMAIL_OTP\"]',\n },\n $metadata: {},\n };\n }\n if (challengeResponse === 'TOTP') {\n return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"SOFTWARE_TOKEN_MFA\"]',\n },\n $metadata: {},\n };\n }\n const challengeResponses = {\n USERNAME: username,\n };\n const isTOTPCode = /^\\d+$/.test(challengeResponse);\n if (isTOTPCode) {\n const verifySoftwareToken = createVerifySoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session } = await verifySoftwareToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n UserCode: challengeResponse,\n Session: session,\n FriendlyDeviceName: deviceName,\n });\n signInStore.dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session,\n });\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n }\n const isEmail = challengeResponse.includes('@');\n if (isEmail) {\n challengeResponses.EMAIL = challengeResponse;\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n }\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `Cannot proceed with MFA setup using challengeResponse: ${challengeResponse}`,\n recoverySuggestion: 'Try passing \"EMAIL\", \"TOTP\", a valid email, or OTP code as the challengeResponse.',\n });\n}\nasync function handleSelectMFATypeChallenge({ challengeResponse, username, clientMetadata, session, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n assertValidationError(challengeResponse === 'TOTP' ||\n challengeResponse === 'SMS' ||\n challengeResponse === 'EMAIL', AuthValidationErrorCode.IncorrectMFAMethod);\n const challengeResponses = {\n USERNAME: username,\n ANSWER: mapMfaType(challengeResponse),\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\nasync function handleCompleteNewPasswordChallenge({ challengeResponse, clientMetadata, session, username, requiredAttributes, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n ...createAttributes(requiredAttributes),\n NEW_PASSWORD: challengeResponse,\n USERNAME: username,\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\nasync function handleUserPasswordAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId, userPoolId, userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n PASSWORD: password,\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ??\n response.ChallengeParameters?.USER_ID_FOR_SRP ??\n username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username: activeUsername,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nasync function handleUserSRPAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n return handlePasswordSRP({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_SRP_AUTH',\n });\n}\nasync function handleCustomAuthFlowWithoutSRP(username, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId, userPoolId, userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username: activeUsername,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nasync function handleCustomSRPAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n assertTokenProviderConfig(config);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n CHALLENGE_NAME: 'SRP_A',\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { ChallengeParameters: challengeParameters, Session: session } = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = challengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n}\nasync function getSignInResult(params) {\n const { challengeName, challengeParameters, availableChallenges } = params;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n switch (challengeName) {\n case 'CUSTOM_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE',\n additionalInfo: challengeParameters,\n },\n };\n case 'MFA_SETUP': {\n const { signInSession, username } = signInStore.getState();\n const mfaSetupTypes = getMFATypes(parseMFATypes(challengeParameters.MFAS_CAN_SETUP)) || [];\n const allowedMfaSetupTypes = getAllowedMfaSetupTypes(mfaSetupTypes);\n const isTotpMfaSetupAvailable = allowedMfaSetupTypes.includes('TOTP');\n const isEmailMfaSetupAvailable = allowedMfaSetupTypes.includes('EMAIL');\n if (isTotpMfaSetupAvailable && isEmailMfaSetupAvailable) {\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION',\n allowedMFATypes: allowedMfaSetupTypes,\n },\n };\n }\n if (isEmailMfaSetupAvailable) {\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_EMAIL_SETUP',\n },\n };\n }\n if (isTotpMfaSetupAvailable) {\n const associateSoftwareToken = createAssociateSoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { Session, SecretCode: secretCode } = await associateSoftwareToken({ region: getRegionFromUserPoolId(authConfig.userPoolId) }, {\n Session: signInSession,\n });\n signInStore.dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session,\n });\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP',\n totpSetupDetails: getTOTPSetupDetails(secretCode, username),\n },\n };\n }\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `Cannot initiate MFA setup from available types: ${mfaSetupTypes}`,\n });\n }\n case 'NEW_PASSWORD_REQUIRED':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED',\n missingAttributes: parseAttributes(challengeParameters.requiredAttributes),\n },\n };\n case 'SELECT_MFA_TYPE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION',\n allowedMFATypes: getMFATypes(parseMFATypes(challengeParameters.MFAS_CAN_CHOOSE)),\n },\n };\n case 'SMS_OTP':\n case 'SMS_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_SMS_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION,\n },\n },\n };\n case 'SOFTWARE_TOKEN_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_TOTP_CODE',\n },\n };\n case 'EMAIL_OTP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_EMAIL_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION,\n },\n },\n };\n case 'WEB_AUTHN': {\n const result = await handleWebAuthnSignInResult(challengeParameters);\n if (isWebAuthnResultAuthSignInOutput(result)) {\n return result;\n }\n return getSignInResult(result);\n }\n case 'PASSWORD':\n case 'PASSWORD_SRP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_PASSWORD',\n },\n };\n case 'SELECT_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION',\n availableChallenges,\n },\n };\n }\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'An error occurred during the sign in process. ' +\n `${challengeName} challengeName returned by the underlying service was not addressed.`,\n });\n}\nfunction getTOTPSetupDetails(secretCode, username) {\n return {\n sharedSecret: secretCode,\n getSetupUri: (appName, accountName) => {\n const totpUri = `otpauth://totp/${appName}:${accountName ?? username}?secret=${secretCode}&issuer=${appName}`;\n return new AmplifyUrl(totpUri);\n },\n };\n}\nfunction getSignInResultFromError(errorName) {\n if (errorName === InitiateAuthException.PasswordResetRequiredException) {\n return {\n isSignedIn: false,\n nextStep: { signInStep: 'RESET_PASSWORD' },\n };\n }\n else if (errorName === InitiateAuthException.UserNotConfirmedException) {\n return {\n isSignedIn: false,\n nextStep: { signInStep: 'CONFIRM_SIGN_UP' },\n };\n }\n}\nfunction parseAttributes(attributes) {\n if (!attributes)\n return [];\n const parsedAttributes = JSON.parse(attributes).map(att => att.includes(USER_ATTRIBUTES) ? att.replace(USER_ATTRIBUTES, '') : att);\n return parsedAttributes;\n}\nfunction createAttributes(attributes) {\n if (!attributes)\n return {};\n const newAttributes = {};\n Object.entries(attributes).forEach(([key, value]) => {\n if (value)\n newAttributes[`${USER_ATTRIBUTES}${key}`] = value;\n });\n return newAttributes;\n}\nasync function handleChallengeName(username, challengeName, session, challengeResponse, config, tokenOrchestrator, clientMetadata, options) {\n const userAttributes = options?.userAttributes;\n const deviceName = options?.friendlyDeviceName;\n switch (challengeName) {\n case 'WEB_AUTHN':\n case 'SELECT_CHALLENGE':\n if (challengeResponse === 'PASSWORD_SRP' ||\n challengeResponse === 'PASSWORD') {\n return {\n ChallengeName: challengeResponse,\n Session: session,\n $metadata: {},\n };\n }\n return initiateSelectedChallenge({\n username,\n session,\n selectedChallenge: challengeResponse,\n config,\n clientMetadata,\n });\n case 'SELECT_MFA_TYPE':\n return handleSelectMFATypeChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n });\n case 'MFA_SETUP':\n return handleMFASetupChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n deviceName,\n config,\n });\n case 'NEW_PASSWORD_REQUIRED':\n return handleCompleteNewPasswordChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n requiredAttributes: userAttributes,\n config,\n });\n case 'CUSTOM_CHALLENGE':\n return retryOnResourceNotFoundException(handleCustomChallenge, [\n {\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n tokenOrchestrator,\n },\n ], username, tokenOrchestrator);\n case 'SMS_MFA':\n case 'SOFTWARE_TOKEN_MFA':\n case 'SMS_OTP':\n case 'EMAIL_OTP':\n return handleMFAChallenge({\n challengeName,\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n });\n case 'PASSWORD':\n return handleSelectChallengeWithPassword(username, challengeResponse, clientMetadata, config, session);\n case 'PASSWORD_SRP':\n return handleSelectChallengeWithPasswordSRP(username, challengeResponse, // This is the actual password\n clientMetadata, config, session, tokenOrchestrator);\n }\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `An error occurred during the sign in process.\n\t\t${challengeName} challengeName returned by the underlying service was not addressed.`,\n });\n}\nfunction mapMfaType(mfa) {\n let mfaType = 'SMS_MFA';\n if (mfa === 'TOTP')\n mfaType = 'SOFTWARE_TOKEN_MFA';\n if (mfa === 'EMAIL')\n mfaType = 'EMAIL_OTP';\n return mfaType;\n}\nfunction getMFAType(type) {\n if (type === 'SMS_MFA')\n return 'SMS';\n if (type === 'SOFTWARE_TOKEN_MFA')\n return 'TOTP';\n if (type === 'EMAIL_OTP')\n return 'EMAIL';\n // TODO: log warning for unknown MFA type\n}\nfunction getMFATypes(types) {\n if (!types)\n return undefined;\n return types.map(getMFAType).filter(Boolean);\n}\nfunction parseMFATypes(mfa) {\n if (!mfa)\n return [];\n return JSON.parse(mfa);\n}\nfunction getAllowedMfaSetupTypes(availableMfaSetupTypes) {\n return availableMfaSetupTypes.filter(authMfaType => authMfaType === 'EMAIL' || authMfaType === 'TOTP');\n}\nasync function assertUserNotAuthenticated() {\n let authUser;\n try {\n authUser = await getCurrentUser();\n }\n catch (error) { }\n if (authUser && authUser.userId && authUser.username) {\n throw new AuthError({\n name: USER_ALREADY_AUTHENTICATED_EXCEPTION,\n message: 'There is already a signed in user.',\n recoverySuggestion: 'Call signOut before calling signIn again.',\n });\n }\n}\nfunction getActiveSignInUsername(username) {\n const state = signInStore.getState();\n return state.username ?? username;\n}\nasync function handleMFAChallenge({ challengeName, challengeResponse, clientMetadata, session, username, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n };\n if (challengeName === 'EMAIL_OTP') {\n challengeResponses.EMAIL_OTP_CODE = challengeResponse;\n }\n if (challengeName === 'SMS_MFA') {\n challengeResponses.SMS_MFA_CODE = challengeResponse;\n }\n if (challengeName === 'SMS_OTP') {\n challengeResponses.SMS_OTP_CODE = challengeResponse;\n }\n if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n challengeResponses.SOFTWARE_TOKEN_MFA_CODE = challengeResponse;\n }\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: challengeName,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: userContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\n\nexport { assertUserNotAuthenticated, createAttributes, getActiveSignInUsername, getAllowedMfaSetupTypes, getMFAType, getMFATypes, getSignInResult, getSignInResultFromError, getTOTPSetupDetails, handleChallengeName, handleCompleteNewPasswordChallenge, handleCustomAuthFlowWithoutSRP, handleCustomChallenge, handleCustomSRPAuthFlow, handleMFAChallenge, handleMFASetupChallenge, handleSelectMFATypeChallenge, handleUserPasswordAuthFlow, handleUserSRPAuthFlow, mapMfaType, parseAttributes, parseMFATypes };\n//# sourceMappingURL=signInHelpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AmplifyUrl, AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError';\nimport { InitiateAuthException } from '../types/errors';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { USER_ALREADY_AUTHENTICATED_EXCEPTION } from '../../../errors/constants';\nimport { getCurrentUser } from '../apis/getCurrentUser';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { createAssociateSoftwareTokenClient, createInitiateAuthClient, createRespondToAuthChallengeClient, createVerifySoftwareTokenClient, } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { handleWebAuthnSignInResult } from '../../../client/flows/userAuth/handleWebAuthnSignInResult';\nimport { handlePasswordSRP } from '../../../client/flows/shared/handlePasswordSRP';\nimport { initiateSelectedChallenge } from '../../../client/flows/userAuth/handleSelectChallenge';\nimport { handleSelectChallengeWithPassword } from '../../../client/flows/userAuth/handleSelectChallengeWithPassword';\nimport { handleSelectChallengeWithPasswordSRP } from '../../../client/flows/userAuth/handleSelectChallengeWithPasswordSRP';\nimport { signInStore } from '../../../client/utils/store';\nimport { getAuthenticationHelper } from './srp';\nimport { getUserContextData } from './userContextData';\nimport { handlePasswordVerifierChallenge } from './handlePasswordVerifierChallenge';\nimport { handleDeviceSRPAuth } from './handleDeviceSRPAuth';\nimport { retryOnResourceNotFoundException } from './retryOnResourceNotFoundException';\nimport { setActiveSignInUsername } from './setActiveSignInUsername';\nconst USER_ATTRIBUTES = 'userAttributes.';\nfunction isWebAuthnResultAuthSignInOutput(result) {\n return 'isSignedIn' in result && 'nextStep' in result;\n}\nexport async function handleCustomChallenge({ challengeResponse, clientMetadata, session, username, config, tokenOrchestrator, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n ANSWER: challengeResponse,\n };\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') {\n return handleDeviceSRPAuth({\n username,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n }\n return response;\n}\nexport async function handleMFASetupChallenge({ challengeResponse, username, clientMetadata, session, deviceName, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n if (challengeResponse === 'EMAIL') {\n return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"EMAIL_OTP\"]',\n },\n $metadata: {},\n };\n }\n if (challengeResponse === 'TOTP') {\n return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"SOFTWARE_TOKEN_MFA\"]',\n },\n $metadata: {},\n };\n }\n const challengeResponses = {\n USERNAME: username,\n };\n const isTOTPCode = /^\\d+$/.test(challengeResponse);\n if (isTOTPCode) {\n const verifySoftwareToken = createVerifySoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session } = await verifySoftwareToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n UserCode: challengeResponse,\n Session: session,\n FriendlyDeviceName: deviceName,\n });\n signInStore.dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session,\n });\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n }\n const isEmail = challengeResponse.includes('@');\n if (isEmail) {\n challengeResponses.EMAIL = challengeResponse;\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n }\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `Cannot proceed with MFA setup using challengeResponse: ${challengeResponse}`,\n recoverySuggestion: 'Try passing \"EMAIL\", \"TOTP\", a valid email, or OTP code as the challengeResponse.',\n });\n}\nexport async function handleSelectMFATypeChallenge({ challengeResponse, username, clientMetadata, session, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n assertValidationError(challengeResponse === 'TOTP' ||\n challengeResponse === 'SMS' ||\n challengeResponse === 'EMAIL', AuthValidationErrorCode.IncorrectMFAMethod);\n const challengeResponses = {\n USERNAME: username,\n ANSWER: mapMfaType(challengeResponse),\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\nexport async function handleCompleteNewPasswordChallenge({ challengeResponse, clientMetadata, session, username, requiredAttributes, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n ...createAttributes(requiredAttributes),\n NEW_PASSWORD: challengeResponse,\n USERNAME: username,\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\nexport async function handleUserPasswordAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId, userPoolId, userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n PASSWORD: password,\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ??\n response.ChallengeParameters?.USER_ID_FOR_SRP ??\n username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username: activeUsername,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nexport async function handleUserSRPAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n return handlePasswordSRP({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_SRP_AUTH',\n });\n}\nexport async function handleCustomAuthFlowWithoutSRP(username, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId, userPoolId, userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username: activeUsername,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nexport async function handleCustomSRPAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n assertTokenProviderConfig(config);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n CHALLENGE_NAME: 'SRP_A',\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { ChallengeParameters: challengeParameters, Session: session } = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = challengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n}\nexport async function getSignInResult(params) {\n const { challengeName, challengeParameters, availableChallenges } = params;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n switch (challengeName) {\n case 'CUSTOM_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE',\n additionalInfo: challengeParameters,\n },\n };\n case 'MFA_SETUP': {\n const { signInSession, username } = signInStore.getState();\n const mfaSetupTypes = getMFATypes(parseMFATypes(challengeParameters.MFAS_CAN_SETUP)) || [];\n const allowedMfaSetupTypes = getAllowedMfaSetupTypes(mfaSetupTypes);\n const isTotpMfaSetupAvailable = allowedMfaSetupTypes.includes('TOTP');\n const isEmailMfaSetupAvailable = allowedMfaSetupTypes.includes('EMAIL');\n if (isTotpMfaSetupAvailable && isEmailMfaSetupAvailable) {\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION',\n allowedMFATypes: allowedMfaSetupTypes,\n },\n };\n }\n if (isEmailMfaSetupAvailable) {\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_EMAIL_SETUP',\n },\n };\n }\n if (isTotpMfaSetupAvailable) {\n const associateSoftwareToken = createAssociateSoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { Session, SecretCode: secretCode } = await associateSoftwareToken({ region: getRegionFromUserPoolId(authConfig.userPoolId) }, {\n Session: signInSession,\n });\n signInStore.dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session,\n });\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP',\n totpSetupDetails: getTOTPSetupDetails(secretCode, username),\n },\n };\n }\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `Cannot initiate MFA setup from available types: ${mfaSetupTypes}`,\n });\n }\n case 'NEW_PASSWORD_REQUIRED':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED',\n missingAttributes: parseAttributes(challengeParameters.requiredAttributes),\n },\n };\n case 'SELECT_MFA_TYPE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION',\n allowedMFATypes: getMFATypes(parseMFATypes(challengeParameters.MFAS_CAN_CHOOSE)),\n },\n };\n case 'SMS_OTP':\n case 'SMS_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_SMS_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION,\n },\n },\n };\n case 'SOFTWARE_TOKEN_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_TOTP_CODE',\n },\n };\n case 'EMAIL_OTP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_EMAIL_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION,\n },\n },\n };\n case 'WEB_AUTHN': {\n const result = await handleWebAuthnSignInResult(challengeParameters);\n if (isWebAuthnResultAuthSignInOutput(result)) {\n return result;\n }\n return getSignInResult(result);\n }\n case 'PASSWORD':\n case 'PASSWORD_SRP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_PASSWORD',\n },\n };\n case 'SELECT_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION',\n availableChallenges,\n },\n };\n case 'ADMIN_NO_SRP_AUTH':\n break;\n case 'DEVICE_PASSWORD_VERIFIER':\n break;\n case 'DEVICE_SRP_AUTH':\n break;\n case 'PASSWORD_VERIFIER':\n break;\n }\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'An error occurred during the sign in process. ' +\n `${challengeName} challengeName returned by the underlying service was not addressed.`,\n });\n}\nexport function getTOTPSetupDetails(secretCode, username) {\n return {\n sharedSecret: secretCode,\n getSetupUri: (appName, accountName) => {\n const totpUri = `otpauth://totp/${appName}:${accountName ?? username}?secret=${secretCode}&issuer=${appName}`;\n return new AmplifyUrl(totpUri);\n },\n };\n}\nexport function getSignInResultFromError(errorName) {\n if (errorName === InitiateAuthException.PasswordResetRequiredException) {\n return {\n isSignedIn: false,\n nextStep: { signInStep: 'RESET_PASSWORD' },\n };\n }\n else if (errorName === InitiateAuthException.UserNotConfirmedException) {\n return {\n isSignedIn: false,\n nextStep: { signInStep: 'CONFIRM_SIGN_UP' },\n };\n }\n}\nexport function parseAttributes(attributes) {\n if (!attributes)\n return [];\n const parsedAttributes = JSON.parse(attributes).map(att => att.includes(USER_ATTRIBUTES) ? att.replace(USER_ATTRIBUTES, '') : att);\n return parsedAttributes;\n}\nexport function createAttributes(attributes) {\n if (!attributes)\n return {};\n const newAttributes = {};\n Object.entries(attributes).forEach(([key, value]) => {\n if (value)\n newAttributes[`${USER_ATTRIBUTES}${key}`] = value;\n });\n return newAttributes;\n}\nexport async function handleChallengeName(username, challengeName, session, challengeResponse, config, tokenOrchestrator, clientMetadata, options) {\n const userAttributes = options?.userAttributes;\n const deviceName = options?.friendlyDeviceName;\n switch (challengeName) {\n case 'WEB_AUTHN':\n case 'SELECT_CHALLENGE':\n if (challengeResponse === 'PASSWORD_SRP' ||\n challengeResponse === 'PASSWORD') {\n return {\n ChallengeName: challengeResponse,\n Session: session,\n $metadata: {},\n };\n }\n return initiateSelectedChallenge({\n username,\n session,\n selectedChallenge: challengeResponse,\n config,\n clientMetadata,\n });\n case 'SELECT_MFA_TYPE':\n return handleSelectMFATypeChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n });\n case 'MFA_SETUP':\n return handleMFASetupChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n deviceName,\n config,\n });\n case 'NEW_PASSWORD_REQUIRED':\n return handleCompleteNewPasswordChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n requiredAttributes: userAttributes,\n config,\n });\n case 'CUSTOM_CHALLENGE':\n return retryOnResourceNotFoundException(handleCustomChallenge, [\n {\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n tokenOrchestrator,\n },\n ], username, tokenOrchestrator);\n case 'SMS_MFA':\n case 'SOFTWARE_TOKEN_MFA':\n case 'SMS_OTP':\n case 'EMAIL_OTP':\n return handleMFAChallenge({\n challengeName,\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n });\n case 'PASSWORD':\n return handleSelectChallengeWithPassword(username, challengeResponse, clientMetadata, config, session);\n case 'PASSWORD_SRP':\n return handleSelectChallengeWithPasswordSRP(username, challengeResponse, // This is the actual password\n clientMetadata, config, session, tokenOrchestrator);\n }\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `An error occurred during the sign in process.\n\t\t${challengeName} challengeName returned by the underlying service was not addressed.`,\n });\n}\nexport function mapMfaType(mfa) {\n let mfaType = 'SMS_MFA';\n if (mfa === 'TOTP')\n mfaType = 'SOFTWARE_TOKEN_MFA';\n if (mfa === 'EMAIL')\n mfaType = 'EMAIL_OTP';\n return mfaType;\n}\nexport function getMFAType(type) {\n if (type === 'SMS_MFA')\n return 'SMS';\n if (type === 'SOFTWARE_TOKEN_MFA')\n return 'TOTP';\n if (type === 'EMAIL_OTP')\n return 'EMAIL';\n // TODO: log warning for unknown MFA type\n}\nexport function getMFATypes(types) {\n if (!types)\n return undefined;\n return types.map(getMFAType).filter(Boolean);\n}\nexport function parseMFATypes(mfa) {\n if (!mfa)\n return [];\n return JSON.parse(mfa);\n}\nexport function getAllowedMfaSetupTypes(availableMfaSetupTypes) {\n return availableMfaSetupTypes.filter(authMfaType => authMfaType === 'EMAIL' || authMfaType === 'TOTP');\n}\nexport async function assertUserNotAuthenticated() {\n let authUser;\n try {\n authUser = await getCurrentUser();\n }\n catch (error) { }\n if (authUser && authUser.userId && authUser.username) {\n throw new AuthError({\n name: USER_ALREADY_AUTHENTICATED_EXCEPTION,\n message: 'There is already a signed in user.',\n recoverySuggestion: 'Call signOut before calling signIn again.',\n });\n }\n}\nexport function getActiveSignInUsername(username) {\n const state = signInStore.getState();\n return state.username ?? username;\n}\nexport async function handleMFAChallenge({ challengeName, challengeResponse, clientMetadata, session, username, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n };\n if (challengeName === 'EMAIL_OTP') {\n challengeResponses.EMAIL_OTP_CODE = challengeResponse;\n }\n if (challengeName === 'SMS_MFA') {\n challengeResponses.SMS_MFA_CODE = challengeResponse;\n }\n if (challengeName === 'SMS_OTP') {\n challengeResponses.SMS_OTP_CODE = challengeResponse;\n }\n if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n challengeResponses.SOFTWARE_TOKEN_MFA_CODE = challengeResponse;\n }\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: challengeName,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: userContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AssociateSoftwareTokenException;\n(function (AssociateSoftwareTokenException) {\n AssociateSoftwareTokenException[\"ConcurrentModificationException\"] = \"ConcurrentModificationException\";\n AssociateSoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n AssociateSoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n AssociateSoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n AssociateSoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n AssociateSoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n AssociateSoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n})(AssociateSoftwareTokenException || (AssociateSoftwareTokenException = {}));\nvar ChangePasswordException;\n(function (ChangePasswordException) {\n ChangePasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ChangePasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ChangePasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ChangePasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ChangePasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ChangePasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ChangePasswordException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ChangePasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ChangePasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ChangePasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ChangePasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ChangePasswordException || (ChangePasswordException = {}));\nvar ConfirmDeviceException;\n(function (ConfirmDeviceException) {\n ConfirmDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmDeviceException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmDeviceException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ConfirmDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ConfirmDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmDeviceException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n ConfirmDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmDeviceException || (ConfirmDeviceException = {}));\nvar ConfirmForgotPasswordException;\n(function (ConfirmForgotPasswordException) {\n ConfirmForgotPasswordException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmForgotPasswordException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmForgotPasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmForgotPasswordException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmForgotPasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmForgotPasswordException || (ConfirmForgotPasswordException = {}));\nvar ConfirmSignUpException;\n(function (ConfirmSignUpException) {\n ConfirmSignUpException[\"AliasExistsException\"] = \"AliasExistsException\";\n ConfirmSignUpException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmSignUpException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmSignUpException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmSignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmSignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmSignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmSignUpException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmSignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmSignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmSignUpException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmSignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmSignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmSignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmSignUpException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmSignUpException || (ConfirmSignUpException = {}));\nvar DeleteUserAttributesException;\n(function (DeleteUserAttributesException) {\n DeleteUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(DeleteUserAttributesException || (DeleteUserAttributesException = {}));\nvar DeleteUserException;\n(function (DeleteUserException) {\n DeleteUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(DeleteUserException || (DeleteUserException = {}));\nvar ForgetDeviceException;\n(function (ForgetDeviceException) {\n ForgetDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgetDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgetDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgetDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ForgetDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgetDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ForgetDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgetDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgetDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ForgetDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ForgetDeviceException || (ForgetDeviceException = {}));\nvar ForgotPasswordException;\n(function (ForgotPasswordException) {\n ForgotPasswordException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgotPasswordException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgotPasswordException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ForgotPasswordException || (ForgotPasswordException = {}));\nvar GetUserException;\n(function (GetUserException) {\n GetUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(GetUserException || (GetUserException = {}));\nvar GetIdException;\n(function (GetIdException) {\n GetIdException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetIdException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetIdException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetIdException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetIdException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetIdException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetIdException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetIdException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(GetIdException || (GetIdException = {}));\nvar GetCredentialsForIdentityException;\n(function (GetCredentialsForIdentityException) {\n GetCredentialsForIdentityException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetCredentialsForIdentityException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetCredentialsForIdentityException[\"InvalidIdentityPoolConfigurationException\"] = \"InvalidIdentityPoolConfigurationException\";\n GetCredentialsForIdentityException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetCredentialsForIdentityException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetCredentialsForIdentityException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetCredentialsForIdentityException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetCredentialsForIdentityException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(GetCredentialsForIdentityException || (GetCredentialsForIdentityException = {}));\nvar GetUserAttributeVerificationException;\n(function (GetUserAttributeVerificationException) {\n GetUserAttributeVerificationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n GetUserAttributeVerificationException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserAttributeVerificationException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserAttributeVerificationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n GetUserAttributeVerificationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n GetUserAttributeVerificationException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetUserAttributeVerificationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserAttributeVerificationException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserAttributeVerificationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserAttributeVerificationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserAttributeVerificationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n GetUserAttributeVerificationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n GetUserAttributeVerificationException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserAttributeVerificationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(GetUserAttributeVerificationException || (GetUserAttributeVerificationException = {}));\nvar GlobalSignOutException;\n(function (GlobalSignOutException) {\n GlobalSignOutException[\"ForbiddenException\"] = \"ForbiddenException\";\n GlobalSignOutException[\"InternalErrorException\"] = \"InternalErrorException\";\n GlobalSignOutException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GlobalSignOutException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GlobalSignOutException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GlobalSignOutException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GlobalSignOutException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GlobalSignOutException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n})(GlobalSignOutException || (GlobalSignOutException = {}));\nvar InitiateAuthException;\n(function (InitiateAuthException) {\n InitiateAuthException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n InitiateAuthException[\"ForbiddenException\"] = \"ForbiddenException\";\n InitiateAuthException[\"InternalErrorException\"] = \"InternalErrorException\";\n InitiateAuthException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n InitiateAuthException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n InitiateAuthException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n InitiateAuthException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n InitiateAuthException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n InitiateAuthException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n InitiateAuthException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n InitiateAuthException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n InitiateAuthException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n InitiateAuthException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n InitiateAuthException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n InitiateAuthException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(InitiateAuthException || (InitiateAuthException = {}));\nvar ResendConfirmationException;\n(function (ResendConfirmationException) {\n ResendConfirmationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ResendConfirmationException[\"ForbiddenException\"] = \"ForbiddenException\";\n ResendConfirmationException[\"InternalErrorException\"] = \"InternalErrorException\";\n ResendConfirmationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ResendConfirmationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ResendConfirmationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ResendConfirmationException[\"LimitExceededException\"] = \"LimitExceededException\";\n ResendConfirmationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ResendConfirmationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ResendConfirmationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ResendConfirmationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ResendConfirmationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ResendConfirmationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ResendConfirmationException || (ResendConfirmationException = {}));\nvar RespondToAuthChallengeException;\n(function (RespondToAuthChallengeException) {\n RespondToAuthChallengeException[\"AliasExistsException\"] = \"AliasExistsException\";\n RespondToAuthChallengeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n RespondToAuthChallengeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n RespondToAuthChallengeException[\"ForbiddenException\"] = \"ForbiddenException\";\n RespondToAuthChallengeException[\"InternalErrorException\"] = \"InternalErrorException\";\n RespondToAuthChallengeException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n RespondToAuthChallengeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n RespondToAuthChallengeException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n RespondToAuthChallengeException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n RespondToAuthChallengeException[\"MFAMethodNotFoundException\"] = \"MFAMethodNotFoundException\";\n RespondToAuthChallengeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n RespondToAuthChallengeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n RespondToAuthChallengeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n RespondToAuthChallengeException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n RespondToAuthChallengeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n RespondToAuthChallengeException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n RespondToAuthChallengeException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n RespondToAuthChallengeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n RespondToAuthChallengeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(RespondToAuthChallengeException || (RespondToAuthChallengeException = {}));\nvar SetUserMFAPreferenceException;\n(function (SetUserMFAPreferenceException) {\n SetUserMFAPreferenceException[\"ForbiddenException\"] = \"ForbiddenException\";\n SetUserMFAPreferenceException[\"InternalErrorException\"] = \"InternalErrorException\";\n SetUserMFAPreferenceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SetUserMFAPreferenceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SetUserMFAPreferenceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n SetUserMFAPreferenceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SetUserMFAPreferenceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n SetUserMFAPreferenceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(SetUserMFAPreferenceException || (SetUserMFAPreferenceException = {}));\nvar SignUpException;\n(function (SignUpException) {\n SignUpException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n SignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n SignUpException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n SignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n SignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SignUpException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n SignUpException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n SignUpException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n SignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n SignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n SignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n SignUpException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n})(SignUpException || (SignUpException = {}));\nvar UpdateUserAttributesException;\n(function (UpdateUserAttributesException) {\n UpdateUserAttributesException[\"AliasExistsException\"] = \"AliasExistsException\";\n UpdateUserAttributesException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n UpdateUserAttributesException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n UpdateUserAttributesException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n UpdateUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateUserAttributesException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n UpdateUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateUserAttributesException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n UpdateUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateUserAttributesException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n UpdateUserAttributesException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n UpdateUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(UpdateUserAttributesException || (UpdateUserAttributesException = {}));\nvar VerifySoftwareTokenException;\n(function (VerifySoftwareTokenException) {\n VerifySoftwareTokenException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifySoftwareTokenException[\"EnableSoftwareTokenMFAException\"] = \"EnableSoftwareTokenMFAException\";\n VerifySoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifySoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifySoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifySoftwareTokenException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n VerifySoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifySoftwareTokenException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifySoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifySoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n VerifySoftwareTokenException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifySoftwareTokenException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifySoftwareTokenException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(VerifySoftwareTokenException || (VerifySoftwareTokenException = {}));\nvar VerifyUserAttributeException;\n(function (VerifyUserAttributeException) {\n VerifyUserAttributeException[\"AliasExistsException\"] = \"AliasExistsException\";\n VerifyUserAttributeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifyUserAttributeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n VerifyUserAttributeException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifyUserAttributeException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifyUserAttributeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifyUserAttributeException[\"LimitExceededException\"] = \"LimitExceededException\";\n VerifyUserAttributeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifyUserAttributeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifyUserAttributeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifyUserAttributeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifyUserAttributeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifyUserAttributeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(VerifyUserAttributeException || (VerifyUserAttributeException = {}));\nvar UpdateDeviceStatusException;\n(function (UpdateDeviceStatusException) {\n UpdateDeviceStatusException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateDeviceStatusException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateDeviceStatusException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateDeviceStatusException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n UpdateDeviceStatusException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateDeviceStatusException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateDeviceStatusException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateDeviceStatusException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateDeviceStatusException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateDeviceStatusException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(UpdateDeviceStatusException || (UpdateDeviceStatusException = {}));\nvar ListDevicesException;\n(function (ListDevicesException) {\n ListDevicesException[\"ForbiddenException\"] = \"ForbiddenException\";\n ListDevicesException[\"InternalErrorException\"] = \"InternalErrorException\";\n ListDevicesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ListDevicesException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ListDevicesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ListDevicesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ListDevicesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ListDevicesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ListDevicesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ListDevicesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ListDevicesException || (ListDevicesException = {}));\nconst SETUP_TOTP_EXCEPTION = 'SetUpTOTPException';\n\nexport { AssociateSoftwareTokenException, ChangePasswordException, ConfirmDeviceException, ConfirmForgotPasswordException, ConfirmSignUpException, DeleteUserAttributesException, DeleteUserException, ForgetDeviceException, ForgotPasswordException, GetCredentialsForIdentityException, GetIdException, GetUserAttributeVerificationException, GetUserException, GlobalSignOutException, InitiateAuthException, ListDevicesException, ResendConfirmationException, RespondToAuthChallengeException, SETUP_TOTP_EXCEPTION, SetUserMFAPreferenceException, SignUpException, UpdateDeviceStatusException, UpdateUserAttributesException, VerifySoftwareTokenException, VerifyUserAttributeException };\n//# sourceMappingURL=errors.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var AssociateSoftwareTokenException;\n(function (AssociateSoftwareTokenException) {\n AssociateSoftwareTokenException[\"ConcurrentModificationException\"] = \"ConcurrentModificationException\";\n AssociateSoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n AssociateSoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n AssociateSoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n AssociateSoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n AssociateSoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n AssociateSoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n})(AssociateSoftwareTokenException || (AssociateSoftwareTokenException = {}));\nexport var ChangePasswordException;\n(function (ChangePasswordException) {\n ChangePasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ChangePasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ChangePasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ChangePasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ChangePasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ChangePasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ChangePasswordException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ChangePasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ChangePasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ChangePasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ChangePasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ChangePasswordException || (ChangePasswordException = {}));\nexport var ConfirmDeviceException;\n(function (ConfirmDeviceException) {\n ConfirmDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmDeviceException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmDeviceException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ConfirmDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ConfirmDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmDeviceException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n ConfirmDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmDeviceException || (ConfirmDeviceException = {}));\nexport var ConfirmForgotPasswordException;\n(function (ConfirmForgotPasswordException) {\n ConfirmForgotPasswordException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmForgotPasswordException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmForgotPasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmForgotPasswordException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmForgotPasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmForgotPasswordException || (ConfirmForgotPasswordException = {}));\nexport var ConfirmSignUpException;\n(function (ConfirmSignUpException) {\n ConfirmSignUpException[\"AliasExistsException\"] = \"AliasExistsException\";\n ConfirmSignUpException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmSignUpException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmSignUpException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmSignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmSignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmSignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmSignUpException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmSignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmSignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmSignUpException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmSignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmSignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmSignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmSignUpException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmSignUpException || (ConfirmSignUpException = {}));\nexport var DeleteUserAttributesException;\n(function (DeleteUserAttributesException) {\n DeleteUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(DeleteUserAttributesException || (DeleteUserAttributesException = {}));\nexport var DeleteUserException;\n(function (DeleteUserException) {\n DeleteUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(DeleteUserException || (DeleteUserException = {}));\nexport var ForgetDeviceException;\n(function (ForgetDeviceException) {\n ForgetDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgetDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgetDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgetDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ForgetDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgetDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ForgetDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgetDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgetDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ForgetDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ForgetDeviceException || (ForgetDeviceException = {}));\nexport var ForgotPasswordException;\n(function (ForgotPasswordException) {\n ForgotPasswordException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgotPasswordException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgotPasswordException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ForgotPasswordException || (ForgotPasswordException = {}));\nexport var GetUserException;\n(function (GetUserException) {\n GetUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(GetUserException || (GetUserException = {}));\nexport var GetIdException;\n(function (GetIdException) {\n GetIdException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetIdException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetIdException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetIdException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetIdException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetIdException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetIdException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetIdException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(GetIdException || (GetIdException = {}));\nexport var GetCredentialsForIdentityException;\n(function (GetCredentialsForIdentityException) {\n GetCredentialsForIdentityException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetCredentialsForIdentityException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetCredentialsForIdentityException[\"InvalidIdentityPoolConfigurationException\"] = \"InvalidIdentityPoolConfigurationException\";\n GetCredentialsForIdentityException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetCredentialsForIdentityException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetCredentialsForIdentityException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetCredentialsForIdentityException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetCredentialsForIdentityException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(GetCredentialsForIdentityException || (GetCredentialsForIdentityException = {}));\nexport var GetUserAttributeVerificationException;\n(function (GetUserAttributeVerificationException) {\n GetUserAttributeVerificationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n GetUserAttributeVerificationException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserAttributeVerificationException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserAttributeVerificationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n GetUserAttributeVerificationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n GetUserAttributeVerificationException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetUserAttributeVerificationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserAttributeVerificationException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserAttributeVerificationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserAttributeVerificationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserAttributeVerificationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n GetUserAttributeVerificationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n GetUserAttributeVerificationException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserAttributeVerificationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(GetUserAttributeVerificationException || (GetUserAttributeVerificationException = {}));\nexport var GlobalSignOutException;\n(function (GlobalSignOutException) {\n GlobalSignOutException[\"ForbiddenException\"] = \"ForbiddenException\";\n GlobalSignOutException[\"InternalErrorException\"] = \"InternalErrorException\";\n GlobalSignOutException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GlobalSignOutException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GlobalSignOutException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GlobalSignOutException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GlobalSignOutException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GlobalSignOutException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n})(GlobalSignOutException || (GlobalSignOutException = {}));\nexport var InitiateAuthException;\n(function (InitiateAuthException) {\n InitiateAuthException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n InitiateAuthException[\"ForbiddenException\"] = \"ForbiddenException\";\n InitiateAuthException[\"InternalErrorException\"] = \"InternalErrorException\";\n InitiateAuthException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n InitiateAuthException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n InitiateAuthException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n InitiateAuthException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n InitiateAuthException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n InitiateAuthException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n InitiateAuthException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n InitiateAuthException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n InitiateAuthException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n InitiateAuthException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n InitiateAuthException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n InitiateAuthException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(InitiateAuthException || (InitiateAuthException = {}));\nexport var ResendConfirmationException;\n(function (ResendConfirmationException) {\n ResendConfirmationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ResendConfirmationException[\"ForbiddenException\"] = \"ForbiddenException\";\n ResendConfirmationException[\"InternalErrorException\"] = \"InternalErrorException\";\n ResendConfirmationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ResendConfirmationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ResendConfirmationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ResendConfirmationException[\"LimitExceededException\"] = \"LimitExceededException\";\n ResendConfirmationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ResendConfirmationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ResendConfirmationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ResendConfirmationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ResendConfirmationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ResendConfirmationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ResendConfirmationException || (ResendConfirmationException = {}));\nexport var RespondToAuthChallengeException;\n(function (RespondToAuthChallengeException) {\n RespondToAuthChallengeException[\"AliasExistsException\"] = \"AliasExistsException\";\n RespondToAuthChallengeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n RespondToAuthChallengeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n RespondToAuthChallengeException[\"ForbiddenException\"] = \"ForbiddenException\";\n RespondToAuthChallengeException[\"InternalErrorException\"] = \"InternalErrorException\";\n RespondToAuthChallengeException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n RespondToAuthChallengeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n RespondToAuthChallengeException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n RespondToAuthChallengeException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n RespondToAuthChallengeException[\"MFAMethodNotFoundException\"] = \"MFAMethodNotFoundException\";\n RespondToAuthChallengeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n RespondToAuthChallengeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n RespondToAuthChallengeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n RespondToAuthChallengeException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n RespondToAuthChallengeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n RespondToAuthChallengeException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n RespondToAuthChallengeException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n RespondToAuthChallengeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n RespondToAuthChallengeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(RespondToAuthChallengeException || (RespondToAuthChallengeException = {}));\nexport var SetUserMFAPreferenceException;\n(function (SetUserMFAPreferenceException) {\n SetUserMFAPreferenceException[\"ForbiddenException\"] = \"ForbiddenException\";\n SetUserMFAPreferenceException[\"InternalErrorException\"] = \"InternalErrorException\";\n SetUserMFAPreferenceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SetUserMFAPreferenceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SetUserMFAPreferenceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n SetUserMFAPreferenceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SetUserMFAPreferenceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n SetUserMFAPreferenceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(SetUserMFAPreferenceException || (SetUserMFAPreferenceException = {}));\nexport var SignUpException;\n(function (SignUpException) {\n SignUpException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n SignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n SignUpException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n SignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n SignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SignUpException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n SignUpException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n SignUpException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n SignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n SignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n SignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n SignUpException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n})(SignUpException || (SignUpException = {}));\nexport var UpdateUserAttributesException;\n(function (UpdateUserAttributesException) {\n UpdateUserAttributesException[\"AliasExistsException\"] = \"AliasExistsException\";\n UpdateUserAttributesException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n UpdateUserAttributesException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n UpdateUserAttributesException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n UpdateUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateUserAttributesException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n UpdateUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateUserAttributesException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n UpdateUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateUserAttributesException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n UpdateUserAttributesException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n UpdateUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(UpdateUserAttributesException || (UpdateUserAttributesException = {}));\nexport var VerifySoftwareTokenException;\n(function (VerifySoftwareTokenException) {\n VerifySoftwareTokenException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifySoftwareTokenException[\"EnableSoftwareTokenMFAException\"] = \"EnableSoftwareTokenMFAException\";\n VerifySoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifySoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifySoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifySoftwareTokenException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n VerifySoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifySoftwareTokenException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifySoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifySoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n VerifySoftwareTokenException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifySoftwareTokenException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifySoftwareTokenException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(VerifySoftwareTokenException || (VerifySoftwareTokenException = {}));\nexport var VerifyUserAttributeException;\n(function (VerifyUserAttributeException) {\n VerifyUserAttributeException[\"AliasExistsException\"] = \"AliasExistsException\";\n VerifyUserAttributeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifyUserAttributeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n VerifyUserAttributeException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifyUserAttributeException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifyUserAttributeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifyUserAttributeException[\"LimitExceededException\"] = \"LimitExceededException\";\n VerifyUserAttributeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifyUserAttributeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifyUserAttributeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifyUserAttributeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifyUserAttributeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifyUserAttributeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(VerifyUserAttributeException || (VerifyUserAttributeException = {}));\nexport var UpdateDeviceStatusException;\n(function (UpdateDeviceStatusException) {\n UpdateDeviceStatusException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateDeviceStatusException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateDeviceStatusException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateDeviceStatusException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n UpdateDeviceStatusException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateDeviceStatusException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateDeviceStatusException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateDeviceStatusException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateDeviceStatusException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateDeviceStatusException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(UpdateDeviceStatusException || (UpdateDeviceStatusException = {}));\nexport var ListDevicesException;\n(function (ListDevicesException) {\n ListDevicesException[\"ForbiddenException\"] = \"ForbiddenException\";\n ListDevicesException[\"InternalErrorException\"] = \"InternalErrorException\";\n ListDevicesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ListDevicesException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ListDevicesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ListDevicesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ListDevicesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ListDevicesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ListDevicesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ListDevicesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ListDevicesException || (ListDevicesException = {}));\nexport const SETUP_TOTP_EXCEPTION = 'SetUpTOTPException';\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createRespondToAuthChallengeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('RespondToAuthChallenge'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createRespondToAuthChallengeClient };\n//# sourceMappingURL=createRespondToAuthChallengeClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createRespondToAuthChallengeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('RespondToAuthChallenge'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createVerifySoftwareTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('VerifySoftwareToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createVerifySoftwareTokenClient };\n//# sourceMappingURL=createVerifySoftwareTokenClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createVerifySoftwareTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('VerifySoftwareToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createAssociateSoftwareTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('AssociateSoftwareToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createAssociateSoftwareTokenClient };\n//# sourceMappingURL=createAssociateSoftwareTokenClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createAssociateSoftwareTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('AssociateSoftwareToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { cacheCognitoTokens } from '../../../providers/cognito/tokenProvider/cacheTokens.mjs';\nimport { dispatchSignedInHubEvent } from '../../../providers/cognito/utils/dispatchSignedInHubEvent.mjs';\nimport '../../utils/store/autoSignInStore.mjs';\nimport { signInStore, setActiveSignInState } from '../../utils/store/signInStore.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { assertPasskeyError, PasskeyErrorCode } from '../../utils/passkey/errors.mjs';\nimport { getPasskey } from '../../utils/passkey/getPasskey.mjs';\nimport { getNewDeviceMetadata } from '../../../providers/cognito/utils/getNewDeviceMetadata.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function handleWebAuthnSignInResult(challengeParameters) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { username, signInSession, signInDetails, challengeName } = signInStore.getState();\n if (challengeName !== 'WEB_AUTHN' || !username) {\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'Unable to proceed due to invalid sign in state.',\n });\n }\n const { CREDENTIAL_REQUEST_OPTIONS: credentialRequestOptions } = challengeParameters;\n assertPasskeyError(!!credentialRequestOptions, PasskeyErrorCode.InvalidPasskeyAuthenticationOptions);\n const cred = await getPasskey(JSON.parse(credentialRequestOptions));\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { ChallengeName: nextChallengeName, ChallengeParameters: nextChallengeParameters, AuthenticationResult: authenticationResult, Session: nextSession, } = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'WEB_AUTHN',\n ChallengeResponses: {\n USERNAME: username,\n CREDENTIAL: JSON.stringify(cred),\n },\n ClientId: authConfig.userPoolClientId,\n Session: signInSession,\n });\n setActiveSignInState({\n signInSession: nextSession,\n username,\n challengeName: nextChallengeName,\n signInDetails,\n });\n if (authenticationResult) {\n await cacheCognitoTokens({\n ...authenticationResult,\n username,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: authenticationResult.NewDeviceMetadata,\n accessToken: authenticationResult.AccessToken,\n }),\n signInDetails,\n });\n signInStore.dispatch({ type: 'RESET_STATE' });\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n if (nextChallengeName === 'WEB_AUTHN') {\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'Sequential WEB_AUTHN challenges returned from underlying service cannot be handled.',\n });\n }\n return {\n challengeName: nextChallengeName,\n challengeParameters: nextChallengeParameters,\n };\n}\n\nexport { handleWebAuthnSignInResult };\n//# sourceMappingURL=handleWebAuthnSignInResult.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories';\nimport { cacheCognitoTokens } from '../../../providers/cognito/tokenProvider/cacheTokens';\nimport { dispatchSignedInHubEvent } from '../../../providers/cognito/utils/dispatchSignedInHubEvent';\nimport { setActiveSignInState, signInStore } from '../../../client/utils/store';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getPasskey } from '../../utils/passkey';\nimport { PasskeyErrorCode, assertPasskeyError, } from '../../utils/passkey/errors';\nimport { AuthError } from '../../../errors/AuthError';\nimport { getNewDeviceMetadata } from '../../../providers/cognito/utils/getNewDeviceMetadata';\nexport async function handleWebAuthnSignInResult(challengeParameters) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { username, signInSession, signInDetails, challengeName } = signInStore.getState();\n if (challengeName !== 'WEB_AUTHN' || !username) {\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'Unable to proceed due to invalid sign in state.',\n });\n }\n const { CREDENTIAL_REQUEST_OPTIONS: credentialRequestOptions } = challengeParameters;\n assertPasskeyError(!!credentialRequestOptions, PasskeyErrorCode.InvalidPasskeyAuthenticationOptions);\n const cred = await getPasskey(JSON.parse(credentialRequestOptions));\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { ChallengeName: nextChallengeName, ChallengeParameters: nextChallengeParameters, AuthenticationResult: authenticationResult, Session: nextSession, } = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'WEB_AUTHN',\n ChallengeResponses: {\n USERNAME: username,\n CREDENTIAL: JSON.stringify(cred),\n },\n ClientId: authConfig.userPoolClientId,\n Session: signInSession,\n });\n setActiveSignInState({\n signInSession: nextSession,\n username,\n challengeName: nextChallengeName,\n signInDetails,\n });\n if (authenticationResult) {\n await cacheCognitoTokens({\n ...authenticationResult,\n username,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: authenticationResult.NewDeviceMetadata,\n accessToken: authenticationResult.AccessToken,\n }),\n signInDetails,\n });\n signInStore.dispatch({ type: 'RESET_STATE' });\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n if (nextChallengeName === 'WEB_AUTHN') {\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'Sequential WEB_AUTHN challenges returned from underlying service cannot be handled.',\n });\n }\n return {\n challengeName: nextChallengeName,\n challengeParameters: nextChallengeParameters,\n };\n}\n","import { decodeJWT, AmplifyError } from '@aws-amplify/core/internals/utils';\nimport { tokenOrchestrator } from './tokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function cacheCognitoTokens(AuthenticationResult) {\n if (AuthenticationResult.AccessToken) {\n const accessToken = decodeJWT(AuthenticationResult.AccessToken);\n const accessTokenIssuedAtInMillis = (accessToken.payload.iat || 0) * 1000;\n const currentTime = new Date().getTime();\n const clockDrift = accessTokenIssuedAtInMillis > 0\n ? accessTokenIssuedAtInMillis - currentTime\n : 0;\n let idToken;\n let refreshToken;\n let deviceMetadata;\n if (AuthenticationResult.RefreshToken) {\n refreshToken = AuthenticationResult.RefreshToken;\n }\n if (AuthenticationResult.IdToken) {\n idToken = decodeJWT(AuthenticationResult.IdToken);\n }\n if (AuthenticationResult?.NewDeviceMetadata) {\n deviceMetadata = AuthenticationResult.NewDeviceMetadata;\n }\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n clockDrift,\n deviceMetadata,\n username: AuthenticationResult.username,\n };\n if (AuthenticationResult?.signInDetails) {\n tokens.signInDetails = AuthenticationResult.signInDetails;\n }\n await tokenOrchestrator.setTokens({\n tokens,\n });\n }\n else {\n // This would be a service error\n throw new AmplifyError({\n message: 'Invalid tokens',\n name: 'InvalidTokens',\n recoverySuggestion: 'Check Cognito UserPool settings',\n });\n }\n}\n\nexport { cacheCognitoTokens };\n//# sourceMappingURL=cacheTokens.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError, decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { tokenOrchestrator } from './tokenProvider';\nexport async function cacheCognitoTokens(AuthenticationResult) {\n if (AuthenticationResult.AccessToken) {\n const accessToken = decodeJWT(AuthenticationResult.AccessToken);\n const accessTokenIssuedAtInMillis = (accessToken.payload.iat || 0) * 1000;\n const currentTime = new Date().getTime();\n const clockDrift = accessTokenIssuedAtInMillis > 0\n ? accessTokenIssuedAtInMillis - currentTime\n : 0;\n let idToken;\n let refreshToken;\n let deviceMetadata;\n if (AuthenticationResult.RefreshToken) {\n refreshToken = AuthenticationResult.RefreshToken;\n }\n if (AuthenticationResult.IdToken) {\n idToken = decodeJWT(AuthenticationResult.IdToken);\n }\n if (AuthenticationResult?.NewDeviceMetadata) {\n deviceMetadata = AuthenticationResult.NewDeviceMetadata;\n }\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n clockDrift,\n deviceMetadata,\n username: AuthenticationResult.username,\n };\n if (AuthenticationResult?.signInDetails) {\n tokens.signInDetails = AuthenticationResult.signInDetails;\n }\n await tokenOrchestrator.setTokens({\n tokens,\n });\n }\n else {\n // This would be a service error\n throw new AmplifyError({\n message: 'Invalid tokens',\n name: 'InvalidTokens',\n recoverySuggestion: 'Check Cognito UserPool settings',\n });\n }\n}\n","import { Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { getCurrentUser } from '../apis/getCurrentUser.mjs';\nimport { USER_UNAUTHENTICATED_EXCEPTION, UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION } from '../../../errors/constants.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ERROR_MESSAGE = 'Unable to get user session following successful sign-in.';\nconst dispatchSignedInHubEvent = async () => {\n try {\n Hub.dispatch('auth', {\n event: 'signedIn',\n data: await getCurrentUser(),\n }, 'Auth', AMPLIFY_SYMBOL);\n }\n catch (error) {\n if (error.name === USER_UNAUTHENTICATED_EXCEPTION) {\n throw new AuthError({\n name: UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION,\n message: ERROR_MESSAGE,\n 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.',\n });\n }\n throw error;\n }\n};\n\nexport { ERROR_MESSAGE, dispatchSignedInHubEvent };\n//# sourceMappingURL=dispatchSignedInHubEvent.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { getCurrentUser } from '../apis/getCurrentUser';\nimport { UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, } from '../../../errors/constants';\nimport { AuthError } from '../../../errors/AuthError';\nexport const ERROR_MESSAGE = 'Unable to get user session following successful sign-in.';\nexport const dispatchSignedInHubEvent = async () => {\n try {\n Hub.dispatch('auth', {\n event: 'signedIn',\n data: await getCurrentUser(),\n }, 'Auth', AMPLIFY_SYMBOL);\n }\n catch (error) {\n if (error.name === USER_UNAUTHENTICATED_EXCEPTION) {\n throw new AuthError({\n name: UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION,\n message: ERROR_MESSAGE,\n 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.',\n });\n }\n throw error;\n }\n};\n","import { syncSessionStorage } from '@aws-amplify/core';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Minutes until stored session invalidates is defaulted to 3 minutes\n// to maintain parity with Amazon Cognito user pools API behavior\nconst MS_TO_EXPIRY = 3 * 60 * 1000;\nconst TGT_STATE = 'CognitoSignInState';\nconst SIGN_IN_STATE_KEYS = {\n username: `${TGT_STATE}.username`,\n challengeName: `${TGT_STATE}.challengeName`,\n signInSession: `${TGT_STATE}.signInSession`,\n expiry: `${TGT_STATE}.expiry`,\n};\nconst signInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_SIGN_IN_SESSION':\n persistSignInState({ signInSession: action.value });\n return {\n ...state,\n signInSession: action.value,\n };\n case 'SET_SIGN_IN_STATE':\n persistSignInState(action.value);\n return {\n ...action.value,\n };\n case 'SET_CHALLENGE_NAME':\n persistSignInState({ challengeName: action.value });\n return {\n ...state,\n challengeName: action.value,\n };\n case 'SET_USERNAME':\n persistSignInState({ username: action.value });\n return {\n ...state,\n username: action.value,\n };\n case 'SET_INITIAL_STATE':\n return getInitialState();\n case 'RESET_STATE':\n clearPersistedSignInState();\n return getDefaultState();\n // this state is never reachable\n default:\n return state;\n }\n};\nconst isExpired = (expiryDate) => {\n const expiryTimestamp = Number(expiryDate);\n const currentTimestamp = Date.now();\n return expiryTimestamp <= currentTimestamp;\n};\nconst resetActiveSignInState = () => {\n signInStore.dispatch({ type: 'RESET_STATE' });\n};\nconst clearPersistedSignInState = () => {\n for (const stateKey of Object.values(SIGN_IN_STATE_KEYS)) {\n syncSessionStorage.removeItem(stateKey);\n }\n};\nconst getDefaultState = () => ({\n username: undefined,\n challengeName: undefined,\n signInSession: undefined,\n});\n// Hydrate signInStore from syncSessionStorage if the session has not expired\nconst getInitialState = () => {\n const expiry = syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.expiry);\n if (!expiry || isExpired(expiry)) {\n clearPersistedSignInState();\n return getDefaultState();\n }\n const username = syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.username) ?? undefined;\n const challengeName = (syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.challengeName) ?? undefined);\n const signInSession = syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.signInSession) ?? undefined;\n return {\n username,\n challengeName,\n signInSession,\n };\n};\nconst createStore = reducer => {\n let currentState = reducer(getDefaultState(), { type: 'SET_INITIAL_STATE' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nconst signInStore = createStore(signInReducer);\nfunction setActiveSignInState(state) {\n signInStore.dispatch({\n type: 'SET_SIGN_IN_STATE',\n value: state,\n });\n}\n// Save local state into Session Storage\nconst persistSignInState = ({ challengeName, signInSession, username, }) => {\n username && syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.username, username);\n challengeName &&\n syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.challengeName, challengeName);\n if (signInSession) {\n syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.signInSession, signInSession);\n // Updates expiry when session is passed\n syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.expiry, String(Date.now() + MS_TO_EXPIRY));\n }\n};\n\nexport { persistSignInState, resetActiveSignInState, setActiveSignInState, signInStore };\n//# sourceMappingURL=signInStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { syncSessionStorage } from '@aws-amplify/core';\n// Minutes until stored session invalidates is defaulted to 3 minutes\n// to maintain parity with Amazon Cognito user pools API behavior\nconst MS_TO_EXPIRY = 3 * 60 * 1000;\nconst TGT_STATE = 'CognitoSignInState';\nconst SIGN_IN_STATE_KEYS = {\n username: `${TGT_STATE}.username`,\n challengeName: `${TGT_STATE}.challengeName`,\n signInSession: `${TGT_STATE}.signInSession`,\n expiry: `${TGT_STATE}.expiry`,\n};\nconst signInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_SIGN_IN_SESSION':\n persistSignInState({ signInSession: action.value });\n return {\n ...state,\n signInSession: action.value,\n };\n case 'SET_SIGN_IN_STATE':\n persistSignInState(action.value);\n return {\n ...action.value,\n };\n case 'SET_CHALLENGE_NAME':\n persistSignInState({ challengeName: action.value });\n return {\n ...state,\n challengeName: action.value,\n };\n case 'SET_USERNAME':\n persistSignInState({ username: action.value });\n return {\n ...state,\n username: action.value,\n };\n case 'SET_INITIAL_STATE':\n return getInitialState();\n case 'RESET_STATE':\n clearPersistedSignInState();\n return getDefaultState();\n // this state is never reachable\n default:\n return state;\n }\n};\nconst isExpired = (expiryDate) => {\n const expiryTimestamp = Number(expiryDate);\n const currentTimestamp = Date.now();\n return expiryTimestamp <= currentTimestamp;\n};\nexport const resetActiveSignInState = () => {\n signInStore.dispatch({ type: 'RESET_STATE' });\n};\nconst clearPersistedSignInState = () => {\n for (const stateKey of Object.values(SIGN_IN_STATE_KEYS)) {\n syncSessionStorage.removeItem(stateKey);\n }\n};\nconst getDefaultState = () => ({\n username: undefined,\n challengeName: undefined,\n signInSession: undefined,\n});\n// Hydrate signInStore from syncSessionStorage if the session has not expired\nconst getInitialState = () => {\n const expiry = syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.expiry);\n if (!expiry || isExpired(expiry)) {\n clearPersistedSignInState();\n return getDefaultState();\n }\n const username = syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.username) ?? undefined;\n const challengeName = (syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.challengeName) ?? undefined);\n const signInSession = syncSessionStorage.getItem(SIGN_IN_STATE_KEYS.signInSession) ?? undefined;\n return {\n username,\n challengeName,\n signInSession,\n };\n};\nconst createStore = reducer => {\n let currentState = reducer(getDefaultState(), { type: 'SET_INITIAL_STATE' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nexport const signInStore = createStore(signInReducer);\nexport function setActiveSignInState(state) {\n signInStore.dispatch({\n type: 'SET_SIGN_IN_STATE',\n value: state,\n });\n}\n// Save local state into Session Storage\nexport const persistSignInState = ({ challengeName, signInSession, username, }) => {\n username && syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.username, username);\n challengeName &&\n syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.challengeName, challengeName);\n if (signInSession) {\n syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.signInSession, signInSession);\n // Updates expiry when session is passed\n syncSessionStorage.setItem(SIGN_IN_STATE_KEYS.expiry, String(Date.now() + MS_TO_EXPIRY));\n }\n};\n","import { createAssertionFunction, AmplifyError, AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass PasskeyError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PasskeyError;\n Object.setPrototypeOf(this, PasskeyError.prototype);\n }\n}\nvar PasskeyErrorCode;\n(function (PasskeyErrorCode) {\n // not supported\n PasskeyErrorCode[\"PasskeyNotSupported\"] = \"PasskeyNotSupported\";\n // duplicate passkey\n PasskeyErrorCode[\"PasskeyAlreadyExists\"] = \"PasskeyAlreadyExists\";\n // misconfigurations\n PasskeyErrorCode[\"InvalidPasskeyRegistrationOptions\"] = \"InvalidPasskeyRegistrationOptions\";\n PasskeyErrorCode[\"InvalidPasskeyAuthenticationOptions\"] = \"InvalidPasskeyAuthenticationOptions\";\n PasskeyErrorCode[\"RelyingPartyMismatch\"] = \"RelyingPartyMismatch\";\n // failed credential creation / retrieval\n PasskeyErrorCode[\"PasskeyRegistrationFailed\"] = \"PasskeyRegistrationFailed\";\n PasskeyErrorCode[\"PasskeyRetrievalFailed\"] = \"PasskeyRetrievalFailed\";\n // cancel / aborts\n PasskeyErrorCode[\"PasskeyRegistrationCanceled\"] = \"PasskeyRegistrationCanceled\";\n PasskeyErrorCode[\"PasskeyAuthenticationCanceled\"] = \"PasskeyAuthenticationCanceled\";\n PasskeyErrorCode[\"PasskeyOperationAborted\"] = \"PasskeyOperationAborted\";\n})(PasskeyErrorCode || (PasskeyErrorCode = {}));\nconst notSupportedRecoverySuggestion = 'Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.';\nconst abortOrCancelRecoverySuggestion = 'User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.';\nconst misconfigurationRecoverySuggestion = 'Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.';\nconst passkeyErrorMap = {\n [PasskeyErrorCode.PasskeyNotSupported]: {\n message: 'Passkeys may not be supported on this device.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyRegistrationOptions]: {\n message: 'Invalid passkey registration options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyAuthenticationOptions]: {\n message: 'Invalid passkey authentication options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRegistrationFailed]: {\n message: 'Device failed to create passkey.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRetrievalFailed]: {\n message: 'Device failed to retrieve passkey.',\n recoverySuggestion: 'Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP.',\n },\n [PasskeyErrorCode.PasskeyAlreadyExists]: {\n message: 'Passkey already exists in authenticator.',\n recoverySuggestion: 'Proceed with existing passkey or try again after deleting the credential.',\n },\n [PasskeyErrorCode.PasskeyRegistrationCanceled]: {\n message: 'Passkey registration ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyAuthenticationCanceled]: {\n message: 'Passkey authentication ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyOperationAborted]: {\n message: 'Passkey operation has been aborted.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.RelyingPartyMismatch]: {\n message: 'Relying party does not match current domain.',\n recoverySuggestion: 'Ensure relying party identifier matches current domain.',\n },\n};\nconst assertPasskeyError = createAssertionFunction(passkeyErrorMap, PasskeyError);\n/**\n * Handle Passkey Authentication Errors\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyAuthenticationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAuthenticationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAuthenticationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\n/**\n * Handle Passkey Registration Errors\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyRegistrationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n // Duplicate Passkey\n if (err.name === 'InvalidStateError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAlreadyExists];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAlreadyExists,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // User Cancels Ceremony / Generic Catch All\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyRegistrationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyRegistrationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\n/**\n * Handles Overlapping Passkey Errors Between Registration & Authentication\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyError = (err) => {\n if (err instanceof Error) {\n // Passkey Operation Aborted\n if (err.name === 'AbortError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyOperationAborted];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyOperationAborted,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // Relying Party / Domain Mismatch\n if (err.name === 'SecurityError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.RelyingPartyMismatch];\n return new PasskeyError({\n name: PasskeyErrorCode.RelyingPartyMismatch,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return new PasskeyError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: err,\n });\n};\n\nexport { PasskeyError, PasskeyErrorCode, assertPasskeyError, handlePasskeyAuthenticationError, handlePasskeyRegistrationError };\n//# sourceMappingURL=errors.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError, AmplifyErrorCode, createAssertionFunction, } from '@aws-amplify/core/internals/utils';\nexport class PasskeyError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PasskeyError;\n Object.setPrototypeOf(this, PasskeyError.prototype);\n }\n}\nexport var PasskeyErrorCode;\n(function (PasskeyErrorCode) {\n // not supported\n PasskeyErrorCode[\"PasskeyNotSupported\"] = \"PasskeyNotSupported\";\n // duplicate passkey\n PasskeyErrorCode[\"PasskeyAlreadyExists\"] = \"PasskeyAlreadyExists\";\n // misconfigurations\n PasskeyErrorCode[\"InvalidPasskeyRegistrationOptions\"] = \"InvalidPasskeyRegistrationOptions\";\n PasskeyErrorCode[\"InvalidPasskeyAuthenticationOptions\"] = \"InvalidPasskeyAuthenticationOptions\";\n PasskeyErrorCode[\"RelyingPartyMismatch\"] = \"RelyingPartyMismatch\";\n // failed credential creation / retrieval\n PasskeyErrorCode[\"PasskeyRegistrationFailed\"] = \"PasskeyRegistrationFailed\";\n PasskeyErrorCode[\"PasskeyRetrievalFailed\"] = \"PasskeyRetrievalFailed\";\n // cancel / aborts\n PasskeyErrorCode[\"PasskeyRegistrationCanceled\"] = \"PasskeyRegistrationCanceled\";\n PasskeyErrorCode[\"PasskeyAuthenticationCanceled\"] = \"PasskeyAuthenticationCanceled\";\n PasskeyErrorCode[\"PasskeyOperationAborted\"] = \"PasskeyOperationAborted\";\n})(PasskeyErrorCode || (PasskeyErrorCode = {}));\nconst notSupportedRecoverySuggestion = 'Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.';\nconst abortOrCancelRecoverySuggestion = 'User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.';\nconst misconfigurationRecoverySuggestion = 'Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.';\nconst passkeyErrorMap = {\n [PasskeyErrorCode.PasskeyNotSupported]: {\n message: 'Passkeys may not be supported on this device.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyRegistrationOptions]: {\n message: 'Invalid passkey registration options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyAuthenticationOptions]: {\n message: 'Invalid passkey authentication options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRegistrationFailed]: {\n message: 'Device failed to create passkey.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRetrievalFailed]: {\n message: 'Device failed to retrieve passkey.',\n recoverySuggestion: 'Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP.',\n },\n [PasskeyErrorCode.PasskeyAlreadyExists]: {\n message: 'Passkey already exists in authenticator.',\n recoverySuggestion: 'Proceed with existing passkey or try again after deleting the credential.',\n },\n [PasskeyErrorCode.PasskeyRegistrationCanceled]: {\n message: 'Passkey registration ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyAuthenticationCanceled]: {\n message: 'Passkey authentication ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyOperationAborted]: {\n message: 'Passkey operation has been aborted.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.RelyingPartyMismatch]: {\n message: 'Relying party does not match current domain.',\n recoverySuggestion: 'Ensure relying party identifier matches current domain.',\n },\n};\nexport const assertPasskeyError = createAssertionFunction(passkeyErrorMap, PasskeyError);\n/**\n * Handle Passkey Authentication Errors\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nexport const handlePasskeyAuthenticationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAuthenticationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAuthenticationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\n/**\n * Handle Passkey Registration Errors\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nexport const handlePasskeyRegistrationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n // Duplicate Passkey\n if (err.name === 'InvalidStateError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAlreadyExists];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAlreadyExists,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // User Cancels Ceremony / Generic Catch All\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyRegistrationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyRegistrationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\n/**\n * Handles Overlapping Passkey Errors Between Registration & Authentication\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyError = (err) => {\n if (err instanceof Error) {\n // Passkey Operation Aborted\n if (err.name === 'AbortError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyOperationAborted];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyOperationAborted,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // Relying Party / Domain Mismatch\n if (err.name === 'SecurityError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.RelyingPartyMismatch];\n return new PasskeyError({\n name: PasskeyErrorCode.RelyingPartyMismatch,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return new PasskeyError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: err,\n });\n};\n","import { assertPasskeyError, PasskeyErrorCode, handlePasskeyAuthenticationError } from './errors.mjs';\nimport { getIsPasskeySupported } from './getIsPasskeySupported.mjs';\nimport { deserializeJsonToPkcGetOptions, serializePkcWithAssertionToJson } from './serde.mjs';\nimport { assertCredentialIsPkcWithAuthenticatorAssertionResponse } from './types/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getPasskey = async (input) => {\n try {\n const isPasskeySupported = getIsPasskeySupported();\n assertPasskeyError(isPasskeySupported, PasskeyErrorCode.PasskeyNotSupported);\n const passkeyGetOptions = deserializeJsonToPkcGetOptions(input);\n const credential = await navigator.credentials.get({\n publicKey: passkeyGetOptions,\n });\n assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential);\n return serializePkcWithAssertionToJson(credential);\n }\n catch (err) {\n throw handlePasskeyAuthenticationError(err);\n }\n};\n\nexport { getPasskey };\n//# sourceMappingURL=getPasskey.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PasskeyErrorCode, assertPasskeyError, handlePasskeyAuthenticationError, } from './errors';\nimport { getIsPasskeySupported } from './getIsPasskeySupported';\nimport { deserializeJsonToPkcGetOptions, serializePkcWithAssertionToJson, } from './serde';\nimport { assertCredentialIsPkcWithAuthenticatorAssertionResponse, } from './types';\nexport const getPasskey = async (input) => {\n try {\n const isPasskeySupported = getIsPasskeySupported();\n assertPasskeyError(isPasskeySupported, PasskeyErrorCode.PasskeyNotSupported);\n const passkeyGetOptions = deserializeJsonToPkcGetOptions(input);\n const credential = await navigator.credentials.get({\n publicKey: passkeyGetOptions,\n });\n assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential);\n return serializePkcWithAssertionToJson(credential);\n }\n catch (err) {\n throw handlePasskeyAuthenticationError(err);\n }\n};\n","import { isBrowser } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Determines if passkey is supported in current context\n * Will return false if executed in non-secure context\n * @returns boolean\n */\nconst getIsPasskeySupported = () => {\n return (isBrowser() &&\n window.isSecureContext &&\n 'credentials' in navigator &&\n typeof window.PublicKeyCredential === 'function');\n};\n\nexport { getIsPasskeySupported };\n//# sourceMappingURL=getIsPasskeySupported.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isBrowser } from '@aws-amplify/core/internals/utils';\n/**\n * Determines if passkey is supported in current context\n * Will return false if executed in non-secure context\n * @returns boolean\n */\nexport const getIsPasskeySupported = () => {\n return (isBrowser() &&\n window.isSecureContext &&\n 'credentials' in navigator &&\n typeof window.PublicKeyCredential === 'function');\n};\n","import { convertArrayBufferToBase64Url } from '../../../foundation/convert/base64url/convertArrayBufferToBase64Url.mjs';\nimport { convertBase64UrlToArrayBuffer } from '../../../foundation/convert/base64url/convertBase64UrlToArrayBuffer.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deserializes Public Key Credential Creation Options JSON\n * @param input PasskeyCreateOptionsJson\n * @returns PublicKeyCredentialCreationOptions\n */\nconst deserializeJsonToPkcCreationOptions = (input) => {\n const userIdBuffer = convertBase64UrlToArrayBuffer(input.user.id);\n const challengeBuffer = convertBase64UrlToArrayBuffer(input.challenge);\n const excludeCredentialsWithBuffer = (input.excludeCredentials || []).map(excludeCred => ({\n ...excludeCred,\n id: convertBase64UrlToArrayBuffer(excludeCred.id),\n }));\n return {\n ...input,\n excludeCredentials: excludeCredentialsWithBuffer,\n challenge: challengeBuffer,\n user: {\n ...input.user,\n id: userIdBuffer,\n },\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyCreateResult\n * @returns PasskeyCreateResultJson\n */\nconst serializePkcWithAttestationToJson = (input) => {\n const response = {\n clientDataJSON: convertArrayBufferToBase64Url(input.response.clientDataJSON),\n attestationObject: convertArrayBufferToBase64Url(input.response.attestationObject),\n transports: input.response.getTransports(),\n publicKeyAlgorithm: input.response.getPublicKeyAlgorithm(),\n authenticatorData: convertArrayBufferToBase64Url(input.response.getAuthenticatorData()),\n };\n const publicKey = input.response.getPublicKey();\n if (publicKey) {\n response.publicKey = convertArrayBufferToBase64Url(publicKey);\n }\n const resultJson = {\n type: input.type,\n id: input.id,\n rawId: convertArrayBufferToBase64Url(input.rawId),\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\n/**\n * Deserializes Public Key Credential Get Options JSON\n * @param input PasskeyGetOptionsJson\n * @returns PublicKeyCredentialRequestOptions\n */\nconst deserializeJsonToPkcGetOptions = (input) => {\n const challengeBuffer = convertBase64UrlToArrayBuffer(input.challenge);\n const allowedCredentialsWithBuffer = (input.allowCredentials || []).map(allowedCred => ({\n ...allowedCred,\n id: convertBase64UrlToArrayBuffer(allowedCred.id),\n }));\n return {\n ...input,\n challenge: challengeBuffer,\n allowCredentials: allowedCredentialsWithBuffer,\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyGetResult\n * @returns PasskeyGetResultJson\n */\nconst serializePkcWithAssertionToJson = (input) => {\n const response = {\n clientDataJSON: convertArrayBufferToBase64Url(input.response.clientDataJSON),\n authenticatorData: convertArrayBufferToBase64Url(input.response.authenticatorData),\n signature: convertArrayBufferToBase64Url(input.response.signature),\n };\n if (input.response.userHandle) {\n response.userHandle = convertArrayBufferToBase64Url(input.response.userHandle);\n }\n const resultJson = {\n id: input.id,\n rawId: convertArrayBufferToBase64Url(input.rawId),\n type: input.type,\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\n\nexport { deserializeJsonToPkcCreationOptions, deserializeJsonToPkcGetOptions, serializePkcWithAssertionToJson, serializePkcWithAttestationToJson };\n//# sourceMappingURL=serde.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { convertArrayBufferToBase64Url, convertBase64UrlToArrayBuffer, } from '../../../foundation/convert';\n/**\n * Deserializes Public Key Credential Creation Options JSON\n * @param input PasskeyCreateOptionsJson\n * @returns PublicKeyCredentialCreationOptions\n */\nexport const deserializeJsonToPkcCreationOptions = (input) => {\n const userIdBuffer = convertBase64UrlToArrayBuffer(input.user.id);\n const challengeBuffer = convertBase64UrlToArrayBuffer(input.challenge);\n const excludeCredentialsWithBuffer = (input.excludeCredentials || []).map(excludeCred => ({\n ...excludeCred,\n id: convertBase64UrlToArrayBuffer(excludeCred.id),\n }));\n return {\n ...input,\n excludeCredentials: excludeCredentialsWithBuffer,\n challenge: challengeBuffer,\n user: {\n ...input.user,\n id: userIdBuffer,\n },\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyCreateResult\n * @returns PasskeyCreateResultJson\n */\nexport const serializePkcWithAttestationToJson = (input) => {\n const response = {\n clientDataJSON: convertArrayBufferToBase64Url(input.response.clientDataJSON),\n attestationObject: convertArrayBufferToBase64Url(input.response.attestationObject),\n transports: input.response.getTransports(),\n publicKeyAlgorithm: input.response.getPublicKeyAlgorithm(),\n authenticatorData: convertArrayBufferToBase64Url(input.response.getAuthenticatorData()),\n };\n const publicKey = input.response.getPublicKey();\n if (publicKey) {\n response.publicKey = convertArrayBufferToBase64Url(publicKey);\n }\n const resultJson = {\n type: input.type,\n id: input.id,\n rawId: convertArrayBufferToBase64Url(input.rawId),\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\n/**\n * Deserializes Public Key Credential Get Options JSON\n * @param input PasskeyGetOptionsJson\n * @returns PublicKeyCredentialRequestOptions\n */\nexport const deserializeJsonToPkcGetOptions = (input) => {\n const challengeBuffer = convertBase64UrlToArrayBuffer(input.challenge);\n const allowedCredentialsWithBuffer = (input.allowCredentials || []).map(allowedCred => ({\n ...allowedCred,\n id: convertBase64UrlToArrayBuffer(allowedCred.id),\n }));\n return {\n ...input,\n challenge: challengeBuffer,\n allowCredentials: allowedCredentialsWithBuffer,\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyGetResult\n * @returns PasskeyGetResultJson\n */\nexport const serializePkcWithAssertionToJson = (input) => {\n const response = {\n clientDataJSON: convertArrayBufferToBase64Url(input.response.clientDataJSON),\n authenticatorData: convertArrayBufferToBase64Url(input.response.authenticatorData),\n signature: convertArrayBufferToBase64Url(input.response.signature),\n };\n if (input.response.userHandle) {\n response.userHandle = convertArrayBufferToBase64Url(input.response.userHandle);\n }\n const resultJson = {\n id: input.id,\n rawId: convertArrayBufferToBase64Url(input.rawId),\n type: input.type,\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\n","import { base64Encoder } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// https://datatracker.ietf.org/doc/html/rfc4648#page-7\n/**\n * Converts an ArrayBuffer to a base64url encoded string\n * @param buffer - the ArrayBuffer instance of a Uint8Array\n * @returns string - a base64url encoded string\n */\nconst convertArrayBufferToBase64Url = (buffer) => {\n return base64Encoder.convert(new Uint8Array(buffer), {\n urlSafe: true,\n skipPadding: true,\n });\n};\n\nexport { convertArrayBufferToBase64Url };\n//# sourceMappingURL=convertArrayBufferToBase64Url.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Encoder } from '@aws-amplify/core/internals/utils';\n// https://datatracker.ietf.org/doc/html/rfc4648#page-7\n/**\n * Converts an ArrayBuffer to a base64url encoded string\n * @param buffer - the ArrayBuffer instance of a Uint8Array\n * @returns string - a base64url encoded string\n */\nexport const convertArrayBufferToBase64Url = (buffer) => {\n return base64Encoder.convert(new Uint8Array(buffer), {\n urlSafe: true,\n skipPadding: true,\n });\n};\n","import { getBtoa } from '../../globalHelpers/index.mjs';\nimport { bytesToString } from './bytesToString.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst base64Encoder = {\n /**\n * Convert input to base64-encoded string\n * @param input - string to convert to base64\n * @param options - encoding options that can optionally produce a base64url string\n * @returns base64-encoded string\n */\n convert(input, options = {\n urlSafe: false,\n skipPadding: false,\n }) {\n const inputStr = typeof input === 'string' ? input : bytesToString(input);\n let encodedStr = getBtoa()(inputStr);\n // urlSafe char replacement and skipPadding options conform to the base64url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#section-5\n if (options.urlSafe) {\n encodedStr = encodedStr.replace(/\\+/g, '-').replace(/\\//g, '_');\n }\n if (options.skipPadding) {\n encodedStr = encodedStr.replace(/=/g, '');\n }\n return encodedStr;\n },\n};\n\nexport { base64Encoder };\n//# sourceMappingURL=base64Encoder.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getBtoa } from '../../globalHelpers';\nimport { bytesToString } from './bytesToString';\nexport const base64Encoder = {\n /**\n * Convert input to base64-encoded string\n * @param input - string to convert to base64\n * @param options - encoding options that can optionally produce a base64url string\n * @returns base64-encoded string\n */\n convert(input, options = {\n urlSafe: false,\n skipPadding: false,\n }) {\n const inputStr = typeof input === 'string' ? input : bytesToString(input);\n let encodedStr = getBtoa()(inputStr);\n // urlSafe char replacement and skipPadding options conform to the base64url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#section-5\n if (options.urlSafe) {\n encodedStr = encodedStr.replace(/\\+/g, '-').replace(/\\//g, '_');\n }\n if (options.skipPadding) {\n encodedStr = encodedStr.replace(/=/g, '');\n }\n return encodedStr;\n },\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction bytesToString(input) {\n return Array.from(input, byte => String.fromCodePoint(byte)).join('');\n}\n\nexport { bytesToString };\n//# sourceMappingURL=bytesToString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function bytesToString(input) {\n return Array.from(input, byte => String.fromCodePoint(byte)).join('');\n}\n","import { base64Decoder } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a base64url encoded string to an ArrayBuffer\n * @param base64url - a base64url encoded string\n * @returns ArrayBuffer\n */\nconst convertBase64UrlToArrayBuffer = (base64url) => {\n return Uint8Array.from(base64Decoder.convert(base64url, { urlSafe: true }), x => x.charCodeAt(0)).buffer;\n};\n\nexport { convertBase64UrlToArrayBuffer };\n//# sourceMappingURL=convertBase64UrlToArrayBuffer.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Decoder } from '@aws-amplify/core/internals/utils';\n/**\n * Converts a base64url encoded string to an ArrayBuffer\n * @param base64url - a base64url encoded string\n * @returns ArrayBuffer\n */\nexport const convertBase64UrlToArrayBuffer = (base64url) => {\n return Uint8Array.from(base64Decoder.convert(base64url, { urlSafe: true }), x => x.charCodeAt(0)).buffer;\n};\n","import { assertPasskeyError, PasskeyErrorCode } from '../errors.mjs';\nexport { assertValidCredentialCreationOptions } from './shared.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertCredentialIsPkcWithAuthenticatorAttestationResponse(credential) {\n assertPasskeyError(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAttestationResponse, PasskeyErrorCode.PasskeyRegistrationFailed);\n}\nfunction assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential) {\n assertPasskeyError(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAssertionResponse, PasskeyErrorCode.PasskeyRetrievalFailed);\n}\n\nexport { assertCredentialIsPkcWithAuthenticatorAssertionResponse, assertCredentialIsPkcWithAuthenticatorAttestationResponse };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PasskeyErrorCode, assertPasskeyError } from '../errors';\n/**\n * Passkey Create Types\n */\nexport { assertValidCredentialCreationOptions, } from './shared';\nexport function assertCredentialIsPkcWithAuthenticatorAttestationResponse(credential) {\n assertPasskeyError(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAttestationResponse, PasskeyErrorCode.PasskeyRegistrationFailed);\n}\nexport function assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential) {\n assertPasskeyError(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAssertionResponse, PasskeyErrorCode.PasskeyRetrievalFailed);\n}\n","import { base64Encoder, getDeviceName } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmDeviceClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmDeviceClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthenticationHelper } from './srp/getAuthenticationHelper.mjs';\nimport { getBytesFromHex } from './srp/getBytesFromHex.mjs';\nimport '@aws-crypto/sha256-js';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * This function is used to kick off the device management flow.\n *\n * If an error is thrown while generating a hash device or calling the `ConfirmDevice`\n * client, then this API will ignore the error and return undefined. Otherwise the authentication\n * flow will not complete and the user won't be able to be signed in.\n *\n * @returns DeviceMetadata | undefined\n */\nasync function getNewDeviceMetadata({ userPoolId, userPoolEndpoint, newDeviceMetadata, accessToken, }) {\n if (!newDeviceMetadata)\n return undefined;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const deviceKey = newDeviceMetadata?.DeviceKey;\n const deviceGroupKey = newDeviceMetadata?.DeviceGroupKey;\n try {\n await authenticationHelper.generateHashDevice(deviceGroupKey ?? '', deviceKey ?? '');\n }\n catch (errGenHash) {\n // TODO: log error here\n return undefined;\n }\n const deviceSecretVerifierConfig = {\n Salt: base64Encoder.convert(getBytesFromHex(authenticationHelper.getSaltToHashDevices())),\n PasswordVerifier: base64Encoder.convert(getBytesFromHex(authenticationHelper.getVerifierDevices())),\n };\n const randomPassword = authenticationHelper.getRandomPassword();\n try {\n const confirmDevice = createConfirmDeviceClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await confirmDevice({ region: getRegionFromUserPoolId(userPoolId) }, {\n AccessToken: accessToken,\n DeviceName: await getDeviceName(),\n DeviceKey: newDeviceMetadata?.DeviceKey,\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n });\n return {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n };\n }\n catch (error) {\n // TODO: log error here\n return undefined;\n }\n}\n\nexport { getNewDeviceMetadata };\n//# sourceMappingURL=getNewDeviceMetadata.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Encoder, getDeviceName, } from '@aws-amplify/core/internals/utils';\nimport { createConfirmDeviceClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthenticationHelper, getBytesFromHex } from './srp';\n/**\n * This function is used to kick off the device management flow.\n *\n * If an error is thrown while generating a hash device or calling the `ConfirmDevice`\n * client, then this API will ignore the error and return undefined. Otherwise the authentication\n * flow will not complete and the user won't be able to be signed in.\n *\n * @returns DeviceMetadata | undefined\n */\nexport async function getNewDeviceMetadata({ userPoolId, userPoolEndpoint, newDeviceMetadata, accessToken, }) {\n if (!newDeviceMetadata)\n return undefined;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const deviceKey = newDeviceMetadata?.DeviceKey;\n const deviceGroupKey = newDeviceMetadata?.DeviceGroupKey;\n try {\n await authenticationHelper.generateHashDevice(deviceGroupKey ?? '', deviceKey ?? '');\n }\n catch (errGenHash) {\n // TODO: log error here\n return undefined;\n }\n const deviceSecretVerifierConfig = {\n Salt: base64Encoder.convert(getBytesFromHex(authenticationHelper.getSaltToHashDevices())),\n PasswordVerifier: base64Encoder.convert(getBytesFromHex(authenticationHelper.getVerifierDevices())),\n };\n const randomPassword = authenticationHelper.getRandomPassword();\n try {\n const confirmDevice = createConfirmDeviceClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await confirmDevice({ region: getRegionFromUserPoolId(userPoolId) }, {\n AccessToken: accessToken,\n DeviceName: await getDeviceName(),\n DeviceKey: newDeviceMetadata?.DeviceKey,\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n });\n return {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n };\n }\n catch (error) {\n // TODO: log error here\n return undefined;\n }\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Retrieves the device name using the User-Agent Client Hints API if available,\n * falling back to the traditional userAgent string if not.\n *\n * @returns {Promise} A promise that resolves with a string representing the device name.\n *\n * Example Output:\n * navigator.userAgentData:\n * 'macOS 14.2.1 arm macOS Not A(Brand/99.0.0.0;Google Chrome/121.0.6167.160;Chromium/121.0.6167.160'\n * navigator.userAgent:\n * 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0'\n */\nconst getDeviceName = async () => {\n const { userAgentData } = navigator;\n if (!userAgentData)\n return navigator.userAgent;\n const { platform = '', platformVersion = '', model = '', architecture = '', fullVersionList = [], } = await userAgentData.getHighEntropyValues([\n 'platform',\n 'platformVersion',\n 'architecture',\n 'model',\n 'fullVersionList',\n ]);\n const versionList = fullVersionList\n .map((v) => `${v.brand}/${v.version}`)\n .join(';');\n const deviceName = [\n platform,\n platformVersion,\n architecture,\n model,\n platform,\n versionList,\n ]\n .filter(value => value)\n .join(' ');\n return deviceName || navigator.userAgent;\n};\n\nexport { getDeviceName };\n//# sourceMappingURL=getDeviceName.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Retrieves the device name using the User-Agent Client Hints API if available,\n * falling back to the traditional userAgent string if not.\n *\n * @returns {Promise} A promise that resolves with a string representing the device name.\n *\n * Example Output:\n * navigator.userAgentData:\n * 'macOS 14.2.1 arm macOS Not A(Brand/99.0.0.0;Google Chrome/121.0.6167.160;Chromium/121.0.6167.160'\n * navigator.userAgent:\n * 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0'\n */\nexport const getDeviceName = async () => {\n const { userAgentData } = navigator;\n if (!userAgentData)\n return navigator.userAgent;\n const { platform = '', platformVersion = '', model = '', architecture = '', fullVersionList = [], } = await userAgentData.getHighEntropyValues([\n 'platform',\n 'platformVersion',\n 'architecture',\n 'model',\n 'fullVersionList',\n ]);\n const versionList = fullVersionList\n .map((v) => `${v.brand}/${v.version}`)\n .join(';');\n const deviceName = [\n platform,\n platformVersion,\n architecture,\n model,\n platform,\n versionList,\n ]\n .filter(value => value)\n .join(' ');\n return deviceName || navigator.userAgent;\n};\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmDeviceClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmDevice'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmDeviceClient };\n//# sourceMappingURL=createConfirmDeviceClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createConfirmDeviceClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmDevice'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import AuthenticationHelper from './AuthenticationHelper/AuthenticationHelper.mjs';\nimport BigInteger from './BigInteger/BigInteger.mjs';\nimport { calculateA } from './calculate/calculateA.mjs';\nimport { INIT_N } from './constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { getHexFromBytes } from './getHexFromBytes.mjs';\nimport { getRandomBytes } from './getRandomBytes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a new {@link AuthenticationHelper} instance with randomly generated BigInteger seed\n *\n * @param userPoolName Cognito user pool name.\n * @returns An {@link AuthenticationHelper} instance.\n *\n * @internal\n */\nconst getAuthenticationHelper = async (userPoolName) => {\n const N = new BigInteger(INIT_N, 16);\n const g = new BigInteger('2', 16);\n const a = generateRandomBigInteger();\n const A = await calculateA({ a, g, N });\n return new AuthenticationHelper({ userPoolName, a, g, A, N });\n};\n/**\n * Generates a random BigInteger.\n *\n * @returns {BigInteger} a random value.\n */\nconst generateRandomBigInteger = () => {\n // This will be interpreted as a postive 128-bit integer\n const hexRandom = getHexFromBytes(getRandomBytes(128));\n // There is no need to do randomBigInt.mod(this.N - 1) as N (3072-bit) is > 128 bytes (1024-bit)\n return new BigInteger(hexRandom, 16);\n};\n\nexport { getAuthenticationHelper };\n//# sourceMappingURL=getAuthenticationHelper.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthenticationHelper } from './AuthenticationHelper';\nimport { BigInteger } from './BigInteger';\nimport { calculateA } from './calculate';\nimport { INIT_N } from './constants';\nimport { getHexFromBytes } from './getHexFromBytes';\nimport { getRandomBytes } from './getRandomBytes';\n/**\n * Returns a new {@link AuthenticationHelper} instance with randomly generated BigInteger seed\n *\n * @param userPoolName Cognito user pool name.\n * @returns An {@link AuthenticationHelper} instance.\n *\n * @internal\n */\nexport const getAuthenticationHelper = async (userPoolName) => {\n const N = new BigInteger(INIT_N, 16);\n const g = new BigInteger('2', 16);\n const a = generateRandomBigInteger();\n const A = await calculateA({ a, g, N });\n return new AuthenticationHelper({ userPoolName, a, g, A, N });\n};\n/**\n * Generates a random BigInteger.\n *\n * @returns {BigInteger} a random value.\n */\nconst generateRandomBigInteger = () => {\n // This will be interpreted as a postive 128-bit integer\n const hexRandom = getHexFromBytes(getRandomBytes(128));\n // There is no need to do randomBigInt.mod(this.N - 1) as N (3072-bit) is > 128 bytes (1024-bit)\n return new BigInteger(hexRandom, 16);\n};\n","import { AuthError } from '../../../../../errors/AuthError.mjs';\nimport { textEncoder } from '../../textEncoder/index.mjs';\nimport BigInteger from '../BigInteger/BigInteger.mjs';\nimport { calculateS } from '../calculate/calculateS.mjs';\nimport { calculateU } from '../calculate/calculateU.mjs';\nimport { getBytesFromHex } from '../getBytesFromHex.mjs';\nimport { getHashFromData } from '../getHashFromData.mjs';\nimport { getHashFromHex } from '../getHashFromHex.mjs';\nimport { getHexFromBytes } from '../getHexFromBytes.mjs';\nimport { getHkdfKey } from '../getHkdfKey.mjs';\nimport { getPaddedHex } from '../getPaddedHex.mjs';\nimport { getRandomBytes } from '../getRandomBytes.mjs';\nimport { getRandomString } from '../getRandomString.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/** @class */\nclass AuthenticationHelper {\n constructor({ userPoolName, a, g, A, N, }) {\n this.encoder = textEncoder;\n this.userPoolName = userPoolName;\n this.a = a;\n this.g = g;\n this.A = A;\n this.N = N;\n this.k = new BigInteger(getHashFromHex(`${getPaddedHex(N)}${getPaddedHex(g)}`), 16);\n }\n /**\n * @returns {string} Generated random value included in password hash.\n */\n getRandomPassword() {\n if (!this.randomPassword) {\n throw new AuthError({\n name: 'EmptyBigIntegerRandomPassword',\n message: 'random password is empty',\n });\n }\n return this.randomPassword;\n }\n /**\n * @returns {string} Generated random value included in devices hash.\n */\n getSaltToHashDevices() {\n if (!this.saltToHashDevices) {\n throw new AuthError({\n name: 'EmptyBigIntegersaltToHashDevices',\n message: 'saltToHashDevices is empty',\n });\n }\n return this.saltToHashDevices;\n }\n /**\n * @returns {string} Value used to verify devices.\n */\n getVerifierDevices() {\n if (!this.verifierDevices) {\n throw new AuthError({\n name: 'EmptyBigIntegerVerifierDevices',\n message: 'verifyDevices is empty',\n });\n }\n return this.verifierDevices;\n }\n /**\n * Generate salts and compute verifier.\n *\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n *\n * @returns {Promise}\n */\n async generateHashDevice(deviceGroupKey, username) {\n this.randomPassword = getRandomString();\n const combinedString = `${deviceGroupKey}${username}:${this.randomPassword}`;\n const hashedString = getHashFromData(combinedString);\n const hexRandom = getHexFromBytes(getRandomBytes(16));\n // The random hex will be unambiguously represented as a postive integer\n this.saltToHashDevices = getPaddedHex(new BigInteger(hexRandom, 16));\n return new Promise((resolve, reject) => {\n this.g.modPow(new BigInteger(getHashFromHex(this.saltToHashDevices + hashedString), 16), this.N, (err, result) => {\n if (err) {\n reject(err);\n return;\n }\n this.verifierDevices = getPaddedHex(result);\n resolve();\n });\n });\n }\n /**\n * Calculates the final HKDF key based on computed S value, computed U value and the key\n *\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {AuthBigInteger} B Server B value.\n * @param {AuthBigInteger} salt Generated salt.\n */\n async getPasswordAuthenticationKey({ username, password, serverBValue, salt, }) {\n if (serverBValue.mod(this.N).equals(BigInteger.ZERO)) {\n throw new Error('B cannot be zero.');\n }\n const U = calculateU({\n A: this.A,\n B: serverBValue,\n });\n const usernamePassword = `${this.userPoolName}${username}:${password}`;\n const usernamePasswordHash = getHashFromData(usernamePassword);\n const x = new BigInteger(getHashFromHex(getPaddedHex(salt) + usernamePasswordHash), 16);\n const S = await calculateS({\n a: this.a,\n g: this.g,\n k: this.k,\n x,\n B: serverBValue,\n N: this.N,\n U,\n });\n const context = this.encoder.convert('Caldera Derived Key');\n const spacer = this.encoder.convert(String.fromCharCode(1));\n const info = new Uint8Array(context.byteLength + spacer.byteLength);\n info.set(context, 0);\n info.set(spacer, context.byteLength);\n const hkdfKey = getHkdfKey(getBytesFromHex(getPaddedHex(S)), getBytesFromHex(getPaddedHex(U)), info);\n return hkdfKey;\n }\n}\n\nexport { AuthenticationHelper as default };\n//# sourceMappingURL=AuthenticationHelper.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from '../../../../../errors/AuthError';\nimport { textEncoder } from '../../textEncoder';\nimport { BigInteger } from '../BigInteger';\nimport { calculateS, calculateU } from '../calculate';\nimport { getBytesFromHex } from '../getBytesFromHex';\nimport { getHashFromData } from '../getHashFromData';\nimport { getHashFromHex } from '../getHashFromHex';\nimport { getHexFromBytes } from '../getHexFromBytes';\nimport { getHkdfKey } from '../getHkdfKey';\nimport { getPaddedHex } from '../getPaddedHex';\nimport { getRandomBytes } from '../getRandomBytes';\nimport { getRandomString } from '../getRandomString';\n/** @class */\nexport default class AuthenticationHelper {\n constructor({ userPoolName, a, g, A, N, }) {\n this.encoder = textEncoder;\n this.userPoolName = userPoolName;\n this.a = a;\n this.g = g;\n this.A = A;\n this.N = N;\n this.k = new BigInteger(getHashFromHex(`${getPaddedHex(N)}${getPaddedHex(g)}`), 16);\n }\n /**\n * @returns {string} Generated random value included in password hash.\n */\n getRandomPassword() {\n if (!this.randomPassword) {\n throw new AuthError({\n name: 'EmptyBigIntegerRandomPassword',\n message: 'random password is empty',\n });\n }\n return this.randomPassword;\n }\n /**\n * @returns {string} Generated random value included in devices hash.\n */\n getSaltToHashDevices() {\n if (!this.saltToHashDevices) {\n throw new AuthError({\n name: 'EmptyBigIntegersaltToHashDevices',\n message: 'saltToHashDevices is empty',\n });\n }\n return this.saltToHashDevices;\n }\n /**\n * @returns {string} Value used to verify devices.\n */\n getVerifierDevices() {\n if (!this.verifierDevices) {\n throw new AuthError({\n name: 'EmptyBigIntegerVerifierDevices',\n message: 'verifyDevices is empty',\n });\n }\n return this.verifierDevices;\n }\n /**\n * Generate salts and compute verifier.\n *\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n *\n * @returns {Promise}\n */\n async generateHashDevice(deviceGroupKey, username) {\n this.randomPassword = getRandomString();\n const combinedString = `${deviceGroupKey}${username}:${this.randomPassword}`;\n const hashedString = getHashFromData(combinedString);\n const hexRandom = getHexFromBytes(getRandomBytes(16));\n // The random hex will be unambiguously represented as a postive integer\n this.saltToHashDevices = getPaddedHex(new BigInteger(hexRandom, 16));\n return new Promise((resolve, reject) => {\n this.g.modPow(new BigInteger(getHashFromHex(this.saltToHashDevices + hashedString), 16), this.N, (err, result) => {\n if (err) {\n reject(err);\n return;\n }\n this.verifierDevices = getPaddedHex(result);\n resolve();\n });\n });\n }\n /**\n * Calculates the final HKDF key based on computed S value, computed U value and the key\n *\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {AuthBigInteger} B Server B value.\n * @param {AuthBigInteger} salt Generated salt.\n */\n async getPasswordAuthenticationKey({ username, password, serverBValue, salt, }) {\n if (serverBValue.mod(this.N).equals(BigInteger.ZERO)) {\n throw new Error('B cannot be zero.');\n }\n const U = calculateU({\n A: this.A,\n B: serverBValue,\n });\n const usernamePassword = `${this.userPoolName}${username}:${password}`;\n const usernamePasswordHash = getHashFromData(usernamePassword);\n const x = new BigInteger(getHashFromHex(getPaddedHex(salt) + usernamePasswordHash), 16);\n const S = await calculateS({\n a: this.a,\n g: this.g,\n k: this.k,\n x,\n B: serverBValue,\n N: this.N,\n U,\n });\n const context = this.encoder.convert('Caldera Derived Key');\n const spacer = this.encoder.convert(String.fromCharCode(1));\n const info = new Uint8Array(context.byteLength + spacer.byteLength);\n info.set(context, 0);\n info.set(spacer, context.byteLength);\n const hkdfKey = getHkdfKey(getBytesFromHex(getPaddedHex(S)), getBytesFromHex(getPaddedHex(U)), info);\n return hkdfKey;\n }\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst textEncoder = {\n convert(input) {\n return new TextEncoder().encode(input);\n },\n};\n\nexport { textEncoder };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const textEncoder = {\n convert(input) {\n return new TextEncoder().encode(input);\n },\n};\n","/* eslint-disable */\n// @ts-nocheck -> BigInteger is already a vended utility\n// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n// (public) Constructor\nfunction BigInteger(a, b) {\n if (a != null)\n this.fromString(a, b);\n}\n// return new, unset BigInteger\nfunction nbi() {\n return new BigInteger(null, null);\n}\n// Bits per digit\nlet dbits;\n// JavaScript engine analysis\nconst canary = 0xdeadbeefcafe;\nconst j_lm = (canary & 0xffffff) === 0xefcafe;\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n const v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i, x, w, j, c, n) {\n const xl = x & 0x7fff;\n const xh = x >> 15;\n while (--n >= 0) {\n let l = this[i] & 0x7fff;\n const h = this[i++] >> 15;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i, x, w, j, c, n) {\n const xl = x & 0x3fff;\n const xh = x >> 14;\n while (--n >= 0) {\n let l = this[i] & 0x3fff;\n const h = this[i++] >> 14;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n}\nconst inBrowser = typeof navigator !== 'undefined';\nif (inBrowser && j_lm && navigator.appName === 'Microsoft Internet Explorer') {\n BigInteger.prototype.am = am2;\n dbits = 30;\n}\nelse if (inBrowser && j_lm && navigator.appName !== 'Netscape') {\n BigInteger.prototype.am = am1;\n dbits = 26;\n}\nelse {\n // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\nconst BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nconst BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';\nconst BI_RC = [];\nlet rr, vv;\nrr = '0'.charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv)\n BI_RC[rr++] = vv;\nrr = 'a'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nrr = 'A'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\nfunction intAt(s, i) {\n const c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n}\n// (protected) copy this to r\nfunction bnpCopyTo(r) {\n for (let i = this.t - 1; i >= 0; --i)\n r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0)\n this[0] = x;\n else if (x < -1)\n this[0] = x + this.DV;\n else\n this.t = 0;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n const r = nbi();\n r.fromInt(i);\n return r;\n}\n// (protected) set from string and radix\nfunction bnpFromString(s, b) {\n let k;\n if (b === 16)\n k = 4;\n else if (b === 8)\n k = 3;\n else if (b === 2)\n k = 1;\n else if (b === 32)\n k = 5;\n else if (b === 4)\n k = 2;\n else\n throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n this.t = 0;\n this.s = 0;\n let i = s.length;\n let mi = false;\n let sh = 0;\n while (--i >= 0) {\n const x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) === '-')\n mi = true;\n continue;\n }\n mi = false;\n if (sh === 0)\n this[this.t++] = x;\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = x >> (this.DB - sh);\n }\n else\n this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB)\n sh -= this.DB;\n }\n this.clamp();\n if (mi)\n BigInteger.ZERO.subTo(this, this);\n}\n// (protected) clamp off excess high words\nfunction bnpClamp() {\n const c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c)\n --this.t;\n}\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if (this.s < 0)\n return '-' + this.negate().toString(b);\n let k;\n if (b == 16)\n k = 4;\n else if (b === 8)\n k = 3;\n else if (b === 2)\n k = 1;\n else if (b === 32)\n k = 5;\n else if (b === 4)\n k = 2;\n else\n throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n const km = (1 << k) - 1;\n let d;\n let m = false;\n let r = '';\n let i = this.t;\n let p = this.DB - ((i * this.DB) % k);\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = int2char(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0)\n m = true;\n if (m)\n r += int2char(d);\n }\n }\n return m ? r : '0';\n}\n// (public) -this\nfunction bnNegate() {\n const r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n}\n// (public) |this|\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n let r = this.s - a.s;\n if (r != 0)\n return r;\n let i = this.t;\n r = i - a.t;\n if (r != 0)\n return this.s < 0 ? -r : r;\n while (--i >= 0)\n if ((r = this[i] - a[i]) != 0)\n return r;\n return 0;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n let r = 1;\n let t;\n if ((t = x >>> 16) !== 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) !== 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) !== 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) !== 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) !== 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if (this.t <= 0)\n return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n}\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n, r) {\n let i;\n for (i = this.t - 1; i >= 0; --i)\n r[i + n] = this[i];\n for (i = n - 1; i >= 0; --i)\n r[i] = 0;\n r.t = this.t + n;\n r.s = this.s;\n}\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n, r) {\n for (let i = n; i < this.t; ++i)\n r[i - n] = this[i];\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n}\n// (protected) r = this << n\nfunction bnpLShiftTo(n, r) {\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << cbs) - 1;\n const ds = Math.floor(n / this.DB);\n let c = (this.s << bs) & this.DM;\n let i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (i = ds - 1; i >= 0; --i)\n r[i] = 0;\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n}\n// (protected) r = this >> n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n const ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (let i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0)\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n}\n// (protected) r = this - a\nfunction bnpSubTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c < -1)\n r[i++] = this.DV + c;\n else if (c > 0)\n r[i++] = c;\n r.t = i;\n r.clamp();\n}\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a, r) {\n const x = this.abs();\n const y = a.abs();\n let i = x.t;\n r.t = i + y.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < y.t; ++i)\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n r.s = 0;\n r.clamp();\n if (this.s !== a.s)\n BigInteger.ZERO.subTo(r, r);\n}\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n const x = this.abs();\n let i = (r.t = 2 * x.t);\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < x.t - 1; ++i) {\n const c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=\n x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0)\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n}\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m, q, r) {\n const pm = m.abs();\n if (pm.t <= 0)\n return;\n const pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null)\n q.fromInt(0);\n if (r != null)\n this.copyTo(r);\n return;\n }\n if (r === null)\n r = nbi();\n const y = nbi();\n const ts = this.s;\n const ms = m.s;\n const nsh = this.DB - nbits(pm[pm.t - 1]);\n // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n const ys = y.t;\n const y0 = y[ys - 1];\n if (y0 === 0)\n return;\n const yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n const d1 = this.FV / yt;\n const d2 = (1 << this.F1) / yt;\n const e = 1 << this.F2;\n let i = r.t;\n let j = i - ys;\n const t = q === null ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y);\n // \"negative\" y so we can replace sub with am later\n while (y.t < ys)\n y[y.t++] = 0;\n while (--j >= 0) {\n // Estimate quotient digit\n let qd = r[--i] === y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd)\n r.subTo(t, r);\n }\n }\n if (q !== null) {\n r.drShiftTo(ys, q);\n if (ts !== ms)\n BigInteger.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0)\n r.rShiftTo(nsh, r);\n // Denormalize remainder\n if (ts < 0)\n BigInteger.ZERO.subTo(r, r);\n}\n// (public) this mod a\nfunction bnMod(a) {\n const r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0)\n a.subTo(r, r);\n return r;\n}\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if (this.t < 1)\n return 0;\n const x = this[0];\n if ((x & 1) === 0)\n return 0;\n let y = x & 3;\n // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf;\n // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff;\n // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff;\n // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - ((x * y) % this.DV))) % this.DV;\n // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return y > 0 ? this.DV - y : -y;\n}\nfunction bnEquals(a) {\n return this.compareTo(a) === 0;\n}\n// (protected) r = this + a\nfunction bnpAddTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c > 0)\n r[i++] = c;\n else if (c < -1)\n r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n}\n// (public) this + a\nfunction bnAdd(a) {\n const r = nbi();\n this.addTo(a, r);\n return r;\n}\n// (public) this - a\nfunction bnSubtract(a) {\n const r = nbi();\n this.subTo(a, r);\n return r;\n}\n// (public) this * a\nfunction bnMultiply(a) {\n const r = nbi();\n this.multiplyTo(a, r);\n return r;\n}\n// (public) this / a\nfunction bnDivide(a) {\n const r = nbi();\n this.divRemTo(a, r, null);\n return r;\n}\n// Montgomery reduction\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n}\n// xR mod m\nfunction montConvert(x) {\n const r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0)\n this.m.subTo(r, r);\n return r;\n}\n// x/R mod m\nfunction montRevert(x) {\n const r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while (x.t <= this.mt2)\n // pad x so am has enough room later\n x[x.t++] = 0;\n for (let i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n let j = x[i] & 0x7fff;\n const u0 = (j * this.mpl +\n (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) &\n x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0)\n x.subTo(this.m, x);\n}\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n}\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n}\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n// (public) this^e % m (HAC 14.85)\nfunction bnModPow(e, m, callback) {\n let i = e.bitLength();\n let k;\n let r = nbv(1);\n const z = new Montgomery(m);\n if (i <= 0)\n return r;\n else if (i < 18)\n k = 1;\n else if (i < 48)\n k = 3;\n else if (i < 144)\n k = 4;\n else if (i < 768)\n k = 5;\n else\n k = 6;\n // precomputation\n const g = [];\n let n = 3;\n const k1 = k - 1;\n const km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n const g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n let j = e.t - 1;\n let w;\n let is1 = true;\n let r2 = nbi();\n let t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1)\n w = (e[j] >> (i - k1)) & km;\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0)\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n n = k;\n while ((w & 1) === 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0)\n z.sqrTo(r, r2);\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) === 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n const result = z.revert(r);\n callback(null, result);\n return result;\n}\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.addTo = bnpAddTo;\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.modPow = bnModPow;\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\nexport { BigInteger as default };\n//# sourceMappingURL=BigInteger.mjs.map\n","/* eslint-disable */\n// @ts-nocheck -> BigInteger is already a vended utility\n// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\nexport default BigInteger;\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n// (public) Constructor\nfunction BigInteger(a, b) {\n if (a != null)\n this.fromString(a, b);\n}\n// return new, unset BigInteger\nfunction nbi() {\n return new BigInteger(null, null);\n}\n// Bits per digit\nlet dbits;\n// JavaScript engine analysis\nconst canary = 0xdeadbeefcafe;\nconst j_lm = (canary & 0xffffff) === 0xefcafe;\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n const v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i, x, w, j, c, n) {\n const xl = x & 0x7fff;\n const xh = x >> 15;\n while (--n >= 0) {\n let l = this[i] & 0x7fff;\n const h = this[i++] >> 15;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i, x, w, j, c, n) {\n const xl = x & 0x3fff;\n const xh = x >> 14;\n while (--n >= 0) {\n let l = this[i] & 0x3fff;\n const h = this[i++] >> 14;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n}\nconst inBrowser = typeof navigator !== 'undefined';\nif (inBrowser && j_lm && navigator.appName === 'Microsoft Internet Explorer') {\n BigInteger.prototype.am = am2;\n dbits = 30;\n}\nelse if (inBrowser && j_lm && navigator.appName !== 'Netscape') {\n BigInteger.prototype.am = am1;\n dbits = 26;\n}\nelse {\n // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\nconst BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nconst BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';\nconst BI_RC = [];\nlet rr, vv;\nrr = '0'.charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv)\n BI_RC[rr++] = vv;\nrr = 'a'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nrr = 'A'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\nfunction intAt(s, i) {\n const c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n}\n// (protected) copy this to r\nfunction bnpCopyTo(r) {\n for (let i = this.t - 1; i >= 0; --i)\n r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0)\n this[0] = x;\n else if (x < -1)\n this[0] = x + this.DV;\n else\n this.t = 0;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n const r = nbi();\n r.fromInt(i);\n return r;\n}\n// (protected) set from string and radix\nfunction bnpFromString(s, b) {\n let k;\n if (b === 16)\n k = 4;\n else if (b === 8)\n k = 3;\n else if (b === 2)\n k = 1;\n else if (b === 32)\n k = 5;\n else if (b === 4)\n k = 2;\n else\n throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n this.t = 0;\n this.s = 0;\n let i = s.length;\n let mi = false;\n let sh = 0;\n while (--i >= 0) {\n const x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) === '-')\n mi = true;\n continue;\n }\n mi = false;\n if (sh === 0)\n this[this.t++] = x;\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = x >> (this.DB - sh);\n }\n else\n this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB)\n sh -= this.DB;\n }\n this.clamp();\n if (mi)\n BigInteger.ZERO.subTo(this, this);\n}\n// (protected) clamp off excess high words\nfunction bnpClamp() {\n const c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c)\n --this.t;\n}\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if (this.s < 0)\n return '-' + this.negate().toString(b);\n let k;\n if (b == 16)\n k = 4;\n else if (b === 8)\n k = 3;\n else if (b === 2)\n k = 1;\n else if (b === 32)\n k = 5;\n else if (b === 4)\n k = 2;\n else\n throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n const km = (1 << k) - 1;\n let d;\n let m = false;\n let r = '';\n let i = this.t;\n let p = this.DB - ((i * this.DB) % k);\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = int2char(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0)\n m = true;\n if (m)\n r += int2char(d);\n }\n }\n return m ? r : '0';\n}\n// (public) -this\nfunction bnNegate() {\n const r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n}\n// (public) |this|\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n let r = this.s - a.s;\n if (r != 0)\n return r;\n let i = this.t;\n r = i - a.t;\n if (r != 0)\n return this.s < 0 ? -r : r;\n while (--i >= 0)\n if ((r = this[i] - a[i]) != 0)\n return r;\n return 0;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n let r = 1;\n let t;\n if ((t = x >>> 16) !== 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) !== 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) !== 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) !== 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) !== 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if (this.t <= 0)\n return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n}\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n, r) {\n let i;\n for (i = this.t - 1; i >= 0; --i)\n r[i + n] = this[i];\n for (i = n - 1; i >= 0; --i)\n r[i] = 0;\n r.t = this.t + n;\n r.s = this.s;\n}\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n, r) {\n for (let i = n; i < this.t; ++i)\n r[i - n] = this[i];\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n}\n// (protected) r = this << n\nfunction bnpLShiftTo(n, r) {\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << cbs) - 1;\n const ds = Math.floor(n / this.DB);\n let c = (this.s << bs) & this.DM;\n let i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (i = ds - 1; i >= 0; --i)\n r[i] = 0;\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n}\n// (protected) r = this >> n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n const ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (let i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0)\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n}\n// (protected) r = this - a\nfunction bnpSubTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c < -1)\n r[i++] = this.DV + c;\n else if (c > 0)\n r[i++] = c;\n r.t = i;\n r.clamp();\n}\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a, r) {\n const x = this.abs();\n const y = a.abs();\n let i = x.t;\n r.t = i + y.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < y.t; ++i)\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n r.s = 0;\n r.clamp();\n if (this.s !== a.s)\n BigInteger.ZERO.subTo(r, r);\n}\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n const x = this.abs();\n let i = (r.t = 2 * x.t);\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < x.t - 1; ++i) {\n const c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=\n x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0)\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n}\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m, q, r) {\n const pm = m.abs();\n if (pm.t <= 0)\n return;\n const pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null)\n q.fromInt(0);\n if (r != null)\n this.copyTo(r);\n return;\n }\n if (r === null)\n r = nbi();\n const y = nbi();\n const ts = this.s;\n const ms = m.s;\n const nsh = this.DB - nbits(pm[pm.t - 1]);\n // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n const ys = y.t;\n const y0 = y[ys - 1];\n if (y0 === 0)\n return;\n const yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n const d1 = this.FV / yt;\n const d2 = (1 << this.F1) / yt;\n const e = 1 << this.F2;\n let i = r.t;\n let j = i - ys;\n const t = q === null ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y);\n // \"negative\" y so we can replace sub with am later\n while (y.t < ys)\n y[y.t++] = 0;\n while (--j >= 0) {\n // Estimate quotient digit\n let qd = r[--i] === y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd)\n r.subTo(t, r);\n }\n }\n if (q !== null) {\n r.drShiftTo(ys, q);\n if (ts !== ms)\n BigInteger.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0)\n r.rShiftTo(nsh, r);\n // Denormalize remainder\n if (ts < 0)\n BigInteger.ZERO.subTo(r, r);\n}\n// (public) this mod a\nfunction bnMod(a) {\n const r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0)\n a.subTo(r, r);\n return r;\n}\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if (this.t < 1)\n return 0;\n const x = this[0];\n if ((x & 1) === 0)\n return 0;\n let y = x & 3;\n // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf;\n // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff;\n // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff;\n // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - ((x * y) % this.DV))) % this.DV;\n // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return y > 0 ? this.DV - y : -y;\n}\nfunction bnEquals(a) {\n return this.compareTo(a) === 0;\n}\n// (protected) r = this + a\nfunction bnpAddTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c > 0)\n r[i++] = c;\n else if (c < -1)\n r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n}\n// (public) this + a\nfunction bnAdd(a) {\n const r = nbi();\n this.addTo(a, r);\n return r;\n}\n// (public) this - a\nfunction bnSubtract(a) {\n const r = nbi();\n this.subTo(a, r);\n return r;\n}\n// (public) this * a\nfunction bnMultiply(a) {\n const r = nbi();\n this.multiplyTo(a, r);\n return r;\n}\n// (public) this / a\nfunction bnDivide(a) {\n const r = nbi();\n this.divRemTo(a, r, null);\n return r;\n}\n// Montgomery reduction\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n}\n// xR mod m\nfunction montConvert(x) {\n const r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0)\n this.m.subTo(r, r);\n return r;\n}\n// x/R mod m\nfunction montRevert(x) {\n const r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while (x.t <= this.mt2)\n // pad x so am has enough room later\n x[x.t++] = 0;\n for (let i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n let j = x[i] & 0x7fff;\n const u0 = (j * this.mpl +\n (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) &\n x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0)\n x.subTo(this.m, x);\n}\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n}\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n}\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n// (public) this^e % m (HAC 14.85)\nfunction bnModPow(e, m, callback) {\n let i = e.bitLength();\n let k;\n let r = nbv(1);\n const z = new Montgomery(m);\n if (i <= 0)\n return r;\n else if (i < 18)\n k = 1;\n else if (i < 48)\n k = 3;\n else if (i < 144)\n k = 4;\n else if (i < 768)\n k = 5;\n else\n k = 6;\n // precomputation\n const g = [];\n let n = 3;\n const k1 = k - 1;\n const km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n const g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n let j = e.t - 1;\n let w;\n let is1 = true;\n let r2 = nbi();\n let t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1)\n w = (e[j] >> (i - k1)) & km;\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0)\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n n = k;\n while ((w & 1) === 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0)\n z.sqrTo(r, r2);\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) === 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n const result = z.revert(r);\n callback(null, result);\n return result;\n}\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.addTo = bnpAddTo;\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.modPow = bnModPow;\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst calculateS = async ({ a, g, k, x, B, N, U, }) => {\n return new Promise((resolve, reject) => {\n g.modPow(x, N, (outerErr, outerResult) => {\n if (outerErr) {\n reject(outerErr);\n return;\n }\n B.subtract(k.multiply(outerResult)).modPow(a.add(U.multiply(x)), N, (innerErr, innerResult) => {\n if (innerErr) {\n reject(innerErr);\n return;\n }\n resolve(innerResult.mod(N));\n });\n });\n });\n};\n\nexport { calculateS };\n//# sourceMappingURL=calculateS.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nexport const calculateS = async ({ a, g, k, x, B, N, U, }) => {\n return new Promise((resolve, reject) => {\n g.modPow(x, N, (outerErr, outerResult) => {\n if (outerErr) {\n reject(outerErr);\n return;\n }\n B.subtract(k.multiply(outerResult)).modPow(a.add(U.multiply(x)), N, (innerErr, innerResult) => {\n if (innerErr) {\n reject(innerErr);\n return;\n }\n resolve(innerResult.mod(N));\n });\n });\n });\n};\n","import BigInteger from '../BigInteger/BigInteger.mjs';\nimport { getHashFromHex } from '../getHashFromHex.mjs';\nimport { getPaddedHex } from '../getPaddedHex.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst calculateU = ({ A, B, }) => {\n const U = new BigInteger(getHashFromHex(getPaddedHex(A) + getPaddedHex(B)), 16);\n if (U.equals(BigInteger.ZERO)) {\n throw new Error('U cannot be zero.');\n }\n return U;\n};\n\nexport { calculateU };\n//# sourceMappingURL=calculateU.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BigInteger } from '../BigInteger';\nimport { getHashFromHex } from '../getHashFromHex';\nimport { getPaddedHex } from '../getPaddedHex';\n/**\n * @internal\n */\nexport const calculateU = ({ A, B, }) => {\n const U = new BigInteger(getHashFromHex(getPaddedHex(A) + getPaddedHex(B)), 16);\n if (U.equals(BigInteger.ZERO)) {\n throw new Error('U cannot be zero.');\n }\n return U;\n};\n","import { getBytesFromHex } from './getBytesFromHex.mjs';\nimport { getHashFromData } from './getHashFromData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculate a hash from a hex string\n * @param {string} hexStr Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */\nconst getHashFromHex = (hexStr) => getHashFromData(getBytesFromHex(hexStr));\n\nexport { getHashFromHex };\n//# sourceMappingURL=getHashFromHex.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getBytesFromHex } from './getBytesFromHex';\nimport { getHashFromData } from './getHashFromData';\n/**\n * Calculate a hash from a hex string\n * @param {string} hexStr Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */\nexport const getHashFromHex = (hexStr) => getHashFromData(getBytesFromHex(hexStr));\n","import { HEX_TO_SHORT } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\n */\nconst getBytesFromHex = (encoded) => {\n if (encoded.length % 2 !== 0) {\n throw new Error('Hex encoded strings must have an even number length');\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n};\n\nexport { getBytesFromHex };\n//# sourceMappingURL=getBytesFromHex.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { HEX_TO_SHORT } from './constants';\n/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\n */\nexport const getBytesFromHex = (encoded) => {\n if (encoded.length % 2 !== 0) {\n throw new Error('Hex encoded strings must have an even number length');\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst INIT_N = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' +\n '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' +\n 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' +\n 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' +\n 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' +\n 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' +\n '83655D23DCA3AD961C62F356208552BB9ED529077096966D' +\n '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' +\n 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' +\n 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' +\n '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' +\n 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' +\n 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' +\n 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' +\n 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' +\n '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\nconst SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\n\nexport { HEX_TO_SHORT, INIT_N, SHORT_TO_HEX };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const INIT_N = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' +\n '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' +\n 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' +\n 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' +\n 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' +\n 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' +\n '83655D23DCA3AD961C62F356208552BB9ED529077096966D' +\n '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' +\n 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' +\n 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' +\n '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' +\n 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' +\n 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' +\n 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' +\n 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' +\n '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\nexport const SHORT_TO_HEX = {};\nexport const HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { getHexFromBytes } from './getHexFromBytes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculate a hash from a `SourceData`\n * @param {SourceData} data Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */\nconst getHashFromData = (data) => {\n const sha256 = new Sha256();\n sha256.update(data);\n const hashedData = sha256.digestSync();\n const hashHexFromUint8 = getHexFromBytes(hashedData);\n return new Array(64 - hashHexFromUint8.length).join('0') + hashHexFromUint8;\n};\n\nexport { getHashFromData };\n//# sourceMappingURL=getHashFromData.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Sha256 } from '@aws-crypto/sha256-js';\nimport { getHexFromBytes } from './getHexFromBytes';\n/**\n * Calculate a hash from a `SourceData`\n * @param {SourceData} data Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */\nexport const getHashFromData = (data) => {\n const sha256 = new Sha256();\n sha256.update(data);\n const hashedData = sha256.digestSync();\n const hashHexFromUint8 = getHexFromBytes(hashedData);\n return new Array(64 - hashHexFromUint8.length).join('0') + hashHexFromUint8;\n};\n","import { SHORT_TO_HEX } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nconst getHexFromBytes = (bytes) => {\n let out = '';\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n};\n\nexport { getHexFromBytes };\n//# sourceMappingURL=getHexFromBytes.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SHORT_TO_HEX } from './constants';\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nexport const getHexFromBytes = (bytes) => {\n let out = '';\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n};\n","import BigInteger from './BigInteger/BigInteger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Tests if a hex string has it most significant bit set (case-insensitive regex)\n */\nconst HEX_MSB_REGEX = /^[89a-f]/i;\n/**\n * Returns an unambiguous, even-length hex string of the two's complement encoding of an integer.\n *\n * It is compatible with the hex encoding of Java's BigInteger's toByteArray(), wich returns a\n * byte array containing the two's-complement representation of a BigInteger. The array contains\n * the minimum number of bytes required to represent the BigInteger, including at least one sign bit.\n *\n * Examples showing how ambiguity is avoided by left padding with:\n * \t\"00\" (for positive values where the most-significant-bit is set)\n * \"FF\" (for negative values where the most-significant-bit is set)\n *\n * padHex(bigInteger.fromInt(-236)) === \"FF14\"\n * padHex(bigInteger.fromInt(20)) === \"14\"\n *\n * padHex(bigInteger.fromInt(-200)) === \"FF38\"\n * padHex(bigInteger.fromInt(56)) === \"38\"\n *\n * padHex(bigInteger.fromInt(-20)) === \"EC\"\n * padHex(bigInteger.fromInt(236)) === \"00EC\"\n *\n * padHex(bigInteger.fromInt(-56)) === \"C8\"\n * padHex(bigInteger.fromInt(200)) === \"00C8\"\n *\n * @param {AuthBigInteger} bigInt Number to encode.\n * @returns {String} even-length hex string of the two's complement encoding.\n */\nconst getPaddedHex = (bigInt) => {\n if (!(bigInt instanceof BigInteger)) {\n throw new Error('Not a BigInteger');\n }\n const isNegative = bigInt.compareTo(BigInteger.ZERO) < 0;\n /* Get a hex string for abs(bigInt) */\n let hexStr = bigInt.abs().toString(16);\n /* Pad hex to even length if needed */\n hexStr = hexStr.length % 2 !== 0 ? `0${hexStr}` : hexStr;\n /* Prepend \"00\" if the most significant bit is set */\n hexStr = HEX_MSB_REGEX.test(hexStr) ? `00${hexStr}` : hexStr;\n if (isNegative) {\n /* Flip the bits of the representation */\n const invertedNibbles = hexStr\n .split('')\n .map((x) => {\n const invertedNibble = ~parseInt(x, 16) & 0xf;\n return '0123456789ABCDEF'.charAt(invertedNibble);\n })\n .join('');\n /* After flipping the bits, add one to get the 2's complement representation */\n const flippedBitsBI = new BigInteger(invertedNibbles, 16).add(BigInteger.ONE);\n hexStr = flippedBitsBI.toString(16);\n /*\n For hex strings starting with 'FF8', 'FF' can be dropped, e.g. 0xFFFF80=0xFF80=0x80=-128\n\n Any sequence of '1' bits on the left can always be substituted with a single '1' bit\n without changing the represented value.\n\n This only happens in the case when the input is 80...00\n */\n if (hexStr.toUpperCase().startsWith('FF8')) {\n hexStr = hexStr.substring(2);\n }\n }\n return hexStr;\n};\n\nexport { getPaddedHex };\n//# sourceMappingURL=getPaddedHex.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BigInteger } from './BigInteger';\n/**\n * Tests if a hex string has it most significant bit set (case-insensitive regex)\n */\nconst HEX_MSB_REGEX = /^[89a-f]/i;\n/**\n * Returns an unambiguous, even-length hex string of the two's complement encoding of an integer.\n *\n * It is compatible with the hex encoding of Java's BigInteger's toByteArray(), wich returns a\n * byte array containing the two's-complement representation of a BigInteger. The array contains\n * the minimum number of bytes required to represent the BigInteger, including at least one sign bit.\n *\n * Examples showing how ambiguity is avoided by left padding with:\n * \t\"00\" (for positive values where the most-significant-bit is set)\n * \"FF\" (for negative values where the most-significant-bit is set)\n *\n * padHex(bigInteger.fromInt(-236)) === \"FF14\"\n * padHex(bigInteger.fromInt(20)) === \"14\"\n *\n * padHex(bigInteger.fromInt(-200)) === \"FF38\"\n * padHex(bigInteger.fromInt(56)) === \"38\"\n *\n * padHex(bigInteger.fromInt(-20)) === \"EC\"\n * padHex(bigInteger.fromInt(236)) === \"00EC\"\n *\n * padHex(bigInteger.fromInt(-56)) === \"C8\"\n * padHex(bigInteger.fromInt(200)) === \"00C8\"\n *\n * @param {AuthBigInteger} bigInt Number to encode.\n * @returns {String} even-length hex string of the two's complement encoding.\n */\nexport const getPaddedHex = (bigInt) => {\n if (!(bigInt instanceof BigInteger)) {\n throw new Error('Not a BigInteger');\n }\n const isNegative = bigInt.compareTo(BigInteger.ZERO) < 0;\n /* Get a hex string for abs(bigInt) */\n let hexStr = bigInt.abs().toString(16);\n /* Pad hex to even length if needed */\n hexStr = hexStr.length % 2 !== 0 ? `0${hexStr}` : hexStr;\n /* Prepend \"00\" if the most significant bit is set */\n hexStr = HEX_MSB_REGEX.test(hexStr) ? `00${hexStr}` : hexStr;\n if (isNegative) {\n /* Flip the bits of the representation */\n const invertedNibbles = hexStr\n .split('')\n .map((x) => {\n const invertedNibble = ~parseInt(x, 16) & 0xf;\n return '0123456789ABCDEF'.charAt(invertedNibble);\n })\n .join('');\n /* After flipping the bits, add one to get the 2's complement representation */\n const flippedBitsBI = new BigInteger(invertedNibbles, 16).add(BigInteger.ONE);\n hexStr = flippedBitsBI.toString(16);\n /*\n For hex strings starting with 'FF8', 'FF' can be dropped, e.g. 0xFFFF80=0xFF80=0x80=-128\n\n Any sequence of '1' bits on the left can always be substituted with a single '1' bit\n without changing the represented value.\n\n This only happens in the case when the input is 80...00\n */\n if (hexStr.toUpperCase().startsWith('FF8')) {\n hexStr = hexStr.substring(2);\n }\n }\n return hexStr;\n};\n","import { Sha256 } from '@aws-crypto/sha256-js';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Standard HKDF algorithm.\n *\n * @param {Uint8Array} ikm Input key material.\n * @param {Uint8Array} salt Salt value.\n * @param {Uint8Array} info Context and application specific info.\n *\n * @returns {Uint8Array} Strong key material.\n *\n * @internal\n */\nconst getHkdfKey = (ikm, salt, info) => {\n const awsCryptoHash = new Sha256(salt);\n awsCryptoHash.update(ikm);\n const resultFromAWSCryptoPrk = awsCryptoHash.digestSync();\n const awsCryptoHashHmac = new Sha256(resultFromAWSCryptoPrk);\n awsCryptoHashHmac.update(info);\n const resultFromAWSCryptoHmac = awsCryptoHashHmac.digestSync();\n const hashHexFromAWSCrypto = resultFromAWSCryptoHmac;\n return hashHexFromAWSCrypto.slice(0, 16);\n};\n\nexport { getHkdfKey };\n//# sourceMappingURL=getHkdfKey.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Sha256 } from '@aws-crypto/sha256-js';\n/**\n * Standard HKDF algorithm.\n *\n * @param {Uint8Array} ikm Input key material.\n * @param {Uint8Array} salt Salt value.\n * @param {Uint8Array} info Context and application specific info.\n *\n * @returns {Uint8Array} Strong key material.\n *\n * @internal\n */\nexport const getHkdfKey = (ikm, salt, info) => {\n const awsCryptoHash = new Sha256(salt);\n awsCryptoHash.update(ikm);\n const resultFromAWSCryptoPrk = awsCryptoHash.digestSync();\n const awsCryptoHashHmac = new Sha256(resultFromAWSCryptoPrk);\n awsCryptoHashHmac.update(info);\n const resultFromAWSCryptoHmac = awsCryptoHashHmac.digestSync();\n const hashHexFromAWSCrypto = resultFromAWSCryptoHmac;\n return hashHexFromAWSCrypto.slice(0, 16);\n};\n","import { WordArray } from '@aws-amplify/core/internals/utils';\nimport { getBytesFromHex } from './getBytesFromHex.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a Uint8Array with a sequence of random nBytes\n *\n * @param {number} nBytes\n * @returns {Uint8Array} fixed-length sequence of random bytes\n */\nconst getRandomBytes = (nBytes) => {\n const str = new WordArray().random(nBytes).toString();\n return getBytesFromHex(str);\n};\n\nexport { getRandomBytes };\n//# sourceMappingURL=getRandomBytes.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { WordArray } from '@aws-amplify/core/internals/utils';\nimport { getBytesFromHex } from './getBytesFromHex';\n/**\n * Returns a Uint8Array with a sequence of random nBytes\n *\n * @param {number} nBytes\n * @returns {Uint8Array} fixed-length sequence of random bytes\n */\nexport const getRandomBytes = (nBytes) => {\n const str = new WordArray().random(nBytes).toString();\n return getBytesFromHex(str);\n};\n","import { cryptoSecureRandomInt } from './cryptoSecureRandomInt.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nclass WordArray {\n constructor(words, sigBytes) {\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) {\n this.sigBytes = sigBytes;\n }\n else {\n this.sigBytes = Words.length * 4;\n }\n }\n random(nBytes) {\n const words = [];\n for (let i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n return new WordArray(words, nBytes);\n }\n toString() {\n return hexStringify(this);\n }\n}\n\nexport { WordArray };\n//# sourceMappingURL=WordArray.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { cryptoSecureRandomInt } from './cryptoSecureRandomInt';\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nexport class WordArray {\n constructor(words, sigBytes) {\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) {\n this.sigBytes = sigBytes;\n }\n else {\n this.sigBytes = Words.length * 4;\n }\n }\n random(nBytes) {\n const words = [];\n for (let i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n return new WordArray(words, nBytes);\n }\n toString() {\n return hexStringify(this);\n }\n}\n","import { getCrypto } from './globalHelpers/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/*\n * Cryptographically secure pseudorandom number generator\n * As Math.random() is cryptographically not safe to use\n */\nfunction cryptoSecureRandomInt() {\n const crypto = getCrypto();\n const randomResult = crypto.getRandomValues(new Uint32Array(1))[0];\n return randomResult;\n}\n\nexport { cryptoSecureRandomInt };\n//# sourceMappingURL=cryptoSecureRandomInt.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getCrypto } from './globalHelpers';\n/*\n * Cryptographically secure pseudorandom number generator\n * As Math.random() is cryptographically not safe to use\n */\nexport function cryptoSecureRandomInt() {\n const crypto = getCrypto();\n const randomResult = crypto.getRandomValues(new Uint32Array(1))[0];\n return randomResult;\n}\n","import { base64Encoder } from '@aws-amplify/core/internals/utils';\nimport { getRandomBytes } from './getRandomBytes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Helper function to generate a random string\n * @returns {string} a random value.\n *\n * @internal\n */\nconst getRandomString = () => base64Encoder.convert(getRandomBytes(40));\n\nexport { getRandomString };\n//# sourceMappingURL=getRandomString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Encoder } from '@aws-amplify/core/internals/utils';\nimport { getRandomBytes } from './getRandomBytes';\n/**\n * Helper function to generate a random string\n * @returns {string} a random value.\n *\n * @internal\n */\nexport const getRandomString = () => base64Encoder.convert(getRandomBytes(40));\n","import BigInteger from '../BigInteger/BigInteger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst calculateA = async ({ a, g, N, }) => {\n return new Promise((resolve, reject) => {\n g.modPow(a, N, (err, A) => {\n if (err) {\n reject(err);\n return;\n }\n if (A.mod(N).equals(BigInteger.ZERO)) {\n reject(new Error('Illegal parameter. A mod N cannot be 0.'));\n return;\n }\n resolve(A);\n });\n });\n};\n\nexport { calculateA };\n//# sourceMappingURL=calculateA.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BigInteger } from '../BigInteger';\n/**\n * @internal\n */\nexport const calculateA = async ({ a, g, N, }) => {\n return new Promise((resolve, reject) => {\n g.modPow(a, N, (err, A) => {\n if (err) {\n reject(err);\n return;\n }\n if (A.mod(N).equals(BigInteger.ZERO)) {\n reject(new Error('Illegal parameter. A mod N cannot be 0.'));\n return;\n }\n resolve(A);\n });\n });\n};\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { getAuthenticationHelper } from '../../../providers/cognito/utils/srp/getAuthenticationHelper.mjs';\nimport '../../../providers/cognito/utils/srp/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { handlePasswordVerifierChallenge } from '../../../providers/cognito/utils/handlePasswordVerifierChallenge.mjs';\nimport { retryOnResourceNotFoundException } from '../../../providers/cognito/utils/retryOnResourceNotFoundException.mjs';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the Password SRP (Secure Remote Password) authentication flow.\n * This function can be used with both USER_SRP_AUTH and USER_AUTH flows.\n *\n * @param {Object} params - The parameters for the Password SRP authentication\n * @param {string} params.username - The username for authentication\n * @param {string} params.password - The user's password\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Token orchestrator for managing auth tokens\n * @param {AuthFlowType} params.authFlow - The type of authentication flow ('USER_SRP_AUTH' or 'USER_AUTH')\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred challenge type when using USER_AUTH flow\n *\n * @returns {Promise} The authentication response\n */\nasync function handlePasswordSRP({ username, password, clientMetadata, config, tokenOrchestrator, authFlow, preferredChallenge, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n if (authFlow === 'USER_AUTH' && preferredChallenge) {\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: authFlow,\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const resp = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const { ChallengeParameters: challengeParameters, Session: session } = resp;\n const activeUsername = challengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (resp.ChallengeName === 'PASSWORD_VERIFIER') {\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return resp;\n}\n\nexport { handlePasswordSRP };\n//# sourceMappingURL=handlePasswordSRP.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData';\nimport { getAuthenticationHelper } from '../../../providers/cognito/utils/srp';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { handlePasswordVerifierChallenge } from '../../../providers/cognito/utils/handlePasswordVerifierChallenge';\nimport { retryOnResourceNotFoundException } from '../../../providers/cognito/utils/retryOnResourceNotFoundException';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername';\n/**\n * Handles the Password SRP (Secure Remote Password) authentication flow.\n * This function can be used with both USER_SRP_AUTH and USER_AUTH flows.\n *\n * @param {Object} params - The parameters for the Password SRP authentication\n * @param {string} params.username - The username for authentication\n * @param {string} params.password - The user's password\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Token orchestrator for managing auth tokens\n * @param {AuthFlowType} params.authFlow - The type of authentication flow ('USER_SRP_AUTH' or 'USER_AUTH')\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred challenge type when using USER_AUTH flow\n *\n * @returns {Promise} The authentication response\n */\nexport async function handlePasswordSRP({ username, password, clientMetadata, config, tokenOrchestrator, authFlow, preferredChallenge, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n if (authFlow === 'USER_AUTH' && preferredChallenge) {\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: authFlow,\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const resp = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const { ChallengeParameters: challengeParameters, Session: session } = resp;\n const activeUsername = challengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (resp.ChallengeName === 'PASSWORD_VERIFIER') {\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return resp;\n}\n","import { AuthError } from '../../../errors/AuthError.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport BigInteger from './srp/BigInteger/BigInteger.mjs';\nimport './srp/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { getNowString } from './srp/getNowString.mjs';\nimport { getSignatureString } from './srp/getSignatureString.mjs';\nimport { getUserContextData } from './userContextData.mjs';\nimport { handleDeviceSRPAuth } from './handleDeviceSRPAuth.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function handlePasswordVerifierChallenge(password, challengeParameters, clientMetadata, session, authenticationHelper, config, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const serverBValue = new BigInteger(challengeParameters?.SRP_B, 16);\n const salt = new BigInteger(challengeParameters?.SALT, 16);\n const username = challengeParameters?.USER_ID_FOR_SRP;\n if (!username)\n throw new AuthError({\n name: 'EmptyUserIdForSRPException',\n message: 'USER_ID_FOR_SRP was not found in challengeParameters',\n });\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username,\n password,\n serverBValue,\n salt,\n });\n const dateNow = getNowString();\n const challengeResponses = {\n USERNAME: username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: getSignatureString({\n username,\n userPoolName,\n challengeParameters,\n dateNow,\n hkdf,\n }),\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\n\nexport { handlePasswordVerifierChallenge };\n//# sourceMappingURL=handlePasswordVerifierChallenge.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from '../../../errors/AuthError';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getNowString, getSignatureString } from './srp';\nimport { BigInteger } from './srp/BigInteger';\nimport { getUserContextData } from './userContextData';\nimport { handleDeviceSRPAuth } from './handleDeviceSRPAuth';\nexport async function handlePasswordVerifierChallenge(password, challengeParameters, clientMetadata, session, authenticationHelper, config, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const serverBValue = new BigInteger(challengeParameters?.SRP_B, 16);\n const salt = new BigInteger(challengeParameters?.SALT, 16);\n const username = challengeParameters?.USER_ID_FOR_SRP;\n if (!username)\n throw new AuthError({\n name: 'EmptyUserIdForSRPException',\n message: 'USER_ID_FOR_SRP was not found in challengeParameters',\n });\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username,\n password,\n serverBValue,\n salt,\n });\n const dateNow = getNowString();\n const challengeResponses = {\n USERNAME: username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: getSignatureString({\n username,\n userPoolName,\n challengeParameters,\n dateNow,\n hkdf,\n }),\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MONTH_NAMES = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\nconst WEEK_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nconst getNowString = () => {\n const now = new Date();\n const weekDay = WEEK_NAMES[now.getUTCDay()];\n const month = MONTH_NAMES[now.getUTCMonth()];\n const day = now.getUTCDate();\n let hours = now.getUTCHours();\n if (hours < 10) {\n hours = `0${hours}`;\n }\n let minutes = now.getUTCMinutes();\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n let seconds = now.getUTCSeconds();\n if (seconds < 10) {\n seconds = `0${seconds}`;\n }\n const year = now.getUTCFullYear();\n // ddd MMM D HH:mm:ss UTC YYYY\n const dateNow = `${weekDay} ${month} ${day} ${hours}:${minutes}:${seconds} UTC ${year}`;\n return dateNow;\n};\n\nexport { getNowString };\n//# sourceMappingURL=getNowString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MONTH_NAMES = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\nconst WEEK_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nexport const getNowString = () => {\n const now = new Date();\n const weekDay = WEEK_NAMES[now.getUTCDay()];\n const month = MONTH_NAMES[now.getUTCMonth()];\n const day = now.getUTCDate();\n let hours = now.getUTCHours();\n if (hours < 10) {\n hours = `0${hours}`;\n }\n let minutes = now.getUTCMinutes();\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n let seconds = now.getUTCSeconds();\n if (seconds < 10) {\n seconds = `0${seconds}`;\n }\n const year = now.getUTCFullYear();\n // ddd MMM D HH:mm:ss UTC YYYY\n const dateNow = `${weekDay} ${month} ${day} ${hours}:${minutes}:${seconds} UTC ${year}`;\n return dateNow;\n};\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { base64Encoder, base64Decoder } from '@aws-amplify/core/internals/utils';\nimport { textEncoder } from '../textEncoder/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getSignatureString = ({ userPoolName, username, challengeParameters, dateNow, hkdf, }) => {\n const bufUPIDaToB = textEncoder.convert(userPoolName);\n const bufUNaToB = textEncoder.convert(username);\n const bufSBaToB = urlB64ToUint8Array(challengeParameters.SECRET_BLOCK);\n const bufDNaToB = textEncoder.convert(dateNow);\n const bufConcat = new Uint8Array(bufUPIDaToB.byteLength +\n bufUNaToB.byteLength +\n bufSBaToB.byteLength +\n bufDNaToB.byteLength);\n bufConcat.set(bufUPIDaToB, 0);\n bufConcat.set(bufUNaToB, bufUPIDaToB.byteLength);\n bufConcat.set(bufSBaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength);\n bufConcat.set(bufDNaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength + bufSBaToB.byteLength);\n const awsCryptoHash = new Sha256(hkdf);\n awsCryptoHash.update(bufConcat);\n const resultFromAWSCrypto = awsCryptoHash.digestSync();\n const signatureString = base64Encoder.convert(resultFromAWSCrypto);\n return signatureString;\n};\nconst urlB64ToUint8Array = (base64String) => {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4);\n const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');\n const rawData = base64Decoder.convert(base64);\n const outputArray = new Uint8Array(rawData.length);\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n};\n\nexport { getSignatureString };\n//# sourceMappingURL=getSignatureString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Sha256 } from '@aws-crypto/sha256-js';\nimport { base64Decoder, base64Encoder, } from '@aws-amplify/core/internals/utils';\nimport { textEncoder } from '../textEncoder';\nexport const getSignatureString = ({ userPoolName, username, challengeParameters, dateNow, hkdf, }) => {\n const bufUPIDaToB = textEncoder.convert(userPoolName);\n const bufUNaToB = textEncoder.convert(username);\n const bufSBaToB = urlB64ToUint8Array(challengeParameters.SECRET_BLOCK);\n const bufDNaToB = textEncoder.convert(dateNow);\n const bufConcat = new Uint8Array(bufUPIDaToB.byteLength +\n bufUNaToB.byteLength +\n bufSBaToB.byteLength +\n bufDNaToB.byteLength);\n bufConcat.set(bufUPIDaToB, 0);\n bufConcat.set(bufUNaToB, bufUPIDaToB.byteLength);\n bufConcat.set(bufSBaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength);\n bufConcat.set(bufDNaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength + bufSBaToB.byteLength);\n const awsCryptoHash = new Sha256(hkdf);\n awsCryptoHash.update(bufConcat);\n const resultFromAWSCrypto = awsCryptoHash.digestSync();\n const signatureString = base64Encoder.convert(resultFromAWSCrypto);\n return signatureString;\n};\nconst urlB64ToUint8Array = (base64String) => {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4);\n const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');\n const rawData = base64Decoder.convert(base64);\n const outputArray = new Uint8Array(rawData.length);\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n};\n","import '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertDeviceMetadata } from './types.mjs';\nimport { getAuthenticationHelper } from './srp/getAuthenticationHelper.mjs';\nimport './srp/constants.mjs';\nimport { getNowString } from './srp/getNowString.mjs';\nimport { getSignatureString } from './srp/getSignatureString.mjs';\nimport BigInteger from './srp/BigInteger/BigInteger.mjs';\nimport { getUserContextData } from './userContextData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function handleDeviceSRPAuth({ username, config, clientMetadata, session, tokenOrchestrator, }) {\n const { userPoolId, userPoolEndpoint } = config;\n const clientId = config.userPoolClientId;\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n assertDeviceMetadata(deviceMetadata);\n const authenticationHelper = await getAuthenticationHelper(deviceMetadata.deviceGroupKey);\n const challengeResponses = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n DEVICE_KEY: deviceMetadata.deviceKey,\n };\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: clientId,\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { ChallengeParameters: respondedChallengeParameters, Session } = await respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n return handleDevicePasswordVerifier(username, respondedChallengeParameters, clientMetadata, Session, authenticationHelper, config, tokenOrchestrator);\n}\nasync function handleDevicePasswordVerifier(username, challengeParameters, clientMetadata, session, authenticationHelper, { userPoolId, userPoolClientId, userPoolEndpoint }, tokenOrchestrator) {\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n assertDeviceMetadata(deviceMetadata);\n const serverBValue = new BigInteger(challengeParameters?.SRP_B, 16);\n const salt = new BigInteger(challengeParameters?.SALT, 16);\n const { deviceKey } = deviceMetadata;\n const { deviceGroupKey } = deviceMetadata;\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username: deviceMetadata.deviceKey,\n password: deviceMetadata.randomPassword,\n serverBValue,\n salt,\n });\n const dateNow = getNowString();\n const challengeResponses = {\n USERNAME: challengeParameters?.USERNAME ?? username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: getSignatureString({\n username: deviceKey,\n userPoolName: deviceGroupKey,\n challengeParameters,\n dateNow,\n hkdf,\n }),\n DEVICE_KEY: deviceKey,\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: userPoolClientId,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n}\n\nexport { handleDeviceSRPAuth };\n//# sourceMappingURL=handleDeviceSRPAuth.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { assertDeviceMetadata } from './types';\nimport { getAuthenticationHelper, getNowString, getSignatureString, } from './srp';\nimport { BigInteger } from './srp/BigInteger';\nimport { getUserContextData } from './userContextData';\nexport async function handleDeviceSRPAuth({ username, config, clientMetadata, session, tokenOrchestrator, }) {\n const { userPoolId, userPoolEndpoint } = config;\n const clientId = config.userPoolClientId;\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n assertDeviceMetadata(deviceMetadata);\n const authenticationHelper = await getAuthenticationHelper(deviceMetadata.deviceGroupKey);\n const challengeResponses = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n DEVICE_KEY: deviceMetadata.deviceKey,\n };\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: clientId,\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { ChallengeParameters: respondedChallengeParameters, Session } = await respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n return handleDevicePasswordVerifier(username, respondedChallengeParameters, clientMetadata, Session, authenticationHelper, config, tokenOrchestrator);\n}\nasync function handleDevicePasswordVerifier(username, challengeParameters, clientMetadata, session, authenticationHelper, { userPoolId, userPoolClientId, userPoolEndpoint }, tokenOrchestrator) {\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n assertDeviceMetadata(deviceMetadata);\n const serverBValue = new BigInteger(challengeParameters?.SRP_B, 16);\n const salt = new BigInteger(challengeParameters?.SALT, 16);\n const { deviceKey } = deviceMetadata;\n const { deviceGroupKey } = deviceMetadata;\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username: deviceMetadata.deviceKey,\n password: deviceMetadata.randomPassword,\n serverBValue,\n salt,\n });\n const dateNow = getNowString();\n const challengeResponses = {\n USERNAME: challengeParameters?.USERNAME ?? username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: getSignatureString({\n username: deviceKey,\n userPoolName: deviceGroupKey,\n challengeParameters,\n dateNow,\n hkdf,\n }),\n DEVICE_KEY: deviceKey,\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: userPoolClientId,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n}\n","import { AuthError } from '../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * It will retry the function if the error is a `ResourceNotFoundException` and\n * will clean the device keys stored in the storage mechanism.\n *\n */\nasync function retryOnResourceNotFoundException(func, args, username, tokenOrchestrator) {\n try {\n return await func(...args);\n }\n catch (error) {\n if (error instanceof AuthError &&\n error.name === 'ResourceNotFoundException' &&\n error.message.includes('Device does not exist.')) {\n await tokenOrchestrator.clearDeviceMetadata(username);\n return func(...args);\n }\n throw error;\n }\n}\n\nexport { retryOnResourceNotFoundException };\n//# sourceMappingURL=retryOnResourceNotFoundException.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from '../../../errors/AuthError';\n/**\n * It will retry the function if the error is a `ResourceNotFoundException` and\n * will clean the device keys stored in the storage mechanism.\n *\n */\nexport async function retryOnResourceNotFoundException(func, args, username, tokenOrchestrator) {\n try {\n return await func(...args);\n }\n catch (error) {\n if (error instanceof AuthError &&\n error.name === 'ResourceNotFoundException' &&\n error.message.includes('Device does not exist.')) {\n await tokenOrchestrator.clearDeviceMetadata(username);\n return func(...args);\n }\n throw error;\n }\n}\n","import '../../../client/utils/store/autoSignInStore.mjs';\nimport { signInStore } from '../../../client/utils/store/signInStore.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction setActiveSignInUsername(username) {\n const { dispatch } = signInStore;\n dispatch({ type: 'SET_USERNAME', value: username });\n}\n\nexport { setActiveSignInUsername };\n//# sourceMappingURL=setActiveSignInUsername.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { signInStore } from '../../../client/utils/store';\nexport function setActiveSignInUsername(username) {\n const { dispatch } = signInStore;\n dispatch({ type: 'SET_USERNAME', value: username });\n}\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response for authentication.\n * Initiates the selected authentication challenge based on user choice.\n *\n * @param {Object} params - The parameters for handling the selected challenge\n * @param {string} params.username - The username for authentication\n * @param {string} params.session - The current authentication session token\n * @param {string} params.selectedChallenge - The challenge type selected by the user\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n *\n * @returns {Promise} The challenge response\n */\nasync function initiateSelectedChallenge({ username, session, selectedChallenge, config, clientMetadata, }) {\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: config.userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(config.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: {\n USERNAME: username,\n ANSWER: selectedChallenge,\n },\n ClientId: config.userPoolClientId,\n Session: session,\n ClientMetadata: clientMetadata,\n });\n}\n\nexport { initiateSelectedChallenge };\n//# sourceMappingURL=handleSelectChallenge.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\n/**\n * Handles the SELECT_CHALLENGE response for authentication.\n * Initiates the selected authentication challenge based on user choice.\n *\n * @param {Object} params - The parameters for handling the selected challenge\n * @param {string} params.username - The username for authentication\n * @param {string} params.session - The current authentication session token\n * @param {string} params.selectedChallenge - The challenge type selected by the user\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n *\n * @returns {Promise} The challenge response\n */\nexport async function initiateSelectedChallenge({ username, session, selectedChallenge, config, clientMetadata, }) {\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: config.userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(config.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: {\n USERNAME: username,\n ANSWER: selectedChallenge,\n },\n ClientId: config.userPoolClientId,\n Session: session,\n ClientMetadata: clientMetadata,\n });\n}\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password authentication.\n * This function combines the SELECT_CHALLENGE flow with standard password authentication.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n *\n * @returns {Promise} The challenge response\n */\nasync function handleSelectChallengeWithPassword(username, password, clientMetadata, config, session) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const authParameters = {\n ANSWER: 'PASSWORD',\n USERNAME: username,\n PASSWORD: password,\n };\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n return response;\n}\n\nexport { handleSelectChallengeWithPassword };\n//# sourceMappingURL=handleSelectChallengeWithPassword.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername';\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password authentication.\n * This function combines the SELECT_CHALLENGE flow with standard password authentication.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n *\n * @returns {Promise} The challenge response\n */\nexport async function handleSelectChallengeWithPassword(username, password, clientMetadata, config, session) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const authParameters = {\n ANSWER: 'PASSWORD',\n USERNAME: username,\n PASSWORD: password,\n };\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n return response;\n}\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getAuthenticationHelper } from '../../../providers/cognito/utils/srp/getAuthenticationHelper.mjs';\nimport '../../../providers/cognito/utils/srp/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername.mjs';\nimport { retryOnResourceNotFoundException } from '../../../providers/cognito/utils/retryOnResourceNotFoundException.mjs';\nimport { handlePasswordVerifierChallenge } from '../../../providers/cognito/utils/handlePasswordVerifierChallenge.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password SRP authentication.\n * This function combines the SELECT_CHALLENGE flow with Password SRP protocol.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n * @param {AuthTokenOrchestrator} tokenOrchestrator - Token orchestrator for managing auth tokens\n *\n * @returns {Promise} The challenge response\n */\nasync function handleSelectChallengeWithPasswordSRP(username, password, clientMetadata, config, session, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n ANSWER: 'PASSWORD_SRP',\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'PASSWORD_VERIFIER') {\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n response.ChallengeParameters,\n clientMetadata,\n response.Session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return response;\n}\n\nexport { handleSelectChallengeWithPasswordSRP };\n//# sourceMappingURL=handleSelectChallengeWithPasswordSRP.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getAuthenticationHelper } from '../../../providers/cognito/utils/srp';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername';\nimport { retryOnResourceNotFoundException } from '../../../providers/cognito/utils/retryOnResourceNotFoundException';\nimport { handlePasswordVerifierChallenge } from '../../../providers/cognito/utils/handlePasswordVerifierChallenge';\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password SRP authentication.\n * This function combines the SELECT_CHALLENGE flow with Password SRP protocol.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n * @param {AuthTokenOrchestrator} tokenOrchestrator - Token orchestrator for managing auth tokens\n *\n * @returns {Promise} The challenge response\n */\nexport async function handleSelectChallengeWithPasswordSRP(username, password, clientMetadata, config, session, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n ANSWER: 'PASSWORD_SRP',\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'PASSWORD_VERIFIER') {\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n response.ChallengeParameters,\n clientMetadata,\n response.Session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return response;\n}\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { handleCustomAuthFlowWithoutSRP, getActiveSignInUsername, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { setActiveSignInState, resetActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport { retryOnResourceNotFoundException } from '../utils/retryOnResourceNotFoundException.mjs';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using a custom authentication flow without password\n *\n * @param input - The SignInWithCustomAuthInput object\n * @returns AuthSignInResult\n * @throws service: {@link InitiateAuthException } - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws SignInWithCustomAuthOutput - Thrown when the token provider config is invalid.\n */\nasync function signInWithCustomAuth(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { username, password, options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITHOUT_SRP',\n };\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!password, AuthValidationErrorCode.CustomAuthSignInPassword);\n try {\n const { ChallengeName: retriedChallengeName, ChallengeParameters: retiredChallengeParameters, AuthenticationResult, Session, } = await retryOnResourceNotFoundException(handleCustomAuthFlowWithoutSRP, [username, metadata, authConfig, tokenOrchestrator], username, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: retriedChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: retriedChallengeName,\n challengeParameters: retiredChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithCustomAuth };\n//# sourceMappingURL=signInWithCustomAuth.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError';\nimport { getActiveSignInUsername, getSignInResult, getSignInResultFromError, handleCustomAuthFlowWithoutSRP, } from '../utils/signInHelpers';\nimport { resetActiveSignInState, setActiveSignInState, } from '../../../client/utils/store/signInStore';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent';\nimport { retryOnResourceNotFoundException } from '../utils/retryOnResourceNotFoundException';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata';\n/**\n * Signs a user in using a custom authentication flow without password\n *\n * @param input - The SignInWithCustomAuthInput object\n * @returns AuthSignInResult\n * @throws service: {@link InitiateAuthException } - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws SignInWithCustomAuthOutput - Thrown when the token provider config is invalid.\n */\nexport async function signInWithCustomAuth(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { username, password, options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITHOUT_SRP',\n };\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!password, AuthValidationErrorCode.CustomAuthSignInPassword);\n try {\n const { ChallengeName: retriedChallengeName, ChallengeParameters: retiredChallengeParameters, AuthenticationResult, Session, } = await retryOnResourceNotFoundException(handleCustomAuthFlowWithoutSRP, [username, metadata, authConfig, tokenOrchestrator], username, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: retriedChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: retriedChallengeName,\n challengeParameters: retiredChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { handleCustomSRPAuthFlow, getActiveSignInUsername, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { setActiveSignInState, resetActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using a custom authentication flow with SRP\n *\n * @param input - The SignInWithCustomSRPAuthInput object\n * @returns SignInWithCustomSRPAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito\n * service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithCustomSRPAuth(input) {\n const { username, password, options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITH_SRP',\n };\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult, Session, } = await handleCustomSRPAuthFlow(username, password, metadata, authConfig, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithCustomSRPAuth };\n//# sourceMappingURL=signInWithCustomSRPAuth.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError';\nimport { getActiveSignInUsername, getSignInResult, getSignInResultFromError, handleCustomSRPAuthFlow, } from '../utils/signInHelpers';\nimport { resetActiveSignInState, setActiveSignInState, } from '../../../client/utils/store/signInStore';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata';\n/**\n * Signs a user in using a custom authentication flow with SRP\n *\n * @param input - The SignInWithCustomSRPAuthInput object\n * @returns SignInWithCustomSRPAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito\n * service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signInWithCustomSRPAuth(input) {\n const { username, password, options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITH_SRP',\n };\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult, Session, } = await handleCustomSRPAuthFlow(username, password, metadata, authConfig, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { handleUserSRPAuthFlow, getActiveSignInUsername, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { setActiveSignInState, resetActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in\n *\n * @param input - The SignInWithSRPInput object\n * @returns SignInWithSRPOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithSRP(input) {\n const { username, password } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_SRP_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const clientMetaData = input.options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult, Session, } = await handleUserSRPAuthFlow(username, password, clientMetaData, authConfig, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithSRP };\n//# sourceMappingURL=signInWithSRP.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError';\nimport { getActiveSignInUsername, getSignInResult, getSignInResultFromError, handleUserSRPAuthFlow, } from '../utils/signInHelpers';\nimport { resetActiveSignInState, setActiveSignInState, } from '../../../client/utils/store/signInStore';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata';\nimport { resetAutoSignIn } from './autoSignIn';\n/**\n * Signs a user in\n *\n * @param input - The SignInWithSRPInput object\n * @returns SignInWithSRPOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signInWithSRP(input) {\n const { username, password } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_SRP_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const clientMetaData = input.options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult, Session, } = await handleUserSRPAuthFlow(username, password, clientMetaData, authConfig, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n","import { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { AUTO_SIGN_IN_EXCEPTION } from '../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst initialAutoSignIn = async () => {\n throw new AuthError({\n name: AUTO_SIGN_IN_EXCEPTION,\n message: 'The autoSignIn flow has not started, or has been cancelled/completed.',\n recoverySuggestion: 'Please try to use the signIn API or log out before starting a new autoSignIn flow.',\n });\n};\n/**\n * Signs a user in automatically after finishing the sign-up process.\n *\n * This API will automatically sign a user in if the autoSignIn flow has been completed in the following cases:\n * - User confirmed their account with a verification code sent to their phone or email (default option).\n * - User confirmed their account with a verification link sent to their phone or email. In order to\n * enable this option you need to go to the Amazon Cognito [console](https://aws.amazon.com/pm/cognito),\n * look for your userpool, then go to the `Messaging` tab and enable `link` mode inside the `Verification message` option.\n * Finally you need to define the `signUpVerificationMethod` in your `Auth` config.\n *\n * @example\n * ```typescript\n * Amplify.configure({\n * Auth: {\n * Cognito: {\n * ...cognitoConfig,\n * signUpVerificationMethod: \"link\" // the default value is \"code\"\n * }\n *\t}});\n * ```\n *\n * @throws AutoSignInException - Thrown when the autoSignIn flow has not started, or has been cancelled/completed.\n * @returns The signInOutput.\n *\n * @example\n * ```typescript\n * // handleSignUp.ts\n * async function handleSignUp(\n * username:string,\n * password:string\n * ){\n * try {\n * const { nextStep } = await signUp({\n * username,\n * password,\n * options: {\n * userAttributes:{ email:'email@email.com'},\n * autoSignIn: true // This enables the auto sign-in flow.\n * },\n * });\n *\n * handleSignUpStep(nextStep);\n *\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // handleConfirmSignUp.ts\n * async function handleConfirmSignUp(username:string, confirmationCode:string) {\n * try {\n * const { nextStep } = await confirmSignUp({\n * username,\n * confirmationCode,\n * });\n *\n * handleSignUpStep(nextStep);\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // signUpUtils.ts\n * async function handleSignUpStep( step: SignUpOutput[\"nextStep\"]) {\n * switch (step.signUpStep) {\n * case \"CONFIRM_SIGN_UP\":\n *\n * // Redirect end-user to confirm-sign up screen.\n *\n * case \"COMPLETE_AUTO_SIGN_IN\":\n *\t const codeDeliveryDetails = step.codeDeliveryDetails;\n * if (codeDeliveryDetails) {\n * // Redirect user to confirm-sign-up with link screen.\n * }\n * const signInOutput = await autoSignIn();\n * // handle sign-in steps\n * }\n *\n * ```\n */\n// TODO(Eslint): can this be refactored not using `let` on exported member?\n// eslint-disable-next-line import/no-mutable-exports\nlet autoSignIn = initialAutoSignIn;\n/**\n * Sets the context of autoSignIn at run time.\n * @internal\n */\nfunction setAutoSignIn(callback) {\n autoSignIn = callback;\n}\n/**\n * Resets the context\n *\n * @internal\n */\nfunction resetAutoSignIn(resetCallback = true) {\n if (resetCallback) {\n autoSignIn = initialAutoSignIn;\n }\n autoSignInStore.dispatch({ type: 'RESET' });\n}\n\nexport { autoSignIn, resetAutoSignIn, setAutoSignIn };\n//# sourceMappingURL=autoSignIn.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { autoSignInStore } from '../../../client/utils/store';\nimport { AuthError } from '../../../errors/AuthError';\nimport { AUTO_SIGN_IN_EXCEPTION } from '../../../errors/constants';\nconst initialAutoSignIn = async () => {\n throw new AuthError({\n name: AUTO_SIGN_IN_EXCEPTION,\n message: 'The autoSignIn flow has not started, or has been cancelled/completed.',\n recoverySuggestion: 'Please try to use the signIn API or log out before starting a new autoSignIn flow.',\n });\n};\n/**\n * Signs a user in automatically after finishing the sign-up process.\n *\n * This API will automatically sign a user in if the autoSignIn flow has been completed in the following cases:\n * - User confirmed their account with a verification code sent to their phone or email (default option).\n * - User confirmed their account with a verification link sent to their phone or email. In order to\n * enable this option you need to go to the Amazon Cognito [console](https://aws.amazon.com/pm/cognito),\n * look for your userpool, then go to the `Messaging` tab and enable `link` mode inside the `Verification message` option.\n * Finally you need to define the `signUpVerificationMethod` in your `Auth` config.\n *\n * @example\n * ```typescript\n * Amplify.configure({\n * Auth: {\n * Cognito: {\n * ...cognitoConfig,\n * signUpVerificationMethod: \"link\" // the default value is \"code\"\n * }\n *\t}});\n * ```\n *\n * @throws AutoSignInException - Thrown when the autoSignIn flow has not started, or has been cancelled/completed.\n * @returns The signInOutput.\n *\n * @example\n * ```typescript\n * // handleSignUp.ts\n * async function handleSignUp(\n * username:string,\n * password:string\n * ){\n * try {\n * const { nextStep } = await signUp({\n * username,\n * password,\n * options: {\n * userAttributes:{ email:'email@email.com'},\n * autoSignIn: true // This enables the auto sign-in flow.\n * },\n * });\n *\n * handleSignUpStep(nextStep);\n *\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // handleConfirmSignUp.ts\n * async function handleConfirmSignUp(username:string, confirmationCode:string) {\n * try {\n * const { nextStep } = await confirmSignUp({\n * username,\n * confirmationCode,\n * });\n *\n * handleSignUpStep(nextStep);\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // signUpUtils.ts\n * async function handleSignUpStep( step: SignUpOutput[\"nextStep\"]) {\n * switch (step.signUpStep) {\n * case \"CONFIRM_SIGN_UP\":\n *\n * // Redirect end-user to confirm-sign up screen.\n *\n * case \"COMPLETE_AUTO_SIGN_IN\":\n *\t const codeDeliveryDetails = step.codeDeliveryDetails;\n * if (codeDeliveryDetails) {\n * // Redirect user to confirm-sign-up with link screen.\n * }\n * const signInOutput = await autoSignIn();\n * // handle sign-in steps\n * }\n *\n * ```\n */\n// TODO(Eslint): can this be refactored not using `let` on exported member?\n// eslint-disable-next-line import/no-mutable-exports\nexport let autoSignIn = initialAutoSignIn;\n/**\n * Sets the context of autoSignIn at run time.\n * @internal\n */\nexport function setAutoSignIn(callback) {\n autoSignIn = callback;\n}\n/**\n * Resets the context\n *\n * @internal\n */\nexport function resetAutoSignIn(resetCallback = true) {\n if (resetCallback) {\n autoSignIn = initialAutoSignIn;\n }\n autoSignInStore.dispatch({ type: 'RESET' });\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction defaultState() {\n return {\n active: false,\n };\n}\nconst autoSignInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value,\n };\n case 'SET_SESSION':\n return {\n ...state,\n session: action.value,\n };\n case 'START':\n return {\n ...state,\n active: true,\n };\n case 'RESET':\n return defaultState();\n default:\n return state;\n }\n};\nconst createAutoSignInStore = (reducer) => {\n let currentState = reducer(defaultState(), { type: 'RESET' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nconst autoSignInStore = createAutoSignInStore(autoSignInReducer);\n\nexport { autoSignInStore };\n//# sourceMappingURL=autoSignInStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction defaultState() {\n return {\n active: false,\n };\n}\nconst autoSignInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value,\n };\n case 'SET_SESSION':\n return {\n ...state,\n session: action.value,\n };\n case 'START':\n return {\n ...state,\n active: true,\n };\n case 'RESET':\n return defaultState();\n default:\n return state;\n }\n};\nconst createAutoSignInStore = (reducer) => {\n let currentState = reducer(defaultState(), { type: 'RESET' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nexport const autoSignInStore = createAutoSignInStore(autoSignInReducer);\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { handleUserPasswordAuthFlow, getActiveSignInUsername, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { setActiveSignInState, resetActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport { retryOnResourceNotFoundException } from '../utils/retryOnResourceNotFoundException.mjs';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using USER_PASSWORD_AUTH AuthFlowType\n *\n * @param input - The SignInWithUserPasswordInput object\n * @returns SignInWithUserPasswordOutput\n * @throws service: {@link InitiateAuthException } - Cognito service error thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithUserPassword(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_PASSWORD_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: retiredChallengeName, ChallengeParameters: retriedChallengeParameters, AuthenticationResult, Session, } = await retryOnResourceNotFoundException(handleUserPasswordAuthFlow, [username, password, metadata, authConfig, tokenOrchestrator], username, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: retiredChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n ...AuthenticationResult,\n username: activeUsername,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: retiredChallengeName,\n challengeParameters: retriedChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithUserPassword };\n//# sourceMappingURL=signInWithUserPassword.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { getActiveSignInUsername, getSignInResult, getSignInResultFromError, handleUserPasswordAuthFlow, } from '../utils/signInHelpers';\nimport { resetActiveSignInState, setActiveSignInState, } from '../../../client/utils/store/signInStore';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent';\nimport { retryOnResourceNotFoundException } from '../utils/retryOnResourceNotFoundException';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata';\nimport { resetAutoSignIn } from './autoSignIn';\n/**\n * Signs a user in using USER_PASSWORD_AUTH AuthFlowType\n *\n * @param input - The SignInWithUserPasswordInput object\n * @returns SignInWithUserPasswordOutput\n * @throws service: {@link InitiateAuthException } - Cognito service error thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signInWithUserPassword(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_PASSWORD_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: retiredChallengeName, ChallengeParameters: retriedChallengeParameters, AuthenticationResult, Session, } = await retryOnResourceNotFoundException(handleUserPasswordAuthFlow, [username, password, metadata, authConfig, tokenOrchestrator], username, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: retiredChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n ...AuthenticationResult,\n username: activeUsername,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: retiredChallengeName,\n challengeParameters: retriedChallengeParameters,\n });\n }\n catch (error) {\n resetActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { getActiveSignInUsername, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport { setActiveSignInState, resetActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { handleUserAuthFlow } from '../../../client/flows/userAuth/handleUserAuthFlow.mjs';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in through a registered email or phone number without a password by by receiving and entering an OTP.\n *\n * @param input - The SignInWithUserAuthInput object\n * @returns SignInWithUserAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password -- needs to change\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithUserAuth(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const clientMetaData = options?.clientMetadata;\n const preferredChallenge = options?.preferredChallenge;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n try {\n const handleUserAuthFlowInput = {\n username,\n config: authConfig,\n tokenOrchestrator,\n clientMetadata: clientMetaData,\n preferredChallenge,\n password,\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (autoSignInStoreState.active &&\n autoSignInStoreState.username === username) {\n handleUserAuthFlowInput.session = autoSignInStoreState.session;\n }\n const response = await handleUserAuthFlow(handleUserAuthFlowInput);\n const activeUsername = getActiveSignInUsername(username);\n setActiveSignInState({\n signInSession: response.Session,\n username: activeUsername,\n challengeName: response.ChallengeName,\n signInDetails,\n });\n if (response.AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...response.AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: response.AuthenticationResult.NewDeviceMetadata,\n accessToken: response.AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: response.ChallengeName,\n challengeParameters: response.ChallengeParameters,\n availableChallenges: 'AvailableChallenges' in response\n ? response.AvailableChallenges\n : undefined,\n });\n }\n catch (error) {\n resetActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithUserAuth };\n//# sourceMappingURL=signInWithUserAuth.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError';\nimport { getActiveSignInUsername, getSignInResult, getSignInResultFromError, } from '../utils/signInHelpers';\nimport { autoSignInStore } from '../../../client/utils/store';\nimport { resetActiveSignInState, setActiveSignInState, } from '../../../client/utils/store/signInStore';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { handleUserAuthFlow, } from '../../../client/flows/userAuth/handleUserAuthFlow';\nimport { getNewDeviceMetadata } from '../utils/getNewDeviceMetadata';\nimport { resetAutoSignIn } from './autoSignIn';\n/**\n * Signs a user in through a registered email or phone number without a password by by receiving and entering an OTP.\n *\n * @param input - The SignInWithUserAuthInput object\n * @returns SignInWithUserAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password -- needs to change\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signInWithUserAuth(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const clientMetaData = options?.clientMetadata;\n const preferredChallenge = options?.preferredChallenge;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n try {\n const handleUserAuthFlowInput = {\n username,\n config: authConfig,\n tokenOrchestrator,\n clientMetadata: clientMetaData,\n preferredChallenge,\n password,\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (autoSignInStoreState.active &&\n autoSignInStoreState.username === username) {\n handleUserAuthFlowInput.session = autoSignInStoreState.session;\n }\n const response = await handleUserAuthFlow(handleUserAuthFlowInput);\n const activeUsername = getActiveSignInUsername(username);\n setActiveSignInState({\n signInSession: response.Session,\n username: activeUsername,\n challengeName: response.ChallengeName,\n signInDetails,\n });\n if (response.AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...response.AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: response.AuthenticationResult.NewDeviceMetadata,\n accessToken: response.AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n resetActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: response.ChallengeName,\n challengeParameters: response.ChallengeParameters,\n availableChallenges: 'AvailableChallenges' in response\n ? response.AvailableChallenges\n : undefined,\n });\n }\n catch (error) {\n resetActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { handlePasswordSRP } from '../shared/handlePasswordSRP.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles user authentication flow with configurable challenge preferences.\n * Supports AuthFactorType challenges through the USER_AUTH flow.\n *\n * @param {HandleUserAuthFlowInput} params - Authentication flow parameters\n * @param {string} params.username - The username for authentication\n * @param {Record} [params.clientMetadata] - Optional metadata to pass to authentication service\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Manages authentication tokens and device tracking\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred authentication method\n * @param {string} [params.password] - Required when preferredChallenge is 'PASSWORD' or 'PASSWORD_SRP'\n *\n * @returns {Promise} The authentication response from Cognito\n */\nasync function handleUserAuthFlow({ username, clientMetadata, config, tokenOrchestrator, preferredChallenge, password, session, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const authParameters = { USERNAME: username };\n if (preferredChallenge) {\n if (preferredChallenge === 'PASSWORD_SRP') {\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n return handlePasswordSRP({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_AUTH',\n preferredChallenge,\n });\n }\n if (preferredChallenge === 'PASSWORD') {\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n authParameters.PASSWORD = password;\n }\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const jsonReq = {\n AuthFlow: 'USER_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n if (session) {\n jsonReq.Session = session;\n }\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n // Set the active username immediately after successful authentication attempt\n // If a user starts a new sign-in while another sign-in is incomplete,\n // this ensures we're tracking the correct user for subsequent auth challenges.\n setActiveSignInUsername(username);\n return response;\n}\n\nexport { handleUserAuthFlow };\n//# sourceMappingURL=handleUserAuthFlow.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { handlePasswordSRP } from '../shared/handlePasswordSRP';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/setActiveSignInUsername';\n/**\n * Handles user authentication flow with configurable challenge preferences.\n * Supports AuthFactorType challenges through the USER_AUTH flow.\n *\n * @param {HandleUserAuthFlowInput} params - Authentication flow parameters\n * @param {string} params.username - The username for authentication\n * @param {Record} [params.clientMetadata] - Optional metadata to pass to authentication service\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Manages authentication tokens and device tracking\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred authentication method\n * @param {string} [params.password] - Required when preferredChallenge is 'PASSWORD' or 'PASSWORD_SRP'\n *\n * @returns {Promise} The authentication response from Cognito\n */\nexport async function handleUserAuthFlow({ username, clientMetadata, config, tokenOrchestrator, preferredChallenge, password, session, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const authParameters = { USERNAME: username };\n if (preferredChallenge) {\n if (preferredChallenge === 'PASSWORD_SRP') {\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n return handlePasswordSRP({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_AUTH',\n preferredChallenge,\n });\n }\n if (preferredChallenge === 'PASSWORD') {\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n authParameters.PASSWORD = password;\n }\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const jsonReq = {\n AuthFlow: 'USER_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n if (session) {\n jsonReq.Session = session;\n }\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n // Set the active username immediately after successful authentication attempt\n // If a user starts a new sign-in while another sign-in is incomplete,\n // this ensures we're tracking the correct user for subsequent auth challenges.\n setActiveSignInUsername(username);\n return response;\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { parseJsonError, parseJsonBody } from '@aws-amplify/core/internals/aws-client-utils';\nimport { validationErrorMap } from '../../../../common/AuthErrorStrings.mjs';\nimport { AuthError } from '../../../../errors/AuthError.mjs';\nimport { AuthValidationErrorCode } from '../../../../errors/types/validation.mjs';\nimport { assertServiceError } from '../../../../errors/utils/assertServiceError.mjs';\nimport { SignUpException } from '../../../../providers/cognito/types/errors.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createSignUpClientDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n if (\n // Missing Password Error\n // 1 validation error detected: Value at 'password'failed to satisfy constraint: Member must not be null\n error.name === SignUpException.InvalidParameterException &&\n /'password'/.test(error.message) &&\n /Member must not be null/.test(error.message)) {\n const name = AuthValidationErrorCode.EmptySignUpPassword;\n const { message, recoverySuggestion } = validationErrorMap[name];\n throw new AuthError({\n name,\n message,\n recoverySuggestion,\n });\n }\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\nconst createSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('SignUp'), createSignUpClientDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createSignUpClient, createSignUpClientDeserializer };\n//# sourceMappingURL=createSignUpClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { parseJsonBody, parseJsonError, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { validationErrorMap } from '../../../../common/AuthErrorStrings';\nimport { AuthError } from '../../../../errors/AuthError';\nimport { AuthValidationErrorCode } from '../../../../errors/types/validation';\nimport { assertServiceError } from '../../../../errors/utils/assertServiceError';\nimport { SignUpException } from '../../../../providers/cognito/types/errors';\nimport { createUserPoolSerializer } from './shared/serde';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createSignUpClientDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n if (\n // Missing Password Error\n // 1 validation error detected: Value at 'password'failed to satisfy constraint: Member must not be null\n error.name === SignUpException.InvalidParameterException &&\n /'password'/.test(error.message) &&\n /Member must not be null/.test(error.message)) {\n const name = AuthValidationErrorCode.EmptySignUpPassword;\n const { message, recoverySuggestion } = validationErrorMap[name];\n throw new AuthError({\n name,\n message,\n recoverySuggestion,\n });\n }\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\nexport const createSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('SignUp'), createSignUpClientDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction, HubInternal } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms a new user account.\n *\n * @param input - The ConfirmSignUpInput object.\n * @returns ConfirmSignUpOutput\n * @throws -{@link ConfirmSignUpException }\n * Thrown due to an invalid confirmation code.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmSignUp(input) {\n const { username, confirmationCode, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const clientMetadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmSignUpUsername);\n assertValidationError(!!confirmationCode, AuthValidationErrorCode.EmptyConfirmSignUpCode);\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmSignUpClient = createConfirmSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session: session } = await confirmSignUpClient({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignUp),\n }, {\n Username: username,\n ConfirmationCode: confirmationCode,\n ClientMetadata: clientMetadata,\n ForceAliasCreation: options?.forceAliasCreation,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n return new Promise((resolve, reject) => {\n try {\n const signUpOut = {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (!autoSignInStoreState.active ||\n autoSignInStoreState.username !== username) {\n resolve(signUpOut);\n resetAutoSignIn();\n return;\n }\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n const stopListener = HubInternal.listen('auth-internal', ({ payload }) => {\n switch (payload.event) {\n case 'autoSignIn':\n resolve({\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n });\n stopListener();\n }\n });\n HubInternal.dispatch('auth-internal', {\n event: 'confirmSignUp',\n data: signUpOut,\n });\n }\n catch (error) {\n reject(error);\n }\n });\n}\n\nexport { confirmSignUp };\n//# sourceMappingURL=confirmSignUp.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, HubInternal, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getUserContextData } from '../utils/userContextData';\nimport { createConfirmSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { autoSignInStore } from '../../../client/utils/store';\nimport { resetAutoSignIn } from './autoSignIn';\n/**\n * Confirms a new user account.\n *\n * @param input - The ConfirmSignUpInput object.\n * @returns ConfirmSignUpOutput\n * @throws -{@link ConfirmSignUpException }\n * Thrown due to an invalid confirmation code.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function confirmSignUp(input) {\n const { username, confirmationCode, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const clientMetadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmSignUpUsername);\n assertValidationError(!!confirmationCode, AuthValidationErrorCode.EmptyConfirmSignUpCode);\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmSignUpClient = createConfirmSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session: session } = await confirmSignUpClient({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignUp),\n }, {\n Username: username,\n ConfirmationCode: confirmationCode,\n ClientMetadata: clientMetadata,\n ForceAliasCreation: options?.forceAliasCreation,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n return new Promise((resolve, reject) => {\n try {\n const signUpOut = {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (!autoSignInStoreState.active ||\n autoSignInStoreState.username !== username) {\n resolve(signUpOut);\n resetAutoSignIn();\n return;\n }\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n const stopListener = HubInternal.listen('auth-internal', ({ payload }) => {\n switch (payload.event) {\n case 'autoSignIn':\n resolve({\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n });\n stopListener();\n }\n });\n HubInternal.dispatch('auth-internal', {\n event: 'confirmSignUp',\n data: signUpOut,\n });\n }\n catch (error) {\n reject(error);\n }\n });\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmSignUp'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmSignUpClient };\n//# sourceMappingURL=createConfirmSignUpClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nexport const createConfirmSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmSignUp'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createResendConfirmationCodeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createResendConfirmationCodeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resend the confirmation code while signing up\n *\n * @param input - The ResendSignUpCodeInput object\n * @returns ResendSignUpCodeOutput\n * @throws service: {@link ResendConfirmationException } - Cognito service errors thrown when resending the code.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function resendSignUpCode(input) {\n const { username } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignUpUsername);\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const resendConfirmationCode = createResendConfirmationCodeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetails } = await resendConfirmationCode({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ResendSignUpCode),\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n const { DeliveryMedium, AttributeName, Destination } = {\n ...CodeDeliveryDetails,\n };\n return {\n destination: Destination,\n deliveryMedium: DeliveryMedium,\n attributeName: AttributeName\n ? AttributeName\n : undefined,\n };\n}\n\nexport { resendSignUpCode };\n//# sourceMappingURL=resendSignUpCode.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getUserContextData } from '../utils/userContextData';\nimport { createResendConfirmationCodeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\n/**\n * Resend the confirmation code while signing up\n *\n * @param input - The ResendSignUpCodeInput object\n * @returns ResendSignUpCodeOutput\n * @throws service: {@link ResendConfirmationException } - Cognito service errors thrown when resending the code.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function resendSignUpCode(input) {\n const { username } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignUpUsername);\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const resendConfirmationCode = createResendConfirmationCodeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetails } = await resendConfirmationCode({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ResendSignUpCode),\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n const { DeliveryMedium, AttributeName, Destination } = {\n ...CodeDeliveryDetails,\n };\n return {\n destination: Destination,\n deliveryMedium: DeliveryMedium,\n attributeName: AttributeName\n ? AttributeName\n : undefined,\n };\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createResendConfirmationCodeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ResendConfirmationCode'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createResendConfirmationCodeClient };\n//# sourceMappingURL=createResendConfirmationCodeClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createResendConfirmationCodeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ResendConfirmationCode'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, assertOAuthConfig, urlSafeEncode, isBrowser, AuthAction } from '@aws-amplify/core/internals/utils';\nimport '../utils/oauth/enableOAuthListener.mjs';\nimport { cognitoHostedUIIdentityProviderMap } from '../types/models.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { openAuthSession } from '../../../utils/openAuthSession.mjs';\nimport { assertUserNotAuthenticated } from '../utils/signInHelpers.mjs';\nimport { generateCodeVerifier } from '../utils/oauth/generateCodeVerifier.mjs';\nimport { generateState } from '../utils/oauth/generateState.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { oAuthStore } from '../utils/oauth/oAuthStore.mjs';\nimport '../tokenProvider/tokenProvider.mjs';\nimport { getRedirectUrl } from '../utils/oauth/getRedirectUrl.mjs';\nimport { handleFailure } from '../utils/oauth/handleFailure.mjs';\nimport { completeOAuthFlow } from '../utils/oauth/completeOAuthFlow.mjs';\nimport '../../../types/Auth.mjs';\nimport { createOAuthError } from '../utils/oauth/createOAuthError.mjs';\nimport { listenForOAuthFlowCancellation } from '../utils/oauth/cancelOAuthFlow.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs in a user with OAuth. Redirects the application to an Identity Provider.\n *\n * @param input - The SignInWithRedirectInput object, if empty it will redirect to Cognito HostedUI\n *\n * @throws AuthTokenConfigException - Thrown when the user pool config is invalid.\n * @throws OAuthNotConfigureException - Thrown when the oauth config is invalid.\n */\nasync function signInWithRedirect(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n assertOAuthConfig(authConfig);\n oAuthStore.setAuthConfig(authConfig);\n await assertUserNotAuthenticated();\n let provider = 'COGNITO'; // Default\n if (typeof input?.provider === 'string') {\n provider = cognitoHostedUIIdentityProviderMap[input.provider];\n }\n else if (input?.provider?.custom) {\n provider = input.provider.custom;\n }\n return oauthSignIn({\n oauthConfig: authConfig.loginWith.oauth,\n clientId: authConfig.userPoolClientId,\n provider,\n customState: input?.customState,\n preferPrivateSession: input?.options?.preferPrivateSession,\n options: {\n loginHint: input?.options?.loginHint,\n lang: input?.options?.lang,\n nonce: input?.options?.nonce,\n },\n });\n}\nconst oauthSignIn = async ({ oauthConfig, provider, clientId, customState, preferPrivateSession, options, }) => {\n const { domain, redirectSignIn, responseType, scopes } = oauthConfig;\n const { loginHint, lang, nonce } = options ?? {};\n const randomState = generateState();\n /* encodeURIComponent is not URL safe, use urlSafeEncode instead. Cognito\n single-encodes/decodes url on first sign in and double-encodes/decodes url\n when user already signed in. Using encodeURIComponent, Base32, Base64 add\n characters % or = which on further encoding becomes unsafe. '=' create issue\n for parsing query params.\n Refer: https://github.com/aws-amplify/amplify-js/issues/5218 */\n const state = customState\n ? `${randomState}-${urlSafeEncode(customState)}`\n : randomState;\n const { value, method, toCodeChallenge } = generateCodeVerifier(128);\n const redirectUri = getRedirectUrl(oauthConfig.redirectSignIn);\n if (isBrowser())\n oAuthStore.storeOAuthInFlight(true);\n oAuthStore.storeOAuthState(state);\n oAuthStore.storePKCE(value);\n const queryString = Object.entries({\n redirect_uri: redirectUri,\n response_type: responseType,\n client_id: clientId,\n identity_provider: provider,\n scope: scopes.join(' '),\n // eslint-disable-next-line camelcase\n ...(loginHint && { login_hint: loginHint }),\n ...(lang && { lang }),\n ...(nonce && { nonce }),\n state,\n ...(responseType === 'code' && {\n code_challenge: toCodeChallenge(),\n code_challenge_method: method,\n }),\n })\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&');\n // TODO(v6): use URL object instead\n const oAuthUrl = `https://${domain}/oauth2/authorize?${queryString}`;\n // this will only take effect in the following scenarios:\n // 1. the user cancels the OAuth flow on web via back button, and\n // 2. when bfcache is enabled\n listenForOAuthFlowCancellation(oAuthStore);\n // the following is effective only in react-native as openAuthSession resolves only in react-native\n const { type, error, url } = (await openAuthSession(oAuthUrl)) ??\n {};\n try {\n if (type === 'error') {\n throw createOAuthError(String(error));\n }\n if (type === 'success' && url) {\n await completeOAuthFlow({\n currentUrl: url,\n clientId,\n domain,\n redirectUri,\n responseType,\n userAgentValue: getAuthUserAgentValue(AuthAction.SignInWithRedirect),\n preferPrivateSession,\n });\n }\n }\n catch (err) {\n await handleFailure(err);\n // rethrow the error so it can be caught by `await signInWithRedirect()` in react-native\n throw err;\n }\n};\n\nexport { signInWithRedirect };\n//# sourceMappingURL=signInWithRedirect.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertOAuthConfig, assertTokenProviderConfig, isBrowser, urlSafeEncode, } from '@aws-amplify/core/internals/utils';\nimport '../utils/oauth/enableOAuthListener';\nimport { cognitoHostedUIIdentityProviderMap } from '../types/models';\nimport { getAuthUserAgentValue, openAuthSession } from '../../../utils';\nimport { assertUserNotAuthenticated } from '../utils/signInHelpers';\nimport { completeOAuthFlow, generateCodeVerifier, generateState, getRedirectUrl, handleFailure, oAuthStore, } from '../utils/oauth';\nimport { createOAuthError } from '../utils/oauth/createOAuthError';\nimport { listenForOAuthFlowCancellation } from '../utils/oauth/cancelOAuthFlow';\n/**\n * Signs in a user with OAuth. Redirects the application to an Identity Provider.\n *\n * @param input - The SignInWithRedirectInput object, if empty it will redirect to Cognito HostedUI\n *\n * @throws AuthTokenConfigException - Thrown when the user pool config is invalid.\n * @throws OAuthNotConfigureException - Thrown when the oauth config is invalid.\n */\nexport async function signInWithRedirect(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n assertOAuthConfig(authConfig);\n oAuthStore.setAuthConfig(authConfig);\n await assertUserNotAuthenticated();\n let provider = 'COGNITO'; // Default\n if (typeof input?.provider === 'string') {\n provider = cognitoHostedUIIdentityProviderMap[input.provider];\n }\n else if (input?.provider?.custom) {\n provider = input.provider.custom;\n }\n return oauthSignIn({\n oauthConfig: authConfig.loginWith.oauth,\n clientId: authConfig.userPoolClientId,\n provider,\n customState: input?.customState,\n preferPrivateSession: input?.options?.preferPrivateSession,\n options: {\n loginHint: input?.options?.loginHint,\n lang: input?.options?.lang,\n nonce: input?.options?.nonce,\n },\n });\n}\nconst oauthSignIn = async ({ oauthConfig, provider, clientId, customState, preferPrivateSession, options, }) => {\n const { domain, redirectSignIn, responseType, scopes } = oauthConfig;\n const { loginHint, lang, nonce } = options ?? {};\n const randomState = generateState();\n /* encodeURIComponent is not URL safe, use urlSafeEncode instead. Cognito\n single-encodes/decodes url on first sign in and double-encodes/decodes url\n when user already signed in. Using encodeURIComponent, Base32, Base64 add\n characters % or = which on further encoding becomes unsafe. '=' create issue\n for parsing query params.\n Refer: https://github.com/aws-amplify/amplify-js/issues/5218 */\n const state = customState\n ? `${randomState}-${urlSafeEncode(customState)}`\n : randomState;\n const { value, method, toCodeChallenge } = generateCodeVerifier(128);\n const redirectUri = getRedirectUrl(oauthConfig.redirectSignIn);\n if (isBrowser())\n oAuthStore.storeOAuthInFlight(true);\n oAuthStore.storeOAuthState(state);\n oAuthStore.storePKCE(value);\n const queryString = Object.entries({\n redirect_uri: redirectUri,\n response_type: responseType,\n client_id: clientId,\n identity_provider: provider,\n scope: scopes.join(' '),\n // eslint-disable-next-line camelcase\n ...(loginHint && { login_hint: loginHint }),\n ...(lang && { lang }),\n ...(nonce && { nonce }),\n state,\n ...(responseType === 'code' && {\n code_challenge: toCodeChallenge(),\n code_challenge_method: method,\n }),\n })\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&');\n // TODO(v6): use URL object instead\n const oAuthUrl = `https://${domain}/oauth2/authorize?${queryString}`;\n // this will only take effect in the following scenarios:\n // 1. the user cancels the OAuth flow on web via back button, and\n // 2. when bfcache is enabled\n listenForOAuthFlowCancellation(oAuthStore);\n // the following is effective only in react-native as openAuthSession resolves only in react-native\n const { type, error, url } = (await openAuthSession(oAuthUrl, redirectSignIn, preferPrivateSession)) ??\n {};\n try {\n if (type === 'error') {\n throw createOAuthError(String(error));\n }\n if (type === 'success' && url) {\n await completeOAuthFlow({\n currentUrl: url,\n clientId,\n domain,\n redirectUri,\n responseType,\n userAgentValue: getAuthUserAgentValue(AuthAction.SignInWithRedirect),\n preferPrivateSession,\n });\n }\n }\n catch (err) {\n await handleFailure(err);\n // rethrow the error so it can be caught by `await signInWithRedirect()` in react-native\n throw err;\n }\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction urlSafeEncode(str) {\n return str\n .split('')\n .map(char => char.charCodeAt(0).toString(16).padStart(2, '0'))\n .join('');\n}\n\nexport { urlSafeEncode };\n//# sourceMappingURL=urlSafeEncode.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function urlSafeEncode(str) {\n return str\n .split('')\n .map(char => char.charCodeAt(0).toString(16).padStart(2, '0'))\n .join('');\n}\n","import { Amplify } from '@aws-amplify/core';\nimport { isBrowser, ADD_OAUTH_LISTENER } from '@aws-amplify/core/internals/utils';\nimport { attemptCompleteOAuthFlow } from './attemptCompleteOAuthFlow.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// attach the side effect for handling the completion of an inflight oauth flow\n// this side effect works only on Web\nisBrowser() &&\n (() => {\n // add the listener to the singleton for triggering\n Amplify[ADD_OAUTH_LISTENER](attemptCompleteOAuthFlow);\n })();\n//# sourceMappingURL=enableOAuthListener.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { ADD_OAUTH_LISTENER, isBrowser, } from '@aws-amplify/core/internals/utils';\nimport { attemptCompleteOAuthFlow } from './attemptCompleteOAuthFlow';\n// attach the side effect for handling the completion of an inflight oauth flow\n// this side effect works only on Web\nisBrowser() &&\n (() => {\n // add the listener to the singleton for triggering\n Amplify[ADD_OAUTH_LISTENER](attemptCompleteOAuthFlow);\n })();\n","import { assertTokenProviderConfig, assertOAuthConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getAuthUserAgentValue } from '../../../../utils/getAuthUserAgentValue.mjs';\nimport { oAuthStore } from './oAuthStore.mjs';\nimport { completeOAuthFlow } from './completeOAuthFlow.mjs';\nimport { getRedirectUrl } from './getRedirectUrl.mjs';\nimport { handleFailure } from './handleFailure.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst attemptCompleteOAuthFlow = async (authConfig) => {\n try {\n assertTokenProviderConfig(authConfig);\n assertOAuthConfig(authConfig);\n oAuthStore.setAuthConfig(authConfig);\n }\n catch (_) {\n // no-op\n // This should not happen as Amplify singleton checks the oauth config key\n // unless the oauth config object doesn't contain required properties\n return;\n }\n // No inflight OAuth\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n try {\n const currentUrl = window.location.href;\n const { loginWith, userPoolClientId } = authConfig;\n const { domain, redirectSignIn, responseType } = loginWith.oauth;\n const redirectUri = getRedirectUrl(redirectSignIn);\n await completeOAuthFlow({\n currentUrl,\n clientId: userPoolClientId,\n domain,\n redirectUri,\n responseType,\n userAgentValue: getAuthUserAgentValue(AuthAction.SignInWithRedirect),\n });\n }\n catch (err) {\n await handleFailure(err);\n }\n};\n\nexport { attemptCompleteOAuthFlow };\n//# sourceMappingURL=attemptCompleteOAuthFlow.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthAction, assertOAuthConfig, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { getAuthUserAgentValue } from '../../../../utils';\nimport { oAuthStore } from './oAuthStore';\nimport { completeOAuthFlow } from './completeOAuthFlow';\nimport { getRedirectUrl } from './getRedirectUrl';\nimport { handleFailure } from './handleFailure';\nexport const attemptCompleteOAuthFlow = async (authConfig) => {\n try {\n assertTokenProviderConfig(authConfig);\n assertOAuthConfig(authConfig);\n oAuthStore.setAuthConfig(authConfig);\n }\n catch (_) {\n // no-op\n // This should not happen as Amplify singleton checks the oauth config key\n // unless the oauth config object doesn't contain required properties\n return;\n }\n // No inflight OAuth\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n try {\n const currentUrl = window.location.href;\n const { loginWith, userPoolClientId } = authConfig;\n const { domain, redirectSignIn, responseType } = loginWith.oauth;\n const redirectUri = getRedirectUrl(redirectSignIn);\n await completeOAuthFlow({\n currentUrl,\n clientId: userPoolClientId,\n domain,\n redirectUri,\n responseType,\n userAgentValue: getAuthUserAgentValue(AuthAction.SignInWithRedirect),\n });\n }\n catch (err) {\n await handleFailure(err);\n }\n};\n","import { AmplifyUrl, USER_AGENT_HEADER, urlSafeDecode, AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { decodeJWT, Hub } from '@aws-amplify/core';\nimport { cacheCognitoTokens } from '../../tokenProvider/cacheTokens.mjs';\nimport { dispatchSignedInHubEvent } from '../dispatchSignedInHubEvent.mjs';\nimport '../refreshAuthTokens.mjs';\nimport '../../tokenProvider/errorHelpers.mjs';\nimport { oAuthStore } from './oAuthStore.mjs';\nimport { resolveAndClearInflightPromises } from './inflightPromise.mjs';\nimport { tokenOrchestrator } from '../../tokenProvider/tokenProvider.mjs';\nimport { createOAuthError } from './createOAuthError.mjs';\nimport { validateState } from './validateState.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst completeOAuthFlow = async ({ currentUrl, userAgentValue, clientId, redirectUri, responseType, domain, preferPrivateSession, }) => {\n const urlParams = new AmplifyUrl(currentUrl);\n const error = urlParams.searchParams.get('error');\n const errorMessage = urlParams.searchParams.get('error_description');\n if (error) {\n throw createOAuthError(errorMessage ?? error);\n }\n if (responseType === 'code') {\n return handleCodeFlow({\n currentUrl,\n userAgentValue,\n clientId,\n redirectUri,\n domain,\n preferPrivateSession,\n });\n }\n return handleImplicitFlow({\n currentUrl,\n redirectUri,\n preferPrivateSession,\n });\n};\nconst handleCodeFlow = async ({ currentUrl, userAgentValue, clientId, redirectUri, domain, preferPrivateSession, }) => {\n /* Convert URL into an object with parameters as keys\n{ redirect_uri: 'http://localhost:3000/', response_type: 'code', ...} */\n const url = new AmplifyUrl(currentUrl);\n const code = url.searchParams.get('code');\n const state = url.searchParams.get('state');\n // if `code` or `state` is not presented in the redirect url, most likely\n // that the end user cancelled the inflight oauth flow by:\n // 1. clicking the back button of browser\n // 2. closing the provider hosted UI page and coming back to the app\n if (!code || !state) {\n throw createOAuthError('User cancelled OAuth flow.');\n }\n // may throw error is being caught in attemptCompleteOAuthFlow.ts\n const validatedState = await validateState(state);\n const oAuthTokenEndpoint = 'https://' + domain + '/oauth2/token';\n // TODO(v6): check hub events\n // dispatchAuthEvent(\n // \t'codeFlow',\n // \t{},\n // \t`Retrieving tokens from ${oAuthTokenEndpoint}`\n // );\n const codeVerifier = await oAuthStore.loadPKCE();\n const oAuthTokenBody = {\n grant_type: 'authorization_code',\n code,\n client_id: clientId,\n redirect_uri: redirectUri,\n ...(codeVerifier ? { code_verifier: codeVerifier } : {}),\n };\n const body = Object.entries(oAuthTokenBody)\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&');\n const { access_token, refresh_token: refreshToken, id_token, error, error_message: errorMessage, token_type, expires_in, } = await (await fetch(oAuthTokenEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n [USER_AGENT_HEADER]: userAgentValue,\n },\n body,\n })).json();\n if (error) {\n // error is being caught in attemptCompleteOAuthFlow.ts\n throw createOAuthError(errorMessage ?? error);\n }\n const username = (access_token && decodeJWT(access_token).payload.username) ?? 'username';\n await cacheCognitoTokens({\n username,\n AccessToken: access_token,\n IdToken: id_token,\n RefreshToken: refreshToken});\n return completeFlow({\n redirectUri,\n state: validatedState,\n preferPrivateSession,\n });\n};\nconst handleImplicitFlow = async ({ currentUrl, redirectUri, preferPrivateSession, }) => {\n // hash is `null` if `#` doesn't exist on URL\n const url = new AmplifyUrl(currentUrl);\n const { id_token, access_token, state, token_type, expires_in, error_description, error, } = (url.hash ?? '#')\n .substring(1) // Remove # from returned code\n .split('&')\n .map(pairings => pairings.split('='))\n .reduce((accum, [k, v]) => ({ ...accum, [k]: v }), {\n id_token: undefined,\n access_token: undefined,\n state: undefined,\n token_type: undefined,\n expires_in: undefined,\n error_description: undefined,\n error: undefined,\n });\n if (error) {\n throw createOAuthError(error_description ?? error);\n }\n if (!access_token) {\n // error is being caught in attemptCompleteOAuthFlow.ts\n throw createOAuthError('No access token returned from OAuth flow.');\n }\n const validatedState = await validateState(state);\n const username = (access_token && decodeJWT(access_token).payload.username) ?? 'username';\n await cacheCognitoTokens({\n username,\n AccessToken: access_token,\n IdToken: id_token});\n return completeFlow({\n redirectUri,\n state: validatedState,\n preferPrivateSession,\n });\n};\nconst completeFlow = async ({ redirectUri, state, preferPrivateSession, }) => {\n await tokenOrchestrator.setOAuthMetadata({\n oauthSignIn: true,\n });\n await oAuthStore.clearOAuthData();\n await oAuthStore.storeOAuthSignIn(true, preferPrivateSession);\n // this should be called before any call that involves `fetchAuthSession`\n // e.g. `getCurrentUser()` below, so it allows every inflight async calls to\n // `fetchAuthSession` can be resolved\n resolveAndClearInflightPromises();\n // clear history before sending out final Hub events\n clearHistory(redirectUri);\n if (isCustomState(state)) {\n Hub.dispatch('auth', {\n event: 'customOAuthState',\n data: urlSafeDecode(getCustomState(state)),\n }, 'Auth', AMPLIFY_SYMBOL);\n }\n Hub.dispatch('auth', { event: 'signInWithRedirect' }, 'Auth', AMPLIFY_SYMBOL);\n await dispatchSignedInHubEvent();\n};\nconst isCustomState = (state) => {\n return /-/.test(state);\n};\nconst getCustomState = (state) => {\n return state.split('-').splice(1).join('-');\n};\nconst clearHistory = (redirectUri) => {\n if (typeof window !== 'undefined' && typeof window.history !== 'undefined') {\n window.history.replaceState(window.history.state, '', redirectUri);\n }\n};\n\nexport { completeOAuthFlow };\n//# sourceMappingURL=completeOAuthFlow.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AMPLIFY_SYMBOL, AmplifyUrl, USER_AGENT_HEADER, urlSafeDecode, } from '@aws-amplify/core/internals/utils';\nimport { Hub, decodeJWT } from '@aws-amplify/core';\nimport { cacheCognitoTokens } from '../../tokenProvider/cacheTokens';\nimport { dispatchSignedInHubEvent } from '../dispatchSignedInHubEvent';\nimport { tokenOrchestrator } from '../../tokenProvider';\nimport { createOAuthError } from './createOAuthError';\nimport { resolveAndClearInflightPromises } from './inflightPromise';\nimport { validateState } from './validateState';\nimport { oAuthStore } from './oAuthStore';\nexport const completeOAuthFlow = async ({ currentUrl, userAgentValue, clientId, redirectUri, responseType, domain, preferPrivateSession, }) => {\n const urlParams = new AmplifyUrl(currentUrl);\n const error = urlParams.searchParams.get('error');\n const errorMessage = urlParams.searchParams.get('error_description');\n if (error) {\n throw createOAuthError(errorMessage ?? error);\n }\n if (responseType === 'code') {\n return handleCodeFlow({\n currentUrl,\n userAgentValue,\n clientId,\n redirectUri,\n domain,\n preferPrivateSession,\n });\n }\n return handleImplicitFlow({\n currentUrl,\n redirectUri,\n preferPrivateSession,\n });\n};\nconst handleCodeFlow = async ({ currentUrl, userAgentValue, clientId, redirectUri, domain, preferPrivateSession, }) => {\n /* Convert URL into an object with parameters as keys\n{ redirect_uri: 'http://localhost:3000/', response_type: 'code', ...} */\n const url = new AmplifyUrl(currentUrl);\n const code = url.searchParams.get('code');\n const state = url.searchParams.get('state');\n // if `code` or `state` is not presented in the redirect url, most likely\n // that the end user cancelled the inflight oauth flow by:\n // 1. clicking the back button of browser\n // 2. closing the provider hosted UI page and coming back to the app\n if (!code || !state) {\n throw createOAuthError('User cancelled OAuth flow.');\n }\n // may throw error is being caught in attemptCompleteOAuthFlow.ts\n const validatedState = await validateState(state);\n const oAuthTokenEndpoint = 'https://' + domain + '/oauth2/token';\n // TODO(v6): check hub events\n // dispatchAuthEvent(\n // \t'codeFlow',\n // \t{},\n // \t`Retrieving tokens from ${oAuthTokenEndpoint}`\n // );\n const codeVerifier = await oAuthStore.loadPKCE();\n const oAuthTokenBody = {\n grant_type: 'authorization_code',\n code,\n client_id: clientId,\n redirect_uri: redirectUri,\n ...(codeVerifier ? { code_verifier: codeVerifier } : {}),\n };\n const body = Object.entries(oAuthTokenBody)\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&');\n const { access_token, refresh_token: refreshToken, id_token, error, error_message: errorMessage, token_type, expires_in, } = await (await fetch(oAuthTokenEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n [USER_AGENT_HEADER]: userAgentValue,\n },\n body,\n })).json();\n if (error) {\n // error is being caught in attemptCompleteOAuthFlow.ts\n throw createOAuthError(errorMessage ?? error);\n }\n const username = (access_token && decodeJWT(access_token).payload.username) ?? 'username';\n await cacheCognitoTokens({\n username,\n AccessToken: access_token,\n IdToken: id_token,\n RefreshToken: refreshToken,\n TokenType: token_type,\n ExpiresIn: expires_in,\n });\n return completeFlow({\n redirectUri,\n state: validatedState,\n preferPrivateSession,\n });\n};\nconst handleImplicitFlow = async ({ currentUrl, redirectUri, preferPrivateSession, }) => {\n // hash is `null` if `#` doesn't exist on URL\n const url = new AmplifyUrl(currentUrl);\n const { id_token, access_token, state, token_type, expires_in, error_description, error, } = (url.hash ?? '#')\n .substring(1) // Remove # from returned code\n .split('&')\n .map(pairings => pairings.split('='))\n .reduce((accum, [k, v]) => ({ ...accum, [k]: v }), {\n id_token: undefined,\n access_token: undefined,\n state: undefined,\n token_type: undefined,\n expires_in: undefined,\n error_description: undefined,\n error: undefined,\n });\n if (error) {\n throw createOAuthError(error_description ?? error);\n }\n if (!access_token) {\n // error is being caught in attemptCompleteOAuthFlow.ts\n throw createOAuthError('No access token returned from OAuth flow.');\n }\n const validatedState = await validateState(state);\n const username = (access_token && decodeJWT(access_token).payload.username) ?? 'username';\n await cacheCognitoTokens({\n username,\n AccessToken: access_token,\n IdToken: id_token,\n TokenType: token_type,\n ExpiresIn: expires_in,\n });\n return completeFlow({\n redirectUri,\n state: validatedState,\n preferPrivateSession,\n });\n};\nconst completeFlow = async ({ redirectUri, state, preferPrivateSession, }) => {\n await tokenOrchestrator.setOAuthMetadata({\n oauthSignIn: true,\n });\n await oAuthStore.clearOAuthData();\n await oAuthStore.storeOAuthSignIn(true, preferPrivateSession);\n // this should be called before any call that involves `fetchAuthSession`\n // e.g. `getCurrentUser()` below, so it allows every inflight async calls to\n // `fetchAuthSession` can be resolved\n resolveAndClearInflightPromises();\n // clear history before sending out final Hub events\n clearHistory(redirectUri);\n if (isCustomState(state)) {\n Hub.dispatch('auth', {\n event: 'customOAuthState',\n data: urlSafeDecode(getCustomState(state)),\n }, 'Auth', AMPLIFY_SYMBOL);\n }\n Hub.dispatch('auth', { event: 'signInWithRedirect' }, 'Auth', AMPLIFY_SYMBOL);\n await dispatchSignedInHubEvent();\n};\nconst isCustomState = (state) => {\n return /-/.test(state);\n};\nconst getCustomState = (state) => {\n return state.split('-').splice(1).join('-');\n};\nconst clearHistory = (redirectUri) => {\n if (typeof window !== 'undefined' && typeof window.history !== 'undefined') {\n window.history.replaceState(window.history.state, '', redirectUri);\n }\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction urlSafeDecode(hex) {\n const matchArr = hex.match(/.{2}/g) || [];\n return matchArr.map(char => String.fromCharCode(parseInt(char, 16))).join('');\n}\n\nexport { urlSafeDecode };\n//# sourceMappingURL=urlSafeDecode.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function urlSafeDecode(hex) {\n const matchArr = hex.match(/.{2}/g) || [];\n return matchArr.map(char => String.fromCharCode(parseInt(char, 16))).join('');\n}\n","import { authErrorMessages } from '../../../../Errors.mjs';\nimport { AuthErrorCodes } from '../../../../common/AuthErrorStrings.mjs';\nimport { AuthError } from '../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createOAuthError = (message, recoverySuggestion) => new AuthError({\n message: message ?? 'An error has occurred during the oauth process.',\n name: AuthErrorCodes.OAuthSignInError,\n recoverySuggestion: recoverySuggestion ?? authErrorMessages.oauthSignInError.log,\n});\n\nexport { createOAuthError };\n//# sourceMappingURL=createOAuthError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { authErrorMessages } from '../../../../Errors';\nimport { AuthErrorCodes } from '../../../../common/AuthErrorStrings';\nimport { AuthError } from '../../../../errors/AuthError';\nexport const createOAuthError = (message, recoverySuggestion) => new AuthError({\n message: message ?? 'An error has occurred during the oauth process.',\n name: AuthErrorCodes.OAuthSignInError,\n recoverySuggestion: recoverySuggestion ?? authErrorMessages.oauthSignInError.log,\n});\n","import { ConsoleLogger } from '@aws-amplify/core';\nimport { AuthErrorStrings } from './common/AuthErrorStrings.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: delete this module when the Auth class is removed.\nconst logger = new ConsoleLogger('AuthError');\nclass AuthError extends Error {\n constructor(type) {\n const { message, log } = authErrorMessages[type];\n super(message);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n this.name = 'AuthError';\n this.log = log || message;\n logger.error(this.log);\n }\n}\nclass NoUserPoolError extends AuthError {\n constructor(type) {\n super(type);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = NoUserPoolError;\n Object.setPrototypeOf(this, NoUserPoolError.prototype);\n this.name = 'NoUserPoolError';\n }\n}\nconst authErrorMessages = {\n oauthSignInError: {\n message: AuthErrorStrings.OAUTH_ERROR,\n log: 'Make sure Cognito Hosted UI has been configured correctly',\n },\n noConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n `,\n },\n missingAuthConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run \\`amplify push\\` after adding auth via \\`amplify add auth\\`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 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.\n `,\n },\n emptyUsername: {\n message: AuthErrorStrings.EMPTY_USERNAME,\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: AuthErrorStrings.INVALID_USERNAME,\n },\n emptyPassword: {\n message: AuthErrorStrings.EMPTY_PASSWORD,\n },\n emptyCode: {\n message: AuthErrorStrings.EMPTY_CODE,\n },\n signUpError: {\n message: AuthErrorStrings.SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object',\n },\n noMFA: {\n message: AuthErrorStrings.NO_MFA,\n },\n invalidMFA: {\n message: AuthErrorStrings.INVALID_MFA,\n },\n emptyChallengeResponse: {\n message: AuthErrorStrings.EMPTY_CHALLENGE,\n },\n noUserSession: {\n message: AuthErrorStrings.NO_USER_SESSION,\n },\n deviceConfig: {\n message: AuthErrorStrings.DEVICE_CONFIG,\n },\n networkError: {\n message: AuthErrorStrings.NETWORK_ERROR,\n },\n autoSignInError: {\n message: AuthErrorStrings.AUTOSIGNIN_ERROR,\n },\n default: {\n message: AuthErrorStrings.DEFAULT_MSG,\n },\n};\n\nexport { AuthError, NoUserPoolError, authErrorMessages };\n//# sourceMappingURL=Errors.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: delete this module when the Auth class is removed.\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { AuthErrorStrings } from './common/AuthErrorStrings';\nconst logger = new ConsoleLogger('AuthError');\nexport class AuthError extends Error {\n constructor(type) {\n const { message, log } = authErrorMessages[type];\n super(message);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n this.name = 'AuthError';\n this.log = log || message;\n logger.error(this.log);\n }\n}\nexport class NoUserPoolError extends AuthError {\n constructor(type) {\n super(type);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = NoUserPoolError;\n Object.setPrototypeOf(this, NoUserPoolError.prototype);\n this.name = 'NoUserPoolError';\n }\n}\nexport const authErrorMessages = {\n oauthSignInError: {\n message: AuthErrorStrings.OAUTH_ERROR,\n log: 'Make sure Cognito Hosted UI has been configured correctly',\n },\n noConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n `,\n },\n missingAuthConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run \\`amplify push\\` after adding auth via \\`amplify add auth\\`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 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.\n `,\n },\n emptyUsername: {\n message: AuthErrorStrings.EMPTY_USERNAME,\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: AuthErrorStrings.INVALID_USERNAME,\n },\n emptyPassword: {\n message: AuthErrorStrings.EMPTY_PASSWORD,\n },\n emptyCode: {\n message: AuthErrorStrings.EMPTY_CODE,\n },\n signUpError: {\n message: AuthErrorStrings.SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object',\n },\n noMFA: {\n message: AuthErrorStrings.NO_MFA,\n },\n invalidMFA: {\n message: AuthErrorStrings.INVALID_MFA,\n },\n emptyChallengeResponse: {\n message: AuthErrorStrings.EMPTY_CHALLENGE,\n },\n noUserSession: {\n message: AuthErrorStrings.NO_USER_SESSION,\n },\n deviceConfig: {\n message: AuthErrorStrings.DEVICE_CONFIG,\n },\n networkError: {\n message: AuthErrorStrings.NETWORK_ERROR,\n },\n autoSignInError: {\n message: AuthErrorStrings.AUTOSIGNIN_ERROR,\n },\n default: {\n message: AuthErrorStrings.DEFAULT_MSG,\n },\n};\n","import { AuthError } from '../../../../errors/AuthError.mjs';\nimport { AuthErrorTypes } from '../../../../types/Auth.mjs';\nimport { oAuthStore } from './oAuthStore.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst flowCancelledMessage = '`signInWithRedirect` has been canceled.';\nconst validationFailedMessage = 'An error occurred while validating the state.';\nconst validationRecoverySuggestion = 'Try to initiate an OAuth flow from Amplify';\nconst validateState = async (state) => {\n const savedState = await oAuthStore.loadOAuthState();\n // This is because savedState only exists if the flow was initiated by Amplify\n const validatedState = state === savedState ? savedState : undefined;\n if (!validatedState) {\n throw new AuthError({\n name: AuthErrorTypes.OAuthSignInError,\n message: state === null ? flowCancelledMessage : validationFailedMessage,\n recoverySuggestion: state === null ? undefined : validationRecoverySuggestion,\n });\n }\n return validatedState;\n};\n\nexport { flowCancelledMessage, validateState, validationFailedMessage, validationRecoverySuggestion };\n//# sourceMappingURL=validateState.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AuthError } from '../../../../errors/AuthError';\nimport { AuthErrorTypes } from '../../../../types/Auth';\nimport { oAuthStore } from './oAuthStore';\nexport const flowCancelledMessage = '`signInWithRedirect` has been canceled.';\nexport const validationFailedMessage = 'An error occurred while validating the state.';\nexport const validationRecoverySuggestion = 'Try to initiate an OAuth flow from Amplify';\nexport const validateState = async (state) => {\n const savedState = await oAuthStore.loadOAuthState();\n // This is because savedState only exists if the flow was initiated by Amplify\n const validatedState = state === savedState ? savedState : undefined;\n if (!validatedState) {\n throw new AuthError({\n name: AuthErrorTypes.OAuthSignInError,\n message: state === null ? flowCancelledMessage : validationFailedMessage,\n recoverySuggestion: state === null ? undefined : validationRecoverySuggestion,\n });\n }\n return validatedState;\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthErrorTypes;\n(function (AuthErrorTypes) {\n AuthErrorTypes[\"NoConfig\"] = \"noConfig\";\n AuthErrorTypes[\"MissingAuthConfig\"] = \"missingAuthConfig\";\n AuthErrorTypes[\"EmptyUsername\"] = \"emptyUsername\";\n AuthErrorTypes[\"InvalidUsername\"] = \"invalidUsername\";\n AuthErrorTypes[\"EmptyPassword\"] = \"emptyPassword\";\n AuthErrorTypes[\"EmptyCode\"] = \"emptyCode\";\n AuthErrorTypes[\"SignUpError\"] = \"signUpError\";\n AuthErrorTypes[\"NoMFA\"] = \"noMFA\";\n AuthErrorTypes[\"InvalidMFA\"] = \"invalidMFA\";\n AuthErrorTypes[\"EmptyChallengeResponse\"] = \"emptyChallengeResponse\";\n AuthErrorTypes[\"NoUserSession\"] = \"noUserSession\";\n AuthErrorTypes[\"Default\"] = \"default\";\n AuthErrorTypes[\"DeviceConfig\"] = \"deviceConfig\";\n AuthErrorTypes[\"NetworkError\"] = \"networkError\";\n AuthErrorTypes[\"AutoSignInError\"] = \"autoSignInError\";\n AuthErrorTypes[\"OAuthSignInError\"] = \"oauthSignInError\";\n})(AuthErrorTypes || (AuthErrorTypes = {}));\n\nexport { AuthErrorTypes };\n//# sourceMappingURL=Auth.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var AuthErrorTypes;\n(function (AuthErrorTypes) {\n AuthErrorTypes[\"NoConfig\"] = \"noConfig\";\n AuthErrorTypes[\"MissingAuthConfig\"] = \"missingAuthConfig\";\n AuthErrorTypes[\"EmptyUsername\"] = \"emptyUsername\";\n AuthErrorTypes[\"InvalidUsername\"] = \"invalidUsername\";\n AuthErrorTypes[\"EmptyPassword\"] = \"emptyPassword\";\n AuthErrorTypes[\"EmptyCode\"] = \"emptyCode\";\n AuthErrorTypes[\"SignUpError\"] = \"signUpError\";\n AuthErrorTypes[\"NoMFA\"] = \"noMFA\";\n AuthErrorTypes[\"InvalidMFA\"] = \"invalidMFA\";\n AuthErrorTypes[\"EmptyChallengeResponse\"] = \"emptyChallengeResponse\";\n AuthErrorTypes[\"NoUserSession\"] = \"noUserSession\";\n AuthErrorTypes[\"Default\"] = \"default\";\n AuthErrorTypes[\"DeviceConfig\"] = \"deviceConfig\";\n AuthErrorTypes[\"NetworkError\"] = \"networkError\";\n AuthErrorTypes[\"AutoSignInError\"] = \"autoSignInError\";\n AuthErrorTypes[\"OAuthSignInError\"] = \"oauthSignInError\";\n})(AuthErrorTypes || (AuthErrorTypes = {}));\n","import { invalidOriginException, invalidRedirectException, invalidPreferredRedirectUrlException } from '../../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/** @internal */\nfunction getRedirectUrl(redirects, preferredRedirectUrl) {\n if (preferredRedirectUrl) {\n const redirectUrl = redirects?.find(redirect => redirect === preferredRedirectUrl);\n if (!redirectUrl) {\n throw invalidPreferredRedirectUrlException;\n }\n return redirectUrl;\n }\n else {\n const redirectUrlFromTheSameOrigin = redirects?.find(isSameOriginAndPathName) ??\n redirects?.find(isTheSameDomain);\n const redirectUrlFromDifferentOrigin = redirects?.find(isHttps) ?? redirects?.find(isHttp);\n if (redirectUrlFromTheSameOrigin) {\n return redirectUrlFromTheSameOrigin;\n }\n else if (redirectUrlFromDifferentOrigin) {\n throw invalidOriginException;\n }\n throw invalidRedirectException;\n }\n}\n// origin + pathname => https://example.com/app\nconst isSameOriginAndPathName = (redirect) => redirect.startsWith(\n// eslint-disable-next-line no-constant-binary-expression\nString(window.location.origin + window.location.pathname ?? '/'));\n// domain => outlook.live.com, github.com\nconst isTheSameDomain = (redirect) => redirect.includes(String(window.location.hostname));\nconst isHttp = (redirect) => redirect.startsWith('http://');\nconst isHttps = (redirect) => redirect.startsWith('https://');\n\nexport { getRedirectUrl };\n//# sourceMappingURL=getRedirectUrl.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { invalidOriginException, invalidPreferredRedirectUrlException, invalidRedirectException, } from '../../../../errors/constants';\n/** @internal */\nexport function getRedirectUrl(redirects, preferredRedirectUrl) {\n if (preferredRedirectUrl) {\n const redirectUrl = redirects?.find(redirect => redirect === preferredRedirectUrl);\n if (!redirectUrl) {\n throw invalidPreferredRedirectUrlException;\n }\n return redirectUrl;\n }\n else {\n const redirectUrlFromTheSameOrigin = redirects?.find(isSameOriginAndPathName) ??\n redirects?.find(isTheSameDomain);\n const redirectUrlFromDifferentOrigin = redirects?.find(isHttps) ?? redirects?.find(isHttp);\n if (redirectUrlFromTheSameOrigin) {\n return redirectUrlFromTheSameOrigin;\n }\n else if (redirectUrlFromDifferentOrigin) {\n throw invalidOriginException;\n }\n throw invalidRedirectException;\n }\n}\n// origin + pathname => https://example.com/app\nconst isSameOriginAndPathName = (redirect) => redirect.startsWith(\n// eslint-disable-next-line no-constant-binary-expression\nString(window.location.origin + window.location.pathname ?? '/'));\n// domain => outlook.live.com, github.com\nconst isTheSameDomain = (redirect) => redirect.includes(String(window.location.hostname));\nconst isHttp = (redirect) => redirect.startsWith('http://');\nconst isHttps = (redirect) => redirect.startsWith('https://');\n","import { Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { oAuthStore } from './oAuthStore.mjs';\nimport { resolveAndClearInflightPromises } from './inflightPromise.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst handleFailure = async (error) => {\n resolveAndClearInflightPromises();\n await oAuthStore.clearOAuthInflightData();\n Hub.dispatch('auth', { event: 'signInWithRedirect_failure', data: { error } }, 'Auth', AMPLIFY_SYMBOL);\n};\n\nexport { handleFailure };\n//# sourceMappingURL=handleFailure.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { oAuthStore } from './oAuthStore';\nimport { resolveAndClearInflightPromises } from './inflightPromise';\nexport const handleFailure = async (error) => {\n resolveAndClearInflightPromises();\n await oAuthStore.clearOAuthInflightData();\n Hub.dispatch('auth', { event: 'signInWithRedirect_failure', data: { error } }, 'Auth', AMPLIFY_SYMBOL);\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst cognitoHostedUIIdentityProviderMap = {\n Google: 'Google',\n Facebook: 'Facebook',\n Amazon: 'LoginWithAmazon',\n Apple: 'SignInWithApple',\n};\n\nexport { cognitoHostedUIIdentityProviderMap };\n//# sourceMappingURL=models.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const cognitoHostedUIIdentityProviderMap = {\n Google: 'Google',\n Facebook: 'Facebook',\n Amazon: 'LoginWithAmazon',\n Apple: 'SignInWithApple',\n};\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst openAuthSession = async (url) => {\n if (!window?.location) {\n return;\n }\n // enforce HTTPS\n window.location.href = url.replace('http://', 'https://');\n};\n\nexport { openAuthSession };\n//# sourceMappingURL=openAuthSession.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const openAuthSession = async (url) => {\n if (!window?.location) {\n return;\n }\n // enforce HTTPS\n window.location.href = url.replace('http://', 'https://');\n};\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { getCrypto, base64Encoder } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst CODE_VERIFIER_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n/**\n *\n * @param length Desired length of the code verifier.\n *\n * **NOTE:** According to the [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1)\n * A code verifier must be with a length >= 43 and <= 128.\n *\n * @returns An object that contains the generated `codeVerifier` and a method\n * `toCodeChallenge` to generate the code challenge from the `codeVerifier`\n * following the spec of [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.2).\n */\nconst generateCodeVerifier = (length) => {\n const randomBytes = new Uint8Array(length);\n getCrypto().getRandomValues(randomBytes);\n let value = '';\n let codeChallenge;\n for (const byte of randomBytes) {\n value += CODE_VERIFIER_CHARSET.charAt(byte % CODE_VERIFIER_CHARSET.length);\n }\n return {\n value,\n method: 'S256',\n toCodeChallenge() {\n if (codeChallenge) {\n return codeChallenge;\n }\n codeChallenge = generateCodeChallenge(value);\n return codeChallenge;\n },\n };\n};\nfunction generateCodeChallenge(codeVerifier) {\n const awsCryptoHash = new Sha256();\n awsCryptoHash.update(codeVerifier);\n const codeChallenge = removePaddingChar(base64Encoder.convert(awsCryptoHash.digestSync(), { urlSafe: true }));\n return codeChallenge;\n}\nfunction removePaddingChar(base64Encoded) {\n return base64Encoded.replace(/=/g, '');\n}\n\nexport { generateCodeVerifier };\n//# sourceMappingURL=generateCodeVerifier.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Sha256 } from '@aws-crypto/sha256-js';\nimport { base64Encoder, getCrypto } from '@aws-amplify/core/internals/utils';\nconst CODE_VERIFIER_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n/**\n *\n * @param length Desired length of the code verifier.\n *\n * **NOTE:** According to the [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1)\n * A code verifier must be with a length >= 43 and <= 128.\n *\n * @returns An object that contains the generated `codeVerifier` and a method\n * `toCodeChallenge` to generate the code challenge from the `codeVerifier`\n * following the spec of [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.2).\n */\nexport const generateCodeVerifier = (length) => {\n const randomBytes = new Uint8Array(length);\n getCrypto().getRandomValues(randomBytes);\n let value = '';\n let codeChallenge;\n for (const byte of randomBytes) {\n value += CODE_VERIFIER_CHARSET.charAt(byte % CODE_VERIFIER_CHARSET.length);\n }\n return {\n value,\n method: 'S256',\n toCodeChallenge() {\n if (codeChallenge) {\n return codeChallenge;\n }\n codeChallenge = generateCodeChallenge(value);\n return codeChallenge;\n },\n };\n};\nfunction generateCodeChallenge(codeVerifier) {\n const awsCryptoHash = new Sha256();\n awsCryptoHash.update(codeVerifier);\n const codeChallenge = removePaddingChar(base64Encoder.convert(awsCryptoHash.digestSync(), { urlSafe: true }));\n return codeChallenge;\n}\nfunction removePaddingChar(base64Encoded) {\n return base64Encoded.replace(/=/g, '');\n}\n","import { generateRandomString } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst generateState = () => {\n return generateRandomString(32);\n};\n\nexport { generateState };\n//# sourceMappingURL=generateState.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { generateRandomString } from '@aws-amplify/core/internals/utils';\nexport const generateState = () => {\n return generateRandomString(32);\n};\n","import { getCrypto } from './globalHelpers/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const result = [];\n const randomNums = new Uint8Array(length);\n getCrypto().getRandomValues(randomNums);\n for (const num of randomNums) {\n result.push(STATE_CHARSET[num % STATE_CHARSET.length]);\n }\n return result.join('');\n};\n\nexport { generateRandomString };\n//# sourceMappingURL=generateRandomString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getCrypto } from './globalHelpers';\nexport const generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const result = [];\n const randomNums = new Uint8Array(length);\n getCrypto().getRandomValues(randomNums);\n for (const num of randomNums) {\n result.push(STATE_CHARSET[num % STATE_CHARSET.length]);\n }\n return result.join('');\n};\n","import { createOAuthError } from './createOAuthError.mjs';\nimport { handleFailure } from './handleFailure.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst listenForOAuthFlowCancellation = (store) => {\n async function handleCancelOAuthFlow(event) {\n const isBfcache = event.persisted;\n if (isBfcache && (await store.loadOAuthInFlight())) {\n const error = createOAuthError('User cancelled OAuth flow.');\n await handleFailure(error);\n }\n window.removeEventListener('pageshow', handleCancelOAuthFlow);\n }\n window.addEventListener('pageshow', handleCancelOAuthFlow);\n};\n\nexport { listenForOAuthFlowCancellation };\n//# sourceMappingURL=cancelOAuthFlow.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createOAuthError } from './createOAuthError';\nimport { handleFailure } from './handleFailure';\nexport const listenForOAuthFlowCancellation = (store) => {\n async function handleCancelOAuthFlow(event) {\n const isBfcache = event.persisted;\n if (isBfcache && (await store.loadOAuthInFlight())) {\n const error = createOAuthError('User cancelled OAuth flow.');\n await handleFailure(error);\n }\n window.removeEventListener('pageshow', handleCancelOAuthFlow);\n }\n window.addEventListener('pageshow', handleCancelOAuthFlow);\n};\n","import { ConsoleLogger, Amplify, clearCredentials, Hub, defaultStorage } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, assertOAuthConfig, AMPLIFY_SYMBOL, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { DefaultOAuthStore } from '../utils/signInWithRedirectStore.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens, assertAuthTokensWithRefreshToken } from '../utils/types.mjs';\nimport '@aws-crypto/sha256-js';\nimport { handleOAuthSignOut } from '../utils/oauth/handleOAuthSignOut.mjs';\nimport { OAUTH_SIGNOUT_EXCEPTION } from '../../../errors/constants.mjs';\nimport '../../../Errors.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../types/Auth.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport { createRevokeTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createGlobalSignOutClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('Auth');\n/**\n * Signs a user out\n *\n * @param input - The SignOutInput object\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signOut(input) {\n const cognitoConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(cognitoConfig);\n if (input?.global) {\n await globalSignOut(cognitoConfig);\n }\n else {\n await clientSignOut(cognitoConfig);\n }\n let hasOAuthConfig;\n try {\n assertOAuthConfig(cognitoConfig);\n hasOAuthConfig = true;\n }\n catch (err) {\n hasOAuthConfig = false;\n }\n if (hasOAuthConfig) {\n const oAuthStore = new DefaultOAuthStore(defaultStorage);\n oAuthStore.setAuthConfig(cognitoConfig);\n const { type } = (await handleOAuthSignOut(cognitoConfig, oAuthStore, tokenOrchestrator, input?.oauth?.redirectUrl)) ?? {};\n if (type === 'error') {\n throw new AuthError({\n name: OAUTH_SIGNOUT_EXCEPTION,\n message: `An error occurred when attempting to log out from OAuth provider.`,\n });\n }\n }\n else {\n // complete sign out\n tokenOrchestrator.clearTokens();\n await clearCredentials();\n Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);\n }\n}\nasync function clientSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint, userPoolId, userPoolClientId } = cognitoConfig;\n const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();\n assertAuthTokensWithRefreshToken(authTokens);\n if (isSessionRevocable(authTokens.accessToken)) {\n const revokeToken = createRevokeTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await revokeToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignOut),\n }, {\n ClientId: userPoolClientId,\n Token: authTokens.refreshToken,\n });\n }\n }\n catch (err) {\n // this shouldn't throw\n logger.debug('Client signOut error caught but will proceed with token removal');\n }\n}\nasync function globalSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint, userPoolId } = cognitoConfig;\n const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();\n assertAuthTokens(authTokens);\n const globalSignOutClient = createGlobalSignOutClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await globalSignOutClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignOut),\n }, {\n AccessToken: authTokens.accessToken.toString(),\n });\n }\n catch (err) {\n // it should not throw\n logger.debug('Global signOut error caught but will proceed with token removal');\n }\n}\nconst isSessionRevocable = (token) => !!token?.payload?.origin_jti;\n\nexport { signOut };\n//# sourceMappingURL=signOut.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify, ConsoleLogger, Hub, clearCredentials, defaultStorage, } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL, AuthAction, assertOAuthConfig, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { assertAuthTokens, assertAuthTokensWithRefreshToken, } from '../utils/types';\nimport { handleOAuthSignOut } from '../utils/oauth';\nimport { DefaultOAuthStore } from '../utils/signInWithRedirectStore';\nimport { AuthError } from '../../../errors/AuthError';\nimport { OAUTH_SIGNOUT_EXCEPTION } from '../../../errors/constants';\nimport { createGlobalSignOutClient, createRevokeTokenClient, } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nconst logger = new ConsoleLogger('Auth');\n/**\n * Signs a user out\n *\n * @param input - The SignOutInput object\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function signOut(input) {\n const cognitoConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(cognitoConfig);\n if (input?.global) {\n await globalSignOut(cognitoConfig);\n }\n else {\n await clientSignOut(cognitoConfig);\n }\n let hasOAuthConfig;\n try {\n assertOAuthConfig(cognitoConfig);\n hasOAuthConfig = true;\n }\n catch (err) {\n hasOAuthConfig = false;\n }\n if (hasOAuthConfig) {\n const oAuthStore = new DefaultOAuthStore(defaultStorage);\n oAuthStore.setAuthConfig(cognitoConfig);\n const { type } = (await handleOAuthSignOut(cognitoConfig, oAuthStore, tokenOrchestrator, input?.oauth?.redirectUrl)) ?? {};\n if (type === 'error') {\n throw new AuthError({\n name: OAUTH_SIGNOUT_EXCEPTION,\n message: `An error occurred when attempting to log out from OAuth provider.`,\n });\n }\n }\n else {\n // complete sign out\n tokenOrchestrator.clearTokens();\n await clearCredentials();\n Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);\n }\n}\nasync function clientSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint, userPoolId, userPoolClientId } = cognitoConfig;\n const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();\n assertAuthTokensWithRefreshToken(authTokens);\n if (isSessionRevocable(authTokens.accessToken)) {\n const revokeToken = createRevokeTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await revokeToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignOut),\n }, {\n ClientId: userPoolClientId,\n Token: authTokens.refreshToken,\n });\n }\n }\n catch (err) {\n // this shouldn't throw\n logger.debug('Client signOut error caught but will proceed with token removal');\n }\n}\nasync function globalSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint, userPoolId } = cognitoConfig;\n const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();\n assertAuthTokens(authTokens);\n const globalSignOutClient = createGlobalSignOutClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await globalSignOutClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignOut),\n }, {\n AccessToken: authTokens.accessToken.toString(),\n });\n }\n catch (err) {\n // it should not throw\n logger.debug('Global signOut error caught but will proceed with token removal');\n }\n}\nconst isSessionRevocable = (token) => !!token?.payload?.origin_jti;\n","import { Amplify } from '../Amplify.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction clearCredentials() {\n return Amplify.Auth.clearCredentials();\n}\n\nexport { clearCredentials };\n//# sourceMappingURL=clearCredentials.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '../Amplify';\nexport function clearCredentials() {\n return Amplify.Auth.clearCredentials();\n}\n","import { completeOAuthSignOut } from './completeOAuthSignOut.mjs';\nimport { oAuthSignOutRedirect } from './oAuthSignOutRedirect.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst handleOAuthSignOut = async (cognitoConfig, store, tokenOrchestrator, redirectUrl) => {\n const { isOAuthSignIn } = await store.loadOAuthSignIn();\n const oauthMetadata = await tokenOrchestrator.getOAuthMetadata();\n // Clear everything before attempting to visted logout endpoint since the current application\n // state could be wiped away on redirect\n await completeOAuthSignOut(store);\n // The isOAuthSignIn flag is propagated by the oAuthToken store which manages oauth keys in local storage only.\n // These keys are used to determine if a user is in an inflight or signedIn oauth states.\n // However, this behavior represents an issue when 2 apps share the same set of tokens in Cookie storage because the app that didn't\n // start the OAuth will not have access to the oauth keys.\n // A heuristic solution is to add oauth metadata to the tokenOrchestrator which will have access to the underlying\n // storage mechanism that is used by Amplify.\n if (isOAuthSignIn || oauthMetadata?.oauthSignIn) {\n // On web, this will always end up being a void action\n return oAuthSignOutRedirect(cognitoConfig, false, redirectUrl);\n }\n};\n\nexport { handleOAuthSignOut };\n//# sourceMappingURL=handleOAuthSignOut.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { completeOAuthSignOut } from './completeOAuthSignOut';\nimport { oAuthSignOutRedirect } from './oAuthSignOutRedirect';\nexport const handleOAuthSignOut = async (cognitoConfig, store, tokenOrchestrator, redirectUrl) => {\n const { isOAuthSignIn } = await store.loadOAuthSignIn();\n const oauthMetadata = await tokenOrchestrator.getOAuthMetadata();\n // Clear everything before attempting to visted logout endpoint since the current application\n // state could be wiped away on redirect\n await completeOAuthSignOut(store);\n // The isOAuthSignIn flag is propagated by the oAuthToken store which manages oauth keys in local storage only.\n // These keys are used to determine if a user is in an inflight or signedIn oauth states.\n // However, this behavior represents an issue when 2 apps share the same set of tokens in Cookie storage because the app that didn't\n // start the OAuth will not have access to the oauth keys.\n // A heuristic solution is to add oauth metadata to the tokenOrchestrator which will have access to the underlying\n // storage mechanism that is used by Amplify.\n if (isOAuthSignIn || oauthMetadata?.oauthSignIn) {\n // On web, this will always end up being a void action\n return oAuthSignOutRedirect(cognitoConfig, false, redirectUrl);\n }\n};\n","import { clearCredentials, Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport '../refreshAuthTokens.mjs';\nimport '../../tokenProvider/errorHelpers.mjs';\nimport '../types.mjs';\nimport { tokenOrchestrator } from '../../tokenProvider/tokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst completeOAuthSignOut = async (store) => {\n await store.clearOAuthData();\n tokenOrchestrator.clearTokens();\n await clearCredentials();\n Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);\n};\n\nexport { completeOAuthSignOut };\n//# sourceMappingURL=completeOAuthSignOut.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Hub, clearCredentials } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { tokenOrchestrator } from '../../tokenProvider';\nexport const completeOAuthSignOut = async (store) => {\n await store.clearOAuthData();\n tokenOrchestrator.clearTokens();\n await clearCredentials();\n Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);\n};\n","import { assertOAuthConfig } from '@aws-amplify/core/internals/utils';\nimport { openAuthSession } from '../../../../utils/openAuthSession.mjs';\nimport { getRedirectUrl } from './getRedirectUrl.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst oAuthSignOutRedirect = async (authConfig, preferPrivateSession = false, redirectUrl) => {\n assertOAuthConfig(authConfig);\n const { loginWith, userPoolClientId } = authConfig;\n const { domain, redirectSignOut } = loginWith.oauth;\n const signoutUri = getRedirectUrl(redirectSignOut, redirectUrl);\n const oAuthLogoutEndpoint = `https://${domain}/logout?${Object.entries({\n client_id: userPoolClientId,\n logout_uri: encodeURIComponent(signoutUri),\n })\n .map(([k, v]) => `${k}=${v}`)\n .join('&')}`;\n return openAuthSession(oAuthLogoutEndpoint);\n};\n\nexport { oAuthSignOutRedirect };\n//# sourceMappingURL=oAuthSignOutRedirect.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { assertOAuthConfig } from '@aws-amplify/core/internals/utils';\nimport { openAuthSession } from '../../../../utils';\nimport { getRedirectUrl } from './getRedirectUrl';\nexport const oAuthSignOutRedirect = async (authConfig, preferPrivateSession = false, redirectUrl) => {\n assertOAuthConfig(authConfig);\n const { loginWith, userPoolClientId } = authConfig;\n const { domain, redirectSignOut } = loginWith.oauth;\n const signoutUri = getRedirectUrl(redirectSignOut, redirectUrl);\n const oAuthLogoutEndpoint = `https://${domain}/logout?${Object.entries({\n client_id: userPoolClientId,\n logout_uri: encodeURIComponent(signoutUri),\n })\n .map(([k, v]) => `${k}=${v}`)\n .join('&')}`;\n return openAuthSession(oAuthLogoutEndpoint, redirectSignOut, preferPrivateSession);\n};\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createRevokeTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('RevokeToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createRevokeTokenClient };\n//# sourceMappingURL=createRevokeTokenClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createRevokeTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('RevokeToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGlobalSignOutClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GlobalSignOut'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createGlobalSignOutClient };\n//# sourceMappingURL=createGlobalSignOutClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createGlobalSignOutClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GlobalSignOut'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createForgotPasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createForgotPasswordClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resets a user's password.\n *\n * @param input - The ResetPasswordInput object.\n * @returns ResetPasswordOutput\n * @throws -{@link ForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n **/\nasync function resetPassword(input) {\n const { username } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyResetPasswordUsername);\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const forgotPassword = createForgotPasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const res = await forgotPassword({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ResetPassword),\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n });\n const codeDeliveryDetails = res.CodeDeliveryDetails;\n return {\n isPasswordReset: false,\n nextStep: {\n resetPasswordStep: 'CONFIRM_RESET_PASSWORD_WITH_CODE',\n codeDeliveryDetails: {\n deliveryMedium: codeDeliveryDetails?.DeliveryMedium,\n destination: codeDeliveryDetails?.Destination,\n attributeName: codeDeliveryDetails?.AttributeName,\n },\n },\n };\n}\n\nexport { resetPassword };\n//# sourceMappingURL=resetPassword.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getUserContextData } from '../utils/userContextData';\nimport { createForgotPasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\n/**\n * Resets a user's password.\n *\n * @param input - The ResetPasswordInput object.\n * @returns ResetPasswordOutput\n * @throws -{@link ForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n **/\nexport async function resetPassword(input) {\n const { username } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyResetPasswordUsername);\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const forgotPassword = createForgotPasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const res = await forgotPassword({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ResetPassword),\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n });\n const codeDeliveryDetails = res.CodeDeliveryDetails;\n return {\n isPasswordReset: false,\n nextStep: {\n resetPasswordStep: 'CONFIRM_RESET_PASSWORD_WITH_CODE',\n codeDeliveryDetails: {\n deliveryMedium: codeDeliveryDetails?.DeliveryMedium,\n destination: codeDeliveryDetails?.Destination,\n attributeName: codeDeliveryDetails?.AttributeName,\n },\n },\n };\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createForgotPasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ForgotPassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createForgotPasswordClient };\n//# sourceMappingURL=createForgotPasswordClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createForgotPasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ForgotPassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmForgotPasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmForgotPasswordClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms the new password and verification code to reset the password.\n *\n * @param input - The ConfirmResetPasswordInput object.\n * @throws -{@link ConfirmForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code, password or username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmResetPassword(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const { username, newPassword } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmResetPasswordUsername);\n assertValidationError(!!newPassword, AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword);\n const code = input.confirmationCode;\n assertValidationError(!!code, AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode);\n const metadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmForgotPassword = createConfirmForgotPasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await confirmForgotPassword({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmResetPassword),\n }, {\n Username: username,\n ConfirmationCode: code,\n Password: newPassword,\n ClientMetadata: metadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n}\n\nexport { confirmResetPassword };\n//# sourceMappingURL=confirmResetPassword.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { getUserContextData } from '../utils/userContextData';\nimport { createConfirmForgotPasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\n/**\n * Confirms the new password and verification code to reset the password.\n *\n * @param input - The ConfirmResetPasswordInput object.\n * @throws -{@link ConfirmForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code, password or username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function confirmResetPassword(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const { username, newPassword } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmResetPasswordUsername);\n assertValidationError(!!newPassword, AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword);\n const code = input.confirmationCode;\n assertValidationError(!!code, AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode);\n const metadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmForgotPassword = createConfirmForgotPasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await confirmForgotPassword({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmResetPassword),\n }, {\n Username: username,\n ConfirmationCode: code,\n Password: newPassword,\n ClientMetadata: metadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmForgotPasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmForgotPassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmForgotPasswordClient };\n//# sourceMappingURL=createConfirmForgotPasswordClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createConfirmForgotPasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmForgotPassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createChangePasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createChangePasswordClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's password while authenticated.\n *\n * @param input - The UpdatePasswordInput object.\n * @throws - {@link ChangePasswordException} - Cognito service errors thrown when updating a password.\n * @throws - {@link AuthValidationErrorCode} - Validation errors thrown when oldPassword or newPassword are empty.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function updatePassword(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { oldPassword, newPassword } = input;\n assertValidationError(!!oldPassword, AuthValidationErrorCode.EmptyUpdatePassword);\n assertValidationError(!!newPassword, AuthValidationErrorCode.EmptyUpdatePassword);\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const changePassword = createChangePasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await changePassword({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdatePassword),\n }, {\n AccessToken: tokens.accessToken.toString(),\n PreviousPassword: oldPassword,\n ProposedPassword: newPassword,\n });\n}\n\nexport { updatePassword };\n//# sourceMappingURL=updatePassword.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { assertAuthTokens } from '../utils/types';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { createChangePasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\n/**\n * Updates user's password while authenticated.\n *\n * @param input - The UpdatePasswordInput object.\n * @throws - {@link ChangePasswordException} - Cognito service errors thrown when updating a password.\n * @throws - {@link AuthValidationErrorCode} - Validation errors thrown when oldPassword or newPassword are empty.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function updatePassword(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { oldPassword, newPassword } = input;\n assertValidationError(!!oldPassword, AuthValidationErrorCode.EmptyUpdatePassword);\n assertValidationError(!!newPassword, AuthValidationErrorCode.EmptyUpdatePassword);\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const changePassword = createChangePasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await changePassword({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdatePassword),\n }, {\n AccessToken: tokens.accessToken.toString(),\n PreviousPassword: oldPassword,\n ProposedPassword: newPassword,\n });\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createChangePasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ChangePassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createChangePasswordClient };\n//# sourceMappingURL=createChangePasswordClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createChangePasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ChangePassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { toAttributeType } from '../utils/apiHelpers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createUpdateUserAttributesClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateUserAttributesClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's attributes while authenticated.\n *\n * @param input - The UpdateUserAttributesInput object\n * @returns UpdateUserAttributesOutput\n * @throws - {@link UpdateUserAttributesException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst updateUserAttributes = async (input) => {\n const { userAttributes, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const clientMetadata = options?.clientMetadata;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const updateUserAttributesClient = createUpdateUserAttributesClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetailsList } = await updateUserAttributesClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdateUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n ClientMetadata: clientMetadata,\n UserAttributes: toAttributeType(userAttributes),\n });\n return {\n ...getConfirmedAttributes(userAttributes),\n ...getUnConfirmedAttributes(CodeDeliveryDetailsList),\n };\n};\nfunction getConfirmedAttributes(attributes) {\n const confirmedAttributes = {};\n Object.keys(attributes)?.forEach(key => {\n confirmedAttributes[key] = {\n isUpdated: true,\n nextStep: {\n updateAttributeStep: 'DONE',\n },\n };\n });\n return confirmedAttributes;\n}\nfunction getUnConfirmedAttributes(codeDeliveryDetailsList) {\n const unConfirmedAttributes = {};\n codeDeliveryDetailsList?.forEach(codeDeliveryDetails => {\n const { AttributeName, DeliveryMedium, Destination } = codeDeliveryDetails;\n if (AttributeName)\n unConfirmedAttributes[AttributeName] = {\n isUpdated: false,\n nextStep: {\n updateAttributeStep: 'CONFIRM_ATTRIBUTE_WITH_CODE',\n codeDeliveryDetails: {\n attributeName: AttributeName,\n deliveryMedium: DeliveryMedium,\n destination: Destination,\n },\n },\n };\n });\n return unConfirmedAttributes;\n}\n\nexport { updateUserAttributes };\n//# sourceMappingURL=updateUserAttributes.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../utils/types';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { toAttributeType } from '../utils/apiHelpers';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { createUpdateUserAttributesClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\n/**\n * Updates user's attributes while authenticated.\n *\n * @param input - The UpdateUserAttributesInput object\n * @returns UpdateUserAttributesOutput\n * @throws - {@link UpdateUserAttributesException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport const updateUserAttributes = async (input) => {\n const { userAttributes, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const clientMetadata = options?.clientMetadata;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const updateUserAttributesClient = createUpdateUserAttributesClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetailsList } = await updateUserAttributesClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdateUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n ClientMetadata: clientMetadata,\n UserAttributes: toAttributeType(userAttributes),\n });\n return {\n ...getConfirmedAttributes(userAttributes),\n ...getUnConfirmedAttributes(CodeDeliveryDetailsList),\n };\n};\nfunction getConfirmedAttributes(attributes) {\n const confirmedAttributes = {};\n Object.keys(attributes)?.forEach(key => {\n confirmedAttributes[key] = {\n isUpdated: true,\n nextStep: {\n updateAttributeStep: 'DONE',\n },\n };\n });\n return confirmedAttributes;\n}\nfunction getUnConfirmedAttributes(codeDeliveryDetailsList) {\n const unConfirmedAttributes = {};\n codeDeliveryDetailsList?.forEach(codeDeliveryDetails => {\n const { AttributeName, DeliveryMedium, Destination } = codeDeliveryDetails;\n if (AttributeName)\n unConfirmedAttributes[AttributeName] = {\n isUpdated: false,\n nextStep: {\n updateAttributeStep: 'CONFIRM_ATTRIBUTE_WITH_CODE',\n codeDeliveryDetails: {\n attributeName: AttributeName,\n deliveryMedium: DeliveryMedium,\n destination: Destination,\n },\n },\n };\n });\n return unConfirmedAttributes;\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUpdateUserAttributesClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('UpdateUserAttributes'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createUpdateUserAttributesClient };\n//# sourceMappingURL=createUpdateUserAttributesClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createUserPoolDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createUpdateUserAttributesClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('UpdateUserAttributes'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createDeleteUserClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { signOut } from './signOut.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deletes a user from the user pool while authenticated.\n *\n * @throws - {@link DeleteUserException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function deleteUser() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const serviceDeleteUser = createDeleteUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await serviceDeleteUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.DeleteUser),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n await tokenOrchestrator.clearDeviceMetadata();\n await signOut();\n}\n\nexport { deleteUser };\n//# sourceMappingURL=deleteUser.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers';\nimport { assertAuthTokens } from '../utils/types';\nimport { tokenOrchestrator } from '../tokenProvider';\nimport { getAuthUserAgentValue } from '../../../utils';\nimport { createDeleteUserClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider';\nimport { createCognitoUserPoolEndpointResolver } from '../factories';\nimport { signOut } from './signOut';\n/**\n * Deletes a user from the user pool while authenticated.\n *\n * @throws - {@link DeleteUserException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport async function deleteUser() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const serviceDeleteUser = createDeleteUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await serviceDeleteUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.DeleteUser),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n await tokenOrchestrator.clearDeviceMetadata();\n await signOut();\n}\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { createEmptyResponseDeserializer } from './shared/serde/createEmptyResponseDeserializer.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createDeleteUserClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('DeleteUser'), createEmptyResponseDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createDeleteUserClient };\n//# sourceMappingURL=createDeleteUserClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler';\nimport { createEmptyResponseDeserializer, createUserPoolSerializer, } from './shared/serde';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';\nexport const createDeleteUserClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('DeleteUser'), createEmptyResponseDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n","import { parseJsonError } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createEmptyResponseDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n else {\n return undefined;\n }\n};\n\nexport { createEmptyResponseDeserializer };\n//# sourceMappingURL=createEmptyResponseDeserializer.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonError, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError';\nimport { AuthError } from '../../../../../../errors/AuthError';\nexport const createEmptyResponseDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n else {\n return undefined;\n }\n};\n","// Cookie utility functions for secure data storage\r\nimport { cookiesAccepted } from './cookie-manager.js';\r\n\r\nconst CookieUtils = {\r\n // Check if user has accepted cookies\r\n hasAcceptedCookies: function() {\r\n return this.getCookie('cookieConsent') === 'accepted';\r\n },\r\n \r\n // Set a cookie with security options\r\n setCookie: function(name, value, options = {}) {\r\n // For essential cookies or if user has accepted cookies\r\n const isEssential = options.essential || false;\r\n \r\n if (!isEssential && !cookiesAccepted()) {\r\n console.log('Cookie not set as consent not given:', name);\r\n return false;\r\n }\r\n \r\n // Remove our custom option before setting the cookie\r\n delete options.essential;\r\n \r\n const defaultOptions = {\r\n path: '/', // Available across the site\r\n maxAge: 60 * 60 * 24 * 30, // 30 days by default (in seconds)\r\n secure: location.protocol === 'https:', // HTTPS only when on HTTPS\r\n sameSite: 'strict' // Protect against CSRF\r\n };\r\n \r\n const cookieOptions = {...defaultOptions, ...options};\r\n let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;\r\n \r\n for (const optionKey in cookieOptions) {\r\n if (cookieOptions[optionKey] === true) {\r\n cookieString += `; ${optionKey}`;\r\n } else if (cookieOptions[optionKey] !== false) {\r\n cookieString += `; ${optionKey}=${cookieOptions[optionKey]}`;\r\n }\r\n }\r\n \r\n document.cookie = cookieString;\r\n return true;\r\n },\r\n \r\n // Get a cookie by name\r\n getCookie: function(name) {\r\n const matches = document.cookie.match(new RegExp(\r\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\r\n ));\r\n return matches ? decodeURIComponent(matches[1]) : undefined;\r\n },\r\n \r\n // Delete a cookie by name\r\n deleteCookie: function(name) {\r\n this.setCookie(name, \"\", {\r\n maxAge: -1,\r\n essential: true // Allow deletion regardless of consent\r\n });\r\n },\r\n \r\n // Accept cookies and set the consent cookie\r\n acceptCookies: function() {\r\n this.setCookie('cookieConsent', 'accepted', {\r\n essential: true, // Consent cookie is essential\r\n maxAge: 60 * 60 * 24 * 365 // 1 year\r\n });\r\n \r\n // Hide the cookie banner\r\n const banner = document.getElementById('cookie-banner');\r\n if (banner) {\r\n banner.classList.add('hidden');\r\n }\r\n \r\n return true;\r\n },\r\n \r\n // Decline cookies\r\n declineCookies: function() {\r\n this.setCookie('cookieConsent', 'declined', {\r\n essential: true, // Consent cookie is essential\r\n maxAge: 60 * 60 * 24 * 365 // 1 year\r\n });\r\n \r\n // Hide the cookie banner\r\n const banner = document.getElementById('cookie-banner');\r\n if (banner) {\r\n banner.classList.add('hidden');\r\n }\r\n \r\n return true;\r\n }\r\n};\r\n\r\nexport default CookieUtils; ","// Central cookie management module\r\nconst CookieManager = {\r\n init: function() {\r\n // Only initialize if consent hasn't been given yet\r\n if (!this.hasConsentBeenSet()) {\r\n this.createBanner();\r\n }\r\n },\r\n \r\n hasConsentBeenSet: function() {\r\n return this.getCookie('cookieConsent') !== undefined;\r\n },\r\n \r\n // Create and attach the banner to the DOM\r\n createBanner: function() {\r\n // Only create if it doesn't already exist\r\n if (document.getElementById('cookie-banner')) return;\r\n \r\n const banner = document.createElement('div');\r\n banner.id = 'cookie-banner';\r\n banner.className = 'cookie-banner';\r\n \r\n banner.innerHTML = `\r\n
\r\n
\r\n

🍪 We use cookies

\r\n

This website uses cookies to ensure you get the best experience. Learn more in our Privacy Policy.

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n `;\r\n \r\n document.body.appendChild(banner);\r\n this.addStyles();\r\n this.addEventListeners();\r\n },\r\n \r\n // Add CSS for the banner\r\n addStyles: function() {\r\n if (document.getElementById('cookie-banner-styles')) return;\r\n \r\n const style = document.createElement('style');\r\n style.id = 'cookie-banner-styles';\r\n \r\n style.textContent = `\r\n .cookie-banner {\r\n position: fixed;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background-color: #7D7D7D;\r\n color: white;\r\n padding: 1rem;\r\n z-index: 9999;\r\n border-top: 4px solid #000;\r\n font-family: 'VT323', monospace;\r\n }\r\n \r\n .cookie-content {\r\n max-width: 1200px;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n flex-wrap: wrap;\r\n }\r\n \r\n .cookie-text {\r\n flex: 1;\r\n min-width: 300px;\r\n }\r\n \r\n .cookie-buttons {\r\n display: flex;\r\n gap: 1rem;\r\n margin-left: 1rem;\r\n }\r\n \r\n .button-green {\r\n background-color: #5da444;\r\n padding: 0.5rem 1rem;\r\n border: 3px solid #111;\r\n border-bottom: 6px solid #111;\r\n cursor: pointer;\r\n color: white;\r\n font-family: 'VT323', monospace;\r\n }\r\n \r\n .button-red {\r\n background-color: #d13112;\r\n padding: 0.5rem 1rem;\r\n border: 3px solid #111;\r\n border-bottom: 6px solid #111;\r\n cursor: pointer;\r\n color: white;\r\n font-family: 'VT323', monospace;\r\n }\r\n \r\n @media (max-width: 768px) {\r\n .cookie-content {\r\n flex-direction: column;\r\n }\r\n \r\n .cookie-buttons {\r\n margin-top: 1rem;\r\n margin-left: 0;\r\n width: 100%;\r\n justify-content: center;\r\n }\r\n }\r\n `;\r\n \r\n document.head.appendChild(style);\r\n },\r\n \r\n // Add event listeners to the buttons\r\n addEventListeners: function() {\r\n const acceptBtn = document.getElementById('accept-cookies');\r\n const declineBtn = document.getElementById('decline-cookies');\r\n \r\n acceptBtn.addEventListener('click', () => {\r\n this.setCookie('cookieConsent', 'accepted', {\r\n maxAge: 60 * 60 * 24 * 365 // 1 year\r\n });\r\n this.hideBanner();\r\n });\r\n \r\n declineBtn.addEventListener('click', () => {\r\n this.setCookie('cookieConsent', 'declined', {\r\n maxAge: 60 * 60 * 24 * 365 // 1 year\r\n });\r\n this.hideBanner();\r\n });\r\n },\r\n \r\n // Hide the banner\r\n hideBanner: function() {\r\n const banner = document.getElementById('cookie-banner');\r\n if (banner) {\r\n banner.style.display = 'none';\r\n // Optional: remove completely after animation\r\n setTimeout(() => {\r\n banner.parentNode.removeChild(banner);\r\n }, 500);\r\n }\r\n },\r\n \r\n // Cookie utility functions\r\n setCookie: function(name, value, options = {}) {\r\n const defaultOptions = {\r\n path: '/',\r\n maxAge: 60 * 60 * 24 * 30,\r\n secure: location.protocol === 'https:',\r\n sameSite: 'strict'\r\n };\r\n \r\n const cookieOptions = {...defaultOptions, ...options};\r\n let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;\r\n \r\n for (const optionKey in cookieOptions) {\r\n if (cookieOptions[optionKey] === true) {\r\n cookieString += `; ${optionKey}`;\r\n } else if (cookieOptions[optionKey] !== false) {\r\n cookieString += `; ${optionKey}=${cookieOptions[optionKey]}`;\r\n }\r\n }\r\n \r\n document.cookie = cookieString;\r\n },\r\n \r\n getCookie: function(name) {\r\n const matches = document.cookie.match(new RegExp(\r\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\r\n ));\r\n return matches ? decodeURIComponent(matches[1]) : undefined;\r\n },\r\n \r\n // Check if cookies have been accepted\r\n hasAcceptedCookies: function() {\r\n return this.getCookie('cookieConsent') === 'accepted';\r\n }\r\n};\r\n\r\n// Export the full manager and also a convenient check function\r\nexport default CookieManager;\r\nexport const cookiesAccepted = () => CookieManager.hasAcceptedCookies(); "],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$e7ff1b009dd6583c$export$d9e3c9dc7eaad0c3","$72z4V","$2yfk2","$kwYKv","$2Izdj","$xBcsQ","$c7Zwg","$8XrSp","$aqcy4","$1YUHk","$eARfH","$hPpH6","$1XYd7","$2q8Iv","$bykg2","$ifW8F","$jpubH","$e7ff1b009dd6583c$var$amplifyConfig","Auth","Cognito","region","userPoolId","userPoolClientId","loginWith","oauth","domain","scope","redirectSignIn","window","location","origin","redirectSignOut","responseType","DefaultAmplify","configure","checkStatus","user","getCurrentUser","fetchAuthSession","attributes","fetchUserAttributes","isAuthenticated","username","email","sub","name","error","signUp","password","result","options","userAttributes","autoSignIn","console","log","success","message","isSignUpComplete","userConfirmed","$e7ff1b009dd6583c$var$loadingContainer","classList","remove","includes","isExistingEmail","getAuthErrorMessage","confirmSignUp","confirmationCode","resendConfirmationCode","resendSignUpCode","signIn","isSignedIn","nextStep","signInStep","challengeName","setCookie","maxAge","secure","sameSite","federatedSignIn","provider","signInWithRedirect","toLowerCase","customState","signOut","deleteCookie","forgotPassword","resetPassword","newPassword","confirmResetPassword","currentUser","getAuthToken","session","tokens","idToken","toString","changePassword","oldPassword","updatePassword","updateUserAttributes","deleteAccount","deleteUser","document","addEventListener","pageName","path","pathname","split","pop","then","$e7ff1b009dd6583c$var$updateAuthUI","authLinks","querySelectorAll","forEach","link","add","nonAuthLinks","$e7ff1b009dd6583c$var$setupLoginPage","loginForm","getElementById","errorMessage","loadingContainer","preventDefault","value","submitButton","disabled","href","localStorage","setItem","confirm","encodeURIComponent","textContent","googleButton","amazonButton","$e7ff1b009dd6583c$var$setupSignupPage","signupForm","$e7ff1b009dd6583c$var$setupForgotPasswordPage","requestForm","resetForm","sessionStorage","successMessage","getItem","setTimeout","$e7ff1b009dd6583c$var$setupLogoutButton","logoutButton","$8462ca0fe1ef67cb$export$11ac3725994bec7b","$1qbEC","$lKsZv","$57Of0","$guvIf","$e2NQk","$54W3M","resourceConfig","libraryOptions","resolvedResourceConfig","parseAmplifyConfig","Amplify","cognitoUserPoolsTokenProvider","setAuthConfig","setKeyValueStorage","ssr","CookieStorage","defaultStorage","tokenProvider","credentialsProvider","cognitoCredentialsProvider","undefined","getConfig","$30fdc25c6f443021$export$a3858a9a153cffc7","$5RCQ5","$iceoz","$43O8I","$hMbLp","$30fdc25c6f443021$export$b412d755cfa0136","constructor","oAuthListener","resourcesConfig","AuthClass","deepFreeze","Hub","dispatch","event","data","AMPLIFY_SYMBOL","notifyOAuthListener","ADD_OAUTH_LISTENER","listener","$008d8f6886d8544f$export$aadf71dd9875dd20","$008d8f6886d8544f$export$8c41bb232f1008b1","$008d8f6886d8544f$export$45dde0743a4c8d6e","$gJw02","$1ZViM","$e0exy","Symbol","$008d8f6886d8544f$var$logger","ConsoleLogger","$008d8f6886d8544f$export$6b38ef2be9abbbb9","listeners","Map","protectedChannels","_remove","channel","holder","warn","filter","callback","payload","source","ampSymbol","indexOf","capsule","patternInfo","_toListeners","listen","listenerName","AmplifyError","NO_HUBCALLBACK_PROVIDED_EXCEPTION","push","debug","$4b398182966a4810$export$ba6a9c7ac8291f7f","$4qg9e","$4b398182966a4810$var$LOG_LEVELS","VERBOSE","DEBUG","INFO","WARN","ERROR","NONE","level","LogType","_pluggables","_padding","_ts","dt","Date","getMinutes","getSeconds","join","getMilliseconds","config","_config","_log","type","msg","loggerLevelName","LOG_LEVEL","loggerLevel","typeLevel","bind","BIND_ALL_LOG_LEVELS","info","prefix","length","obj","slice","plugin","logEvent","timestamp","now","pushLogs","verbose","addPluggable","pluggable","getCategoryName","AWS_CLOUDWATCH_CATEGORY","listPluggables","$e362d339f3c21ca2$export$13470c6f1642bbce","$e362d339f3c21ca2$export$16032fc466434892","$e362d339f3c21ca2$export$86d53207c3c20049","$efbbd0209ea980b7$export$a0472aa3a356446c","$946cdba1e264a995$export$37321a6dace1881c","recoverySuggestion","underlyingError","setPrototypeOf","prototype","$35e949d961a4bb54$export$7e32b29e1cb162e1","object","Reflect","ownKeys","freeze","$3ac22caa9341ca12$export$35210b3191d26437","$ef54e63dd8f4866f$export$f101a69cd6dc6202","$FIaO4","$htw2G","amplifyConfig","keys","some","key","startsWith","parseAWSExports","isAmplifyOutputs","parseAmplifyOutputs","$12e0f7072a5016a7$export$1ef2e9c2da492d","$12e0f7072a5016a7$var$logger","$12e0f7072a5016a7$var$authTypeMapping","API_KEY","AWS_IAM","AMAZON_COGNITO_USER_POOLS","OPENID_CONNECT","AWS_LAMBDA","LAMBDA","hasOwnProperty","aws_appsync_apiKey","aws_appsync_authenticationType","aws_appsync_graphqlEndpoint","aws_appsync_region","aws_bots_config","aws_cognito_identity_pool_id","aws_cognito_sign_up_verification_method","aws_cognito_mfa_configuration","aws_cognito_mfa_types","aws_cognito_password_protection_settings","aws_cognito_verification_mechanisms","aws_cognito_signup_attributes","aws_cognito_social_providers","aws_cognito_username_attributes","aws_mandatory_sign_in","aws_mobile_analytics_app_id","aws_mobile_analytics_app_region","aws_user_files_s3_bucket","aws_user_files_s3_bucket_region","aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing","aws_user_pools_id","aws_user_pools_web_client_id","geo","predictions","aws_cloud_logic_custom","Notifications","modelIntrospection","Analytics","Pinpoint","appId","InAppMessaging","Push","AWSPinpoint","PushNotification","Array","isArray","Interactions","LexV1","fromEntries","map","bot","defaultAuthMode","API","GraphQL","endpoint","apiKey","mfaConfig","status","totpEnabled","smsEnabled","passwordFormatConfig","minLength","passwordPolicyMinLength","requireLowercase","passwordPolicyCharacters","requireUppercase","requireNumbers","requireSpecialCharacters","mergedUserAttributes","from","Set","reduce","required","loginWithEmailEnabled","loginWithPhoneEnabled","identityPoolId","allowGuestAccess","signUpVerificationMethod","mfa","passwordFormat","phone","hasOAuthConfig","hasSocialProviderConfig","$12e0f7072a5016a7$var$getOAuthConfig","providers","$12e0f7072a5016a7$var$parseSocialProviders","Storage","S3","bucket","dangerouslyConnectToHttpEndpointForTesting","amazon_location_service","Geo","LocationService","maps","geofenceCollections","searchIndices","search_indices","REST","acc","api","service","VoiceId","voiceId","convert","speechGenerator","defaults","Predictions","$12e0f7072a5016a7$var$getRedirectUrl","redirectStr","scopes","updatedProvider","charAt","toUpperCase","$7dcd6190391b2d90$export$99bf765e6322c00","version","$7dcd6190391b2d90$export$11d0da171d17ab63","amplifyOutputs","storage","$7dcd6190391b2d90$var$parseStorage","amplifyOutputsStorageProperties","bucket_name","aws_region","buckets","$7dcd6190391b2d90$var$createBucketInfoMap","mappedBuckets","bucketName","paths","sanitizedPaths","entries","auth","$7dcd6190391b2d90$var$parseAuth","amplifyOutputsAuthProperties","mfaConfiguration","user_pool_id","user_pool_client_id","identity_pool_id","password_policy","mfa_configuration","mfa_methods","unauthenticated_identities_enabled","username_attributes","standard_required_attributes","groups","authConfig","require_lowercase","require_numbers","require_uppercase","require_symbols","min_length","redirect_sign_in_uri","redirect_sign_out_uri","response_type","$7dcd6190391b2d90$var$getOAuthProviders","oAuthProviders","$7dcd6190391b2d90$var$providerNames","identity_providers","curr","analytics","$7dcd6190391b2d90$export$fbb0a2a08db9629a","amplifyOutputsAnalyticsProperties","amazon_pinpoint","app_id","$7dcd6190391b2d90$var$parseGeo","geofence_collections","$7dcd6190391b2d90$var$parseData","amplifyOutputsDataProperties","default_authorization_type","url","api_key","model_introspection","$7dcd6190391b2d90$var$authModeNames","custom","customConfig","$7dcd6190391b2d90$var$parseCustom","amplifyOutputsCustomProperties","events","Events","notifications","$7dcd6190391b2d90$var$parseNotifications","amplifyOutputsNotificationsProperties","channels","amazon_pinpoint_app_id","hasInAppMessaging","hasPushNotification","notificationsConfig","GOOGLE","LOGIN_WITH_AMAZON","FACEBOOK","SIGN_IN_WITH_APPLE","Sha256","$34f0be31e76b3852$export$3b58ea8124ac5e28","$7WQrb","$4saKg","$bGlNU","$3cPkP","$ZB00P","secret","hash","RawSha256","reset","update","toHash","isEmptyData","convertToBuffer","digestSync","outer","finished","digest","__awaiter","__generator","_a","inner","$34f0be31e76b3852$var$bufferFromSecret","input","byteLength","BLOCK_SIZE","bufferHash","buffer","Uint8Array","i","$5c96a02c592fcff1$export$1050f835b63b671e","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","adopt","apply","$5c96a02c592fcff1$export$67ebef60e6f28a6","body","f","y","t","_","label","sent","trys","ops","g","create","Iterator","verb","iterator","op","TypeError","SuppressedError","$33e21cb3f745e23a$export$b2e3d6d444266a5c","$33e21cb3f745e23a$export$d7bd469488748c5f","$33e21cb3f745e23a$export$7167c830cefcb6b5","$33e21cb3f745e23a$export$d788bc089976c004","$33e21cb3f745e23a$export$856b3d11dc447b50","Uint32Array","Math","$881487c8a44da5fa$export$aab6bc1ad3c77a42","state","Int32Array","INIT","temp","bufferLength","bytesHashed","position","MAX_HASHABLE_LENGTH","hashBuffer","bitsHashed","bufferView","DataView","byteOffset","undecoratedLength","setUint8","setUint32","floor","out","DIGEST_LENGTH","state0","state1","state2","state3","state4","state5","state6","state7","u","t1_1","t2_1","t1","KEY","t2","$255a5028cde3f3bc$export$4f21f20c2f1a9063","$1uolR","$255a5028cde3f3bc$require$Buffer","$6ZWSX","Buffer","$255a5028cde3f3bc$var$fromUtf8","fromUtf8","ArrayBuffer","isView","BYTES_PER_ELEMENT","$115b7b7cc5a24eaf$export$c7c5cef950a4d2fc","TextEncoder","encode","$51861dfc7ca9d588$export$a143d493d941bafc","$51861dfc7ca9d588$export$f99ded8fe4b79145","$kuxul","$9NvM5","$51861dfc7ca9d588$var$customInspectSymbol","$51861dfc7ca9d588$var$createBuffer","RangeError","buf","$51861dfc7ca9d588$var$Buffer","arg","encodingOrOffset","$51861dfc7ca9d588$var$allocUnsafe","$51861dfc7ca9d588$var$from","$51861dfc7ca9d588$var$fromString","string","encoding","isEncoding","$51861dfc7ca9d588$var$byteLength","actual","write","$51861dfc7ca9d588$var$fromArrayView","arrayView","$51861dfc7ca9d588$var$isInstance","copy","$51861dfc7ca9d588$var$fromArrayBuffer","$51861dfc7ca9d588$var$fromArrayLike","SharedArrayBuffer","valueOf","b","$51861dfc7ca9d588$var$fromObject","isBuffer","len","$51861dfc7ca9d588$var$checked","$51861dfc7ca9d588$var$numberIsNaN","toPrimitive","$51861dfc7ca9d588$var$assertSize","size","array","mustMatch","arguments","loweredCase","$51861dfc7ca9d588$var$utf8ToBytes","$51861dfc7ca9d588$var$base64ToBytes","$51861dfc7ca9d588$var$slowToString","start","end","$51861dfc7ca9d588$var$hexSlice","$51861dfc7ca9d588$var$hexSliceLookupTable","$51861dfc7ca9d588$var$utf8Slice","$51861dfc7ca9d588$var$asciiSlice","ret","min","String","fromCharCode","$51861dfc7ca9d588$var$latin1Slice","fromByteArray","$51861dfc7ca9d588$var$utf16leSlice","bytes","res","$51861dfc7ca9d588$var$swap","m","$51861dfc7ca9d588$var$bidirectionalIndexOf","val","dir","$51861dfc7ca9d588$var$arrayIndexOf","lastIndexOf","arr","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","found","j","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","$51861dfc7ca9d588$var$decodeCodePointsArray","codePoints","$51861dfc7ca9d588$var$checkOffset","offset","ext","$51861dfc7ca9d588$var$checkInt","max","$51861dfc7ca9d588$var$wrtBigUInt64LE","$51861dfc7ca9d588$var$checkIntBI","lo","Number","BigInt","hi","$51861dfc7ca9d588$var$wrtBigUInt64BE","$51861dfc7ca9d588$var$checkIEEE754","$51861dfc7ca9d588$var$writeFloat","littleEndian","noAssert","$51861dfc7ca9d588$var$writeDouble","TYPED_ARRAY_SUPPORT","$51861dfc7ca9d588$var$typedArraySupport","proto","foo","poolSize","alloc","fill","allocUnsafe","allocUnsafeSlow","_isBuffer","compare","x","concat","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","str","replace","trim","target","thisStart","thisEnd","thisCopy","targetCopy","isFinite","remaining","$51861dfc7ca9d588$var$hexWrite","strLen","parsed","parseInt","substr","$51861dfc7ca9d588$var$blitBuffer","$51861dfc7ca9d588$var$asciiToBytes","byteArray","charCodeAt","$51861dfc7ca9d588$var$utf16leToBytes","units","c","toJSON","_arr","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","$51861dfc7ca9d588$var$defineBigIntMethod","$51861dfc7ca9d588$var$validateNumber","first","last","$51861dfc7ca9d588$var$boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","maxBytes","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","$51861dfc7ca9d588$var$errors","$51861dfc7ca9d588$var$E","sym","getMessage","Base","writable","stack","$51861dfc7ca9d588$var$addNumericalSeparator","range","ERR_OUT_OF_RANGE","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","received","isInteger","abs","$51861dfc7ca9d588$var$INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","$51861dfc7ca9d588$var$base64clean","src","dst","alphabet","table","i16","fn","$51861dfc7ca9d588$var$BufferBigIntNotDefined","$eeb0961446aae8e3$export$d622b2ad8d90c771","$eeb0961446aae8e3$export$6100ba28696e12de","b64","tmp","lens","$eeb0961446aae8e3$var$getLens","validLen","placeHoldersLen","$eeb0961446aae8e3$var$Arr","curByte","$eeb0961446aae8e3$var$revLookup","uint8","extraBytes","parts","len2","$eeb0961446aae8e3$var$encodeChunk","output","$eeb0961446aae8e3$var$lookup","num","$eeb0961446aae8e3$var$code","$eeb0961446aae8e3$var$i","$eeb0961446aae8e3$var$len","$7221566bd4d49f44$export$aafa59e2e03f2942","$7221566bd4d49f44$export$68d8715fc104d294","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","rt","isNaN","LN2","$0b9265e3f06832e9$export$ea55f474a468804e","$ff463032e6a14a0a$var$SHORT_TO_HEX","$ff463032e6a14a0a$var$HEX_TO_SHORT","encodedByte","$af0fe83fb084e5d7$export$eeff9d1a8b8c057b","authResourcesConfig","authOptions","credentialsAndIdentityId","userSub","getTokens","accessToken","getCredentialsAndIdentityId","authenticated","forceRefresh","credentials","identityId","clearCredentials","clearCredentialsAndIdentityId","$8a827f16696ff978$export$dae7d845015939d5","$8Nbse","expires","getData","item","removeItem","clear","promises","all","global","factory","assign","converter","defaultAttributes","toUTCString","decodeURIComponent","escape","stringifiedAttributes","attributeName","cookie","cookies","jar","withAttributes","withConverter","$c47f21f216a22ace$export$586b30dcaeecb901","$c47f21f216a22ace$export$9015f19b74348a18","$ejny4","$g1gqr","$ceLb3","$4EL3H","$eygwb","DefaultStorage","SessionStorage","SyncSessionStorage","KeyValueStorage","InMemoryStorage","$9f78cbd356024b7e$export$bec45e7703e93690","$5Y39P","getLocalStorageWithFallback","$0d6aa7e6d5a3429c$export$8536778e426ddf92","$fngA0","PlatformNotSupportedError","$a91ea1244b77fef7$export$f5362e8a6666a455","$8rSHg","AmplifyErrorCode","PlatformNotSupported","$032079a569aa4e0d$export$4e712df6b850c8d0","$a932b92f8e337975$export$5d9abaf8ff62cd65","$a932b92f8e337975$export$518dcc1598f87b","$a932b92f8e337975$var$logger","$2875d3cc5c2dfbf0$export$e4315e25b840a0ea","index","delete","$a3c2eb980ed98e6f$export$2c4b17e1c2e0931","getSessionStorageWithFallback","$9fd79fe0a753d145$export$eb7b875b75a2c8df","$3Ebx5","SyncKeyValueStorage","$9cf2f49300c31e72$export$f7640313c5d17c27","_storage","$58a834a1218aacfd$export$be43b753aec531e2","$2vm2m","$5rVdp","CognitoAWSCredentialsAndIdentityIdProvider","DefaultIdentityIdStore","$9f93ccdc5f95c7af$export$3e97b78667a539a0","$bfiP6","$029ov","$88z72","$9f93ccdc5f95c7af$var$logger","authConfigParam","assertIdentityPoolIdConfig","_authKeys","$9f93ccdc5f95c7af$var$createKeysForAuthStorage","keyValueStorage","_hasGuestIdentityId","loadIdentityId","_primaryIdentityId","storedIdentityId","storeIdentityId","identity","clearIdentityId","identifier","getAuthStorageKeys","IdentityIdStorageKeys","$47b41f0bc3dcf730$export$80c92581e59ed502","$47b41f0bc3dcf730$export$c13e6dbaf90a8e5f","$47b41f0bc3dcf730$export$8a2f5318ea3215e3","$47b41f0bc3dcf730$export$9a62e6c0a30e00bc","$iLExi","$cYnY3","cognitoConfig","assertionValid","assert","AuthConfigurationErrorCode","AuthUserPoolException","validOAuthConfig","OAuthNotConfigureException","validConfig","InvalidIdentityPoolIdException","token","tokenParts","base64","base64WithUrlSafe","jsonStr","base64Decoder","char","JSON","parse","$0a6173e3df3e7293$export$1e303d38dab7b376","$dfMUF","inputStr","urlSafe","getAtob","$6f3b4030fc0f3ef5$export$e003cc239f955cb6","$6f3b4030fc0f3ef5$export$94f295707b435c6d","$6f3b4030fc0f3ef5$export$ea737e7700106b27","crypto","btoa","atob","$c43ab8490e8ade2c$export$7b5c8b570ea8407","$c43ab8490e8ade2c$export$a7a9523472993e97","$bggJy","$c43ab8490e8ade2c$var$authConfigurationErrorMap","AuthTokenConfigException","AuthUserPoolAndIdentityPoolException","createAssertionFunction","$0d1a22fb669c23b6$export$5cb8fc27ccbe9d40","errorMap","AssertionError","assertion","additionalContext","$bfc286311b85b781$export$a36be852d43d512","$bfc286311b85b781$export$dfb8da757ca62eed","$b62N7","$3O5pD","$dvCiI","$fa9cv","getKeyValueStorage","AuthError","loadTokens","authKeys","getAuthKeys","accessTokenString","decodeJWT","itString","refreshToken","clockDriftString","clockDrift","signInDetails","deviceMetadata","getDeviceMetadata","getLastAuthUser","storeTokens","TokenProviderErrorCode","InvalidAuthTokens","lastAuthUser","getLastAuthUserKey","deviceKey","deviceGroupKey","randomPasswordKey","randomPassword","stringify","clearTokens","oauthMetadata","clearDeviceMetadata","assertTokenProviderConfig","$bfc286311b85b781$export$4647c72f6828a74d","AUTH_KEY_PREFIX","setOAuthMetadata","metadata","oauthMetadataKey","getOAuthMetadata","AuthTokenStorageKeys","values","authKey","$0bd2271901d3ce8f$export$145273558d58e0ac","params","$338fa29dda4a9a9e$export$b8429d1428aad8ba","oidcProvider","$40486dcb7c4675e2$export$cc5909720f29144","$40486dcb7c4675e2$export$a7a9523472993e97","$40486dcb7c4675e2$var$tokenValidationErrorMap","$639183b62dc5e02d$export$2c8f6d7ed1534551","$c1ea576318e91128$export$dad1700b96c3a835","$1b1ef4a1e101da96$export$be6550e37264dc26","$avjBi","$hXC67","$kOfpC","$4a2RL","$inqgD","$1b1ef4a1e101da96$var$logger","identityIdStore","_nextCredentialsRefresh","_identityIdStore","_credentialsAndIdentityId","getCredentialsOptions","tokenHasChanged","hasTokenChanged","cognitoIdentityIdProvider","assertIdTokenInAuthTokens","credsForOIDCTokens","getGuestCredentials","isPastTTL","isAuthenticatedCreds","getRegionFromIdentityPoolId","clientResult","getCredentialsForIdentity","IdentityId","Credentials","AccessKeyId","SecretKey","getTime","accessKeyId","secretAccessKey","sessionToken","SessionToken","expiration","Expiration","authTokens","logins","formLoginsMap","Logins","associatedIdToken","$585cd79baee831be$export$a49c1c173ab96b58","$7ecIZ","$bM38a","$6vbP8","$lL7zI","$585cd79baee831be$var$getCredentialsForIdentityDeserializer","response","statusCode","parseJsonError","parseJsonBody","$585cd79baee831be$var$deserializeCredentials","$metadata","parseMetadata","composeServiceApi","cognitoIdentityTransferHandler","headers","getSharedHeaders","buildHttpRpcRequest","defaultConfig","$f4d14d043a6280d5$export$978f9418fe0cb26c","$f4d14d043a6280d5$var$isMetadataBearer","httpStatusCode","requestId","extendedRequestId","cfId","$79d947bf5668e8ed$export$be467dfcc0538e25","$79d947bf5668e8ed$export$759bcb35b0d1bf81","sanitizeErrorCode","rawValue","cleanValue","__type","Message","json","$8099fb84e4081018$export$880429a8ae983d4d","transferHandler","serializer","deserializer","resolvedConfig","endpointResolver","request","$875b0abd80166f32$export$8029646671d2c482","$875b0abd80166f32$export$f84bd70098573c5c","$875b0abd80166f32$export$a46bbeaba09f7285","$875b0abd80166f32$export$a692bdb7eb624f96","$fqhqt","$itEnq","$5D9nd","$4ZD6k","$7Ar4G","$8e8Xp","$dj9FS","$iHOzP","composeTransferHandler","unauthenticatedHandler","AmplifyUrl","getDnsSuffix","retryDecider","getRetryDecider","computeDelay","jitteredBackoff","userAgentValue","getAmplifyUserAgent","cache","observeFrameworkChanges","operation","method","$8ce7edd304848afd$export$1c28e37cdcc37f6d","$amVal","partitions","partitionsInfo","regions","outputs","regionRegex","regex","RegExp","test","dnsSuffix","defaultPartition","$5c61b283b1e239d9$export$72f3cee421ee8a74","$5c61b283b1e239d9$export$d7c12af0c0f12206","$156379934f867ed3$export$ed7e1ccf00f39c4a","$aWNly","$aBoxv","$anVi4","fetchTransferHandler","userAgentMiddlewareFactory","retryMiddlewareFactory","$60f584ba62481a94$export$72f002d3da1a429f","$60f584ba62481a94$var$DEFAULT_RETRY_ATTEMPTS","maxAttempts","abortSignal","context","attemptsCount","handleTerminalErrorOrResponse","$60f584ba62481a94$var$addOrIncrementMetadataAttempts","aborted","isCredentialsExpiredError","retryable","isCredentialsExpired","delay","$60f584ba62481a94$var$cancellableSleep","timeoutMs","timeoutId","sleepPromiseResolveFn","sleepPromise","cancelSleep","clearTimeout","removeEventListener","nextHandlerOutput","attempts","$2b3779b84f2cce55$export$ff28171a05413bc5","userAgentHeader","headerName","$faf95af99f8b5697$export$f074d76e52925468","coreHandler","middleware","composedHandler","composeHandlerRequest","resolvedMiddleware","$c6ff1f678a0bf7c2$export$d2573baf35521e4c","$joNXB","$c6ff1f678a0bf7c2$var$shouldSendBody","withCrossDomainCredentials","resp","fetch","signal","NetworkError","responseHeaders","httpResponse","bodyWithMixin","text","withMemoization","blob","$0cf8b26b324855c8$export$580ad1ce15092b15","payloadAccessor","cached","$6b984381f509b0c4$export$caea50bde345f648","$h05tY","attempt","delayFunction","$bb00929d82f30d06$export$caea50bde345f648","$1Ns4m","maxDelayMs","MAX_DELAY_MS","JITTER_FACTOR","random","$2ebb2babc51c1967$export$76041b1400befb8b","$8eda02c680edd0d6$export$b919d98317a7685f","$i3rGM","errorParser","parsedError","errorCode","$8eda02c680edd0d6$var$isConnectionError","$8eda02c680edd0d6$var$isThrottlingError","isClockSkewError","$8eda02c680edd0d6$var$isServerSideError","$8eda02c680edd0d6$var$THROTTLING_ERROR_CODES","$8eda02c680edd0d6$var$TIMEOUT_ERROR_CODES","$25c9c2f444e10e78$export$7b87435661177a94","$25c9c2f444e10e78$var$CLOCK_SKEW_ERROR_CODES","$69ea4819ac006867$export$beb82d9d9136c16e","URL","URLSearchParams","$a3c63f83cda4eabf$export$ede38edb26c0bfdf","$k2DuP","$bJXer","$lA3xE","$a3c63f83cda4eabf$var$BASE_USER_AGENT","$a3c63f83cda4eabf$export$b8f78c57ec316f83","amplifyVersion","userAgent","framework","detectFramework","isReactNative","Framework","ReactNative","Expo","fcn","$a3c63f83cda4eabf$export$7d201307d8979e21","category","action","getCustomUserAgent","customUserAgentDetails","agentKey","agentValue","$03a78c53205d4e48$export$638889172ebce0c4","$03a78c53205d4e48$export$3a8840c5b2ecf003","$03a78c53205d4e48$export$89656a7f296a8665","$03a78c53205d4e48$export$30c16f5c43437fd7","$03a78c53205d4e48$export$126e20fdc0f0d34b","$03a78c53205d4e48$export$900b1436d7e65f4","$03a78c53205d4e48$export$2f5a715aba4cde93","$03a78c53205d4e48$export$afafab3eb8fc6fef","$03a78c53205d4e48$export$c01a8c16ffda791e","$03a78c53205d4e48$export$68e0695a774ab7fa","$03a78c53205d4e48$export$aa89b4c447a07cee","$03a78c53205d4e48$export$ade48b30f1e78672","$03a78c53205d4e48$export$2c5ee06ab9fa5040","$03a78c53205d4e48$export$d4f3c54b808b00ce","Category","AiAction","AnalyticsAction","ApiAction","AuthAction","DataStoreAction","GeoAction","InAppMessagingAction","PredictionsAction","PushNotificationAction","StorageAction","InteractionsAction","PubSubAction","$f2bdc992a31a3840$export$83d89fbfd8236492","$8e898e8be4dc09ea$var$frameworkCache","$8e898e8be4dc09ea$export$9ce73e459ec93b6a","$8e898e8be4dc09ea$export$5d5c467ce0b213f","$1XCWz","$8e898e8be4dc09ea$export$d56891f33aa26edc","$8e898e8be4dc09ea$var$resetTriggered","detect","$8e898e8be4dc09ea$var$resetTimeout","ServerSideUnknown","WebUnknown","$4f5e49be6c2f4c6b$export$17b446b869dad473","$5SWUB","$89E5v","$dXsZ3","$3uPOM","$7wUjf","$cZAgk","$04Bbd","$cN0eS","$SrjZ5","$4f5e49be6c2f4c6b$var$detectionMap","platform","detectionMethod","expoDetect","reactNativeDetect","NextJs","nextWebDetect","Nuxt","nuxtWebDetect","Angular","angularWebDetect","React","reactWebDetect","VueJs","vueWebDetect","Svelte","svelteWebDetect","webDetect","NextJsSSR","nextSSRDetect","NuxtSSR","nuxtSSRDetect","ReactSSR","reactSSRDetect","VueJsSSR","vueSSRDetect","AngularSSR","angularSSRDetect","SvelteSSR","svelteSSRDetect","find","detectionEntry","$627d0a27c40192cb$export$ba3f37c54f0f7805","$627d0a27c40192cb$export$86269c582305790","$i0jHL","$hPtJY","elementKeyPrefixedWithReact","documentExists","allElementsWithId","element","processExists","env","$143673b599f131f0$export$a15eed0e463030a9","$143673b599f131f0$export$daba2802a1a41c1f","$143673b599f131f0$export$b949ebcb877faa59","$143673b599f131f0$export$ba10401363d0f7f6","$143673b599f131f0$export$252f88727cff70c7","$cfae44f0dfdf62c0$var$cachedSetTimeout","$cfae44f0dfdf62c0$var$cachedClearTimeout","$cfae44f0dfdf62c0$var$currentQueue","$cfae44f0dfdf62c0$var$process","$cfae44f0dfdf62c0$var$defaultSetTimout","$cfae44f0dfdf62c0$var$defaultClearTimeout","$cfae44f0dfdf62c0$var$runTimeout","fun","$cfae44f0dfdf62c0$var$queue","$cfae44f0dfdf62c0$var$draining","$cfae44f0dfdf62c0$var$queueIndex","$cfae44f0dfdf62c0$var$cleanUpNextTick","$cfae44f0dfdf62c0$var$drainQueue","timeout","run","$cfae44f0dfdf62c0$var$runClearTimeout","marker","$cfae44f0dfdf62c0$var$Item","$cfae44f0dfdf62c0$var$noop","nextTick","args","title","browser","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","umask","$ca4f85d593562053$export$d91d90d62b78936d","$ca4f85d593562053$export$257a4c0f8294a101","windowExists","keyPrefixMatch","globalExists","$10841416b19b9aca$export$6dafc32a94edaed3","$10841416b19b9aca$export$819dcb7fe144d8b0","$da3905a0dc1faf56$export$f8462bcf03110eff","$da3905a0dc1faf56$export$61c08ed144a5d4ca","$24fea5be4f379b80$export$bed54a4e6d9d25fb","$24fea5be4f379b80$export$fb3ce982948d27e8","__NUXT__","$nuxt","__NUXT_PATHS__","$f97e986d2a7067a7$export$b5a20bd39eb02ba0","$f97e986d2a7067a7$export$8ab518c8987c870f","angularVersionSetInDocument","Boolean","querySelector","angularContentSetInWindow","ng","$ea500a36684bbe73$export$1c8414c1859e3748","navigator","product","$0b4145bd3be7264c$export$85fd46d5e29a4f7e","expo","$86fec584d392e5dc$export$41b1270b988065fb","$aeac22076f27cf78$export$e399dbcfd99a2928","$aeac22076f27cf78$var$customUserAgentState","additionalDetails","$911ca14fd2d79250$export$5f7eb9761ac2d0d9","$911ca14fd2d79250$export$8fb32fba519c460","$611242aba31f7515$export$77712ea5882cac9f","$611242aba31f7515$export$f4d99632f0717a4b","$611242aba31f7515$export$be38b2d22222d505","$611242aba31f7515$export$b6f03be79626ab0f","$611242aba31f7515$export$3820b4ff343394ea","$cutI2","USER_UNAUTHENTICATED_EXCEPTION","$611242aba31f7515$export$31fce2aaeafa4b60","TOKEN_REFRESH_EXCEPTION","$611242aba31f7515$export$35cfa8cbd2d5bcdd","$611242aba31f7515$var$isAuthenticated","DEVICE_METADATA_NOT_FOUND_EXCEPTION","inflightOAuth","oauthSignIn","oauthPKCE","oauthState","$5d443480af2ea56c$export$d29d1996d6b6f5e3","$5d443480af2ea56c$export$bdd0e7e9babcd5c8","$5d443480af2ea56c$export$740e7000ac27ebf3","$5d443480af2ea56c$export$fe46a12932d2550a","$5d443480af2ea56c$export$60b68b138a52e5ae","$5d443480af2ea56c$export$41a56a70fc1a4962","$5d443480af2ea56c$export$c01b4acd6291e035","$5d443480af2ea56c$export$625255707e22459c","$5d443480af2ea56c$export$a0a904daf48e2c33","$5d443480af2ea56c$export$606cffc85964c24b","$afb7bce2c184eee7$export$7c3e576630d5e301","$0D2gL","generatedIdentityId","$afb7bce2c184eee7$var$generateIdentityId","idResult","getId","IdentityPoolId","$0a5974c6b22efc6b$export$218c8c3169c024d2","$0a5974c6b22efc6b$var$getIdDeserializer","$1f210c15c4cfce94$export$edfb13e85a2c0dc4","issuer","iss","$f908ae8342f11964$export$18e158b80aac31a7","$f908ae8342f11964$export$66561e66d62991d0","$cNsoR","CognitoUserPoolsTokenProvider","tokenOrchestrator","$50ac27d44f503ae7$export$85b743bbda58cb6c","$fNgI2","$8sJng","authTokenStore","DefaultTokenStore","TokenOrchestrator","setAuthTokenStore","setTokenRefresher","refreshAuthTokens","$ec8c93d7f96724a1$export$ab413c2cb4a135d9","$fEpEV","$4FP28","$eAu1N","$7fUr4","$ec8c93d7f96724a1$var$refreshAuthTokensFunction","userPoolEndpoint","getRegionFromUserPoolId","assertAuthTokensWithRefreshToken","refreshTokenString","AuthParameters","REFRESH_TOKEN","DEVICE_KEY","UserContextData","getUserContextData","initiateAuth","createInitiateAuthClient","createCognitoUserPoolEndpointResolver","endpointOverride","AuthenticationResult","ClientId","AuthFlow","AccessToken","IdToken","iat","deDupeAsyncFunction","$f03ecb0e97a4a66d$export$cd8d22e3dc00ae5a","asyncFunction","inflightPromise","catch","finally","$366edd25a776ae61$export$91f349d78bea7765","$2qp1o","$7OD1Z","$bdRfK","$luL8F","cognitoUserPoolTransferHandler","createUserPoolSerializer","createUserPoolDeserializer","DEFAULT_SERVICE_CLIENT_API_CONFIG","$55e831673135f9bc$export$1113413e6e842bef","$55e831673135f9bc$var$buildHttpRpcRequest","$55e831673135f9bc$var$getSharedHeaders","$c23928af209b7a43$export$8159795418a3e796","$iNzmv","assertServiceError","$97dc54107f586751$export$5b3890f50cd4853f","Unknown","$8adeed53cf0c96fd$export$10f11e95d7a96f7b","$7e2fded04fb92020$export$22a3716e7860147a","$5l8w8","COGNITO_IDP_SERVICE_NAME","$87e7d4635adc81eb$export$a0efffb4b0c72e04","$f24e571831226942$export$9fc8f7dceefe00a6","$Reymm","cognitoUserPoolEndpointResolver","$0c02ab99f864ae06$export$54dd9d9496cb66b9","$166ed226583428f1$export$b6e6cdd1f90faa62","amazonCognitoAdvancedSecurityData","AmazonCognitoAdvancedSecurityData","advancedSecurityData","EncodedData","$67be88f695aa02a6$export$ba2f3fbc8979d2e6","$a93i9","$5ZJQw","$hHV4w","$gwp96","waitForInflightOAuth","isBrowser","oAuthStore","loadOAuthInFlight","_reject","addInflightPromise","tokenRefresher","tokenStore","getTokenStore","getTokenRefresher","_err","idTokenExpired","isTokenExpired","expiresAt","exp","accessTokenExpired","refreshTokens","newTokens","setTokens","handleErrors","$138054732e02d887$export$4e09c449d6c407f7","$3ec585405a56a5d2$export$b007d77a962aa175","tolerance","currentTime","$a07429c4e1a8223f$export$2ed0ec267eb6cb1c","$DNF8t","DefaultOAuthStore","$c561250709ea1156$export$9b2cef5d94f9b6e8","$c561250709ea1156$var$V5_HOSTED_UI_KEY","$c561250709ea1156$var$name","clearOAuthInflightData","$c561250709ea1156$var$createKeysForAuthStorage","clearOAuthData","loadOAuthState","storeOAuthState","loadPKCE","storePKCE","pkce","storeOAuthInFlight","inflight","loadOAuthSignIn","isLegacyHostedUISignIn","isOAuthSignIn","preferPrivateSession","storeOAuthSignIn","OAuthStorageKeys","$7b9efa68fb4ba4e8$export$c55b09e0e9be0d04","$7b9efa68fb4ba4e8$export$bcb0b7a105a5df59","$7b9efa68fb4ba4e8$var$inflightPromises","resolver","$5d92bddd58c7fd2f$export$e5432d4c8eb97ea7","$emFmE","$966807e07f0c8ebe$export$e5432d4c8eb97ea7","amplify","assertAuthTokens","authUser","userId","$83614fd30266723c$export$39430dfe49142ae","$eL2i9","$bb56c3c3b8aca32b$export$39430dfe49142ae","$bb923765bb002412$export$5dc95ecf3f16c6c9","$hdrpg","$8b11ddb4b86043a5$export$5dc95ecf3f16c6c9","$ZiWkh","$aEls4","$fNWle","getUser","createGetUserClient","UserAttributes","getAuthUserAgentValue","FetchUserAttributes","toAuthUserAttribute","$037da67d5e4435f8$export$720a7caa078a04b0","Name","Value","$037da67d5e4435f8$export$1b975641d03f3b17","attribute","$3bebc22382ede2ae$export$d6cd780379f37dae","$f661ac5f22d02ec1$export$9b3b12a535efe659","$abc82bc09222a7fb$export$cf64224bcd829024","$7XpgE","$ewkqX","$lFCWu","$kNTsK","$5XcLh","$epZMx","clientMetadata","validationData","assertValidationError","AuthValidationErrorCode","EmptySignUpUsername","signInServiceOptions","signInInput","authFlowType","signUpClient","createSignUpClient","signUpClientInput","Username","Password","toAttributeType","ClientMetadata","ValidationData","UserSub","CodeDeliveryDetails","cdd","UserConfirmed","Session","SignUp","autoSignInStore","codeDeliveryDetails","destination","Destination","deliveryMedium","DeliveryMedium","AttributeName","isAutoSignInStarted","getState","active","setAutoSignIn","autoSignInUserConfirmed","signUpStep","autoSignInWhenUserIsConfirmedWithLink","handleCodeAutoSignIn","$7b94ec505a14c4da$export$45936001d12f9b53","$fjlOG","validationErrorMap","$1be4bde6f9a6f509$export$195137955146d376","$1be4bde6f9a6f509$export$c3070468b9d65120","$1be4bde6f9a6f509$export$473ab0b56598aacd","AuthErrorStrings","AuthErrorCodes","EmptyChallengeResponse","EmptyConfirmResetPasswordUsername","EmptyConfirmSignUpCode","EmptyConfirmSignUpUsername","EmptyConfirmResetPasswordConfirmationCode","EmptyConfirmResetPasswordNewPassword","EmptyResendSignUpCodeUsername","EmptyResetPasswordUsername","EmptySignInPassword","EmptySignInUsername","EmptySignUpPassword","CustomAuthSignInPassword","IncorrectMFAMethod","EmptyVerifyTOTPSetupCode","EmptyUpdatePassword","EmptyConfirmUserAttributeCode","$fe1cf33beea6c7e2$export$12d5c695b2213c4a","$167b4f920a0b30b9$export$385d6b43f72ecccf","$167b4f920a0b30b9$export$feaed4858b71e8a","$167b4f920a0b30b9$export$9ec2c3d010185172","$jqRoP","stopHubListener","HubInternal","$167b4f920a0b30b9$var$autoSignInWithCode","timeOutId","resetAutoSignIn","$167b4f920a0b30b9$var$debounce","timer","$167b4f920a0b30b9$var$debouncedAutoSignInWithLink","autoSignInPollingIntervalId","setInterval","elapsedTime","clearInterval","AUTO_SIGN_IN_EXCEPTION","signInOutput","$167b4f920a0b30b9$var$debouncedAutoSignWithCodeOrUserConfirmed","$167b4f920a0b30b9$var$handleAutoSignInWithCodeOrUserConfirmed","signInWithUserAuth","$864ab8669b105bc5$export$9670d83f11d4b64a","$4DGDz","$2ob6P","$hfsLE","$aplbo","$j3ZKM","assertUserNotAuthenticated","signInWithSRP","signInWithUserPassword","signInWithCustomAuth","signInWithCustomSRPAuth","$6fab2921b1277409$export$29fb48d356e16a7","$6fab2921b1277409$export$13a3ef5ef8cac338","$6fab2921b1277409$export$1a654dcab55e0de5","$6fab2921b1277409$export$9ce9dd351616104c","$6fab2921b1277409$export$cf152400b58b8e65","$6fab2921b1277409$export$cafe99bb44d49edb","$6fab2921b1277409$export$8061cd07f982ef08","$6fab2921b1277409$export$cc3585de146a51be","$kxGIY","$jWmGf","$g8535","$85LUF","$71859","$14Fuc","$gGTf9","$SXwmC","$eL1Oc","$ePagu","$6fab2921b1277409$var$USER_ATTRIBUTES","authParameters","USERNAME","PASSWORD","SignIn","activeUsername","ChallengeParameters","USER_ID_FOR_SRP","setActiveSignInUsername","ChallengeName","handleDeviceSRPAuth","handlePasswordSRP","authFlow","userPoolName","authenticationHelper","getAuthenticationHelper","SRP_A","A","CHALLENGE_NAME","challengeParameters","retryOnResourceNotFoundException","handlePasswordVerifierChallenge","secretCode","availableChallenges","additionalInfo","signInSession","signInStore","mfaSetupTypes","$6fab2921b1277409$export$d70c792e078766ea","$6fab2921b1277409$export$4055ded9e78438ba","MFAS_CAN_SETUP","allowedMfaSetupTypes","availableMfaSetupTypes","authMfaType","isTotpMfaSetupAvailable","isEmailMfaSetupAvailable","allowedMFATypes","associateSoftwareToken","createAssociateSoftwareTokenClient","SecretCode","totpSetupDetails","sharedSecret","getSetupUri","appName","accountName","totpUri","SignInException","missingAttributes","requiredAttributes","att","MFAS_CAN_CHOOSE","CODE_DELIVERY_DELIVERY_MEDIUM","CODE_DELIVERY_DESTINATION","handleWebAuthnSignInResult","errorName","InitiateAuthException","PasswordResetRequiredException","UserNotConfirmedException","$6fab2921b1277409$export$6ce04ce89055b1fe","types","USER_ALREADY_AUTHENTICATED_EXCEPTION","$38f3777598d063a4$export$3cc5c71ef5f25e57","$38f3777598d063a4$export$4327725e8bb80c51","$38f3777598d063a4$export$87a956d0b1b725a1","$38f3777598d063a4$export$b86a388af82085af","$38f3777598d063a4$export$2ec29642a27fd055","$38f3777598d063a4$export$c6d546f0ab5ecb26","$38f3777598d063a4$export$315864c77a135492","$38f3777598d063a4$export$622cff54bc9a0bb0","$38f3777598d063a4$export$cedaef1e1242f8be","$38f3777598d063a4$export$8d5b6b7a140e0c94","$38f3777598d063a4$export$506f117795ed2bb2","$38f3777598d063a4$export$9bff15c85d75f437","$38f3777598d063a4$export$2a6bba23fbf84d1b","$38f3777598d063a4$export$3f7e490ba4e0b71e","$38f3777598d063a4$export$43ac0110dfdad33b","$38f3777598d063a4$export$8807b62ddb0e4d9d","$38f3777598d063a4$export$da9908386393628f","$38f3777598d063a4$export$23ea34859d89459d","$38f3777598d063a4$export$d0816902ed99fce6","$38f3777598d063a4$export$44cb15f260897376","$38f3777598d063a4$export$a974f64d24be573a","$38f3777598d063a4$export$527caabb62d14fe3","$38f3777598d063a4$export$de57be1863bdb9d6","$38f3777598d063a4$export$eb8cb06bdb07bf0c","AssociateSoftwareTokenException","ChangePasswordException","ConfirmDeviceException","ConfirmForgotPasswordException","ConfirmSignUpException","DeleteUserAttributesException","DeleteUserException","ForgetDeviceException","ForgotPasswordException","GetUserException","GetIdException","GetCredentialsForIdentityException","GetUserAttributeVerificationException","GlobalSignOutException","ResendConfirmationException","RespondToAuthChallengeException","SetUserMFAPreferenceException","SignUpException","UpdateUserAttributesException","VerifySoftwareTokenException","VerifyUserAttributeException","UpdateDeviceStatusException","ListDevicesException","$c7cfea3fbbdba519$export$11329f5ae466ab5d","$87be50599779ca89$export$cf5dd9429415aa98","$42d51ce9ec3a689b$export$6bff32634453de2a","$ed8b85eec8f7d712$export$77701654924537aa","$cTNcW","$eQv6f","$8Z7oT","$23mcB","$3fXpj","$1oMYx","CREDENTIAL_REQUEST_OPTIONS","credentialRequestOptions","assertPasskeyError","PasskeyErrorCode","InvalidPasskeyAuthenticationOptions","cred","getPasskey","respondToAuthChallenge","createRespondToAuthChallengeClient","nextChallengeName","nextChallengeParameters","authenticationResult","nextSession","ConfirmSignIn","ChallengeResponses","CREDENTIAL","setActiveSignInState","cacheCognitoTokens","NewDeviceMetadata","getNewDeviceMetadata","newDeviceMetadata","dispatchSignedInHubEvent","$a779287bf2b03a51$export$729df6fdd19b8b0d","accessTokenIssuedAtInMillis","RefreshToken","$6be4baea9bcbd5e1$export$4d78d2ee899572ab","UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION","currentState","$5c2e856f6dc0fa98$export$ddfd5a0262ce9df3","$5c2e856f6dc0fa98$export$390d5da4c63a4a41","$5c2e856f6dc0fa98$export$bae72361b690e075","reducer","$5c2e856f6dc0fa98$var$TGT_STATE","$5c2e856f6dc0fa98$var$SIGN_IN_STATE_KEYS","expiry","$5c2e856f6dc0fa98$var$isExpired","expiryDate","expiryTimestamp","$5c2e856f6dc0fa98$var$clearPersistedSignInState","stateKey","syncSessionStorage","$5c2e856f6dc0fa98$var$getDefaultState","$5c2e856f6dc0fa98$var$getInitialState","$5c2e856f6dc0fa98$export$f0d4bc0f1640c562","$d08027fec3d3ccf3$export$8c9a5e3ce7fcf74e","$d08027fec3d3ccf3$export$3145abf24cf8a54e","$d08027fec3d3ccf3$export$6abde9ceb8dfddc0","$d08027fec3d3ccf3$export$bf0fd5fd31fb5a90","$d08027fec3d3ccf3$var$notSupportedRecoverySuggestion","$d08027fec3d3ccf3$var$abortOrCancelRecoverySuggestion","$d08027fec3d3ccf3$var$misconfigurationRecoverySuggestion","$d08027fec3d3ccf3$var$passkeyErrorMap","PasskeyNotSupported","InvalidPasskeyRegistrationOptions","PasskeyRegistrationFailed","PasskeyRetrievalFailed","PasskeyAlreadyExists","PasskeyRegistrationCanceled","PasskeyAuthenticationCanceled","PasskeyOperationAborted","RelyingPartyMismatch","$d08027fec3d3ccf3$var$handlePasskeyError","$6be855fabffe2ac3$export$d7f92bd7f1e366c1","$lk459","$4u189","$eCia3","isPasskeySupported","getIsPasskeySupported","passkeyGetOptions","deserializeJsonToPkcGetOptions","credential","publicKey","assertCredentialIsPkcWithAuthenticatorAssertionResponse","serializePkcWithAssertionToJson","handlePasskeyAuthenticationError","$9915447356888d62$export$3b0e0bb0e9c22c1a","isSecureContext","PublicKeyCredential","$89a0679f7bc4b028$export$d3f47ce866c52e8e","$89a0679f7bc4b028$export$1f22b133ac0d2a5","$gd5C0","$jjzUG","challengeBuffer","convertBase64UrlToArrayBuffer","challenge","allowedCredentialsWithBuffer","allowCredentials","allowedCred","clientDataJSON","convertArrayBufferToBase64Url","authenticatorData","signature","userHandle","resultJson","rawId","clientExtensionResults","getClientExtensionResults","authenticatorAttachment","$ea04d9a299f79266$export$442d4feb149fcd32","$ijwDq","base64Encoder","skipPadding","$a67be9353d05d3e6$export$695b149896bd3e2a","$1AT8d","bytesToString","encodedStr","getBtoa","$2388b4cedba94ebc$export$7c746b75f47c9c7d","byte","fromCodePoint","$26da68f5470f1f69$export$9cebd483a59f0168","base64url","$fbaa07247a5cfdde$export$4f19e511a89efed7","AuthenticatorAssertionResponse","$139a547276a916a7$export$548ed8ad974a8b30","$3DkEi","$ibiNz","$gOOIy","DeviceKey","DeviceGroupKey","generateHashDevice","errGenHash","deviceSecretVerifierConfig","Salt","getBytesFromHex","getSaltToHashDevices","PasswordVerifier","getVerifierDevices","getRandomPassword","confirmDevice","createConfirmDeviceClient","DeviceName","getDeviceName","DeviceSecretVerifierConfig","$f87660ead8de1984$export$98f0aedb14d75123","userAgentData","platformVersion","model","architecture","fullVersionList","getHighEntropyValues","deviceName","brand","$d7dd34d7361c5e05$export$d88a63af6351a7c3","$d15f25b735660378$export$47560e2dc89f678c","$ek3O0","$ok6jc","$6kGvi","$3mAEj","$5msoD","$cX45s","N","INIT_N","$d15f25b735660378$var$generateRandomBigInteger","calculateA","hexRandom","getHexFromBytes","getRandomBytes","$760f4b32a6e27466$export$2e2bcd8739ae039","$1lplT","$2qVuC","$hXRGV","$1z3WR","$8LNxk","$bL5rc","$dmuLi","$gB3lp","encoder","textEncoder","k","getHashFromHex","getPaddedHex","saltToHashDevices","verifierDevices","getRandomString","combinedString","hashedString","getHashFromData","modPow","getPasswordAuthenticationKey","serverBValue","salt","mod","ZERO","U","calculateU","B","usernamePassword","usernamePasswordHash","S","calculateS","spacer","getHkdfKey","$447c9600b59ec805$export$f5d75491a17f02c","$269edab20268b88d$var$dbits","$269edab20268b88d$var$rr","$269edab20268b88d$var$vv","$269edab20268b88d$export$2e2bcd8739ae039","fromString","$269edab20268b88d$var$nbi","$269edab20268b88d$var$inBrowser","am","w","xl","xh","l","h","DB","DM","DV","FV","F1","$269edab20268b88d$var$BI_FP","F2","$269edab20268b88d$var$BI_RC","$269edab20268b88d$var$int2char","$269edab20268b88d$var$BI_RM","$269edab20268b88d$var$nbv","r","fromInt","$269edab20268b88d$var$nbits","$269edab20268b88d$var$Montgomery","mp","invDigit","mpl","mph","um","mt2","dlShiftTo","divRemTo","compareTo","subTo","revert","copyTo","u0","clamp","drShiftTo","mulTo","multiplyTo","sqrTo","squareTo","mi","sh","$269edab20268b88d$var$intAt","lShiftTo","bs","cbs","bm","ds","rShiftTo","q","pm","pt","ts","ms","nsh","ys","y0","yt","d1","d2","ONE","qd","addTo","negate","km","p","bitLength","subtract","multiply","divide","z","k1","g2","is1","r2","$945c853bac04b61f$export$f7340100dd3acd38","outerErr","outerResult","innerErr","innerResult","$16d75dffdce97d80$export$e2f40082638513e7","$5452175c610a592a$export$8b112e065a8843a","hexStr","$bb91d8c38bb50a76$export$b772e43c3daf2e7a","encoded","HEX_TO_SHORT","$7244f7f7c06e57df$export$baab4dd8c7240846","$7244f7f7c06e57df$export$a0f75f7d2f3bd702","$7244f7f7c06e57df$export$fcb552daf117d7e3","$d21e32da99de5341$export$629ee8d7d3ebacd1","$4xNDb","sha256","hashedData","hashHexFromUint8","$dd5b862882054689$export$22a20ab34c1d7a2b","SHORT_TO_HEX","$3d8d70f7a33f07e0$export$35d4ea07514a0402","$3d8d70f7a33f07e0$var$HEX_MSB_REGEX","bigInt","isNegative","invertedNibbles","invertedNibble","flippedBitsBI","substring","$28002858051d1a75$export$295a0a5429217d03","ikm","awsCryptoHash","resultFromAWSCryptoPrk","awsCryptoHashHmac","hashHexFromAWSCrypto","$ea26a5d759f277cb$export$763d6fc7c4b5dc52","$4bS7L","WordArray","$cb70c0153e6ac4fa$export$4cd4919e303276a6","$h5M04","words","sigBytes","Words","cryptoSecureRandomInt","$cb70c0153e6ac4fa$var$hexStringify","wordArray","hexChars","bite","$5b803445a1f5d830$export$d265930babe23ca5","getCrypto","getRandomValues","$92410000a09bb1b4$export$8c487394e1c35fbe","$8c72c04ce2eadc2a$export$53a55138f9e96c65","$cef49f7d7f833655$export$169bd15774e46c56","preferredChallenge","PREFERRED_CHALLENGE","$fcc86b81e031e695$export$7f7b64167822fe34","$3mpPC","$k62lC","SRP_B","SALT","hkdf","dateNow","getNowString","challengeResponses","PASSWORD_CLAIM_SECRET_BLOCK","SECRET_BLOCK","TIMESTAMP","PASSWORD_CLAIM_SIGNATURE","getSignatureString","$8c823c7638666426$export$218a6e05f05aec48","$8c823c7638666426$var$MONTH_NAMES","$8c823c7638666426$var$WEEK_NAMES","weekDay","getUTCDay","month","getUTCMonth","day","getUTCDate","hours","getUTCHours","minutes","getUTCMinutes","seconds","getUTCSeconds","year","getUTCFullYear","$e417beecdfa0e838$export$577b7d8a4f1b23fd","bufUPIDaToB","bufUNaToB","bufSBaToB","$e417beecdfa0e838$var$urlB64ToUint8Array","bufDNaToB","bufConcat","resultFromAWSCrypto","base64String","padding","repeat","rawData","outputArray","$ec7a9c80addbf1f8$export$18ec6b77c0b7fafe","clientId","assertDeviceMetadata","respondedChallengeParameters","$ec7a9c80addbf1f8$var$handleDevicePasswordVerifier","$428e905853406c74$export$30f932fe98713ccc","func","$4b4488e0c553cfd2$export$fecfbc200868d412","$a957b41983199458$export$4eb37109154e77c1","selectedChallenge","ANSWER","$fe9378541d191193$export$cca550d6560f23b8","userContextData","$bec1e93568b5a0d4$export$e496ff225fdec499","$451baf7edf1404bd$export$7f948971bcf643ff","loginId","retriedChallengeName","retiredChallengeParameters","handleCustomAuthFlowWithoutSRP","getActiveSignInUsername","resetActiveSignInState","getSignInResult","getSignInResultFromError","$cd166219c01c9bb4$export$2c0317ed1bbb0787","handledChallengeName","handledChallengeParameters","handleCustomSRPAuthFlow","$516e29f1528090e0$export$728178cf826a5ab9","clientMetaData","handleUserSRPAuthFlow","$0f083c64fe957751$export$7dcbf67a23c27835","$0f083c64fe957751$export$1ffa2742ce5c589b","resetCallback","$aea1b9aba7ad98d4$var$defaultState","$aea1b9aba7ad98d4$export$ef87a9980a3566ca","$eed1c95609c0ace9$export$200af5a623414b2b","retiredChallengeName","retriedChallengeParameters","handleUserPasswordAuthFlow","$2d79d2359823a418$export$fcfa00cf0f5ec937","$iz7yG","handleUserAuthFlowInput","autoSignInStoreState","handleUserAuthFlow","AvailableChallenges","$5e9a62a2e3e8e51a$export$f21455679019a68e","jsonReq","$d7ebde2d5c788863$export$99fa98564ba4db04","$d7ebde2d5c788863$export$f9d992c2ce90154a","InvalidParameterException","$3b67ce6a1604acf5$export$2ce39ab6662e8c24","$kDFKP","confirmSignUpClient","createConfirmSignUpClient","ConfirmSignUp","ConfirmationCode","ForceAliasCreation","forceAliasCreation","signUpOut","stopListener","$90cfaee3eca5312c$export$f182f73f82c5c23a","$d2f19f127c92a1d4$export$b295e842f1d42d13","$foJAH","createResendConfirmationCodeClient","ResendSignUpCode","$5d9a1b3270d661d0$export$cf53d1782ddbc93c","$2a61feae3eb8b76b$export$3d0a7d1372e866bb","$55jvH","$bQcc4","$auw7m","$4X7aw","$32ee8","$1h78R","$TW1z3","$4gG3S","$2zc4m","$dV7E9","assertOAuthConfig","cognitoHostedUIIdentityProviderMap","$2a61feae3eb8b76b$var$oauthSignIn","oauthConfig","loginHint","lang","nonce","randomState","generateState","urlSafeEncode","toCodeChallenge","generateCodeVerifier","redirectUri","getRedirectUrl","queryString","redirect_uri","client_id","identity_provider","login_hint","code_challenge","code_challenge_method","oAuthUrl","listenForOAuthFlowCancellation","openAuthSession","createOAuthError","completeOAuthFlow","currentUrl","SignInWithRedirect","handleFailure","$d8fdc91f49fb3a33$export$b855308a44508212","padStart","$1CB81","attemptCompleteOAuthFlow","$14b380e89e9c9cdd$export$602253b28f67ef40","$1c8e6ba4c10eb22c$export$342f5c7ddb2087ec","$kvo3D","$2KXuW","urlParams","searchParams","$1c8e6ba4c10eb22c$var$handleCodeFlow","$1c8e6ba4c10eb22c$var$handleImplicitFlow","validatedState","validateState","codeVerifier","grant_type","code_verifier","access_token","refresh_token","id_token","error_message","token_type","expires_in","USER_AGENT_HEADER","$1c8e6ba4c10eb22c$var$completeFlow","error_description","pairings","accum","resolveAndClearInflightPromises","$1c8e6ba4c10eb22c$var$clearHistory","$1c8e6ba4c10eb22c$var$isCustomState","urlSafeDecode","$1c8e6ba4c10eb22c$var$getCustomState","splice","history","replaceState","$29fa13b94cecde02$export$a7ea17e93539f9a5","hex","matchArr","match","$2b449213a3e5f199$export$84cc8f04e08ffc24","$ff1q1","OAuthSignInError","authErrorMessages","oauthSignInError","$8b8020e75b9c26f2$export$d8113b8d790509a4","OAUTH_ERROR","noConfig","DEFAULT_MSG","missingAuthConfig","emptyUsername","EMPTY_USERNAME","invalidUsername","INVALID_USERNAME","emptyPassword","EMPTY_PASSWORD","emptyCode","EMPTY_CODE","signUpError","SIGN_UP_ERROR","noMFA","NO_MFA","invalidMFA","INVALID_MFA","emptyChallengeResponse","EMPTY_CHALLENGE","noUserSession","NO_USER_SESSION","deviceConfig","DEVICE_CONFIG","networkError","NETWORK_ERROR","autoSignInError","AUTOSIGNIN_ERROR","$446eb4a4334c6c7b$export$6925991e7e736e7","$lUuyP","savedState","AuthErrorTypes","$ad899c5d321359e1$export$edb367c0a140d3db","$0dc0bdec7396afa7$export$93832c3affb240d3","redirects","preferredRedirectUrl","redirectUrl","redirect","invalidPreferredRedirectUrlException","redirectUrlFromTheSameOrigin","$0dc0bdec7396afa7$var$isSameOriginAndPathName","$0dc0bdec7396afa7$var$isTheSameDomain","redirectUrlFromDifferentOrigin","$0dc0bdec7396afa7$var$isHttps","$0dc0bdec7396afa7$var$isHttp","invalidOriginException","invalidRedirectException","hostname","$896412fdbf818f41$export$9adf33f0521751a3","$52bd9e18179053e3$export$6893de5f4e1216c3","Google","Facebook","Amazon","Apple","$fa2b9f18d5964de0$export$a673d54799039714","$8c9d81203c070bf5$export$cf1891f923f5943a","$8c9d81203c070bf5$var$CODE_VERIFIER_CHARSET","codeChallenge","randomBytes","$8c9d81203c070bf5$var$generateCodeChallenge","base64Encoded","$a52abdb62a8948e7$export$9ccd2716e53a229b","$iKJxr","generateRandomString","$34423d94dc1bf184$export$9e15fb06e64c4810","STATE_CHARSET","randomNums","$ab54fc76b8b12938$export$35c17f3730c1b943","store","handleCancelOAuthFlow","isBfcache","persisted","$4ce3e2cfb4e79cdf$export$b0ac3a1c242cb1ea","$2MTK0","$uI0hk","$1aiax","$h13nl","$4ce3e2cfb4e79cdf$var$logger","$4ce3e2cfb4e79cdf$var$globalSignOut","$4ce3e2cfb4e79cdf$var$clientSignOut","handleOAuthSignOut","OAUTH_SIGNOUT_EXCEPTION","$4ce3e2cfb4e79cdf$var$isSessionRevocable","revokeToken","createRevokeTokenClient","SignOut","Token","globalSignOutClient","createGlobalSignOutClient","origin_jti","$f55a993678066c0e$export$d1b63878dfcc70a6","$41ee35784e19ee93$export$74290142c99a2f64","$eWE9N","$3U8kx","completeOAuthSignOut","oAuthSignOutRedirect","$628fca0455275a7f$export$f8a4fedaab76b065","$6bba6d02e2943231$export$a20426d3d43ad21f","signoutUri","oAuthLogoutEndpoint","logout_uri","$cf10247bfd8abe18$export$93ed00c43cc3ad50","$3fce074ac5ce43b6$export$9ebd23b04fdf4c3a","$fab9e02a7dab98ac$export$dc726c8e334dd814","$2NBLh","createForgotPasswordClient","ResetPassword","isPasswordReset","resetPasswordStep","$f5e6df3ae946b543$export$f8a72614a2df8d41","$cc655f1c8d2537cd$export$890261705c8ce36b","$7Ww7D","confirmForgotPassword","createConfirmForgotPasswordClient","ConfirmResetPassword","$dc007ddd858e29b1$export$966c1bde6d375783","$a150190450f16c3a$export$e2853351e15b7895","$acyfS","createChangePasswordClient","UpdatePassword","PreviousPassword","ProposedPassword","$062e760129ec1e9c$export$240a6a56ebfd6264","$c1c529a335aaa923$export$16ff8cb4f547be0","$kU6O7","updateUserAttributesClient","createUpdateUserAttributesClient","CodeDeliveryDetailsList","UpdateUserAttributes","$c1c529a335aaa923$var$getConfirmedAttributes","confirmedAttributes","isUpdated","updateAttributeStep","$c1c529a335aaa923$var$getUnConfirmedAttributes","codeDeliveryDetailsList","unConfirmedAttributes","$9e3e6b28dfccad5c$export$c388d1c910c14d32","$98b7095079a1f535$export$7d0f10f273c0438a","$lVqBy","serviceDeleteUser","createDeleteUserClient","DeleteUser","$7a067637f3db309d$export$eb26e48faf9e639","$hOqDc","createEmptyResponseDeserializer","$2d8ac22d50148a4b$export$1579770e607c002a","$e217c4ca59519318$export$2e2bcd8739ae039","$fjftb","hasAcceptedCookies","getCookie","essential","cookiesAccepted","cookieOptions","protocol","cookieString","optionKey","matches","acceptCookies","banner","declineCookies","$b254a14f29d64933$export$2e2bcd8739ae039","$b254a14f29d64933$export$cccf74d9f2dbedc5","$b254a14f29d64933$var$CookieManager","hasConsentBeenSet","createBanner","createElement","className","innerHTML","appendChild","addStyles","addEventListeners","style","head","acceptBtn","declineBtn","hideBanner","display","parentNode","removeChild","jitteredBackoffUtil","getCurrentUserInternal","fetchAuthSessionInternal","fetchUserAttributesInternal"],"version":3,"file":"auth.856e296b.js.map"}