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A,EAEtB","sources":["webpack://_N_E/./node_modules/js-cookie/dist/js.cookie.mjs","webpack://_N_E/./node_modules/@aws-amplify/core/dist/esm/storage/CookieStorage.mjs","webpack://_N_E/./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/types.mjs","webpack://_N_E/./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdStore.mjs","webpack://_N_E/./node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/base.mjs","webpack://_N_E/./node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs","webpack://_N_E/./node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getId.mjs","webpack://_N_E/./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/utils.mjs","webpack://_N_E/./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdProvider.mjs","webpack://_N_E/./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/credentialsProvider.mjs","webpack://_N_E/./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/index.mjs","webpack://_N_E/./node_modules/aws-amplify/dist/esm/initSingleton.mjs"],"sourcesContent":["/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction 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 */\nvar 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\nfunction 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\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\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\nconst IdentityIdStorageKeys = {\n identityId: 'identityId',\n};\n\nexport { IdentityIdStorageKeys };\n//# sourceMappingURL=types.mjs.map\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.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 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 }\n else {\n this._primaryIdentityId = identity.id;\n // Clear locally stored guest id\n this.keyValueStorage.removeItem(this._authKeys.identityId);\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","import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.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","import '../../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","import '../../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","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","import { ConsoleLogger, getId } from '@aws-amplify/core';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../utils/clients/CognitoIdentityProvider/utils.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('CognitoIdentityIdProvider');\n/**\n * Provides a Cognito identityId\n *\n * @param tokens - The AuthTokens received after SignIn\n * @returns string\n * @throws configuration exceptions: {@link 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 let identityId = await identityIdStore.loadIdentityId();\n // Tokens are available so return primary identityId\n if (tokens) {\n // If there is existing primary identityId in-memory return that\n if (identityId && identityId.type === 'primary') {\n return identityId.id;\n }\n else {\n const logins = tokens.idToken\n ? formLoginsMap(tokens.idToken.toString())\n : {};\n const generatedIdentityId = await generateIdentityId(logins, authConfig);\n if (identityId && identityId.id === generatedIdentityId) {\n logger.debug(`The guest identity ${identityId.id} has become the primary identity.`);\n }\n identityId = {\n id: generatedIdentityId,\n type: 'primary',\n };\n }\n }\n else {\n // If there is existing guest identityId cached return that\n if (identityId && identityId.type === 'guest') {\n return identityId.id;\n }\n else {\n identityId = {\n id: await generateIdentityId({}, authConfig),\n type: 'guest',\n };\n }\n }\n // Store in-memory or local storage depending on guest or primary identityId\n identityIdStore.storeIdentityId(identityId);\n return identityId.id;\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","import { ConsoleLogger, getCredentialsForIdentity } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../utils/clients/CognitoIdentityProvider/utils.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 const identityIdRes = clientResult.IdentityId;\n if (identityIdRes) {\n res.identityId = identityIdRes;\n this._identityIdStore.storeIdentityId({\n id: identityIdRes,\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 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 // Store the credentials in-memory along with the expiration\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: true,\n associatedIdToken: authTokens.idToken?.toString(),\n };\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const identityIdRes = clientResult.IdentityId;\n if (identityIdRes) {\n res.identityId = identityIdRes;\n this._identityIdStore.storeIdentityId({\n id: identityIdRes,\n type: 'primary',\n });\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","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: {@link 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","import { Amplify, CookieStorage, defaultStorage } from '@aws-amplify/core';\nimport { parseAWSExports } 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 let resolvedResourceConfig;\n if (Object.keys(resourceConfig).some(key => key.startsWith('aws_'))) {\n resolvedResourceConfig = parseAWSExports(resourceConfig);\n }\n else {\n resolvedResourceConfig = resourceConfig;\n }\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"],"names":["js_cookie_assign","target","i","arguments","length","source","key","api","init","converter","defaultAttributes","set","name","value","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","Object","create","get","cookies","jar","parts","slice","join","found","read","e","remove","withAttributes","withConverter","freeze","path","CookieStorage","constructor","data","domain","sameSite","secure","prototype","hasOwnProperty","call","includes","setItem","getData","getItem","item","removeItem","clear","promises","keys","map","Promise","all","IdentityIdStorageKeys","identityId","logger","ConsoleLogger","k","DefaultIdentityIdStore","setAuthConfig","authConfigParam","utils","YE","Cognito","authConfig","_authKeys","createKeysForAuthStorage","identityPoolId","keyValueStorage","loadIdentityId","_primaryIdentityId","id","type","storedIdentityId","err","log","storeIdentityId","identity","undefined","clearIdentityId","provider","identifier","TokenStore","_X","cognitoIdentityTransferHandler","composeTransferHandler","V","unauthenticated","y","next","request","headers","defaultConfig","service","endpointResolver","region","url","amplifyUrl","a","getDnsSuffix","b","retryDecider","defaultRetryDecider","j","json","f","computeDelay","jitteredBackoff","userAgentValue","Platform","Zm","cache","detectFramework","QW","getSharedHeaders","operation","buildHttpRpcRequest","body","method","getCredentialsForIdentityDeserializer","response","statusCode","IdentityId","Credentials","deserializeCredentials","$metadata","responseInfo","B","AccessKeyId","SecretKey","SessionToken","Expiration","getCredentialsForIdentity","composeServiceApi","z","input","endpoint","JSON","stringify","getIdDeserializer","getId","formLoginsMap","idToken","issuer","xp","payload","iss","res","AuthError","l","message","IdentityIdProvider_logger","cognitoIdentityIdProvider","tokens","identityIdStore","logins","toString","generatedIdentityId","generateIdentityId","debug","CognitoIdentityProvider_utils","N","idResult","IdentityPoolId","Logins","recoverySuggestion","credentialsProvider_logger","CognitoAWSCredentialsAndIdentityIdProvider","_nextCredentialsRefresh","_identityIdStore","clearCredentialsAndIdentityId","_credentialsAndIdentityId","clearCredentials","getCredentialsAndIdentityId","getCredentialsOptions","isAuthenticated","authenticated","allowGuestAccess","forceRefresh","tokenHasChanged","hasTokenChanged","types","Cg","credsForOIDCTokens","getGuestCredentials","isPastTTL","isAuthenticatedCreds","info","clientResult","getTime","credentials","accessKeyId","secretAccessKey","sessionToken","expiration","identityIdRes","authTokens","associatedIdToken","cognitoCredentialsProvider","storage","Fm","DefaultAmplify","configure","resourceConfig","libraryOptions","resolvedResourceConfig","some","startsWith","parseAWSExports","h","Auth","Amplify","d","tokenProvider","D","setKeyValueStorage","ssr","credentialsProvider","getConfig"],"sourceRoot":""}