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qsB,EAAIrsB,CACb,CACF,CAQyC09G,CAAeD,GACxD,IAAID,GAAeD,uCCnEnB,EAAQ,2CCAR,EAAQ,2CCFR,SAASzS,IACP,OAAOA,EAAWxxG,OAAOC,OAASD,OAAOC,OAAO4R,OAAS,SAAUxR,GACjE,IAAK,IAAIP,EAAI,EAAGA,EAAIQ,UAAUC,OAAQT,IAAK,CACzC,IAAII,EAAII,UAAUR,GAClB,IAAK,IAAI2H,KAAKvH,GAAG,CAAG,GAAEnB,eAAe2B,KAAKR,EAAGuH,KAAOpH,EAAEoH,GAAKvH,EAAEuH,GAC/D,CACA,OAAOpH,CACT,EAAGmxG,EAAS7wG,MAAM,KAAML,UAC1B,qECRA,SAASwrG,EAA4BhsG,EAAGI,GACtC,OAAOA,IAAMA,EAAIJ,EAAE6zB,MAAM,IAAK7zB,EAAEy1F,IAAMr1F,EAAGJ,CAC3C","sources":["webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/types/Auth.js","webpack://ask_infertility_app/./node_modules/universal-cookie/es6/utils.js","webpack://ask_infertility_app/./node_modules/universal-cookie/es6/Cookies.js","webpack://ask_infertility_app/./node_modules/universal-cookie/es6/index.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/UniversalStorage/index.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/common/AuthErrorStrings.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/OAuth/urlOpener.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/OAuth/OAuth.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Util/StringUtils.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/OAuth/oauthStorage.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/Errors.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/Auth.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/auth/lib-esm/urlListener.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Amplify.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/models/models_0.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/OAuthHelper/GoogleOAuth.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/OAuthHelper/FacebookOAuth.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/OAuthHelper/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/commands/GetCredentialsForIdentityCommand.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/property-provider/dist/es/ProviderError.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/resolveLogins.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/fromCognitoIdentity.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/commands/GetIdCommand.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/IndexedDbStorage.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/localStorage.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/InMemoryStorage.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/fromCognitoIdentityPool.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/endpoints.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/runtimeConfig.shared.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/runtimeConfig.browser.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/dist/es/CognitoIdentityClient.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Credentials.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Hub.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/JS.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Logger/ConsoleLogger.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Parser.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Platform/version.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Platform/index.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/StorageHelper/index.js","webpack://ask_infertility_app/./node_modules/@aws-amplify/core/lib-esm/Util/Retry.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/ie11-detection/build/Key.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/ie11-detection/build/MsWindow.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/ie11-detection/build/index.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-browser/build/constants.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-browser/build/index.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-js/build/RawSha256.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-js/build/constants.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-js/build/index.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/sha256-js/build/jsSha256.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/supports-web-crypto/build/index.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/util/build/convertToBuffer.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/util/build/index.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/util/build/isEmptyData.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/util/build/numToUint8.js","webpack://ask_infertility_app/./node_modules/@aws-crypto/util/build/uint32ArrayFrom.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/client-cognito-identity/node_modules/tslib/tslib.es6.mjs","webpack://ask_infertility_app/./node_modules/@aws-sdk/config-resolver/dist/es/EndpointsConfig.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/config-resolver/dist/es/RegionConfig.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/fetch-http-handler/dist/es/fetch-http-handler.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/fetch-http-handler/dist/es/request-timeout.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/fetch-http-handler/dist/es/stream-collector.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/invalid-dependency/dist/es/invalidProvider.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-content-length/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-host-header/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-logger/dist/es/loggerMiddleware.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/retryMiddleware.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/service-error-classification/dist/es/constants.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/service-error-classification/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/delayDecider.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/constants.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/retryDecider.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/defaultStrategy.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/defaultRetryQuota.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/dist/es/configurations.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/node_modules/uuid/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/node_modules/uuid/lib/bytesToUuid.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/node_modules/uuid/lib/rng-browser.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/node_modules/uuid/v1.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-retry/node_modules/uuid/v4.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-serde/dist/es/deserializerMiddleware.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-serde/dist/es/serializerMiddleware.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-serde/dist/es/serdePlugin.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-signing/dist/es/configurations.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-signing/dist/es/middleware.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-user-agent/dist/es/configurations.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-user-agent/dist/es/constants.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-user-agent/dist/es/user-agent-middleware.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/protocol-http/dist/es/httpResponse.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/protocol-http/dist/es/httpRequest.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/querystring-builder/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/constants.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/credentialDerivation.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/getCanonicalHeaders.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/getPayloadHash.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/is-array-buffer/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/cloneRequest.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/prepareRequest.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/utilDate.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/SignatureV4.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/moveHeadersToQuery.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/hasHeader.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/signature-v4/dist/es/getCanonicalQuery.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/middleware-stack/dist/es/MiddlewareStack.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/client.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/command.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/extended-encode-uri-component.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/get-array-if-single-item.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/get-value-from-text-node.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/lazy-json.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/date-utils.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/smithy-client/dist/es/constants.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/url-parser/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/querystring-parser/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-base64-browser/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-body-length-browser/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-hex-encoding/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-locate-window/dist-es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-uri-escape/dist/es/escape-uri.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-user-agent-browser/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-utf8-browser/dist/es/whatwgEncodingApi.js","webpack://ask_infertility_app/./node_modules/@aws-sdk/util-utf8-browser/dist/es/pureJs.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/AuthenticationDetails.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/utils/cryptoSecureRandomInt.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/utils/WordArray.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/BigInteger.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/AuthenticationHelper.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoJwtToken.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoAccessToken.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoIdToken.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoRefreshToken.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoUserSession.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/DateHelper.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoUserAttribute.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/StorageHelper.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoUser.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/UserAgent.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/Client.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CognitoUserPool.js","webpack://ask_infertility_app/./node_modules/amazon-cognito-identity-js/es/CookieStorage.js","webpack://ask_infertility_app/./node_modules/base64-js/index.js","webpack://ask_infertility_app/./node_modules/bowser/es5.js","webpack://ask_infertility_app/./node_modules/buffer/index.js","webpack://ask_infertility_app/./node_modules/buffer/node_modules/isarray/index.js","webpack://ask_infertility_app/./node_modules/call-bind/callBound.js","webpack://ask_infertility_app/./node_modules/call-bind/index.js","webpack://ask_infertility_app/./node_modules/classnames/index.js","webpack://ask_infertility_app/./node_modules/cookie/index.js","webpack://ask_infertility_app/./node_modules/crypto-js/core.js","webpack://ask_infertility_app/./node_modules/crypto-js/enc-base64.js","webpack://ask_infertility_app/./node_modules/crypto-js/hmac-sha256.js","webpack://ask_infertility_app/./node_modules/crypto-js/hmac.js","webpack://ask_infertility_app/./node_modules/crypto-js/lib-typedarrays.js","webpack://ask_infertility_app/./node_modules/crypto-js/sha256.js","webpack://ask_infertility_app/./node_modules/define-data-property/index.js","webpack://ask_infertility_app/./node_modules/es-define-property/index.js","webpack://ask_infertility_app/./node_modules/es-errors/eval.js","webpack://ask_infertility_app/./node_modules/es-errors/index.js","webpack://ask_infertility_app/./node_modules/es-errors/range.js","webpack://ask_infertility_app/./node_modules/es-errors/ref.js","webpack://ask_infertility_app/./node_modules/es-errors/syntax.js","webpack://ask_infertility_app/./node_modules/es-errors/type.js","webpack://ask_infertility_app/./node_modules/es-errors/uri.js","webpack://ask_infertility_app/./node_modules/function-bind/implementation.js","webpack://ask_infertility_app/./node_modules/function-bind/index.js","webpack://ask_infertility_app/./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js","webpack://ask_infertility_app/./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack://ask_infertility_app/./node_modules/get-intrinsic/index.js","webpack://ask_infertility_app/./node_modules/gopd/index.js","webpack://ask_infertility_app/./node_modules/has-property-descriptors/index.js","webpack://ask_infertility_app/./node_modules/has-proto/index.js","webpack://ask_infertility_app/./node_modules/has-symbols/index.js","webpack://ask_infertility_app/./node_modules/has-symbols/shams.js","webpack://ask_infertility_app/./node_modules/hasown/index.js","webpack://ask_infertility_app/./node_modules/ieee754/index.js","webpack://ask_infertility_app/./node_modules/js-cookie/src/js.cookie.js","webpack://ask_infertility_app/./node_modules/object-inspect/index.js","webpack://ask_infertility_app/./node_modules/react-bootstrap/esm/Button.js","webpack://ask_infertility_app/./node_modules/react-bootstrap/esm/SafeAnchor.js","webpack://ask_infertility_app/./node_modules/react-bootstrap/esm/ThemeProvider.js","webpack://ask_infertility_app/./node_modules/react-bootstrap/esm/createChainedFunction.js","webpack://ask_infertility_app/./node_modules/react-fast-compare/index.js","webpack://ask_infertility_app/./node_modules/react-icons/lib/esm/iconsManifest.js","webpack://ask_infertility_app/./node_modules/react-icons/lib/esm/iconContext.js","webpack://ask_infertility_app/./node_modules/react-icons/lib/esm/iconBase.js","webpack://ask_infertility_app/./node_modules/react-side-effect/lib/index.js","webpack://ask_infertility_app/./node_modules/set-function-length/index.js","webpack://ask_infertility_app/./node_modules/shallowequal/index.js","webpack://ask_infertility_app/./node_modules/side-channel/index.js","webpack://ask_infertility_app/./node_modules/styled-components/node_modules/tslib/tslib.es6.mjs","webpack://ask_infertility_app/./node_modules/stylis/src/Enum.js","webpack://ask_infertility_app/./node_modules/stylis/src/Utility.js","webpack://ask_infertility_app/./node_modules/stylis/src/Tokenizer.js","webpack://ask_infertility_app/./node_modules/stylis/src/Serializer.js","webpack://ask_infertility_app/./node_modules/stylis/src/Prefixer.js","webpack://ask_infertility_app/./node_modules/stylis/src/Middleware.js","webpack://ask_infertility_app/./node_modules/stylis/src/Parser.js","webpack://ask_infertility_app/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://ask_infertility_app/./node_modules/styled-components/dist/styled-components.browser.esm.js","webpack://ask_infertility_app/./node_modules/tslib/tslib.es6.js","webpack://ask_infertility_app/./node_modules/url/node_modules/punycode/punycode.js","webpack://ask_infertility_app/./node_modules/url/node_modules/qs/lib/formats.js","webpack://ask_infertility_app/./node_modules/url/node_modules/qs/lib/index.js","webpack://ask_infertility_app/./node_modules/url/node_modules/qs/lib/parse.js","webpack://ask_infertility_app/./node_modules/url/node_modules/qs/lib/stringify.js","webpack://ask_infertility_app/./node_modules/url/node_modules/qs/lib/utils.js","webpack://ask_infertility_app/./node_modules/url/url.js","webpack://ask_infertility_app/./node_modules/gatsby-image/index.js","webpack://ask_infertility_app/./aws-config.ts","webpack://ask_infertility_app/./src/components/buttons/Buttons.tsx","webpack://ask_infertility_app/./src/components/layout/theme.ts","webpack://ask_infertility_app/./src/components/logos/index.ts","webpack://ask_infertility_app/./src/components/logos/AppLogo.tsx","webpack://ask_infertility_app/./src/utils/urls.ts","webpack://ask_infertility_app/./node_modules/react-helmet/es/Helmet.js","webpack://ask_infertility_app/./src/components/seo.js","webpack://ask_infertility_app/./node_modules/@babel/runtime/helpers/extends.js","webpack://ask_infertility_app/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack://ask_infertility_app/./node_modules/core-js/internals/a-possible-prototype.js","webpack://ask_infertility_app/./node_modules/core-js/internals/array-buffer-basic-detection.js","webpack://ask_infertility_app/./node_modules/core-js/internals/array-buffer-view-core.js","webpack://ask_infertility_app/./node_modules/core-js/internals/correct-prototype-getter.js","webpack://ask_infertility_app/./node_modules/core-js/internals/define-built-in-accessor.js","webpack://ask_infertility_app/./node_modules/core-js/internals/error-stack-clear.js","webpack://ask_infertility_app/./node_modules/core-js/internals/error-stack-install.js","webpack://ask_infertility_app/./node_modules/core-js/internals/error-stack-installable.js","webpack://ask_infertility_app/./node_modules/core-js/internals/function-uncurry-this-accessor.js","webpack://ask_infertility_app/./node_modules/core-js/internals/get-iterator-method.js","webpack://ask_infertility_app/./node_modules/core-js/internals/get-iterator.js","webpack://ask_infertility_app/./node_modules/core-js/internals/get-substitution.js","webpack://ask_infertility_app/./node_modules/core-js/internals/install-error-cause.js","webpack://ask_infertility_app/./node_modules/core-js/internals/is-array-iterator-method.js","webpack://ask_infertility_app/./node_modules/core-js/internals/is-possible-prototype.js","webpack://ask_infertility_app/./node_modules/core-js/internals/is-regexp.js","webpack://ask_infertility_app/./node_modules/core-js/internals/iterate.js","webpack://ask_infertility_app/./node_modules/core-js/internals/iterator-close.js","webpack://ask_infertility_app/./node_modules/core-js/internals/iterators.js","webpack://ask_infertility_app/./node_modules/core-js/internals/normalize-string-argument.js","webpack://ask_infertility_app/./node_modules/core-js/internals/object-get-prototype-of.js","webpack://ask_infertility_app/./node_modules/core-js/internals/object-set-prototype-of.js","webpack://ask_infertility_app/./node_modules/core-js/internals/regexp-flags.js","webpack://ask_infertility_app/./node_modules/core-js/internals/regexp-get-flags.js","webpack://ask_infertility_app/./node_modules/core-js/internals/to-offset.js","webpack://ask_infertility_app/./node_modules/core-js/internals/to-positive-integer.js","webpack://ask_infertility_app/./node_modules/core-js/modules/es.aggregate-error.constructor.js","webpack://ask_infertility_app/./node_modules/core-js/modules/es.aggregate-error.js","webpack://ask_infertility_app/./node_modules/core-js/modules/es.regexp.flags.js","webpack://ask_infertility_app/./node_modules/core-js/modules/es.string.replace-all.js","webpack://ask_infertility_app/./node_modules/core-js/modules/es.typed-array.set.js","webpack://ask_infertility_app/./node_modules/core-js/modules/es.typed-array.sort.js","webpack://ask_infertility_app/./node_modules/core-js/modules/esnext.aggregate-error.js","webpack://ask_infertility_app/./node_modules/core-js/modules/esnext.string.replace-all.js","webpack://ask_infertility_app/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://ask_infertility_app/./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js"],"sourcesContent":["/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nexport var CognitoHostedUIIdentityProvider;\n(function (CognitoHostedUIIdentityProvider) {\n CognitoHostedUIIdentityProvider[\"Cognito\"] = \"COGNITO\";\n CognitoHostedUIIdentityProvider[\"Google\"] = \"Google\";\n CognitoHostedUIIdentityProvider[\"Facebook\"] = \"Facebook\";\n CognitoHostedUIIdentityProvider[\"Amazon\"] = \"LoginWithAmazon\";\n CognitoHostedUIIdentityProvider[\"Apple\"] = \"SignInWithApple\";\n})(CognitoHostedUIIdentityProvider || (CognitoHostedUIIdentityProvider = {}));\nexport function isFederatedSignInOptions(obj) {\n var keys = ['provider'];\n return obj && !!keys.find(function (k) {\n return obj.hasOwnProperty(k);\n });\n}\nexport function isFederatedSignInOptionsCustom(obj) {\n var keys = ['customProvider'];\n return obj && !!keys.find(function (k) {\n return obj.hasOwnProperty(k);\n });\n}\nexport function hasCustomState(obj) {\n var keys = ['customState'];\n return obj && !!keys.find(function (k) {\n return obj.hasOwnProperty(k);\n });\n}\nexport function isCognitoHostedOpts(oauth) {\n return oauth.redirectSignIn !== undefined;\n}\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 || (AuthErrorTypes = {}));\nexport function isUsernamePasswordOpts(obj) {\n return !!obj.username;\n}","import * as cookie from 'cookie';\nexport function hasDocumentCookie() {\n // Can we get/set cookies on document.cookie?\n return typeof document === 'object' && typeof document.cookie === 'string';\n}\nexport function cleanCookies() {\n document.cookie.split(';').forEach(function (c) {\n document.cookie = c.replace(/^ +/, '').replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');\n });\n}\nexport function parseCookies(cookies, options) {\n if (typeof cookies === 'string') {\n return cookie.parse(cookies, options);\n } else if (typeof cookies === 'object' && cookies !== null) {\n return cookies;\n } else {\n return {};\n }\n}\nexport function isParsingCookie(value, doNotParse) {\n if (typeof doNotParse === 'undefined') {\n // We guess if the cookie start with { or [, it has been serialized\n doNotParse = !value || value[0] !== '{' && value[0] !== '[' && value[0] !== '\"';\n }\n return !doNotParse;\n}\nexport function readCookie(value, options) {\n if (options === void 0) {\n options = {};\n }\n var cleanValue = cleanupCookieValue(value);\n if (isParsingCookie(cleanValue, options.doNotParse)) {\n try {\n return JSON.parse(cleanValue);\n } catch (e) {\n // At least we tried\n }\n }\n // Ignore clean value if we failed the deserialization\n // It is not relevant anymore to trim those values\n return value;\n}\nfunction cleanupCookieValue(value) {\n // express prepend j: before serializing a cookie\n if (value && value[0] === 'j' && value[1] === ':') {\n return value.substr(2);\n }\n return value;\n}","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (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 __assign.apply(this, arguments);\n};\nimport * as cookie from 'cookie';\nimport { hasDocumentCookie, parseCookies, readCookie } from './utils';\nvar Cookies = /** @class */function () {\n function Cookies(cookies, options) {\n var _this = this;\n this.changeListeners = [];\n this.HAS_DOCUMENT_COOKIE = false;\n this.cookies = parseCookies(cookies, options);\n new Promise(function () {\n _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();\n }).catch(function () {});\n }\n Cookies.prototype._updateBrowserValues = function (parseOptions) {\n if (!this.HAS_DOCUMENT_COOKIE) {\n return;\n }\n this.cookies = cookie.parse(document.cookie, parseOptions);\n };\n Cookies.prototype._emitChange = function (params) {\n for (var i = 0; i < this.changeListeners.length; ++i) {\n this.changeListeners[i](params);\n }\n };\n Cookies.prototype.get = function (name, options, parseOptions) {\n if (options === void 0) {\n options = {};\n }\n this._updateBrowserValues(parseOptions);\n return readCookie(this.cookies[name], options);\n };\n Cookies.prototype.getAll = function (options, parseOptions) {\n if (options === void 0) {\n options = {};\n }\n this._updateBrowserValues(parseOptions);\n var result = {};\n for (var name_1 in this.cookies) {\n result[name_1] = readCookie(this.cookies[name_1], options);\n }\n return result;\n };\n Cookies.prototype.set = function (name, value, options) {\n var _a;\n if (typeof value === 'object') {\n value = JSON.stringify(value);\n }\n this.cookies = __assign(__assign({}, this.cookies), (_a = {}, _a[name] = value, _a));\n if (this.HAS_DOCUMENT_COOKIE) {\n document.cookie = cookie.serialize(name, value, options);\n }\n this._emitChange({\n name: name,\n value: value,\n options: options\n });\n };\n Cookies.prototype.remove = function (name, options) {\n var finalOptions = options = __assign(__assign({}, options), {\n expires: new Date(1970, 1, 1, 0, 0, 1),\n maxAge: 0\n });\n this.cookies = __assign({}, this.cookies);\n delete this.cookies[name];\n if (this.HAS_DOCUMENT_COOKIE) {\n document.cookie = cookie.serialize(name, '', finalOptions);\n }\n this._emitChange({\n name: name,\n value: undefined,\n options: options\n });\n };\n Cookies.prototype.addChangeListener = function (callback) {\n this.changeListeners.push(callback);\n };\n Cookies.prototype.removeChangeListener = function (callback) {\n var idx = this.changeListeners.indexOf(callback);\n if (idx >= 0) {\n this.changeListeners.splice(idx, 1);\n }\n };\n return Cookies;\n}();\nexport default Cookies;","import Cookies from './Cookies';\nexport default Cookies;","import Cookies from 'universal-cookie';\nimport { browserOrNode } from '../JS';\nvar isBrowser = browserOrNode().isBrowser;\nvar UniversalStorage = /** @class */function () {\n function UniversalStorage(context) {\n if (context === void 0) {\n context = {};\n }\n this.cookies = new Cookies();\n this.store = isBrowser ? window.localStorage : Object.create(null);\n this.cookies = context.req ? new Cookies(context.req.headers.cookie) : new Cookies();\n Object.assign(this.store, this.cookies.getAll());\n }\n Object.defineProperty(UniversalStorage.prototype, \"length\", {\n get: function get() {\n return Object.entries(this.store).length;\n },\n enumerable: true,\n configurable: true\n });\n UniversalStorage.prototype.clear = function () {\n var _this = this;\n Array.from(new Array(this.length)).map(function (_, i) {\n return _this.key(i);\n }).forEach(function (key) {\n return _this.removeItem(key);\n });\n };\n UniversalStorage.prototype.getItem = function (key) {\n return this.getLocalItem(key);\n };\n UniversalStorage.prototype.getLocalItem = function (key) {\n return Object.prototype.hasOwnProperty.call(this.store, key) ? this.store[key] : null;\n };\n UniversalStorage.prototype.getUniversalItem = function (key) {\n return this.cookies.get(key);\n };\n UniversalStorage.prototype.key = function (index) {\n return Object.keys(this.store)[index];\n };\n UniversalStorage.prototype.removeItem = function (key) {\n this.removeLocalItem(key);\n this.removeUniversalItem(key);\n };\n UniversalStorage.prototype.removeLocalItem = function (key) {\n delete this.store[key];\n };\n UniversalStorage.prototype.removeUniversalItem = function (key) {\n this.cookies.remove(key, {\n path: '/'\n });\n };\n UniversalStorage.prototype.setItem = function (key, value) {\n this.setLocalItem(key, value);\n // keys take the shape:\n // 1. `${ProviderPrefix}.${userPoolClientId}.${username}.${tokenType}\n // 2. `${ProviderPrefix}.${userPoolClientId}.LastAuthUser\n var tokenType = key.split('.').pop();\n switch (tokenType) {\n // LastAuthUser is needed for computing other key names\n case 'LastAuthUser':\n // accessToken is required for CognitoUserSession\n case 'accessToken':\n // Required for CognitoUserSession\n case 'idToken':\n this.setUniversalItem(key, value);\n // userData is used when `Auth.currentAuthenticatedUser({ bypassCache: false })`.\n // Can be persisted to speed up calls to `Auth.currentAuthenticatedUser()`\n // case 'userData':\n // refreshToken isn't shared with the server so that the client handles refreshing\n // case 'refreshToken':\n // Ignoring clockDrift on the server for now, but needs testing\n // case 'clockDrift':\n }\n };\n UniversalStorage.prototype.setLocalItem = function (key, value) {\n this.store[key] = value;\n };\n UniversalStorage.prototype.setUniversalItem = function (key, value) {\n this.cookies.set(key, value, {\n path: '/',\n // `httpOnly` cannot be set via JavaScript: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#JavaScript_access_using_Document.cookie\n sameSite: true,\n // Allow unsecure requests to http://localhost:3000/ when in development.\n secure: window.location.hostname === 'localhost' ? false : true\n });\n };\n return UniversalStorage;\n}();\nexport { UniversalStorage };","export var AuthErrorStrings;\n(function (AuthErrorStrings) {\n AuthErrorStrings[\"DEFAULT_MSG\"] = \"Authentication Error\";\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 || (AuthErrorStrings = {}));","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar SELF = '_self';\nexport var launchUri = function launchUri(url) {\n var windowProxy = window.open(url, SELF);\n if (windowProxy) {\n return Promise.resolve(windowProxy);\n } else {\n return Promise.reject();\n }\n};","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\n/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (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 __assign.apply(this, arguments);\n};\nvar __awaiter = this && this.__awaiter || function (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};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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 __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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};\nimport { parse } from 'url'; // Used for OAuth parsing of Cognito Hosted UI\nimport { launchUri } from './urlOpener';\nimport * as oAuthStorage from './oauthStorage';\nimport { isCognitoHostedOpts, CognitoHostedUIIdentityProvider } from '../types/Auth';\nimport { ConsoleLogger as Logger, Hub, urlSafeEncode } from '@aws-amplify/core';\nimport sha256 from 'crypto-js/sha256';\nimport Base64 from 'crypto-js/enc-base64';\nvar AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol.for === 'function' ? Symbol.for('amplify_default') : '@@amplify_default';\nvar dispatchAuthEvent = function dispatchAuthEvent(event, data, message) {\n Hub.dispatch('auth', {\n event: event,\n data: data,\n message: message\n }, 'Auth', AMPLIFY_SYMBOL);\n};\nvar logger = new Logger('OAuth');\nvar OAuth = /** @class */function () {\n function OAuth(_a) {\n var config = _a.config,\n cognitoClientId = _a.cognitoClientId,\n _b = _a.scopes,\n scopes = _b === void 0 ? [] : _b;\n this._urlOpener = config.urlOpener || launchUri;\n this._config = config;\n this._cognitoClientId = cognitoClientId;\n if (!this.isValidScopes(scopes)) throw Error('scopes must be a String Array');\n this._scopes = scopes;\n }\n OAuth.prototype.isValidScopes = function (scopes) {\n return Array.isArray(scopes) && scopes.every(function (scope) {\n return typeof scope === 'string';\n });\n };\n OAuth.prototype.oauthSignIn = function (responseType, domain, redirectSignIn, clientId, provider, customState) {\n if (responseType === void 0) {\n responseType = 'code';\n }\n if (provider === void 0) {\n provider = CognitoHostedUIIdentityProvider.Cognito;\n }\n var generatedState = this._generateState(32);\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 var state = customState ? generatedState + \"-\" + urlSafeEncode(customState) : generatedState;\n oAuthStorage.setState(state);\n var pkce_key = this._generateRandom(128);\n oAuthStorage.setPKCE(pkce_key);\n var code_challenge = this._generateChallenge(pkce_key);\n var code_challenge_method = 'S256';\n var scopesString = this._scopes.join(' ');\n var queryString = Object.entries(__assign(__assign({\n redirect_uri: redirectSignIn,\n response_type: responseType,\n client_id: clientId,\n identity_provider: provider,\n scope: scopesString,\n state: state\n }, responseType === 'code' ? {\n code_challenge: code_challenge\n } : {}), responseType === 'code' ? {\n code_challenge_method: code_challenge_method\n } : {})).map(function (_a) {\n var _b = __read(_a, 2),\n k = _b[0],\n v = _b[1];\n return encodeURIComponent(k) + \"=\" + encodeURIComponent(v);\n }).join('&');\n var URL = \"https://\" + domain + \"/oauth2/authorize?\" + queryString;\n logger.debug(\"Redirecting to \" + URL);\n this._urlOpener(URL, redirectSignIn);\n };\n OAuth.prototype._handleCodeFlow = function (currentUrl) {\n return __awaiter(this, void 0, void 0, function () {\n var code, currentUrlPathname, redirectSignInPathname, oAuthTokenEndpoint, client_id, redirect_uri, code_verifier, oAuthTokenBody, body, _a, access_token, refresh_token, id_token, error;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n code = (parse(currentUrl).query || '').split('&').map(function (pairings) {\n return pairings.split('=');\n }).reduce(function (accum, _a) {\n var _b;\n var _c = __read(_a, 2),\n k = _c[0],\n v = _c[1];\n return __assign(__assign({}, accum), (_b = {}, _b[k] = v, _b));\n }, {\n code: undefined\n }).code;\n currentUrlPathname = parse(currentUrl).pathname || '/';\n redirectSignInPathname = parse(this._config.redirectSignIn).pathname || '/';\n if (!code || currentUrlPathname !== redirectSignInPathname) {\n return [2 /*return*/];\n }\n oAuthTokenEndpoint = 'https://' + this._config.domain + '/oauth2/token';\n dispatchAuthEvent('codeFlow', {}, \"Retrieving tokens from \" + oAuthTokenEndpoint);\n client_id = isCognitoHostedOpts(this._config) ? this._cognitoClientId : this._config.clientID;\n redirect_uri = isCognitoHostedOpts(this._config) ? this._config.redirectSignIn : this._config.redirectUri;\n code_verifier = oAuthStorage.getPKCE();\n oAuthTokenBody = __assign({\n grant_type: 'authorization_code',\n code: code,\n client_id: client_id,\n redirect_uri: redirect_uri\n }, code_verifier ? {\n code_verifier: code_verifier\n } : {});\n logger.debug(\"Calling token endpoint: \" + oAuthTokenEndpoint + \" with\", oAuthTokenBody);\n body = Object.entries(oAuthTokenBody).map(function (_a) {\n var _b = __read(_a, 2),\n k = _b[0],\n v = _b[1];\n return encodeURIComponent(k) + \"=\" + encodeURIComponent(v);\n }).join('&');\n return [4 /*yield*/, fetch(oAuthTokenEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n body: body\n })];\n case 1:\n return [4 /*yield*/, _b.sent().json()];\n case 2:\n _a = _b.sent(), access_token = _a.access_token, refresh_token = _a.refresh_token, id_token = _a.id_token, error = _a.error;\n if (error) {\n throw new Error(error);\n }\n return [2 /*return*/, {\n accessToken: access_token,\n refreshToken: refresh_token,\n idToken: id_token\n }];\n }\n });\n });\n };\n OAuth.prototype._handleImplicitFlow = function (currentUrl) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, id_token, access_token;\n return __generator(this, function (_b) {\n _a = (parse(currentUrl).hash || '#').substr(1) // Remove # from returned code\n .split('&').map(function (pairings) {\n return pairings.split('=');\n }).reduce(function (accum, _a) {\n var _b;\n var _c = __read(_a, 2),\n k = _c[0],\n v = _c[1];\n return __assign(__assign({}, accum), (_b = {}, _b[k] = v, _b));\n }, {\n id_token: undefined,\n access_token: undefined\n }), id_token = _a.id_token, access_token = _a.access_token;\n dispatchAuthEvent('implicitFlow', {}, \"Got tokens from \" + currentUrl);\n logger.debug(\"Retrieving implicit tokens from \" + currentUrl + \" with\");\n return [2 /*return*/, {\n accessToken: access_token,\n idToken: id_token,\n refreshToken: null\n }];\n });\n });\n };\n OAuth.prototype.handleAuthResponse = function (currentUrl) {\n return __awaiter(this, void 0, void 0, function () {\n var urlParams, error, error_description, state, _a, _b, e_1;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _c.trys.push([0, 5,, 6]);\n urlParams = currentUrl ? __assign(__assign({}, (parse(currentUrl).hash || '#').substr(1).split('&').map(function (entry) {\n return entry.split('=');\n }).reduce(function (acc, _a) {\n var _b = __read(_a, 2),\n k = _b[0],\n v = _b[1];\n return acc[k] = v, acc;\n }, {})), (parse(currentUrl).query || '').split('&').map(function (entry) {\n return entry.split('=');\n }).reduce(function (acc, _a) {\n var _b = __read(_a, 2),\n k = _b[0],\n v = _b[1];\n return acc[k] = v, acc;\n }, {})) : {};\n error = urlParams.error, error_description = urlParams.error_description;\n if (error) {\n throw new Error(error_description);\n }\n state = this._validateState(urlParams);\n logger.debug(\"Starting \" + this._config.responseType + \" flow with \" + currentUrl);\n if (!(this._config.responseType === 'code')) return [3 /*break*/, 2];\n _a = [{}];\n return [4 /*yield*/, this._handleCodeFlow(currentUrl)];\n case 1:\n return [2 /*return*/, __assign.apply(void 0, [__assign.apply(void 0, _a.concat([_c.sent()])), {\n state: state\n }])];\n case 2:\n _b = [{}];\n return [4 /*yield*/, this._handleImplicitFlow(currentUrl)];\n case 3:\n return [2 /*return*/, __assign.apply(void 0, [__assign.apply(void 0, _b.concat([_c.sent()])), {\n state: state\n }])];\n case 4:\n return [3 /*break*/, 6];\n case 5:\n e_1 = _c.sent();\n logger.error(\"Error handling auth response.\", e_1);\n throw e_1;\n case 6:\n return [2 /*return*/];\n }\n });\n });\n };\n OAuth.prototype._validateState = function (urlParams) {\n if (!urlParams) {\n return;\n }\n var savedState = oAuthStorage.getState();\n var returnedState = urlParams.state;\n // This is because savedState only exists if the flow was initiated by Amplify\n if (savedState && savedState !== returnedState) {\n throw new Error('Invalid state in OAuth flow');\n }\n return returnedState;\n };\n OAuth.prototype.signOut = function () {\n return __awaiter(this, void 0, void 0, function () {\n var oAuthLogoutEndpoint, client_id, signout_uri;\n return __generator(this, function (_a) {\n oAuthLogoutEndpoint = 'https://' + this._config.domain + '/logout?';\n client_id = isCognitoHostedOpts(this._config) ? this._cognitoClientId : this._config.oauth.clientID;\n signout_uri = isCognitoHostedOpts(this._config) ? this._config.redirectSignOut : this._config.returnTo;\n oAuthLogoutEndpoint += Object.entries({\n client_id: client_id,\n logout_uri: encodeURIComponent(signout_uri)\n }).map(function (_a) {\n var _b = __read(_a, 2),\n k = _b[0],\n v = _b[1];\n return k + \"=\" + v;\n }).join('&');\n dispatchAuthEvent('oAuthSignOut', {\n oAuth: 'signOut'\n }, \"Signing out from \" + oAuthLogoutEndpoint);\n logger.debug(\"Signing out from \" + oAuthLogoutEndpoint);\n return [2 /*return*/, this._urlOpener(oAuthLogoutEndpoint)];\n });\n });\n };\n OAuth.prototype._generateState = function (length) {\n var result = '';\n var i = length;\n var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (; i > 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))];\n return result;\n };\n OAuth.prototype._generateChallenge = function (code) {\n return this._base64URL(sha256(code));\n };\n OAuth.prototype._base64URL = function (string) {\n return string.toString(Base64).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n };\n OAuth.prototype._generateRandom = function (size) {\n var CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';\n var buffer = new Uint8Array(size);\n if (typeof window !== 'undefined' && !!window.crypto) {\n window.crypto.getRandomValues(buffer);\n } else {\n for (var i = 0; i < size; i += 1) {\n buffer[i] = Math.random() * CHARSET.length | 0;\n }\n }\n return this._bufferToString(buffer);\n };\n OAuth.prototype._bufferToString = function (buffer) {\n var CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var state = [];\n for (var i = 0; i < buffer.byteLength; i += 1) {\n var index = buffer[i] % CHARSET.length;\n state.push(CHARSET[index]);\n }\n return state.join('');\n };\n return OAuth;\n}();\nexport default OAuth;","export function urlSafeEncode(str) {\n return str.split('').map(function (char) {\n return char.charCodeAt(0).toString(16).padStart(2, '0');\n }).join('');\n}\nexport function urlSafeDecode(hex) {\n return hex.match(/.{2}/g).map(function (char) {\n return String.fromCharCode(parseInt(char, 16));\n }).join('');\n}","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nexport var setState = function setState(state) {\n window.sessionStorage.setItem('oauth_state', state);\n};\nexport var getState = function getState() {\n var oauth_state = window.sessionStorage.getItem('oauth_state');\n window.sessionStorage.removeItem('oauth_state');\n return oauth_state;\n};\nexport var setPKCE = function setPKCE(private_key) {\n window.sessionStorage.setItem('ouath_pkce_key', private_key);\n};\nexport var getPKCE = function getPKCE() {\n var ouath_pkce_key = window.sessionStorage.getItem('ouath_pkce_key');\n window.sessionStorage.removeItem('ouath_pkce_key');\n return ouath_pkce_key;\n};\nexport var clearAll = function clearAll() {\n window.sessionStorage.removeItem('ouath_pkce_key');\n window.sessionStorage.removeItem('oauth_state');\n};","/*\n * Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _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 (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nimport { AuthErrorStrings } from './common/AuthErrorStrings';\nvar logger = new Logger('AuthError');\nvar AuthError = /** @class */function (_super) {\n __extends(AuthError, _super);\n function AuthError(type) {\n var _this = this;\n var _a = authErrorMessages[type],\n message = _a.message,\n log = _a.log;\n _this = _super.call(this, message) || this;\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 return _this;\n }\n return AuthError;\n}(Error);\nexport { AuthError };\nvar NoUserPoolError = /** @class */function (_super) {\n __extends(NoUserPoolError, _super);\n function NoUserPoolError(type) {\n var _this = _super.call(this, type) || this;\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 return _this;\n }\n return NoUserPoolError;\n}(AuthError);\nexport { NoUserPoolError };\nexport var authErrorMessages = {\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 default: {\n message: AuthErrorStrings.DEFAULT_MSG\n }\n};","/*\n * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n *\t http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (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 __assign.apply(this, arguments);\n};\nvar __awaiter = this && this.__awaiter || function (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};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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 __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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};\nimport { isUsernamePasswordOpts, isCognitoHostedOpts, isFederatedSignInOptions, isFederatedSignInOptionsCustom, hasCustomState } from './types';\nimport { Amplify, ConsoleLogger as Logger, Credentials, Hub, StorageHelper, Parser, JS, UniversalStorage, urlSafeDecode } from '@aws-amplify/core';\nimport { CookieStorage, CognitoUserPool, AuthenticationDetails, CognitoUser, CognitoUserSession, CognitoUserAttribute, CognitoIdToken, CognitoRefreshToken, CognitoAccessToken } from 'amazon-cognito-identity-js';\nimport { parse } from 'url';\nimport OAuth from './OAuth/OAuth';\nimport { default as urlListener } from './urlListener';\nimport { AuthError, NoUserPoolError } from './Errors';\nimport { AuthErrorTypes, CognitoHostedUIIdentityProvider } from './types/Auth';\nvar logger = new Logger('AuthClass');\nvar USER_ADMIN_SCOPE = 'aws.cognito.signin.user.admin';\n// 10 sec, following this guide https://www.nngroup.com/articles/response-times-3-important-limits/\nvar OAUTH_FLOW_MS_TIMEOUT = 10 * 1000;\nvar AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol.for === 'function' ? Symbol.for('amplify_default') : '@@amplify_default';\nvar dispatchAuthEvent = function dispatchAuthEvent(event, data, message) {\n Hub.dispatch('auth', {\n event: event,\n data: data,\n message: message\n }, 'Auth', AMPLIFY_SYMBOL);\n};\n/**\n * Provide authentication steps\n */\nvar AuthClass = /** @class */function () {\n /**\n * Initialize Auth with AWS configurations\n * @param {Object} config - Configuration of the Auth\n */\n function AuthClass(config) {\n var _this = this;\n this.userPool = null;\n this.user = null;\n this.oAuthFlowInProgress = false;\n this.Credentials = Credentials;\n this.wrapRefreshSessionCallback = function (callback) {\n var wrapped = function wrapped(error, data) {\n if (data) {\n dispatchAuthEvent('tokenRefresh', undefined, \"New token retrieved\");\n } else {\n dispatchAuthEvent('tokenRefresh_failure', error, \"Failed to retrieve new token\");\n }\n return callback(error, data);\n };\n return wrapped;\n }; // prettier-ignore\n this.configure(config);\n this.currentCredentials = this.currentCredentials.bind(this);\n this.currentUserCredentials = this.currentUserCredentials.bind(this);\n Hub.listen('auth', function (_a) {\n var payload = _a.payload;\n var event = payload.event;\n switch (event) {\n case 'signIn':\n _this._storage.setItem('amplify-signin-with-hostedUI', 'false');\n break;\n case 'signOut':\n _this._storage.removeItem('amplify-signin-with-hostedUI');\n break;\n case 'cognitoHostedUI':\n _this._storage.setItem('amplify-signin-with-hostedUI', 'true');\n break;\n }\n });\n }\n AuthClass.prototype.getModuleName = function () {\n return 'Auth';\n };\n AuthClass.prototype.configure = function (config) {\n var _this = this;\n if (!config) return this._config || {};\n logger.debug('configure Auth');\n var conf = Object.assign({}, this._config, Parser.parseMobilehubConfig(config).Auth, config);\n this._config = conf;\n var _a = this._config,\n userPoolId = _a.userPoolId,\n userPoolWebClientId = _a.userPoolWebClientId,\n cookieStorage = _a.cookieStorage,\n oauth = _a.oauth,\n region = _a.region,\n identityPoolId = _a.identityPoolId,\n mandatorySignIn = _a.mandatorySignIn,\n refreshHandlers = _a.refreshHandlers,\n identityPoolRegion = _a.identityPoolRegion,\n clientMetadata = _a.clientMetadata,\n endpoint = _a.endpoint;\n if (!this._config.storage) {\n // backward compatability\n if (cookieStorage) this._storage = new CookieStorage(cookieStorage);else {\n this._storage = config.ssr ? new UniversalStorage() : new StorageHelper().getStorage();\n }\n } else {\n if (!this._isValidAuthStorage(this._config.storage)) {\n logger.error('The storage in the Auth config is not valid!');\n throw new Error('Empty storage object');\n }\n this._storage = this._config.storage;\n }\n this._storageSync = Promise.resolve();\n if (typeof this._storage['sync'] === 'function') {\n this._storageSync = this._storage['sync']();\n }\n if (userPoolId) {\n var userPoolData = {\n UserPoolId: userPoolId,\n ClientId: userPoolWebClientId,\n endpoint: endpoint\n };\n userPoolData.Storage = this._storage;\n this.userPool = new CognitoUserPool(userPoolData, this.wrapRefreshSessionCallback);\n }\n this.Credentials.configure({\n mandatorySignIn: mandatorySignIn,\n region: identityPoolRegion || region,\n userPoolId: userPoolId,\n identityPoolId: identityPoolId,\n refreshHandlers: refreshHandlers,\n storage: this._storage\n });\n // initialize cognitoauth client if hosted ui options provided\n // to keep backward compatibility:\n var cognitoHostedUIConfig = oauth ? isCognitoHostedOpts(this._config.oauth) ? oauth : oauth.awsCognito : undefined;\n if (cognitoHostedUIConfig) {\n var cognitoAuthParams = Object.assign({\n cognitoClientId: userPoolWebClientId,\n UserPoolId: userPoolId,\n domain: cognitoHostedUIConfig['domain'],\n scopes: cognitoHostedUIConfig['scope'],\n redirectSignIn: cognitoHostedUIConfig['redirectSignIn'],\n redirectSignOut: cognitoHostedUIConfig['redirectSignOut'],\n responseType: cognitoHostedUIConfig['responseType'],\n Storage: this._storage,\n urlOpener: cognitoHostedUIConfig['urlOpener'],\n clientMetadata: clientMetadata\n }, cognitoHostedUIConfig['options']);\n this._oAuthHandler = new OAuth({\n scopes: cognitoAuthParams.scopes,\n config: cognitoAuthParams,\n cognitoClientId: cognitoAuthParams.cognitoClientId\n });\n // **NOTE** - Remove this in a future major release as it is a breaking change\n // Prevents _handleAuthResponse from being called multiple times in Expo\n // See https://github.com/aws-amplify/amplify-js/issues/4388\n var usedResponseUrls_1 = {};\n urlListener(function (_a) {\n var url = _a.url;\n if (usedResponseUrls_1[url]) {\n return;\n }\n usedResponseUrls_1[url] = true;\n _this._handleAuthResponse(url);\n });\n }\n dispatchAuthEvent('configured', null, \"The Auth category has been configured successfully\");\n return this._config;\n };\n /**\n * Sign up with username, password and other attributes like phone, email\n * @param {String | object} params - The user attributes used for signin\n * @param {String[]} restOfAttrs - for the backward compatability\n * @return - A promise resolves callback data if success\n */\n AuthClass.prototype.signUp = function (params) {\n var _this = this;\n var restOfAttrs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n restOfAttrs[_i - 1] = arguments[_i];\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n var username = null;\n var password = null;\n var attributes = [];\n var validationData = null;\n var clientMetadata;\n if (params && typeof params === 'string') {\n username = params;\n password = restOfAttrs ? restOfAttrs[0] : null;\n var email = restOfAttrs ? restOfAttrs[1] : null;\n var phone_number = restOfAttrs ? restOfAttrs[2] : null;\n if (email) attributes.push(new CognitoUserAttribute({\n Name: 'email',\n Value: email\n }));\n if (phone_number) attributes.push(new CognitoUserAttribute({\n Name: 'phone_number',\n Value: phone_number\n }));\n } else if (params && typeof params === 'object') {\n username = params['username'];\n password = params['password'];\n if (params && params.clientMetadata) {\n clientMetadata = params.clientMetadata;\n } else if (this._config.clientMetadata) {\n clientMetadata = this._config.clientMetadata;\n }\n var attrs_1 = params['attributes'];\n if (attrs_1) {\n Object.keys(attrs_1).map(function (key) {\n attributes.push(new CognitoUserAttribute({\n Name: key,\n Value: attrs_1[key]\n }));\n });\n }\n var validationDataObject_1 = params['validationData'];\n if (validationDataObject_1) {\n validationData = [];\n Object.keys(validationDataObject_1).map(function (key) {\n validationData.push(new CognitoUserAttribute({\n Name: key,\n Value: validationDataObject_1[key]\n }));\n });\n }\n } else {\n return this.rejectAuthError(AuthErrorTypes.SignUpError);\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n if (!password) {\n return this.rejectAuthError(AuthErrorTypes.EmptyPassword);\n }\n logger.debug('signUp attrs:', attributes);\n logger.debug('signUp validation data:', validationData);\n return new Promise(function (resolve, reject) {\n _this.userPool.signUp(username, password, attributes, validationData, function (err, data) {\n if (err) {\n dispatchAuthEvent('signUp_failure', err, username + \" failed to signup\");\n reject(err);\n } else {\n dispatchAuthEvent('signUp', data, username + \" has signed up successfully\");\n resolve(data);\n }\n }, clientMetadata);\n });\n };\n /**\n * Send the verification code to confirm sign up\n * @param {String} username - The username to be confirmed\n * @param {String} code - The verification code\n * @param {ConfirmSignUpOptions} options - other options for confirm signup\n * @return - A promise resolves callback data if success\n */\n AuthClass.prototype.confirmSignUp = function (username, code, options) {\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n var user = this.createCognitoUser(username);\n var forceAliasCreation = options && typeof options.forceAliasCreation === 'boolean' ? options.forceAliasCreation : true;\n var clientMetadata;\n if (options && options.clientMetadata) {\n clientMetadata = options.clientMetadata;\n } else if (this._config.clientMetadata) {\n clientMetadata = this._config.clientMetadata;\n }\n return new Promise(function (resolve, reject) {\n user.confirmRegistration(code, forceAliasCreation, function (err, data) {\n if (err) {\n reject(err);\n } else {\n resolve(data);\n }\n }, clientMetadata);\n });\n };\n /**\n * Resend the verification code\n * @param {String} username - The username to be confirmed\n * @param {ClientMetadata} clientMetadata - Metadata to be passed to Cognito Lambda triggers\n * @return - A promise resolves code delivery details if successful\n */\n AuthClass.prototype.resendSignUp = function (username, clientMetadata) {\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n var user = this.createCognitoUser(username);\n return new Promise(function (resolve, reject) {\n user.resendConfirmationCode(function (err, data) {\n if (err) {\n reject(err);\n } else {\n resolve(data);\n }\n }, clientMetadata);\n });\n };\n /**\n * Sign in\n * @param {String | SignInOpts} usernameOrSignInOpts - The username to be signed in or the sign in options\n * @param {String} password - The password of the username\n * @return - A promise resolves the CognitoUser\n */\n AuthClass.prototype.signIn = function (usernameOrSignInOpts, pw, clientMetadata) {\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n var username = null;\n var password = null;\n var validationData = {};\n // for backward compatibility\n if (typeof usernameOrSignInOpts === 'string') {\n username = usernameOrSignInOpts;\n password = pw;\n } else if (isUsernamePasswordOpts(usernameOrSignInOpts)) {\n if (typeof pw !== 'undefined') {\n logger.warn('The password should be defined under the first parameter object!');\n }\n username = usernameOrSignInOpts.username;\n password = usernameOrSignInOpts.password;\n validationData = usernameOrSignInOpts.validationData;\n } else {\n return this.rejectAuthError(AuthErrorTypes.InvalidUsername);\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n var authDetails = new AuthenticationDetails({\n Username: username,\n Password: password,\n ValidationData: validationData,\n ClientMetadata: clientMetadata\n });\n if (password) {\n return this.signInWithPassword(authDetails);\n } else {\n return this.signInWithoutPassword(authDetails);\n }\n };\n /**\n * Return an object with the authentication callbacks\n * @param {CognitoUser} user - the cognito user object\n * @param {} resolve - function called when resolving the current step\n * @param {} reject - function called when rejecting the current step\n * @return - an object with the callback methods for user authentication\n */\n AuthClass.prototype.authCallbacks = function (user, resolve, reject) {\n var _this = this;\n var that = this;\n return {\n onSuccess: function onSuccess(session) {\n return __awaiter(_this, void 0, void 0, function () {\n var cred, e_1, currentUser, e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug(session);\n delete user['challengeName'];\n delete user['challengeParam'];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, 5, 9]);\n return [4 /*yield*/, this.Credentials.clear()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 3:\n cred = _a.sent();\n logger.debug('succeed to get cognito credentials', cred);\n return [3 /*break*/, 9];\n case 4:\n e_1 = _a.sent();\n logger.debug('cannot get cognito credentials', e_1);\n return [3 /*break*/, 9];\n case 5:\n _a.trys.push([5, 7,, 8]);\n return [4 /*yield*/, this.currentUserPoolUser()];\n case 6:\n currentUser = _a.sent();\n that.user = currentUser;\n dispatchAuthEvent('signIn', currentUser, \"A user \" + user.getUsername() + \" has been signed in\");\n resolve(currentUser);\n return [3 /*break*/, 8];\n case 7:\n e_2 = _a.sent();\n logger.error('Failed to get the signed in user', e_2);\n reject(e_2);\n return [3 /*break*/, 8];\n case 8:\n return [7 /*endfinally*/];\n case 9:\n return [2 /*return*/];\n }\n });\n });\n },\n onFailure: function onFailure(err) {\n logger.debug('signIn failure', err);\n dispatchAuthEvent('signIn_failure', err, user.getUsername() + \" failed to signin\");\n reject(err);\n },\n customChallenge: function customChallenge(challengeParam) {\n logger.debug('signIn custom challenge answer required');\n user['challengeName'] = 'CUSTOM_CHALLENGE';\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n mfaRequired: function mfaRequired(challengeName, challengeParam) {\n logger.debug('signIn MFA required');\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n mfaSetup: function mfaSetup(challengeName, challengeParam) {\n logger.debug('signIn mfa setup', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n newPasswordRequired: function newPasswordRequired(userAttributes, requiredAttributes) {\n logger.debug('signIn new password');\n user['challengeName'] = 'NEW_PASSWORD_REQUIRED';\n user['challengeParam'] = {\n userAttributes: userAttributes,\n requiredAttributes: requiredAttributes\n };\n resolve(user);\n },\n totpRequired: function totpRequired(challengeName, challengeParam) {\n logger.debug('signIn totpRequired');\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n selectMFAType: function selectMFAType(challengeName, challengeParam) {\n logger.debug('signIn selectMFAType', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n }\n };\n };\n /**\n * Sign in with a password\n * @private\n * @param {AuthenticationDetails} authDetails - the user sign in data\n * @return - A promise resolves the CognitoUser object if success or mfa required\n */\n AuthClass.prototype.signInWithPassword = function (authDetails) {\n var _this = this;\n if (this.pendingSignIn) {\n throw new Error('Pending sign-in attempt already in progress');\n }\n var user = this.createCognitoUser(authDetails.getUsername());\n this.pendingSignIn = new Promise(function (resolve, reject) {\n user.authenticateUser(authDetails, _this.authCallbacks(user, function (value) {\n _this.pendingSignIn = null;\n resolve(value);\n }, function (error) {\n _this.pendingSignIn = null;\n reject(error);\n }));\n });\n return this.pendingSignIn;\n };\n /**\n * Sign in without a password\n * @private\n * @param {AuthenticationDetails} authDetails - the user sign in data\n * @return - A promise resolves the CognitoUser object if success or mfa required\n */\n AuthClass.prototype.signInWithoutPassword = function (authDetails) {\n var _this = this;\n var user = this.createCognitoUser(authDetails.getUsername());\n user.setAuthenticationFlowType('CUSTOM_AUTH');\n return new Promise(function (resolve, reject) {\n user.initiateAuth(authDetails, _this.authCallbacks(user, resolve, reject));\n });\n };\n /**\n * This was previously used by an authenticated user to get MFAOptions,\n * but no longer returns a meaningful response. Refer to the documentation for\n * how to setup and use MFA: https://docs.amplify.aws/lib/auth/mfa/q/platform/js\n * @deprecated\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves the current preferred mfa option if success\n */\n AuthClass.prototype.getMFAOptions = function (user) {\n return new Promise(function (res, rej) {\n user.getMFAOptions(function (err, mfaOptions) {\n if (err) {\n logger.debug('get MFA Options failed', err);\n rej(err);\n return;\n }\n logger.debug('get MFA options success', mfaOptions);\n res(mfaOptions);\n return;\n });\n });\n };\n /**\n * get preferred mfa method\n * @param {CognitoUser} user - the current cognito user\n * @param {GetPreferredMFAOpts} params - options for getting the current user preferred MFA\n */\n AuthClass.prototype.getPreferredMFA = function (user, params) {\n var _this = this;\n var that = this;\n return new Promise(function (res, rej) {\n var clientMetadata = _this._config.clientMetadata; // TODO: verify behavior if this is override during signIn\n var bypassCache = params ? params.bypassCache : false;\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting preferred mfa failed', err);\n rej(err);\n return;\n }\n var mfaType = that._getMfaTypeFromUserData(data);\n if (!mfaType) {\n rej('invalid MFA Type');\n return;\n } else {\n res(mfaType);\n return;\n }\n }, {\n bypassCache: bypassCache,\n clientMetadata: clientMetadata\n });\n });\n };\n AuthClass.prototype._getMfaTypeFromUserData = function (data) {\n var ret = null;\n var preferredMFA = data.PreferredMfaSetting;\n // if the user has used Auth.setPreferredMFA() to setup the mfa type\n // then the \"PreferredMfaSetting\" would exist in the response\n if (preferredMFA) {\n ret = preferredMFA;\n } else {\n // if mfaList exists but empty, then its noMFA\n var mfaList = data.UserMFASettingList;\n if (!mfaList) {\n // if SMS was enabled by using Auth.enableSMS(),\n // the response would contain MFAOptions\n // as for now Cognito only supports for SMS, so we will say it is 'SMS_MFA'\n // if it does not exist, then it should be NOMFA\n var MFAOptions = data.MFAOptions;\n if (MFAOptions) {\n ret = 'SMS_MFA';\n } else {\n ret = 'NOMFA';\n }\n } else if (mfaList.length === 0) {\n ret = 'NOMFA';\n } else {\n logger.debug('invalid case for getPreferredMFA', data);\n }\n }\n return ret;\n };\n AuthClass.prototype._getUserData = function (user, params) {\n return new Promise(function (res, rej) {\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting user data failed', err);\n rej(err);\n return;\n } else {\n res(data);\n return;\n }\n }, params);\n });\n };\n /**\n * set preferred MFA method\n * @param {CognitoUser} user - the current Cognito user\n * @param {string} mfaMethod - preferred mfa method\n * @return - A promise resolve if success\n */\n AuthClass.prototype.setPreferredMFA = function (user, mfaMethod) {\n return __awaiter(this, void 0, void 0, function () {\n var clientMetadata, userData, smsMfaSettings, totpMfaSettings, _a, mfaList, currentMFAType, that;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n clientMetadata = this._config.clientMetadata;\n return [4 /*yield*/, this._getUserData(user, {\n bypassCache: true,\n clientMetadata: clientMetadata\n })];\n case 1:\n userData = _b.sent();\n smsMfaSettings = null;\n totpMfaSettings = null;\n _a = mfaMethod;\n switch (_a) {\n case 'TOTP' || 'SOFTWARE_TOKEN_MFA':\n return [3 /*break*/, 2];\n case 'SMS' || 'SMS_MFA':\n return [3 /*break*/, 3];\n case 'NOMFA':\n return [3 /*break*/, 4];\n }\n return [3 /*break*/, 6];\n case 2:\n totpMfaSettings = {\n PreferredMfa: true,\n Enabled: true\n };\n return [3 /*break*/, 7];\n case 3:\n smsMfaSettings = {\n PreferredMfa: true,\n Enabled: true\n };\n return [3 /*break*/, 7];\n case 4:\n mfaList = userData['UserMFASettingList'];\n return [4 /*yield*/, this._getMfaTypeFromUserData(userData)];\n case 5:\n currentMFAType = _b.sent();\n if (currentMFAType === 'NOMFA') {\n return [2 /*return*/, Promise.resolve('No change for mfa type')];\n } else if (currentMFAType === 'SMS_MFA') {\n smsMfaSettings = {\n PreferredMfa: false,\n Enabled: false\n };\n } else if (currentMFAType === 'SOFTWARE_TOKEN_MFA') {\n totpMfaSettings = {\n PreferredMfa: false,\n Enabled: false\n };\n } else {\n return [2 /*return*/, this.rejectAuthError(AuthErrorTypes.InvalidMFA)];\n }\n // if there is a UserMFASettingList in the response\n // we need to disable every mfa type in that list\n if (mfaList && mfaList.length !== 0) {\n // to disable SMS or TOTP if exists in that list\n mfaList.forEach(function (mfaType) {\n if (mfaType === 'SMS_MFA') {\n smsMfaSettings = {\n PreferredMfa: false,\n Enabled: false\n };\n } else if (mfaType === 'SOFTWARE_TOKEN_MFA') {\n totpMfaSettings = {\n PreferredMfa: false,\n Enabled: false\n };\n }\n });\n }\n return [3 /*break*/, 7];\n case 6:\n logger.debug('no validmfa method provided');\n return [2 /*return*/, this.rejectAuthError(AuthErrorTypes.NoMFA)];\n case 7:\n that = this;\n return [2 /*return*/, new Promise(function (res, rej) {\n user.setUserMfaPreference(smsMfaSettings, totpMfaSettings, function (err, result) {\n if (err) {\n logger.debug('Set user mfa preference error', err);\n return rej(err);\n }\n logger.debug('Set user mfa success', result);\n logger.debug('Caching the latest user data into local');\n // cache the latest result into user data\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting user data failed', err);\n return rej(err);\n } else {\n return res(result);\n }\n }, {\n bypassCache: true,\n clientMetadata: clientMetadata\n });\n });\n })];\n }\n });\n });\n };\n /**\n * diable SMS\n * @deprecated\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves is success\n */\n AuthClass.prototype.disableSMS = function (user) {\n return new Promise(function (res, rej) {\n user.disableMFA(function (err, data) {\n if (err) {\n logger.debug('disable mfa failed', err);\n rej(err);\n return;\n }\n logger.debug('disable mfa succeed', data);\n res(data);\n return;\n });\n });\n };\n /**\n * enable SMS\n * @deprecated\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves is success\n */\n AuthClass.prototype.enableSMS = function (user) {\n return new Promise(function (res, rej) {\n user.enableMFA(function (err, data) {\n if (err) {\n logger.debug('enable mfa failed', err);\n rej(err);\n return;\n }\n logger.debug('enable mfa succeed', data);\n res(data);\n return;\n });\n });\n };\n /**\n * Setup TOTP\n * @param {CognitoUser} user - the current user\n * @return - A promise resolves with the secret code if success\n */\n AuthClass.prototype.setupTOTP = function (user) {\n return new Promise(function (res, rej) {\n user.associateSoftwareToken({\n onFailure: function onFailure(err) {\n logger.debug('associateSoftwareToken failed', err);\n rej(err);\n return;\n },\n associateSecretCode: function associateSecretCode(secretCode) {\n logger.debug('associateSoftwareToken sucess', secretCode);\n res(secretCode);\n return;\n }\n });\n });\n };\n /**\n * verify TOTP setup\n * @param {CognitoUser} user - the current user\n * @param {string} challengeAnswer - challenge answer\n * @return - A promise resolves is success\n */\n AuthClass.prototype.verifyTotpToken = function (user, challengeAnswer) {\n logger.debug('verification totp token', user, challengeAnswer);\n return new Promise(function (res, rej) {\n user.verifySoftwareToken(challengeAnswer, 'My TOTP device', {\n onFailure: function onFailure(err) {\n logger.debug('verifyTotpToken failed', err);\n rej(err);\n return;\n },\n onSuccess: function onSuccess(data) {\n dispatchAuthEvent('signIn', user, \"A user \" + user.getUsername() + \" has been signed in\");\n logger.debug('verifyTotpToken success', data);\n res(data);\n return;\n }\n });\n });\n };\n /**\n * Send MFA code to confirm sign in\n * @param {Object} user - The CognitoUser object\n * @param {String} code - The confirmation code\n */\n AuthClass.prototype.confirmSignIn = function (user, code, mfaType, clientMetadata) {\n var _this = this;\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n var that = this;\n return new Promise(function (resolve, reject) {\n user.sendMFACode(code, {\n onSuccess: function onSuccess(session) {\n return __awaiter(_this, void 0, void 0, function () {\n var cred, e_3;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug(session);\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, 5, 6]);\n return [4 /*yield*/, this.Credentials.clear()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 3:\n cred = _a.sent();\n logger.debug('succeed to get cognito credentials', cred);\n return [3 /*break*/, 6];\n case 4:\n e_3 = _a.sent();\n logger.debug('cannot get cognito credentials', e_3);\n return [3 /*break*/, 6];\n case 5:\n that.user = user;\n dispatchAuthEvent('signIn', user, \"A user \" + user.getUsername() + \" has been signed in\");\n resolve(user);\n return [7 /*endfinally*/];\n case 6:\n return [2 /*return*/];\n }\n });\n });\n },\n onFailure: function onFailure(err) {\n logger.debug('confirm signIn failure', err);\n reject(err);\n }\n }, mfaType, clientMetadata);\n });\n };\n AuthClass.prototype.completeNewPassword = function (user, password, requiredAttributes, clientMetadata) {\n var _this = this;\n if (requiredAttributes === void 0) {\n requiredAttributes = {};\n }\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!password) {\n return this.rejectAuthError(AuthErrorTypes.EmptyPassword);\n }\n var that = this;\n return new Promise(function (resolve, reject) {\n user.completeNewPasswordChallenge(password, requiredAttributes, {\n onSuccess: function onSuccess(session) {\n return __awaiter(_this, void 0, void 0, function () {\n var cred, e_4;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug(session);\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, 5, 6]);\n return [4 /*yield*/, this.Credentials.clear()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 3:\n cred = _a.sent();\n logger.debug('succeed to get cognito credentials', cred);\n return [3 /*break*/, 6];\n case 4:\n e_4 = _a.sent();\n logger.debug('cannot get cognito credentials', e_4);\n return [3 /*break*/, 6];\n case 5:\n that.user = user;\n dispatchAuthEvent('signIn', user, \"A user \" + user.getUsername() + \" has been signed in\");\n resolve(user);\n return [7 /*endfinally*/];\n case 6:\n return [2 /*return*/];\n }\n });\n });\n },\n onFailure: function onFailure(err) {\n logger.debug('completeNewPassword failure', err);\n dispatchAuthEvent('completeNewPassword_failure', err, _this.user + \" failed to complete the new password flow\");\n reject(err);\n },\n mfaRequired: function mfaRequired(challengeName, challengeParam) {\n logger.debug('signIn MFA required');\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n mfaSetup: function mfaSetup(challengeName, challengeParam) {\n logger.debug('signIn mfa setup', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n },\n totpRequired: function totpRequired(challengeName, challengeParam) {\n logger.debug('signIn mfa setup', challengeName);\n user['challengeName'] = challengeName;\n user['challengeParam'] = challengeParam;\n resolve(user);\n }\n }, clientMetadata);\n });\n };\n /**\n * Send the answer to a custom challenge\n * @param {CognitoUser} user - The CognitoUser object\n * @param {String} challengeResponses - The confirmation code\n */\n AuthClass.prototype.sendCustomChallengeAnswer = function (user, challengeResponses, clientMetadata) {\n var _this = this;\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!challengeResponses) {\n return this.rejectAuthError(AuthErrorTypes.EmptyChallengeResponse);\n }\n var that = this;\n return new Promise(function (resolve, reject) {\n user.sendCustomChallengeAnswer(challengeResponses, _this.authCallbacks(user, resolve, reject), clientMetadata);\n });\n };\n /**\n * Update an authenticated users' attributes\n * @param {CognitoUser} - The currently logged in user object\n * @return {Promise}\n **/\n AuthClass.prototype.updateUserAttributes = function (user, attributes, clientMetadata) {\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n var attributeList = [];\n var that = this;\n return new Promise(function (resolve, reject) {\n that.userSession(user).then(function (session) {\n for (var key in attributes) {\n if (key !== 'sub' && key.indexOf('_verified') < 0) {\n var attr = {\n Name: key,\n Value: attributes[key]\n };\n attributeList.push(attr);\n }\n }\n user.updateAttributes(attributeList, function (err, result) {\n if (err) {\n return reject(err);\n } else {\n return resolve(result);\n }\n }, clientMetadata);\n });\n });\n };\n /**\n * Return user attributes\n * @param {Object} user - The CognitoUser object\n * @return - A promise resolves to user attributes if success\n */\n AuthClass.prototype.userAttributes = function (user) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.userSession(user).then(function (session) {\n user.getUserAttributes(function (err, attributes) {\n if (err) {\n reject(err);\n } else {\n resolve(attributes);\n }\n });\n });\n });\n };\n AuthClass.prototype.verifiedContact = function (user) {\n var that = this;\n return this.userAttributes(user).then(function (attributes) {\n var attrs = that.attributesToObject(attributes);\n var unverified = {};\n var verified = {};\n if (attrs['email']) {\n if (attrs['email_verified']) {\n verified['email'] = attrs['email'];\n } else {\n unverified['email'] = attrs['email'];\n }\n }\n if (attrs['phone_number']) {\n if (attrs['phone_number_verified']) {\n verified['phone_number'] = attrs['phone_number'];\n } else {\n unverified['phone_number'] = attrs['phone_number'];\n }\n }\n return {\n verified: verified,\n unverified: unverified\n };\n });\n };\n /**\n * Get current authenticated user\n * @return - A promise resolves to current authenticated CognitoUser if success\n */\n AuthClass.prototype.currentUserPoolUser = function (params) {\n var _this = this;\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n return new Promise(function (res, rej) {\n _this._storageSync.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n var user, clientMetadata;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.isOAuthInProgress()) return [3 /*break*/, 2];\n logger.debug('OAuth signIn in progress, waiting for resolution...');\n return [4 /*yield*/, new Promise(function (res) {\n var timeoutId = setTimeout(function () {\n logger.debug('OAuth signIn in progress timeout');\n Hub.remove('auth', hostedUISignCallback);\n res();\n }, OAUTH_FLOW_MS_TIMEOUT);\n Hub.listen('auth', hostedUISignCallback);\n function hostedUISignCallback(_a) {\n var payload = _a.payload;\n var event = payload.event;\n if (event === 'cognitoHostedUI' || event === 'cognitoHostedUI_failure') {\n logger.debug(\"OAuth signIn resolved: \" + event);\n clearTimeout(timeoutId);\n Hub.remove('auth', hostedUISignCallback);\n res();\n }\n }\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n user = this.userPool.getCurrentUser();\n if (!user) {\n logger.debug('Failed to get user from user pool');\n rej('No current user');\n return [2 /*return*/];\n }\n clientMetadata = this._config.clientMetadata;\n // refresh the session if the session expired.\n user.getSession(function (err, session) {\n return __awaiter(_this, void 0, void 0, function () {\n var bypassCache, clientMetadata, _a, scope;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (err) {\n logger.debug('Failed to get the user session', err);\n rej(err);\n return [2 /*return*/];\n }\n bypassCache = params ? params.bypassCache : false;\n if (!bypassCache) return [3 /*break*/, 2];\n return [4 /*yield*/, this.Credentials.clear()];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n clientMetadata = this._config.clientMetadata;\n _a = session.getAccessToken().decodePayload().scope, scope = _a === void 0 ? '' : _a;\n if (scope.split(' ').includes(USER_ADMIN_SCOPE)) {\n user.getUserData(function (err, data) {\n if (err) {\n logger.debug('getting user data failed', err);\n // Make sure the user is still valid\n if (err.message === 'User is disabled.' || err.message === 'User does not exist.' || err.message === 'Access Token has been revoked' // Session revoked by another app\n ) {\n rej(err);\n } else {\n // the error may also be thrown when lack of permissions to get user info etc\n // in that case we just bypass the error\n res(user);\n }\n return;\n }\n var preferredMFA = data.PreferredMfaSetting || 'NOMFA';\n var attributeList = [];\n for (var i = 0; i < data.UserAttributes.length; i++) {\n var attribute = {\n Name: data.UserAttributes[i].Name,\n Value: data.UserAttributes[i].Value\n };\n var userAttribute = new CognitoUserAttribute(attribute);\n attributeList.push(userAttribute);\n }\n var attributes = _this.attributesToObject(attributeList);\n Object.assign(user, {\n attributes: attributes,\n preferredMFA: preferredMFA\n });\n return res(user);\n }, {\n bypassCache: bypassCache,\n clientMetadata: clientMetadata\n });\n } else {\n logger.debug(\"Unable to get the user data because the \" + USER_ADMIN_SCOPE + \" \" + \"is not in the scopes of the access token\");\n return [2 /*return*/, res(user)];\n }\n return [2 /*return*/];\n }\n });\n });\n }, {\n clientMetadata: clientMetadata\n });\n return [2 /*return*/];\n }\n });\n });\n }).catch(function (e) {\n logger.debug('Failed to sync cache info into memory', e);\n return rej(e);\n });\n });\n };\n AuthClass.prototype.isOAuthInProgress = function () {\n return this.oAuthFlowInProgress;\n };\n /**\n * Get current authenticated user\n * @param {CurrentUserOpts} - options for getting the current user\n * @return - A promise resolves to current authenticated CognitoUser if success\n */\n AuthClass.prototype.currentAuthenticatedUser = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n var federatedUser, e_5, federatedInfo, user, e_6;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug('getting current authenticated user');\n federatedUser = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3,, 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_5 = _a.sent();\n logger.debug('Failed to sync cache info into memory', e_5);\n throw e_5;\n case 4:\n try {\n federatedInfo = JSON.parse(this._storage.getItem('aws-amplify-federatedInfo'));\n if (federatedInfo) {\n federatedUser = __assign(__assign({}, federatedInfo.user), {\n token: federatedInfo.token\n });\n }\n } catch (e) {\n logger.debug('cannot load federated user from auth storage');\n }\n if (!federatedUser) return [3 /*break*/, 5];\n this.user = federatedUser;\n logger.debug('get current authenticated federated user', this.user);\n return [2 /*return*/, this.user];\n case 5:\n logger.debug('get current authenticated userpool user');\n user = null;\n _a.label = 6;\n case 6:\n _a.trys.push([6, 8,, 9]);\n return [4 /*yield*/, this.currentUserPoolUser(params)];\n case 7:\n user = _a.sent();\n return [3 /*break*/, 9];\n case 8:\n e_6 = _a.sent();\n if (e_6 === 'No userPool') {\n logger.error('Cannot get the current user because the user pool is missing. ' + 'Please make sure the Auth module is configured with a valid Cognito User Pool ID');\n }\n logger.debug('The user is not authenticated by the error', e_6);\n return [2 /*return*/, Promise.reject('The user is not authenticated')];\n case 9:\n this.user = user;\n return [2 /*return*/, this.user];\n }\n });\n });\n };\n /**\n * Get current user's session\n * @return - A promise resolves to session object if success\n */\n AuthClass.prototype.currentSession = function () {\n var that = this;\n logger.debug('Getting current session');\n // Purposely not calling the reject method here because we don't need a console error\n if (!this.userPool) {\n return Promise.reject();\n }\n return new Promise(function (res, rej) {\n that.currentUserPoolUser().then(function (user) {\n that.userSession(user).then(function (session) {\n res(session);\n return;\n }).catch(function (e) {\n logger.debug('Failed to get the current session', e);\n rej(e);\n return;\n });\n }).catch(function (e) {\n logger.debug('Failed to get the current user', e);\n rej(e);\n return;\n });\n });\n };\n /**\n * Get the corresponding user session\n * @param {Object} user - The CognitoUser object\n * @return - A promise resolves to the session\n */\n AuthClass.prototype.userSession = function (user) {\n if (!user) {\n logger.debug('the user is null');\n return this.rejectAuthError(AuthErrorTypes.NoUserSession);\n }\n var clientMetadata = this._config.clientMetadata; // TODO: verify behavior if this is override during signIn\n return new Promise(function (resolve, reject) {\n logger.debug('Getting the session from this user:', user);\n user.getSession(function (err, session) {\n if (err) {\n logger.debug('Failed to get the session from user', user);\n reject(err);\n return;\n } else {\n logger.debug('Succeed to get the user session', session);\n resolve(session);\n return;\n }\n }, {\n clientMetadata: clientMetadata\n });\n });\n };\n /**\n * Get authenticated credentials of current user.\n * @return - A promise resolves to be current user's credentials\n */\n AuthClass.prototype.currentUserCredentials = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_7, federatedInfo;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug('Getting current user credentials');\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3,, 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_7 = _a.sent();\n logger.debug('Failed to sync cache info into memory', e_7);\n throw e_7;\n case 4:\n federatedInfo = null;\n try {\n federatedInfo = JSON.parse(this._storage.getItem('aws-amplify-federatedInfo'));\n } catch (e) {\n logger.debug('failed to get or parse item aws-amplify-federatedInfo', e);\n }\n if (federatedInfo) {\n // refresh the jwt token here if necessary\n return [2 /*return*/, this.Credentials.refreshFederatedToken(federatedInfo)];\n } else {\n return [2 /*return*/, this.currentSession().then(function (session) {\n logger.debug('getting session success', session);\n return _this.Credentials.set(session, 'session');\n }).catch(function (error) {\n logger.debug('getting session failed', error);\n return _this.Credentials.set(null, 'guest');\n })];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n AuthClass.prototype.currentCredentials = function () {\n logger.debug('getting current credentials');\n return this.Credentials.get();\n };\n /**\n * Initiate an attribute confirmation request\n * @param {Object} user - The CognitoUser\n * @param {Object} attr - The attributes to be verified\n * @return - A promise resolves to callback data if success\n */\n AuthClass.prototype.verifyUserAttribute = function (user, attr, clientMetadata) {\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n return new Promise(function (resolve, reject) {\n user.getAttributeVerificationCode(attr, {\n onSuccess: function onSuccess() {\n return resolve();\n },\n onFailure: function onFailure(err) {\n return reject(err);\n }\n }, clientMetadata);\n });\n };\n /**\n * Confirm an attribute using a confirmation code\n * @param {Object} user - The CognitoUser\n * @param {Object} attr - The attribute to be verified\n * @param {String} code - The confirmation code\n * @return - A promise resolves to callback data if success\n */\n AuthClass.prototype.verifyUserAttributeSubmit = function (user, attr, code) {\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n return new Promise(function (resolve, reject) {\n user.verifyAttribute(attr, code, {\n onSuccess: function onSuccess(data) {\n resolve(data);\n return;\n },\n onFailure: function onFailure(err) {\n reject(err);\n return;\n }\n });\n });\n };\n AuthClass.prototype.verifyCurrentUserAttribute = function (attr) {\n var that = this;\n return that.currentUserPoolUser().then(function (user) {\n return that.verifyUserAttribute(user, attr);\n });\n };\n /**\n * Confirm current user's attribute using a confirmation code\n * @param {Object} attr - The attribute to be verified\n * @param {String} code - The confirmation code\n * @return - A promise resolves to callback data if success\n */\n AuthClass.prototype.verifyCurrentUserAttributeSubmit = function (attr, code) {\n var that = this;\n return that.currentUserPoolUser().then(function (user) {\n return that.verifyUserAttributeSubmit(user, attr, code);\n });\n };\n AuthClass.prototype.cognitoIdentitySignOut = function (opts, user) {\n return __awaiter(this, void 0, void 0, function () {\n var e_8, isSignedInHostedUI;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2,, 3]);\n return [4 /*yield*/, this._storageSync];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n e_8 = _a.sent();\n logger.debug('Failed to sync cache info into memory', e_8);\n throw e_8;\n case 3:\n isSignedInHostedUI = this._oAuthHandler && this._storage.getItem('amplify-signin-with-hostedUI') === 'true';\n return [2 /*return*/, new Promise(function (res, rej) {\n if (opts && opts.global) {\n logger.debug('user global sign out', user);\n // in order to use global signout\n // we must validate the user as an authenticated user by using getSession\n var clientMetadata = _this._config.clientMetadata; // TODO: verify behavior if this is override during signIn\n user.getSession(function (err, result) {\n if (err) {\n logger.debug('failed to get the user session', err);\n return rej(err);\n }\n user.globalSignOut({\n onSuccess: function onSuccess(data) {\n logger.debug('global sign out success');\n if (isSignedInHostedUI) {\n _this.oAuthSignOutRedirect(res, rej);\n } else {\n return res();\n }\n },\n onFailure: function onFailure(err) {\n logger.debug('global sign out failed', err);\n return rej(err);\n }\n });\n }, {\n clientMetadata: clientMetadata\n });\n } else {\n logger.debug('user sign out', user);\n user.signOut();\n if (isSignedInHostedUI) {\n _this.oAuthSignOutRedirect(res, rej);\n } else {\n return res();\n }\n }\n })];\n }\n });\n });\n };\n AuthClass.prototype.oAuthSignOutRedirect = function (resolve, reject) {\n var isBrowser = JS.browserOrNode().isBrowser;\n if (isBrowser) {\n this.oAuthSignOutRedirectOrReject(reject);\n } else {\n this.oAuthSignOutAndResolve(resolve);\n }\n };\n AuthClass.prototype.oAuthSignOutAndResolve = function (resolve) {\n this._oAuthHandler.signOut();\n resolve();\n };\n AuthClass.prototype.oAuthSignOutRedirectOrReject = function (reject) {\n this._oAuthHandler.signOut(); // this method redirects url\n // App should be redirected to another url otherwise it will reject\n setTimeout(function () {\n return reject('Signout timeout fail');\n }, 3000);\n };\n /**\n * Sign out method\n * @\n * @return - A promise resolved if success\n */\n AuthClass.prototype.signOut = function (opts) {\n return __awaiter(this, void 0, void 0, function () {\n var e_9, user;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2,, 3]);\n return [4 /*yield*/, this.cleanCachedItems()];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n e_9 = _a.sent();\n logger.debug('failed to clear cached items');\n return [3 /*break*/, 3];\n case 3:\n if (!this.userPool) return [3 /*break*/, 7];\n user = this.userPool.getCurrentUser();\n if (!user) return [3 /*break*/, 5];\n return [4 /*yield*/, this.cognitoIdentitySignOut(opts, user)];\n case 4:\n _a.sent();\n return [3 /*break*/, 6];\n case 5:\n logger.debug('no current Cognito user');\n _a.label = 6;\n case 6:\n return [3 /*break*/, 8];\n case 7:\n logger.debug('no Congito User pool');\n _a.label = 8;\n case 8:\n /**\n * Note for future refactor - no reliable way to get username with\n * Cognito User Pools vs Identity when federating with Social Providers\n * This is why we need a well structured session object that can be inspected\n * and information passed back in the message below for Hub dispatch\n */\n dispatchAuthEvent('signOut', this.user, \"A user has been signed out\");\n this.user = null;\n return [2 /*return*/];\n }\n });\n });\n };\n AuthClass.prototype.cleanCachedItems = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // clear cognito cached item\n return [4 /*yield*/, this.Credentials.clear()];\n case 1:\n // clear cognito cached item\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Change a password for an authenticated user\n * @param {Object} user - The CognitoUser object\n * @param {String} oldPassword - the current password\n * @param {String} newPassword - the requested new password\n * @return - A promise resolves if success\n */\n AuthClass.prototype.changePassword = function (user, oldPassword, newPassword, clientMetadata) {\n var _this = this;\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n return new Promise(function (resolve, reject) {\n _this.userSession(user).then(function (session) {\n user.changePassword(oldPassword, newPassword, function (err, data) {\n if (err) {\n logger.debug('change password failure', err);\n return reject(err);\n } else {\n return resolve(data);\n }\n }, clientMetadata);\n });\n });\n };\n /**\n * Initiate a forgot password request\n * @param {String} username - the username to change password\n * @return - A promise resolves if success\n */\n AuthClass.prototype.forgotPassword = function (username, clientMetadata) {\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n var user = this.createCognitoUser(username);\n return new Promise(function (resolve, reject) {\n user.forgotPassword({\n onSuccess: function onSuccess() {\n resolve();\n return;\n },\n onFailure: function onFailure(err) {\n logger.debug('forgot password failure', err);\n dispatchAuthEvent('forgotPassword_failure', err, username + \" forgotPassword failed\");\n reject(err);\n return;\n },\n inputVerificationCode: function inputVerificationCode(data) {\n dispatchAuthEvent('forgotPassword', user, username + \" has initiated forgot password flow\");\n resolve(data);\n return;\n }\n }, clientMetadata);\n });\n };\n /**\n * Confirm a new password using a confirmation Code\n * @param {String} username - The username\n * @param {String} code - The confirmation code\n * @param {String} password - The new password\n * @return - A promise that resolves if success\n */\n AuthClass.prototype.forgotPasswordSubmit = function (username, code, password, clientMetadata) {\n if (clientMetadata === void 0) {\n clientMetadata = this._config.clientMetadata;\n }\n if (!this.userPool) {\n return this.rejectNoUserPool();\n }\n if (!username) {\n return this.rejectAuthError(AuthErrorTypes.EmptyUsername);\n }\n if (!code) {\n return this.rejectAuthError(AuthErrorTypes.EmptyCode);\n }\n if (!password) {\n return this.rejectAuthError(AuthErrorTypes.EmptyPassword);\n }\n var user = this.createCognitoUser(username);\n return new Promise(function (resolve, reject) {\n user.confirmPassword(code, password, {\n onSuccess: function onSuccess() {\n dispatchAuthEvent('forgotPasswordSubmit', user, username + \" forgotPasswordSubmit successful\");\n resolve();\n return;\n },\n onFailure: function onFailure(err) {\n dispatchAuthEvent('forgotPasswordSubmit_failure', err, username + \" forgotPasswordSubmit failed\");\n reject(err);\n return;\n }\n }, clientMetadata);\n });\n };\n /**\n * Get user information\n * @async\n * @return {Object }- current User's information\n */\n AuthClass.prototype.currentUserInfo = function () {\n return __awaiter(this, void 0, void 0, function () {\n var source, user, attributes, userAttrs, credentials, e_10, info, err_1, user;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n source = this.Credentials.getCredSource();\n if (!(!source || source === 'aws' || source === 'userPool')) return [3 /*break*/, 9];\n return [4 /*yield*/, this.currentUserPoolUser().catch(function (err) {\n return logger.debug(err);\n })];\n case 1:\n user = _a.sent();\n if (!user) {\n return [2 /*return*/, null];\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 8,, 9]);\n return [4 /*yield*/, this.userAttributes(user)];\n case 3:\n attributes = _a.sent();\n userAttrs = this.attributesToObject(attributes);\n credentials = null;\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6,, 7]);\n return [4 /*yield*/, this.currentCredentials()];\n case 5:\n credentials = _a.sent();\n return [3 /*break*/, 7];\n case 6:\n e_10 = _a.sent();\n logger.debug('Failed to retrieve credentials while getting current user info', e_10);\n return [3 /*break*/, 7];\n case 7:\n info = {\n id: credentials ? credentials.identityId : undefined,\n username: user.getUsername(),\n attributes: userAttrs\n };\n return [2 /*return*/, info];\n case 8:\n err_1 = _a.sent();\n logger.debug('currentUserInfo error', err_1);\n return [2 /*return*/, {}];\n case 9:\n if (source === 'federated') {\n user = this.user;\n return [2 /*return*/, user ? user : {}];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n AuthClass.prototype.federatedSignIn = function (providerOrOptions, response, user) {\n return __awaiter(this, void 0, void 0, function () {\n var options, provider, customState, client_id, redirect_uri, provider, loggedInUser, token, identity_id, expires_at, credentials, currentUser;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._config.identityPoolId && !this._config.userPoolId) {\n throw new Error(\"Federation requires either a User Pool or Identity Pool in config\");\n }\n // Ensure backwards compatability\n if (typeof providerOrOptions === 'undefined') {\n if (this._config.identityPoolId && !this._config.userPoolId) {\n throw new Error(\"Federation with Identity Pools requires tokens passed as arguments\");\n }\n }\n if (!(isFederatedSignInOptions(providerOrOptions) || isFederatedSignInOptionsCustom(providerOrOptions) || hasCustomState(providerOrOptions) || typeof providerOrOptions === 'undefined')) return [3 /*break*/, 1];\n options = providerOrOptions || {\n provider: CognitoHostedUIIdentityProvider.Cognito\n };\n provider = isFederatedSignInOptions(options) ? options.provider : options.customProvider;\n customState = isFederatedSignInOptions(options) ? options.customState : options.customState;\n if (this._config.userPoolId) {\n client_id = isCognitoHostedOpts(this._config.oauth) ? this._config.userPoolWebClientId : this._config.oauth.clientID;\n redirect_uri = isCognitoHostedOpts(this._config.oauth) ? this._config.oauth.redirectSignIn : this._config.oauth.redirectUri;\n this._oAuthHandler.oauthSignIn(this._config.oauth.responseType, this._config.oauth.domain, redirect_uri, client_id, provider, customState);\n }\n return [3 /*break*/, 4];\n case 1:\n provider = providerOrOptions;\n // To check if the user is already logged in\n try {\n loggedInUser = JSON.stringify(JSON.parse(this._storage.getItem('aws-amplify-federatedInfo')).user);\n if (loggedInUser) {\n logger.warn(\"There is already a signed in user: \" + loggedInUser + \" in your app.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.\");\n }\n } catch (e) {}\n token = response.token, identity_id = response.identity_id, expires_at = response.expires_at;\n return [4 /*yield*/, this.Credentials.set({\n provider: provider,\n token: token,\n identity_id: identity_id,\n user: user,\n expires_at: expires_at\n }, 'federation')];\n case 2:\n credentials = _a.sent();\n return [4 /*yield*/, this.currentAuthenticatedUser()];\n case 3:\n currentUser = _a.sent();\n dispatchAuthEvent('signIn', currentUser, \"A user \" + currentUser.username + \" has been signed in\");\n logger.debug('federated sign in credentials', credentials);\n return [2 /*return*/, credentials];\n case 4:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Used to complete the OAuth flow with or without the Cognito Hosted UI\n * @param {String} URL - optional parameter for customers to pass in the response URL\n */\n AuthClass.prototype._handleAuthResponse = function (URL) {\n return __awaiter(this, void 0, void 0, function () {\n var currentUrl, hasCodeOrError, hasTokenOrError, _a, accessToken, idToken, refreshToken, state, session, credentials, isCustomStateIncluded, currentUser, customState, err_2;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (this.oAuthFlowInProgress) {\n logger.debug(\"Skipping URL \" + URL + \" current flow in progress\");\n return [2 /*return*/];\n }\n _b.label = 1;\n case 1:\n _b.trys.push([1,, 8, 9]);\n this.oAuthFlowInProgress = true;\n if (!this._config.userPoolId) {\n throw new Error(\"OAuth responses require a User Pool defined in config\");\n }\n dispatchAuthEvent('parsingCallbackUrl', {\n url: URL\n }, \"The callback url is being parsed\");\n currentUrl = URL || (JS.browserOrNode().isBrowser ? window.location.href : '');\n hasCodeOrError = !!(parse(currentUrl).query || '').split('&').map(function (entry) {\n return entry.split('=');\n }).find(function (_a) {\n var _b = __read(_a, 1),\n k = _b[0];\n return k === 'code' || k === 'error';\n });\n hasTokenOrError = !!(parse(currentUrl).hash || '#').substr(1).split('&').map(function (entry) {\n return entry.split('=');\n }).find(function (_a) {\n var _b = __read(_a, 1),\n k = _b[0];\n return k === 'access_token' || k === 'error';\n });\n if (!(hasCodeOrError || hasTokenOrError)) return [3 /*break*/, 7];\n this._storage.setItem('amplify-redirected-from-hosted-ui', 'true');\n _b.label = 2;\n case 2:\n _b.trys.push([2, 6,, 7]);\n return [4 /*yield*/, this._oAuthHandler.handleAuthResponse(currentUrl)];\n case 3:\n _a = _b.sent(), accessToken = _a.accessToken, idToken = _a.idToken, refreshToken = _a.refreshToken, state = _a.state;\n session = new CognitoUserSession({\n IdToken: new CognitoIdToken({\n IdToken: idToken\n }),\n RefreshToken: new CognitoRefreshToken({\n RefreshToken: refreshToken\n }),\n AccessToken: new CognitoAccessToken({\n AccessToken: accessToken\n })\n });\n credentials = void 0;\n if (!this._config.identityPoolId) return [3 /*break*/, 5];\n return [4 /*yield*/, this.Credentials.set(session, 'session')];\n case 4:\n credentials = _b.sent();\n logger.debug('AWS credentials', credentials);\n _b.label = 5;\n case 5:\n isCustomStateIncluded = /-/.test(state);\n currentUser = this.createCognitoUser(session.getIdToken().decodePayload()['cognito:username']);\n // This calls cacheTokens() in Cognito SDK\n currentUser.setSignInUserSession(session);\n if (window && typeof window.history !== 'undefined') {\n window.history.replaceState({}, null, this._config.oauth.redirectSignIn);\n }\n dispatchAuthEvent('signIn', currentUser, \"A user \" + currentUser.getUsername() + \" has been signed in\");\n dispatchAuthEvent('cognitoHostedUI', currentUser, \"A user \" + currentUser.getUsername() + \" has been signed in via Cognito Hosted UI\");\n if (isCustomStateIncluded) {\n customState = state.split('-').splice(1).join('-');\n dispatchAuthEvent('customOAuthState', urlSafeDecode(customState), \"State for user \" + currentUser.getUsername());\n }\n //#endregion\n return [2 /*return*/, credentials];\n case 6:\n err_2 = _b.sent();\n logger.debug('Error in cognito hosted auth response', err_2);\n dispatchAuthEvent('signIn_failure', err_2, \"The OAuth response flow failed\");\n dispatchAuthEvent('cognitoHostedUI_failure', err_2, \"A failure occurred when returning to the Cognito Hosted UI\");\n dispatchAuthEvent('customState_failure', err_2, \"A failure occurred when returning state\");\n return [3 /*break*/, 7];\n case 7:\n return [3 /*break*/, 9];\n case 8:\n this.oAuthFlowInProgress = false;\n return [7 /*endfinally*/];\n case 9:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Compact version of credentials\n * @param {Object} credentials\n * @return {Object} - Credentials\n */\n AuthClass.prototype.essentialCredentials = function (credentials) {\n return {\n accessKeyId: credentials.accessKeyId,\n sessionToken: credentials.sessionToken,\n secretAccessKey: credentials.secretAccessKey,\n identityId: credentials.identityId,\n authenticated: credentials.authenticated\n };\n };\n AuthClass.prototype.attributesToObject = function (attributes) {\n var _this = this;\n var obj = {};\n if (attributes) {\n attributes.map(function (attribute) {\n if (attribute.Name === 'email_verified' || attribute.Name === 'phone_number_verified') {\n obj[attribute.Name] = _this.isTruthyString(attribute.Value) || attribute.Value === true;\n } else {\n obj[attribute.Name] = attribute.Value;\n }\n });\n }\n return obj;\n };\n AuthClass.prototype.isTruthyString = function (value) {\n return typeof value.toLowerCase === 'function' && value.toLowerCase() === 'true';\n };\n AuthClass.prototype.createCognitoUser = function (username) {\n var userData = {\n Username: username,\n Pool: this.userPool\n };\n userData.Storage = this._storage;\n var authenticationFlowType = this._config.authenticationFlowType;\n var user = new CognitoUser(userData);\n if (authenticationFlowType) {\n user.setAuthenticationFlowType(authenticationFlowType);\n }\n return user;\n };\n AuthClass.prototype._isValidAuthStorage = function (obj) {\n // We need to check if the obj has the functions of Storage\n return !!obj && typeof obj.getItem === 'function' && typeof obj.setItem === 'function' && typeof obj.removeItem === 'function' && typeof obj.clear === 'function';\n };\n AuthClass.prototype.noUserPoolErrorHandler = function (config) {\n if (config) {\n if (!config.userPoolId || !config.identityPoolId) {\n return AuthErrorTypes.MissingAuthConfig;\n }\n }\n return AuthErrorTypes.NoConfig;\n };\n AuthClass.prototype.rejectAuthError = function (type) {\n return Promise.reject(new AuthError(type));\n };\n AuthClass.prototype.rejectNoUserPool = function () {\n var type = this.noUserPoolErrorHandler(this._config);\n return Promise.reject(new NoUserPoolError(type));\n };\n return AuthClass;\n}();\nexport { AuthClass };\nexport var Auth = new AuthClass(null);\nAmplify.register(Auth);","/*\n * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { JS } from '@aws-amplify/core';\nexport default (function (callback) {\n if (JS.browserOrNode().isBrowser && window.location) {\n var url = window.location.href;\n callback({\n url: url\n });\n } else if (JS.browserOrNode().isNode) {\n // continue building on ssr\n (function () {}); // noop\n } else {\n throw new Error('Not supported');\n }\n});","var __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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};\nimport { ConsoleLogger as LoggerClass } from './Logger';\nvar logger = new LoggerClass('Amplify');\nvar AmplifyClass = /** @class */function () {\n function AmplifyClass() {\n // Everything that is `register`ed is tracked here\n this._components = [];\n this._config = {};\n // All modules (with `getModuleName()`) are stored here for dependency injection\n this._modules = {};\n // for backward compatibility to avoid breaking change\n // if someone is using like Amplify.Auth\n this.Auth = null;\n this.Analytics = null;\n this.API = null;\n this.Credentials = null;\n this.Storage = null;\n this.I18n = null;\n this.Cache = null;\n this.PubSub = null;\n this.Interactions = null;\n this.Pushnotification = null;\n this.UI = null;\n this.XR = null;\n this.Predictions = null;\n this.DataStore = null;\n this.Logger = LoggerClass;\n this.ServiceWorker = null;\n }\n AmplifyClass.prototype.register = function (comp) {\n logger.debug('component registered in amplify', comp);\n this._components.push(comp);\n if (typeof comp.getModuleName === 'function') {\n this._modules[comp.getModuleName()] = comp;\n this[comp.getModuleName()] = comp;\n } else {\n logger.debug('no getModuleName method for component', comp);\n }\n // Finally configure this new component(category) loaded\n // With the new modularization changes in Amplify V3, all the Amplify\n // component are not loaded/registered right away but when they are\n // imported (and hence instantiated) in the client's app. This ensures\n // that all new components imported get correctly configured with the\n // configuration that Amplify.configure() was called with.\n comp.configure(this._config);\n };\n AmplifyClass.prototype.configure = function (config) {\n var _this = this;\n if (!config) return this._config;\n this._config = Object.assign(this._config, config);\n logger.debug('amplify config', this._config);\n // Dependency Injection via property-setting.\n // This avoids introducing a public method/interface/setter that's difficult to remove later.\n // Plus, it reduces `if` statements within the `constructor` and `configure` of each module\n Object.entries(this._modules).forEach(function (_a) {\n var _b = __read(_a, 2),\n Name = _b[0],\n comp = _b[1];\n // e.g. Auth.*\n Object.keys(comp).forEach(function (property) {\n // e.g. Auth[\"Credentials\"] = this._modules[\"Credentials\"] when set\n if (_this._modules[property]) {\n comp[property] = _this._modules[property];\n }\n });\n });\n this._components.map(function (comp) {\n comp.configure(_this._config);\n });\n return this._config;\n };\n AmplifyClass.prototype.addPluggable = function (pluggable) {\n if (pluggable && pluggable['getCategory'] && typeof pluggable['getCategory'] === 'function') {\n this._components.map(function (comp) {\n if (comp['addPluggable'] && typeof comp['addPluggable'] === 'function') {\n comp.addPluggable(pluggable);\n }\n });\n }\n };\n return AmplifyClass;\n}();\nexport { AmplifyClass };\nexport var Amplify = new AmplifyClass();\n/**\n * @deprecated use named import\n */\nexport default Amplify;","import { __assign } from \"tslib\";\nexport var AmbiguousRoleResolutionType;\n(function (AmbiguousRoleResolutionType) {\n AmbiguousRoleResolutionType[\"AUTHENTICATED_ROLE\"] = \"AuthenticatedRole\";\n AmbiguousRoleResolutionType[\"DENY\"] = \"Deny\";\n})(AmbiguousRoleResolutionType || (AmbiguousRoleResolutionType = {}));\nexport var CognitoIdentityProvider;\n(function (CognitoIdentityProvider) {\n CognitoIdentityProvider.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(CognitoIdentityProvider || (CognitoIdentityProvider = {}));\nexport var CreateIdentityPoolInput;\n(function (CreateIdentityPoolInput) {\n CreateIdentityPoolInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(CreateIdentityPoolInput || (CreateIdentityPoolInput = {}));\nexport var IdentityPool;\n(function (IdentityPool) {\n IdentityPool.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(IdentityPool || (IdentityPool = {}));\nexport var InternalErrorException;\n(function (InternalErrorException) {\n InternalErrorException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(InternalErrorException || (InternalErrorException = {}));\nexport var InvalidParameterException;\n(function (InvalidParameterException) {\n InvalidParameterException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(InvalidParameterException || (InvalidParameterException = {}));\nexport var LimitExceededException;\n(function (LimitExceededException) {\n LimitExceededException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(LimitExceededException || (LimitExceededException = {}));\nexport var NotAuthorizedException;\n(function (NotAuthorizedException) {\n NotAuthorizedException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(NotAuthorizedException || (NotAuthorizedException = {}));\nexport var ResourceConflictException;\n(function (ResourceConflictException) {\n ResourceConflictException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ResourceConflictException || (ResourceConflictException = {}));\nexport var TooManyRequestsException;\n(function (TooManyRequestsException) {\n TooManyRequestsException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(TooManyRequestsException || (TooManyRequestsException = {}));\nexport var DeleteIdentitiesInput;\n(function (DeleteIdentitiesInput) {\n DeleteIdentitiesInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(DeleteIdentitiesInput || (DeleteIdentitiesInput = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"ACCESS_DENIED\"] = \"AccessDenied\";\n ErrorCode[\"INTERNAL_SERVER_ERROR\"] = \"InternalServerError\";\n})(ErrorCode || (ErrorCode = {}));\nexport var UnprocessedIdentityId;\n(function (UnprocessedIdentityId) {\n UnprocessedIdentityId.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(UnprocessedIdentityId || (UnprocessedIdentityId = {}));\nexport var DeleteIdentitiesResponse;\n(function (DeleteIdentitiesResponse) {\n DeleteIdentitiesResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(DeleteIdentitiesResponse || (DeleteIdentitiesResponse = {}));\nexport var DeleteIdentityPoolInput;\n(function (DeleteIdentityPoolInput) {\n DeleteIdentityPoolInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(DeleteIdentityPoolInput || (DeleteIdentityPoolInput = {}));\nexport var ResourceNotFoundException;\n(function (ResourceNotFoundException) {\n ResourceNotFoundException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ResourceNotFoundException || (ResourceNotFoundException = {}));\nexport var DescribeIdentityInput;\n(function (DescribeIdentityInput) {\n DescribeIdentityInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(DescribeIdentityInput || (DescribeIdentityInput = {}));\nexport var IdentityDescription;\n(function (IdentityDescription) {\n IdentityDescription.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(IdentityDescription || (IdentityDescription = {}));\nexport var DescribeIdentityPoolInput;\n(function (DescribeIdentityPoolInput) {\n DescribeIdentityPoolInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(DescribeIdentityPoolInput || (DescribeIdentityPoolInput = {}));\nexport var ExternalServiceException;\n(function (ExternalServiceException) {\n ExternalServiceException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ExternalServiceException || (ExternalServiceException = {}));\nexport var GetCredentialsForIdentityInput;\n(function (GetCredentialsForIdentityInput) {\n GetCredentialsForIdentityInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetCredentialsForIdentityInput || (GetCredentialsForIdentityInput = {}));\nexport var Credentials;\n(function (Credentials) {\n Credentials.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(Credentials || (Credentials = {}));\nexport var GetCredentialsForIdentityResponse;\n(function (GetCredentialsForIdentityResponse) {\n GetCredentialsForIdentityResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetCredentialsForIdentityResponse || (GetCredentialsForIdentityResponse = {}));\nexport var InvalidIdentityPoolConfigurationException;\n(function (InvalidIdentityPoolConfigurationException) {\n InvalidIdentityPoolConfigurationException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(InvalidIdentityPoolConfigurationException || (InvalidIdentityPoolConfigurationException = {}));\nexport var GetIdInput;\n(function (GetIdInput) {\n GetIdInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetIdInput || (GetIdInput = {}));\nexport var GetIdResponse;\n(function (GetIdResponse) {\n GetIdResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetIdResponse || (GetIdResponse = {}));\nexport var GetIdentityPoolRolesInput;\n(function (GetIdentityPoolRolesInput) {\n GetIdentityPoolRolesInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetIdentityPoolRolesInput || (GetIdentityPoolRolesInput = {}));\nexport var MappingRuleMatchType;\n(function (MappingRuleMatchType) {\n MappingRuleMatchType[\"CONTAINS\"] = \"Contains\";\n MappingRuleMatchType[\"EQUALS\"] = \"Equals\";\n MappingRuleMatchType[\"NOT_EQUAL\"] = \"NotEqual\";\n MappingRuleMatchType[\"STARTS_WITH\"] = \"StartsWith\";\n})(MappingRuleMatchType || (MappingRuleMatchType = {}));\nexport var MappingRule;\n(function (MappingRule) {\n MappingRule.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(MappingRule || (MappingRule = {}));\nexport var RulesConfigurationType;\n(function (RulesConfigurationType) {\n RulesConfigurationType.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(RulesConfigurationType || (RulesConfigurationType = {}));\nexport var RoleMappingType;\n(function (RoleMappingType) {\n RoleMappingType[\"RULES\"] = \"Rules\";\n RoleMappingType[\"TOKEN\"] = \"Token\";\n})(RoleMappingType || (RoleMappingType = {}));\nexport var RoleMapping;\n(function (RoleMapping) {\n RoleMapping.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(RoleMapping || (RoleMapping = {}));\nexport var GetIdentityPoolRolesResponse;\n(function (GetIdentityPoolRolesResponse) {\n GetIdentityPoolRolesResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetIdentityPoolRolesResponse || (GetIdentityPoolRolesResponse = {}));\nexport var GetOpenIdTokenInput;\n(function (GetOpenIdTokenInput) {\n GetOpenIdTokenInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetOpenIdTokenInput || (GetOpenIdTokenInput = {}));\nexport var GetOpenIdTokenResponse;\n(function (GetOpenIdTokenResponse) {\n GetOpenIdTokenResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetOpenIdTokenResponse || (GetOpenIdTokenResponse = {}));\nexport var DeveloperUserAlreadyRegisteredException;\n(function (DeveloperUserAlreadyRegisteredException) {\n DeveloperUserAlreadyRegisteredException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(DeveloperUserAlreadyRegisteredException || (DeveloperUserAlreadyRegisteredException = {}));\nexport var GetOpenIdTokenForDeveloperIdentityInput;\n(function (GetOpenIdTokenForDeveloperIdentityInput) {\n GetOpenIdTokenForDeveloperIdentityInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetOpenIdTokenForDeveloperIdentityInput || (GetOpenIdTokenForDeveloperIdentityInput = {}));\nexport var GetOpenIdTokenForDeveloperIdentityResponse;\n(function (GetOpenIdTokenForDeveloperIdentityResponse) {\n GetOpenIdTokenForDeveloperIdentityResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(GetOpenIdTokenForDeveloperIdentityResponse || (GetOpenIdTokenForDeveloperIdentityResponse = {}));\nexport var ListIdentitiesInput;\n(function (ListIdentitiesInput) {\n ListIdentitiesInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ListIdentitiesInput || (ListIdentitiesInput = {}));\nexport var ListIdentitiesResponse;\n(function (ListIdentitiesResponse) {\n ListIdentitiesResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ListIdentitiesResponse || (ListIdentitiesResponse = {}));\nexport var ListIdentityPoolsInput;\n(function (ListIdentityPoolsInput) {\n ListIdentityPoolsInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ListIdentityPoolsInput || (ListIdentityPoolsInput = {}));\nexport var IdentityPoolShortDescription;\n(function (IdentityPoolShortDescription) {\n IdentityPoolShortDescription.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(IdentityPoolShortDescription || (IdentityPoolShortDescription = {}));\nexport var ListIdentityPoolsResponse;\n(function (ListIdentityPoolsResponse) {\n ListIdentityPoolsResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ListIdentityPoolsResponse || (ListIdentityPoolsResponse = {}));\nexport var ListTagsForResourceInput;\n(function (ListTagsForResourceInput) {\n ListTagsForResourceInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ListTagsForResourceInput || (ListTagsForResourceInput = {}));\nexport var ListTagsForResourceResponse;\n(function (ListTagsForResourceResponse) {\n ListTagsForResourceResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ListTagsForResourceResponse || (ListTagsForResourceResponse = {}));\nexport var LookupDeveloperIdentityInput;\n(function (LookupDeveloperIdentityInput) {\n LookupDeveloperIdentityInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(LookupDeveloperIdentityInput || (LookupDeveloperIdentityInput = {}));\nexport var LookupDeveloperIdentityResponse;\n(function (LookupDeveloperIdentityResponse) {\n LookupDeveloperIdentityResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(LookupDeveloperIdentityResponse || (LookupDeveloperIdentityResponse = {}));\nexport var MergeDeveloperIdentitiesInput;\n(function (MergeDeveloperIdentitiesInput) {\n MergeDeveloperIdentitiesInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(MergeDeveloperIdentitiesInput || (MergeDeveloperIdentitiesInput = {}));\nexport var MergeDeveloperIdentitiesResponse;\n(function (MergeDeveloperIdentitiesResponse) {\n MergeDeveloperIdentitiesResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(MergeDeveloperIdentitiesResponse || (MergeDeveloperIdentitiesResponse = {}));\nexport var ConcurrentModificationException;\n(function (ConcurrentModificationException) {\n ConcurrentModificationException.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(ConcurrentModificationException || (ConcurrentModificationException = {}));\nexport var SetIdentityPoolRolesInput;\n(function (SetIdentityPoolRolesInput) {\n SetIdentityPoolRolesInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(SetIdentityPoolRolesInput || (SetIdentityPoolRolesInput = {}));\nexport var TagResourceInput;\n(function (TagResourceInput) {\n TagResourceInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(TagResourceInput || (TagResourceInput = {}));\nexport var TagResourceResponse;\n(function (TagResourceResponse) {\n TagResourceResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(TagResourceResponse || (TagResourceResponse = {}));\nexport var UnlinkDeveloperIdentityInput;\n(function (UnlinkDeveloperIdentityInput) {\n UnlinkDeveloperIdentityInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(UnlinkDeveloperIdentityInput || (UnlinkDeveloperIdentityInput = {}));\nexport var UnlinkIdentityInput;\n(function (UnlinkIdentityInput) {\n UnlinkIdentityInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(UnlinkIdentityInput || (UnlinkIdentityInput = {}));\nexport var UntagResourceInput;\n(function (UntagResourceInput) {\n UntagResourceInput.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(UntagResourceInput || (UntagResourceInput = {}));\nexport var UntagResourceResponse;\n(function (UntagResourceResponse) {\n UntagResourceResponse.filterSensitiveLog = function (obj) {\n return __assign({}, obj);\n };\n})(UntagResourceResponse || (UntagResourceResponse = {}));","var __awaiter = this && this.__awaiter || function (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};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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};\n/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { ConsoleLogger as Logger } from '../Logger';\nimport { browserOrNode } from '../JS';\nimport { NonRetryableError } from '../Util';\nvar logger = new Logger('CognitoCredentials');\nvar waitForInit = new Promise(function (res, rej) {\n if (!browserOrNode().isBrowser) {\n logger.debug('not in the browser, directly resolved');\n return res();\n }\n var ga = window['gapi'] && window['gapi'].auth2 ? window['gapi'].auth2 : null;\n if (ga) {\n logger.debug('google api already loaded');\n return res();\n } else {\n setTimeout(function () {\n return res();\n }, 2000);\n }\n});\nvar GoogleOAuth = /** @class */function () {\n function GoogleOAuth() {\n this.initialized = false;\n this.refreshGoogleToken = this.refreshGoogleToken.bind(this);\n this._refreshGoogleTokenImpl = this._refreshGoogleTokenImpl.bind(this);\n }\n GoogleOAuth.prototype.refreshGoogleToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!this.initialized) return [3 /*break*/, 2];\n logger.debug('need to wait for the Google SDK loaded');\n return [4 /*yield*/, waitForInit];\n case 1:\n _a.sent();\n this.initialized = true;\n logger.debug('finish waiting');\n _a.label = 2;\n case 2:\n return [2 /*return*/, this._refreshGoogleTokenImpl()];\n }\n });\n });\n };\n GoogleOAuth.prototype._refreshGoogleTokenImpl = function () {\n var ga = null;\n if (browserOrNode().isBrowser) ga = window['gapi'] && window['gapi'].auth2 ? window['gapi'].auth2 : null;\n if (!ga) {\n logger.debug('no gapi auth2 available');\n return Promise.reject('no gapi auth2 available');\n }\n return new Promise(function (res, rej) {\n ga.getAuthInstance().then(function (googleAuth) {\n if (!googleAuth) {\n logger.debug('google Auth undefined');\n rej(new NonRetryableError('google Auth undefined'));\n }\n var googleUser = googleAuth.currentUser.get();\n // refresh the token\n if (googleUser.isSignedIn()) {\n logger.debug('refreshing the google access token');\n googleUser.reloadAuthResponse().then(function (authResponse) {\n var id_token = authResponse.id_token,\n expires_at = authResponse.expires_at;\n res({\n token: id_token,\n expires_at: expires_at\n });\n }).catch(function (err) {\n if (err && err.error === 'network_error') {\n // Not using NonRetryableError so handler will be retried\n rej('Network error reloading google auth response');\n } else {\n rej(new NonRetryableError('Failed to reload google auth response'));\n }\n });\n } else {\n rej(new NonRetryableError('User is not signed in with Google'));\n }\n }).catch(function (err) {\n logger.debug('Failed to refresh google token', err);\n rej(new NonRetryableError('Failed to refresh google token'));\n });\n });\n };\n return GoogleOAuth;\n}();\nexport { GoogleOAuth };\n/**\n * @deprecated use named import\n */\nexport default GoogleOAuth;","var __awaiter = this && this.__awaiter || function (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};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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};\n/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { ConsoleLogger as Logger } from '../Logger';\nimport { browserOrNode } from '../JS';\nimport { NonRetryableError } from '../Util';\nvar logger = new Logger('CognitoCredentials');\nvar waitForInit = new Promise(function (res, rej) {\n if (!browserOrNode().isBrowser) {\n logger.debug('not in the browser, directly resolved');\n return res();\n }\n var fb = window['FB'];\n if (fb) {\n logger.debug('FB SDK already loaded');\n return res();\n } else {\n setTimeout(function () {\n return res();\n }, 2000);\n }\n});\nvar FacebookOAuth = /** @class */function () {\n function FacebookOAuth() {\n this.initialized = false;\n this.refreshFacebookToken = this.refreshFacebookToken.bind(this);\n this._refreshFacebookTokenImpl = this._refreshFacebookTokenImpl.bind(this);\n }\n FacebookOAuth.prototype.refreshFacebookToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!this.initialized) return [3 /*break*/, 2];\n logger.debug('need to wait for the Facebook SDK loaded');\n return [4 /*yield*/, waitForInit];\n case 1:\n _a.sent();\n this.initialized = true;\n logger.debug('finish waiting');\n _a.label = 2;\n case 2:\n return [2 /*return*/, this._refreshFacebookTokenImpl()];\n }\n });\n });\n };\n FacebookOAuth.prototype._refreshFacebookTokenImpl = function () {\n var fb = null;\n if (browserOrNode().isBrowser) fb = window['FB'];\n if (!fb) {\n var errorMessage = 'no fb sdk available';\n logger.debug(errorMessage);\n return Promise.reject(new NonRetryableError(errorMessage));\n }\n return new Promise(function (res, rej) {\n fb.getLoginStatus(function (fbResponse) {\n if (!fbResponse || !fbResponse.authResponse) {\n var errorMessage = 'no response from facebook when refreshing the jwt token';\n logger.debug(errorMessage);\n // There is no definitive indication for a network error in\n // fbResponse, so we are treating it as an invalid token.\n rej(new NonRetryableError(errorMessage));\n } else {\n var response = fbResponse.authResponse;\n var accessToken = response.accessToken,\n expiresIn = response.expiresIn;\n var date = new Date();\n var expires_at = expiresIn * 1000 + date.getTime();\n if (!accessToken) {\n var errorMessage = 'the jwtToken is undefined';\n logger.debug(errorMessage);\n rej(new NonRetryableError(errorMessage));\n }\n res({\n token: accessToken,\n expires_at: expires_at\n });\n }\n }, {\n scope: 'public_profile,email'\n });\n });\n };\n return FacebookOAuth;\n}();\nexport { FacebookOAuth };\n/**\n * @deprecated use named import\n */\nexport default FacebookOAuth;","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { GoogleOAuth as GoogleOAuthClass } from './GoogleOAuth';\nimport { FacebookOAuth as FacebookOAuthClass } from './FacebookOAuth';\nexport var GoogleOAuth = new GoogleOAuthClass();\nexport var FacebookOAuth = new FacebookOAuthClass();","import { __extends } from \"tslib\";\nimport { GetCredentialsForIdentityInput, GetCredentialsForIdentityResponse } from \"../models/models_0\";\nimport { deserializeAws_json1_1GetCredentialsForIdentityCommand, serializeAws_json1_1GetCredentialsForIdentityCommand } from \"../protocols/Aws_json1_1\";\nimport { getSerdePlugin } from \"@aws-sdk/middleware-serde\";\nimport { Command as $Command } from \"@aws-sdk/smithy-client\";\n/**\n *

Returns credentials for the provided identity ID. Any provided logins will be\n * validated against supported login providers. If the token is for\n * cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service\n * with the appropriate role for the token.

\n *

This is a public API. You do not need any credentials to call this API.

\n */\nvar GetCredentialsForIdentityCommand = /** @class */function (_super) {\n __extends(GetCredentialsForIdentityCommand, _super);\n // Start section: command_properties\n // End section: command_properties\n function GetCredentialsForIdentityCommand(input) {\n var _this =\n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n GetCredentialsForIdentityCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {\n this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));\n var stack = clientStack.concat(this.middlewareStack);\n var logger = configuration.logger;\n var clientName = \"CognitoIdentityClient\";\n var commandName = \"GetCredentialsForIdentityCommand\";\n var handlerExecutionContext = {\n logger: logger,\n clientName: clientName,\n commandName: commandName,\n inputFilterSensitiveLog: GetCredentialsForIdentityInput.filterSensitiveLog,\n outputFilterSensitiveLog: GetCredentialsForIdentityResponse.filterSensitiveLog\n };\n var requestHandler = configuration.requestHandler;\n return stack.resolve(function (request) {\n return requestHandler.handle(request.request, options || {});\n }, handlerExecutionContext);\n };\n GetCredentialsForIdentityCommand.prototype.serialize = function (input, context) {\n return serializeAws_json1_1GetCredentialsForIdentityCommand(input, context);\n };\n GetCredentialsForIdentityCommand.prototype.deserialize = function (output, context) {\n return deserializeAws_json1_1GetCredentialsForIdentityCommand(output, context);\n };\n return GetCredentialsForIdentityCommand;\n}($Command);\nexport { GetCredentialsForIdentityCommand };","import { __extends } from \"tslib\";\n/**\n * An error representing a failure of an individual credential provider.\n *\n * This error class has special meaning to the {@link chain} method. If a\n * provider in the chain is rejected with an error, the chain will only proceed\n * to the next provider if the value of the `tryNextLink` property on the error\n * is truthy. This allows individual providers to halt the chain and also\n * ensures the chain will stop if an entirely unexpected error is encountered.\n */\nvar ProviderError = /** @class */function (_super) {\n __extends(ProviderError, _super);\n function ProviderError(message, tryNextLink) {\n if (tryNextLink === void 0) {\n tryNextLink = true;\n }\n var _this = _super.call(this, message) || this;\n _this.tryNextLink = tryNextLink;\n return _this;\n }\n return ProviderError;\n}(Error);\nexport { ProviderError };","import { __read } from \"tslib\";\n/**\n * @internal\n */\nexport function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce(function (arr, name) {\n var tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n } else {\n arr.push(tokenOrProvider().then(function (token) {\n return [name, token];\n }));\n }\n return arr;\n }, [])).then(function (resolvedPairs) {\n return resolvedPairs.reduce(function (logins, _a) {\n var _b = __read(_a, 2),\n key = _b[0],\n value = _b[1];\n logins[key] = value;\n return logins;\n }, {});\n });\n}","import { __awaiter, __generator } from \"tslib\";\nimport { GetCredentialsForIdentityCommand } from \"@aws-sdk/client-cognito-identity\";\nimport { ProviderError } from \"@aws-sdk/property-provider\";\nimport { resolveLogins } from \"./resolveLogins\";\n/**\n * Retrieves temporary AWS credentials using Amazon Cognito's\n * `GetCredentialsForIdentity` operation.\n *\n * Results from this function call are not cached internally.\n */\nexport function fromCognitoIdentity(parameters) {\n var _this = this;\n return function () {\n return __awaiter(_this, void 0, void 0, function () {\n var _a, _b, _c, AccessKeyId, Expiration, _d, SecretKey, SessionToken, _e, _f, _g, _h;\n var _j;\n return __generator(this, function (_k) {\n switch (_k.label) {\n case 0:\n _f = (_e = parameters.client).send;\n _g = GetCredentialsForIdentityCommand.bind;\n _j = {\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId\n };\n if (!parameters.logins) return [3 /*break*/, 2];\n return [4 /*yield*/, resolveLogins(parameters.logins)];\n case 1:\n _h = _k.sent();\n return [3 /*break*/, 3];\n case 2:\n _h = undefined;\n _k.label = 3;\n case 3:\n return [4 /*yield*/, _f.apply(_e, [new (_g.apply(GetCredentialsForIdentityCommand, [void 0, (_j.Logins = _h, _j)]))()])];\n case 4:\n _a = _k.sent().Credentials, _b = _a === void 0 ? throwOnMissingCredentials() : _a, _c = _b.AccessKeyId, AccessKeyId = _c === void 0 ? throwOnMissingAccessKeyId() : _c, Expiration = _b.Expiration, _d = _b.SecretKey, SecretKey = _d === void 0 ? throwOnMissingSecretKey() : _d, SessionToken = _b.SessionToken;\n return [2 /*return*/, {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration\n }];\n }\n });\n });\n };\n}\nfunction throwOnMissingAccessKeyId() {\n throw new ProviderError(\"Response from Amazon Cognito contained no access key ID\");\n}\nfunction throwOnMissingCredentials() {\n throw new ProviderError(\"Response from Amazon Cognito contained no credentials\");\n}\nfunction throwOnMissingSecretKey() {\n throw new ProviderError(\"Response from Amazon Cognito contained no secret key\");\n}","import { __extends } from \"tslib\";\nimport { GetIdInput, GetIdResponse } from \"../models/models_0\";\nimport { deserializeAws_json1_1GetIdCommand, serializeAws_json1_1GetIdCommand } from \"../protocols/Aws_json1_1\";\nimport { getSerdePlugin } from \"@aws-sdk/middleware-serde\";\nimport { Command as $Command } from \"@aws-sdk/smithy-client\";\n/**\n *

Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an\n * implicit linked account.

\n *

This is a public API. You do not need any credentials to call this API.

\n */\nvar GetIdCommand = /** @class */function (_super) {\n __extends(GetIdCommand, _super);\n // Start section: command_properties\n // End section: command_properties\n function GetIdCommand(input) {\n var _this =\n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }\n /**\n * @internal\n */\n GetIdCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {\n this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));\n var stack = clientStack.concat(this.middlewareStack);\n var logger = configuration.logger;\n var clientName = \"CognitoIdentityClient\";\n var commandName = \"GetIdCommand\";\n var handlerExecutionContext = {\n logger: logger,\n clientName: clientName,\n commandName: commandName,\n inputFilterSensitiveLog: GetIdInput.filterSensitiveLog,\n outputFilterSensitiveLog: GetIdResponse.filterSensitiveLog\n };\n var requestHandler = configuration.requestHandler;\n return stack.resolve(function (request) {\n return requestHandler.handle(request.request, options || {});\n }, handlerExecutionContext);\n };\n GetIdCommand.prototype.serialize = function (input, context) {\n return serializeAws_json1_1GetIdCommand(input, context);\n };\n GetIdCommand.prototype.deserialize = function (output, context) {\n return deserializeAws_json1_1GetIdCommand(output, context);\n };\n return GetIdCommand;\n}($Command);\nexport { GetIdCommand };","var STORE_NAME = \"IdentityIds\";\nvar IndexedDbStorage = /** @class */function () {\n function IndexedDbStorage(dbName) {\n if (dbName === void 0) {\n dbName = \"aws:cognito-identity-ids\";\n }\n this.dbName = dbName;\n }\n IndexedDbStorage.prototype.getItem = function (key) {\n return this.withObjectStore(\"readonly\", function (store) {\n var req = store.get(key);\n return new Promise(function (resolve) {\n req.onerror = function () {\n return resolve(null);\n };\n req.onsuccess = function () {\n return resolve(req.result ? req.result.value : null);\n };\n });\n }).catch(function () {\n return null;\n });\n };\n IndexedDbStorage.prototype.removeItem = function (key) {\n return this.withObjectStore(\"readwrite\", function (store) {\n var req = store.delete(key);\n return new Promise(function (resolve, reject) {\n req.onerror = function () {\n return reject(req.error);\n };\n req.onsuccess = function () {\n return resolve();\n };\n });\n });\n };\n IndexedDbStorage.prototype.setItem = function (id, value) {\n return this.withObjectStore(\"readwrite\", function (store) {\n var req = store.put({\n id: id,\n value: value\n });\n return new Promise(function (resolve, reject) {\n req.onerror = function () {\n return reject(req.error);\n };\n req.onsuccess = function () {\n return resolve();\n };\n });\n });\n };\n IndexedDbStorage.prototype.getDb = function () {\n var openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise(function (resolve, reject) {\n openDbRequest.onsuccess = function () {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = function () {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = function () {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = function () {\n var db = openDbRequest.result;\n db.onerror = function () {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, {\n keyPath: \"id\"\n });\n };\n });\n };\n IndexedDbStorage.prototype.withObjectStore = function (mode, action) {\n return this.getDb().then(function (db) {\n var tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = function () {\n return db.close();\n };\n return new Promise(function (resolve, reject) {\n tx.onerror = function () {\n return reject(tx.error);\n };\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch(function (err) {\n db.close();\n throw err;\n });\n });\n };\n return IndexedDbStorage;\n}();\nexport { IndexedDbStorage };","import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nvar inMemoryStorage = new InMemoryStorage();\nexport function localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}","var InMemoryStorage = /** @class */function () {\n function InMemoryStorage(store) {\n if (store === void 0) {\n store = {};\n }\n this.store = store;\n }\n InMemoryStorage.prototype.getItem = function (key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n };\n InMemoryStorage.prototype.removeItem = function (key) {\n delete this.store[key];\n };\n InMemoryStorage.prototype.setItem = function (key, value) {\n this.store[key] = value;\n };\n return InMemoryStorage;\n}();\nexport { InMemoryStorage };","import { __awaiter, __generator } from \"tslib\";\nimport { GetIdCommand } from \"@aws-sdk/client-cognito-identity\";\nimport { ProviderError } from \"@aws-sdk/property-provider\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\n/**\n * Retrieves or generates a unique identifier using Amazon Cognito's `GetId`\n * operation, then generates temporary AWS credentials using Amazon Cognito's\n * `GetCredentialsForIdentity` operation.\n *\n * Results from `GetId` are cached internally, but results from\n * `GetCredentialsForIdentity` are not.\n */\nexport function fromCognitoIdentityPool(_a) {\n var _this = this;\n var accountId = _a.accountId,\n _b = _a.cache,\n cache = _b === void 0 ? localStorage() : _b,\n client = _a.client,\n customRoleArn = _a.customRoleArn,\n identityPoolId = _a.identityPoolId,\n logins = _a.logins,\n _c = _a.userIdentifier,\n userIdentifier = _c === void 0 ? !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined : _c;\n var cacheKey = userIdentifier ? \"aws:cognito-identity-credentials:\" + identityPoolId + \":\" + userIdentifier : undefined;\n var _provider = function provider() {\n return __awaiter(_this, void 0, void 0, function () {\n var identityId, _a, _b, IdentityId, _c, _d, _e, _f;\n var _g;\n return __generator(this, function (_h) {\n switch (_h.label) {\n case 0:\n _a = cacheKey;\n if (!_a) return [3 /*break*/, 2];\n return [4 /*yield*/, cache.getItem(cacheKey)];\n case 1:\n _a = _h.sent();\n _h.label = 2;\n case 2:\n identityId = _a;\n if (!!identityId) return [3 /*break*/, 7];\n _d = (_c = client).send;\n _e = GetIdCommand.bind;\n _g = {\n AccountId: accountId,\n IdentityPoolId: identityPoolId\n };\n if (!logins) return [3 /*break*/, 4];\n return [4 /*yield*/, resolveLogins(logins)];\n case 3:\n _f = _h.sent();\n return [3 /*break*/, 5];\n case 4:\n _f = undefined;\n _h.label = 5;\n case 5:\n return [4 /*yield*/, _d.apply(_c, [new (_e.apply(GetIdCommand, [void 0, (_g.Logins = _f, _g)]))()])];\n case 6:\n _b = _h.sent().IdentityId, IdentityId = _b === void 0 ? throwOnMissingId() : _b;\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(function () {});\n }\n _h.label = 7;\n case 7:\n _provider = fromCognitoIdentity({\n client: client,\n customRoleArn: customRoleArn,\n logins: logins,\n identityId: identityId\n });\n return [2 /*return*/, _provider()];\n }\n });\n });\n };\n return function () {\n return _provider().catch(function (err) {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(function () {});\n }\n throw err;\n });\n });\n });\n };\n}\nfunction throwOnMissingId() {\n throw new ProviderError(\"Response from Amazon Cognito contained no identity ID\");\n}","import { __assign } from \"tslib\";\n// Partition default templates\nvar AWS_TEMPLATE = \"cognito-identity.{region}.amazonaws.com\";\nvar AWS_CN_TEMPLATE = \"cognito-identity.{region}.amazonaws.com.cn\";\nvar AWS_ISO_TEMPLATE = \"cognito-identity.{region}.c2s.ic.gov\";\nvar AWS_ISO_B_TEMPLATE = \"cognito-identity.{region}.sc2s.sgov.gov\";\nvar AWS_US_GOV_TEMPLATE = \"cognito-identity.{region}.amazonaws.com\";\n// Partition regions\nvar AWS_REGIONS = new Set([\"af-south-1\", \"ap-east-1\", \"ap-northeast-1\", \"ap-northeast-2\", \"ap-south-1\", \"ap-southeast-1\", \"ap-southeast-2\", \"ca-central-1\", \"eu-central-1\", \"eu-north-1\", \"eu-south-1\", \"eu-west-1\", \"eu-west-2\", \"eu-west-3\", \"me-south-1\", \"sa-east-1\", \"us-east-1\", \"us-east-2\", \"us-west-1\", \"us-west-2\"]);\nvar AWS_CN_REGIONS = new Set([\"cn-north-1\", \"cn-northwest-1\"]);\nvar AWS_ISO_REGIONS = new Set([\"us-iso-east-1\"]);\nvar AWS_ISO_B_REGIONS = new Set([\"us-isob-east-1\"]);\nvar AWS_US_GOV_REGIONS = new Set([\"us-gov-east-1\", \"us-gov-west-1\"]);\nexport var defaultRegionInfoProvider = function defaultRegionInfoProvider(region, options) {\n var regionInfo = undefined;\n switch (region) {\n // First, try to match exact region names.\n case \"ap-northeast-1\":\n regionInfo = {\n hostname: \"cognito-identity.ap-northeast-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"ap-northeast-2\":\n regionInfo = {\n hostname: \"cognito-identity.ap-northeast-2.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"ap-south-1\":\n regionInfo = {\n hostname: \"cognito-identity.ap-south-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"ap-southeast-1\":\n regionInfo = {\n hostname: \"cognito-identity.ap-southeast-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"ap-southeast-2\":\n regionInfo = {\n hostname: \"cognito-identity.ap-southeast-2.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"ca-central-1\":\n regionInfo = {\n hostname: \"cognito-identity.ca-central-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"cn-north-1\":\n regionInfo = {\n hostname: \"cognito-identity.cn-north-1.amazonaws.com.cn\",\n partition: \"aws-cn\"\n };\n break;\n case \"eu-central-1\":\n regionInfo = {\n hostname: \"cognito-identity.eu-central-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"eu-north-1\":\n regionInfo = {\n hostname: \"cognito-identity.eu-north-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"eu-west-1\":\n regionInfo = {\n hostname: \"cognito-identity.eu-west-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"eu-west-2\":\n regionInfo = {\n hostname: \"cognito-identity.eu-west-2.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"eu-west-3\":\n regionInfo = {\n hostname: \"cognito-identity.eu-west-3.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"fips-us-east-1\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-east-1.amazonaws.com\",\n partition: \"aws\",\n signingRegion: \"us-east-1\"\n };\n break;\n case \"fips-us-east-2\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-east-2.amazonaws.com\",\n partition: \"aws\",\n signingRegion: \"us-east-2\"\n };\n break;\n case \"fips-us-gov-west-1\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-gov-west-1.amazonaws.com\",\n partition: \"aws-us-gov\",\n signingRegion: \"us-gov-west-1\"\n };\n break;\n case \"fips-us-west-2\":\n regionInfo = {\n hostname: \"cognito-identity-fips.us-west-2.amazonaws.com\",\n partition: \"aws\",\n signingRegion: \"us-west-2\"\n };\n break;\n case \"sa-east-1\":\n regionInfo = {\n hostname: \"cognito-identity.sa-east-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"us-east-1\":\n regionInfo = {\n hostname: \"cognito-identity.us-east-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"us-east-2\":\n regionInfo = {\n hostname: \"cognito-identity.us-east-2.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"us-gov-west-1\":\n regionInfo = {\n hostname: \"cognito-identity.us-gov-west-1.amazonaws.com\",\n partition: \"aws-us-gov\"\n };\n break;\n case \"us-west-1\":\n regionInfo = {\n hostname: \"cognito-identity.us-west-1.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n case \"us-west-2\":\n regionInfo = {\n hostname: \"cognito-identity.us-west-2.amazonaws.com\",\n partition: \"aws\"\n };\n break;\n // Next, try to match partition endpoints.\n default:\n if (AWS_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws\"\n };\n }\n if (AWS_CN_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_CN_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-cn\"\n };\n }\n if (AWS_ISO_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_ISO_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-iso\"\n };\n }\n if (AWS_ISO_B_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_ISO_B_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-iso-b\"\n };\n }\n if (AWS_US_GOV_REGIONS.has(region)) {\n regionInfo = {\n hostname: AWS_US_GOV_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws-us-gov\"\n };\n }\n // Finally, assume it's an AWS partition endpoint.\n if (regionInfo === undefined) {\n regionInfo = {\n hostname: AWS_TEMPLATE.replace(\"{region}\", region),\n partition: \"aws\"\n };\n }\n }\n return Promise.resolve(__assign({\n signingService: \"cognito-identity\"\n }, regionInfo));\n};","import { defaultRegionInfoProvider } from \"./endpoints\";\nimport { parseUrl } from \"@aws-sdk/url-parser\";\n/**\n * @internal\n */\nexport var ClientSharedValues = {\n apiVersion: \"2014-06-30\",\n disableHostPrefix: false,\n logger: {},\n regionInfoProvider: defaultRegionInfoProvider,\n serviceId: \"Cognito Identity\",\n urlParser: parseUrl\n};","import { __assign } from \"tslib\";\nimport packageInfo from \"./package.json\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { FetchHttpHandler, streamCollector } from \"@aws-sdk/fetch-http-handler\";\nimport { invalidProvider } from \"@aws-sdk/invalid-dependency\";\nimport { DEFAULT_MAX_ATTEMPTS } from \"@aws-sdk/middleware-retry\";\nimport { fromBase64, toBase64 } from \"@aws-sdk/util-base64-browser\";\nimport { calculateBodyLength } from \"@aws-sdk/util-body-length-browser\";\nimport { defaultUserAgent } from \"@aws-sdk/util-user-agent-browser\";\nimport { fromUtf8, toUtf8 } from \"@aws-sdk/util-utf8-browser\";\nimport { ClientSharedValues } from \"./runtimeConfig.shared\";\n/**\n * @internal\n */\nexport var ClientDefaultValues = __assign(__assign({}, ClientSharedValues), {\n runtime: \"browser\",\n base64Decoder: fromBase64,\n base64Encoder: toBase64,\n bodyLengthChecker: calculateBodyLength,\n credentialDefaultProvider: function credentialDefaultProvider(_) {\n return function () {\n return Promise.reject(new Error(\"Credential is missing\"));\n };\n },\n defaultUserAgentProvider: defaultUserAgent({\n serviceId: ClientSharedValues.serviceId,\n clientVersion: packageInfo.version\n }),\n maxAttempts: DEFAULT_MAX_ATTEMPTS,\n region: invalidProvider(\"Region is missing\"),\n requestHandler: new FetchHttpHandler(),\n sha256: Sha256,\n streamCollector: streamCollector,\n utf8Decoder: fromUtf8,\n utf8Encoder: toUtf8\n});","import { __assign, __extends } from \"tslib\";\nimport { ClientDefaultValues as __ClientDefaultValues } from \"./runtimeConfig\";\nimport { resolveEndpointsConfig, resolveRegionConfig } from \"@aws-sdk/config-resolver\";\nimport { getContentLengthPlugin } from \"@aws-sdk/middleware-content-length\";\nimport { getHostHeaderPlugin, resolveHostHeaderConfig } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRetryPlugin, resolveRetryConfig } from \"@aws-sdk/middleware-retry\";\nimport { resolveAwsAuthConfig } from \"@aws-sdk/middleware-signing\";\nimport { getUserAgentPlugin, resolveUserAgentConfig } from \"@aws-sdk/middleware-user-agent\";\nimport { Client as __Client } from \"@aws-sdk/smithy-client\";\n/**\n * Amazon Cognito Federated Identities\n *

Amazon Cognito Federated Identities is a web service that delivers scoped temporary\n * credentials to mobile devices and other untrusted environments. It uniquely identifies a\n * device and supplies the user with a consistent identity over the lifetime of an\n * application.

\n *

Using Amazon Cognito Federated Identities, you can enable authentication with one or\n * more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon\n * Cognito user pool, and you can also choose to support unauthenticated access from your app.\n * Cognito delivers a unique identifier for each user and acts as an OpenID token provider\n * trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS\n * credentials.

\n *

For a description of the authentication flow from the Amazon Cognito Developer Guide\n * see Authentication Flow.

\n *

For more information see Amazon Cognito Federated Identities.

\n */\nvar CognitoIdentityClient = /** @class */function (_super) {\n __extends(CognitoIdentityClient, _super);\n function CognitoIdentityClient(configuration) {\n var _this = this;\n var _config_0 = __assign(__assign({}, __ClientDefaultValues), configuration);\n var _config_1 = resolveRegionConfig(_config_0);\n var _config_2 = resolveEndpointsConfig(_config_1);\n var _config_3 = resolveAwsAuthConfig(_config_2);\n var _config_4 = resolveRetryConfig(_config_3);\n var _config_5 = resolveHostHeaderConfig(_config_4);\n var _config_6 = resolveUserAgentConfig(_config_5);\n _this = _super.call(this, _config_6) || this;\n _this.config = _config_6;\n _this.middlewareStack.use(getRetryPlugin(_this.config));\n _this.middlewareStack.use(getContentLengthPlugin(_this.config));\n _this.middlewareStack.use(getHostHeaderPlugin(_this.config));\n _this.middlewareStack.use(getLoggerPlugin(_this.config));\n _this.middlewareStack.use(getUserAgentPlugin(_this.config));\n return _this;\n }\n CognitoIdentityClient.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return CognitoIdentityClient;\n}(__Client);\nexport { CognitoIdentityClient };","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (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 __assign.apply(this, arguments);\n};\nvar __awaiter = this && this.__awaiter || function (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};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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};\nimport { ConsoleLogger as Logger } from './Logger';\nimport { StorageHelper } from './StorageHelper';\nimport { makeQuerablePromise } from './JS';\nimport { FacebookOAuth, GoogleOAuth } from './OAuthHelper';\nimport { jitteredExponentialRetry } from './Util';\nimport { getAmplifyUserAgent } from './Platform';\nimport { Amplify } from './Amplify';\nimport { fromCognitoIdentity, fromCognitoIdentityPool } from '@aws-sdk/credential-provider-cognito-identity';\nimport { CognitoIdentityClient, GetIdCommand } from '@aws-sdk/client-cognito-identity';\nvar logger = new Logger('Credentials');\nvar CREDENTIALS_TTL = 50 * 60 * 1000; // 50 min, can be modified on config if required in the future\nvar CredentialsClass = /** @class */function () {\n function CredentialsClass(config) {\n this._gettingCredPromise = null;\n this._refreshHandlers = {};\n // Allow `Auth` to be injected for SSR, but Auth isn't a required dependency for Credentials\n this.Auth = undefined;\n this.configure(config);\n this._refreshHandlers['google'] = GoogleOAuth.refreshGoogleToken;\n this._refreshHandlers['facebook'] = FacebookOAuth.refreshFacebookToken;\n }\n CredentialsClass.prototype.getModuleName = function () {\n return 'Credentials';\n };\n CredentialsClass.prototype.getCredSource = function () {\n return this._credentials_source;\n };\n CredentialsClass.prototype.configure = function (config) {\n if (!config) return this._config || {};\n this._config = Object.assign({}, this._config, config);\n var refreshHandlers = this._config.refreshHandlers;\n // If the developer has provided an object of refresh handlers,\n // then we can merge the provided handlers with the current handlers.\n if (refreshHandlers) {\n this._refreshHandlers = __assign(__assign({}, this._refreshHandlers), refreshHandlers);\n }\n this._storage = this._config.storage;\n if (!this._storage) {\n this._storage = new StorageHelper().getStorage();\n }\n this._storageSync = Promise.resolve();\n if (typeof this._storage['sync'] === 'function') {\n this._storageSync = this._storage['sync']();\n }\n return this._config;\n };\n CredentialsClass.prototype.get = function () {\n logger.debug('getting credentials');\n return this._pickupCredentials();\n };\n CredentialsClass.prototype._pickupCredentials = function () {\n logger.debug('picking up credentials');\n if (!this._gettingCredPromise || !this._gettingCredPromise.isPending()) {\n logger.debug('getting new cred promise');\n this._gettingCredPromise = makeQuerablePromise(this._keepAlive());\n } else {\n logger.debug('getting old cred promise');\n }\n return this._gettingCredPromise;\n };\n CredentialsClass.prototype._keepAlive = function () {\n return __awaiter(this, void 0, void 0, function () {\n var cred, _a, Auth, user_1, session, refreshToken_1, refreshRequest, err_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n logger.debug('checking if credentials exists and not expired');\n cred = this._credentials;\n if (cred && !this._isExpired(cred) && !this._isPastTTL()) {\n logger.debug('credentials not changed and not expired, directly return');\n return [2 /*return*/, Promise.resolve(cred)];\n }\n logger.debug('need to get a new credential or refresh the existing one');\n _a = this.Auth, Auth = _a === void 0 ? Amplify.Auth : _a;\n if (!Auth || typeof Auth.currentUserCredentials !== 'function') {\n return [2 /*return*/, Promise.reject('No Auth module registered in Amplify')];\n }\n if (!(!this._isExpired(cred) && this._isPastTTL())) return [3 /*break*/, 6];\n logger.debug('ttl has passed but token is not yet expired');\n _b.label = 1;\n case 1:\n _b.trys.push([1, 5,, 6]);\n return [4 /*yield*/, Auth.currentUserPoolUser()];\n case 2:\n user_1 = _b.sent();\n return [4 /*yield*/, Auth.currentSession()];\n case 3:\n session = _b.sent();\n refreshToken_1 = session.refreshToken;\n refreshRequest = new Promise(function (res, rej) {\n user_1.refreshSession(refreshToken_1, function (err, data) {\n return err ? rej(err) : res(data);\n });\n });\n return [4 /*yield*/, refreshRequest];\n case 4:\n _b.sent(); // note that rejections will be caught and handled in the catch block.\n return [3 /*break*/, 6];\n case 5:\n err_1 = _b.sent();\n // should not throw because user might just be on guest access or is authenticated through federation\n logger.debug('Error attempting to refreshing the session', err_1);\n return [3 /*break*/, 6];\n case 6:\n return [2 /*return*/, Auth.currentUserCredentials()];\n }\n });\n });\n };\n CredentialsClass.prototype.refreshFederatedToken = function (federatedInfo) {\n logger.debug('Getting federated credentials');\n var provider = federatedInfo.provider,\n user = federatedInfo.user,\n token = federatedInfo.token,\n identity_id = federatedInfo.identity_id;\n var expires_at = federatedInfo.expires_at;\n // Make sure expires_at is in millis\n expires_at = new Date(expires_at).getFullYear() === 1970 ? expires_at * 1000 : expires_at;\n var that = this;\n logger.debug('checking if federated jwt token expired');\n if (expires_at > new Date().getTime()) {\n // if not expired\n logger.debug('token not expired');\n return this._setCredentialsFromFederation({\n provider: provider,\n token: token,\n user: user,\n identity_id: identity_id,\n expires_at: expires_at\n });\n } else {\n // if refresh handler exists\n if (that._refreshHandlers[provider] && typeof that._refreshHandlers[provider] === 'function') {\n logger.debug('getting refreshed jwt token from federation provider');\n return this._providerRefreshWithRetry({\n refreshHandler: that._refreshHandlers[provider],\n provider: provider,\n user: user\n });\n } else {\n logger.debug('no refresh handler for provider:', provider);\n this.clear();\n return Promise.reject('no refresh handler for provider');\n }\n }\n };\n CredentialsClass.prototype._providerRefreshWithRetry = function (_a) {\n var _this = this;\n var refreshHandler = _a.refreshHandler,\n provider = _a.provider,\n user = _a.user;\n var MAX_DELAY_MS = 10 * 1000;\n // refreshHandler will retry network errors, otherwise it will\n // return NonRetryableError to break out of jitteredExponentialRetry\n return jitteredExponentialRetry(refreshHandler, [], MAX_DELAY_MS).then(function (data) {\n logger.debug('refresh federated token sucessfully', data);\n return _this._setCredentialsFromFederation({\n provider: provider,\n token: data.token,\n user: user,\n identity_id: data.identity_id,\n expires_at: data.expires_at\n });\n }).catch(function (e) {\n var isNetworkError = typeof e === 'string' && e.toLowerCase().lastIndexOf('network error', e.length) === 0;\n if (!isNetworkError) {\n _this.clear();\n }\n logger.debug('refresh federated token failed', e);\n return Promise.reject('refreshing federation token failed: ' + e);\n });\n };\n CredentialsClass.prototype._isExpired = function (credentials) {\n if (!credentials) {\n logger.debug('no credentials for expiration check');\n return true;\n }\n logger.debug('are these credentials expired?', credentials);\n var ts = Date.now();\n /* returns date object.\n https://github.com/aws/aws-sdk-js-v3/blob/v1.0.0-beta.1/packages/types/src/credentials.ts#L26\n */\n var expiration = credentials.expiration;\n return expiration.getTime() <= ts;\n };\n CredentialsClass.prototype._isPastTTL = function () {\n return this._nextCredentialsRefresh <= Date.now();\n };\n CredentialsClass.prototype._setCredentialsForGuest = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, identityPoolId, region, mandatorySignIn, identityId, e_1, cognitoClient, credentials, cognitoIdentityParams, credentialsProvider;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n logger.debug('setting credentials for guest');\n _a = this._config, identityPoolId = _a.identityPoolId, region = _a.region, mandatorySignIn = _a.mandatorySignIn;\n if (mandatorySignIn) {\n return [2 /*return*/, Promise.reject('cannot get guest credentials when mandatory signin enabled')];\n }\n if (!identityPoolId) {\n logger.debug('No Cognito Identity pool provided for unauthenticated access');\n return [2 /*return*/, Promise.reject('No Cognito Identity pool provided for unauthenticated access')];\n }\n if (!region) {\n logger.debug('region is not configured for getting the credentials');\n return [2 /*return*/, Promise.reject('region is not configured for getting the credentials')];\n }\n identityId = undefined;\n _b.label = 1;\n case 1:\n _b.trys.push([1, 3,, 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _b.sent();\n identityId = this._storage.getItem('CognitoIdentityId-' + identityPoolId);\n this._identityId = identityId;\n return [3 /*break*/, 4];\n case 3:\n e_1 = _b.sent();\n logger.debug('Failed to get the cached identityId', e_1);\n return [3 /*break*/, 4];\n case 4:\n cognitoClient = new CognitoIdentityClient({\n region: region,\n customUserAgent: getAmplifyUserAgent()\n });\n credentials = undefined;\n if (identityId) {\n cognitoIdentityParams = {\n identityId: identityId,\n client: cognitoClient\n };\n credentials = fromCognitoIdentity(cognitoIdentityParams)();\n } else {\n credentialsProvider = function credentialsProvider() {\n return __awaiter(_this, void 0, void 0, function () {\n var IdentityId, cognitoIdentityParams, credentialsFromCognitoIdentity;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, cognitoClient.send(new GetIdCommand({\n IdentityPoolId: identityPoolId\n }))];\n case 1:\n IdentityId = _a.sent().IdentityId;\n this._identityId = IdentityId;\n cognitoIdentityParams = {\n client: cognitoClient,\n identityId: IdentityId\n };\n credentialsFromCognitoIdentity = fromCognitoIdentity(cognitoIdentityParams);\n return [2 /*return*/, credentialsFromCognitoIdentity()];\n }\n });\n });\n };\n credentials = credentialsProvider().catch(function (err) {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n throw err;\n });\n });\n });\n }\n return [2 /*return*/, this._loadCredentials(credentials, 'guest', false, null).then(function (res) {\n return res;\n }).catch(function (e) {\n return __awaiter(_this, void 0, void 0, function () {\n var credentialsProvider;\n var _this = this;\n return __generator(this, function (_a) {\n // If identity id is deleted in the console, we make one attempt to recreate it\n // and remove existing id from cache.\n if (e.name === 'ResourceNotFoundException' && e.message === \"Identity '\" + identityId + \"' not found.\") {\n logger.debug('Failed to load guest credentials');\n this._storage.removeItem('CognitoIdentityId-' + identityPoolId);\n credentialsProvider = function credentialsProvider() {\n return __awaiter(_this, void 0, void 0, function () {\n var IdentityId, cognitoIdentityParams, credentialsFromCognitoIdentity;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, cognitoClient.send(new GetIdCommand({\n IdentityPoolId: identityPoolId\n }))];\n case 1:\n IdentityId = _a.sent().IdentityId;\n this._identityId = IdentityId;\n cognitoIdentityParams = {\n client: cognitoClient,\n identityId: IdentityId\n };\n credentialsFromCognitoIdentity = fromCognitoIdentity(cognitoIdentityParams);\n return [2 /*return*/, credentialsFromCognitoIdentity()];\n }\n });\n });\n };\n credentials = credentialsProvider().catch(function (err) {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n throw err;\n });\n });\n });\n return [2 /*return*/, this._loadCredentials(credentials, 'guest', false, null)];\n } else {\n return [2 /*return*/, e];\n }\n return [2 /*return*/];\n });\n });\n })];\n }\n });\n });\n };\n CredentialsClass.prototype._setCredentialsFromFederation = function (params) {\n var provider = params.provider,\n token = params.token,\n identity_id = params.identity_id;\n var domains = {\n google: 'accounts.google.com',\n facebook: 'graph.facebook.com',\n amazon: 'www.amazon.com',\n developer: 'cognito-identity.amazonaws.com'\n };\n // Use custom provider url instead of the predefined ones\n var domain = domains[provider] || provider;\n if (!domain) {\n return Promise.reject('You must specify a federated provider');\n }\n var logins = {};\n logins[domain] = token;\n var _a = this._config,\n identityPoolId = _a.identityPoolId,\n region = _a.region;\n if (!identityPoolId) {\n logger.debug('No Cognito Federated Identity pool provided');\n return Promise.reject('No Cognito Federated Identity pool provided');\n }\n if (!region) {\n logger.debug('region is not configured for getting the credentials');\n return Promise.reject('region is not configured for getting the credentials');\n }\n var cognitoClient = new CognitoIdentityClient({\n region: region,\n customUserAgent: getAmplifyUserAgent()\n });\n var credentials = undefined;\n if (identity_id) {\n var cognitoIdentityParams = {\n identityId: identity_id,\n logins: logins,\n client: cognitoClient\n };\n credentials = fromCognitoIdentity(cognitoIdentityParams)();\n } else {\n var cognitoIdentityParams = {\n logins: logins,\n identityPoolId: identityPoolId,\n client: cognitoClient\n };\n credentials = fromCognitoIdentityPool(cognitoIdentityParams)();\n }\n return this._loadCredentials(credentials, 'federated', true, params);\n };\n CredentialsClass.prototype._setCredentialsFromSession = function (session) {\n var _this = this;\n logger.debug('set credentials from session');\n var idToken = session.getIdToken().getJwtToken();\n var _a = this._config,\n region = _a.region,\n userPoolId = _a.userPoolId,\n identityPoolId = _a.identityPoolId;\n if (!identityPoolId) {\n logger.debug('No Cognito Federated Identity pool provided');\n return Promise.reject('No Cognito Federated Identity pool provided');\n }\n if (!region) {\n logger.debug('region is not configured for getting the credentials');\n return Promise.reject('region is not configured for getting the credentials');\n }\n var key = 'cognito-idp.' + region + '.amazonaws.com/' + userPoolId;\n var logins = {};\n logins[key] = idToken;\n var cognitoClient = new CognitoIdentityClient({\n region: region,\n customUserAgent: getAmplifyUserAgent()\n });\n /*\n Retreiving identityId with GetIdCommand to mimic the behavior in the following code in aws-sdk-v3:\n https://git.io/JeDxU\n Note: Retreive identityId from CredentialsProvider once aws-sdk-js v3 supports this.\n */\n var credentialsProvider = function credentialsProvider() {\n return __awaiter(_this, void 0, void 0, function () {\n var IdentityId, cognitoIdentityParams, credentialsFromCognitoIdentity;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, cognitoClient.send(new GetIdCommand({\n IdentityPoolId: identityPoolId,\n Logins: logins\n }))];\n case 1:\n IdentityId = _a.sent().IdentityId;\n this._identityId = IdentityId;\n cognitoIdentityParams = {\n client: cognitoClient,\n logins: logins,\n identityId: IdentityId\n };\n credentialsFromCognitoIdentity = fromCognitoIdentity(cognitoIdentityParams);\n return [2 /*return*/, credentialsFromCognitoIdentity()];\n }\n });\n });\n };\n var credentials = credentialsProvider().catch(function (err) {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n throw err;\n });\n });\n });\n return this._loadCredentials(credentials, 'userPool', true, null);\n };\n CredentialsClass.prototype._loadCredentials = function (credentials, source, authenticated, info) {\n var _this = this;\n var that = this;\n var identityPoolId = this._config.identityPoolId;\n return new Promise(function (res, rej) {\n credentials.then(function (credentials) {\n return __awaiter(_this, void 0, void 0, function () {\n var user, provider, token, expires_at, identity_id, e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n logger.debug('Load credentials successfully', credentials);\n if (this._identityId && !credentials.identityId) {\n credentials['identityId'] = this._identityId;\n }\n that._credentials = credentials;\n that._credentials.authenticated = authenticated;\n that._credentials_source = source;\n that._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n if (source === 'federated') {\n user = Object.assign({\n id: this._credentials.identityId\n }, info.user);\n provider = info.provider, token = info.token, expires_at = info.expires_at, identity_id = info.identity_id;\n try {\n this._storage.setItem('aws-amplify-federatedInfo', JSON.stringify({\n provider: provider,\n token: token,\n user: user,\n expires_at: expires_at,\n identity_id: identity_id\n }));\n } catch (e) {\n logger.debug('Failed to put federated info into auth storage', e);\n }\n }\n if (!(source === 'guest')) return [3 /*break*/, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3,, 4]);\n return [4 /*yield*/, this._storageSync];\n case 2:\n _a.sent();\n this._storage.setItem('CognitoIdentityId-' + identityPoolId, credentials.identityId // TODO: IdentityId is currently not returned by fromCognitoIdentityPool()\n );\n return [3 /*break*/, 4];\n case 3:\n e_2 = _a.sent();\n logger.debug('Failed to cache identityId', e_2);\n return [3 /*break*/, 4];\n case 4:\n res(that._credentials);\n return [2 /*return*/];\n }\n });\n });\n }).catch(function (err) {\n if (err) {\n logger.debug('Failed to load credentials', credentials);\n logger.debug('Error loading credentials', err);\n rej(err);\n return;\n }\n });\n });\n };\n CredentialsClass.prototype.set = function (params, source) {\n if (source === 'session') {\n return this._setCredentialsFromSession(params);\n } else if (source === 'federation') {\n return this._setCredentialsFromFederation(params);\n } else if (source === 'guest') {\n return this._setCredentialsForGuest();\n } else {\n logger.debug('no source specified for setting credentials');\n return Promise.reject('invalid source');\n }\n };\n CredentialsClass.prototype.clear = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this._credentials = null;\n this._credentials_source = null;\n logger.debug('removing aws-amplify-federatedInfo from storage');\n this._storage.removeItem('aws-amplify-federatedInfo');\n return [2 /*return*/];\n });\n });\n };\n /**\n * Compact version of credentials\n * @param {Object} credentials\n * @return {Object} - Credentials\n */\n CredentialsClass.prototype.shear = function (credentials) {\n return {\n accessKeyId: credentials.accessKeyId,\n sessionToken: credentials.sessionToken,\n secretAccessKey: credentials.secretAccessKey,\n identityId: credentials.identityId,\n authenticated: credentials.authenticated\n };\n };\n return CredentialsClass;\n}();\nexport { CredentialsClass };\nexport var Credentials = new CredentialsClass(null);\nAmplify.register(Credentials);\n/**\n * @deprecated use named import\n */\nexport default Credentials;","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (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 __assign.apply(this, arguments);\n};\nvar __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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};\nvar __spread = this && this.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { ConsoleLogger as Logger } from './Logger';\nvar logger = new Logger('Hub');\nvar AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol.for === 'function' ? Symbol.for('amplify_default') : '@@amplify_default';\nfunction isLegacyCallback(callback) {\n return callback.onHubCapsule !== undefined;\n}\nvar HubClass = /** @class */function () {\n function HubClass(name) {\n this.listeners = [];\n this.patterns = [];\n this.protectedChannels = ['core', 'auth', 'api', 'analytics', 'interactions', 'pubsub', 'storage', 'xr'];\n this.name = name;\n }\n // Note - Need to pass channel as a reference for removal to work and not anonymous function\n HubClass.prototype.remove = function (channel, listener) {\n if (channel instanceof RegExp) {\n var pattern_1 = this.patterns.find(function (_a) {\n var pattern = _a.pattern;\n return pattern.source === channel.source;\n });\n if (!pattern_1) {\n logger.warn(\"No listeners for \" + channel);\n return;\n }\n this.patterns = __spread(this.patterns.filter(function (x) {\n return x !== pattern_1;\n }));\n } else {\n var holder = this.listeners[channel];\n if (!holder) {\n logger.warn(\"No listeners for \" + channel);\n return;\n }\n this.listeners[channel] = __spread(holder.filter(function (_a) {\n var callback = _a.callback;\n return callback !== listener;\n }));\n }\n };\n HubClass.prototype.dispatch = function (channel, payload, source, ampSymbol) {\n if (source === void 0) {\n source = '';\n }\n if (this.protectedChannels.indexOf(channel) > -1) {\n var 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 var capsule = {\n channel: channel,\n payload: __assign({}, payload),\n source: source,\n patternInfo: []\n };\n try {\n this._toListeners(capsule);\n } catch (e) {\n logger.error(e);\n }\n };\n HubClass.prototype.listen = function (channel, callback, listenerName) {\n var _this = this;\n if (listenerName === void 0) {\n listenerName = 'noname';\n }\n var cb;\n // Check for legacy onHubCapsule callback for backwards compatability\n if (isLegacyCallback(callback)) {\n logger.warn(\"WARNING onHubCapsule is Deprecated. Please pass in a callback.\");\n cb = callback.onHubCapsule.bind(callback);\n } else if (typeof callback !== 'function') {\n throw new Error('No callback supplied to Hub');\n } else {\n cb = callback;\n }\n if (channel instanceof RegExp) {\n this.patterns.push({\n pattern: channel,\n callback: cb\n });\n } else {\n var holder = this.listeners[channel];\n if (!holder) {\n holder = [];\n this.listeners[channel] = holder;\n }\n holder.push({\n name: listenerName,\n callback: cb\n });\n }\n return function () {\n _this.remove(channel, cb);\n };\n };\n HubClass.prototype._toListeners = function (capsule) {\n var channel = capsule.channel,\n payload = capsule.payload;\n var holder = this.listeners[channel];\n if (holder) {\n holder.forEach(function (listener) {\n logger.debug(\"Dispatching to \" + channel + \" with \", payload);\n try {\n listener.callback(capsule);\n } catch (e) {\n logger.error(e);\n }\n });\n }\n if (this.patterns.length > 0) {\n if (!payload.message) {\n logger.warn(\"Cannot perform pattern matching without a message key\");\n return;\n }\n var payloadStr_1 = payload.message;\n this.patterns.forEach(function (pattern) {\n var match = payloadStr_1.match(pattern.pattern);\n if (match) {\n var _a = __read(match),\n groups = _a.slice(1);\n var dispatchingCapsule = __assign(__assign({}, capsule), {\n patternInfo: groups\n });\n try {\n pattern.callback(dispatchingCapsule);\n } catch (e) {\n logger.error(e);\n }\n }\n });\n }\n };\n return HubClass;\n}();\nexport { HubClass };\n/*We export a __default__ instance of HubClass to use it as a\npsuedo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events.*/\nexport var Hub = new HubClass('__default__');\n/**\n * @deprecated use named import\n */\nexport default Hub;","import \"core-js/modules/es.array.sort.js\";\n/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar MIME_MAP = [{\n type: 'text/plain',\n ext: 'txt'\n}, {\n type: 'text/html',\n ext: 'html'\n}, {\n type: 'text/javascript',\n ext: 'js'\n}, {\n type: 'text/css',\n ext: 'css'\n}, {\n type: 'text/csv',\n ext: 'csv'\n}, {\n type: 'text/yaml',\n ext: 'yml'\n}, {\n type: 'text/yaml',\n ext: 'yaml'\n}, {\n type: 'text/calendar',\n ext: 'ics'\n}, {\n type: 'text/calendar',\n ext: 'ical'\n}, {\n type: 'image/apng',\n ext: 'apng'\n}, {\n type: 'image/bmp',\n ext: 'bmp'\n}, {\n type: 'image/gif',\n ext: 'gif'\n}, {\n type: 'image/x-icon',\n ext: 'ico'\n}, {\n type: 'image/x-icon',\n ext: 'cur'\n}, {\n type: 'image/jpeg',\n ext: 'jpg'\n}, {\n type: 'image/jpeg',\n ext: 'jpeg'\n}, {\n type: 'image/jpeg',\n ext: 'jfif'\n}, {\n type: 'image/jpeg',\n ext: 'pjp'\n}, {\n type: 'image/jpeg',\n ext: 'pjpeg'\n}, {\n type: 'image/png',\n ext: 'png'\n}, {\n type: 'image/svg+xml',\n ext: 'svg'\n}, {\n type: 'image/tiff',\n ext: 'tif'\n}, {\n type: 'image/tiff',\n ext: 'tiff'\n}, {\n type: 'image/webp',\n ext: 'webp'\n}, {\n type: 'application/json',\n ext: 'json'\n}, {\n type: 'application/xml',\n ext: 'xml'\n}, {\n type: 'application/x-sh',\n ext: 'sh'\n}, {\n type: 'application/zip',\n ext: 'zip'\n}, {\n type: 'application/x-rar-compressed',\n ext: 'rar'\n}, {\n type: 'application/x-tar',\n ext: 'tar'\n}, {\n type: 'application/x-bzip',\n ext: 'bz'\n}, {\n type: 'application/x-bzip2',\n ext: 'bz2'\n}, {\n type: 'application/pdf',\n ext: 'pdf'\n}, {\n type: 'application/java-archive',\n ext: 'jar'\n}, {\n type: 'application/msword',\n ext: 'doc'\n}, {\n type: 'application/vnd.ms-excel',\n ext: 'xls'\n}, {\n type: 'application/vnd.ms-excel',\n ext: 'xlsx'\n}, {\n type: 'message/rfc822',\n ext: 'eml'\n}];\nexport var isEmpty = function isEmpty(obj) {\n if (obj === void 0) {\n obj = {};\n }\n return Object.keys(obj).length === 0;\n};\nexport var sortByField = function sortByField(list, field, dir) {\n if (!list || !list.sort) {\n return false;\n }\n var dirX = dir && dir === 'desc' ? -1 : 1;\n list.sort(function (a, b) {\n var a_val = a[field];\n var b_val = b[field];\n if (typeof b_val === 'undefined') {\n return typeof a_val === 'undefined' ? 0 : 1 * dirX;\n }\n if (typeof a_val === 'undefined') {\n return -1 * dirX;\n }\n if (a_val < b_val) {\n return -1 * dirX;\n }\n if (a_val > b_val) {\n return 1 * dirX;\n }\n return 0;\n });\n return true;\n};\nexport var objectLessAttributes = function objectLessAttributes(obj, less) {\n var ret = Object.assign({}, obj);\n if (less) {\n if (typeof less === 'string') {\n delete ret[less];\n } else {\n less.forEach(function (attr) {\n delete ret[attr];\n });\n }\n }\n return ret;\n};\nexport var filenameToContentType = function filenameToContentType(filename, defVal) {\n if (defVal === void 0) {\n defVal = 'application/octet-stream';\n }\n var name = filename.toLowerCase();\n var filtered = MIME_MAP.filter(function (mime) {\n return name.endsWith('.' + mime.ext);\n });\n return filtered.length > 0 ? filtered[0].type : defVal;\n};\nexport var isTextFile = function isTextFile(contentType) {\n var type = contentType.toLowerCase();\n if (type.startsWith('text/')) {\n return true;\n }\n return 'application/json' === type || 'application/xml' === type || 'application/sh' === type;\n};\nexport var generateRandomString = function generateRandomString() {\n var result = '';\n var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (var i = 32; i > 0; i -= 1) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\nexport var makeQuerablePromise = function makeQuerablePromise(promise) {\n if (promise.isResolved) return promise;\n var isPending = true;\n var isRejected = false;\n var isFullfilled = false;\n var result = promise.then(function (data) {\n isFullfilled = true;\n isPending = false;\n return data;\n }, function (e) {\n isRejected = true;\n isPending = false;\n throw e;\n });\n result.isFullfilled = function () {\n return isFullfilled;\n };\n result.isPending = function () {\n return isPending;\n };\n result.isRejected = function () {\n return isRejected;\n };\n return result;\n};\nexport var isWebWorker = function isWebWorker() {\n if (typeof self === 'undefined') {\n return false;\n }\n var selfContext = self;\n return typeof selfContext.WorkerGlobalScope !== 'undefined' && self instanceof selfContext.WorkerGlobalScope;\n};\nexport var browserOrNode = function browserOrNode() {\n var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n var isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;\n return {\n isBrowser: isBrowser,\n isNode: isNode\n };\n};\n/**\n * transfer the first letter of the keys to lowercase\n * @param {Object} obj - the object need to be transferred\n * @param {Array} whiteListForItself - whitelist itself from being transferred\n * @param {Array} whiteListForChildren - whitelist its children keys from being transferred\n */\nvar _transferKeyToLowerCase = function transferKeyToLowerCase(obj, whiteListForItself, whiteListForChildren) {\n if (whiteListForItself === void 0) {\n whiteListForItself = [];\n }\n if (whiteListForChildren === void 0) {\n whiteListForChildren = [];\n }\n if (!isStrictObject(obj)) return obj;\n var ret = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var transferedKey = whiteListForItself.includes(key) ? key : key[0].toLowerCase() + key.slice(1);\n ret[transferedKey] = whiteListForChildren.includes(key) ? obj[key] : _transferKeyToLowerCase(obj[key], whiteListForItself, whiteListForChildren);\n }\n }\n return ret;\n};\n/**\n * transfer the first letter of the keys to lowercase\n * @param {Object} obj - the object need to be transferred\n * @param {Array} whiteListForItself - whitelist itself from being transferred\n * @param {Array} whiteListForChildren - whitelist its children keys from being transferred\n */\nexport { _transferKeyToLowerCase as transferKeyToLowerCase };\nvar _transferKeyToUpperCase = function transferKeyToUpperCase(obj, whiteListForItself, whiteListForChildren) {\n if (whiteListForItself === void 0) {\n whiteListForItself = [];\n }\n if (whiteListForChildren === void 0) {\n whiteListForChildren = [];\n }\n if (!isStrictObject(obj)) return obj;\n var ret = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var transferredKey = whiteListForItself.includes(key) ? key : key[0].toUpperCase() + key.slice(1);\n ret[transferredKey] = whiteListForChildren.includes(key) ? obj[key] : _transferKeyToUpperCase(obj[key], whiteListForItself, whiteListForChildren);\n }\n }\n return ret;\n};\n/**\n * Return true if the object is a strict object\n * which means it's not Array, Function, Number, String, Boolean or Null\n * @param obj the Object\n */\nexport { _transferKeyToUpperCase as transferKeyToUpperCase };\nexport var isStrictObject = function isStrictObject(obj) {\n return obj instanceof Object && !(obj instanceof Array) && !(obj instanceof Function) && !(obj instanceof Number) && !(obj instanceof String) && !(obj instanceof Boolean);\n};\n/**\n * @deprecated use per-function imports\n */\nvar JS = /** @class */function () {\n function JS() {}\n JS.isEmpty = isEmpty;\n JS.sortByField = sortByField;\n JS.objectLessAttributes = objectLessAttributes;\n JS.filenameToContentType = filenameToContentType;\n JS.isTextFile = isTextFile;\n JS.generateRandomString = generateRandomString;\n JS.makeQuerablePromise = makeQuerablePromise;\n JS.isWebWorker = isWebWorker;\n JS.browserOrNode = browserOrNode;\n JS.transferKeyToLowerCase = _transferKeyToLowerCase;\n JS.transferKeyToUpperCase = _transferKeyToUpperCase;\n JS.isStrictObject = isStrictObject;\n return JS;\n}();\nexport { JS };\n/**\n * @deprecated use per-function imports\n */\nexport default JS;","/*\n * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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};\nvar __spread = this && this.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5\n};\n/**\n * Write logs\n * @class Logger\n */\nvar ConsoleLogger = /** @class */function () {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n function ConsoleLogger(name, level) {\n if (level === void 0) {\n level = 'WARN';\n }\n this.name = name;\n this.level = level;\n }\n ConsoleLogger.prototype._padding = function (n) {\n return n < 10 ? '0' + n : '' + n;\n };\n ConsoleLogger.prototype._ts = function () {\n var dt = new Date();\n return [this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') + '.' + dt.getMilliseconds();\n };\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype._log = function (type) {\n var msg = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n msg[_i - 1] = arguments[_i];\n }\n var logger_level_name = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n logger_level_name = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n logger_level_name = window.LOG_LEVEL;\n }\n var logger_level = LOG_LEVELS[logger_level_name];\n var type_level = LOG_LEVELS[type];\n if (!(type_level >= logger_level)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n var log = console.log.bind(console);\n if (type === 'ERROR' && console.error) {\n log = console.error.bind(console);\n }\n if (type === 'WARN' && console.warn) {\n log = console.warn.bind(console);\n }\n var prefix = \"[\" + type + \"] \" + this._ts() + \" \" + this.name;\n if (msg.length === 1 && typeof msg[0] === 'string') {\n log(prefix + \" - \" + msg[0]);\n } else if (msg.length === 1) {\n log(prefix, msg[0]);\n } else if (typeof msg[0] === 'string') {\n var obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n log(prefix + \" - \" + msg[0], obj);\n } else {\n log(prefix, msg);\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 ConsoleLogger.prototype.log = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['INFO'], msg));\n };\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.info = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['INFO'], msg));\n };\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.warn = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['WARN'], msg));\n };\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.error = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['ERROR'], msg));\n };\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.debug = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['DEBUG'], msg));\n };\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n ConsoleLogger.prototype.verbose = function () {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n this._log.apply(this, __spread(['VERBOSE'], msg));\n };\n ConsoleLogger.LOG_LEVEL = null;\n return ConsoleLogger;\n}();\nexport { ConsoleLogger };","import { ConsoleLogger as Logger } from './Logger';\nvar logger = new Logger('Parser');\nexport var parseMobileHubConfig = function parseMobileHubConfig(config) {\n var amplifyConfig = {};\n // Analytics\n if (config['aws_mobile_analytics_app_id']) {\n var Analytics = {\n AWSPinpoint: {\n appId: config['aws_mobile_analytics_app_id'],\n region: config['aws_mobile_analytics_app_region']\n }\n };\n amplifyConfig.Analytics = Analytics;\n }\n // Auth\n if (config['aws_cognito_identity_pool_id'] || config['aws_user_pools_id']) {\n amplifyConfig.Auth = {\n userPoolId: config['aws_user_pools_id'],\n userPoolWebClientId: config['aws_user_pools_web_client_id'],\n region: config['aws_cognito_region'],\n identityPoolId: config['aws_cognito_identity_pool_id'],\n identityPoolRegion: config['aws_cognito_region'],\n mandatorySignIn: config['aws_mandatory_sign_in'] === 'enable'\n };\n }\n // Storage\n var storageConfig;\n if (config['aws_user_files_s3_bucket']) {\n storageConfig = {\n AWSS3: {\n bucket: config['aws_user_files_s3_bucket'],\n region: config['aws_user_files_s3_bucket_region'],\n dangerouslyConnectToHttpEndpointForTesting: config['aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing']\n }\n };\n } else {\n storageConfig = config ? config.Storage || config : {};\n }\n amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);\n amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);\n amplifyConfig.Storage = Object.assign({}, storageConfig);\n logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);\n return amplifyConfig;\n};\n/**\n * @deprecated use per-function export\n */\nvar Parser = /** @class */function () {\n function Parser() {}\n Parser.parseMobilehubConfig = parseMobileHubConfig;\n return Parser;\n}();\nexport { Parser };\n/**\n * @deprecated use per-function export\n */\nexport default Parser;","// generated by genversion\nexport var version = '3.8.23';","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { version } from './version';\nvar BASE_USER_AGENT = \"aws-amplify/\" + version;\nexport var Platform = {\n userAgent: BASE_USER_AGENT + \" js\",\n product: '',\n navigator: null,\n isReactNative: false\n};\nif (typeof navigator !== 'undefined' && navigator.product) {\n Platform.product = navigator.product || '';\n Platform.navigator = navigator || null;\n switch (navigator.product) {\n case 'ReactNative':\n Platform.userAgent = BASE_USER_AGENT + \" react-native\";\n Platform.isReactNative = true;\n break;\n default:\n Platform.userAgent = BASE_USER_AGENT + \" js\";\n Platform.isReactNative = false;\n break;\n }\n}\nexport var getAmplifyUserAgent = function getAmplifyUserAgent() {\n return Platform.userAgent;\n};\n/**\n * @deprecated use named import\n */\nexport default Platform;","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar dataMemory = {};\n/** @class */\nvar MemoryStorage = /** @class */function () {\n function MemoryStorage() {}\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 MemoryStorage.setItem = function (key, value) {\n dataMemory[key] = value;\n return dataMemory[key];\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 MemoryStorage.getItem = function (key) {\n return Object.prototype.hasOwnProperty.call(dataMemory, key) ? dataMemory[key] : undefined;\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 MemoryStorage.removeItem = function (key) {\n return delete dataMemory[key];\n };\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n MemoryStorage.clear = function () {\n dataMemory = {};\n return dataMemory;\n };\n return MemoryStorage;\n}();\nexport { MemoryStorage };\nvar StorageHelper = /** @class */function () {\n /**\n * This is used to get a storage object\n * @returns {object} the storage\n */\n function StorageHelper() {\n try {\n this.storageWindow = window.localStorage;\n this.storageWindow.setItem('aws.amplify.test-ls', 1);\n this.storageWindow.removeItem('aws.amplify.test-ls');\n } catch (exception) {\n this.storageWindow = MemoryStorage;\n }\n }\n /**\n * This is used to return the storage\n * @returns {object} the storage\n */\n StorageHelper.prototype.getStorage = function () {\n return this.storageWindow;\n };\n return StorageHelper;\n}();\nexport { StorageHelper };\n/**\n * @deprecated use named import\n */\nexport default StorageHelper;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _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 (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __awaiter = this && this.__awaiter || function (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};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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 __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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};\nvar __spread = this && this.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nimport { ConsoleLogger as Logger } from '../Logger/ConsoleLogger';\nvar logger = new Logger('Util');\nvar NonRetryableError = /** @class */function (_super) {\n __extends(NonRetryableError, _super);\n function NonRetryableError(message) {\n var _this = _super.call(this, message) || this;\n _this.nonRetryable = true;\n return _this;\n }\n return NonRetryableError;\n}(Error);\nexport { NonRetryableError };\nvar isNonRetryableError = function isNonRetryableError(obj) {\n var key = 'nonRetryable';\n return obj && obj[key];\n};\n/**\n * @private\n * Internal use of Amplify only\n */\nexport function retry(functionToRetry, args, delayFn, attempt) {\n if (attempt === void 0) {\n attempt = 1;\n }\n return __awaiter(this, void 0, void 0, function () {\n var err_1, retryIn_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (typeof functionToRetry !== 'function') {\n throw Error('functionToRetry must be a function');\n }\n logger.debug(functionToRetry.name + \" attempt #\" + attempt + \" with this vars: \" + JSON.stringify(args));\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3,, 8]);\n return [4 /*yield*/, functionToRetry.apply(void 0, __spread(args))];\n case 2:\n return [2 /*return*/, _a.sent()];\n case 3:\n err_1 = _a.sent();\n logger.debug(\"error on \" + functionToRetry.name, err_1);\n if (isNonRetryableError(err_1)) {\n logger.debug(functionToRetry.name + \" non retryable error\", err_1);\n throw err_1;\n }\n retryIn_1 = delayFn(attempt, args, err_1);\n logger.debug(functionToRetry.name + \" retrying in \" + retryIn_1 + \" ms\");\n if (!(retryIn_1 !== false)) return [3 /*break*/, 6];\n return [4 /*yield*/, new Promise(function (res) {\n return setTimeout(res, retryIn_1);\n })];\n case 4:\n _a.sent();\n return [4 /*yield*/, retry(functionToRetry, args, delayFn, attempt + 1)];\n case 5:\n return [2 /*return*/, _a.sent()];\n case 6:\n throw err_1;\n case 7:\n return [3 /*break*/, 8];\n case 8:\n return [2 /*return*/];\n }\n });\n });\n}\nvar MAX_DELAY_MS = 5 * 60 * 1000;\nfunction jitteredBackoff(maxDelayMs) {\n var BASE_TIME_MS = 100;\n var JITTER_FACTOR = 100;\n return function (attempt) {\n var delay = Math.pow(2, attempt) * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n/**\n * @private\n * Internal use of Amplify only\n */\nexport var jitteredExponentialRetry = function jitteredExponentialRetry(functionToRetry, args, maxDelayMs) {\n if (maxDelayMs === void 0) {\n maxDelayMs = MAX_DELAY_MS;\n }\n return retry(functionToRetry, args, jitteredBackoff(maxDelayMs));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isMsWindow = void 0;\nvar msSubtleCryptoMethods = [\"decrypt\", \"digest\", \"encrypt\", \"exportKey\", \"generateKey\", \"importKey\", \"sign\", \"verify\"];\nfunction quacksLikeAnMsWindow(window) {\n return \"MSInputMethodContext\" in window && \"msCrypto\" in window;\n}\n/**\n * Determines if the provided window is (or is like) the window object one would\n * expect to encounter in Internet Explorer 11.\n */\nfunction isMsWindow(window) {\n if (quacksLikeAnMsWindow(window) && window.msCrypto.subtle !== undefined) {\n var _a = window.msCrypto,\n getRandomValues = _a.getRandomValues,\n subtle_1 = _a.subtle;\n return msSubtleCryptoMethods.map(function (methodName) {\n return subtle_1[methodName];\n }).concat(getRandomValues).every(function (method) {\n return typeof method === \"function\";\n });\n }\n return false;\n}\nexports.isMsWindow = isMsWindow;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./CryptoOperation\"), exports);\ntslib_1.__exportStar(require(\"./Key\"), exports);\ntslib_1.__exportStar(require(\"./KeyOperation\"), exports);\ntslib_1.__exportStar(require(\"./MsSubtleCrypto\"), exports);\ntslib_1.__exportStar(require(\"./MsWindow\"), exports);","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.EMPTY_DATA_SHA_256 = exports.SHA_256_HMAC_ALGO = exports.SHA_256_HASH = void 0;\nexports.SHA_256_HASH = {\n name: \"SHA-256\"\n};\nexports.SHA_256_HMAC_ALGO = {\n name: \"HMAC\",\n hash: exports.SHA_256_HASH\n};\nexports.EMPTY_DATA_SHA_256 = new Uint8Array([227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85]);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Sha256 = void 0;\nvar ie11Sha256_1 = require(\"./ie11Sha256\");\nvar webCryptoSha256_1 = require(\"./webCryptoSha256\");\nvar sha256_js_1 = require(\"@aws-crypto/sha256-js\");\nvar supports_web_crypto_1 = require(\"@aws-crypto/supports-web-crypto\");\nvar ie11_detection_1 = require(\"@aws-crypto/ie11-detection\");\nvar util_locate_window_1 = require(\"@aws-sdk/util-locate-window\");\nvar Sha256 = /** @class */function () {\n function Sha256(secret) {\n if ((0, supports_web_crypto_1.supportsWebCrypto)((0, util_locate_window_1.locateWindow)())) {\n this.hash = new webCryptoSha256_1.Sha256(secret);\n } else if ((0, ie11_detection_1.isMsWindow)((0, util_locate_window_1.locateWindow)())) {\n this.hash = new ie11Sha256_1.Sha256(secret);\n } else {\n this.hash = new sha256_js_1.Sha256(secret);\n }\n }\n Sha256.prototype.update = function (data, encoding) {\n this.hash.update(data, encoding);\n };\n Sha256.prototype.digest = function () {\n return this.hash.digest();\n };\n return Sha256;\n}();\nexports.Sha256 = Sha256;","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Sha256 = void 0;\nvar isEmptyData_1 = require(\"./isEmptyData\");\nvar constants_1 = require(\"./constants\");\nvar util_utf8_browser_1 = require(\"@aws-sdk/util-utf8-browser\");\nvar util_locate_window_1 = require(\"@aws-sdk/util-locate-window\");\nvar Sha256 = /** @class */function () {\n function Sha256(secret) {\n if (secret) {\n this.operation = getKeyPromise(secret).then(function (keyData) {\n return (0, util_locate_window_1.locateWindow)().msCrypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, keyData);\n });\n this.operation.catch(function () {});\n } else {\n this.operation = Promise.resolve((0, util_locate_window_1.locateWindow)().msCrypto.subtle.digest(\"SHA-256\"));\n }\n }\n Sha256.prototype.update = function (toHash) {\n var _this = this;\n if ((0, isEmptyData_1.isEmptyData)(toHash)) {\n return;\n }\n this.operation = this.operation.then(function (operation) {\n operation.onerror = function () {\n _this.operation = Promise.reject(new Error(\"Error encountered updating hash\"));\n };\n operation.process(toArrayBufferView(toHash));\n return operation;\n });\n this.operation.catch(function () {});\n };\n Sha256.prototype.digest = function () {\n return this.operation.then(function (operation) {\n return new Promise(function (resolve, reject) {\n operation.onerror = function () {\n reject(new Error(\"Error encountered finalizing hash\"));\n };\n operation.oncomplete = function () {\n if (operation.result) {\n resolve(new Uint8Array(operation.result));\n }\n reject(new Error(\"Error encountered finalizing hash\"));\n };\n operation.finish();\n });\n });\n };\n return Sha256;\n}();\nexports.Sha256 = Sha256;\nfunction getKeyPromise(secret) {\n return new Promise(function (resolve, reject) {\n var keyOperation = (0, util_locate_window_1.locateWindow)().msCrypto.subtle.importKey(\"raw\", toArrayBufferView(secret), constants_1.SHA_256_HMAC_ALGO, false, [\"sign\"]);\n keyOperation.oncomplete = function () {\n if (keyOperation.result) {\n resolve(keyOperation.result);\n }\n reject(new Error(\"ImportKey completed without importing key.\"));\n };\n keyOperation.onerror = function () {\n reject(new Error(\"ImportKey failed to import key.\"));\n };\n });\n}\nfunction toArrayBufferView(data) {\n if (typeof data === \"string\") {\n return (0, util_utf8_browser_1.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}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.WebCryptoSha256 = exports.Ie11Sha256 = void 0;\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./crossPlatformSha256\"), exports);\nvar ie11Sha256_1 = require(\"./ie11Sha256\");\nObject.defineProperty(exports, \"Ie11Sha256\", {\n enumerable: true,\n get: function get() {\n return ie11Sha256_1.Sha256;\n }\n});\nvar webCryptoSha256_1 = require(\"./webCryptoSha256\");\nObject.defineProperty(exports, \"WebCryptoSha256\", {\n enumerable: true,\n get: function get() {\n return webCryptoSha256_1.Sha256;\n }\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Sha256 = void 0;\nvar util_1 = require(\"@aws-crypto/util\");\nvar constants_1 = require(\"./constants\");\nvar util_locate_window_1 = require(\"@aws-sdk/util-locate-window\");\nvar Sha256 = /** @class */function () {\n function Sha256(secret) {\n this.toHash = new Uint8Array(0);\n if (secret !== void 0) {\n this.key = new Promise(function (resolve, reject) {\n (0, util_locate_window_1.locateWindow)().crypto.subtle.importKey(\"raw\", (0, util_1.convertToBuffer)(secret), constants_1.SHA_256_HMAC_ALGO, false, [\"sign\"]).then(resolve, reject);\n });\n this.key.catch(function () {});\n }\n }\n Sha256.prototype.update = function (data) {\n if ((0, util_1.isEmptyData)(data)) {\n return;\n }\n var update = (0, util_1.convertToBuffer)(data);\n var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength);\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n };\n Sha256.prototype.digest = function () {\n var _this = this;\n if (this.key) {\n return this.key.then(function (key) {\n return (0, util_locate_window_1.locateWindow)().crypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, key, _this.toHash).then(function (data) {\n return new Uint8Array(data);\n });\n });\n }\n if ((0, util_1.isEmptyData)(this.toHash)) {\n return Promise.resolve(constants_1.EMPTY_DATA_SHA_256);\n }\n return Promise.resolve().then(function () {\n return (0, util_locate_window_1.locateWindow)().crypto.subtle.digest(constants_1.SHA_256_HASH, _this.toHash);\n }).then(function (data) {\n return Promise.resolve(new Uint8Array(data));\n });\n };\n return Sha256;\n}();\nexports.Sha256 = Sha256;","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.RawSha256 = void 0;\nvar constants_1 = require(\"./constants\");\n/**\n * @internal\n */\nvar RawSha256 = /** @class */function () {\n function RawSha256() {\n this.state = Int32Array.from(constants_1.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 > constants_1.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 === constants_1.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 % constants_1.BLOCK_SIZE >= constants_1.BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < constants_1.BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < constants_1.BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(constants_1.BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32(constants_1.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(constants_1.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,\n buffer = _a.buffer,\n state = _a.state;\n var 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 for (var i = 0; i < constants_1.BLOCK_SIZE; i++) {\n if (i < 16) {\n 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 + (constants_1.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}();\nexports.RawSha256 = RawSha256;","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MAX_HASHABLE_LENGTH = exports.INIT = exports.KEY = exports.DIGEST_LENGTH = exports.BLOCK_SIZE = void 0;\n/**\n * @internal\n */\nexports.BLOCK_SIZE = 64;\n/**\n * @internal\n */\nexports.DIGEST_LENGTH = 32;\n/**\n * @internal\n */\nexports.KEY = new Uint32Array([0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]);\n/**\n * @internal\n */\nexports.INIT = [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19];\n/**\n * @internal\n */\nexports.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./jsSha256\"), exports);","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Sha256 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar constants_1 = require(\"./constants\");\nvar RawSha256_1 = require(\"./RawSha256\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar Sha256 = /** @class */function () {\n function Sha256(secret) {\n this.hash = new RawSha256_1.RawSha256();\n if (secret) {\n this.outer = new RawSha256_1.RawSha256();\n var inner = bufferFromSecret(secret);\n var outer = new Uint8Array(constants_1.BLOCK_SIZE);\n outer.set(inner);\n for (var i = 0; i < constants_1.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 Sha256.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash) || this.error) {\n return;\n }\n try {\n this.hash.update((0, util_1.convertToBuffer)(toHash));\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 (0, tslib_1.__awaiter)(this, void 0, void 0, function () {\n return (0, tslib_1.__generator)(this, function (_a) {\n return [2 /*return*/, this.digestSync()];\n });\n });\n };\n return Sha256;\n}();\nexports.Sha256 = Sha256;\nfunction bufferFromSecret(secret) {\n var input = (0, util_1.convertToBuffer)(secret);\n if (input.byteLength > constants_1.BLOCK_SIZE) {\n var bufferHash = new RawSha256_1.RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array(constants_1.BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./supportsWebCrypto\"), exports);","\"use strict\";\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.supportsZeroByteGCM = exports.supportsSubtleCrypto = exports.supportsSecureRandom = exports.supportsWebCrypto = void 0;\nvar tslib_1 = require(\"tslib\");\nvar subtleCryptoMethods = [\"decrypt\", \"digest\", \"encrypt\", \"exportKey\", \"generateKey\", \"importKey\", \"sign\", \"verify\"];\nfunction supportsWebCrypto(window) {\n if (supportsSecureRandom(window) && typeof window.crypto.subtle === \"object\") {\n var subtle = window.crypto.subtle;\n return supportsSubtleCrypto(subtle);\n }\n return false;\n}\nexports.supportsWebCrypto = supportsWebCrypto;\nfunction supportsSecureRandom(window) {\n if (typeof window === \"object\" && typeof window.crypto === \"object\") {\n var getRandomValues = window.crypto.getRandomValues;\n return typeof getRandomValues === \"function\";\n }\n return false;\n}\nexports.supportsSecureRandom = supportsSecureRandom;\nfunction supportsSubtleCrypto(subtle) {\n return subtle && subtleCryptoMethods.every(function (methodName) {\n return typeof subtle[methodName] === \"function\";\n });\n}\nexports.supportsSubtleCrypto = supportsSubtleCrypto;\nfunction supportsZeroByteGCM(subtle) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var key, zeroByteAuthTag, _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!supportsSubtleCrypto(subtle)) return [2 /*return*/, false];\n _b.label = 1;\n case 1:\n _b.trys.push([1, 4,, 5]);\n return [4 /*yield*/, subtle.generateKey({\n name: \"AES-GCM\",\n length: 128\n }, false, [\"encrypt\"])];\n case 2:\n key = _b.sent();\n return [4 /*yield*/, subtle.encrypt({\n name: \"AES-GCM\",\n iv: new Uint8Array(Array(12)),\n additionalData: new Uint8Array(Array(16)),\n tagLength: 128\n }, key, new Uint8Array(0))];\n case 3:\n zeroByteAuthTag = _b.sent();\n return [2 /*return*/, zeroByteAuthTag.byteLength === 16];\n case 4:\n _a = _b.sent();\n return [2 /*return*/, false];\n case 5:\n return [2 /*return*/];\n }\n });\n });\n}\nexports.supportsZeroByteGCM = supportsZeroByteGCM;","\"use strict\";\n\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.convertToBuffer = void 0;\nvar util_utf8_browser_1 = require(\"@aws-sdk/util-utf8-browser\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from ? function (input) {\n return Buffer.from(input, \"utf8\");\n} : util_utf8_browser_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) 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}\nexports.convertToBuffer = convertToBuffer;","\"use strict\";\n\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", {\n enumerable: true,\n get: function get() {\n return convertToBuffer_1.convertToBuffer;\n }\n});\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", {\n enumerable: true,\n get: function get() {\n return isEmptyData_1.isEmptyData;\n }\n});\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", {\n enumerable: true,\n get: function get() {\n return numToUint8_1.numToUint8;\n }\n});\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", {\n enumerable: true,\n get: function get() {\n return uint32ArrayFrom_1.uint32ArrayFrom;\n }\n});","\"use strict\";\n\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;","\"use strict\";\n\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([(num & 0xff000000) >> 24, (num & 0x00ff0000) >> 16, (num & 0x0000ff00) >> 8, num & 0x000000ff]);\n}\nexports.numToUint8 = numToUint8;","\"use strict\";\n\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Array.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 }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar _extendStatics = function extendStatics(d, b) {\n _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 _extendStatics(d, b);\n};\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar _assign = function __assign() {\n _assign = 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 _assign.apply(this, arguments);\n};\nexport { _assign as __assign };\nexport function __rest(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\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);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}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __esDecorate(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,\n 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 _,\n 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(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nexport function __setFunctionName(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}\n;\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(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}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n 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, v]);\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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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}\nexport var __createBinding = 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)) {\n desc = {\n enumerable: true,\n get: function get() {\n return m[k];\n }\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};\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\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}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\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}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n 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}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n 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, v, a, b]) > 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 __await ? 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}\nexport function __asyncDelegator(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: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\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 () {\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}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __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};\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(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}\nexport function __classPrivateFieldSet(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}\nexport function __classPrivateFieldIn(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}\nexport function __addDisposableResource(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 dispose() {\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) {\n env.stack.push({\n async: true\n });\n }\n return value;\n}\nvar _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};\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r,\n s = 0;\n function next() {\n while (r = env.stack.pop()) {\n 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 }\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}\nexport default {\n __extends: __extends,\n __assign: _assign,\n __rest: __rest,\n __decorate: __decorate,\n __param: __param,\n __metadata: __metadata,\n __awaiter: __awaiter,\n __generator: __generator,\n __createBinding: __createBinding,\n __exportStar: __exportStar,\n __values: __values,\n __read: __read,\n __spread: __spread,\n __spreadArrays: __spreadArrays,\n __spreadArray: __spreadArray,\n __await: __await,\n __asyncGenerator: __asyncGenerator,\n __asyncDelegator: __asyncDelegator,\n __asyncValues: __asyncValues,\n __makeTemplateObject: __makeTemplateObject,\n __importStar: __importStar,\n __importDefault: __importDefault,\n __classPrivateFieldGet: __classPrivateFieldGet,\n __classPrivateFieldSet: __classPrivateFieldSet,\n __classPrivateFieldIn: __classPrivateFieldIn,\n __addDisposableResource: __addDisposableResource,\n __disposeResources: __disposeResources\n};","import { __assign, __awaiter, __generator } from \"tslib\";\nexport var resolveEndpointsConfig = function resolveEndpointsConfig(input) {\n var _a;\n return __assign(__assign({}, input), {\n tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true,\n endpoint: input.endpoint ? normalizeEndpoint(input) : function () {\n return getEndPointFromRegion(input);\n },\n isCustomEndpoint: input.endpoint ? true : false\n });\n};\nvar normalizeEndpoint = function normalizeEndpoint(input) {\n var endpoint = input.endpoint,\n urlParser = input.urlParser;\n if (typeof endpoint === \"string\") {\n var promisified_1 = Promise.resolve(urlParser(endpoint));\n return function () {\n return promisified_1;\n };\n } else if (typeof endpoint === \"object\") {\n var promisified_2 = Promise.resolve(endpoint);\n return function () {\n return promisified_2;\n };\n }\n return endpoint;\n};\nvar getEndPointFromRegion = function getEndPointFromRegion(input) {\n return __awaiter(void 0, void 0, void 0, function () {\n var _a, tls, region, dnsHostRegex, hostname;\n var _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = input.tls, tls = _a === void 0 ? true : _a;\n return [4 /*yield*/, input.region()];\n case 1:\n region = _c.sent();\n dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n return [4 /*yield*/, input.regionInfoProvider(region)];\n case 2:\n hostname = ((_b = _c.sent()) !== null && _b !== void 0 ? _b : {}).hostname;\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return [2 /*return*/, input.urlParser((tls ? \"https:\" : \"http:\") + \"//\" + hostname)];\n }\n });\n });\n};","import { __assign } from \"tslib\";\nexport var REGION_ENV_NAME = \"AWS_REGION\";\nexport var REGION_INI_NAME = \"region\";\nexport var NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: function environmentVariableSelector(env) {\n return env[REGION_ENV_NAME];\n },\n configFileSelector: function configFileSelector(profile) {\n return profile[REGION_INI_NAME];\n },\n default: function _default() {\n throw new Error(\"Region is missing\");\n }\n};\nexport var NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\nexport var resolveRegionConfig = function resolveRegionConfig(input) {\n if (!input.region) {\n throw new Error(\"Region is missing\");\n }\n return __assign(__assign({}, input), {\n region: normalizeRegion(input.region)\n });\n};\nvar normalizeRegion = function normalizeRegion(region) {\n if (typeof region === \"string\") {\n var promisified_1 = Promise.resolve(region);\n return function () {\n return promisified_1;\n };\n }\n return region;\n};","import { __values } from \"tslib\";\nimport { HttpResponse } from \"@aws-sdk/protocol-http\";\nimport { buildQueryString } from \"@aws-sdk/querystring-builder\";\nimport { requestTimeout } from \"./request-timeout\";\nvar FetchHttpHandler = /** @class */function () {\n function FetchHttpHandler(_a) {\n var _b = _a === void 0 ? {} : _a,\n requestTimeout = _b.requestTimeout;\n this.requestTimeout = requestTimeout;\n }\n FetchHttpHandler.prototype.destroy = function () {\n // Do nothing. TLS and HTTP/2 connection pooling is handled by the browser.\n };\n FetchHttpHandler.prototype.handle = function (request, _a) {\n var _b = _a === void 0 ? {} : _a,\n abortSignal = _b.abortSignal;\n var requestTimeoutInMs = this.requestTimeout;\n // if the request was already aborted, prevent doing extra work\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n var abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n var path = request.path;\n if (request.query) {\n var queryString = buildQueryString(request.query);\n if (queryString) {\n path += \"?\" + queryString;\n }\n }\n var port = request.port,\n method = request.method;\n var url = request.protocol + \"//\" + request.hostname + (port ? \":\" + port : \"\") + path;\n // Request constructor doesn't allow GET/HEAD request with body\n // ref: https://github.com/whatwg/fetch/issues/551\n var body = method === \"GET\" || method === \"HEAD\" ? undefined : request.body;\n var requestOptions = {\n body: body,\n headers: new Headers(request.headers),\n method: method\n };\n // some browsers support abort signal\n if (typeof AbortController !== \"undefined\") {\n requestOptions[\"signal\"] = abortSignal;\n }\n var fetchRequest = new Request(url, requestOptions);\n var raceOfPromises = [fetch(fetchRequest).then(function (response) {\n var e_1, _a;\n var fetchHeaders = response.headers;\n var transformedHeaders = {};\n try {\n for (var _b = __values(fetchHeaders.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var pair = _c.value;\n transformedHeaders[pair[0]] = pair[1];\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n var hasReadableStream = response.body !== undefined;\n // Return the response with buffered body\n if (!hasReadableStream) {\n return response.blob().then(function (body) {\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n statusCode: response.status,\n body: body\n })\n };\n });\n }\n // Return the response with streaming body\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n statusCode: response.status,\n body: response.body\n })\n };\n }), requestTimeout(requestTimeoutInMs)];\n if (abortSignal) {\n raceOfPromises.push(new Promise(function (resolve, reject) {\n abortSignal.onabort = function () {\n var abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }));\n }\n return Promise.race(raceOfPromises);\n };\n return FetchHttpHandler;\n}();\nexport { FetchHttpHandler };","export function requestTimeout(timeoutInMs) {\n if (timeoutInMs === void 0) {\n timeoutInMs = 0;\n }\n return new Promise(function (resolve, reject) {\n if (timeoutInMs) {\n setTimeout(function () {\n var timeoutError = new Error(\"Request did not complete within \" + timeoutInMs + \" ms\");\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nimport { __awaiter, __generator } from \"tslib\";\nimport { fromBase64 } from \"@aws-sdk/util-base64-browser\";\n//reference: https://snack.expo.io/r1JCSWRGU\nexport var streamCollector = function streamCollector(stream) {\n if (typeof Blob === \"function\" && stream instanceof Blob) {\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nfunction collectBlob(blob) {\n return __awaiter(this, void 0, void 0, function () {\n var base64, arrayBuffer;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, readToBase64(blob)];\n case 1:\n base64 = _a.sent();\n arrayBuffer = fromBase64(base64);\n return [2 /*return*/, new Uint8Array(arrayBuffer)];\n }\n });\n });\n}\nfunction collectStream(stream) {\n return __awaiter(this, void 0, void 0, function () {\n var res, reader, isDone, _a, done, value, prior;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n res = new Uint8Array(0);\n reader = stream.getReader();\n isDone = false;\n _b.label = 1;\n case 1:\n if (!!isDone) return [3 /*break*/, 3];\n return [4 /*yield*/, reader.read()];\n case 2:\n _a = _b.sent(), done = _a.done, value = _a.value;\n if (value) {\n prior = res;\n res = new Uint8Array(prior.length + value.length);\n res.set(prior);\n res.set(value, prior.length);\n }\n isDone = done;\n return [3 /*break*/, 1];\n case 3:\n return [2 /*return*/, res];\n }\n });\n });\n}\nfunction readToBase64(blob) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.onloadend = function () {\n var _a;\n // reference: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL\n // response from readAsDataURL is always prepended with \"data:*/*;base64,\"\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n var result = (_a = reader.result) !== null && _a !== void 0 ? _a : \"\";\n // Response can include only 'data:' for empty blob, return empty string in this case.\n // Otherwise, return the string after ','\n var commaIndex = result.indexOf(\",\");\n var dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = function () {\n return reject(new Error(\"Read aborted\"));\n };\n reader.onerror = function () {\n return reject(reader.error);\n };\n // reader.readAsArrayBuffer is not always available\n reader.readAsDataURL(blob);\n });\n}","export var invalidProvider = function invalidProvider(message) {\n return function () {\n return Promise.reject(message);\n };\n};","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nvar CONTENT_LENGTH_HEADER = \"content-length\";\nexport function contentLengthMiddleware(bodyLengthChecker) {\n var _this = this;\n return function (next) {\n return function (args) {\n return __awaiter(_this, void 0, void 0, function () {\n var request, body, headers, length;\n var _a;\n return __generator(this, function (_b) {\n request = args.request;\n if (HttpRequest.isInstance(request)) {\n body = request.body, headers = request.headers;\n if (body && Object.keys(headers).map(function (str) {\n return str.toLowerCase();\n }).indexOf(CONTENT_LENGTH_HEADER) === -1) {\n length = bodyLengthChecker(body);\n if (length !== undefined) {\n request.headers = __assign(__assign({}, request.headers), (_a = {}, _a[CONTENT_LENGTH_HEADER] = String(length), _a));\n }\n }\n }\n return [2 /*return*/, next(__assign(__assign({}, args), {\n request: request\n }))];\n });\n });\n };\n };\n}\nexport var contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true\n};\nexport var getContentLengthPlugin = function getContentLengthPlugin(options) {\n return {\n applyToStack: function applyToStack(clientStack) {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n }\n };\n};","import { __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nexport function resolveHostHeaderConfig(input) {\n return input;\n}\nexport var hostHeaderMiddleware = function hostHeaderMiddleware(options) {\n return function (next) {\n return function (args) {\n return __awaiter(void 0, void 0, void 0, function () {\n var request, _a, handlerProtocol;\n return __generator(this, function (_b) {\n if (!HttpRequest.isInstance(args.request)) return [2 /*return*/, next(args)];\n request = args.request;\n _a = (options.requestHandler.metadata || {}).handlerProtocol, handlerProtocol = _a === void 0 ? \"\" : _a;\n //For H2 request, remove 'host' header and use ':authority' header instead\n //reference: https://nodejs.org/dist/latest-v13.x/docs/api/errors.html#ERR_HTTP2_INVALID_CONNECTION_HEADERS\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = \"\";\n //non-H2 request and 'host' header is not set, set the 'host' header to request's hostname.\n } else if (!request.headers[\"host\"]) {\n request.headers[\"host\"] = request.hostname;\n }\n return [2 /*return*/, next(args)];\n });\n });\n };\n };\n};\nexport var hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true\n};\nexport var getHostHeaderPlugin = function getHostHeaderPlugin(options) {\n return {\n applyToStack: function applyToStack(clientStack) {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n }\n };\n};","import { __awaiter, __generator, __rest } from \"tslib\";\nexport var loggerMiddleware = function loggerMiddleware() {\n return function (next, context) {\n return function (args) {\n return __awaiter(void 0, void 0, void 0, function () {\n var clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog, response, _a, $metadata, outputWithoutMetadata;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n clientName = context.clientName, commandName = context.commandName, inputFilterSensitiveLog = context.inputFilterSensitiveLog, logger = context.logger, outputFilterSensitiveLog = context.outputFilterSensitiveLog;\n return [4 /*yield*/, next(args)];\n case 1:\n response = _b.sent();\n if (!logger) {\n return [2 /*return*/, response];\n }\n if (typeof logger.info === \"function\") {\n _a = response.output, $metadata = _a.$metadata, outputWithoutMetadata = __rest(_a, [\"$metadata\"]);\n logger.info({\n clientName: clientName,\n commandName: commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata\n });\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n };\n};\nexport var loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true\n};\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport var getLoggerPlugin = function getLoggerPlugin(options) {\n return {\n applyToStack: function applyToStack(clientStack) {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n }\n };\n};","import { __awaiter, __generator, __read, __spread } from \"tslib\";\nexport var retryMiddleware = function retryMiddleware(options) {\n return function (next, context) {\n return function (args) {\n return __awaiter(void 0, void 0, void 0, function () {\n var _a;\n return __generator(this, function (_b) {\n if ((_a = options === null || options === void 0 ? void 0 : options.retryStrategy) === null || _a === void 0 ? void 0 : _a.mode) context.userAgent = __spread(context.userAgent || [], [[\"cfg/retry-mode\", options.retryStrategy.mode]]);\n return [2 /*return*/, options.retryStrategy.retry(next, args)];\n });\n });\n };\n };\n};\nexport var retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true\n};\nexport var getRetryPlugin = function getRetryPlugin(options) {\n return {\n applyToStack: function applyToStack(clientStack) {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n }\n };\n};","/**\n * Errors encountered when the client clock and server clock cannot agree on the\n * current time.\n *\n * These errors are retryable, assuming the SDK has enabled clock skew\n * correction.\n */\nexport var CLOCK_SKEW_ERROR_CODES = [\"AuthFailure\", \"InvalidSignatureException\", \"RequestExpired\", \"RequestInTheFuture\", \"RequestTimeTooSkewed\", \"SignatureDoesNotMatch\"];\n/**\n * Errors that indicate the SDK is being throttled.\n *\n * These errors are always retryable.\n */\nexport var THROTTLING_ERROR_CODES = [\"BandwidthLimitExceeded\", \"EC2ThrottledException\", \"LimitExceededException\", \"PriorRequestNotComplete\", \"ProvisionedThroughputExceededException\", \"RequestLimitExceeded\", \"RequestThrottled\", \"RequestThrottledException\", \"SlowDown\", \"ThrottledException\", \"Throttling\", \"ThrottlingException\", \"TooManyRequestsException\", \"TransactionInProgressException\"];\n/**\n * Error codes that indicate transient issues\n */\nexport var TRANSIENT_ERROR_CODES = [\"AbortError\", \"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\n/**\n * Error codes that indicate transient issues\n */\nexport var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];","import { CLOCK_SKEW_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES } from \"./constants\";\nexport var isRetryableByTrait = function isRetryableByTrait(error) {\n return error.$retryable !== undefined;\n};\nexport var isClockSkewError = function isClockSkewError(error) {\n return CLOCK_SKEW_ERROR_CODES.includes(error.name);\n};\nexport var isThrottlingError = function isThrottlingError(error) {\n var _a, _b;\n return ((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) === null || _b === void 0 ? void 0 : _b.throttling) == true;\n};\nexport var isTransientError = function isTransientError(error) {\n var _a;\n return TRANSIENT_ERROR_CODES.includes(error.name) || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0);\n};","import { MAXIMUM_RETRY_DELAY } from \"./constants\";\n/**\n * Calculate a capped, fully-jittered exponential backoff time.\n */\nexport var defaultDelayDecider = function defaultDelayDecider(delayBase, attempts) {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * Math.pow(2, attempts) * delayBase));\n};","/**\n * The base number of milliseconds to use in calculating a suitable cool-down\n * time when a retryable error is encountered.\n */\nexport var DEFAULT_RETRY_DELAY_BASE = 100;\n/**\n * The maximum amount of time (in milliseconds) that will be used as a delay\n * between retry attempts.\n */\nexport var MAXIMUM_RETRY_DELAY = 20 * 1000;\n/**\n * The retry delay base (in milliseconds) to use when a throttling error is\n * encountered.\n */\nexport var THROTTLING_RETRY_DELAY_BASE = 500;\n/**\n * Initial number of retry tokens in Retry Quota\n */\nexport var INITIAL_RETRY_TOKENS = 500;\n/**\n * The total amount of retry tokens to be decremented from retry token balance.\n */\nexport var RETRY_COST = 5;\n/**\n * The total amount of retry tokens to be decremented from retry token balance\n * when a throttling error is encountered.\n */\nexport var TIMEOUT_RETRY_COST = 10;\n/**\n * The total amount of retry token to be incremented from retry token balance\n * if an SDK operation invocation succeeds without requiring a retry request.\n */\nexport var NO_RETRY_INCREMENT = 1;\n/**\n * Header name for SDK invocation ID\n */\nexport var INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\n/**\n * Header name for request retry information.\n */\nexport var REQUEST_HEADER = \"amz-sdk-request\";","import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError } from \"@aws-sdk/service-error-classification\";\nexport var defaultRetryDecider = function defaultRetryDecider(error) {\n if (!error) {\n return false;\n }\n return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error);\n};","import { __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nimport { isThrottlingError } from \"@aws-sdk/service-error-classification\";\nimport { v4 } from \"uuid\";\nimport { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, THROTTLING_RETRY_DELAY_BASE } from \"./constants\";\nimport { getDefaultRetryQuota } from \"./defaultRetryQuota\";\nimport { defaultDelayDecider } from \"./delayDecider\";\nimport { defaultRetryDecider } from \"./retryDecider\";\n/**\n * The default value for how many HTTP requests an SDK should make for a\n * single SDK operation invocation before giving up\n */\nexport var DEFAULT_MAX_ATTEMPTS = 3;\n/**\n * The default retry algorithm to use.\n */\nexport var DEFAULT_RETRY_MODE = \"standard\";\nvar StandardRetryStrategy = /** @class */function () {\n function StandardRetryStrategy(maxAttemptsProvider, options) {\n var _a, _b, _c;\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = DEFAULT_RETRY_MODE;\n this.retryDecider = (_a = options === null || options === void 0 ? void 0 : options.retryDecider) !== null && _a !== void 0 ? _a : defaultRetryDecider;\n this.delayDecider = (_b = options === null || options === void 0 ? void 0 : options.delayDecider) !== null && _b !== void 0 ? _b : defaultDelayDecider;\n this.retryQuota = (_c = options === null || options === void 0 ? void 0 : options.retryQuota) !== null && _c !== void 0 ? _c : getDefaultRetryQuota(INITIAL_RETRY_TOKENS);\n }\n StandardRetryStrategy.prototype.shouldRetry = function (error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n };\n StandardRetryStrategy.prototype.getMaxAttempts = function () {\n return __awaiter(this, void 0, void 0, function () {\n var maxAttempts, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2,, 3]);\n return [4 /*yield*/, this.maxAttemptsProvider()];\n case 1:\n maxAttempts = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n return [3 /*break*/, 3];\n case 3:\n return [2 /*return*/, maxAttempts];\n }\n });\n });\n };\n StandardRetryStrategy.prototype.retry = function (next, args) {\n return __awaiter(this, void 0, void 0, function () {\n var retryTokenAmount, attempts, totalDelay, maxAttempts, request, _loop_1, this_1, state_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n attempts = 0;\n totalDelay = 0;\n return [4 /*yield*/, this.getMaxAttempts()];\n case 1:\n maxAttempts = _a.sent();\n request = args.request;\n if (HttpRequest.isInstance(request)) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n _loop_1 = function _loop_1() {\n var _a, response, output, err_1, delay_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2,, 5]);\n if (HttpRequest.isInstance(request)) {\n request.headers[REQUEST_HEADER] = \"attempt=\" + (attempts + 1) + \"; max=\" + maxAttempts;\n }\n return [4 /*yield*/, next(args)];\n case 1:\n _a = _b.sent(), response = _a.response, output = _a.output;\n this_1.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return [2 /*return*/, {\n value: {\n response: response,\n output: output\n }\n }];\n case 2:\n err_1 = _b.sent();\n attempts++;\n if (!this_1.shouldRetry(err_1, attempts, maxAttempts)) return [3 /*break*/, 4];\n retryTokenAmount = this_1.retryQuota.retrieveRetryTokens(err_1);\n delay_1 = this_1.delayDecider(isThrottlingError(err_1) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);\n totalDelay += delay_1;\n return [4 /*yield*/, new Promise(function (resolve) {\n return setTimeout(resolve, delay_1);\n })];\n case 3:\n _b.sent();\n return [2 /*return*/, \"continue\"];\n case 4:\n if (!err_1.$metadata) {\n err_1.$metadata = {};\n }\n err_1.$metadata.attempts = attempts;\n err_1.$metadata.totalRetryDelay = totalDelay;\n throw err_1;\n case 5:\n return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n _a.label = 2;\n case 2:\n if (!true) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1()];\n case 3:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\") return [2 /*return*/, state_1.value];\n return [3 /*break*/, 2];\n case 4:\n return [2 /*return*/];\n }\n });\n });\n };\n return StandardRetryStrategy;\n}();\nexport { StandardRetryStrategy };","import { NO_RETRY_INCREMENT, RETRY_COST, TIMEOUT_RETRY_COST } from \"./constants\";\nexport var getDefaultRetryQuota = function getDefaultRetryQuota(initialRetryTokens) {\n var MAX_CAPACITY = initialRetryTokens;\n var availableCapacity = initialRetryTokens;\n var getCapacityAmount = function getCapacityAmount(error) {\n return error.name === \"TimeoutError\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n };\n var hasRetryTokens = function hasRetryTokens(error) {\n return getCapacityAmount(error) <= availableCapacity;\n };\n var retrieveRetryTokens = function retrieveRetryTokens(error) {\n if (!hasRetryTokens(error)) {\n // retryStrategy should stop retrying, and return last error\n throw new Error(\"No retry token available\");\n }\n var capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n };\n var releaseRetryTokens = function releaseRetryTokens(capacityReleaseAmount) {\n availableCapacity += capacityReleaseAmount !== null && capacityReleaseAmount !== void 0 ? capacityReleaseAmount : NO_RETRY_INCREMENT;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n };\n return Object.freeze({\n hasRetryTokens: hasRetryTokens,\n retrieveRetryTokens: retrieveRetryTokens,\n releaseRetryTokens: releaseRetryTokens\n });\n};","import { __assign } from \"tslib\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, StandardRetryStrategy } from \"./defaultStrategy\";\nexport var ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexport var CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexport var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: function environmentVariableSelector(env) {\n var value = env[ENV_MAX_ATTEMPTS];\n if (!value) return undefined;\n var maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(\"Environment variable \" + ENV_MAX_ATTEMPTS + \" mast be a number, got \\\"\" + value + \"\\\"\");\n }\n return maxAttempt;\n },\n configFileSelector: function configFileSelector(profile) {\n var value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value) return undefined;\n var maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(\"Shared config file entry \" + CONFIG_MAX_ATTEMPTS + \" mast be a number, got \\\"\" + value + \"\\\"\");\n }\n return maxAttempt;\n },\n default: DEFAULT_MAX_ATTEMPTS\n};\nexport var resolveRetryConfig = function resolveRetryConfig(input) {\n var maxAttempts = normalizeMaxAttempts(input.maxAttempts);\n return __assign(__assign({}, input), {\n maxAttempts: maxAttempts,\n retryStrategy: input.retryStrategy || new StandardRetryStrategy(maxAttempts)\n });\n};\nvar normalizeMaxAttempts = function normalizeMaxAttempts(maxAttempts) {\n if (maxAttempts === void 0) {\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n }\n if (typeof maxAttempts === \"number\") {\n var promisified_1 = Promise.resolve(maxAttempts);\n return function () {\n return promisified_1;\n };\n }\n return maxAttempts;\n};\nexport var ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexport var CONFIG_RETRY_MODE = \"retry_mode\";\nexport var NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: function environmentVariableSelector(env) {\n return env[ENV_RETRY_MODE];\n },\n configFileSelector: function configFileSelector(profile) {\n return profile[CONFIG_RETRY_MODE];\n },\n default: DEFAULT_RETRY_MODE\n};","var v1 = require('./v1');\nvar v4 = require('./v4');\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\nmodule.exports = uuid;","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');\n}\nmodule.exports = bytesToUuid;","require(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\n// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n return rnds;\n };\n}","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n return buf ? buf : bytesToUuid(b);\n}\nmodule.exports = v1;","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n if (typeof options == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n return buf || bytesToUuid(rnds);\n}\nmodule.exports = v4;","import { __awaiter, __generator } from \"tslib\";\nexport var deserializerMiddleware = function deserializerMiddleware(options, deserializer) {\n return function (next, context) {\n return function (args) {\n return __awaiter(void 0, void 0, void 0, function () {\n var response, parsed;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, next(args)];\n case 1:\n response = _a.sent().response;\n return [4 /*yield*/, deserializer(response, options)];\n case 2:\n parsed = _a.sent();\n return [2 /*return*/, {\n response: response,\n output: parsed\n }];\n }\n });\n });\n };\n };\n};","import { __assign, __awaiter, __generator } from \"tslib\";\nexport var serializerMiddleware = function serializerMiddleware(options, serializer) {\n return function (next, context) {\n return function (args) {\n return __awaiter(void 0, void 0, void 0, function () {\n var request;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, serializer(args.input, options)];\n case 1:\n request = _a.sent();\n return [2 /*return*/, next(__assign(__assign({}, args), {\n request: request\n }))];\n }\n });\n });\n };\n };\n};","import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport var deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nexport var serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: function applyToStack(commandStack) {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n }\n };\n}","import { __assign, __awaiter, __generator, __read } from \"tslib\";\nimport { SignatureV4 } from \"@aws-sdk/signature-v4\";\nexport function resolveAwsAuthConfig(input) {\n var _this = this;\n var credentials = input.credentials || input.credentialDefaultProvider(input);\n var normalizedCreds = normalizeProvider(credentials);\n var _a = input.signingEscapePath,\n signingEscapePath = _a === void 0 ? true : _a,\n _b = input.systemClockOffset,\n systemClockOffset = _b === void 0 ? input.systemClockOffset || 0 : _b,\n sha256 = input.sha256;\n var signer;\n if (input.signer) {\n //if signer is supplied by user, normalize it to a function returning a promise for signer.\n signer = normalizeProvider(input.signer);\n } else {\n //construct a provider inferring signing from region.\n signer = function signer() {\n return normalizeProvider(input.region)().then(function (region) {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, input.regionInfoProvider(region)];\n case 1:\n return [2 /*return*/, [_a.sent() || {}, region]];\n }\n });\n });\n }).then(function (_a) {\n var _b = __read(_a, 2),\n regionInfo = _b[0],\n region = _b[1];\n var signingRegion = regionInfo.signingRegion,\n signingService = regionInfo.signingService;\n //update client's singing region and signing service config if they are resolved.\n //signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region\n input.signingRegion = input.signingRegion || signingRegion || region;\n //signing name resolving order:\n //user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id\n input.signingName = input.signingName || signingService || input.serviceId;\n return new SignatureV4({\n credentials: normalizedCreds,\n region: input.signingRegion,\n service: input.signingName,\n sha256: sha256,\n uriEscapePath: signingEscapePath\n });\n });\n };\n }\n return __assign(__assign({}, input), {\n systemClockOffset: systemClockOffset,\n signingEscapePath: signingEscapePath,\n credentials: normalizedCreds,\n signer: signer\n });\n}\nfunction normalizeProvider(input) {\n if (typeof input === \"object\") {\n var promisified_1 = Promise.resolve(input);\n return function () {\n return promisified_1;\n };\n }\n return input;\n}","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nvar isClockSkewed = function isClockSkewed(newServerTime, systemClockOffset) {\n return Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - newServerTime) >= 300000;\n};\nvar getSkewCorrectedDate = function getSkewCorrectedDate(systemClockOffset) {\n return new Date(Date.now() + systemClockOffset);\n};\nexport function awsAuthMiddleware(options) {\n return function (next, context) {\n return function (args) {\n return __awaiter(this, void 0, void 0, function () {\n var signer, _a, output, _b, _c, headers, dateHeader, serverTime;\n var _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (!HttpRequest.isInstance(args.request)) return [2 /*return*/, next(args)];\n if (!(typeof options.signer === \"function\")) return [3 /*break*/, 2];\n return [4 /*yield*/, options.signer()];\n case 1:\n _a = _e.sent();\n return [3 /*break*/, 3];\n case 2:\n _a = options.signer;\n _e.label = 3;\n case 3:\n signer = _a;\n _b = next;\n _c = [__assign({}, args)];\n _d = {};\n return [4 /*yield*/, signer.sign(args.request, {\n signingDate: new Date(Date.now() + options.systemClockOffset),\n signingRegion: context[\"signing_region\"],\n signingService: context[\"signing_service\"]\n })];\n case 4:\n return [4 /*yield*/, _b.apply(void 0, [__assign.apply(void 0, _c.concat([(_d.request = _e.sent(), _d)]))])];\n case 5:\n output = _e.sent();\n headers = output.response.headers;\n dateHeader = headers && (headers.date || headers.Date);\n if (dateHeader) {\n serverTime = Date.parse(dateHeader);\n if (isClockSkewed(serverTime, options.systemClockOffset)) {\n options.systemClockOffset = serverTime - Date.now();\n }\n }\n return [2 /*return*/, output];\n }\n });\n });\n };\n };\n}\nexport var awsAuthMiddlewareOptions = {\n name: \"awsAuthMiddleware\",\n tags: [\"SIGNATURE\", \"AWSAUTH\"],\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n override: true\n};\nexport var getAwsAuthPlugin = function getAwsAuthPlugin(options) {\n return {\n applyToStack: function applyToStack(clientStack) {\n clientStack.addRelativeTo(awsAuthMiddleware(options), awsAuthMiddlewareOptions);\n }\n };\n};","import { __assign } from \"tslib\";\nexport function resolveUserAgentConfig(input) {\n return __assign(__assign({}, input), {\n customUserAgent: typeof input.customUserAgent === \"string\" ? [[input.customUserAgent]] : input.customUserAgent\n });\n}","export var USER_AGENT = \"user-agent\";\nexport var X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexport var SPACE = \" \";\nexport var UA_ESCAPE_REGEX = /[^\\!\\#\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;","import { __assign, __awaiter, __generator, __read, __spread } from \"tslib\";\nimport { HttpRequest } from \"@aws-sdk/protocol-http\";\nimport { SPACE, UA_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT } from \"./constants\";\n/**\n * Build user agent header sections from:\n * 1. runtime-specific default user agent provider;\n * 2. custom user agent from `customUserAgent` client config;\n * 3. handler execution context set by internal SDK components;\n * The built user agent will be set to `x-amz-user-agent` header for ALL the\n * runtimes.\n * Please note that any override to the `user-agent` or `x-amz-user-agent` header\n * in the HTTP request is discouraged. Please use `customUserAgent` client\n * config or middleware setting the `userAgent` context to generate desired user\n * agent.\n */\nexport var userAgentMiddleware = function userAgentMiddleware(options) {\n return function (next, context) {\n return function (args) {\n return __awaiter(void 0, void 0, void 0, function () {\n var request, headers, userAgent, defaultUserAgent, customUserAgent, normalUAValue;\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n request = args.request;\n if (!HttpRequest.isInstance(request)) return [2 /*return*/, next(args)];\n headers = request.headers;\n userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || [];\n return [4 /*yield*/, options.defaultUserAgentProvider()];\n case 1:\n defaultUserAgent = _c.sent().map(escapeUserAgent);\n customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || [];\n // Set value to AWS-specific user agent header\n headers[X_AMZ_USER_AGENT] = __spread(defaultUserAgent, userAgent, customUserAgent).join(SPACE);\n normalUAValue = __spread(defaultUserAgent.filter(function (section) {\n return section.startsWith(\"aws-sdk-\");\n }), customUserAgent).join(SPACE);\n if (options.runtime !== \"browser\" && normalUAValue) {\n headers[USER_AGENT] = headers[USER_AGENT] ? headers[USER_AGENT] + \" \" + normalUAValue : normalUAValue;\n }\n return [2 /*return*/, next(__assign(__assign({}, args), {\n request: request\n }))];\n }\n });\n });\n };\n };\n};\n/**\n * Escape the each pair according to https://tools.ietf.org/html/rfc5234 and join the pair with pattern `name/version`.\n * User agent name may include prefix like `md/`, `api/`, `os/` etc., we should not escape the `/` after the prefix.\n * @private\n */\nvar escapeUserAgent = function escapeUserAgent(_a) {\n var _b = __read(_a, 2),\n name = _b[0],\n version = _b[1];\n var prefixSeparatorIndex = name.indexOf(\"/\");\n var prefix = name.substring(0, prefixSeparatorIndex); // If no prefix, prefix is just \"\"\n var uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version].filter(function (item) {\n return item && item.length > 0;\n }).map(function (item) {\n return item === null || item === void 0 ? void 0 : item.replace(UA_ESCAPE_REGEX, \"_\");\n }).join(\"/\");\n};\nexport var getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true\n};\nexport var getUserAgentPlugin = function getUserAgentPlugin(config) {\n return {\n applyToStack: function applyToStack(clientStack) {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n }\n };\n};","var HttpResponse = /** @class */function () {\n function HttpResponse(options) {\n this.statusCode = options.statusCode;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n HttpResponse.isInstance = function (response) {\n //determine if response is a valid HttpResponse\n if (!response) return false;\n var resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n };\n return HttpResponse;\n}();\nexport { HttpResponse };","import { __assign, __read, __spread } from \"tslib\";\nvar HttpRequest = /** @class */function () {\n function HttpRequest(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.substr(-1) !== \":\" ? options.protocol + \":\" : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? \"/\" + options.path : options.path : \"/\";\n }\n HttpRequest.isInstance = function (request) {\n //determine if request is a valid httpRequest\n if (!request) return false;\n var req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n };\n HttpRequest.prototype.clone = function () {\n var cloned = new HttpRequest(__assign(__assign({}, this), {\n headers: __assign({}, this.headers)\n }));\n if (cloned.query) cloned.query = cloneQuery(cloned.query);\n return cloned;\n };\n return HttpRequest;\n}();\nexport { HttpRequest };\nfunction cloneQuery(query) {\n return Object.keys(query).reduce(function (carry, paramName) {\n var _a;\n var param = query[paramName];\n return __assign(__assign({}, carry), (_a = {}, _a[paramName] = Array.isArray(param) ? __spread(param) : param, _a));\n }, {});\n}","import \"core-js/modules/es.array.sort.js\";\nimport { __values } from \"tslib\";\nimport { escapeUri } from \"@aws-sdk/util-uri-escape\";\nexport function buildQueryString(query) {\n var e_1, _a;\n var parts = [];\n try {\n for (var _b = __values(Object.keys(query).sort()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n var value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (var i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(key + \"=\" + escapeUri(value[i]));\n }\n } else {\n var qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += \"=\" + escapeUri(value);\n }\n parts.push(qsEntry);\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return parts.join(\"&\");\n}","export var ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport var CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport var AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport var SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport var EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport var SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexport var TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexport var AUTH_HEADER = \"authorization\";\nexport var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nexport var DATE_HEADER = \"date\";\nexport var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nexport var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nexport var SHA256_HEADER = \"x-amz-content-sha256\";\nexport var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nexport var HOST_HEADER = \"host\";\nexport var ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true\n};\nexport var PROXY_HEADER_PATTERN = /^proxy-/;\nexport var SEC_HEADER_PATTERN = /^sec-/;\nexport var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexport var ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexport var EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexport var UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport var MAX_CACHE_SIZE = 50;\nexport var KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexport var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;","import { __awaiter, __generator, __values } from \"tslib\";\nimport { toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from \"./constants\";\nvar signingKeyCache = {};\nvar cacheQueue = [];\n/**\n * Create a string describing the scope of credentials used to sign a request.\n *\n * @param shortDate The current calendar date in the form YYYYMMDD.\n * @param region The AWS region in which the service resides.\n * @param service The service to which the signed request is being sent.\n */\nexport function createScope(shortDate, region, service) {\n return shortDate + \"/\" + region + \"/\" + service + \"/\" + KEY_TYPE_IDENTIFIER;\n}\n/**\n * Derive a signing key from its composite parts\n *\n * @param sha256Constructor A constructor function that can instantiate SHA-256\n * hash objects.\n * @param credentials The credentials with which the request will be\n * signed.\n * @param shortDate The current calendar date in the form YYYYMMDD.\n * @param region The AWS region in which the service resides.\n * @param service The service to which the signed request is being\n * sent.\n */\nexport var getSigningKey = function getSigningKey(sha256Constructor, credentials, shortDate, region, service) {\n return __awaiter(void 0, void 0, void 0, function () {\n var credsHash, cacheKey, key, _a, _b, signable, e_1_1;\n var e_1, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n return [4 /*yield*/, hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId)];\n case 1:\n credsHash = _d.sent();\n cacheKey = shortDate + \":\" + region + \":\" + service + \":\" + toHex(credsHash) + \":\" + credentials.sessionToken;\n if (cacheKey in signingKeyCache) {\n return [2 /*return*/, signingKeyCache[cacheKey]];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n key = \"AWS4\" + credentials.secretAccessKey;\n _d.label = 2;\n case 2:\n _d.trys.push([2, 7, 8, 9]);\n _a = __values([shortDate, region, service, KEY_TYPE_IDENTIFIER]), _b = _a.next();\n _d.label = 3;\n case 3:\n if (!!_b.done) return [3 /*break*/, 6];\n signable = _b.value;\n return [4 /*yield*/, hmac(sha256Constructor, key, signable)];\n case 4:\n key = _d.sent();\n _d.label = 5;\n case 5:\n _b = _a.next();\n return [3 /*break*/, 3];\n case 6:\n return [3 /*break*/, 9];\n case 7:\n e_1_1 = _d.sent();\n e_1 = {\n error: e_1_1\n };\n return [3 /*break*/, 9];\n case 8:\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n } finally {\n if (e_1) throw e_1.error;\n }\n return [7 /*endfinally*/];\n case 9:\n return [2 /*return*/, signingKeyCache[cacheKey] = key];\n }\n });\n });\n};\n/**\n * @internal\n */\nexport function clearCredentialCache() {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach(function (cacheKey) {\n delete signingKeyCache[cacheKey];\n });\n}\nfunction hmac(ctor, secret, data) {\n var hash = new ctor(secret);\n hash.update(data);\n return hash.digest();\n}","import \"core-js/modules/es.array.sort.js\";\nimport { __values } from \"tslib\";\nimport { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from \"./constants\";\n/**\n * @internal\n */\nexport function getCanonicalHeaders(_a, unsignableHeaders, signableHeaders) {\n var e_1, _b;\n var headers = _a.headers;\n var canonical = {};\n try {\n for (var _c = __values(Object.keys(headers).sort()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var headerName = _d.value;\n var canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return canonical;\n}","import { __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayBuffer } from \"@aws-sdk/is-array-buffer\";\nimport { toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\n/**\n * @internal\n */\nexport function getPayloadHash(_a, hashConstructor) {\n var headers = _a.headers,\n body = _a.body;\n return __awaiter(this, void 0, void 0, function () {\n var _b, _c, headerName, hashCtor, _d;\n var e_1, _e;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0:\n try {\n for (_b = __values(Object.keys(headers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n headerName = _c.value;\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return [2 /*return*/, headers[headerName]];\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_e = _b.return)) _e.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n if (!(body == undefined)) return [3 /*break*/, 1];\n return [2 /*return*/, \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"];\n case 1:\n if (!(typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body))) return [3 /*break*/, 3];\n hashCtor = new hashConstructor();\n hashCtor.update(body);\n _d = toHex;\n return [4 /*yield*/, hashCtor.digest()];\n case 2:\n return [2 /*return*/, _d.apply(void 0, [_f.sent()])];\n case 3:\n // As any defined body that is not a string or binary data is a stream, this\n // body is unsignable. Attempt to send the request with an unsigned payload,\n // which may or may not be accepted by the service.\n return [2 /*return*/, UNSIGNED_PAYLOAD];\n }\n });\n });\n}","export var isArrayBuffer = function isArrayBuffer(arg) {\n return typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n};","import { __assign, __read, __rest, __spread } from \"tslib\";\n/**\n * @internal\n */\nexport function cloneRequest(_a) {\n var headers = _a.headers,\n query = _a.query,\n rest = __rest(_a, [\"headers\", \"query\"]);\n return __assign(__assign({}, rest), {\n headers: __assign({}, headers),\n query: query ? cloneQuery(query) : undefined\n });\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce(function (carry, paramName) {\n var _a;\n var param = query[paramName];\n return __assign(__assign({}, carry), (_a = {}, _a[paramName] = Array.isArray(param) ? __spread(param) : param, _a));\n }, {});\n}","import { __values } from \"tslib\";\nimport { cloneRequest } from \"./cloneRequest\";\nimport { GENERATED_HEADERS } from \"./constants\";\n/**\n * @internal\n */\nexport function prepareRequest(request) {\n var e_1, _a;\n // Create a clone of the request object that does not clone the body\n request = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request);\n try {\n for (var _b = __values(Object.keys(request.headers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var headerName = _c.value;\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return request;\n}","export function iso8601(time) {\n return toDate(time).toISOString().replace(/\\.\\d{3}Z$/, \"Z\");\n}\nexport function toDate(time) {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n}","import \"core-js/modules/es.array.sort.js\";\nimport { __awaiter, __generator } from \"tslib\";\nimport { toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM } from \"./constants\";\nimport { createScope, getSigningKey } from \"./credentialDerivation\";\nimport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nimport { getCanonicalQuery } from \"./getCanonicalQuery\";\nimport { getPayloadHash } from \"./getPayloadHash\";\nimport { hasHeader } from \"./hasHeader\";\nimport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nimport { prepareRequest } from \"./prepareRequest\";\nimport { iso8601 } from \"./utilDate\";\nvar SignatureV4 = /** @class */function () {\n function SignatureV4(_a) {\n var applyChecksum = _a.applyChecksum,\n credentials = _a.credentials,\n region = _a.region,\n service = _a.service,\n sha256 = _a.sha256,\n _b = _a.uriEscapePath,\n uriEscapePath = _b === void 0 ? true : _b;\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n // default to true if applyChecksum isn't set\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeRegionProvider(region);\n this.credentialProvider = normalizeCredentialsProvider(credentials);\n }\n SignatureV4.prototype.presign = function (originalRequest, options) {\n if (options === void 0) {\n options = {};\n }\n return __awaiter(this, void 0, void 0, function () {\n var _a, signingDate, _b, expiresIn, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, credentials, region, _c, _d, longDate, shortDate, scope, request, canonicalHeaders, _e, _f, _g, _h, _j, _k;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n _a = options.signingDate, signingDate = _a === void 0 ? new Date() : _a, _b = options.expiresIn, expiresIn = _b === void 0 ? 3600 : _b, unsignableHeaders = options.unsignableHeaders, unhoistableHeaders = options.unhoistableHeaders, signableHeaders = options.signableHeaders, signingRegion = options.signingRegion, signingService = options.signingService;\n return [4 /*yield*/, this.credentialProvider()];\n case 1:\n credentials = _l.sent();\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 2];\n _c = signingRegion;\n return [3 /*break*/, 4];\n case 2:\n return [4 /*yield*/, this.regionProvider()];\n case 3:\n _c = _l.sent();\n _l.label = 4;\n case 4:\n region = _c;\n _d = formatDate(signingDate), longDate = _d.longDate, shortDate = _d.shortDate;\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return [2 /*return*/, Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\")];\n }\n scope = createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n request = moveHeadersToQuery(prepareRequest(originalRequest), {\n unhoistableHeaders: unhoistableHeaders\n });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = credentials.accessKeyId + \"/\" + scope;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);\n _e = request.query;\n _f = SIGNATURE_QUERY_PARAM;\n _g = this.getSignature;\n _h = [longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService)];\n _j = this.createCanonicalRequest;\n _k = [request, canonicalHeaders];\n return [4 /*yield*/, getPayloadHash(originalRequest, this.sha256)];\n case 5:\n return [4 /*yield*/, _g.apply(this, _h.concat([_j.apply(this, _k.concat([_l.sent()]))]))];\n case 6:\n _e[_f] = _l.sent();\n return [2 /*return*/, request];\n }\n });\n });\n };\n SignatureV4.prototype.sign = function (toSign, options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (typeof toSign === \"string\") {\n return [2 /*return*/, this.signString(toSign, options)];\n } else if (toSign.headers && toSign.payload) {\n return [2 /*return*/, this.signEvent(toSign, options)];\n } else {\n return [2 /*return*/, this.signRequest(toSign, options)];\n }\n return [2 /*return*/];\n });\n });\n };\n SignatureV4.prototype.signEvent = function (_a, _b) {\n var headers = _a.headers,\n payload = _a.payload;\n var _c = _b.signingDate,\n signingDate = _c === void 0 ? new Date() : _c,\n priorSignature = _b.priorSignature,\n signingRegion = _b.signingRegion,\n signingService = _b.signingService;\n return __awaiter(this, void 0, void 0, function () {\n var region, _d, _e, shortDate, longDate, scope, hashedPayload, hash, hashedHeaders, _f, stringToSign;\n return __generator(this, function (_g) {\n switch (_g.label) {\n case 0:\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 1];\n _d = signingRegion;\n return [3 /*break*/, 3];\n case 1:\n return [4 /*yield*/, this.regionProvider()];\n case 2:\n _d = _g.sent();\n _g.label = 3;\n case 3:\n region = _d;\n _e = formatDate(signingDate), shortDate = _e.shortDate, longDate = _e.longDate;\n scope = createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n return [4 /*yield*/, getPayloadHash({\n headers: {},\n body: payload\n }, this.sha256)];\n case 4:\n hashedPayload = _g.sent();\n hash = new this.sha256();\n hash.update(headers);\n _f = toHex;\n return [4 /*yield*/, hash.digest()];\n case 5:\n hashedHeaders = _f.apply(void 0, [_g.sent()]);\n stringToSign = [EVENT_ALGORITHM_IDENTIFIER, longDate, scope, priorSignature, hashedHeaders, hashedPayload].join(\"\\n\");\n return [2 /*return*/, this.signString(stringToSign, {\n signingDate: signingDate,\n signingRegion: region,\n signingService: signingService\n })];\n }\n });\n });\n };\n SignatureV4.prototype.signString = function (stringToSign, _a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.signingDate,\n signingDate = _c === void 0 ? new Date() : _c,\n signingRegion = _b.signingRegion,\n signingService = _b.signingService;\n return __awaiter(this, void 0, void 0, function () {\n var credentials, region, _d, shortDate, hash, _e, _f, _g;\n return __generator(this, function (_h) {\n switch (_h.label) {\n case 0:\n return [4 /*yield*/, this.credentialProvider()];\n case 1:\n credentials = _h.sent();\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 2];\n _d = signingRegion;\n return [3 /*break*/, 4];\n case 2:\n return [4 /*yield*/, this.regionProvider()];\n case 3:\n _d = _h.sent();\n _h.label = 4;\n case 4:\n region = _d;\n shortDate = formatDate(signingDate).shortDate;\n _f = (_e = this.sha256).bind;\n return [4 /*yield*/, this.getSigningKey(credentials, region, shortDate, signingService)];\n case 5:\n hash = new (_f.apply(_e, [void 0, _h.sent()]))();\n hash.update(stringToSign);\n _g = toHex;\n return [4 /*yield*/, hash.digest()];\n case 6:\n return [2 /*return*/, _g.apply(void 0, [_h.sent()])];\n }\n });\n });\n };\n SignatureV4.prototype.signRequest = function (requestToSign, _a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.signingDate,\n signingDate = _c === void 0 ? new Date() : _c,\n signableHeaders = _b.signableHeaders,\n unsignableHeaders = _b.unsignableHeaders,\n signingRegion = _b.signingRegion,\n signingService = _b.signingService;\n return __awaiter(this, void 0, void 0, function () {\n var credentials, region, _d, request, _e, longDate, shortDate, scope, payloadHash, canonicalHeaders, signature;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0:\n return [4 /*yield*/, this.credentialProvider()];\n case 1:\n credentials = _f.sent();\n if (!(signingRegion !== null && signingRegion !== void 0)) return [3 /*break*/, 2];\n _d = signingRegion;\n return [3 /*break*/, 4];\n case 2:\n return [4 /*yield*/, this.regionProvider()];\n case 3:\n _d = _f.sent();\n _f.label = 4;\n case 4:\n region = _d;\n request = prepareRequest(requestToSign);\n _e = formatDate(signingDate), longDate = _e.longDate, shortDate = _e.shortDate;\n scope = createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n return [4 /*yield*/, getPayloadHash(request, this.sha256)];\n case 5:\n payloadHash = _f.sent();\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n return [4 /*yield*/, this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash))];\n case 6:\n signature = _f.sent();\n request.headers[AUTH_HEADER] = ALGORITHM_IDENTIFIER + \" \" + (\"Credential=\" + credentials.accessKeyId + \"/\" + scope + \", \") + (\"SignedHeaders=\" + getCanonicalHeaderList(canonicalHeaders) + \", \") + (\"Signature=\" + signature);\n return [2 /*return*/, request];\n }\n });\n });\n };\n SignatureV4.prototype.createCanonicalRequest = function (request, canonicalHeaders, payloadHash) {\n var sortedHeaders = Object.keys(canonicalHeaders).sort();\n return request.method + \"\\n\" + this.getCanonicalPath(request) + \"\\n\" + getCanonicalQuery(request) + \"\\n\" + sortedHeaders.map(function (name) {\n return name + \":\" + canonicalHeaders[name];\n }).join(\"\\n\") + \"\\n\\n\" + sortedHeaders.join(\";\") + \"\\n\" + payloadHash;\n };\n SignatureV4.prototype.createStringToSign = function (longDate, credentialScope, canonicalRequest) {\n return __awaiter(this, void 0, void 0, function () {\n var hash, hashedRequest;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n hash = new this.sha256();\n hash.update(canonicalRequest);\n return [4 /*yield*/, hash.digest()];\n case 1:\n hashedRequest = _a.sent();\n return [2 /*return*/, ALGORITHM_IDENTIFIER + \"\\n\" + longDate + \"\\n\" + credentialScope + \"\\n\" + toHex(hashedRequest)];\n }\n });\n });\n };\n SignatureV4.prototype.getCanonicalPath = function (_a) {\n var path = _a.path;\n if (this.uriEscapePath) {\n var doubleEncoded = encodeURIComponent(path.replace(/^\\//, \"\"));\n return \"/\" + doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n };\n SignatureV4.prototype.getSignature = function (longDate, credentialScope, keyPromise, canonicalRequest) {\n return __awaiter(this, void 0, void 0, function () {\n var stringToSign, hash, _a, _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n return [4 /*yield*/, this.createStringToSign(longDate, credentialScope, canonicalRequest)];\n case 1:\n stringToSign = _d.sent();\n _b = (_a = this.sha256).bind;\n return [4 /*yield*/, keyPromise];\n case 2:\n hash = new (_b.apply(_a, [void 0, _d.sent()]))();\n hash.update(stringToSign);\n _c = toHex;\n return [4 /*yield*/, hash.digest()];\n case 3:\n return [2 /*return*/, _c.apply(void 0, [_d.sent()])];\n }\n });\n });\n };\n SignatureV4.prototype.getSigningKey = function (credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n };\n return SignatureV4;\n}();\nexport { SignatureV4 };\nvar formatDate = function formatDate(now) {\n var longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate: longDate,\n shortDate: longDate.substr(0, 8)\n };\n};\nvar getCanonicalHeaderList = function getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n};\nvar normalizeRegionProvider = function normalizeRegionProvider(region) {\n if (typeof region === \"string\") {\n var promisified_1 = Promise.resolve(region);\n return function () {\n return promisified_1;\n };\n } else {\n return region;\n }\n};\nvar normalizeCredentialsProvider = function normalizeCredentialsProvider(credentials) {\n if (typeof credentials === \"object\") {\n var promisified_2 = Promise.resolve(credentials);\n return function () {\n return promisified_2;\n };\n } else {\n return credentials;\n }\n};","import { __assign, __values } from \"tslib\";\nimport { cloneRequest } from \"./cloneRequest\";\n/**\n * @internal\n */\nexport function moveHeadersToQuery(request, options) {\n var e_1, _a;\n var _b;\n if (options === void 0) {\n options = {};\n }\n var _c = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request),\n headers = _c.headers,\n _d = _c.query,\n query = _d === void 0 ? {} : _d;\n try {\n for (var _e = __values(Object.keys(headers)), _f = _e.next(); !_f.done; _f = _e.next()) {\n var name = _f.value;\n var lname = name.toLowerCase();\n if (lname.substr(0, 6) === \"x-amz-\" && !((_b = options.unhoistableHeaders) === null || _b === void 0 ? void 0 : _b.has(lname))) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_f && !_f.done && (_a = _e.return)) _a.call(_e);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return __assign(__assign({}, request), {\n headers: headers,\n query: query\n });\n}","import { __values } from \"tslib\";\nexport function hasHeader(soughtHeader, headers) {\n var e_1, _a;\n soughtHeader = soughtHeader.toLowerCase();\n try {\n for (var _b = __values(Object.keys(headers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var headerName = _c.value;\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return false;\n}","import \"core-js/modules/es.array.sort.js\";\nimport { __values } from \"tslib\";\nimport { escapeUri } from \"@aws-sdk/util-uri-escape\";\nimport { SIGNATURE_HEADER } from \"./constants\";\n/**\n * @internal\n */\nexport function getCanonicalQuery(_a) {\n var e_1, _b;\n var _c = _a.query,\n query = _c === void 0 ? {} : _c;\n var keys = [];\n var serialized = {};\n var _loop_1 = function _loop_1(key) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n return \"continue\";\n }\n keys.push(key);\n var value = query[key];\n if (typeof value === \"string\") {\n serialized[key] = escapeUri(key) + \"=\" + escapeUri(value);\n } else if (Array.isArray(value)) {\n serialized[key] = value.slice(0).sort().reduce(function (encoded, value) {\n return encoded.concat([escapeUri(key) + \"=\" + escapeUri(value)]);\n }, []).join(\"&\");\n }\n };\n try {\n for (var _d = __values(Object.keys(query).sort()), _e = _d.next(); !_e.done; _e = _d.next()) {\n var key = _e.value;\n _loop_1(key);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_e && !_e.done && (_b = _d.return)) _b.call(_d);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return keys.map(function (key) {\n return serialized[key];\n }).filter(function (serialized) {\n return serialized;\n }) // omit any falsy values\n .join(\"&\");\n}","import \"core-js/modules/es.array.sort.js\";\nimport { __assign, __read, __spread, __values } from \"tslib\";\nvar _constructStack = function constructStack() {\n var absoluteEntries = [];\n var relativeEntries = [];\n var entriesNameSet = new Set();\n var sort = function sort(entries) {\n return entries.sort(function (a, b) {\n return stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"];\n });\n };\n var removeByName = function removeByName(toRemove) {\n var isRemoved = false;\n var filterCb = function filterCb(entry) {\n if (entry.name && entry.name === toRemove) {\n isRemoved = true;\n entriesNameSet.delete(toRemove);\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n var removeByReference = function removeByReference(toRemove) {\n var isRemoved = false;\n var filterCb = function filterCb(entry) {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n if (entry.name) entriesNameSet.delete(entry.name);\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n var cloneTo = function cloneTo(toStack) {\n absoluteEntries.forEach(function (entry) {\n //@ts-ignore\n toStack.add(entry.middleware, __assign({}, entry));\n });\n relativeEntries.forEach(function (entry) {\n //@ts-ignore\n toStack.addRelativeTo(entry.middleware, __assign({}, entry));\n });\n return toStack;\n };\n var _expandRelativeMiddlewareList = function expandRelativeMiddlewareList(from) {\n var expandedMiddlewareList = [];\n from.before.forEach(function (entry) {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push.apply(expandedMiddlewareList, __spread(_expandRelativeMiddlewareList(entry)));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach(function (entry) {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push.apply(expandedMiddlewareList, __spread(_expandRelativeMiddlewareList(entry)));\n }\n });\n return expandedMiddlewareList;\n };\n /**\n * Get a final list of middleware in the order of being executed in the resolved handler.\n */\n var getMiddlewareList = function getMiddlewareList() {\n var normalizedAbsoluteEntries = [];\n var normalizedRelativeEntries = [];\n var normalizedEntriesNameMap = {};\n absoluteEntries.forEach(function (entry) {\n var normalizedEntry = __assign(__assign({}, entry), {\n before: [],\n after: []\n });\n if (normalizedEntry.name) normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach(function (entry) {\n var normalizedEntry = __assign(__assign({}, entry), {\n before: [],\n after: []\n });\n if (normalizedEntry.name) normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach(function (entry) {\n if (entry.toMiddleware) {\n var toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n throw new Error(entry.toMiddleware + \" is not found when adding \" + (entry.name || \"anonymous\") + \" middleware \" + entry.relation + \" \" + entry.toMiddleware);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n var mainChain = sort(normalizedAbsoluteEntries).map(_expandRelativeMiddlewareList).reduce(function (wholeList, expendedMiddlewareList) {\n // TODO: Replace it with Array.flat();\n wholeList.push.apply(wholeList, __spread(expendedMiddlewareList));\n return wholeList;\n }, []);\n return mainChain.map(function (entry) {\n return entry.middleware;\n });\n };\n var stack = {\n add: function add(middleware, options) {\n if (options === void 0) {\n options = {};\n }\n var name = options.name,\n override = options.override;\n var entry = __assign({\n step: \"initialize\",\n priority: \"normal\",\n middleware: middleware\n }, options);\n if (name) {\n if (entriesNameSet.has(name)) {\n if (!override) throw new Error(\"Duplicate middleware name '\" + name + \"'\");\n var toOverrideIndex = absoluteEntries.findIndex(function (entry) {\n return entry.name === name;\n });\n var toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || toOverride.priority !== entry.priority) {\n throw new Error(\"\\\"\" + name + \"\\\" middleware with \" + toOverride.priority + \" priority in \" + toOverride.step + \" step cannot be \" + (\"overridden by same-name middleware with \" + entry.priority + \" priority in \" + entry.step + \" step.\"));\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n entriesNameSet.add(name);\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: function addRelativeTo(middleware, options) {\n var name = options.name,\n override = options.override;\n var entry = __assign({\n middleware: middleware\n }, options);\n if (name) {\n if (entriesNameSet.has(name)) {\n if (!override) throw new Error(\"Duplicate middleware name '\" + name + \"'\");\n var toOverrideIndex = relativeEntries.findIndex(function (entry) {\n return entry.name === name;\n });\n var toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\"\\\"\" + name + \"\\\" middleware \" + toOverride.relation + \" \\\"\" + toOverride.toMiddleware + \"\\\" middleware cannot be overridden \" + (\"by same-name middleware \" + entry.relation + \" \\\"\" + entry.toMiddleware + \"\\\" middleware.\"));\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n entriesNameSet.add(name);\n }\n relativeEntries.push(entry);\n },\n clone: function clone() {\n return cloneTo(_constructStack());\n },\n use: function use(plugin) {\n plugin.applyToStack(stack);\n },\n remove: function remove(toRemove) {\n if (typeof toRemove === \"string\") return removeByName(toRemove);else return removeByReference(toRemove);\n },\n removeByTag: function removeByTag(toRemove) {\n var isRemoved = false;\n var filterCb = function filterCb(entry) {\n var tags = entry.tags,\n name = entry.name;\n if (tags && tags.includes(toRemove)) {\n if (name) entriesNameSet.delete(name);\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: function concat(from) {\n var cloned = cloneTo(_constructStack());\n cloned.use(from);\n return cloned;\n },\n applyToStack: cloneTo,\n resolve: function resolve(handler, context) {\n var e_1, _a;\n try {\n for (var _b = __values(getMiddlewareList().reverse()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var middleware = _c.value;\n handler = middleware(handler, context);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return handler;\n }\n };\n return stack;\n};\nexport { _constructStack as constructStack };\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1\n};","import { constructStack } from \"@aws-sdk/middleware-stack\";\nvar Client = /** @class */function () {\n function Client(config) {\n this.middlewareStack = constructStack();\n this.config = config;\n }\n Client.prototype.send = function (command, optionsOrCb, cb) {\n var options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n var callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n var handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n if (callback) {\n handler(command).then(function (result) {\n return callback(null, result.output);\n }, function (err) {\n return callback(err);\n }).catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n function () {});\n } else {\n return handler(command).then(function (result) {\n return result.output;\n });\n }\n };\n Client.prototype.destroy = function () {\n if (this.config.requestHandler.destroy) this.config.requestHandler.destroy();\n };\n return Client;\n}();\nexport { Client };","import { constructStack } from \"@aws-sdk/middleware-stack\";\nvar Command = /** @class */function () {\n function Command() {\n this.middlewareStack = constructStack();\n }\n return Command;\n}();\nexport { Command };","/**\n * Function that wraps encodeURIComponent to encode additional characters\n * to fully adhere to RFC 3986.\n */\nexport function extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16);\n });\n}","/**\n * The XML parser will set one K:V for a member that could\n * return multiple entries but only has one.\n */\nexport var getArrayIfSingleItem = function getArrayIfSingleItem(mayBeArray) {\n return Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\n};","/**\n * Recursively parses object and populates value is node from\n * \"#text\" key if it's available\n */\nvar _getValueFromTextNode = function getValueFromTextNode(obj) {\n var textNodeName = \"#text\";\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {\n obj[key] = obj[key][textNodeName];\n } else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = _getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n};\nexport { _getValueFromTextNode as getValueFromTextNode };","/**\n * Lazy String holder for JSON typed contents.\n */\nimport { __extends, __read, __spread } from \"tslib\";\n/**\n * Because of https://github.com/microsoft/tslib/issues/95,\n * TS 'extends' shim doesn't support extending native types like String.\n * So here we create StringWrapper that duplicate everything from String\n * class including its prototype chain. So we can extend from here.\n */\n// @ts-ignore StringWrapper implementation is not a simple constructor\nexport var StringWrapper = function StringWrapper() {\n //@ts-ignore 'this' cannot be assigned to any, but Object.getPrototypeOf accepts any\n var Class = Object.getPrototypeOf(this).constructor;\n var Constructor = Function.bind.apply(String, __spread([null], arguments));\n //@ts-ignore Call wrapped String constructor directly, don't bother typing it.\n var instance = new Constructor();\n Object.setPrototypeOf(instance, Class.prototype);\n return instance;\n};\nStringWrapper.prototype = Object.create(String.prototype, {\n constructor: {\n value: StringWrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n});\nObject.setPrototypeOf(StringWrapper, String);\nvar LazyJsonString = /** @class */function (_super) {\n __extends(LazyJsonString, _super);\n function LazyJsonString() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LazyJsonString.prototype.deserializeJSON = function () {\n return JSON.parse(_super.prototype.toString.call(this));\n };\n LazyJsonString.prototype.toJSON = function () {\n return _super.prototype.toString.call(this);\n };\n LazyJsonString.fromObject = function (object) {\n if (object instanceof LazyJsonString) {\n return object;\n } else if (object instanceof String || typeof object === \"string\") {\n return new LazyJsonString(object);\n }\n return new LazyJsonString(JSON.stringify(object));\n };\n return LazyJsonString;\n}(StringWrapper);\nexport { LazyJsonString };","/**\n * Builds a proper UTC HttpDate timestamp from a Date object\n * since not all environments will have this as the expected\n * format.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString\n * > Prior to ECMAScript 2018, the format of the return value\n * > varied according to the platform. The most common return\n * > value was an RFC-1123 formatted date stamp, which is a\n * > slightly updated version of RFC-822 date stamps.\n */\n// Build indexes outside so we allocate them once.\nvar days = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n// prettier-ignore\nvar months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n var year = date.getUTCFullYear();\n var month = date.getUTCMonth();\n var dayOfWeek = date.getUTCDay();\n var dayOfMonthInt = date.getUTCDate();\n var hoursInt = date.getUTCHours();\n var minutesInt = date.getUTCMinutes();\n var secondsInt = date.getUTCSeconds();\n // Build 0 prefixed strings for contents that need to be\n // two digits and where we get an integer back.\n var dayOfMonthString = dayOfMonthInt < 10 ? \"0\" + dayOfMonthInt : \"\" + dayOfMonthInt;\n var hoursString = hoursInt < 10 ? \"0\" + hoursInt : \"\" + hoursInt;\n var minutesString = minutesInt < 10 ? \"0\" + minutesInt : \"\" + minutesInt;\n var secondsString = secondsInt < 10 ? \"0\" + secondsInt : \"\" + secondsInt;\n return days[dayOfWeek] + \", \" + dayOfMonthString + \" \" + months[month] + \" \" + year + \" \" + hoursString + \":\" + minutesString + \":\" + secondsString + \" GMT\";\n}","export var SENSITIVE_STRING = \"***SensitiveInformation***\";","import { parseQueryString } from \"@aws-sdk/querystring-parser\";\nexport var parseUrl = function parseUrl(url) {\n var _a = new URL(url),\n hostname = _a.hostname,\n pathname = _a.pathname,\n port = _a.port,\n protocol = _a.protocol,\n search = _a.search;\n var query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname: hostname,\n port: port ? parseInt(port) : undefined,\n protocol: protocol,\n path: pathname,\n query: query\n };\n};","import { __read, __values } from \"tslib\";\nexport function parseQueryString(querystring) {\n var e_1, _a;\n var query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n try {\n for (var _b = __values(querystring.split(\"&\")), _c = _b.next(); !_c.done; _c = _b.next()) {\n var pair = _c.value;\n var _d = __read(pair.split(\"=\"), 2),\n key = _d[0],\n _e = _d[1],\n value = _e === void 0 ? null : _e;\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }\n return query;\n}","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nvar alphabetByEncoding = {};\nvar alphabetByValue = new Array(64);\nfor (var i = 0, start = \"A\".charCodeAt(0), limit = \"Z\".charCodeAt(0); i + start <= limit; i++) {\n var char = String.fromCharCode(i + start);\n alphabetByEncoding[char] = i;\n alphabetByValue[i] = char;\n}\nfor (var i = 0, start = \"a\".charCodeAt(0), limit = \"z\".charCodeAt(0); i + start <= limit; i++) {\n var char = String.fromCharCode(i + start);\n var index = i + 26;\n alphabetByEncoding[char] = index;\n alphabetByValue[index] = char;\n}\nfor (var i = 0; i < 10; i++) {\n alphabetByEncoding[i.toString(10)] = i + 52;\n var char = i.toString(10);\n var index = i + 52;\n alphabetByEncoding[char] = index;\n alphabetByValue[index] = char;\n}\nalphabetByEncoding[\"+\"] = 62;\nalphabetByValue[62] = \"+\";\nalphabetByEncoding[\"/\"] = 63;\nalphabetByValue[63] = \"/\";\nvar bitsPerLetter = 6;\nvar bitsPerByte = 8;\nvar maxLetterValue = 63;\n/**\n * Converts a base-64 encoded string to a Uint8Array of bytes.\n *\n * @param input The base-64 encoded string\n *\n * @see https://tools.ietf.org/html/rfc4648#section-4\n */\nexport function fromBase64(input) {\n var totalByteLength = input.length / 4 * 3;\n if (input.substr(-2) === \"==\") {\n totalByteLength -= 2;\n } else if (input.substr(-1) === \"=\") {\n totalByteLength--;\n }\n var out = new ArrayBuffer(totalByteLength);\n var dataView = new DataView(out);\n for (var i = 0; i < input.length; i += 4) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n bits |= alphabetByEncoding[input[j]] << (limit - j) * bitsPerLetter;\n bitLength += bitsPerLetter;\n } else {\n bits >>= bitsPerLetter;\n }\n }\n var chunkOffset = i / 4 * 3;\n bits >>= bitLength % bitsPerByte;\n var byteLength = Math.floor(bitLength / bitsPerByte);\n for (var k = 0; k < byteLength; k++) {\n var offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & 255 << offset) >> offset);\n }\n }\n return new Uint8Array(out);\n}\n/**\n * Converts a Uint8Array of binary data to a base-64 encoded string.\n *\n * @param input The binary data to encode\n *\n * @see https://tools.ietf.org/html/rfc4648#section-4\n */\nexport function toBase64(input) {\n var str = \"\";\n for (var i = 0; i < input.length; i += 3) {\n var bits = 0;\n var bitLength = 0;\n for (var j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << (limit - j - 1) * bitsPerByte;\n bitLength += bitsPerByte;\n }\n var bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (var k = 1; k <= bitClusterCount; k++) {\n var offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & maxLetterValue << offset) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}","export function calculateBodyLength(body) {\n if (typeof body === \"string\") {\n var len = body.length;\n for (var i = len - 1; i >= 0; i--) {\n var code = body.charCodeAt(i);\n if (code > 0x7f && code <= 0x7ff) len++;else if (code > 0x7ff && code <= 0xffff) len += 2;\n }\n return len;\n } else if (typeof body.byteLength === \"number\") {\n // handles Uint8Array, ArrayBuffer, Buffer, and ArrayBufferView\n return body.byteLength;\n } else if (typeof body.size === \"number\") {\n // handles browser File object\n return body.size;\n }\n}","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (var i = 0; i < 256; i++) {\n var 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/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\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 var out = new Uint8Array(encoded.length / 2);\n for (var i = 0; i < encoded.length; i += 2) {\n var encodedByte = encoded.substr(i, 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(\"Cannot decode unrecognized sequence \" + encodedByte + \" as hexadecimal\");\n }\n }\n return out;\n}\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nexport function toHex(bytes) {\n var out = \"\";\n for (var i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}","var fallbackWindow = {};\nexport function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n } else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}","export var escapeUri = function escapeUri(uri) {\n // AWS percent-encodes some extra non-standard characters in a URI\n return encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\n};\nvar hexEncode = function hexEncode(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n};","import { __awaiter, __generator } from \"tslib\";\nimport bowser from \"bowser\";\n/**\n * Default provider to the user agent in browsers. It's a best effort to infer\n * the device information. It uses bowser library to detect the browser and virsion\n */\nexport var defaultUserAgent = function defaultUserAgent(_a) {\n var serviceId = _a.serviceId,\n clientVersion = _a.clientVersion;\n return function () {\n return __awaiter(void 0, void 0, void 0, function () {\n var parsedUA, sections;\n var _a, _b, _c, _d, _e, _f, _g;\n return __generator(this, function (_h) {\n parsedUA = ((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) ? bowser.parse(window.navigator.userAgent) : undefined;\n sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // os-metadata\n [\"os/\" + (((_b = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _b === void 0 ? void 0 : _b.name) || \"other\"), (_c = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _c === void 0 ? void 0 : _c.version],\n // language-metadata\n // ECMAScript edition doesn't matter in JS.\n [\"lang/js\"],\n // browser vendor and version.\n [\"md/browser\", ((_e = (_d = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : \"unknown\") + \"_\" + ((_g = (_f = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _f === void 0 ? void 0 : _f.version) !== null && _g !== void 0 ? _g : \"unknown\")]];\n if (serviceId) {\n // api-metadata\n // service Id may not appear in non-AWS clients\n sections.push([\"api/\" + serviceId, clientVersion]);\n }\n return [2 /*return*/, sections];\n });\n });\n };\n};","import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from \"./pureJs\";\nimport { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from \"./whatwgEncodingApi\";\nexport var fromUtf8 = function fromUtf8(input) {\n return typeof TextEncoder === \"function\" ? textEncoderFromUtf8(input) : jsFromUtf8(input);\n};\nexport var toUtf8 = function toUtf8(input) {\n return typeof TextDecoder === \"function\" ? textEncoderToUtf8(input) : jsToUtf8(input);\n};","export function fromUtf8(input) {\n return new TextEncoder().encode(input);\n}\nexport function toUtf8(input) {\n return new TextDecoder(\"utf-8\").decode(input);\n}","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\n/**\n * Converts a JS string from its native UCS-2/UTF-16 representation into a\n * Uint8Array of the bytes used to represent the equivalent characters in UTF-8.\n *\n * Cribbed from the `goog.crypt.stringToUtf8ByteArray` function in the Google\n * Closure library, though updated to use typed arrays.\n */\nexport var fromUtf8 = function fromUtf8(input) {\n var bytes = [];\n for (var i = 0, len = input.length; i < len; i++) {\n var value = input.charCodeAt(i);\n if (value < 0x80) {\n bytes.push(value);\n } else if (value < 0x800) {\n bytes.push(value >> 6 | 192, value & 63 | 128);\n } else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n var surrogatePair = 0x10000 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);\n bytes.push(surrogatePair >> 18 | 240, surrogatePair >> 12 & 63 | 128, surrogatePair >> 6 & 63 | 128, surrogatePair & 63 | 128);\n } else {\n bytes.push(value >> 12 | 224, value >> 6 & 63 | 128, value & 63 | 128);\n }\n }\n return Uint8Array.from(bytes);\n};\n/**\n * Converts a typed array of bytes containing UTF-8 data into a native JS\n * string.\n *\n * Partly cribbed from the `goog.crypt.utf8ByteArrayToString` function in the\n * Google Closure library, though updated to use typed arrays and to better\n * handle astral plane code points.\n */\nexport var toUtf8 = function toUtf8(input) {\n var decoded = \"\";\n for (var i = 0, len = input.length; i < len; i++) {\n var byte = input[i];\n if (byte < 0x80) {\n decoded += String.fromCharCode(byte);\n } else if (192 <= byte && byte < 224) {\n var nextByte = input[++i];\n decoded += String.fromCharCode((byte & 31) << 6 | nextByte & 63);\n } else if (240 <= byte && byte < 365) {\n var surrogatePair = [byte, input[++i], input[++i], input[++i]];\n var encoded = \"%\" + surrogatePair.map(function (byteValue) {\n return byteValue.toString(16);\n }).join(\"%\");\n decoded += decodeURIComponent(encoded);\n } else {\n decoded += String.fromCharCode((byte & 15) << 12 | (input[++i] & 63) << 6 | input[++i] & 63);\n }\n }\n return decoded;\n};","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nvar AuthenticationDetails = /*#__PURE__*/function () {\n /**\n * Constructs a new AuthenticationDetails object\n * @param {object=} data Creation options.\n * @param {string} data.Username User being authenticated.\n * @param {string} data.Password Plain-text password to authenticate with.\n * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.\n * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.\n */\n function AuthenticationDetails(data) {\n var _ref = data || {},\n ValidationData = _ref.ValidationData,\n Username = _ref.Username,\n Password = _ref.Password,\n AuthParameters = _ref.AuthParameters,\n ClientMetadata = _ref.ClientMetadata;\n this.validationData = ValidationData || {};\n this.authParameters = AuthParameters || {};\n this.clientMetadata = ClientMetadata || {};\n this.username = Username;\n this.password = Password;\n }\n /**\n * @returns {string} the record's username\n */\n\n var _proto = AuthenticationDetails.prototype;\n _proto.getUsername = function getUsername() {\n return this.username;\n }\n /**\n * @returns {string} the record's password\n */;\n _proto.getPassword = function getPassword() {\n return this.password;\n }\n /**\n * @returns {Array} the record's validationData\n */;\n _proto.getValidationData = function getValidationData() {\n return this.validationData;\n }\n /**\n * @returns {Array} the record's authParameters\n */;\n _proto.getAuthParameters = function getAuthParameters() {\n return this.authParameters;\n }\n /**\n * @returns {ClientMetadata} the clientMetadata for a Lambda trigger\n */;\n _proto.getClientMetadata = function getClientMetadata() {\n return this.clientMetadata;\n };\n return AuthenticationDetails;\n}();\nexport { AuthenticationDetails as default };","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nvar crypto; // Native crypto from window (Browser)\n\nif (typeof window !== 'undefined' && window.crypto) {\n crypto = window.crypto;\n} // Native (experimental IE 11) crypto from window (Browser)\n\nif (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n crypto = window.msCrypto;\n} // Native crypto from global (NodeJS)\n\nif (!crypto && typeof global !== 'undefined' && global.crypto) {\n crypto = global.crypto;\n} // Native crypto import via require (NodeJS)\n\nif (!crypto && typeof require === 'function') {\n try {\n crypto = require('crypto');\n } catch (err) {}\n}\n/*\n * Cryptographically secure pseudorandom number generator\n * As Math.random() is cryptographically not safe to use\n */\n\nexport default function cryptoSecureRandomInt() {\n if (crypto) {\n // Use getRandomValues method (Browser)\n if (typeof crypto.getRandomValues === 'function') {\n try {\n return crypto.getRandomValues(new Uint32Array(1))[0];\n } catch (err) {}\n } // Use randomBytes method (NodeJS)\n\n if (typeof crypto.randomBytes === 'function') {\n try {\n return crypto.randomBytes(4).readInt32LE();\n } catch (err) {}\n }\n }\n throw new Error('Native crypto module could not be used to get secure random number.');\n}","import 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 */\n\nfunction hexStringify(wordArray) {\n // Shortcuts\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes; // Convert\n\n var hexChars = [];\n for (var i = 0; i < sigBytes; i++) {\n var 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}\nvar WordArray = /*#__PURE__*/function () {\n function WordArray(words, sigBytes) {\n words = this.words = words || [];\n if (sigBytes != undefined) {\n this.sigBytes = sigBytes;\n } else {\n this.sigBytes = words.length * 4;\n }\n }\n var _proto = WordArray.prototype;\n _proto.random = function random(nBytes) {\n var words = [];\n for (var i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n return new WordArray(words, nBytes);\n };\n _proto.toString = function toString() {\n return hexStringify(this);\n };\n return WordArray;\n}();\nexport { WordArray as default };","// 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\n\nfunction BigInteger(a, b) {\n if (a != null) this.fromString(a, b);\n} // return new, unset BigInteger\n\nfunction nbi() {\n return new BigInteger(null);\n} // Bits per digit\n\nvar dbits; // JavaScript engine analysis\n\nvar canary = 0xdeadbeefcafe;\nvar j_lm = (canary & 0xffffff) == 0xefcafe; // 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)\n\nfunction am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\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)\n\nfunction am2(i, x, w, j, c, n) {\n var xl = x & 0x7fff,\n xh = x >> 15;\n while (--n >= 0) {\n var l = this[i] & 0x7fff;\n var h = this[i++] >> 15;\n var 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} // Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\n\nfunction am3(i, x, w, j, c, n) {\n var xl = x & 0x3fff,\n xh = x >> 14;\n while (--n >= 0) {\n var l = this[i] & 0x3fff;\n var h = this[i++] >> 14;\n var 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}\nvar inBrowser = typeof navigator !== 'undefined';\nif (inBrowser && j_lm && navigator.appName == 'Microsoft Internet Explorer') {\n BigInteger.prototype.am = am2;\n dbits = 30;\n} else if (inBrowser && j_lm && navigator.appName != 'Netscape') {\n BigInteger.prototype.am = am1;\n dbits = 26;\n} else {\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;\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP; // Digit conversions\n\nvar BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';\nvar BI_RC = new Array();\nvar rr, vv;\nrr = '0'.charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = 'a'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = 'A'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n} // (protected) copy this to r\n\nfunction bnpCopyTo(r) {\n for (var i = this.t - 1; i >= 0; --i) {\n r[i] = this[i];\n }\n r.t = this.t;\n r.s = this.s;\n} // (protected) set from integer value x, -DV <= x < DV\n\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0) this[0] = x;else if (x < -1) this[0] = x + this.DV;else this.t = 0;\n} // return bigint initialized to value\n\nfunction nbv(i) {\n var r = nbi();\n r.fromInt(i);\n return r;\n} // (protected) set from string and radix\n\nfunction bnpFromString(s, b) {\n var k;\n if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n this.t = 0;\n this.s = 0;\n var i = s.length,\n mi = false,\n sh = 0;\n while (--i >= 0) {\n var x = 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;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) BigInteger.ZERO.subTo(this, this);\n} // (protected) clamp off excess high words\n\nfunction bnpClamp() {\n var 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\n\nfunction bnToString(b) {\n if (this.s < 0) return '-' + this.negate().toString(b);\n var k;\n if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n var km = (1 << k) - 1,\n d,\n m = false,\n r = '',\n i = this.t;\n var 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 } 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 += int2char(d);\n }\n }\n return m ? r : '0';\n} // (public) -this\n\nfunction bnNegate() {\n var r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n} // (public) |this|\n\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n} // (public) return + if this > a, - if this < a, 0 if equal\n\nfunction bnCompareTo(a) {\n var r = this.s - a.s;\n if (r != 0) return r;\n var i = this.t;\n r = i - a.t;\n if (r != 0) return this.s < 0 ? -r : r;\n while (--i >= 0) {\n if ((r = this[i] - a[i]) != 0) return r;\n }\n return 0;\n} // returns bit length of the integer x\n\nfunction nbits(x) {\n var r = 1,\n 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} // (public) return the number of bits in \"this\"\n\nfunction bnBitLength() {\n if (this.t <= 0) return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n} // (protected) r = this << n*DB\n\nfunction bnpDLShiftTo(n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + n] = this[i];\n }\n for (i = n - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r.t = this.t + n;\n r.s = this.s;\n} // (protected) r = this >> n*DB\n\nfunction bnpDRShiftTo(n, r) {\n for (var i = n; i < this.t; ++i) {\n r[i - n] = this[i];\n }\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n} // (protected) r = this << n\n\nfunction bnpLShiftTo(n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB),\n c = this.s << bs & this.DM,\n 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 }\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n} // (protected) r = this >> n\n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var 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} // (protected) r = this - a\n\nfunction bnpSubTo(a, r) {\n var i = 0,\n c = 0,\n 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;else if (c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n} // (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\n\nfunction bnpMultiplyTo(a, r) {\n var x = this.abs(),\n y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < y.t; ++i) {\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n }\n r.s = 0;\n r.clamp();\n if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n} // (protected) r = this^2, r != this (HAC 14.16)\n\nfunction bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < x.t - 1; ++i) {\n var 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} // (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.\n\nfunction bnpDivRemTo(m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) return;\n var 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 = nbi();\n var y = nbi(),\n ts = this.s,\n ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n\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 var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) return;\n var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt,\n d2 = (1 << this.F1) / yt,\n e = 1 << this.F2;\n var i = r.t,\n j = i - ys,\n 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); // \"negative\" y so we can replace sub with am later\n\n while (y.t < ys) {\n y[y.t++] = 0;\n }\n while (--j >= 0) {\n // Estimate quotient digit\n var 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 }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) BigInteger.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) r.rShiftTo(nsh, r); // Denormalize remainder\n\n if (ts < 0) BigInteger.ZERO.subTo(r, r);\n} // (public) this mod a\n\nfunction bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n return r;\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.\n\nfunction bnpInvDigit() {\n if (this.t < 1) return 0;\n var x = this[0];\n if ((x & 1) == 0) return 0;\n var y = x & 3; // y == 1/x mod 2^2\n\n y = y * (2 - (x & 0xf) * y) & 0xf; // y == 1/x mod 2^4\n\n y = y * (2 - (x & 0xff) * y) & 0xff; // y == 1/x mod 2^8\n\n y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff; // 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\n y = y * (2 - x * y % this.DV) % this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n\n return y > 0 ? this.DV - y : -y;\n}\nfunction bnEquals(a) {\n return this.compareTo(a) == 0;\n} // (protected) r = this + a\n\nfunction bnpAddTo(a, r) {\n var i = 0,\n c = 0,\n 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;else if (c < -1) r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n} // (public) this + a\n\nfunction bnAdd(a) {\n var r = nbi();\n this.addTo(a, r);\n return r;\n} // (public) this - a\n\nfunction bnSubtract(a) {\n var r = nbi();\n this.subTo(a, r);\n return r;\n} // (public) this * a\n\nfunction bnMultiply(a) {\n var r = nbi();\n this.multiplyTo(a, r);\n return r;\n} // (public) this / a\n\nfunction bnDivide(a) {\n var r = nbi();\n this.divRemTo(a, r, null);\n return r;\n} // Montgomery reduction\n\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} // xR mod m\n\nfunction montConvert(x) {\n var 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) this.m.subTo(r, r);\n return r;\n} // x/R mod m\n\nfunction montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n} // x = x/R mod m (HAC 14.32)\n\nfunction montReduce(x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) & x.DM; // use am to combine the multiply-shift-add into one call\n\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t); // propagate carry\n\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} // r = \"x^2/R mod m\"; x != r\n\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n} // r = \"xy/R mod m\"; x,y != r\n\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; // (public) this^e % m (HAC 14.85)\n\nfunction bnModPow(e, m, callback) {\n var i = e.bitLength(),\n k,\n r = nbv(1),\n z = new Montgomery(m);\n if (i <= 0) return r;else if (i < 18) k = 1;else if (i < 48) k = 3;else if (i < 144) k = 4;else if (i < 768) k = 5;else k = 6; // precomputation\n\n var g = new Array(),\n n = 3,\n k1 = k - 1,\n km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n var 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 var j = e.t - 1,\n w,\n is1 = true,\n r2 = nbi(),\n t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) w = e[j] >> i - k1 & km;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);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 var result = z.revert(r);\n callback(null, result);\n return result;\n} // protected\n\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; // public\n\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; // \"constants\"\n\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Buffer } from 'buffer';\nimport CryptoJS from 'crypto-js/core';\nimport 'crypto-js/lib-typedarrays'; // necessary for crypto js\n\nimport SHA256 from 'crypto-js/sha256';\nimport HmacSHA256 from 'crypto-js/hmac-sha256';\nimport WordArray from './utils/WordArray';\n/**\n * Returns a Buffer with a sequence of random nBytes\n *\n * @param {number} nBytes\n * @returns {Buffer} fixed-length sequence of random bytes\n */\n\nfunction randomBytes(nBytes) {\n return Buffer.from(new WordArray().random(nBytes).toString(), 'hex');\n}\nimport BigInteger from './BigInteger';\n/**\n * Tests if a hex string has it most significant bit set (case-insensitive regex)\n */\n\nvar HEX_MSB_REGEX = /^[89a-f]/i;\nvar initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' + '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' + 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' + 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' + 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' + 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' + '83655D23DCA3AD961C62F356208552BB9ED529077096966D' + '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' + 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' + 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' + '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' + 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' + 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' + 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' + 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' + '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\nvar newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.';\n/** @class */\n\nvar AuthenticationHelper = /*#__PURE__*/function () {\n /**\n * Constructs a new AuthenticationHelper object\n * @param {string} PoolName Cognito user pool name.\n */\n function AuthenticationHelper(PoolName) {\n this.N = new BigInteger(initN, 16);\n this.g = new BigInteger('2', 16);\n this.k = new BigInteger(this.hexHash(\"\" + this.padHex(this.N) + this.padHex(this.g)), 16);\n this.smallAValue = this.generateRandomSmallA();\n this.getLargeAValue(function () {});\n this.infoBits = Buffer.from('Caldera Derived Key', 'utf8');\n this.poolName = PoolName;\n }\n /**\n * @returns {BigInteger} small A, a random number\n */\n\n var _proto = AuthenticationHelper.prototype;\n _proto.getSmallAValue = function getSmallAValue() {\n return this.smallAValue;\n }\n /**\n * @param {nodeCallback} callback Called with (err, largeAValue)\n * @returns {void}\n */;\n _proto.getLargeAValue = function getLargeAValue(callback) {\n var _this = this;\n if (this.largeAValue) {\n callback(null, this.largeAValue);\n } else {\n this.calculateA(this.smallAValue, function (err, largeAValue) {\n if (err) {\n callback(err, null);\n }\n _this.largeAValue = largeAValue;\n callback(null, _this.largeAValue);\n });\n }\n }\n /**\n * helper function to generate a random big integer\n * @returns {BigInteger} a random value.\n * @private\n */;\n _proto.generateRandomSmallA = function generateRandomSmallA() {\n // This will be interpreted as a postive 128-bit integer\n var hexRandom = randomBytes(128).toString('hex');\n var randomBigInt = new BigInteger(hexRandom, 16); // There is no need to do randomBigInt.mod(this.N - 1) as N (3072-bit) is > 128 bytes (1024-bit)\n\n return randomBigInt;\n }\n /**\n * helper function to generate a random string\n * @returns {string} a random value.\n * @private\n */;\n _proto.generateRandomString = function generateRandomString() {\n return randomBytes(40).toString('base64');\n }\n /**\n * @returns {string} Generated random value included in password hash.\n */;\n _proto.getRandomPassword = function getRandomPassword() {\n return this.randomPassword;\n }\n /**\n * @returns {string} Generated random value included in devices hash.\n */;\n _proto.getSaltDevices = function getSaltDevices() {\n return this.SaltToHashDevices;\n }\n /**\n * @returns {string} Value used to verify devices.\n */;\n _proto.getVerifierDevices = function getVerifierDevices() {\n return this.verifierDevices;\n }\n /**\n * Generate salts and compute verifier.\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n * @param {nodeCallback} callback Called with (err, null)\n * @returns {void}\n */;\n _proto.generateHashDevice = function generateHashDevice(deviceGroupKey, username, callback) {\n var _this2 = this;\n this.randomPassword = this.generateRandomString();\n var combinedString = \"\" + deviceGroupKey + username + \":\" + this.randomPassword;\n var hashedString = this.hash(combinedString);\n var hexRandom = randomBytes(16).toString('hex'); // The random hex will be unambiguously represented as a postive integer\n\n this.SaltToHashDevices = this.padHex(new BigInteger(hexRandom, 16));\n this.g.modPow(new BigInteger(this.hexHash(this.SaltToHashDevices + hashedString), 16), this.N, function (err, verifierDevicesNotPadded) {\n if (err) {\n callback(err, null);\n }\n _this2.verifierDevices = _this2.padHex(verifierDevicesNotPadded);\n callback(null, null);\n });\n }\n /**\n * Calculate the client's public value A = g^a%N\n * with the generated random number a\n * @param {BigInteger} a Randomly generated small A.\n * @param {nodeCallback} callback Called with (err, largeAValue)\n * @returns {void}\n * @private\n */;\n _proto.calculateA = function calculateA(a, callback) {\n var _this3 = this;\n this.g.modPow(a, this.N, function (err, A) {\n if (err) {\n callback(err, null);\n }\n if (A.mod(_this3.N).equals(BigInteger.ZERO)) {\n callback(new Error('Illegal paramater. A mod N cannot be 0.'), null);\n }\n callback(null, A);\n });\n }\n /**\n * Calculate the client's value U which is the hash of A and B\n * @param {BigInteger} A Large A value.\n * @param {BigInteger} B Server B value.\n * @returns {BigInteger} Computed U value.\n * @private\n */;\n _proto.calculateU = function calculateU(A, B) {\n this.UHexHash = this.hexHash(this.padHex(A) + this.padHex(B));\n var finalU = new BigInteger(this.UHexHash, 16);\n return finalU;\n }\n /**\n * Calculate a hash from a bitArray\n * @param {Buffer} buf Value to hash.\n * @returns {String} Hex-encoded hash.\n * @private\n */;\n _proto.hash = function hash(buf) {\n var str = buf instanceof Buffer ? CryptoJS.lib.WordArray.create(buf) : buf;\n var hashHex = SHA256(str).toString();\n return new Array(64 - hashHex.length).join('0') + hashHex;\n }\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 */;\n _proto.hexHash = function hexHash(hexStr) {\n return this.hash(Buffer.from(hexStr, 'hex'));\n }\n /**\n * Standard hkdf algorithm\n * @param {Buffer} ikm Input key material.\n * @param {Buffer} salt Salt value.\n * @returns {Buffer} Strong key material.\n * @private\n */;\n _proto.computehkdf = function computehkdf(ikm, salt) {\n var infoBitsWordArray = CryptoJS.lib.WordArray.create(Buffer.concat([this.infoBits, Buffer.from(String.fromCharCode(1), 'utf8')]));\n var ikmWordArray = ikm instanceof Buffer ? CryptoJS.lib.WordArray.create(ikm) : ikm;\n var saltWordArray = salt instanceof Buffer ? CryptoJS.lib.WordArray.create(salt) : salt;\n var prk = HmacSHA256(ikmWordArray, saltWordArray);\n var hmac = HmacSHA256(infoBitsWordArray, prk);\n return Buffer.from(hmac.toString(), 'hex').slice(0, 16);\n }\n /**\n * Calculates the final hkdf based on computed S value, and computed U value and the key\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {BigInteger} serverBValue Server B value.\n * @param {BigInteger} salt Generated salt.\n * @param {nodeCallback} callback Called with (err, hkdfValue)\n * @returns {void}\n */;\n _proto.getPasswordAuthenticationKey = function getPasswordAuthenticationKey(username, password, serverBValue, salt, callback) {\n var _this4 = this;\n if (serverBValue.mod(this.N).equals(BigInteger.ZERO)) {\n throw new Error('B cannot be zero.');\n }\n this.UValue = this.calculateU(this.largeAValue, serverBValue);\n if (this.UValue.equals(BigInteger.ZERO)) {\n throw new Error('U cannot be zero.');\n }\n var usernamePassword = \"\" + this.poolName + username + \":\" + password;\n var usernamePasswordHash = this.hash(usernamePassword);\n var xValue = new BigInteger(this.hexHash(this.padHex(salt) + usernamePasswordHash), 16);\n this.calculateS(xValue, serverBValue, function (err, sValue) {\n if (err) {\n callback(err, null);\n }\n var hkdf = _this4.computehkdf(Buffer.from(_this4.padHex(sValue), 'hex'), Buffer.from(_this4.padHex(_this4.UValue), 'hex'));\n callback(null, hkdf);\n });\n }\n /**\n * Calculates the S value used in getPasswordAuthenticationKey\n * @param {BigInteger} xValue Salted password hash value.\n * @param {BigInteger} serverBValue Server B value.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.calculateS = function calculateS(xValue, serverBValue, callback) {\n var _this5 = this;\n this.g.modPow(xValue, this.N, function (err, gModPowXN) {\n if (err) {\n callback(err, null);\n }\n var intValue2 = serverBValue.subtract(_this5.k.multiply(gModPowXN));\n intValue2.modPow(_this5.smallAValue.add(_this5.UValue.multiply(xValue)), _this5.N, function (err2, result) {\n if (err2) {\n callback(err2, null);\n }\n callback(null, result.mod(_this5.N));\n });\n });\n }\n /**\n * Return constant newPasswordRequiredChallengeUserAttributePrefix\n * @return {newPasswordRequiredChallengeUserAttributePrefix} constant prefix value\n */;\n _proto.getNewPasswordRequiredChallengeUserAttributePrefix = function getNewPasswordRequiredChallengeUserAttributePrefix() {\n return newPasswordRequiredChallengeUserAttributePrefix;\n }\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 {BigInteger} bigInt Number to encode.\n * @returns {String} even-length hex string of the two's complement encoding.\n */;\n _proto.padHex = function padHex(bigInt) {\n if (!(bigInt instanceof BigInteger)) {\n throw new Error('Not a BigInteger');\n }\n var isNegative = bigInt.compareTo(BigInteger.ZERO) < 0;\n /* Get a hex string for abs(bigInt) */\n\n var hexStr = bigInt.abs().toString(16);\n /* Pad hex to even length if needed */\n\n hexStr = hexStr.length % 2 !== 0 ? \"0\" + hexStr : hexStr;\n /* Prepend \"00\" if the most significant bit is set */\n\n hexStr = HEX_MSB_REGEX.test(hexStr) ? \"00\" + hexStr : hexStr;\n if (isNegative) {\n /* Flip the bits of the representation */\n var invertedNibbles = hexStr.split('').map(function (x) {\n var 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 */\n\n var 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 \t\tAny sequence of '1' bits on the left can always be substituted with a single '1' bit\n without changing the represented value.\n \t\tThis only happens in the case when the input is 80...00\n */\n\n if (hexStr.toUpperCase().startsWith('FF8')) {\n hexStr = hexStr.substring(2);\n }\n }\n return hexStr;\n };\n return AuthenticationHelper;\n}();\nexport { AuthenticationHelper as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Buffer } from 'buffer';\n/** @class */\n\nvar CognitoJwtToken = /*#__PURE__*/function () {\n /**\n * Constructs a new CognitoJwtToken object\n * @param {string=} token The JWT token.\n */\n function CognitoJwtToken(token) {\n // Assign object\n this.jwtToken = token || '';\n this.payload = this.decodePayload();\n }\n /**\n * @returns {string} the record's token.\n */\n\n var _proto = CognitoJwtToken.prototype;\n _proto.getJwtToken = function getJwtToken() {\n return this.jwtToken;\n }\n /**\n * @returns {int} the token's expiration (exp member).\n */;\n _proto.getExpiration = function getExpiration() {\n return this.payload.exp;\n }\n /**\n * @returns {int} the token's \"issued at\" (iat member).\n */;\n _proto.getIssuedAt = function getIssuedAt() {\n return this.payload.iat;\n }\n /**\n * @returns {object} the token's payload.\n */;\n _proto.decodePayload = function decodePayload() {\n var payload = this.jwtToken.split('.')[1];\n try {\n return JSON.parse(Buffer.from(payload, 'base64').toString('utf8'));\n } catch (err) {\n return {};\n }\n };\n return CognitoJwtToken;\n}();\nexport { CognitoJwtToken as default };","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\n/*\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport CognitoJwtToken from './CognitoJwtToken';\n/** @class */\n\nvar CognitoAccessToken = /*#__PURE__*/function (_CognitoJwtToken) {\n _inheritsLoose(CognitoAccessToken, _CognitoJwtToken);\n\n /**\n * Constructs a new CognitoAccessToken object\n * @param {string=} AccessToken The JWT access token.\n */\n function CognitoAccessToken(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n AccessToken = _ref.AccessToken;\n return _CognitoJwtToken.call(this, AccessToken || '') || this;\n }\n return CognitoAccessToken;\n}(CognitoJwtToken);\nexport { CognitoAccessToken as default };","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\n/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport CognitoJwtToken from './CognitoJwtToken';\n/** @class */\n\nvar CognitoIdToken = /*#__PURE__*/function (_CognitoJwtToken) {\n _inheritsLoose(CognitoIdToken, _CognitoJwtToken);\n\n /**\n * Constructs a new CognitoIdToken object\n * @param {string=} IdToken The JWT Id token\n */\n function CognitoIdToken(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n IdToken = _ref.IdToken;\n return _CognitoJwtToken.call(this, IdToken || '') || this;\n }\n return CognitoIdToken;\n}(CognitoJwtToken);\nexport { CognitoIdToken as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nvar CognitoRefreshToken = /*#__PURE__*/function () {\n /**\n * Constructs a new CognitoRefreshToken object\n * @param {string=} RefreshToken The JWT refresh token.\n */\n function CognitoRefreshToken(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n RefreshToken = _ref.RefreshToken;\n\n // Assign object\n this.token = RefreshToken || '';\n }\n /**\n * @returns {string} the record's token.\n */\n\n var _proto = CognitoRefreshToken.prototype;\n _proto.getToken = function getToken() {\n return this.token;\n };\n return CognitoRefreshToken;\n}();\nexport { CognitoRefreshToken as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nvar CognitoUserSession = /*#__PURE__*/function () {\n /**\n * Constructs a new CognitoUserSession object\n * @param {CognitoIdToken} IdToken The session's Id token.\n * @param {CognitoRefreshToken=} RefreshToken The session's refresh token.\n * @param {CognitoAccessToken} AccessToken The session's access token.\n * @param {int} ClockDrift The saved computer's clock drift or undefined to force calculation.\n */\n function CognitoUserSession(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n IdToken = _ref.IdToken,\n RefreshToken = _ref.RefreshToken,\n AccessToken = _ref.AccessToken,\n ClockDrift = _ref.ClockDrift;\n if (AccessToken == null || IdToken == null) {\n throw new Error('Id token and Access Token must be present.');\n }\n this.idToken = IdToken;\n this.refreshToken = RefreshToken;\n this.accessToken = AccessToken;\n this.clockDrift = ClockDrift === undefined ? this.calculateClockDrift() : ClockDrift;\n }\n /**\n * @returns {CognitoIdToken} the session's Id token\n */\n\n var _proto = CognitoUserSession.prototype;\n _proto.getIdToken = function getIdToken() {\n return this.idToken;\n }\n /**\n * @returns {CognitoRefreshToken} the session's refresh token\n */;\n _proto.getRefreshToken = function getRefreshToken() {\n return this.refreshToken;\n }\n /**\n * @returns {CognitoAccessToken} the session's access token\n */;\n _proto.getAccessToken = function getAccessToken() {\n return this.accessToken;\n }\n /**\n * @returns {int} the session's clock drift\n */;\n _proto.getClockDrift = function getClockDrift() {\n return this.clockDrift;\n }\n /**\n * @returns {int} the computer's clock drift\n */;\n _proto.calculateClockDrift = function calculateClockDrift() {\n var now = Math.floor(new Date() / 1000);\n var iat = Math.min(this.accessToken.getIssuedAt(), this.idToken.getIssuedAt());\n return now - iat;\n }\n /**\n * Checks to see if the session is still valid based on session expiry information found\n * in tokens and the current time (adjusted with clock drift)\n * @returns {boolean} if the session is still valid\n */;\n _proto.isValid = function isValid() {\n var now = Math.floor(new Date() / 1000);\n var adjusted = now - this.clockDrift;\n return adjusted < this.accessToken.getExpiration() && adjusted < this.idToken.getExpiration();\n };\n return CognitoUserSession;\n}();\nexport { CognitoUserSession as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nvar monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nvar weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n/** @class */\n\nvar DateHelper = /*#__PURE__*/function () {\n function DateHelper() {}\n var _proto = DateHelper.prototype;\n\n /**\n * @returns {string} The current time in \"ddd MMM D HH:mm:ss UTC YYYY\" format.\n */\n _proto.getNowString = function getNowString() {\n var now = new Date();\n var weekDay = weekNames[now.getUTCDay()];\n var month = monthNames[now.getUTCMonth()];\n var day = now.getUTCDate();\n var hours = now.getUTCHours();\n if (hours < 10) {\n hours = \"0\" + hours;\n }\n var minutes = now.getUTCMinutes();\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n var seconds = now.getUTCSeconds();\n if (seconds < 10) {\n seconds = \"0\" + seconds;\n }\n var year = now.getUTCFullYear(); // ddd MMM D HH:mm:ss UTC YYYY\n\n var dateNow = weekDay + \" \" + month + \" \" + day + \" \" + hours + \":\" + minutes + \":\" + seconds + \" UTC \" + year;\n return dateNow;\n };\n return DateHelper;\n}();\nexport { DateHelper as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nvar CognitoUserAttribute = /*#__PURE__*/function () {\n /**\n * Constructs a new CognitoUserAttribute object\n * @param {string=} Name The record's name\n * @param {string=} Value The record's value\n */\n function CognitoUserAttribute(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n Name = _ref.Name,\n Value = _ref.Value;\n this.Name = Name || '';\n this.Value = Value || '';\n }\n /**\n * @returns {string} the record's value.\n */\n\n var _proto = CognitoUserAttribute.prototype;\n _proto.getValue = function getValue() {\n return this.Value;\n }\n /**\n * Sets the record's value.\n * @param {string} value The new value.\n * @returns {CognitoUserAttribute} The record for method chaining.\n */;\n _proto.setValue = function setValue(value) {\n this.Value = value;\n return this;\n }\n /**\n * @returns {string} the record's name.\n */;\n _proto.getName = function getName() {\n return this.Name;\n }\n /**\n * Sets the record's name\n * @param {string} name The new name.\n * @returns {CognitoUserAttribute} The record for method chaining.\n */;\n _proto.setName = function setName(name) {\n this.Name = name;\n return this;\n }\n /**\n * @returns {string} a string representation of the record.\n */;\n _proto.toString = function toString() {\n return JSON.stringify(this);\n }\n /**\n * @returns {object} a flat object representing the record.\n */;\n _proto.toJSON = function toJSON() {\n return {\n Name: this.Name,\n Value: this.Value\n };\n };\n return CognitoUserAttribute;\n}();\nexport { CognitoUserAttribute as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nvar dataMemory = {};\n/** @class */\n\nexport var MemoryStorage = /*#__PURE__*/function () {\n function MemoryStorage() {}\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 MemoryStorage.setItem = function setItem(key, value) {\n dataMemory[key] = value;\n return dataMemory[key];\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 MemoryStorage.getItem = function getItem(key) {\n return Object.prototype.hasOwnProperty.call(dataMemory, key) ? dataMemory[key] : undefined;\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {boolean} return true\n */;\n MemoryStorage.removeItem = function removeItem(key) {\n return delete dataMemory[key];\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */;\n MemoryStorage.clear = function clear() {\n dataMemory = {};\n return dataMemory;\n };\n return MemoryStorage;\n}();\n/** @class */\n\nvar StorageHelper = /*#__PURE__*/function () {\n /**\n * This is used to get a storage object\n * @returns {object} the storage\n */\n function StorageHelper() {\n try {\n this.storageWindow = window.localStorage;\n this.storageWindow.setItem('aws.cognito.test-ls', 1);\n this.storageWindow.removeItem('aws.cognito.test-ls');\n } catch (exception) {\n this.storageWindow = MemoryStorage;\n }\n }\n /**\n * This is used to return the storage\n * @returns {object} the storage\n */\n\n var _proto = StorageHelper.prototype;\n _proto.getStorage = function getStorage() {\n return this.storageWindow;\n };\n return StorageHelper;\n}();\nexport { StorageHelper as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Buffer } from 'buffer';\nimport CryptoJS from 'crypto-js/core';\nimport TypedArrays from 'crypto-js/lib-typedarrays'; // necessary for crypto js\n\nimport Base64 from 'crypto-js/enc-base64';\nimport HmacSHA256 from 'crypto-js/hmac-sha256';\nimport BigInteger from './BigInteger';\nimport AuthenticationHelper from './AuthenticationHelper';\nimport CognitoAccessToken from './CognitoAccessToken';\nimport CognitoIdToken from './CognitoIdToken';\nimport CognitoRefreshToken from './CognitoRefreshToken';\nimport CognitoUserSession from './CognitoUserSession';\nimport DateHelper from './DateHelper';\nimport CognitoUserAttribute from './CognitoUserAttribute';\nimport StorageHelper from './StorageHelper';\n/**\n * @callback nodeCallback\n * @template T result\n * @param {*} err The operation failure reason, or null.\n * @param {T} result The operation result.\n */\n\n/**\n * @callback onFailure\n * @param {*} err Failure reason.\n */\n\n/**\n * @callback onSuccess\n * @template T result\n * @param {T} result The operation result.\n */\n\n/**\n * @callback mfaRequired\n * @param {*} details MFA challenge details.\n */\n\n/**\n * @callback customChallenge\n * @param {*} details Custom challenge details.\n */\n\n/**\n * @callback inputVerificationCode\n * @param {*} data Server response.\n */\n\n/**\n * @callback authSuccess\n * @param {CognitoUserSession} session The new session.\n * @param {bool=} userConfirmationNecessary User must be confirmed.\n */\n\nvar isBrowser = typeof navigator !== 'undefined';\nvar userAgent = isBrowser ? navigator.userAgent : 'nodejs';\n/** @class */\n\nvar CognitoUser = /*#__PURE__*/function () {\n /**\n * Constructs a new CognitoUser object\n * @param {object} data Creation options\n * @param {string} data.Username The user's username.\n * @param {CognitoUserPool} data.Pool Pool containing the user.\n * @param {object} data.Storage Optional storage object.\n */\n function CognitoUser(data) {\n if (data == null || data.Username == null || data.Pool == null) {\n throw new Error('Username and Pool information are required.');\n }\n this.username = data.Username || '';\n this.pool = data.Pool;\n this.Session = null;\n this.client = data.Pool.client;\n this.signInUserSession = null;\n this.authenticationFlowType = 'USER_SRP_AUTH';\n this.storage = data.Storage || new StorageHelper().getStorage();\n this.keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId();\n this.userDataKey = this.keyPrefix + \".\" + this.username + \".userData\";\n }\n /**\n * Sets the session for this user\n * @param {CognitoUserSession} signInUserSession the session\n * @returns {void}\n */\n\n var _proto = CognitoUser.prototype;\n _proto.setSignInUserSession = function setSignInUserSession(signInUserSession) {\n this.clearCachedUserData();\n this.signInUserSession = signInUserSession;\n this.cacheTokens();\n }\n /**\n * @returns {CognitoUserSession} the current session for this user\n */;\n _proto.getSignInUserSession = function getSignInUserSession() {\n return this.signInUserSession;\n }\n /**\n * @returns {string} the user's username\n */;\n _proto.getUsername = function getUsername() {\n return this.username;\n }\n /**\n * @returns {String} the authentication flow type\n */;\n _proto.getAuthenticationFlowType = function getAuthenticationFlowType() {\n return this.authenticationFlowType;\n }\n /**\n * sets authentication flow type\n * @param {string} authenticationFlowType New value.\n * @returns {void}\n */;\n _proto.setAuthenticationFlowType = function setAuthenticationFlowType(authenticationFlowType) {\n this.authenticationFlowType = authenticationFlowType;\n }\n /**\n * This is used for authenticating the user through the custom authentication flow.\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */;\n _proto.initiateAuth = function initiateAuth(authDetails, callback) {\n var _this = this;\n var authParameters = authDetails.getAuthParameters();\n authParameters.USERNAME = this.username;\n var clientMetaData = Object.keys(authDetails.getValidationData()).length !== 0 ? authDetails.getValidationData() : authDetails.getClientMetadata();\n var jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: clientMetaData\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('InitiateAuth', jsonReq, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n var challengeName = data.ChallengeName;\n var challengeParameters = data.ChallengeParameters;\n if (challengeName === 'CUSTOM_CHALLENGE') {\n _this.Session = data.Session;\n return callback.customChallenge(challengeParameters);\n }\n _this.signInUserSession = _this.getCognitoUserSession(data.AuthenticationResult);\n _this.cacheTokens();\n return callback.onSuccess(_this.signInUserSession);\n });\n }\n /**\n * This is used for authenticating the user.\n * stuff\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {newPasswordRequired} callback.newPasswordRequired new\n * password and any required attributes are required to continue\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */;\n _proto.authenticateUser = function authenticateUser(authDetails, callback) {\n if (this.authenticationFlowType === 'USER_PASSWORD_AUTH') {\n return this.authenticateUserPlainUsernamePassword(authDetails, callback);\n } else if (this.authenticationFlowType === 'USER_SRP_AUTH' || this.authenticationFlowType === 'CUSTOM_AUTH') {\n return this.authenticateUserDefaultAuth(authDetails, callback);\n }\n return callback.onFailure(new Error('Authentication flow type is invalid.'));\n }\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * It calls the AuthenticationHelper for SRP related\n * stuff\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {newPasswordRequired} callback.newPasswordRequired new\n * password and any required attributes are required to continue\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */;\n _proto.authenticateUserDefaultAuth = function authenticateUserDefaultAuth(authDetails, callback) {\n var _this2 = this;\n var authenticationHelper = new AuthenticationHelper(this.pool.getUserPoolId().split('_')[1]);\n var dateHelper = new DateHelper();\n var serverBValue;\n var salt;\n var authParameters = {};\n if (this.deviceKey != null) {\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n authParameters.USERNAME = this.username;\n authenticationHelper.getLargeAValue(function (errOnAValue, aValue) {\n // getLargeAValue callback start\n if (errOnAValue) {\n callback.onFailure(errOnAValue);\n }\n authParameters.SRP_A = aValue.toString(16);\n if (_this2.authenticationFlowType === 'CUSTOM_AUTH') {\n authParameters.CHALLENGE_NAME = 'SRP_A';\n }\n var clientMetaData = Object.keys(authDetails.getValidationData()).length !== 0 ? authDetails.getValidationData() : authDetails.getClientMetadata();\n var jsonReq = {\n AuthFlow: _this2.authenticationFlowType,\n ClientId: _this2.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: clientMetaData\n };\n if (_this2.getUserContextData(_this2.username)) {\n jsonReq.UserContextData = _this2.getUserContextData(_this2.username);\n }\n _this2.client.request('InitiateAuth', jsonReq, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n var challengeParameters = data.ChallengeParameters;\n _this2.username = challengeParameters.USER_ID_FOR_SRP;\n _this2.userDataKey = _this2.keyPrefix + \".\" + _this2.username + \".userData\";\n serverBValue = new BigInteger(challengeParameters.SRP_B, 16);\n salt = new BigInteger(challengeParameters.SALT, 16);\n _this2.getCachedDeviceKeyAndPassword();\n authenticationHelper.getPasswordAuthenticationKey(_this2.username, authDetails.getPassword(), serverBValue, salt, function (errOnHkdf, hkdf) {\n // getPasswordAuthenticationKey callback start\n if (errOnHkdf) {\n callback.onFailure(errOnHkdf);\n }\n var dateNow = dateHelper.getNowString();\n var message = CryptoJS.lib.WordArray.create(Buffer.concat([Buffer.from(_this2.pool.getUserPoolId().split('_')[1], 'utf8'), Buffer.from(_this2.username, 'utf8'), Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'), Buffer.from(dateNow, 'utf8')]));\n var key = CryptoJS.lib.WordArray.create(hkdf);\n var signatureString = Base64.stringify(HmacSHA256(message, key));\n var challengeResponses = {};\n challengeResponses.USERNAME = _this2.username;\n challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n challengeResponses.TIMESTAMP = dateNow;\n challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n if (_this2.deviceKey != null) {\n challengeResponses.DEVICE_KEY = _this2.deviceKey;\n }\n var respondToAuthChallenge = function respondToAuthChallenge(challenge, challengeCallback) {\n return _this2.client.request('RespondToAuthChallenge', challenge, function (errChallenge, dataChallenge) {\n if (errChallenge && errChallenge.code === 'ResourceNotFoundException' && errChallenge.message.toLowerCase().indexOf('device') !== -1) {\n challengeResponses.DEVICE_KEY = null;\n _this2.deviceKey = null;\n _this2.randomPassword = null;\n _this2.deviceGroupKey = null;\n _this2.clearCachedDeviceKeyAndPassword();\n return respondToAuthChallenge(challenge, challengeCallback);\n }\n return challengeCallback(errChallenge, dataChallenge);\n });\n };\n var jsonReqResp = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ClientId: _this2.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: data.Session,\n ClientMetadata: clientMetaData\n };\n if (_this2.getUserContextData()) {\n jsonReqResp.UserContextData = _this2.getUserContextData();\n }\n respondToAuthChallenge(jsonReqResp, function (errAuthenticate, dataAuthenticate) {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n return _this2.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n });\n return undefined; // getPasswordAuthenticationKey callback end\n });\n return undefined;\n }); // getLargeAValue callback end\n });\n }\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * @param {AuthenticationDetails} authDetails Contains the authentication data.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */;\n _proto.authenticateUserPlainUsernamePassword = function authenticateUserPlainUsernamePassword(authDetails, callback) {\n var _this3 = this;\n var authParameters = {};\n authParameters.USERNAME = this.username;\n authParameters.PASSWORD = authDetails.getPassword();\n if (!authParameters.PASSWORD) {\n callback.onFailure(new Error('PASSWORD parameter is required'));\n return;\n }\n var authenticationHelper = new AuthenticationHelper(this.pool.getUserPoolId().split('_')[1]);\n this.getCachedDeviceKeyAndPassword();\n if (this.deviceKey != null) {\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n var clientMetaData = Object.keys(authDetails.getValidationData()).length !== 0 ? authDetails.getValidationData() : authDetails.getClientMetadata();\n var jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: clientMetaData\n };\n if (this.getUserContextData(this.username)) {\n jsonReq.UserContextData = this.getUserContextData(this.username);\n } // USER_PASSWORD_AUTH happens in a single round-trip: client sends userName and password,\n // Cognito UserPools verifies password and returns tokens.\n\n this.client.request('InitiateAuth', jsonReq, function (err, authResult) {\n if (err) {\n return callback.onFailure(err);\n }\n return _this3.authenticateUserInternal(authResult, authenticationHelper, callback);\n });\n }\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * @param {object} dataAuthenticate authentication data\n * @param {object} authenticationHelper helper created\n * @param {callback} callback passed on from caller\n * @returns {void}\n */;\n _proto.authenticateUserInternal = function authenticateUserInternal(dataAuthenticate, authenticationHelper, callback) {\n var _this4 = this;\n var challengeName = dataAuthenticate.ChallengeName;\n var challengeParameters = dataAuthenticate.ChallengeParameters;\n if (challengeName === 'SMS_MFA') {\n this.Session = dataAuthenticate.Session;\n return callback.mfaRequired(challengeName, challengeParameters);\n }\n if (challengeName === 'SELECT_MFA_TYPE') {\n this.Session = dataAuthenticate.Session;\n return callback.selectMFAType(challengeName, challengeParameters);\n }\n if (challengeName === 'MFA_SETUP') {\n this.Session = dataAuthenticate.Session;\n return callback.mfaSetup(challengeName, challengeParameters);\n }\n if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n this.Session = dataAuthenticate.Session;\n return callback.totpRequired(challengeName, challengeParameters);\n }\n if (challengeName === 'CUSTOM_CHALLENGE') {\n this.Session = dataAuthenticate.Session;\n return callback.customChallenge(challengeParameters);\n }\n if (challengeName === 'NEW_PASSWORD_REQUIRED') {\n this.Session = dataAuthenticate.Session;\n var userAttributes = null;\n var rawRequiredAttributes = null;\n var requiredAttributes = [];\n var userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix();\n if (challengeParameters) {\n userAttributes = JSON.parse(dataAuthenticate.ChallengeParameters.userAttributes);\n rawRequiredAttributes = JSON.parse(dataAuthenticate.ChallengeParameters.requiredAttributes);\n }\n if (rawRequiredAttributes) {\n for (var i = 0; i < rawRequiredAttributes.length; i++) {\n requiredAttributes[i] = rawRequiredAttributes[i].substr(userAttributesPrefix.length);\n }\n }\n return callback.newPasswordRequired(userAttributes, requiredAttributes);\n }\n if (challengeName === 'DEVICE_SRP_AUTH') {\n this.getDeviceResponse(callback);\n return undefined;\n }\n this.signInUserSession = this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n this.challengeName = challengeName;\n this.cacheTokens();\n var newDeviceMetadata = dataAuthenticate.AuthenticationResult.NewDeviceMetadata;\n if (newDeviceMetadata == null) {\n return callback.onSuccess(this.signInUserSession);\n }\n authenticationHelper.generateHashDevice(dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey, function (errGenHash) {\n if (errGenHash) {\n return callback.onFailure(errGenHash);\n }\n var deviceSecretVerifierConfig = {\n Salt: Buffer.from(authenticationHelper.getSaltDevices(), 'hex').toString('base64'),\n PasswordVerifier: Buffer.from(authenticationHelper.getVerifierDevices(), 'hex').toString('base64')\n };\n _this4.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n _this4.deviceGroupKey = newDeviceMetadata.DeviceGroupKey;\n _this4.randomPassword = authenticationHelper.getRandomPassword();\n _this4.client.request('ConfirmDevice', {\n DeviceKey: newDeviceMetadata.DeviceKey,\n AccessToken: _this4.signInUserSession.getAccessToken().getJwtToken(),\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n DeviceName: userAgent\n }, function (errConfirm, dataConfirm) {\n if (errConfirm) {\n return callback.onFailure(errConfirm);\n }\n _this4.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n _this4.cacheDeviceKeyAndPassword();\n if (dataConfirm.UserConfirmationNecessary === true) {\n return callback.onSuccess(_this4.signInUserSession, dataConfirm.UserConfirmationNecessary);\n }\n return callback.onSuccess(_this4.signInUserSession);\n });\n return undefined;\n });\n return undefined;\n }\n /**\n * This method is user to complete the NEW_PASSWORD_REQUIRED challenge.\n * Pass the new password with any new user attributes to be updated.\n * User attribute keys must be of format userAttributes..\n * @param {string} newPassword new password for this user\n * @param {object} requiredAttributeData map with values for all required attributes\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {mfaRequired} callback.mfaRequired MFA code required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.completeNewPasswordChallenge = function completeNewPasswordChallenge(newPassword, requiredAttributeData, callback, clientMetadata) {\n var _this5 = this;\n if (!newPassword) {\n return callback.onFailure(new Error('New password is required.'));\n }\n var authenticationHelper = new AuthenticationHelper(this.pool.getUserPoolId().split('_')[1]);\n var userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix();\n var finalUserAttributes = {};\n if (requiredAttributeData) {\n Object.keys(requiredAttributeData).forEach(function (key) {\n finalUserAttributes[userAttributesPrefix + key] = requiredAttributeData[key];\n });\n }\n finalUserAttributes.NEW_PASSWORD = newPassword;\n finalUserAttributes.USERNAME = this.username;\n var jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: finalUserAttributes,\n Session: this.Session,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, function (errAuthenticate, dataAuthenticate) {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n return _this5.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n });\n return undefined;\n }\n /**\n * This is used to get a session using device authentication. It is called at the end of user\n * authentication\n *\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n * @private\n */;\n _proto.getDeviceResponse = function getDeviceResponse(callback, clientMetadata) {\n var _this6 = this;\n var authenticationHelper = new AuthenticationHelper(this.deviceGroupKey);\n var dateHelper = new DateHelper();\n var authParameters = {};\n authParameters.USERNAME = this.username;\n authParameters.DEVICE_KEY = this.deviceKey;\n authenticationHelper.getLargeAValue(function (errAValue, aValue) {\n // getLargeAValue callback start\n if (errAValue) {\n callback.onFailure(errAValue);\n }\n authParameters.SRP_A = aValue.toString(16);\n var jsonReq = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: _this6.pool.getClientId(),\n ChallengeResponses: authParameters,\n ClientMetadata: clientMetadata\n };\n if (_this6.getUserContextData()) {\n jsonReq.UserContextData = _this6.getUserContextData();\n }\n _this6.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n var challengeParameters = data.ChallengeParameters;\n var serverBValue = new BigInteger(challengeParameters.SRP_B, 16);\n var salt = new BigInteger(challengeParameters.SALT, 16);\n authenticationHelper.getPasswordAuthenticationKey(_this6.deviceKey, _this6.randomPassword, serverBValue, salt, function (errHkdf, hkdf) {\n // getPasswordAuthenticationKey callback start\n if (errHkdf) {\n return callback.onFailure(errHkdf);\n }\n var dateNow = dateHelper.getNowString();\n var message = CryptoJS.lib.WordArray.create(Buffer.concat([Buffer.from(_this6.deviceGroupKey, 'utf8'), Buffer.from(_this6.deviceKey, 'utf8'), Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'), Buffer.from(dateNow, 'utf8')]));\n var key = CryptoJS.lib.WordArray.create(hkdf);\n var signatureString = Base64.stringify(HmacSHA256(message, key));\n var challengeResponses = {};\n challengeResponses.USERNAME = _this6.username;\n challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n challengeResponses.TIMESTAMP = dateNow;\n challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n challengeResponses.DEVICE_KEY = _this6.deviceKey;\n var jsonReqResp = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: _this6.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: data.Session\n };\n if (_this6.getUserContextData()) {\n jsonReqResp.UserContextData = _this6.getUserContextData();\n }\n _this6.client.request('RespondToAuthChallenge', jsonReqResp, function (errAuthenticate, dataAuthenticate) {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n _this6.signInUserSession = _this6.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n _this6.cacheTokens();\n return callback.onSuccess(_this6.signInUserSession);\n });\n return undefined; // getPasswordAuthenticationKey callback end\n });\n return undefined;\n }); // getLargeAValue callback end\n });\n }\n /**\n * This is used for a certain user to confirm the registration by using a confirmation code\n * @param {string} confirmationCode Code entered by user.\n * @param {bool} forceAliasCreation Allow migrating from an existing email / phone number.\n * @param {nodeCallback} callback Called on success or error.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.confirmRegistration = function confirmRegistration(confirmationCode, forceAliasCreation, callback, clientMetadata) {\n var jsonReq = {\n ClientId: this.pool.getClientId(),\n ConfirmationCode: confirmationCode,\n Username: this.username,\n ForceAliasCreation: forceAliasCreation,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ConfirmSignUp', jsonReq, function (err) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n }\n /**\n * This is used by the user once he has the responses to a custom challenge\n * @param {string} answerChallenge The custom challenge answer.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {customChallenge} callback.customChallenge\n * Custom challenge response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.sendCustomChallengeAnswer = function sendCustomChallengeAnswer(answerChallenge, callback, clientMetadata) {\n var _this7 = this;\n var challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.ANSWER = answerChallenge;\n var authenticationHelper = new AuthenticationHelper(this.pool.getUserPoolId().split('_')[1]);\n this.getCachedDeviceKeyAndPassword();\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n var jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n return _this7.authenticateUserInternal(data, authenticationHelper, callback);\n });\n }\n /**\n * This is used by the user once he has an MFA code\n * @param {string} confirmationCode The MFA code entered by the user.\n * @param {object} callback Result callback map.\n * @param {string} mfaType The mfa we are replying to.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.sendMFACode = function sendMFACode(confirmationCode, callback, mfaType, clientMetadata) {\n var _this8 = this;\n var challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.SMS_MFA_CODE = confirmationCode;\n var mfaTypeSelection = mfaType || 'SMS_MFA';\n if (mfaTypeSelection === 'SOFTWARE_TOKEN_MFA') {\n challengeResponses.SOFTWARE_TOKEN_MFA_CODE = confirmationCode;\n }\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n var jsonReq = {\n ChallengeName: mfaTypeSelection,\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, function (err, dataAuthenticate) {\n if (err) {\n return callback.onFailure(err);\n }\n var challengeName = dataAuthenticate.ChallengeName;\n if (challengeName === 'DEVICE_SRP_AUTH') {\n _this8.getDeviceResponse(callback);\n return undefined;\n }\n _this8.signInUserSession = _this8.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n _this8.cacheTokens();\n if (dataAuthenticate.AuthenticationResult.NewDeviceMetadata == null) {\n return callback.onSuccess(_this8.signInUserSession);\n }\n var authenticationHelper = new AuthenticationHelper(_this8.pool.getUserPoolId().split('_')[1]);\n authenticationHelper.generateHashDevice(dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey, function (errGenHash) {\n if (errGenHash) {\n return callback.onFailure(errGenHash);\n }\n var deviceSecretVerifierConfig = {\n Salt: Buffer.from(authenticationHelper.getSaltDevices(), 'hex').toString('base64'),\n PasswordVerifier: Buffer.from(authenticationHelper.getVerifierDevices(), 'hex').toString('base64')\n };\n _this8.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n _this8.deviceGroupKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey;\n _this8.randomPassword = authenticationHelper.getRandomPassword();\n _this8.client.request('ConfirmDevice', {\n DeviceKey: dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n AccessToken: _this8.signInUserSession.getAccessToken().getJwtToken(),\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n DeviceName: userAgent\n }, function (errConfirm, dataConfirm) {\n if (errConfirm) {\n return callback.onFailure(errConfirm);\n }\n _this8.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n _this8.cacheDeviceKeyAndPassword();\n if (dataConfirm.UserConfirmationNecessary === true) {\n return callback.onSuccess(_this8.signInUserSession, dataConfirm.UserConfirmationNecessary);\n }\n return callback.onSuccess(_this8.signInUserSession);\n });\n return undefined;\n });\n return undefined;\n });\n }\n /**\n * This is used by an authenticated user to change the current password\n * @param {string} oldUserPassword The current password.\n * @param {string} newUserPassword The requested new password.\n * @param {nodeCallback} callback Called on success or error.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.changePassword = function changePassword(oldUserPassword, newUserPassword, callback, clientMetadata) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('ChangePassword', {\n PreviousPassword: oldUserPassword,\n ProposedPassword: newUserPassword,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n ClientMetadata: clientMetadata\n }, function (err) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used by an authenticated user to enable MFA for itself\n * @deprecated\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.enableMFA = function enableMFA(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n var mfaOptions = [];\n var mfaEnabled = {\n DeliveryMedium: 'SMS',\n AttributeName: 'phone_number'\n };\n mfaOptions.push(mfaEnabled);\n this.client.request('SetUserSettings', {\n MFAOptions: mfaOptions,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used by an authenticated user to enable MFA for itself\n * @param {IMfaSettings} smsMfaSettings the sms mfa settings\n * @param {IMFASettings} softwareTokenMfaSettings the software token mfa settings\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.setUserMfaPreference = function setUserMfaPreference(smsMfaSettings, softwareTokenMfaSettings, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('SetUserMFAPreference', {\n SMSMfaSettings: smsMfaSettings,\n SoftwareTokenMfaSettings: softwareTokenMfaSettings,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used by an authenticated user to disable MFA for itself\n * @deprecated\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.disableMFA = function disableMFA(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n var mfaOptions = [];\n this.client.request('SetUserSettings', {\n MFAOptions: mfaOptions,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used by an authenticated user to delete itself\n * @param {nodeCallback} callback Called on success or error.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.deleteUser = function deleteUser(callback, clientMetadata) {\n var _this9 = this;\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('DeleteUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n ClientMetadata: clientMetadata\n }, function (err) {\n if (err) {\n return callback(err, null);\n }\n _this9.clearCachedUser();\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n /**\n * @typedef {CognitoUserAttribute | { Name:string, Value:string }} AttributeArg\n */\n\n /**\n * This is used by an authenticated user to change a list of attributes\n * @param {AttributeArg[]} attributes A list of the new user attributes.\n * @param {nodeCallback} callback Called on success or error.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.updateAttributes = function updateAttributes(attributes, callback, clientMetadata) {\n var _this10 = this;\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('UpdateUserAttributes', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n UserAttributes: attributes,\n ClientMetadata: clientMetadata\n }, function (err) {\n if (err) {\n return callback(err, null);\n } // update cached user\n\n return _this10.getUserData(function () {\n return callback(null, 'SUCCESS');\n }, {\n bypassCache: true\n });\n });\n return undefined;\n }\n /**\n * This is used by an authenticated user to get a list of attributes\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.getUserAttributes = function getUserAttributes(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err, userData) {\n if (err) {\n return callback(err, null);\n }\n var attributeList = [];\n for (var i = 0; i < userData.UserAttributes.length; i++) {\n var attribute = {\n Name: userData.UserAttributes[i].Name,\n Value: userData.UserAttributes[i].Value\n };\n var userAttribute = new CognitoUserAttribute(attribute);\n attributeList.push(userAttribute);\n }\n return callback(null, attributeList);\n });\n return undefined;\n }\n /**\n * This was previously used by an authenticated user to get MFAOptions,\n * but no longer returns a meaningful response. Refer to the documentation for\n * how to setup and use MFA: https://docs.amplify.aws/lib/auth/mfa/q/platform/js\n * @deprecated\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.getMFAOptions = function getMFAOptions(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err, userData) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, userData.MFAOptions);\n });\n return undefined;\n }\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n */;\n _proto.createGetUserRequest = function createGetUserRequest() {\n return this.client.promisifyRequest('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n });\n }\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n */;\n _proto.refreshSessionIfPossible = function refreshSessionIfPossible(options) {\n var _this11 = this;\n if (options === void 0) {\n options = {};\n }\n\n // best effort, if not possible\n return new Promise(function (resolve) {\n var refresh = _this11.signInUserSession.getRefreshToken();\n if (refresh && refresh.getToken()) {\n _this11.refreshSession(refresh, resolve, options.clientMetadata);\n } else {\n resolve();\n }\n });\n }\n /**\n * @typedef {Object} GetUserDataOptions\n * @property {boolean} bypassCache - force getting data from Cognito service\n * @property {Record} clientMetadata - clientMetadata for getSession\n */\n\n /**\n * This is used by an authenticated users to get the userData\n * @param {nodeCallback} callback Called on success or error.\n * @param {GetUserDataOptions} params\n * @returns {void}\n */;\n _proto.getUserData = function getUserData(callback, params) {\n var _this12 = this;\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.clearCachedUserData();\n return callback(new Error('User is not authenticated'), null);\n }\n var userData = this.getUserDataFromCache();\n if (!userData) {\n this.fetchUserData().then(function (data) {\n callback(null, data);\n })[\"catch\"](callback);\n return;\n }\n if (this.isFetchUserDataAndTokenRequired(params)) {\n this.fetchUserData().then(function (data) {\n return _this12.refreshSessionIfPossible(params).then(function () {\n return data;\n });\n }).then(function (data) {\n return callback(null, data);\n })[\"catch\"](callback);\n return;\n }\n try {\n callback(null, JSON.parse(userData));\n return;\n } catch (err) {\n this.clearCachedUserData();\n callback(err, null);\n return;\n }\n }\n /**\n *\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n */;\n _proto.getUserDataFromCache = function getUserDataFromCache() {\n var userData = this.storage.getItem(this.userDataKey);\n return userData;\n }\n /**\n *\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n */;\n _proto.isFetchUserDataAndTokenRequired = function isFetchUserDataAndTokenRequired(params) {\n var _ref = params || {},\n _ref$bypassCache = _ref.bypassCache,\n bypassCache = _ref$bypassCache === void 0 ? false : _ref$bypassCache;\n return bypassCache;\n }\n /**\n *\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n */;\n _proto.fetchUserData = function fetchUserData() {\n var _this13 = this;\n return this.createGetUserRequest().then(function (data) {\n _this13.cacheUserData(data);\n return data;\n });\n }\n /**\n * This is used by an authenticated user to delete a list of attributes\n * @param {string[]} attributeList Names of the attributes to delete.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.deleteAttributes = function deleteAttributes(attributeList, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n this.client.request('DeleteUserAttributes', {\n UserAttributeNames: attributeList,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used by a user to resend a confirmation code\n * @param {nodeCallback} callback Called on success or error.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.resendConfirmationCode = function resendConfirmationCode(callback, clientMetadata) {\n var jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n ClientMetadata: clientMetadata\n };\n this.client.request('ResendConfirmationCode', jsonReq, function (err, result) {\n if (err) {\n return callback(err, null);\n }\n return callback(null, result);\n });\n }\n /**\n * @typedef {Object} GetSessionOptions\n * @property {Record} clientMetadata - clientMetadata for getSession\n */\n\n /**\n * This is used to get a session, either from the session object\n * or from the local storage, or by using a refresh token\n *\n * @param {nodeCallback} callback Called on success or error.\n * @param {GetSessionOptions} options\n * @returns {void}\n */;\n _proto.getSession = function getSession(callback, options) {\n if (options === void 0) {\n options = {};\n }\n if (this.username == null) {\n return callback(new Error('Username is null. Cannot retrieve a new session'), null);\n }\n if (this.signInUserSession != null && this.signInUserSession.isValid()) {\n return callback(null, this.signInUserSession);\n }\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId() + \".\" + this.username;\n var idTokenKey = keyPrefix + \".idToken\";\n var accessTokenKey = keyPrefix + \".accessToken\";\n var refreshTokenKey = keyPrefix + \".refreshToken\";\n var clockDriftKey = keyPrefix + \".clockDrift\";\n if (this.storage.getItem(idTokenKey)) {\n var idToken = new CognitoIdToken({\n IdToken: this.storage.getItem(idTokenKey)\n });\n var accessToken = new CognitoAccessToken({\n AccessToken: this.storage.getItem(accessTokenKey)\n });\n var refreshToken = new CognitoRefreshToken({\n RefreshToken: this.storage.getItem(refreshTokenKey)\n });\n var clockDrift = parseInt(this.storage.getItem(clockDriftKey), 0) || 0;\n var sessionData = {\n IdToken: idToken,\n AccessToken: accessToken,\n RefreshToken: refreshToken,\n ClockDrift: clockDrift\n };\n var cachedSession = new CognitoUserSession(sessionData);\n if (cachedSession.isValid()) {\n this.signInUserSession = cachedSession;\n return callback(null, this.signInUserSession);\n }\n if (!refreshToken.getToken()) {\n return callback(new Error('Cannot retrieve a new session. Please authenticate.'), null);\n }\n this.refreshSession(refreshToken, callback, options.clientMetadata);\n } else {\n callback(new Error('Local storage is missing an ID Token, Please authenticate'), null);\n }\n return undefined;\n }\n /**\n * This uses the refreshToken to retrieve a new session\n * @param {CognitoRefreshToken} refreshToken A previous session's refresh token.\n * @param {nodeCallback} callback Called on success or error.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.refreshSession = function refreshSession(refreshToken, callback, clientMetadata) {\n var _this14 = this;\n var wrappedCallback = this.pool.wrapRefreshSessionCallback ? this.pool.wrapRefreshSessionCallback(callback) : callback;\n var authParameters = {};\n authParameters.REFRESH_TOKEN = refreshToken.getToken();\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId();\n var lastUserKey = keyPrefix + \".LastAuthUser\";\n if (this.storage.getItem(lastUserKey)) {\n this.username = this.storage.getItem(lastUserKey);\n var deviceKeyKey = keyPrefix + \".\" + this.username + \".deviceKey\";\n this.deviceKey = this.storage.getItem(deviceKeyKey);\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n var jsonReq = {\n ClientId: this.pool.getClientId(),\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('InitiateAuth', jsonReq, function (err, authResult) {\n if (err) {\n if (err.code === 'NotAuthorizedException') {\n _this14.clearCachedUser();\n }\n return wrappedCallback(err, null);\n }\n if (authResult) {\n var authenticationResult = authResult.AuthenticationResult;\n if (!Object.prototype.hasOwnProperty.call(authenticationResult, 'RefreshToken')) {\n authenticationResult.RefreshToken = refreshToken.getToken();\n }\n _this14.signInUserSession = _this14.getCognitoUserSession(authenticationResult);\n _this14.cacheTokens();\n return wrappedCallback(null, _this14.signInUserSession);\n }\n return undefined;\n });\n }\n /**\n * This is used to save the session tokens to local storage\n * @returns {void}\n */;\n _proto.cacheTokens = function cacheTokens() {\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId();\n var idTokenKey = keyPrefix + \".\" + this.username + \".idToken\";\n var accessTokenKey = keyPrefix + \".\" + this.username + \".accessToken\";\n var refreshTokenKey = keyPrefix + \".\" + this.username + \".refreshToken\";\n var clockDriftKey = keyPrefix + \".\" + this.username + \".clockDrift\";\n var lastUserKey = keyPrefix + \".LastAuthUser\";\n this.storage.setItem(idTokenKey, this.signInUserSession.getIdToken().getJwtToken());\n this.storage.setItem(accessTokenKey, this.signInUserSession.getAccessToken().getJwtToken());\n this.storage.setItem(refreshTokenKey, this.signInUserSession.getRefreshToken().getToken());\n this.storage.setItem(clockDriftKey, \"\" + this.signInUserSession.getClockDrift());\n this.storage.setItem(lastUserKey, this.username);\n }\n /**\n * This is to cache user data\n */;\n _proto.cacheUserData = function cacheUserData(userData) {\n this.storage.setItem(this.userDataKey, JSON.stringify(userData));\n }\n /**\n * This is to remove cached user data\n */;\n _proto.clearCachedUserData = function clearCachedUserData() {\n this.storage.removeItem(this.userDataKey);\n };\n _proto.clearCachedUser = function clearCachedUser() {\n this.clearCachedTokens();\n this.clearCachedUserData();\n }\n /**\n * This is used to cache the device key and device group and device password\n * @returns {void}\n */;\n _proto.cacheDeviceKeyAndPassword = function cacheDeviceKeyAndPassword() {\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId() + \".\" + this.username;\n var deviceKeyKey = keyPrefix + \".deviceKey\";\n var randomPasswordKey = keyPrefix + \".randomPasswordKey\";\n var deviceGroupKeyKey = keyPrefix + \".deviceGroupKey\";\n this.storage.setItem(deviceKeyKey, this.deviceKey);\n this.storage.setItem(randomPasswordKey, this.randomPassword);\n this.storage.setItem(deviceGroupKeyKey, this.deviceGroupKey);\n }\n /**\n * This is used to get current device key and device group and device password\n * @returns {void}\n */;\n _proto.getCachedDeviceKeyAndPassword = function getCachedDeviceKeyAndPassword() {\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId() + \".\" + this.username;\n var deviceKeyKey = keyPrefix + \".deviceKey\";\n var randomPasswordKey = keyPrefix + \".randomPasswordKey\";\n var deviceGroupKeyKey = keyPrefix + \".deviceGroupKey\";\n if (this.storage.getItem(deviceKeyKey)) {\n this.deviceKey = this.storage.getItem(deviceKeyKey);\n this.randomPassword = this.storage.getItem(randomPasswordKey);\n this.deviceGroupKey = this.storage.getItem(deviceGroupKeyKey);\n }\n }\n /**\n * This is used to clear the device key info from local storage\n * @returns {void}\n */;\n _proto.clearCachedDeviceKeyAndPassword = function clearCachedDeviceKeyAndPassword() {\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId() + \".\" + this.username;\n var deviceKeyKey = keyPrefix + \".deviceKey\";\n var randomPasswordKey = keyPrefix + \".randomPasswordKey\";\n var deviceGroupKeyKey = keyPrefix + \".deviceGroupKey\";\n this.storage.removeItem(deviceKeyKey);\n this.storage.removeItem(randomPasswordKey);\n this.storage.removeItem(deviceGroupKeyKey);\n }\n /**\n * This is used to clear the session tokens from local storage\n * @returns {void}\n */;\n _proto.clearCachedTokens = function clearCachedTokens() {\n var keyPrefix = \"CognitoIdentityServiceProvider.\" + this.pool.getClientId();\n var idTokenKey = keyPrefix + \".\" + this.username + \".idToken\";\n var accessTokenKey = keyPrefix + \".\" + this.username + \".accessToken\";\n var refreshTokenKey = keyPrefix + \".\" + this.username + \".refreshToken\";\n var lastUserKey = keyPrefix + \".LastAuthUser\";\n var clockDriftKey = keyPrefix + \".\" + this.username + \".clockDrift\";\n this.storage.removeItem(idTokenKey);\n this.storage.removeItem(accessTokenKey);\n this.storage.removeItem(refreshTokenKey);\n this.storage.removeItem(lastUserKey);\n this.storage.removeItem(clockDriftKey);\n }\n /**\n * This is used to build a user session from tokens retrieved in the authentication result\n * @param {object} authResult Successful auth response from server.\n * @returns {CognitoUserSession} The new user session.\n * @private\n */;\n _proto.getCognitoUserSession = function getCognitoUserSession(authResult) {\n var idToken = new CognitoIdToken(authResult);\n var accessToken = new CognitoAccessToken(authResult);\n var refreshToken = new CognitoRefreshToken(authResult);\n var sessionData = {\n IdToken: idToken,\n AccessToken: accessToken,\n RefreshToken: refreshToken\n };\n return new CognitoUserSession(sessionData);\n }\n /**\n * This is used to initiate a forgot password request\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {inputVerificationCode?} callback.inputVerificationCode\n * Optional callback raised instead of onSuccess with response data.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.forgotPassword = function forgotPassword(callback, clientMetadata) {\n var jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ForgotPassword', jsonReq, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n if (typeof callback.inputVerificationCode === 'function') {\n return callback.inputVerificationCode(data);\n }\n return callback.onSuccess(data);\n });\n }\n /**\n * This is used to confirm a new password using a confirmationCode\n * @param {string} confirmationCode Code entered by user.\n * @param {string} newPassword Confirm new password.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.confirmPassword = function confirmPassword(confirmationCode, newPassword, callback, clientMetadata) {\n var jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n ConfirmationCode: confirmationCode,\n Password: newPassword,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ConfirmForgotPassword', jsonReq, function (err) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess();\n });\n }\n /**\n * This is used to initiate an attribute confirmation request\n * @param {string} attributeName User attribute that needs confirmation.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {inputVerificationCode} callback.inputVerificationCode Called on success.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.getAttributeVerificationCode = function getAttributeVerificationCode(attributeName, callback, clientMetadata) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('GetUserAttributeVerificationCode', {\n AttributeName: attributeName,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n ClientMetadata: clientMetadata\n }, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n if (typeof callback.inputVerificationCode === 'function') {\n return callback.inputVerificationCode(data);\n }\n return callback.onSuccess();\n });\n return undefined;\n }\n /**\n * This is used to confirm an attribute using a confirmation code\n * @param {string} attributeName Attribute being confirmed.\n * @param {string} confirmationCode Code entered by user.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */;\n _proto.verifyAttribute = function verifyAttribute(attributeName, confirmationCode, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('VerifyUserAttribute', {\n AttributeName: attributeName,\n Code: confirmationCode,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used to get the device information using the current device key\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess<*>} callback.onSuccess Called on success with device data.\n * @returns {void}\n */;\n _proto.getDevice = function getDevice(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('GetDevice', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey\n }, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n return undefined;\n }\n /**\n * This is used to forget a specific device\n * @param {string} deviceKey Device key.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */;\n _proto.forgetSpecificDevice = function forgetSpecificDevice(deviceKey, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('ForgetDevice', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: deviceKey\n }, function (err) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used to forget the current device\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */;\n _proto.forgetDevice = function forgetDevice(callback) {\n var _this15 = this;\n this.forgetSpecificDevice(this.deviceKey, {\n onFailure: callback.onFailure,\n onSuccess: function onSuccess(result) {\n _this15.deviceKey = null;\n _this15.deviceGroupKey = null;\n _this15.randomPassword = null;\n _this15.clearCachedDeviceKeyAndPassword();\n return callback.onSuccess(result);\n }\n });\n }\n /**\n * This is used to set the device status as remembered\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */;\n _proto.setDeviceStatusRemembered = function setDeviceStatusRemembered(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('UpdateDeviceStatus', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n DeviceRememberedStatus: 'remembered'\n }, function (err) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used to set the device status as not remembered\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */;\n _proto.setDeviceStatusNotRemembered = function setDeviceStatusNotRemembered(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('UpdateDeviceStatus', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n DeviceRememberedStatus: 'not_remembered'\n }, function (err) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used to list all devices for a user\n *\n * @param {int} limit the number of devices returned in a call\n * @param {string | null} paginationToken the pagination token in case any was returned before\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess<*>} callback.onSuccess Called on success with device list.\n * @returns {void}\n */;\n _proto.listDevices = function listDevices(limit, paginationToken, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n var requestParams = {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n Limit: limit\n };\n if (paginationToken) {\n requestParams.PaginationToken = paginationToken;\n }\n this.client.request('ListDevices', requestParams, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n return undefined;\n }\n /**\n * This is used to globally revoke all tokens issued to a user\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */;\n _proto.globalSignOut = function globalSignOut(callback) {\n var _this16 = this;\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n this.client.request('GlobalSignOut', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err) {\n if (err) {\n return callback.onFailure(err);\n }\n _this16.clearCachedUser();\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n /**\n * This is used for the user to signOut of the application and clear the cached tokens.\n * @returns {void}\n */;\n _proto.signOut = function signOut() {\n this.signInUserSession = null;\n this.clearCachedUser();\n }\n /**\n * This is used by a user trying to select a given MFA\n * @param {string} answerChallenge the mfa the user wants\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.sendMFASelectionAnswer = function sendMFASelectionAnswer(answerChallenge, callback) {\n var _this17 = this;\n var challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.ANSWER = answerChallenge;\n var jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n _this17.Session = data.Session;\n if (answerChallenge === 'SMS_MFA') {\n return callback.mfaRequired(data.ChallengeName, data.ChallengeParameters);\n }\n if (answerChallenge === 'SOFTWARE_TOKEN_MFA') {\n return callback.totpRequired(data.ChallengeName, data.ChallengeParameters);\n }\n return undefined;\n });\n }\n /**\n * This returns the user context data for advanced security feature.\n * @returns {string} the user context data from CognitoUserPool\n */;\n _proto.getUserContextData = function getUserContextData() {\n var pool = this.pool;\n return pool.getUserContextData(this.username);\n }\n /**\n * This is used by an authenticated or a user trying to authenticate to associate a TOTP MFA\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.associateSoftwareToken = function associateSoftwareToken(callback) {\n var _this18 = this;\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.client.request('AssociateSoftwareToken', {\n Session: this.Session\n }, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n _this18.Session = data.Session;\n return callback.associateSecretCode(data.SecretCode);\n });\n } else {\n this.client.request('AssociateSoftwareToken', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n }, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.associateSecretCode(data.SecretCode);\n });\n }\n }\n /**\n * This is used by an authenticated or a user trying to authenticate to verify a TOTP MFA\n * @param {string} totpCode The MFA code entered by the user.\n * @param {string} friendlyDeviceName The device name we are assigning to the device.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */;\n _proto.verifySoftwareToken = function verifySoftwareToken(totpCode, friendlyDeviceName, callback) {\n var _this19 = this;\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.client.request('VerifySoftwareToken', {\n Session: this.Session,\n UserCode: totpCode,\n FriendlyDeviceName: friendlyDeviceName\n }, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n _this19.Session = data.Session;\n var challengeResponses = {};\n challengeResponses.USERNAME = _this19.username;\n var jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ClientId: _this19.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: _this19.Session\n };\n if (_this19.getUserContextData()) {\n jsonReq.UserContextData = _this19.getUserContextData();\n }\n _this19.client.request('RespondToAuthChallenge', jsonReq, function (errRespond, dataRespond) {\n if (errRespond) {\n return callback.onFailure(errRespond);\n }\n _this19.signInUserSession = _this19.getCognitoUserSession(dataRespond.AuthenticationResult);\n _this19.cacheTokens();\n return callback.onSuccess(_this19.signInUserSession);\n });\n return undefined;\n });\n } else {\n this.client.request('VerifySoftwareToken', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n UserCode: totpCode,\n FriendlyDeviceName: friendlyDeviceName\n }, function (err, data) {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n }\n };\n return CognitoUser;\n}();\nexport { CognitoUser as default };","// constructor\nfunction UserAgent() {} // public\n\nUserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';\nexport var appendToCognitoUserAgent = function appendToCognitoUserAgent(content) {\n if (!content) {\n return;\n }\n if (UserAgent.prototype.userAgent && !UserAgent.prototype.userAgent.includes(content)) {\n UserAgent.prototype.userAgent = UserAgent.prototype.userAgent.concat(' ', content);\n }\n if (!UserAgent.prototype.userAgent || UserAgent.prototype.userAgent === '') {\n UserAgent.prototype.userAgent = content;\n }\n}; // class for defining the amzn user-agent\n\nexport default UserAgent;","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nimport 'isomorphic-unfetch';\nimport UserAgent from './UserAgent';\nvar CognitoError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(CognitoError, _Error);\n function CognitoError(message, code, name, statusCode) {\n var _this;\n _this = _Error.call(this, message) || this;\n _this.code = code;\n _this.name = name;\n _this.statusCode = statusCode;\n return _this;\n }\n return CognitoError;\n}(/*#__PURE__*/_wrapNativeSuper(Error));\n/** @class */\n\nvar Client = /*#__PURE__*/function () {\n /**\n * Constructs a new AWS Cognito Identity Provider client object\n * @param {string} region AWS region\n * @param {string} endpoint endpoint\n * @param {object} fetchOptions options for fetch API (only credentials is supported)\n */\n function Client(region, endpoint, fetchOptions) {\n this.endpoint = endpoint || \"https://cognito-idp.\" + region + \".amazonaws.com/\";\n var _ref = fetchOptions || {},\n credentials = _ref.credentials;\n this.fetchOptions = credentials ? {\n credentials: credentials\n } : {};\n }\n /**\n * Makes an unauthenticated request on AWS Cognito Identity Provider API\n * using fetch\n * @param {string} operation API operation\n * @param {object} params Input parameters\n * @returns Promise\n */\n\n var _proto = Client.prototype;\n _proto.promisifyRequest = function promisifyRequest(operation, params) {\n var _this2 = this;\n return new Promise(function (resolve, reject) {\n _this2.request(operation, params, function (err, data) {\n if (err) {\n reject(new CognitoError(err.message, err.code, err.name, err.statusCode));\n } else {\n resolve(data);\n }\n });\n });\n }\n /**\n * Makes an unauthenticated request on AWS Cognito Identity Provider API\n * using fetch\n * @param {string} operation API operation\n * @param {object} params Input parameters\n * @param {function} callback Callback called when a response is returned\n * @returns {void}\n */;\n _proto.request = function request(operation, params, callback) {\n var headers = {\n 'Content-Type': 'application/x-amz-json-1.1',\n 'X-Amz-Target': \"AWSCognitoIdentityProviderService.\" + operation,\n 'X-Amz-User-Agent': UserAgent.prototype.userAgent\n };\n var options = Object.assign({}, this.fetchOptions, {\n headers: headers,\n method: 'POST',\n mode: 'cors',\n cache: 'no-cache',\n body: JSON.stringify(params)\n });\n var response;\n var responseJsonData;\n fetch(this.endpoint, options).then(function (resp) {\n response = resp;\n return resp;\n }, function (err) {\n // If error happens here, the request failed\n // if it is TypeError throw network error\n if (err instanceof TypeError) {\n throw new Error('Network error');\n }\n throw err;\n }).then(function (resp) {\n return resp.json()[\"catch\"](function () {\n return {};\n });\n }).then(function (data) {\n // return parsed body stream\n if (response.ok) return callback(null, data);\n responseJsonData = data; // Taken from aws-sdk-js/lib/protocol/json.js\n // eslint-disable-next-line no-underscore-dangle\n\n var code = (data.__type || data.code).split('#').pop();\n var error = {\n code: code,\n name: code,\n message: data.message || data.Message || null\n };\n return callback(error);\n })[\"catch\"](function (err) {\n // first check if we have a service error\n if (response && response.headers && response.headers.get('x-amzn-errortype')) {\n try {\n var code = response.headers.get('x-amzn-errortype').split(':')[0];\n var error = {\n code: code,\n name: code,\n statusCode: response.status,\n message: response.status ? response.status.toString() : null\n };\n return callback(error);\n } catch (ex) {\n return callback(err);\n } // otherwise check if error is Network error\n } else if (err instanceof Error && err.message === 'Network error') {\n var _error = {\n code: 'NetworkError',\n name: err.name,\n message: err.message\n };\n return callback(_error);\n } else {\n return callback(err);\n }\n });\n };\n return Client;\n}();\nexport { Client as default };","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\nimport Client from './Client';\nimport CognitoUser from './CognitoUser';\nimport StorageHelper from './StorageHelper';\n/** @class */\n\nvar CognitoUserPool = /*#__PURE__*/function () {\n /**\n * Constructs a new CognitoUserPool object\n * @param {object} data Creation options.\n * @param {string} data.UserPoolId Cognito user pool id.\n * @param {string} data.ClientId User pool application client id.\n * @param {string} data.endpoint Optional custom service endpoint.\n * @param {object} data.fetchOptions Optional options for fetch API.\n * (only credentials option is supported)\n * @param {object} data.Storage Optional storage object.\n * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional:\n * boolean flag indicating if the data collection is enabled\n * to support cognito advanced security features. By default, this\n * flag is set to true.\n */\n function CognitoUserPool(data, wrapRefreshSessionCallback) {\n var _ref = data || {},\n UserPoolId = _ref.UserPoolId,\n ClientId = _ref.ClientId,\n endpoint = _ref.endpoint,\n fetchOptions = _ref.fetchOptions,\n AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag;\n if (!UserPoolId || !ClientId) {\n throw new Error('Both UserPoolId and ClientId are required.');\n }\n if (!/^[\\w-]+_.+$/.test(UserPoolId)) {\n throw new Error('Invalid UserPoolId format.');\n }\n var region = UserPoolId.split('_')[0];\n this.userPoolId = UserPoolId;\n this.clientId = ClientId;\n this.client = new Client(region, endpoint, fetchOptions);\n /**\n * By default, AdvancedSecurityDataCollectionFlag is set to true,\n * if no input value is provided.\n */\n\n this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false;\n this.storage = data.Storage || new StorageHelper().getStorage();\n if (wrapRefreshSessionCallback) {\n this.wrapRefreshSessionCallback = wrapRefreshSessionCallback;\n }\n }\n /**\n * @returns {string} the user pool id\n */\n\n var _proto = CognitoUserPool.prototype;\n _proto.getUserPoolId = function getUserPoolId() {\n return this.userPoolId;\n }\n /**\n * @returns {string} the client id\n */;\n _proto.getClientId = function getClientId() {\n return this.clientId;\n }\n /**\n * @typedef {object} SignUpResult\n * @property {CognitoUser} user New user.\n * @property {bool} userConfirmed If the user is already confirmed.\n */\n\n /**\n * method for signing up a user\n * @param {string} username User's username.\n * @param {string} password Plain-text initial password entered by user.\n * @param {(AttributeArg[])=} userAttributes New user attributes.\n * @param {(AttributeArg[])=} validationData Application metadata.\n * @param {(AttributeArg[])=} clientMetadata Client metadata.\n * @param {nodeCallback} callback Called on error or with the new user.\n * @param {ClientMetadata} clientMetadata object which is passed from client to Cognito Lambda trigger\n * @returns {void}\n */;\n _proto.signUp = function signUp(username, password, userAttributes, validationData, callback, clientMetadata) {\n var _this = this;\n var jsonReq = {\n ClientId: this.clientId,\n Username: username,\n Password: password,\n UserAttributes: userAttributes,\n ValidationData: validationData,\n ClientMetadata: clientMetadata\n };\n if (this.getUserContextData(username)) {\n jsonReq.UserContextData = this.getUserContextData(username);\n }\n this.client.request('SignUp', jsonReq, function (err, data) {\n if (err) {\n return callback(err, null);\n }\n var cognitoUser = {\n Username: username,\n Pool: _this,\n Storage: _this.storage\n };\n var returnData = {\n user: new CognitoUser(cognitoUser),\n userConfirmed: data.UserConfirmed,\n userSub: data.UserSub,\n codeDeliveryDetails: data.CodeDeliveryDetails\n };\n return callback(null, returnData);\n });\n }\n /**\n * method for getting the current user of the application from the local storage\n *\n * @returns {CognitoUser} the user retrieved from storage\n */;\n _proto.getCurrentUser = function getCurrentUser() {\n var lastUserKey = \"CognitoIdentityServiceProvider.\" + this.clientId + \".LastAuthUser\";\n var lastAuthUser = this.storage.getItem(lastUserKey);\n if (lastAuthUser) {\n var cognitoUser = {\n Username: lastAuthUser,\n Pool: this,\n Storage: this.storage\n };\n return new CognitoUser(cognitoUser);\n }\n return null;\n }\n /**\n * This method returns the encoded data string used for cognito advanced security feature.\n * This would be generated only when developer has included the JS used for collecting the\n * data on their client. Please refer to documentation to know more about using AdvancedSecurity\n * features\n * @param {string} username the username for the context data\n * @returns {string} the user context data\n **/;\n _proto.getUserContextData = function getUserContextData(username) {\n if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n /* eslint-disable */\n\n var amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData;\n /* eslint-enable */\n\n if (this.advancedSecurityDataCollectionFlag) {\n var advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username, this.userPoolId, this.clientId);\n if (advancedSecurityData) {\n var userContextData = {\n EncodedData: advancedSecurityData\n };\n return userContextData;\n }\n }\n return {};\n };\n return CognitoUserPool;\n}();\nexport { CognitoUserPool as default };","import * as Cookies from 'js-cookie';\n/** @class */\n\nvar CookieStorage = /*#__PURE__*/function () {\n /**\n * Constructs a new CookieStorage object\n * @param {object} data Creation options.\n * @param {string} data.domain Cookies domain (mandatory).\n * @param {string} data.path Cookies path (default: '/')\n * @param {integer} data.expires Cookie expiration (in days, default: 365)\n * @param {boolean} data.secure Cookie secure flag (default: true)\n * @param {string} data.sameSite Cookie request behaviour (default: null)\n */\n function CookieStorage(data) {\n if (data.domain) {\n this.domain = data.domain;\n } else {\n throw new Error('The domain of cookieStorage can not be undefined.');\n }\n if (data.path) {\n this.path = data.path;\n } else {\n this.path = '/';\n }\n if (Object.prototype.hasOwnProperty.call(data, 'expires')) {\n this.expires = data.expires;\n } else {\n this.expires = 365;\n }\n if (Object.prototype.hasOwnProperty.call(data, 'secure')) {\n this.secure = data.secure;\n } else {\n this.secure = true;\n }\n if (Object.prototype.hasOwnProperty.call(data, 'sameSite')) {\n if (!['strict', 'lax', 'none'].includes(data.sameSite)) {\n throw new Error('The sameSite value of cookieStorage must be \"lax\", \"strict\" or \"none\".');\n }\n if (data.sameSite === 'none' && !this.secure) {\n throw new Error('sameSite = None requires the Secure attribute in latest browser versions.');\n }\n this.sameSite = data.sameSite;\n } else {\n this.sameSite = null;\n }\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\n var _proto = CookieStorage.prototype;\n _proto.setItem = function setItem(key, value) {\n var options = {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure\n };\n if (this.sameSite) {\n options.sameSite = this.sameSite;\n }\n Cookies.set(key, value, options);\n return Cookies.get(key);\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 _proto.getItem = function getItem(key) {\n return Cookies.get(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 _proto.removeItem = function removeItem(key) {\n var options = {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure\n };\n if (this.sameSite) {\n options.sameSite = this.sameSite;\n }\n return Cookies.remove(key, options);\n }\n /**\n * This is used to clear the storage of optional\n * items that were previously set\n * @returns {} an empty object\n */;\n _proto.clear = function clear() {\n var cookies = Cookies.get();\n var numKeys = Object.keys(cookies).length;\n for (var index = 0; index < numKeys; ++index) {\n this.removeItem(Object.keys(cookies)[index]);\n }\n return {};\n };\n return CookieStorage;\n}();\nexport { CookieStorage as default };","'use strict';\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nexports.byteLength = byteLength;\nexports.toByteArray = toByteArray;\nexports.fromByteArray = fromByteArray;\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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;\nfunction getLens(b64) {\n var len = b64.length;\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 var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\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}\nfunction _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n\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 = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | 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 = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n return arr;\n}\nfunction tripletToBase64(num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\n}\nfunction 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(tripletToBase64(tmp));\n }\n return output.join('');\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(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');\n }\n return parts.join('');\n}","!function (e, t) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define([], t) : \"object\" == typeof exports ? exports.bowser = t() : e.bowser = t();\n}(this, function () {\n return function (e) {\n var t = {};\n function r(n) {\n if (t[n]) return t[n].exports;\n var i = t[n] = {\n i: n,\n l: !1,\n exports: {}\n };\n return e[n].call(i.exports, i, i.exports, r), i.l = !0, i.exports;\n }\n return r.m = e, r.c = t, r.d = function (e, t, n) {\n r.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: n\n });\n }, r.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, r.t = function (e, t) {\n if (1 & t && (e = r(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var n = Object.create(null);\n if (r.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var i in e) r.d(n, i, function (t) {\n return e[t];\n }.bind(null, i));\n return n;\n }, r.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return r.d(t, \"a\", t), t;\n }, r.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, r.p = \"\", r(r.s = 90);\n }({\n 17: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n = r(18),\n i = function () {\n function e() {}\n return e.getFirstMatch = function (e, t) {\n var r = t.match(e);\n return r && r.length > 0 && r[1] || \"\";\n }, e.getSecondMatch = function (e, t) {\n var r = t.match(e);\n return r && r.length > 1 && r[2] || \"\";\n }, e.matchAndReturnConst = function (e, t, r) {\n if (e.test(t)) return r;\n }, e.getWindowsVersionName = function (e) {\n switch (e) {\n case \"NT\":\n return \"NT\";\n case \"XP\":\n return \"XP\";\n case \"NT 5.0\":\n return \"2000\";\n case \"NT 5.1\":\n return \"XP\";\n case \"NT 5.2\":\n return \"2003\";\n case \"NT 6.0\":\n return \"Vista\";\n case \"NT 6.1\":\n return \"7\";\n case \"NT 6.2\":\n return \"8\";\n case \"NT 6.3\":\n return \"8.1\";\n case \"NT 10.0\":\n return \"10\";\n default:\n return;\n }\n }, e.getMacOSVersionName = function (e) {\n var t = e.split(\".\").splice(0, 2).map(function (e) {\n return parseInt(e, 10) || 0;\n });\n if (t.push(0), 10 === t[0]) switch (t[1]) {\n case 5:\n return \"Leopard\";\n case 6:\n return \"Snow Leopard\";\n case 7:\n return \"Lion\";\n case 8:\n return \"Mountain Lion\";\n case 9:\n return \"Mavericks\";\n case 10:\n return \"Yosemite\";\n case 11:\n return \"El Capitan\";\n case 12:\n return \"Sierra\";\n case 13:\n return \"High Sierra\";\n case 14:\n return \"Mojave\";\n case 15:\n return \"Catalina\";\n default:\n return;\n }\n }, e.getAndroidVersionName = function (e) {\n var t = e.split(\".\").splice(0, 2).map(function (e) {\n return parseInt(e, 10) || 0;\n });\n if (t.push(0), !(1 === t[0] && t[1] < 5)) return 1 === t[0] && t[1] < 6 ? \"Cupcake\" : 1 === t[0] && t[1] >= 6 ? \"Donut\" : 2 === t[0] && t[1] < 2 ? \"Eclair\" : 2 === t[0] && 2 === t[1] ? \"Froyo\" : 2 === t[0] && t[1] > 2 ? \"Gingerbread\" : 3 === t[0] ? \"Honeycomb\" : 4 === t[0] && t[1] < 1 ? \"Ice Cream Sandwich\" : 4 === t[0] && t[1] < 4 ? \"Jelly Bean\" : 4 === t[0] && t[1] >= 4 ? \"KitKat\" : 5 === t[0] ? \"Lollipop\" : 6 === t[0] ? \"Marshmallow\" : 7 === t[0] ? \"Nougat\" : 8 === t[0] ? \"Oreo\" : 9 === t[0] ? \"Pie\" : void 0;\n }, e.getVersionPrecision = function (e) {\n return e.split(\".\").length;\n }, e.compareVersions = function (t, r, n) {\n void 0 === n && (n = !1);\n var i = e.getVersionPrecision(t),\n s = e.getVersionPrecision(r),\n a = Math.max(i, s),\n o = 0,\n u = e.map([t, r], function (t) {\n var r = a - e.getVersionPrecision(t),\n n = t + new Array(r + 1).join(\".0\");\n return e.map(n.split(\".\"), function (e) {\n return new Array(20 - e.length).join(\"0\") + e;\n }).reverse();\n });\n for (n && (o = a - Math.min(i, s)), a -= 1; a >= o;) {\n if (u[0][a] > u[1][a]) return 1;\n if (u[0][a] === u[1][a]) {\n if (a === o) return 0;\n a -= 1;\n } else if (u[0][a] < u[1][a]) return -1;\n }\n }, e.map = function (e, t) {\n var r,\n n = [];\n if (Array.prototype.map) return Array.prototype.map.call(e, t);\n for (r = 0; r < e.length; r += 1) n.push(t(e[r]));\n return n;\n }, e.find = function (e, t) {\n var r, n;\n if (Array.prototype.find) return Array.prototype.find.call(e, t);\n for (r = 0, n = e.length; r < n; r += 1) {\n var i = e[r];\n if (t(i, r)) return i;\n }\n }, e.assign = function (e) {\n for (var t, r, n = e, i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), a = 1; a < i; a++) s[a - 1] = arguments[a];\n if (Object.assign) return Object.assign.apply(Object, [e].concat(s));\n var o = function o() {\n var e = s[t];\n \"object\" == typeof e && null !== e && Object.keys(e).forEach(function (t) {\n n[t] = e[t];\n });\n };\n for (t = 0, r = s.length; t < r; t += 1) o();\n return e;\n }, e.getBrowserAlias = function (e) {\n return n.BROWSER_ALIASES_MAP[e];\n }, e.getBrowserTypeByAlias = function (e) {\n return n.BROWSER_MAP[e] || \"\";\n }, e;\n }();\n t.default = i, e.exports = t.default;\n },\n 18: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.ENGINE_MAP = t.OS_MAP = t.PLATFORMS_MAP = t.BROWSER_MAP = t.BROWSER_ALIASES_MAP = void 0;\n t.BROWSER_ALIASES_MAP = {\n \"Amazon Silk\": \"amazon_silk\",\n \"Android Browser\": \"android\",\n Bada: \"bada\",\n BlackBerry: \"blackberry\",\n Chrome: \"chrome\",\n Chromium: \"chromium\",\n Electron: \"electron\",\n Epiphany: \"epiphany\",\n Firefox: \"firefox\",\n Focus: \"focus\",\n Generic: \"generic\",\n \"Google Search\": \"google_search\",\n Googlebot: \"googlebot\",\n \"Internet Explorer\": \"ie\",\n \"K-Meleon\": \"k_meleon\",\n Maxthon: \"maxthon\",\n \"Microsoft Edge\": \"edge\",\n \"MZ Browser\": \"mz\",\n \"NAVER Whale Browser\": \"naver\",\n Opera: \"opera\",\n \"Opera Coast\": \"opera_coast\",\n PhantomJS: \"phantomjs\",\n Puffin: \"puffin\",\n QupZilla: \"qupzilla\",\n QQ: \"qq\",\n QQLite: \"qqlite\",\n Safari: \"safari\",\n Sailfish: \"sailfish\",\n \"Samsung Internet for Android\": \"samsung_internet\",\n SeaMonkey: \"seamonkey\",\n Sleipnir: \"sleipnir\",\n Swing: \"swing\",\n Tizen: \"tizen\",\n \"UC Browser\": \"uc\",\n Vivaldi: \"vivaldi\",\n \"WebOS Browser\": \"webos\",\n WeChat: \"wechat\",\n \"Yandex Browser\": \"yandex\",\n Roku: \"roku\"\n };\n t.BROWSER_MAP = {\n amazon_silk: \"Amazon Silk\",\n android: \"Android Browser\",\n bada: \"Bada\",\n blackberry: \"BlackBerry\",\n chrome: \"Chrome\",\n chromium: \"Chromium\",\n electron: \"Electron\",\n epiphany: \"Epiphany\",\n firefox: \"Firefox\",\n focus: \"Focus\",\n generic: \"Generic\",\n googlebot: \"Googlebot\",\n google_search: \"Google Search\",\n ie: \"Internet Explorer\",\n k_meleon: \"K-Meleon\",\n maxthon: \"Maxthon\",\n edge: \"Microsoft Edge\",\n mz: \"MZ Browser\",\n naver: \"NAVER Whale Browser\",\n opera: \"Opera\",\n opera_coast: \"Opera Coast\",\n phantomjs: \"PhantomJS\",\n puffin: \"Puffin\",\n qupzilla: \"QupZilla\",\n qq: \"QQ Browser\",\n qqlite: \"QQ Browser Lite\",\n safari: \"Safari\",\n sailfish: \"Sailfish\",\n samsung_internet: \"Samsung Internet for Android\",\n seamonkey: \"SeaMonkey\",\n sleipnir: \"Sleipnir\",\n swing: \"Swing\",\n tizen: \"Tizen\",\n uc: \"UC Browser\",\n vivaldi: \"Vivaldi\",\n webos: \"WebOS Browser\",\n wechat: \"WeChat\",\n yandex: \"Yandex Browser\"\n };\n t.PLATFORMS_MAP = {\n tablet: \"tablet\",\n mobile: \"mobile\",\n desktop: \"desktop\",\n tv: \"tv\"\n };\n t.OS_MAP = {\n WindowsPhone: \"Windows Phone\",\n Windows: \"Windows\",\n MacOS: \"macOS\",\n iOS: \"iOS\",\n Android: \"Android\",\n WebOS: \"WebOS\",\n BlackBerry: \"BlackBerry\",\n Bada: \"Bada\",\n Tizen: \"Tizen\",\n Linux: \"Linux\",\n ChromeOS: \"Chrome OS\",\n PlayStation4: \"PlayStation 4\",\n Roku: \"Roku\"\n };\n t.ENGINE_MAP = {\n EdgeHTML: \"EdgeHTML\",\n Blink: \"Blink\",\n Trident: \"Trident\",\n Presto: \"Presto\",\n Gecko: \"Gecko\",\n WebKit: \"WebKit\"\n };\n },\n 90: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n,\n i = (n = r(91)) && n.__esModule ? n : {\n default: n\n },\n s = r(18);\n function a(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n var o = function () {\n function e() {}\n var t, r, n;\n return e.getParser = function (e, t) {\n if (void 0 === t && (t = !1), \"string\" != typeof e) throw new Error(\"UserAgent should be a string\");\n return new i.default(e, t);\n }, e.parse = function (e) {\n return new i.default(e).getResult();\n }, t = e, n = [{\n key: \"BROWSER_MAP\",\n get: function get() {\n return s.BROWSER_MAP;\n }\n }, {\n key: \"ENGINE_MAP\",\n get: function get() {\n return s.ENGINE_MAP;\n }\n }, {\n key: \"OS_MAP\",\n get: function get() {\n return s.OS_MAP;\n }\n }, {\n key: \"PLATFORMS_MAP\",\n get: function get() {\n return s.PLATFORMS_MAP;\n }\n }], (r = null) && a(t.prototype, r), n && a(t, n), e;\n }();\n t.default = o, e.exports = t.default;\n },\n 91: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n = u(r(92)),\n i = u(r(93)),\n s = u(r(94)),\n a = u(r(95)),\n o = u(r(17));\n function u(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var d = function () {\n function e(e, t) {\n if (void 0 === t && (t = !1), null == e || \"\" === e) throw new Error(\"UserAgent parameter can't be empty\");\n this._ua = e, this.parsedResult = {}, !0 !== t && this.parse();\n }\n var t = e.prototype;\n return t.getUA = function () {\n return this._ua;\n }, t.test = function (e) {\n return e.test(this._ua);\n }, t.parseBrowser = function () {\n var e = this;\n this.parsedResult.browser = {};\n var t = o.default.find(n.default, function (t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function (t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.browser = t.describe(this.getUA())), this.parsedResult.browser;\n }, t.getBrowser = function () {\n return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser();\n }, t.getBrowserName = function (e) {\n return e ? String(this.getBrowser().name).toLowerCase() || \"\" : this.getBrowser().name || \"\";\n }, t.getBrowserVersion = function () {\n return this.getBrowser().version;\n }, t.getOS = function () {\n return this.parsedResult.os ? this.parsedResult.os : this.parseOS();\n }, t.parseOS = function () {\n var e = this;\n this.parsedResult.os = {};\n var t = o.default.find(i.default, function (t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function (t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.os = t.describe(this.getUA())), this.parsedResult.os;\n }, t.getOSName = function (e) {\n var t = this.getOS().name;\n return e ? String(t).toLowerCase() || \"\" : t || \"\";\n }, t.getOSVersion = function () {\n return this.getOS().version;\n }, t.getPlatform = function () {\n return this.parsedResult.platform ? this.parsedResult.platform : this.parsePlatform();\n }, t.getPlatformType = function (e) {\n void 0 === e && (e = !1);\n var t = this.getPlatform().type;\n return e ? String(t).toLowerCase() || \"\" : t || \"\";\n }, t.parsePlatform = function () {\n var e = this;\n this.parsedResult.platform = {};\n var t = o.default.find(s.default, function (t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function (t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.platform = t.describe(this.getUA())), this.parsedResult.platform;\n }, t.getEngine = function () {\n return this.parsedResult.engine ? this.parsedResult.engine : this.parseEngine();\n }, t.getEngineName = function (e) {\n return e ? String(this.getEngine().name).toLowerCase() || \"\" : this.getEngine().name || \"\";\n }, t.parseEngine = function () {\n var e = this;\n this.parsedResult.engine = {};\n var t = o.default.find(a.default, function (t) {\n if (\"function\" == typeof t.test) return t.test(e);\n if (t.test instanceof Array) return t.test.some(function (t) {\n return e.test(t);\n });\n throw new Error(\"Browser's test function is not valid\");\n });\n return t && (this.parsedResult.engine = t.describe(this.getUA())), this.parsedResult.engine;\n }, t.parse = function () {\n return this.parseBrowser(), this.parseOS(), this.parsePlatform(), this.parseEngine(), this;\n }, t.getResult = function () {\n return o.default.assign({}, this.parsedResult);\n }, t.satisfies = function (e) {\n var t = this,\n r = {},\n n = 0,\n i = {},\n s = 0;\n if (Object.keys(e).forEach(function (t) {\n var a = e[t];\n \"string\" == typeof a ? (i[t] = a, s += 1) : \"object\" == typeof a && (r[t] = a, n += 1);\n }), n > 0) {\n var a = Object.keys(r),\n u = o.default.find(a, function (e) {\n return t.isOS(e);\n });\n if (u) {\n var d = this.satisfies(r[u]);\n if (void 0 !== d) return d;\n }\n var c = o.default.find(a, function (e) {\n return t.isPlatform(e);\n });\n if (c) {\n var f = this.satisfies(r[c]);\n if (void 0 !== f) return f;\n }\n }\n if (s > 0) {\n var l = Object.keys(i),\n h = o.default.find(l, function (e) {\n return t.isBrowser(e, !0);\n });\n if (void 0 !== h) return this.compareVersion(i[h]);\n }\n }, t.isBrowser = function (e, t) {\n void 0 === t && (t = !1);\n var r = this.getBrowserName().toLowerCase(),\n n = e.toLowerCase(),\n i = o.default.getBrowserTypeByAlias(n);\n return t && i && (n = i.toLowerCase()), n === r;\n }, t.compareVersion = function (e) {\n var t = [0],\n r = e,\n n = !1,\n i = this.getBrowserVersion();\n if (\"string\" == typeof i) return \">\" === e[0] || \"<\" === e[0] ? (r = e.substr(1), \"=\" === e[1] ? (n = !0, r = e.substr(2)) : t = [], \">\" === e[0] ? t.push(1) : t.push(-1)) : \"=\" === e[0] ? r = e.substr(1) : \"~\" === e[0] && (n = !0, r = e.substr(1)), t.indexOf(o.default.compareVersions(i, r, n)) > -1;\n }, t.isOS = function (e) {\n return this.getOSName(!0) === String(e).toLowerCase();\n }, t.isPlatform = function (e) {\n return this.getPlatformType(!0) === String(e).toLowerCase();\n }, t.isEngine = function (e) {\n return this.getEngineName(!0) === String(e).toLowerCase();\n }, t.is = function (e, t) {\n return void 0 === t && (t = !1), this.isBrowser(e, t) || this.isOS(e) || this.isPlatform(e);\n }, t.some = function (e) {\n var t = this;\n return void 0 === e && (e = []), e.some(function (e) {\n return t.is(e);\n });\n }, e;\n }();\n t.default = d, e.exports = t.default;\n },\n 92: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n,\n i = (n = r(17)) && n.__esModule ? n : {\n default: n\n };\n var s = /version\\/(\\d+(\\.?_?\\d+)+)/i,\n a = [{\n test: [/googlebot/i],\n describe: function describe(e) {\n var t = {\n name: \"Googlebot\"\n },\n r = i.default.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/opera/i],\n describe: function describe(e) {\n var t = {\n name: \"Opera\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/opr\\/|opios/i],\n describe: function describe(e) {\n var t = {\n name: \"Opera\"\n },\n r = i.default.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/SamsungBrowser/i],\n describe: function describe(e) {\n var t = {\n name: \"Samsung Internet for Android\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/Whale/i],\n describe: function describe(e) {\n var t = {\n name: \"NAVER Whale Browser\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/MZBrowser/i],\n describe: function describe(e) {\n var t = {\n name: \"MZ Browser\"\n },\n r = i.default.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/focus/i],\n describe: function describe(e) {\n var t = {\n name: \"Focus\"\n },\n r = i.default.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/swing/i],\n describe: function describe(e) {\n var t = {\n name: \"Swing\"\n },\n r = i.default.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/coast/i],\n describe: function describe(e) {\n var t = {\n name: \"Opera Coast\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/opt\\/\\d+(?:.?_?\\d+)+/i],\n describe: function describe(e) {\n var t = {\n name: \"Opera Touch\"\n },\n r = i.default.getFirstMatch(/(?:opt)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/yabrowser/i],\n describe: function describe(e) {\n var t = {\n name: \"Yandex Browser\"\n },\n r = i.default.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/ucbrowser/i],\n describe: function describe(e) {\n var t = {\n name: \"UC Browser\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/Maxthon|mxios/i],\n describe: function describe(e) {\n var t = {\n name: \"Maxthon\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/epiphany/i],\n describe: function describe(e) {\n var t = {\n name: \"Epiphany\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/puffin/i],\n describe: function describe(e) {\n var t = {\n name: \"Puffin\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/sleipnir/i],\n describe: function describe(e) {\n var t = {\n name: \"Sleipnir\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/k-meleon/i],\n describe: function describe(e) {\n var t = {\n name: \"K-Meleon\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/micromessenger/i],\n describe: function describe(e) {\n var t = {\n name: \"WeChat\"\n },\n r = i.default.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/qqbrowser/i],\n describe: function describe(e) {\n var t = {\n name: /qqbrowserlite/i.test(e) ? \"QQ Browser Lite\" : \"QQ Browser\"\n },\n r = i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/msie|trident/i],\n describe: function describe(e) {\n var t = {\n name: \"Internet Explorer\"\n },\n r = i.default.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/\\sedg\\//i],\n describe: function describe(e) {\n var t = {\n name: \"Microsoft Edge\"\n },\n r = i.default.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/edg([ea]|ios)/i],\n describe: function describe(e) {\n var t = {\n name: \"Microsoft Edge\"\n },\n r = i.default.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/vivaldi/i],\n describe: function describe(e) {\n var t = {\n name: \"Vivaldi\"\n },\n r = i.default.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/seamonkey/i],\n describe: function describe(e) {\n var t = {\n name: \"SeaMonkey\"\n },\n r = i.default.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/sailfish/i],\n describe: function describe(e) {\n var t = {\n name: \"Sailfish\"\n },\n r = i.default.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/silk/i],\n describe: function describe(e) {\n var t = {\n name: \"Amazon Silk\"\n },\n r = i.default.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/phantom/i],\n describe: function describe(e) {\n var t = {\n name: \"PhantomJS\"\n },\n r = i.default.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/slimerjs/i],\n describe: function describe(e) {\n var t = {\n name: \"SlimerJS\"\n },\n r = i.default.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/blackberry|\\bbb\\d+/i, /rim\\stablet/i],\n describe: function describe(e) {\n var t = {\n name: \"BlackBerry\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/(web|hpw)[o0]s/i],\n describe: function describe(e) {\n var t = {\n name: \"WebOS Browser\"\n },\n r = i.default.getFirstMatch(s, e) || i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/bada/i],\n describe: function describe(e) {\n var t = {\n name: \"Bada\"\n },\n r = i.default.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/tizen/i],\n describe: function describe(e) {\n var t = {\n name: \"Tizen\"\n },\n r = i.default.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/qupzilla/i],\n describe: function describe(e) {\n var t = {\n name: \"QupZilla\"\n },\n r = i.default.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/firefox|iceweasel|fxios/i],\n describe: function describe(e) {\n var t = {\n name: \"Firefox\"\n },\n r = i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/electron/i],\n describe: function describe(e) {\n var t = {\n name: \"Electron\"\n },\n r = i.default.getFirstMatch(/(?:electron)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/MiuiBrowser/i],\n describe: function describe(e) {\n var t = {\n name: \"Miui\"\n },\n r = i.default.getFirstMatch(/(?:MiuiBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/chromium/i],\n describe: function describe(e) {\n var t = {\n name: \"Chromium\"\n },\n r = i.default.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i, e) || i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/chrome|crios|crmo/i],\n describe: function describe(e) {\n var t = {\n name: \"Chrome\"\n },\n r = i.default.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/GSA/i],\n describe: function describe(e) {\n var t = {\n name: \"Google Search\"\n },\n r = i.default.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: function test(e) {\n var t = !e.test(/like android/i),\n r = e.test(/android/i);\n return t && r;\n },\n describe: function describe(e) {\n var t = {\n name: \"Android Browser\"\n },\n r = i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/playstation 4/i],\n describe: function describe(e) {\n var t = {\n name: \"PlayStation 4\"\n },\n r = i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/safari|applewebkit/i],\n describe: function describe(e) {\n var t = {\n name: \"Safari\"\n },\n r = i.default.getFirstMatch(s, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/.*/i],\n describe: function describe(e) {\n var t = -1 !== e.search(\"\\\\(\") ? /^(.*)\\/(.*)[ \\t]\\((.*)/ : /^(.*)\\/(.*) /;\n return {\n name: i.default.getFirstMatch(t, e),\n version: i.default.getSecondMatch(t, e)\n };\n }\n }];\n t.default = a, e.exports = t.default;\n },\n 93: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n,\n i = (n = r(17)) && n.__esModule ? n : {\n default: n\n },\n s = r(18);\n var a = [{\n test: [/Roku\\/DVP/],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i, e);\n return {\n name: s.OS_MAP.Roku,\n version: t\n };\n }\n }, {\n test: [/windows phone/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.WindowsPhone,\n version: t\n };\n }\n }, {\n test: [/windows /i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i, e),\n r = i.default.getWindowsVersionName(t);\n return {\n name: s.OS_MAP.Windows,\n version: t,\n versionName: r\n };\n }\n }, {\n test: [/Macintosh(.*?) FxiOS(.*?)\\//],\n describe: function describe(e) {\n var t = {\n name: s.OS_MAP.iOS\n },\n r = i.default.getSecondMatch(/(Version\\/)(\\d[\\d.]+)/, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/macintosh/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i, e).replace(/[_\\s]/g, \".\"),\n r = i.default.getMacOSVersionName(t),\n n = {\n name: s.OS_MAP.MacOS,\n version: t\n };\n return r && (n.versionName = r), n;\n }\n }, {\n test: [/(ipod|iphone|ipad)/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i, e).replace(/[_\\s]/g, \".\");\n return {\n name: s.OS_MAP.iOS,\n version: t\n };\n }\n }, {\n test: function test(e) {\n var t = !e.test(/like android/i),\n r = e.test(/android/i);\n return t && r;\n },\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i, e),\n r = i.default.getAndroidVersionName(t),\n n = {\n name: s.OS_MAP.Android,\n version: t\n };\n return r && (n.versionName = r), n;\n }\n }, {\n test: [/(web|hpw)[o0]s/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i, e),\n r = {\n name: s.OS_MAP.WebOS\n };\n return t && t.length && (r.version = t), r;\n }\n }, {\n test: [/blackberry|\\bbb\\d+/i, /rim\\stablet/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i, e) || i.default.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i, e) || i.default.getFirstMatch(/\\bbb(\\d+)/i, e);\n return {\n name: s.OS_MAP.BlackBerry,\n version: t\n };\n }\n }, {\n test: [/bada/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.Bada,\n version: t\n };\n }\n }, {\n test: [/tizen/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.Tizen,\n version: t\n };\n }\n }, {\n test: [/linux/i],\n describe: function describe() {\n return {\n name: s.OS_MAP.Linux\n };\n }\n }, {\n test: [/CrOS/],\n describe: function describe() {\n return {\n name: s.OS_MAP.ChromeOS\n };\n }\n }, {\n test: [/PlayStation 4/],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i, e);\n return {\n name: s.OS_MAP.PlayStation4,\n version: t\n };\n }\n }];\n t.default = a, e.exports = t.default;\n },\n 94: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n,\n i = (n = r(17)) && n.__esModule ? n : {\n default: n\n },\n s = r(18);\n var a = [{\n test: [/googlebot/i],\n describe: function describe() {\n return {\n type: \"bot\",\n vendor: \"Google\"\n };\n }\n }, {\n test: [/huawei/i],\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/(can-l01)/i, e) && \"Nova\",\n r = {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Huawei\"\n };\n return t && (r.model = t), r;\n }\n }, {\n test: [/nexus\\s*(?:7|8|9|10).*/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Nexus\"\n };\n }\n }, {\n test: [/ipad/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Apple\",\n model: \"iPad\"\n };\n }\n }, {\n test: [/Macintosh(.*?) FxiOS(.*?)\\//],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Apple\",\n model: \"iPad\"\n };\n }\n }, {\n test: [/kftt build/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Amazon\",\n model: \"Kindle Fire HD 7\"\n };\n }\n }, {\n test: [/silk/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet,\n vendor: \"Amazon\"\n };\n }\n }, {\n test: [/tablet(?! pc)/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet\n };\n }\n }, {\n test: function test(e) {\n var t = e.test(/ipod|iphone/i),\n r = e.test(/like (ipod|iphone)/i);\n return t && !r;\n },\n describe: function describe(e) {\n var t = i.default.getFirstMatch(/(ipod|iphone)/i, e);\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Apple\",\n model: t\n };\n }\n }, {\n test: [/nexus\\s*[0-6].*/i, /galaxy nexus/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Nexus\"\n };\n }\n }, {\n test: [/[^-]mobi/i],\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.mobile\n };\n }\n }, {\n test: function test(e) {\n return \"blackberry\" === e.getBrowserName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"BlackBerry\"\n };\n }\n }, {\n test: function test(e) {\n return \"bada\" === e.getBrowserName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.mobile\n };\n }\n }, {\n test: function test(e) {\n return \"windows phone\" === e.getBrowserName();\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.mobile,\n vendor: \"Microsoft\"\n };\n }\n }, {\n test: function test(e) {\n var t = Number(String(e.getOSVersion()).split(\".\")[0]);\n return \"android\" === e.getOSName(!0) && t >= 3;\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tablet\n };\n }\n }, {\n test: function test(e) {\n return \"android\" === e.getOSName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.mobile\n };\n }\n }, {\n test: function test(e) {\n return \"macos\" === e.getOSName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.desktop,\n vendor: \"Apple\"\n };\n }\n }, {\n test: function test(e) {\n return \"windows\" === e.getOSName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.desktop\n };\n }\n }, {\n test: function test(e) {\n return \"linux\" === e.getOSName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.desktop\n };\n }\n }, {\n test: function test(e) {\n return \"playstation 4\" === e.getOSName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tv\n };\n }\n }, {\n test: function test(e) {\n return \"roku\" === e.getOSName(!0);\n },\n describe: function describe() {\n return {\n type: s.PLATFORMS_MAP.tv\n };\n }\n }];\n t.default = a, e.exports = t.default;\n },\n 95: function _(e, t, r) {\n \"use strict\";\n\n t.__esModule = !0, t.default = void 0;\n var n,\n i = (n = r(17)) && n.__esModule ? n : {\n default: n\n },\n s = r(18);\n var a = [{\n test: function test(e) {\n return \"microsoft edge\" === e.getBrowserName(!0);\n },\n describe: function describe(e) {\n if (/\\sedg\\//i.test(e)) return {\n name: s.ENGINE_MAP.Blink\n };\n var t = i.default.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return {\n name: s.ENGINE_MAP.EdgeHTML,\n version: t\n };\n }\n }, {\n test: [/trident/i],\n describe: function describe(e) {\n var t = {\n name: s.ENGINE_MAP.Trident\n },\n r = i.default.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: function test(e) {\n return e.test(/presto/i);\n },\n describe: function describe(e) {\n var t = {\n name: s.ENGINE_MAP.Presto\n },\n r = i.default.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: function test(e) {\n var t = e.test(/gecko/i),\n r = e.test(/like gecko/i);\n return t && !r;\n },\n describe: function describe(e) {\n var t = {\n name: s.ENGINE_MAP.Gecko\n },\n r = i.default.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }, {\n test: [/(apple)?webkit\\/537\\.36/i],\n describe: function describe() {\n return {\n name: s.ENGINE_MAP.Blink\n };\n }\n }, {\n test: [/(apple)?webkit/i],\n describe: function describe(e) {\n var t = {\n name: s.ENGINE_MAP.WebKit\n },\n r = i.default.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i, e);\n return r && (t.version = r), t;\n }\n }];\n t.default = a, e.exports = t.default;\n }\n });\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\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nvar base64 = require('base64-js');\nvar ieee754 = require('ieee754');\nvar isArray = require('isarray');\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object 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 * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength();\nfunction typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n arr.__proto__ = {\n __proto__: Uint8Array.prototype,\n foo: function foo() {\n return 42;\n }\n };\n return arr.foo() === 42 &&\n // typed array instances can be augmented\n typeof arr.subarray === 'function' &&\n // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`\n } catch (e) {\n return false;\n }\n}\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;\n}\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length');\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n return that;\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 if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length);\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error('If encoding is specified then the first argument must be a string');\n }\n return allocUnsafe(this, arg);\n }\n return from(this, arg, encodingOrOffset, length);\n}\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr;\n};\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length);\n }\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset);\n }\n return fromObject(that, value);\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(null, value, encodingOrOffset, length);\n};\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n });\n }\n}\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number');\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative');\n }\n}\nfunction alloc(that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, 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 interpretted as a start offset.\n return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);\n }\n return createBuffer(that, 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(null, size, fill, encoding);\n};\nfunction allocUnsafe(that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that;\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(null, 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(null, size);\n};\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding');\n }\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n var actual = that.write(string, encoding);\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 that = that.slice(0, actual);\n }\n return that;\n}\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n}\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that;\n}\nfunction fromObject(that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n if (that.length === 0) {\n return that;\n }\n obj.copy(that, 0, 0, len);\n return that;\n }\n if (obj) {\n if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0);\n }\n return fromArrayLike(that, obj);\n }\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data);\n }\n }\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');\n}\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');\n }\n return length | 0;\n}\nfunction SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length);\n}\nBuffer.isBuffer = function isBuffer(b) {\n return !!(b != null && b._isBuffer);\n};\nBuffer.compare = function compare(a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers');\n }\n if (a === b) return 0;\n var x = a.length;\n var y = b.length;\n for (var 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 if (x < y) return -1;\n if (y < x) return 1;\n return 0;\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};\nBuffer.concat = function concat(list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer.alloc(0);\n }\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer;\n};\nfunction byteLength(string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length;\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n var len = string.length;\n if (len === 0) return 0;\n\n // Use a for loop to avoid recursion\n var 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 case undefined:\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) return utf8ToBytes(string).length; // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\nfunction slowToString(encoding, start, end) {\n var 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 if (end === undefined || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return '';\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return '';\n }\n if (!encoding) encoding = 'utf8';\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end);\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end);\n case 'ascii':\n return asciiSlice(this, start, end);\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end);\n case 'base64':\n return base64Slice(this, start, end);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 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}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\nfunction swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits');\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n};\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits');\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n};\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits');\n }\n for (var 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};\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0;\n if (length === 0) return '';\n if (arguments.length === 0) return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\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};\nBuffer.prototype.inspect = function inspect() {\n var str = '';\n var max = exports.INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return '';\n};\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer');\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 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index');\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 start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target) return 0;\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\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 (isNaN(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;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;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 (Buffer.TYPED_ARRAY_SUPPORT && 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 throw new TypeError('val must be string, number or Buffer');\n}\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var 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) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\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 var i;\n if (dir) {\n var 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 var found = true;\n for (var 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 return -1;\n}\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var 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 // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n return i;\n}\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length);\n}\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\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 // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n }\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds');\n }\n if (!encoding) encoding = 'utf8';\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length);\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length);\n case 'ascii':\n return asciiWrite(this, string, offset, length);\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length);\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 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};\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\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}\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\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 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 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\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction decodeCodePointsArray(codePoints) {\n var 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 var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n}\nfunction asciiSlice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret;\n}\nfunction latin1Slice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n}\nfunction hexSlice(buf, start, end) {\n var len = buf.length;\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out;\n}\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n}\nBuffer.prototype.slice = function slice(start, end) {\n var 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) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start) end = start;\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\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}\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 var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n return val;\n};\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 var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n return val;\n};\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset];\n};\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\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 var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\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 var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n};\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n};\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n};\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\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}\nBuffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n return offset + byteLength;\n};\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 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = value & 0xff;\n return offset + 1;\n};\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;\n }\n}\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;\n }\n}\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n var i = 0;\n var mul = 1;\n var 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 return offset + byteLength;\n};\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n var i = byteLength - 1;\n var mul = 1;\n var 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 return offset + byteLength;\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 (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\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}\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\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}\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n};\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\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}\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\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 (!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('sourceStart out of bounds');\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 var len = end - start;\n var i;\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);\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 (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\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 } else if (typeof val === 'number') {\n val = val & 255;\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 if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n if (!val) val = 0;\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).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}\nfunction stringtrim(str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n}\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16);\n return n.toString(16);\n}\nfunction utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n for (var 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 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 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(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 {\n throw new Error('Invalid code point');\n }\n }\n return bytes;\n}\nfunction asciiToBytes(str) {\n var byteArray = [];\n for (var 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}\nfunction utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var 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 base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n}\nfunction blitBuffer(src, dst, offset, length) {\n for (var 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}\nfunction isnan(val) {\n return val !== val; // eslint-disable-line no-self-compare\n}","var toString = {}.toString;\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBind = require('./');\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n var intrinsic = GetIntrinsic(name, !!allowMissing);\n if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n return callBind(intrinsic);\n }\n return intrinsic;\n};","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\nmodule.exports = function callBind(originalFunction) {\n if (typeof originalFunction !== 'function') {\n throw new $TypeError('a function is required');\n }\n var func = $reflectApply(bind, $call, arguments);\n return setFunctionLength(func, 1 + $max(0, originalFunction.length - (arguments.length - 1)), true);\n};\nvar applyBind = function applyBind() {\n return $reflectApply(bind, $apply, arguments);\n};\nif ($defineProperty) {\n $defineProperty(module.exports, 'apply', {\n value: applyBind\n });\n} else {\n module.exports.apply = applyBind;\n}","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n 'use strict';\n\n var hasOwn = {}.hasOwnProperty;\n function classNames() {\n var classes = '';\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (arg) {\n classes = appendClass(classes, parseValue(arg));\n }\n }\n return classes;\n }\n function parseValue(arg) {\n if (typeof arg === 'string' || typeof arg === 'number') {\n return arg;\n }\n if (typeof arg !== 'object') {\n return '';\n }\n if (Array.isArray(arg)) {\n return classNames.apply(null, arg);\n }\n if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n return arg.toString();\n }\n var classes = '';\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes = appendClass(classes, key);\n }\n }\n return classes;\n }\n function appendClass(value, newClass) {\n if (!newClass) {\n return value;\n }\n if (value) {\n return value + ' ' + newClass;\n }\n return value + newClass;\n }\n if (typeof module !== 'undefined' && module.exports) {\n classNames.default = classNames;\n module.exports = classNames;\n } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n // register as 'classnames', consistent with npm package name\n define('classnames', [], function () {\n return classNames;\n });\n } else {\n window.classNames = classNames;\n }\n})();","/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module exports.\n * @public\n */\nexports.parse = parse;\nexports.serialize = serialize;\n\n/**\n * Module variables.\n * @private\n */\n\nvar decode = decodeURIComponent;\nvar encode = encodeURIComponent;\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\n\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\n/**\n * Parse a cookie header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n *\n * @param {string} str\n * @param {object} [options]\n * @return {object}\n * @public\n */\n\nfunction parse(str, options) {\n if (typeof str !== 'string') {\n throw new TypeError('argument str must be a string');\n }\n var obj = {};\n var opt = options || {};\n var pairs = str.split(';');\n var dec = opt.decode || decode;\n for (var i = 0; i < pairs.length; i++) {\n var pair = pairs[i];\n var index = pair.indexOf('=');\n\n // skip things that don't look like key=value\n if (index < 0) {\n continue;\n }\n var key = pair.substring(0, index).trim();\n\n // only assign once\n if (undefined == obj[key]) {\n var val = pair.substring(index + 1, pair.length).trim();\n\n // quoted values\n if (val[0] === '\"') {\n val = val.slice(1, -1);\n }\n obj[key] = tryDecode(val, dec);\n }\n }\n return obj;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * serialize('foo', 'bar', { httpOnly: true })\n * => \"foo=bar; httpOnly\"\n *\n * @param {string} name\n * @param {string} val\n * @param {object} [options]\n * @return {string}\n * @public\n */\n\nfunction serialize(name, val, options) {\n var opt = options || {};\n var enc = opt.encode || encode;\n if (typeof enc !== 'function') {\n throw new TypeError('option encode is invalid');\n }\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n var value = enc(val);\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument val is invalid');\n }\n var str = name + '=' + value;\n if (null != opt.maxAge) {\n var maxAge = opt.maxAge - 0;\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError('option maxAge is invalid');\n }\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n str += '; Domain=' + opt.domain;\n }\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n str += '; Path=' + opt.path;\n }\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n str += '; Expires=' + opt.expires.toUTCString();\n }\n if (opt.httpOnly) {\n str += '; HttpOnly';\n }\n if (opt.secure) {\n str += '; Secure';\n }\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n return str;\n}\n\n/**\n * Try decoding a string using a decoding function.\n *\n * @param {string} str\n * @param {function} decode\n * @private\n */\n\nfunction tryDecode(str, decode) {\n try {\n return decode(str);\n } catch (e) {\n return str;\n }\n}","require(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nrequire(\"core-js/modules/esnext.global-this.js\");\n;\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory();\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([], factory);\n } else {\n // Global (browser)\n root.CryptoJS = factory();\n }\n})(this, function () {\n /*globals window, global, require*/\n\n /**\n * CryptoJS core components.\n */\n var CryptoJS = CryptoJS || function (Math, undefined) {\n var crypto;\n\n // Native crypto from window (Browser)\n if (typeof window !== 'undefined' && window.crypto) {\n crypto = window.crypto;\n }\n\n // Native crypto in web worker (Browser)\n if (typeof self !== 'undefined' && self.crypto) {\n crypto = self.crypto;\n }\n\n // Native crypto from worker\n if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n crypto = globalThis.crypto;\n }\n\n // Native (experimental IE 11) crypto from window (Browser)\n if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n crypto = window.msCrypto;\n }\n\n // Native crypto from global (NodeJS)\n if (!crypto && typeof global !== 'undefined' && global.crypto) {\n crypto = global.crypto;\n }\n\n // Native crypto import via require (NodeJS)\n if (!crypto && typeof require === 'function') {\n try {\n crypto = require('crypto');\n } catch (err) {}\n }\n\n /*\n * Cryptographically secure pseudorandom number generator\n *\n * As Math.random() is cryptographically not safe to use\n */\n var cryptoSecureRandomInt = function cryptoSecureRandomInt() {\n if (crypto) {\n // Use getRandomValues method (Browser)\n if (typeof crypto.getRandomValues === 'function') {\n try {\n return crypto.getRandomValues(new Uint32Array(1))[0];\n } catch (err) {}\n }\n\n // Use randomBytes method (NodeJS)\n if (typeof crypto.randomBytes === 'function') {\n try {\n return crypto.randomBytes(4).readInt32LE();\n } catch (err) {}\n }\n }\n throw new Error('Native crypto module could not be used to get secure random number.');\n };\n\n /*\n * Local polyfill of Object.create\n */\n var create = Object.create || function () {\n function F() {}\n return function (obj) {\n var subtype;\n F.prototype = obj;\n subtype = new F();\n F.prototype = null;\n return subtype;\n };\n }();\n\n /**\n * CryptoJS namespace.\n */\n var C = {};\n\n /**\n * Library namespace.\n */\n var C_lib = C.lib = {};\n\n /**\n * Base object for prototypal inheritance.\n */\n var Base = C_lib.Base = function () {\n return {\n /**\n * Creates a new object that inherits from this object.\n *\n * @param {Object} overrides Properties to copy into the new object.\n *\n * @return {Object} The new object.\n *\n * @static\n *\n * @example\n *\n * var MyType = CryptoJS.lib.Base.extend({\n * field: 'value',\n *\n * method: function () {\n * }\n * });\n */\n extend: function extend(overrides) {\n // Spawn\n var subtype = create(this);\n\n // Augment\n if (overrides) {\n subtype.mixIn(overrides);\n }\n\n // Create default initializer\n if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n subtype.init = function () {\n subtype.$super.init.apply(this, arguments);\n };\n }\n\n // Initializer's prototype is the subtype object\n subtype.init.prototype = subtype;\n\n // Reference supertype\n subtype.$super = this;\n return subtype;\n },\n /**\n * Extends this object and runs the init method.\n * Arguments to create() will be passed to init().\n *\n * @return {Object} The new object.\n *\n * @static\n *\n * @example\n *\n * var instance = MyType.create();\n */\n create: function create() {\n var instance = this.extend();\n instance.init.apply(instance, arguments);\n return instance;\n },\n /**\n * Initializes a newly created object.\n * Override this method to add some logic when your objects are created.\n *\n * @example\n *\n * var MyType = CryptoJS.lib.Base.extend({\n * init: function () {\n * // ...\n * }\n * });\n */\n init: function init() {},\n /**\n * Copies properties into this object.\n *\n * @param {Object} properties The properties to mix in.\n *\n * @example\n *\n * MyType.mixIn({\n * field: 'value'\n * });\n */\n mixIn: function mixIn(properties) {\n for (var propertyName in properties) {\n if (properties.hasOwnProperty(propertyName)) {\n this[propertyName] = properties[propertyName];\n }\n }\n\n // IE won't copy toString using the loop above\n if (properties.hasOwnProperty('toString')) {\n this.toString = properties.toString;\n }\n },\n /**\n * Creates a copy of this object.\n *\n * @return {Object} The clone.\n *\n * @example\n *\n * var clone = instance.clone();\n */\n clone: function clone() {\n return this.init.prototype.extend(this);\n }\n };\n }();\n\n /**\n * An array of 32-bit words.\n *\n * @property {Array} words The array of 32-bit words.\n * @property {number} sigBytes The number of significant bytes in this word array.\n */\n var WordArray = C_lib.WordArray = Base.extend({\n /**\n * Initializes a newly created word array.\n *\n * @param {Array} words (Optional) An array of 32-bit words.\n * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n *\n * @example\n *\n * var wordArray = CryptoJS.lib.WordArray.create();\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n */\n init: function init(words, sigBytes) {\n words = this.words = words || [];\n if (sigBytes != undefined) {\n this.sigBytes = sigBytes;\n } else {\n this.sigBytes = words.length * 4;\n }\n },\n /**\n * Converts this word array to a string.\n *\n * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n *\n * @return {string} The stringified word array.\n *\n * @example\n *\n * var string = wordArray + '';\n * var string = wordArray.toString();\n * var string = wordArray.toString(CryptoJS.enc.Utf8);\n */\n toString: function toString(encoder) {\n return (encoder || Hex).stringify(this);\n },\n /**\n * Concatenates a word array to this word array.\n *\n * @param {WordArray} wordArray The word array to append.\n *\n * @return {WordArray} This word array.\n *\n * @example\n *\n * wordArray1.concat(wordArray2);\n */\n concat: function concat(wordArray) {\n // Shortcuts\n var thisWords = this.words;\n var thatWords = wordArray.words;\n var thisSigBytes = this.sigBytes;\n var thatSigBytes = wordArray.sigBytes;\n\n // Clamp excess bits\n this.clamp();\n\n // Concat\n if (thisSigBytes % 4) {\n // Copy one byte at a time\n for (var i = 0; i < thatSigBytes; i++) {\n var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;\n thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;\n }\n } else {\n // Copy one word at a time\n for (var j = 0; j < thatSigBytes; j += 4) {\n thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];\n }\n }\n this.sigBytes += thatSigBytes;\n\n // Chainable\n return this;\n },\n /**\n * Removes insignificant bits.\n *\n * @example\n *\n * wordArray.clamp();\n */\n clamp: function clamp() {\n // Shortcuts\n var words = this.words;\n var sigBytes = this.sigBytes;\n\n // Clamp\n words[sigBytes >>> 2] &= 0xffffffff << 32 - sigBytes % 4 * 8;\n words.length = Math.ceil(sigBytes / 4);\n },\n /**\n * Creates a copy of this word array.\n *\n * @return {WordArray} The clone.\n *\n * @example\n *\n * var clone = wordArray.clone();\n */\n clone: function clone() {\n var clone = Base.clone.call(this);\n clone.words = this.words.slice(0);\n return clone;\n },\n /**\n * Creates a word array filled with random bytes.\n *\n * @param {number} nBytes The number of random bytes to generate.\n *\n * @return {WordArray} The random word array.\n *\n * @static\n *\n * @example\n *\n * var wordArray = CryptoJS.lib.WordArray.random(16);\n */\n random: function random(nBytes) {\n var words = [];\n for (var i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n return new WordArray.init(words, nBytes);\n }\n });\n\n /**\n * Encoder namespace.\n */\n var C_enc = C.enc = {};\n\n /**\n * Hex encoding strategy.\n */\n var Hex = C_enc.Hex = {\n /**\n * Converts a word array to a hex string.\n *\n * @param {WordArray} wordArray The word array.\n *\n * @return {string} The hex string.\n *\n * @static\n *\n * @example\n *\n * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n */\n stringify: function stringify(wordArray) {\n // Shortcuts\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes;\n\n // Convert\n var hexChars = [];\n for (var i = 0; i < sigBytes; i++) {\n var 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 },\n /**\n * Converts a hex string to a word array.\n *\n * @param {string} hexStr The hex string.\n *\n * @return {WordArray} The word array.\n *\n * @static\n *\n * @example\n *\n * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n */\n parse: function parse(hexStr) {\n // Shortcut\n var hexStrLength = hexStr.length;\n\n // Convert\n var words = [];\n for (var i = 0; i < hexStrLength; i += 2) {\n words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;\n }\n return new WordArray.init(words, hexStrLength / 2);\n }\n };\n\n /**\n * Latin1 encoding strategy.\n */\n var Latin1 = C_enc.Latin1 = {\n /**\n * Converts a word array to a Latin1 string.\n *\n * @param {WordArray} wordArray The word array.\n *\n * @return {string} The Latin1 string.\n *\n * @static\n *\n * @example\n *\n * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n */\n stringify: function stringify(wordArray) {\n // Shortcuts\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes;\n\n // Convert\n var latin1Chars = [];\n for (var i = 0; i < sigBytes; i++) {\n var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;\n latin1Chars.push(String.fromCharCode(bite));\n }\n return latin1Chars.join('');\n },\n /**\n * Converts a Latin1 string to a word array.\n *\n * @param {string} latin1Str The Latin1 string.\n *\n * @return {WordArray} The word array.\n *\n * @static\n *\n * @example\n *\n * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n */\n parse: function parse(latin1Str) {\n // Shortcut\n var latin1StrLength = latin1Str.length;\n\n // Convert\n var words = [];\n for (var i = 0; i < latin1StrLength; i++) {\n words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << 24 - i % 4 * 8;\n }\n return new WordArray.init(words, latin1StrLength);\n }\n };\n\n /**\n * UTF-8 encoding strategy.\n */\n var Utf8 = C_enc.Utf8 = {\n /**\n * Converts a word array to a UTF-8 string.\n *\n * @param {WordArray} wordArray The word array.\n *\n * @return {string} The UTF-8 string.\n *\n * @static\n *\n * @example\n *\n * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n */\n stringify: function stringify(wordArray) {\n try {\n return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n } catch (e) {\n throw new Error('Malformed UTF-8 data');\n }\n },\n /**\n * Converts a UTF-8 string to a word array.\n *\n * @param {string} utf8Str The UTF-8 string.\n *\n * @return {WordArray} The word array.\n *\n * @static\n *\n * @example\n *\n * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n */\n parse: function parse(utf8Str) {\n return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n }\n };\n\n /**\n * Abstract buffered block algorithm template.\n *\n * The property blockSize must be implemented in a concrete subtype.\n *\n * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n */\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n /**\n * Resets this block algorithm's data buffer to its initial state.\n *\n * @example\n *\n * bufferedBlockAlgorithm.reset();\n */\n reset: function reset() {\n // Initial values\n this._data = new WordArray.init();\n this._nDataBytes = 0;\n },\n /**\n * Adds new data to this block algorithm's buffer.\n *\n * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n *\n * @example\n *\n * bufferedBlockAlgorithm._append('data');\n * bufferedBlockAlgorithm._append(wordArray);\n */\n _append: function _append(data) {\n // Convert string to WordArray, else assume WordArray already\n if (typeof data == 'string') {\n data = Utf8.parse(data);\n }\n\n // Append\n this._data.concat(data);\n this._nDataBytes += data.sigBytes;\n },\n /**\n * Processes available data blocks.\n *\n * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n *\n * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n *\n * @return {WordArray} The processed data.\n *\n * @example\n *\n * var processedData = bufferedBlockAlgorithm._process();\n * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n */\n _process: function _process(doFlush) {\n var processedWords;\n\n // Shortcuts\n var data = this._data;\n var dataWords = data.words;\n var dataSigBytes = data.sigBytes;\n var blockSize = this.blockSize;\n var blockSizeBytes = blockSize * 4;\n\n // Count blocks ready\n var nBlocksReady = dataSigBytes / blockSizeBytes;\n if (doFlush) {\n // Round up to include partial blocks\n nBlocksReady = Math.ceil(nBlocksReady);\n } else {\n // Round down to include only full blocks,\n // less the number of blocks that must remain in the buffer\n nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n }\n\n // Count words ready\n var nWordsReady = nBlocksReady * blockSize;\n\n // Count bytes ready\n var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n // Process blocks\n if (nWordsReady) {\n for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n // Perform concrete-algorithm logic\n this._doProcessBlock(dataWords, offset);\n }\n\n // Remove processed words\n processedWords = dataWords.splice(0, nWordsReady);\n data.sigBytes -= nBytesReady;\n }\n\n // Return processed words\n return new WordArray.init(processedWords, nBytesReady);\n },\n /**\n * Creates a copy of this object.\n *\n * @return {Object} The clone.\n *\n * @example\n *\n * var clone = bufferedBlockAlgorithm.clone();\n */\n clone: function clone() {\n var clone = Base.clone.call(this);\n clone._data = this._data.clone();\n return clone;\n },\n _minBufferSize: 0\n });\n\n /**\n * Abstract hasher template.\n *\n * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n */\n var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n /**\n * Configuration options.\n */\n cfg: Base.extend(),\n /**\n * Initializes a newly created hasher.\n *\n * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n *\n * @example\n *\n * var hasher = CryptoJS.algo.SHA256.create();\n */\n init: function init(cfg) {\n // Apply config defaults\n this.cfg = this.cfg.extend(cfg);\n\n // Set initial values\n this.reset();\n },\n /**\n * Resets this hasher to its initial state.\n *\n * @example\n *\n * hasher.reset();\n */\n reset: function reset() {\n // Reset data buffer\n BufferedBlockAlgorithm.reset.call(this);\n\n // Perform concrete-hasher logic\n this._doReset();\n },\n /**\n * Updates this hasher with a message.\n *\n * @param {WordArray|string} messageUpdate The message to append.\n *\n * @return {Hasher} This hasher.\n *\n * @example\n *\n * hasher.update('message');\n * hasher.update(wordArray);\n */\n update: function update(messageUpdate) {\n // Append\n this._append(messageUpdate);\n\n // Update the hash\n this._process();\n\n // Chainable\n return this;\n },\n /**\n * Finalizes the hash computation.\n * Note that the finalize operation is effectively a destructive, read-once operation.\n *\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\n *\n * @return {WordArray} The hash.\n *\n * @example\n *\n * var hash = hasher.finalize();\n * var hash = hasher.finalize('message');\n * var hash = hasher.finalize(wordArray);\n */\n finalize: function finalize(messageUpdate) {\n // Final message update\n if (messageUpdate) {\n this._append(messageUpdate);\n }\n\n // Perform concrete-hasher logic\n var hash = this._doFinalize();\n return hash;\n },\n blockSize: 512 / 32,\n /**\n * Creates a shortcut function to a hasher's object interface.\n *\n * @param {Hasher} hasher The hasher to create a helper for.\n *\n * @return {Function} The shortcut function.\n *\n * @static\n *\n * @example\n *\n * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n */\n _createHelper: function _createHelper(hasher) {\n return function (message, cfg) {\n return new hasher.init(cfg).finalize(message);\n };\n },\n /**\n * Creates a shortcut function to the HMAC's object interface.\n *\n * @param {Hasher} hasher The hasher to use in this HMAC helper.\n *\n * @return {Function} The shortcut function.\n *\n * @static\n *\n * @example\n *\n * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n */\n _createHmacHelper: function _createHmacHelper(hasher) {\n return function (message, key) {\n return new C_algo.HMAC.init(hasher, key).finalize(message);\n };\n }\n });\n\n /**\n * Algorithm namespace.\n */\n var C_algo = C.algo = {};\n return C;\n }(Math);\n return CryptoJS;\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n var C_enc = C.enc;\n\n /**\n * Base64 encoding strategy.\n */\n var Base64 = C_enc.Base64 = {\n /**\n * Converts a word array to a Base64 string.\n *\n * @param {WordArray} wordArray The word array.\n *\n * @return {string} The Base64 string.\n *\n * @static\n *\n * @example\n *\n * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n */\n stringify: function stringify(wordArray) {\n // Shortcuts\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes;\n var map = this._map;\n\n // Clamp excess bits\n wordArray.clamp();\n\n // Convert\n var base64Chars = [];\n for (var i = 0; i < sigBytes; i += 3) {\n var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;\n var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;\n var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;\n var triplet = byte1 << 16 | byte2 << 8 | byte3;\n for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {\n base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));\n }\n }\n\n // Add padding\n var paddingChar = map.charAt(64);\n if (paddingChar) {\n while (base64Chars.length % 4) {\n base64Chars.push(paddingChar);\n }\n }\n return base64Chars.join('');\n },\n /**\n * Converts a Base64 string to a word array.\n *\n * @param {string} base64Str The Base64 string.\n *\n * @return {WordArray} The word array.\n *\n * @static\n *\n * @example\n *\n * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n */\n parse: function parse(base64Str) {\n // Shortcuts\n var base64StrLength = base64Str.length;\n var map = this._map;\n var reverseMap = this._reverseMap;\n if (!reverseMap) {\n reverseMap = this._reverseMap = [];\n for (var j = 0; j < map.length; j++) {\n reverseMap[map.charCodeAt(j)] = j;\n }\n }\n\n // Ignore padding\n var paddingChar = map.charAt(64);\n if (paddingChar) {\n var paddingIndex = base64Str.indexOf(paddingChar);\n if (paddingIndex !== -1) {\n base64StrLength = paddingIndex;\n }\n }\n\n // Convert\n return parseLoop(base64Str, base64StrLength, reverseMap);\n },\n _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n };\n function parseLoop(base64Str, base64StrLength, reverseMap) {\n var words = [];\n var nBytes = 0;\n for (var i = 0; i < base64StrLength; i++) {\n if (i % 4) {\n var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;\n var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;\n var bitsCombined = bits1 | bits2;\n words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;\n nBytes++;\n }\n }\n return WordArray.create(words, nBytes);\n }\n })();\n return CryptoJS.enc.Base64;\n});",";\n(function (root, factory, undef) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"), require(\"./sha256\"), require(\"./hmac\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\", \"./sha256\", \"./hmac\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n return CryptoJS.HmacSHA256;\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var Base = C_lib.Base;\n var C_enc = C.enc;\n var Utf8 = C_enc.Utf8;\n var C_algo = C.algo;\n\n /**\n * HMAC algorithm.\n */\n var HMAC = C_algo.HMAC = Base.extend({\n /**\n * Initializes a newly created HMAC.\n *\n * @param {Hasher} hasher The hash algorithm to use.\n * @param {WordArray|string} key The secret key.\n *\n * @example\n *\n * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n */\n init: function init(hasher, key) {\n // Init hasher\n hasher = this._hasher = new hasher.init();\n\n // Convert string to WordArray, else assume WordArray already\n if (typeof key == 'string') {\n key = Utf8.parse(key);\n }\n\n // Shortcuts\n var hasherBlockSize = hasher.blockSize;\n var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n // Allow arbitrary length keys\n if (key.sigBytes > hasherBlockSizeBytes) {\n key = hasher.finalize(key);\n }\n\n // Clamp excess bits\n key.clamp();\n\n // Clone key for inner and outer pads\n var oKey = this._oKey = key.clone();\n var iKey = this._iKey = key.clone();\n\n // Shortcuts\n var oKeyWords = oKey.words;\n var iKeyWords = iKey.words;\n\n // XOR keys with pad constants\n for (var i = 0; i < hasherBlockSize; i++) {\n oKeyWords[i] ^= 0x5c5c5c5c;\n iKeyWords[i] ^= 0x36363636;\n }\n oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n // Set initial values\n this.reset();\n },\n /**\n * Resets this HMAC to its initial state.\n *\n * @example\n *\n * hmacHasher.reset();\n */\n reset: function reset() {\n // Shortcut\n var hasher = this._hasher;\n\n // Reset\n hasher.reset();\n hasher.update(this._iKey);\n },\n /**\n * Updates this HMAC with a message.\n *\n * @param {WordArray|string} messageUpdate The message to append.\n *\n * @return {HMAC} This HMAC instance.\n *\n * @example\n *\n * hmacHasher.update('message');\n * hmacHasher.update(wordArray);\n */\n update: function update(messageUpdate) {\n this._hasher.update(messageUpdate);\n\n // Chainable\n return this;\n },\n /**\n * Finalizes the HMAC computation.\n * Note that the finalize operation is effectively a destructive, read-once operation.\n *\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\n *\n * @return {WordArray} The HMAC.\n *\n * @example\n *\n * var hmac = hmacHasher.finalize();\n * var hmac = hmacHasher.finalize('message');\n * var hmac = hmacHasher.finalize(wordArray);\n */\n finalize: function finalize(messageUpdate) {\n // Shortcut\n var hasher = this._hasher;\n\n // Compute HMAC\n var innerHash = hasher.finalize(messageUpdate);\n hasher.reset();\n var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n return hmac;\n }\n });\n })();\n});","require(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\n;\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Check if typed arrays are supported\n if (typeof ArrayBuffer != 'function') {\n return;\n }\n\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n\n // Reference original init\n var superInit = WordArray.init;\n\n // Augment WordArray.init to handle typed arrays\n var subInit = WordArray.init = function (typedArray) {\n // Convert buffers to uint8\n if (typedArray instanceof ArrayBuffer) {\n typedArray = new Uint8Array(typedArray);\n }\n\n // Convert other array views to uint8\n if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) {\n typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n }\n\n // Handle Uint8Array\n if (typedArray instanceof Uint8Array) {\n // Shortcut\n var typedArrayByteLength = typedArray.byteLength;\n\n // Extract bytes\n var words = [];\n for (var i = 0; i < typedArrayByteLength; i++) {\n words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;\n }\n\n // Initialize this word array\n superInit.call(this, words, typedArrayByteLength);\n } else {\n // Else call normal init\n superInit.apply(this, arguments);\n }\n };\n subInit.prototype = WordArray;\n })();\n return CryptoJS.lib.WordArray;\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function (Math) {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n var Hasher = C_lib.Hasher;\n var C_algo = C.algo;\n\n // Initialization and round constants tables\n var H = [];\n var K = [];\n\n // Compute constants\n (function () {\n function isPrime(n) {\n var sqrtN = Math.sqrt(n);\n for (var factor = 2; factor <= sqrtN; factor++) {\n if (!(n % factor)) {\n return false;\n }\n }\n return true;\n }\n function getFractionalBits(n) {\n return (n - (n | 0)) * 0x100000000 | 0;\n }\n var n = 2;\n var nPrime = 0;\n while (nPrime < 64) {\n if (isPrime(n)) {\n if (nPrime < 8) {\n H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n }\n K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n nPrime++;\n }\n n++;\n }\n })();\n\n // Reusable object\n var W = [];\n\n /**\n * SHA-256 hash algorithm.\n */\n var SHA256 = C_algo.SHA256 = Hasher.extend({\n _doReset: function _doReset() {\n this._hash = new WordArray.init(H.slice(0));\n },\n _doProcessBlock: function _doProcessBlock(M, offset) {\n // Shortcut\n var H = this._hash.words;\n\n // Working variables\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n var f = H[5];\n var g = H[6];\n var h = H[7];\n\n // Computation\n for (var i = 0; i < 64; i++) {\n if (i < 16) {\n W[i] = M[offset + i] | 0;\n } else {\n var gamma0x = W[i - 15];\n var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;\n var gamma1x = W[i - 2];\n var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;\n W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n }\n var ch = e & f ^ ~e & g;\n var maj = a & b ^ a & c ^ b & c;\n var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);\n var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);\n var t1 = h + sigma1 + ch + K[i] + W[i];\n var t2 = sigma0 + maj;\n h = g;\n g = f;\n f = e;\n e = d + t1 | 0;\n d = c;\n c = b;\n b = a;\n a = t1 + t2 | 0;\n }\n\n // Intermediate hash value\n H[0] = H[0] + a | 0;\n H[1] = H[1] + b | 0;\n H[2] = H[2] + c | 0;\n H[3] = H[3] + d | 0;\n H[4] = H[4] + e | 0;\n H[5] = H[5] + f | 0;\n H[6] = H[6] + g | 0;\n H[7] = H[7] + h | 0;\n },\n _doFinalize: function _doFinalize() {\n // Shortcuts\n var data = this._data;\n var dataWords = data.words;\n var nBitsTotal = this._nDataBytes * 8;\n var nBitsLeft = data.sigBytes * 8;\n\n // Add padding\n dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;\n data.sigBytes = dataWords.length * 4;\n\n // Hash final blocks\n this._process();\n\n // Return final computed hash\n return this._hash;\n },\n clone: function clone() {\n var clone = Hasher.clone.call(this);\n clone._hash = this._hash.clone();\n return clone;\n }\n });\n\n /**\n * Shortcut function to the hasher's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n *\n * @return {WordArray} The hash.\n *\n * @static\n *\n * @example\n *\n * var hash = CryptoJS.SHA256('message');\n * var hash = CryptoJS.SHA256(wordArray);\n */\n C.SHA256 = Hasher._createHelper(SHA256);\n\n /**\n * Shortcut function to the HMAC's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n * @param {WordArray|string} key The secret key.\n *\n * @return {WordArray} The HMAC.\n *\n * @static\n *\n * @example\n *\n * var hmac = CryptoJS.HmacSHA256(message, key);\n */\n C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n })(Math);\n return CryptoJS.SHA256;\n});","'use strict';\n\nvar $defineProperty = require('es-define-property');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(obj, property, value) {\n if (!obj || typeof obj !== 'object' && typeof obj !== 'function') {\n throw new $TypeError('`obj` must be an object or a function`');\n }\n if (typeof property !== 'string' && typeof property !== 'symbol') {\n throw new $TypeError('`property` must be a string or a symbol`');\n }\n if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n }\n if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n }\n if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n }\n if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n throw new $TypeError('`loose`, if provided, must be a boolean');\n }\n var nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n var nonWritable = arguments.length > 4 ? arguments[4] : null;\n var nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n var loose = arguments.length > 6 ? arguments[6] : false;\n\n /* @type {false | TypedPropertyDescriptor} */\n var desc = !!gopd && gopd(obj, property);\n if ($defineProperty) {\n $defineProperty(obj, property, {\n configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n value: value,\n writable: nonWritable === null && desc ? desc.writable : !nonWritable\n });\n } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {\n // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n obj[property] = value; // eslint-disable-line no-param-reassign\n } else {\n throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n }\n};","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n try {\n $defineProperty({}, 'a', {\n value: 1\n });\n } catch (e) {\n // IE 8 has a broken defineProperty\n $defineProperty = false;\n }\n}\nmodule.exports = $defineProperty;","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;","'use strict';\n\n/* eslint no-invalid-this: 1 */\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\nvar concatty = function concatty(a, b) {\n var arr = [];\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n return arr;\n};\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\nvar joiny = function joiny(arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n var bound;\n var binder = function binder() {\n if (this instanceof bound) {\n var result = target.apply(this, concatty(args, arguments));\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(that, concatty(args, arguments));\n };\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n};","'use strict';\n\nvar implementation = require('./implementation');\nmodule.exports = Function.prototype.bind || implementation;","\"use strict\";\n\nmodule.exports = global.fetch;","\"use strict\";\n\nmodule.exports = Object.assign;","'use strict';\n\nrequire(\"core-js/modules/es.typed-array.set.js\");\nrequire(\"core-js/modules/es.typed-array.sort.js\");\nrequire(\"core-js/modules/esnext.aggregate-error.js\");\nvar undefined;\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function getEvalledConstructor(expressionSyntax) {\n try {\n return $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n } catch (e) {}\n};\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n try {\n $gOPD({}, '');\n } catch (e) {\n $gOPD = null; // this is IE 8, which has a broken gOPD\n }\n}\nvar throwTypeError = function throwTypeError() {\n throw new $TypeError();\n};\nvar ThrowTypeError = $gOPD ? function () {\n try {\n // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n arguments.callee; // IE 8 does not throw here\n return throwTypeError;\n } catch (calleeThrows) {\n try {\n // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n return $gOPD(arguments, 'callee').get;\n } catch (gOPDthrows) {\n return throwTypeError;\n }\n }\n}() : throwTypeError;\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\nvar getProto = Object.getPrototypeOf || (hasProto ? function (x) {\n return x.__proto__;\n} // eslint-disable-line no-proto\n: null);\nvar needsEval = {};\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\nvar INTRINSICS = {\n __proto__: null,\n '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n '%Array%': Array,\n '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n '%AsyncFromSyncIteratorPrototype%': undefined,\n '%AsyncFunction%': needsEval,\n '%AsyncGenerator%': needsEval,\n '%AsyncGeneratorFunction%': needsEval,\n '%AsyncIteratorPrototype%': needsEval,\n '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n '%Boolean%': Boolean,\n '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n '%Date%': Date,\n '%decodeURI%': decodeURI,\n '%decodeURIComponent%': decodeURIComponent,\n '%encodeURI%': encodeURI,\n '%encodeURIComponent%': encodeURIComponent,\n '%Error%': $Error,\n '%eval%': eval,\n // eslint-disable-line no-eval\n '%EvalError%': $EvalError,\n '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n '%Function%': $Function,\n '%GeneratorFunction%': needsEval,\n '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n '%isFinite%': isFinite,\n '%isNaN%': isNaN,\n '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n '%JSON%': typeof JSON === 'object' ? JSON : undefined,\n '%Map%': typeof Map === 'undefined' ? undefined : Map,\n '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n '%Math%': Math,\n '%Number%': Number,\n '%Object%': Object,\n '%parseFloat%': parseFloat,\n '%parseInt%': parseInt,\n '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n '%RangeError%': $RangeError,\n '%ReferenceError%': $ReferenceError,\n '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n '%RegExp%': RegExp,\n '%Set%': typeof Set === 'undefined' ? undefined : Set,\n '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n '%String%': String,\n '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n '%Symbol%': hasSymbols ? Symbol : undefined,\n '%SyntaxError%': $SyntaxError,\n '%ThrowTypeError%': ThrowTypeError,\n '%TypedArray%': TypedArray,\n '%TypeError%': $TypeError,\n '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n '%URIError%': $URIError,\n '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\nif (getProto) {\n try {\n null.error; // eslint-disable-line no-unused-expressions\n } catch (e) {\n // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n var errorProto = getProto(getProto(e));\n INTRINSICS['%Error.prototype%'] = errorProto;\n }\n}\nvar doEval = function doEval(name) {\n var value;\n if (name === '%AsyncFunction%') {\n value = getEvalledConstructor('async function () {}');\n } else if (name === '%GeneratorFunction%') {\n value = getEvalledConstructor('function* () {}');\n } else if (name === '%AsyncGeneratorFunction%') {\n value = getEvalledConstructor('async function* () {}');\n } else if (name === '%AsyncGenerator%') {\n var fn = doEval('%AsyncGeneratorFunction%');\n if (fn) {\n value = fn.prototype;\n }\n } else if (name === '%AsyncIteratorPrototype%') {\n var gen = doEval('%AsyncGenerator%');\n if (gen && getProto) {\n value = getProto(gen.prototype);\n }\n }\n INTRINSICS[name] = value;\n return value;\n};\nvar LEGACY_ALIASES = {\n __proto__: null,\n '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n '%ArrayPrototype%': ['Array', 'prototype'],\n '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n '%ArrayProto_values%': ['Array', 'prototype', 'values'],\n '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n '%BooleanPrototype%': ['Boolean', 'prototype'],\n '%DataViewPrototype%': ['DataView', 'prototype'],\n '%DatePrototype%': ['Date', 'prototype'],\n '%ErrorPrototype%': ['Error', 'prototype'],\n '%EvalErrorPrototype%': ['EvalError', 'prototype'],\n '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n '%FunctionPrototype%': ['Function', 'prototype'],\n '%Generator%': ['GeneratorFunction', 'prototype'],\n '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n '%JSONParse%': ['JSON', 'parse'],\n '%JSONStringify%': ['JSON', 'stringify'],\n '%MapPrototype%': ['Map', 'prototype'],\n '%NumberPrototype%': ['Number', 'prototype'],\n '%ObjectPrototype%': ['Object', 'prototype'],\n '%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n '%PromisePrototype%': ['Promise', 'prototype'],\n '%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n '%Promise_all%': ['Promise', 'all'],\n '%Promise_reject%': ['Promise', 'reject'],\n '%Promise_resolve%': ['Promise', 'resolve'],\n '%RangeErrorPrototype%': ['RangeError', 'prototype'],\n '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n '%RegExpPrototype%': ['RegExp', 'prototype'],\n '%SetPrototype%': ['Set', 'prototype'],\n '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n '%StringPrototype%': ['String', 'prototype'],\n '%SymbolPrototype%': ['Symbol', 'prototype'],\n '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n '%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n '%TypeErrorPrototype%': ['TypeError', 'prototype'],\n '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n '%URIErrorPrototype%': ['URIError', 'prototype'],\n '%WeakMapPrototype%': ['WeakMap', 'prototype'],\n '%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n var first = $strSlice(string, 0, 1);\n var last = $strSlice(string, -1);\n if (first === '%' && last !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n } else if (last === '%' && first !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n }\n var result = [];\n $replace(string, rePropName, function (match, number, quote, subString) {\n result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n });\n return result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n var intrinsicName = name;\n var alias;\n if (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n alias = LEGACY_ALIASES[intrinsicName];\n intrinsicName = '%' + alias[0] + '%';\n }\n if (hasOwn(INTRINSICS, intrinsicName)) {\n var value = INTRINSICS[intrinsicName];\n if (value === needsEval) {\n value = doEval(intrinsicName);\n }\n if (typeof value === 'undefined' && !allowMissing) {\n throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n }\n return {\n alias: alias,\n name: intrinsicName,\n value: value\n };\n }\n throw new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n if (typeof name !== 'string' || name.length === 0) {\n throw new $TypeError('intrinsic name must be a non-empty string');\n }\n if (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n throw new $TypeError('\"allowMissing\" argument must be a boolean');\n }\n if ($exec(/^%?[^%]*%?$/, name) === null) {\n throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n }\n var parts = stringToPath(name);\n var intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n var intrinsicRealName = intrinsic.name;\n var value = intrinsic.value;\n var skipFurtherCaching = false;\n var alias = intrinsic.alias;\n if (alias) {\n intrinsicBaseName = alias[0];\n $spliceApply(parts, $concat([0, 1], alias));\n }\n for (var i = 1, isOwn = true; i < parts.length; i += 1) {\n var part = parts[i];\n var first = $strSlice(part, 0, 1);\n var last = $strSlice(part, -1);\n if ((first === '\"' || first === \"'\" || first === '`' || last === '\"' || last === \"'\" || last === '`') && first !== last) {\n throw new $SyntaxError('property names with quotes must have matching quotes');\n }\n if (part === 'constructor' || !isOwn) {\n skipFurtherCaching = true;\n }\n intrinsicBaseName += '.' + part;\n intrinsicRealName = '%' + intrinsicBaseName + '%';\n if (hasOwn(INTRINSICS, intrinsicRealName)) {\n value = INTRINSICS[intrinsicRealName];\n } else if (value != null) {\n if (!(part in value)) {\n if (!allowMissing) {\n throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n }\n return void undefined;\n }\n if ($gOPD && i + 1 >= parts.length) {\n var desc = $gOPD(value, part);\n isOwn = !!desc;\n\n // By convention, when a data property is converted to an accessor\n // property to emulate a data property that does not suffer from\n // the override mistake, that accessor's getter is marked with\n // an `originalValue` property. Here, when we detect this, we\n // uphold the illusion by pretending to see that original data\n // property, i.e., returning the value rather than the getter\n // itself.\n if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n value = desc.get;\n } else {\n value = value[part];\n }\n } else {\n isOwn = hasOwn(value, part);\n value = value[part];\n }\n if (isOwn && !skipFurtherCaching) {\n INTRINSICS[intrinsicRealName] = value;\n }\n }\n }\n return value;\n};","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nif ($gOPD) {\n try {\n $gOPD([], 'length');\n } catch (e) {\n // IE 8 has a broken gOPD\n $gOPD = null;\n }\n}\nmodule.exports = $gOPD;","'use strict';\n\nvar $defineProperty = require('es-define-property');\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n return !!$defineProperty;\n};\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n // node v0.6 has a bug where array lengths can be Set but not Defined\n if (!$defineProperty) {\n return null;\n }\n try {\n return $defineProperty([], 'length', {\n value: 1\n }).length !== 1;\n } catch (e) {\n // In Firefox 4-22, defining length on an array throws an exception.\n return true;\n }\n};\nmodule.exports = hasPropertyDescriptors;","'use strict';\n\nvar test = {\n __proto__: null,\n foo: {}\n};\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n // @ts-expect-error: TS errors on an inherited property for some reason\n return {\n __proto__: test\n }.foo === test.foo && !(test instanceof $Object);\n};","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\nmodule.exports = function hasNativeSymbols() {\n if (typeof origSymbol !== 'function') {\n return false;\n }\n if (typeof Symbol !== 'function') {\n return false;\n }\n if (typeof origSymbol('foo') !== 'symbol') {\n return false;\n }\n if (typeof Symbol('bar') !== 'symbol') {\n return false;\n }\n return hasSymbolSham();\n};","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {\n return false;\n }\n if (typeof Symbol.iterator === 'symbol') {\n return true;\n }\n var obj = {};\n var sym = Symbol('test');\n var symObj = Object(sym);\n if (typeof sym === 'string') {\n return false;\n }\n if (Object.prototype.toString.call(sym) !== '[object Symbol]') {\n return false;\n }\n if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {\n return false;\n }\n\n // temp disabled per https://github.com/ljharb/object.assign/issues/17\n // if (sym instanceof Symbol) { return false; }\n // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n // if (!(symObj instanceof Symbol)) { return false; }\n\n // if (typeof Symbol.prototype.toString !== 'function') { return false; }\n // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n var symVal = 42;\n obj[sym] = symVal;\n for (sym in obj) {\n return false;\n } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {\n return false;\n }\n if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {\n return false;\n }\n var syms = Object.getOwnPropertySymbols(obj);\n if (syms.length !== 1 || syms[0] !== sym) {\n return false;\n }\n if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {\n return false;\n }\n if (typeof Object.getOwnPropertyDescriptor === 'function') {\n var descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n if (descriptor.value !== symVal || descriptor.enumerable !== true) {\n return false;\n }\n }\n return true;\n};","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);","/*! 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 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) {\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};\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 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) {\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 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 * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;\n(function (factory) {\n var registeredInModuleLoader;\n if (typeof define === 'function' && define.amd) {\n define(factory);\n registeredInModuleLoader = true;\n }\n if (typeof exports === 'object') {\n module.exports = factory();\n registeredInModuleLoader = true;\n }\n if (!registeredInModuleLoader) {\n var OldCookies = window.Cookies;\n var api = window.Cookies = factory();\n api.noConflict = function () {\n window.Cookies = OldCookies;\n return api;\n };\n }\n})(function () {\n function extend() {\n var i = 0;\n var result = {};\n for (; i < arguments.length; i++) {\n var attributes = arguments[i];\n for (var key in attributes) {\n result[key] = attributes[key];\n }\n }\n return result;\n }\n function decode(s) {\n return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n }\n function init(converter) {\n function api() {}\n function set(key, value, attributes) {\n if (typeof document === 'undefined') {\n return;\n }\n attributes = extend({\n path: '/'\n }, api.defaults, attributes);\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n }\n\n // We're using \"expires\" because \"max-age\" is not supported by IE\n attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n try {\n var result = JSON.stringify(value);\n if (/^[\\{\\[]/.test(result)) {\n value = result;\n }\n } catch (e) {}\n value = converter.write ? converter.write(value, key) : encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n key = encodeURIComponent(String(key)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\\(\\)]/g, escape);\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue;\n }\n stringifiedAttributes += '; ' + attributeName;\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 return document.cookie = key + '=' + value + stringifiedAttributes;\n }\n function get(key, json) {\n if (typeof document === 'undefined') {\n return;\n }\n var jar = {};\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 i = 0;\n for (; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var cookie = parts.slice(1).join('=');\n if (!json && cookie.charAt(0) === '\"') {\n cookie = cookie.slice(1, -1);\n }\n try {\n var name = decode(parts[0]);\n cookie = (converter.read || converter)(cookie, name) || decode(cookie);\n if (json) {\n try {\n cookie = JSON.parse(cookie);\n } catch (e) {}\n }\n jar[name] = cookie;\n if (key === name) {\n break;\n }\n } catch (e) {}\n }\n return key ? jar[key] : jar;\n }\n api.set = set;\n api.get = function (key) {\n return get(key, false /* read as raw */);\n };\n api.getJSON = function (key) {\n return get(key, true /* read as json */);\n };\n api.remove = function (key, attributes) {\n set(key, '', extend(attributes, {\n expires: -1\n }));\n };\n api.defaults = {};\n api.withConverter = init;\n return api;\n }\n return init(function () {});\n});","require(\"core-js/modules/esnext.global-this.js\");\nvar hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype // eslint-disable-line no-proto\n? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n} : null);\nfunction addNumericSeparator(num, str) {\n if (num === Infinity || num === -Infinity || num !== num || num && num > -1000 && num < 1000 || $test.call(/e/, str)) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n if (has(opts, 'quoteStyle') && opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double') {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n if (has(opts, 'indent') && opts.indent !== null && opts.indent !== '\\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') {\n depth = 0;\n }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n var indent = getIndent(opts, depth);\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n if (typeof obj === 'function' && !isRegExp(obj)) {\n // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) {\n s += '...';\n }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) {\n return '[]';\n }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) {\n return '[' + String(obj) + ']';\n }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, {\n depth: maxDepth - depth\n });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (typeof globalThis !== 'undefined' && obj === globalThis || typeof global !== 'undefined' && obj === global) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) {\n return tag + '{}';\n }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\nfunction isArray(obj) {\n return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\nfunction isDate(obj) {\n return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\nfunction isRegExp(obj) {\n return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\nfunction isError(obj) {\n return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\nfunction isString(obj) {\n return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\nfunction isNumber(obj) {\n return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\nfunction isBoolean(obj) {\n return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));\n}\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) {\n return key in this;\n};\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\nfunction nameOf(f) {\n if (f.name) {\n return f.name;\n }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) {\n return m[1];\n }\n return null;\n}\nfunction indexOf(xs, x) {\n if (xs.indexOf) {\n return xs.indexOf(x);\n }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) {\n return i;\n }\n }\n return -1;\n}\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\nfunction isElement(x) {\n if (!x || typeof x !== 'object') {\n return false;\n }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) {\n return '\\\\' + x;\n }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) {\n return '';\n }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n for (var key in obj) {\n // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) {\n continue;\n } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) {\n continue;\n } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"variant\", \"size\", \"active\", \"className\", \"block\", \"type\", \"as\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport SafeAnchor from './SafeAnchor';\nvar defaultProps = {\n variant: 'primary',\n active: false,\n disabled: false\n};\nvar Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n variant = _ref.variant,\n size = _ref.size,\n active = _ref.active,\n className = _ref.className,\n block = _ref.block,\n type = _ref.type,\n as = _ref.as,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var prefix = useBootstrapPrefix(bsPrefix, 'btn');\n var classes = classNames(className, prefix, active && 'active', variant && prefix + \"-\" + variant, block && prefix + \"-block\", size && prefix + \"-\" + size);\n if (props.href) {\n return /*#__PURE__*/React.createElement(SafeAnchor, _extends({}, props, {\n as: as,\n ref: ref,\n className: classNames(classes, props.disabled && 'disabled')\n }));\n }\n if (ref) {\n props.ref = ref;\n }\n if (type) {\n props.type = type;\n } else if (!as) {\n props.type = 'button';\n }\n var Component = as || 'button';\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n className: classes\n }));\n});\nButton.displayName = 'Button';\nButton.defaultProps = defaultProps;\nexport default Button;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"disabled\", \"onKeyDown\"];\nimport React from 'react';\nimport createChainedFunction from './createChainedFunction';\nfunction isTrivialHref(href) {\n return !href || href.trim() === '#';\n}\n/**\n * There are situations due to browser quirks or Bootstrap CSS where\n * an anchor tag is needed, when semantically a button tag is the\n * better choice. SafeAnchor ensures that when an anchor is used like a\n * button its accessible. It also emulates input `disabled` behavior for\n * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.\n */\n\nvar SafeAnchor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'a' : _ref$as,\n disabled = _ref.disabled,\n onKeyDown = _ref.onKeyDown,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n var handleClick = function handleClick(event) {\n var href = props.href,\n onClick = props.onClick;\n if (disabled || isTrivialHref(href)) {\n event.preventDefault();\n }\n if (disabled) {\n event.stopPropagation();\n return;\n }\n if (onClick) {\n onClick(event);\n }\n };\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === ' ') {\n event.preventDefault();\n handleClick(event);\n }\n };\n if (isTrivialHref(props.href)) {\n props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node\n // otherwise, the cursor incorrectly styled (except with role='button')\n\n props.href = props.href || '#';\n }\n if (disabled) {\n props.tabIndex = -1;\n props['aria-disabled'] = true;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n onClick: handleClick,\n onKeyDown: createChainedFunction(handleKeyDown, onKeyDown)\n }));\n});\nSafeAnchor.displayName = 'SafeAnchor';\nexport default SafeAnchor;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React, { useContext, useMemo } from 'react';\nvar ThemeContext = /*#__PURE__*/React.createContext({});\nvar Consumer = ThemeContext.Consumer,\n Provider = ThemeContext.Provider;\nfunction ThemeProvider(_ref) {\n var prefixes = _ref.prefixes,\n children = _ref.children;\n var copiedPrefixes = useMemo(function () {\n return _extends({}, prefixes);\n }, [prefixes]);\n return /*#__PURE__*/React.createElement(Provider, {\n value: copiedPrefixes\n }, children);\n}\nexport function useBootstrapPrefix(prefix, defaultPrefix) {\n var prefixes = useContext(ThemeContext);\n return prefix || prefixes[defaultPrefix] || defaultPrefix;\n}\nfunction createBootstrapComponent(Component, opts) {\n if (typeof opts === 'string') opts = {\n prefix: opts\n };\n var isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref\n\n var _opts = opts,\n prefix = _opts.prefix,\n _opts$forwardRefAs = _opts.forwardRefAs,\n forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs;\n var Wrapped = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {\n var props = _extends({}, _ref2);\n props[forwardRefAs] = ref;\n var bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n bsPrefix: bsPrefix\n }));\n });\n Wrapped.displayName = \"Bootstrap(\" + (Component.displayName || Component.name) + \")\";\n return Wrapped;\n}\nexport { createBootstrapComponent, Consumer as ThemeConsumer };\nexport default ThemeProvider;","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n return funcs.filter(function (f) {\n return f != null;\n }).reduce(function (acc, f) {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n if (acc === null) return f;\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n // @ts-ignore\n acc.apply(this, args); // @ts-ignore\n\n f.apply(this, args);\n };\n }, null);\n}\nexport default createChainedFunction;","require(\"core-js/modules/es.regexp.flags.js\");\n/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done) if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;\n return true;\n }\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if ((error.message || '').match(/stack|recursion/i)) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};","export var IconsManifest = [{\n \"id\": \"ci\",\n \"name\": \"Circum Icons\",\n \"projectUrl\": \"https://circumicons.com/\",\n \"license\": \"MPL-2.0 license\",\n \"licenseUrl\": \"https://github.com/Klarr-Agency/Circum-Icons/blob/main/LICENSE\"\n}, {\n \"id\": \"fa\",\n \"name\": \"Font Awesome 5\",\n \"projectUrl\": \"https://fontawesome.com/\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"fa6\",\n \"name\": \"Font Awesome 6\",\n \"projectUrl\": \"https://fontawesome.com/\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"io\",\n \"name\": \"Ionicons 4\",\n \"projectUrl\": \"https://ionicons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/ionic-team/ionicons/blob/master/LICENSE\"\n}, {\n \"id\": \"io5\",\n \"name\": \"Ionicons 5\",\n \"projectUrl\": \"https://ionicons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/ionic-team/ionicons/blob/master/LICENSE\"\n}, {\n \"id\": \"md\",\n \"name\": \"Material Design icons\",\n \"projectUrl\": \"http://google.github.io/material-design-icons/\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"https://github.com/google/material-design-icons/blob/master/LICENSE\"\n}, {\n \"id\": \"ti\",\n \"name\": \"Typicons\",\n \"projectUrl\": \"http://s-ings.com/typicons/\",\n \"license\": \"CC BY-SA 3.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by-sa/3.0/\"\n}, {\n \"id\": \"go\",\n \"name\": \"Github Octicons icons\",\n \"projectUrl\": \"https://octicons.github.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/primer/octicons/blob/master/LICENSE\"\n}, {\n \"id\": \"fi\",\n \"name\": \"Feather\",\n \"projectUrl\": \"https://feathericons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/feathericons/feather/blob/master/LICENSE\"\n}, {\n \"id\": \"lu\",\n \"name\": \"Lucide\",\n \"projectUrl\": \"https://lucide.dev/\",\n \"license\": \"ISC\",\n \"licenseUrl\": \"https://github.com/lucide-icons/lucide/blob/main/LICENSE\"\n}, {\n \"id\": \"gi\",\n \"name\": \"Game Icons\",\n \"projectUrl\": \"https://game-icons.net/\",\n \"license\": \"CC BY 3.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/3.0/\"\n}, {\n \"id\": \"wi\",\n \"name\": \"Weather Icons\",\n \"projectUrl\": \"https://erikflowers.github.io/weather-icons/\",\n \"license\": \"SIL OFL 1.1\",\n \"licenseUrl\": \"http://scripts.sil.org/OFL\"\n}, {\n \"id\": \"di\",\n \"name\": \"Devicons\",\n \"projectUrl\": \"https://vorillaz.github.io/devicons/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"ai\",\n \"name\": \"Ant Design Icons\",\n \"projectUrl\": \"https://github.com/ant-design/ant-design-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"bs\",\n \"name\": \"Bootstrap Icons\",\n \"projectUrl\": \"https://github.com/twbs/icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"ri\",\n \"name\": \"Remix Icon\",\n \"projectUrl\": \"https://github.com/Remix-Design/RemixIcon\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"http://www.apache.org/licenses/\"\n}, {\n \"id\": \"fc\",\n \"name\": \"Flat Color Icons\",\n \"projectUrl\": \"https://github.com/icons8/flat-color-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"gr\",\n \"name\": \"Grommet-Icons\",\n \"projectUrl\": \"https://github.com/grommet/grommet-icons\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"http://www.apache.org/licenses/\"\n}, {\n \"id\": \"hi\",\n \"name\": \"Heroicons\",\n \"projectUrl\": \"https://github.com/tailwindlabs/heroicons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"hi2\",\n \"name\": \"Heroicons 2\",\n \"projectUrl\": \"https://github.com/tailwindlabs/heroicons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"si\",\n \"name\": \"Simple Icons\",\n \"projectUrl\": \"https://simpleicons.org/\",\n \"license\": \"CC0 1.0 Universal\",\n \"licenseUrl\": \"https://creativecommons.org/publicdomain/zero/1.0/\"\n}, {\n \"id\": \"sl\",\n \"name\": \"Simple Line Icons\",\n \"projectUrl\": \"https://thesabbir.github.io/simple-line-icons/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"im\",\n \"name\": \"IcoMoon Free\",\n \"projectUrl\": \"https://github.com/Keyamoon/IcoMoon-Free\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://github.com/Keyamoon/IcoMoon-Free/blob/master/License.txt\"\n}, {\n \"id\": \"bi\",\n \"name\": \"BoxIcons\",\n \"projectUrl\": \"https://github.com/atisawd/boxicons\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://github.com/atisawd/boxicons/blob/master/LICENSE\"\n}, {\n \"id\": \"cg\",\n \"name\": \"css.gg\",\n \"projectUrl\": \"https://github.com/astrit/css.gg\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"vsc\",\n \"name\": \"VS Code Icons\",\n \"projectUrl\": \"https://github.com/microsoft/vscode-codicons\",\n \"license\": \"CC BY 4.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"tb\",\n \"name\": \"Tabler Icons\",\n \"projectUrl\": \"https://github.com/tabler/tabler-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"tfi\",\n \"name\": \"Themify Icons\",\n \"projectUrl\": \"https://github.com/lykmapipo/themify-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/thecreation/standard-icons/blob/master/modules/themify-icons/LICENSE\"\n}, {\n \"id\": \"rx\",\n \"name\": \"Radix Icons\",\n \"projectUrl\": \"https://icons.radix-ui.com\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/radix-ui/icons/blob/master/LICENSE\"\n}, {\n \"id\": \"pi\",\n \"name\": \"Phosphor Icons\",\n \"projectUrl\": \"https://github.com/phosphor-icons/core\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/phosphor-icons/core/blob/main/LICENSE\"\n}, {\n \"id\": \"lia\",\n \"name\": \"Icons8 Line Awesome\",\n \"projectUrl\": \"https://icons8.com/line-awesome\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/icons8/line-awesome/blob/master/LICENSE.md\"\n}];","import React from \"react\";\nexport var DefaultContext = {\n color: undefined,\n size: undefined,\n className: undefined,\n style: undefined,\n attr: undefined\n};\nexport var IconContext = React.createContext && React.createContext(DefaultContext);","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (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 __assign.apply(this, arguments);\n};\nvar __rest = this && this.__rest || function (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\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React from \"react\";\nimport { IconContext, DefaultContext } from \"./iconContext\";\nfunction Tree2Element(tree) {\n return tree && tree.map(function (node, i) {\n return React.createElement(node.tag, __assign({\n key: i\n }, node.attr), Tree2Element(node.child));\n });\n}\nexport function GenIcon(data) {\n // eslint-disable-next-line react/display-name\n return function (props) {\n return React.createElement(IconBase, __assign({\n attr: __assign({}, data.attr)\n }, props), Tree2Element(data.child));\n };\n}\nexport function IconBase(props) {\n var elem = function elem(conf) {\n var attr = props.attr,\n size = props.size,\n title = props.title,\n svgProps = __rest(props, [\"attr\", \"size\", \"title\"]);\n var computedSize = size || conf.size || \"1em\";\n var className;\n if (conf.className) className = conf.className;\n if (props.className) className = (className ? className + \" \" : \"\") + props.className;\n return React.createElement(\"svg\", __assign({\n stroke: \"currentColor\",\n fill: \"currentColor\",\n strokeWidth: \"0\"\n }, conf.attr, attr, svgProps, {\n className: className,\n style: __assign(__assign({\n color: props.color || conf.color\n }, conf.style), props.style),\n height: computedSize,\n width: computedSize,\n xmlns: \"http://www.w3.org/2000/svg\"\n }), title && React.createElement(\"title\", null, title), props.children);\n };\n return IconContext !== undefined ? React.createElement(IconContext.Consumer, null, function (conf) {\n return elem(conf);\n }) : elem(DefaultContext);\n}","'use strict';\n\nfunction _interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\nvar React = require('react');\nvar React__default = _interopDefault(React);\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n var mountedInstances = [];\n var state;\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n var SideEffect = /*#__PURE__*/\n function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n var _proto = SideEffect.prototype;\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n return SideEffect;\n }(React.PureComponent);\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n return SideEffect;\n };\n}\nmodule.exports = withSideEffect;","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n if (typeof fn !== 'function') {\n throw new $TypeError('`fn` is not a function');\n }\n if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n throw new $TypeError('`length` must be a positive 32-bit integer');\n }\n var loose = arguments.length > 2 && !!arguments[2];\n var functionLengthIsConfigurable = true;\n var functionLengthIsWritable = true;\n if ('length' in fn && gOPD) {\n var desc = gOPD(fn, 'length');\n if (desc && !desc.configurable) {\n functionLengthIsConfigurable = false;\n }\n if (desc && !desc.writable) {\n functionLengthIsWritable = false;\n }\n }\n if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n if (hasDescriptors) {\n define(/** @type {Parameters[0]} */fn, 'length', length, true, true);\n } else {\n define(/** @type {Parameters[0]} */fn, 'length', length);\n }\n }\n return fn;\n};","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n if (ret !== void 0) {\n return !!ret;\n }\n if (objA === objB) {\n return true;\n }\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) {\n return false;\n }\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n if (!bHasOwnProperty(key)) {\n return false;\n }\n var valueA = objA[key];\n var valueB = objB[key];\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n if (ret === false || ret === void 0 && valueA !== valueB) {\n return false;\n }\n }\n return true;\n};","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\nvar $TypeError = require('es-errors/type');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n* This function traverses the list returning the node corresponding to the given key.\n*\n* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.\n*/\n/** @type {import('.').listGetNode} */\nvar listGetNode = function listGetNode(list, key) {\n // eslint-disable-line consistent-return\n /** @type {typeof list | NonNullable<(typeof list)['next']>} */\n var prev = list;\n /** @type {(typeof list)['next']} */\n var curr;\n for (; (curr = prev.next) !== null; prev = curr) {\n if (curr.key === key) {\n prev.next = curr.next;\n // eslint-disable-next-line no-extra-parens\n curr.next = /** @type {NonNullable} */list.next;\n list.next = curr; // eslint-disable-line no-param-reassign\n return curr;\n }\n }\n};\n\n/** @type {import('.').listGet} */\nvar listGet = function listGet(objects, key) {\n var node = listGetNode(objects, key);\n return node && node.value;\n};\n/** @type {import('.').listSet} */\nvar listSet = function listSet(objects, key, value) {\n var node = listGetNode(objects, key);\n if (node) {\n node.value = value;\n } else {\n // Prepend the new node to the beginning of the list\n objects.next = /** @type {import('.').ListNode} */{\n // eslint-disable-line no-param-reassign, no-extra-parens\n key: key,\n next: objects.next,\n value: value\n };\n }\n};\n/** @type {import('.').listHas} */\nvar listHas = function listHas(objects, key) {\n return !!listGetNode(objects, key);\n};\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannel() {\n /** @type {WeakMap} */var $wm;\n /** @type {Map} */\n var $m;\n /** @type {import('.').RootNode} */\n var $o;\n\n /** @type {import('.').Channel} */\n var channel = {\n assert: function assert(key) {\n if (!channel.has(key)) {\n throw new $TypeError('Side channel does not contain ' + inspect(key));\n }\n },\n get: function get(key) {\n // eslint-disable-line consistent-return\n if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n if ($wm) {\n return $weakMapGet($wm, key);\n }\n } else if ($Map) {\n if ($m) {\n return $mapGet($m, key);\n }\n } else {\n if ($o) {\n // eslint-disable-line no-lonely-if\n return listGet($o, key);\n }\n }\n },\n has: function has(key) {\n if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n if ($wm) {\n return $weakMapHas($wm, key);\n }\n } else if ($Map) {\n if ($m) {\n return $mapHas($m, key);\n }\n } else {\n if ($o) {\n // eslint-disable-line no-lonely-if\n return listHas($o, key);\n }\n }\n return false;\n },\n set: function set(key, value) {\n if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n if (!$wm) {\n $wm = new $WeakMap();\n }\n $weakMapSet($wm, key, value);\n } else if ($Map) {\n if (!$m) {\n $m = new $Map();\n }\n $mapSet($m, key, value);\n } else {\n if (!$o) {\n // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head\n $o = {\n key: {},\n next: null\n };\n }\n listSet($o, key, value);\n }\n }\n };\n return channel;\n};","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar _extendStatics = function extendStatics(d, b) {\n _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 _extendStatics(d, b);\n};\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar _assign = function __assign() {\n _assign = 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 _assign.apply(this, arguments);\n};\nexport { _assign as __assign };\nexport function __rest(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\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);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}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __esDecorate(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,\n 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 _,\n 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(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nexport function __setFunctionName(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}\n;\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(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}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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}\nexport var __createBinding = 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)) {\n desc = {\n enumerable: true,\n get: function get() {\n return m[k];\n }\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};\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\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}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\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}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n 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}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\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 __await ? 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}\nexport function __asyncDelegator(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: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\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 () {\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}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __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};\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(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}\nexport function __classPrivateFieldSet(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}\nexport function __classPrivateFieldIn(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}\nexport function __addDisposableResource(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;\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 }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({\n value: value,\n dispose: dispose,\n async: async\n });\n } else if (async) {\n env.stack.push({\n async: true\n });\n }\n return value;\n}\nvar _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};\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function (e) {\n fail(e);\n return next();\n });\n } catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\nexport default {\n __extends: __extends,\n __assign: _assign,\n __rest: __rest,\n __decorate: __decorate,\n __param: __param,\n __metadata: __metadata,\n __awaiter: __awaiter,\n __generator: __generator,\n __createBinding: __createBinding,\n __exportStar: __exportStar,\n __values: __values,\n __read: __read,\n __spread: __spread,\n __spreadArrays: __spreadArrays,\n __spreadArray: __spreadArray,\n __await: __await,\n __asyncGenerator: __asyncGenerator,\n __asyncDelegator: __asyncDelegator,\n __asyncValues: __asyncValues,\n __makeTemplateObject: __makeTemplateObject,\n __importStar: __importStar,\n __importDefault: __importDefault,\n __classPrivateFieldGet: __classPrivateFieldGet,\n __classPrivateFieldSet: __classPrivateFieldSet,\n __classPrivateFieldIn: __classPrivateFieldIn,\n __addDisposableResource: __addDisposableResource,\n __disposeResources: __disposeResources\n};","export var MS = '-ms-';\nexport var MOZ = '-moz-';\nexport var WEBKIT = '-webkit-';\nexport var COMMENT = 'comm';\nexport var RULESET = 'rule';\nexport var DECLARATION = 'decl';\nexport var PAGE = '@page';\nexport var MEDIA = '@media';\nexport var IMPORT = '@import';\nexport var CHARSET = '@charset';\nexport var VIEWPORT = '@viewport';\nexport var SUPPORTS = '@supports';\nexport var DOCUMENT = '@document';\nexport var NAMESPACE = '@namespace';\nexport var KEYFRAMES = '@keyframes';\nexport var FONT_FACE = '@font-face';\nexport var COUNTER_STYLE = '@counter-style';\nexport var FONT_FEATURE_VALUES = '@font-feature-values';\nexport var LAYER = '@layer';\nexport var SCOPE = '@scope';","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs;\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode;\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign;\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash(value, length) {\n return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim(value) {\n return value.trim();\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match(value, pattern) {\n return (value = pattern.exec(value)) ? value[0] : value;\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace(value, pattern, replacement) {\n return value.replace(pattern, replacement);\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof(value, search, position) {\n return value.indexOf(search, position);\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat(value, index) {\n return value.charCodeAt(index) | 0;\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr(value, begin, end) {\n return value.slice(begin, end);\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen(value) {\n return value.length;\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof(value) {\n return value.length;\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append(value, array) {\n return array.push(value), value;\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine(array, callback) {\n return array.map(callback).join('');\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter(array, pattern) {\n return array.filter(function (value) {\n return !match(value, pattern);\n });\n}","import { from, trim, charat, strlen, substr, append, assign } from './Utility.js';\nexport var line = 1;\nexport var column = 1;\nexport var length = 0;\nexport var position = 0;\nexport var character = 0;\nexport var characters = '';\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node(value, root, parent, type, props, children, length, siblings) {\n return {\n value: value,\n root: root,\n parent: parent,\n type: type,\n props: props,\n children: children,\n line: line,\n column: column,\n length: length,\n return: '',\n siblings: siblings\n };\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy(root, props) {\n return assign(node('', null, null, '', null, null, 0, root.siblings), root, {\n length: -root.length\n }, props);\n}\n\n/**\n * @param {object} root\n */\nexport function lift(root) {\n while (root.root) root = copy(root.root, {\n children: [root]\n });\n append(root, root.siblings);\n}\n\n/**\n * @return {number}\n */\nexport function char() {\n return character;\n}\n\n/**\n * @return {number}\n */\nexport function prev() {\n character = position > 0 ? charat(characters, --position) : 0;\n if (column--, character === 10) column = 1, line--;\n return character;\n}\n\n/**\n * @return {number}\n */\nexport function next() {\n character = position < length ? charat(characters, position++) : 0;\n if (column++, character === 10) column = 1, line++;\n return character;\n}\n\n/**\n * @return {number}\n */\nexport function peek() {\n return charat(characters, position);\n}\n\n/**\n * @return {number}\n */\nexport function caret() {\n return position;\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice(begin, end) {\n return substr(characters, begin, end);\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token(type) {\n switch (type) {\n // \\0 \\t \\n \\r \\s whitespace token\n case 0:\n case 9:\n case 10:\n case 13:\n case 32:\n return 5;\n // ! + , / > @ ~ isolate token\n case 33:\n case 43:\n case 44:\n case 47:\n case 62:\n case 64:\n case 126:\n // ; { } breakpoint token\n case 59:\n case 123:\n case 125:\n return 4;\n // : accompanied token\n case 58:\n return 3;\n // \" ' ( [ opening delimit token\n case 34:\n case 39:\n case 40:\n case 91:\n return 2;\n // ) ] closing delimit token\n case 41:\n case 93:\n return 1;\n }\n return 0;\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc(value) {\n return line = column = 1, length = strlen(characters = value), position = 0, [];\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc(value) {\n return characters = '', value;\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit(type) {\n return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize(value) {\n return dealloc(tokenizer(alloc(value)));\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace(type) {\n while (character = peek()) if (character < 33) next();else break;\n return token(type) > 2 || token(character) > 3 ? '' : ' ';\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer(children) {\n while (next()) switch (token(character)) {\n case 0:\n append(identifier(position - 1), children);\n break;\n case 2:\n append(delimit(character), children);\n break;\n default:\n append(from(character), children);\n }\n return children;\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping(index, count) {\n while (--count && next())\n // not 0-9 A-F a-f\n if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break;\n return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter(type) {\n while (next()) switch (character) {\n // ] ) \" '\n case type:\n return position;\n // \" '\n case 34:\n case 39:\n if (type !== 34 && type !== 39) delimiter(character);\n break;\n // (\n case 40:\n if (type === 41) delimiter(type);\n break;\n // \\\n case 92:\n next();\n break;\n }\n return position;\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter(type, index) {\n while (next())\n // //\n if (type + character === 47 + 10) break;\n // /*\n else if (type + character === 42 + 42 && peek() === 47) break;\n return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next());\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier(index) {\n while (!token(peek())) next();\n return slice(index, position);\n}","import { IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES } from './Enum.js';\nimport { strlen } from './Utility.js';\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize(children, callback) {\n var output = '';\n for (var i = 0; i < children.length; i++) output += callback(children[i], i, children, callback) || '';\n return output;\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify(element, index, children, callback) {\n switch (element.type) {\n case LAYER:\n if (element.children.length) break;\n case IMPORT:\n case DECLARATION:\n return element.return = element.return || element.value;\n case COMMENT:\n return '';\n case KEYFRAMES:\n return element.return = element.value + '{' + serialize(element.children, callback) + '}';\n case RULESET:\n if (!strlen(element.value = element.props.join(','))) return '';\n }\n return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';\n}","import { MS, MOZ, WEBKIT } from './Enum.js';\nimport { hash, charat, strlen, indexof, replace, substr, match } from './Utility.js';\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix(value, length, children) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921:\n // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005:\n // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855:\n // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // tab-size\n case 4789:\n return MOZ + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // writing-mode\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n // default: fallthrough to below\n }\n // flex, flex-direction, scroll-snap-type, writing-mode\n case 6828:\n case 4268:\n case 2903:\n return WEBKIT + value + MS + value + value;\n // order\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value;\n // align-content\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value;\n // flex-shrink\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // justify-self\n case 4200:\n if (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value;\n break;\n // grid-template-(columns|rows)\n case 2592:\n case 3360:\n return MS + replace(value, 'template-', '') + value;\n // grid-(row|column)-start\n case 4384:\n case 3616:\n if (children && children.some(function (element, index) {\n return length = index, match(element.props, /grid-\\w+-end/);\n })) {\n return ~indexof(value + (children = children[length].value), 'span', 0) ? value : MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span', 0) ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';';\n }\n return MS + replace(value, '-start', '') + value;\n // grid-(row|column)-end\n case 4896:\n case 4128:\n return children && children.some(function (element) {\n return match(element.props, /grid-\\w+-start/);\n }) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value;\n // (margin|padding)-inline-(start|end)\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n case 115:\n return ~indexof(value, 'stretch', 0) ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value;\n }\n break;\n // grid-(column|row)\n case 5152:\n case 5920:\n return replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) {\n return MS + a + ':' + b + f + (c ? MS + a + '-span:' + (d ? e : +e - +b) + f : '') + value;\n });\n // position: sticky\n case 4949:\n // stick(y)?\n if (charat(value, length + 6) === 121) return replace(value, ':', ':' + WEBKIT) + value;\n break;\n // display: (flex|inline-flex|grid|inline-grid)\n case 6444:\n switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n // (inline-)?fle(x)\n case 120:\n return replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n // (inline-)?gri(d)\n case 100:\n return replace(value, ':', ':' + MS) + value;\n }\n break;\n // scroll-margin, scroll-margin-(top|right|bottom|left)\n case 5719:\n case 2647:\n case 2135:\n case 3927:\n case 2391:\n return replace(value, 'scroll-', 'scroll-snap-') + value;\n }\n return value;\n}","import { MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION } from './Enum.js';\nimport { match, charat, substr, strlen, sizeof, replace, combine, filter, assign } from './Utility.js';\nimport { copy, lift, tokenize } from './Tokenizer.js';\nimport { serialize } from './Serializer.js';\nimport { prefix } from './Prefixer.js';\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware(collection) {\n var length = sizeof(collection);\n return function (element, index, children, callback) {\n var output = '';\n for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || '';\n return output;\n };\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet(callback) {\n return function (element) {\n if (!element.root) if (element = element.return) callback(element);\n };\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element.return) switch (element.type) {\n case DECLARATION:\n element.return = prefix(element.value, element.length, children);\n return;\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n case RULESET:\n if (element.length) return combine(children = element.props, function (value) {\n switch (match(value, callback = /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n lift(copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n }));\n lift(copy(element, {\n props: [value]\n }));\n assign(element, {\n props: filter(children, callback)\n });\n break;\n // :placeholder\n case '::placeholder':\n lift(copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }));\n lift(copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }));\n lift(copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n }));\n lift(copy(element, {\n props: [value]\n }));\n assign(element, {\n props: filter(children, callback)\n });\n break;\n }\n return '';\n });\n }\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace(element) {\n switch (element.type) {\n case RULESET:\n element.props = element.props.map(function (value) {\n return combine(tokenize(value), function (value, index, children) {\n switch (charat(value, 0)) {\n // \\f\n case 12:\n return substr(value, 1, strlen(value));\n // \\0 ( + > ~\n case 0:\n case 40:\n case 43:\n case 62:\n case 126:\n return value;\n // :\n case 58:\n if (children[++index] === 'global') children[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1);\n // \\s\n case 32:\n return index === 1 ? '' : value;\n default:\n switch (index) {\n case 0:\n element = value;\n return sizeof(children) > 1 ? '' : value;\n case index = sizeof(children) - 1:\n case 2:\n return index === 2 ? value + element + element : value + element;\n default:\n return value;\n }\n }\n });\n });\n }\n}","import { COMMENT, RULESET, DECLARATION } from './Enum.js';\nimport { abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof } from './Utility.js';\nimport { node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter } from './Tokenizer.js';\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile(value) {\n return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value));\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n var index = 0;\n var offset = 0;\n var length = pseudo;\n var atrule = 0;\n var property = 0;\n var previous = 0;\n var variable = 1;\n var scanning = 1;\n var ampersand = 1;\n var character = 0;\n var type = '';\n var props = rules;\n var children = rulesets;\n var reference = rule;\n var characters = type;\n while (scanning) switch (previous = character, character = next()) {\n // (\n case 40:\n if (previous != 108 && charat(characters, length - 1) == 58) {\n if (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -1) ampersand = -1;\n break;\n }\n // \" ' [\n case 34:\n case 39:\n case 91:\n characters += delimit(character);\n break;\n // \\t \\n \\r \\s\n case 9:\n case 10:\n case 13:\n case 32:\n characters += whitespace(previous);\n break;\n // \\\n case 92:\n characters += escaping(caret() - 1, 7);\n continue;\n // /\n case 47:\n switch (peek()) {\n case 42:\n case 47:\n append(comment(commenter(next(), caret()), root, parent, declarations), declarations);\n break;\n default:\n characters += '/';\n }\n break;\n // {\n case 123 * variable:\n points[index++] = strlen(characters) * ampersand;\n // } ; \\0\n case 125 * variable:\n case 59:\n case 0:\n switch (character) {\n // \\0 }\n case 0:\n case 125:\n scanning = 0;\n // ;\n case 59 + offset:\n if (ampersand == -1) characters = replace(characters, /\\f/g, '');\n if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations);\n break;\n // @ ;\n case 59:\n characters += ';';\n // { rule/at-rule\n default:\n append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets);\n if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n // d l m s\n case 100:\n case 108:\n case 109:\n case 115:\n parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children);\n break;\n default:\n parse(characters, reference, reference, reference, [''], children, 0, points, children);\n }\n }\n index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;\n break;\n // :\n case 58:\n length = 1 + strlen(characters), property = previous;\n default:\n if (variable < 1) if (character == 123) --variable;else if (character == 125 && variable++ == 0 && prev() == 125) continue;\n switch (characters += from(character), character * variable) {\n // &\n case 38:\n ampersand = offset > 0 ? 1 : (characters += '\\f', -1);\n break;\n // ,\n case 44:\n points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;\n break;\n // @\n case 64:\n // -\n if (peek() === 45) characters += delimit(next());\n atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;\n break;\n // -\n case 45:\n if (previous === 45 && strlen(characters) == 2) variable = 0;\n }\n }\n return rulesets;\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n var post = offset - 1;\n var rule = offset === 0 ? rules : [''];\n var size = sizeof(rule);\n for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x]))) props[k++] = z;\n return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings);\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment(value, root, parent, siblings) {\n return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration(value, root, parent, length, siblings) {\n return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings);\n}","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\nexport { unitlessKeys as default };","import \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nimport \"core-js/modules/esnext.string.replace-all.js\";\nimport { __spreadArray as e, __assign as t } from \"tslib\";\nimport n from \"@emotion/is-prop-valid\";\nimport o, { useRef as r, useState as s, useMemo as i, useEffect as a, useContext as c, useDebugValue as l, createElement as u } from \"react\";\nimport p from \"shallowequal\";\nimport * as d from \"stylis\";\nimport h from \"@emotion/unitless\";\nvar f = \"undefined\" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || \"data-styled\",\n m = \"active\",\n y = \"data-styled-version\",\n v = \"6.1.13\",\n g = \"/*!sc*/\\n\",\n S = \"undefined\" != typeof window && \"HTMLElement\" in window,\n w = Boolean(\"boolean\" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : \"undefined\" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && \"\" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? \"false\" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : \"undefined\" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && \"\" !== process.env.SC_DISABLE_SPEEDY ? \"false\" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : \"production\" !== process.env.NODE_ENV),\n b = {},\n E = /invalid hook call/i,\n N = new Set(),\n P = function P(t, n) {\n if (\"production\" !== process.env.NODE_ENV) {\n var o = n ? ' with the id of \"'.concat(n, '\"') : \"\",\n s = \"The component \".concat(t).concat(o, \" has been created dynamically.\\n\") + \"You may see this warning because you've called styled inside another component.\\nTo resolve this only create new StyledComponents outside of any render method and function component.\",\n i = console.error;\n try {\n var a = !0;\n console.error = function (t) {\n for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];\n E.test(t) ? (a = !1, N.delete(s)) : i.apply(void 0, e([t], n, !1));\n }, r(), a && !N.has(s) && (console.warn(s), N.add(s));\n } catch (e) {\n E.test(e.message) && N.delete(s);\n } finally {\n console.error = i;\n }\n }\n },\n _ = Object.freeze([]),\n C = Object.freeze({});\nfunction I(e, t, n) {\n return void 0 === n && (n = C), e.theme !== n.theme && e.theme || t || n.theme;\n}\nvar A = new Set([\"a\", \"abbr\", \"address\", \"area\", \"article\", \"aside\", \"audio\", \"b\", \"base\", \"bdi\", \"bdo\", \"big\", \"blockquote\", \"body\", \"br\", \"button\", \"canvas\", \"caption\", \"cite\", \"code\", \"col\", \"colgroup\", \"data\", \"datalist\", \"dd\", \"del\", \"details\", \"dfn\", \"dialog\", \"div\", \"dl\", \"dt\", \"em\", \"embed\", \"fieldset\", \"figcaption\", \"figure\", \"footer\", \"form\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"header\", \"hgroup\", \"hr\", \"html\", \"i\", \"iframe\", \"img\", \"input\", \"ins\", \"kbd\", \"keygen\", \"label\", \"legend\", \"li\", \"link\", \"main\", \"map\", \"mark\", \"menu\", \"menuitem\", \"meta\", \"meter\", \"nav\", \"noscript\", \"object\", \"ol\", \"optgroup\", \"option\", \"output\", \"p\", \"param\", \"picture\", \"pre\", \"progress\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"script\", \"section\", \"select\", \"small\", \"source\", \"span\", \"strong\", \"style\", \"sub\", \"summary\", \"sup\", \"table\", \"tbody\", \"td\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"time\", \"tr\", \"track\", \"u\", \"ul\", \"use\", \"var\", \"video\", \"wbr\", \"circle\", \"clipPath\", \"defs\", \"ellipse\", \"foreignObject\", \"g\", \"image\", \"line\", \"linearGradient\", \"marker\", \"mask\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialGradient\", \"rect\", \"stop\", \"svg\", \"text\", \"tspan\"]),\n O = /[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~-]+/g,\n D = /(^-|-$)/g;\nfunction R(e) {\n return e.replace(O, \"-\").replace(D, \"\");\n}\nvar T = /(a)(d)/gi,\n k = 52,\n j = function j(e) {\n return String.fromCharCode(e + (e > 25 ? 39 : 97));\n };\nfunction x(e) {\n var t,\n n = \"\";\n for (t = Math.abs(e); t > k; t = t / k | 0) n = j(t % k) + n;\n return (j(t % k) + n).replace(T, \"$1-$2\");\n}\nvar V,\n F = 5381,\n M = function M(e, t) {\n for (var n = t.length; n;) e = 33 * e ^ t.charCodeAt(--n);\n return e;\n },\n z = function z(e) {\n return M(F, e);\n };\nfunction $(e) {\n return x(z(e) >>> 0);\n}\nfunction B(e) {\n return \"production\" !== process.env.NODE_ENV && \"string\" == typeof e && e || e.displayName || e.name || \"Component\";\n}\nfunction L(e) {\n return \"string\" == typeof e && (\"production\" === process.env.NODE_ENV || e.charAt(0) === e.charAt(0).toLowerCase());\n}\nvar G = \"function\" == typeof Symbol && Symbol.for,\n Y = G ? Symbol.for(\"react.memo\") : 60115,\n W = G ? Symbol.for(\"react.forward_ref\") : 60112,\n q = {\n childContextTypes: !0,\n contextType: !0,\n contextTypes: !0,\n defaultProps: !0,\n displayName: !0,\n getDefaultProps: !0,\n getDerivedStateFromError: !0,\n getDerivedStateFromProps: !0,\n mixins: !0,\n propTypes: !0,\n type: !0\n },\n H = {\n name: !0,\n length: !0,\n prototype: !0,\n caller: !0,\n callee: !0,\n arguments: !0,\n arity: !0\n },\n U = {\n $$typeof: !0,\n compare: !0,\n defaultProps: !0,\n displayName: !0,\n propTypes: !0,\n type: !0\n },\n J = ((V = {})[W] = {\n $$typeof: !0,\n render: !0,\n defaultProps: !0,\n displayName: !0,\n propTypes: !0\n }, V[Y] = U, V);\nfunction X(e) {\n return (\"type\" in (t = e) && t.type.$$typeof) === Y ? U : \"$$typeof\" in e ? J[e.$$typeof] : q;\n var t;\n}\nvar Z = Object.defineProperty,\n K = Object.getOwnPropertyNames,\n Q = Object.getOwnPropertySymbols,\n ee = Object.getOwnPropertyDescriptor,\n te = Object.getPrototypeOf,\n ne = Object.prototype;\nfunction oe(e, t, n) {\n if (\"string\" != typeof t) {\n if (ne) {\n var o = te(t);\n o && o !== ne && oe(e, o, n);\n }\n var r = K(t);\n Q && (r = r.concat(Q(t)));\n for (var s = X(e), i = X(t), a = 0; a < r.length; ++a) {\n var c = r[a];\n if (!(c in H || n && n[c] || i && c in i || s && c in s)) {\n var l = ee(t, c);\n try {\n Z(e, c, l);\n } catch (e) {}\n }\n }\n }\n return e;\n}\nfunction re(e) {\n return \"function\" == typeof e;\n}\nfunction se(e) {\n return \"object\" == typeof e && \"styledComponentId\" in e;\n}\nfunction ie(e, t) {\n return e && t ? \"\".concat(e, \" \").concat(t) : e || t || \"\";\n}\nfunction ae(e, t) {\n if (0 === e.length) return \"\";\n for (var n = e[0], o = 1; o < e.length; o++) n += t ? t + e[o] : e[o];\n return n;\n}\nfunction ce(e) {\n return null !== e && \"object\" == typeof e && e.constructor.name === Object.name && !(\"props\" in e && e.$$typeof);\n}\nfunction le(e, t, n) {\n if (void 0 === n && (n = !1), !n && !ce(e) && !Array.isArray(e)) return t;\n if (Array.isArray(t)) for (var o = 0; o < t.length; o++) e[o] = le(e[o], t[o]);else if (ce(t)) for (var o in t) e[o] = le(e[o], t[o]);\n return e;\n}\nfunction ue(e, t) {\n Object.defineProperty(e, \"toString\", {\n value: t\n });\n}\nvar pe = \"production\" !== process.env.NODE_ENV ? {\n 1: \"Cannot create styled-component for component: %s.\\n\\n\",\n 2: \"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",\n 3: \"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",\n 4: \"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n\",\n 5: \"The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n\",\n 6: \"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",\n 7: 'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',\n 8: 'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',\n 9: \"Missing document ``\\n\\n\",\n 10: \"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",\n 11: \"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",\n 12: \"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",\n 13: \"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",\n 14: 'ThemeProvider: \"theme\" prop is required.\\n\\n',\n 15: \"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",\n 16: \"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",\n 17: \"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\",\n 18: \"ThemeProvider: Please make sure your useTheme hook is within a ``\"\n} : {};\nfunction de() {\n for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];\n for (var n = e[0], o = [], r = 1, s = e.length; r < s; r += 1) o.push(e[r]);\n return o.forEach(function (e) {\n n = n.replace(/%[a-z]/, e);\n }), n;\n}\nfunction he(t) {\n for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];\n return \"production\" === process.env.NODE_ENV ? new Error(\"An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#\".concat(t, \" for more information.\").concat(n.length > 0 ? \" Args: \".concat(n.join(\", \")) : \"\")) : new Error(de.apply(void 0, e([pe[t]], n, !1)).trim());\n}\nvar fe = function () {\n function e(e) {\n this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e;\n }\n return e.prototype.indexOfGroup = function (e) {\n for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n];\n return t;\n }, e.prototype.insertRules = function (e, t) {\n if (e >= this.groupSizes.length) {\n for (var n = this.groupSizes, o = n.length, r = o; e >= r;) if ((r <<= 1) < 0) throw he(16, \"\".concat(e));\n this.groupSizes = new Uint32Array(r), this.groupSizes.set(n), this.length = r;\n for (var s = o; s < r; s++) this.groupSizes[s] = 0;\n }\n for (var i = this.indexOfGroup(e + 1), a = (s = 0, t.length); s < a; s++) this.tag.insertRule(i, t[s]) && (this.groupSizes[e]++, i++);\n }, e.prototype.clearGroup = function (e) {\n if (e < this.length) {\n var t = this.groupSizes[e],\n n = this.indexOfGroup(e),\n o = n + t;\n this.groupSizes[e] = 0;\n for (var r = n; r < o; r++) this.tag.deleteRule(n);\n }\n }, e.prototype.getGroup = function (e) {\n var t = \"\";\n if (e >= this.length || 0 === this.groupSizes[e]) return t;\n for (var n = this.groupSizes[e], o = this.indexOfGroup(e), r = o + n, s = o; s < r; s++) t += \"\".concat(this.tag.getRule(s)).concat(g);\n return t;\n }, e;\n }(),\n me = 1 << 30,\n ye = new Map(),\n ve = new Map(),\n ge = 1,\n Se = function Se(e) {\n if (ye.has(e)) return ye.get(e);\n for (; ve.has(ge);) ge++;\n var t = ge++;\n if (\"production\" !== process.env.NODE_ENV && ((0 | t) < 0 || t > me)) throw he(16, \"\".concat(t));\n return ye.set(e, t), ve.set(t, e), t;\n },\n we = function we(e, t) {\n ge = t + 1, ye.set(e, t), ve.set(t, e);\n },\n be = \"style[\".concat(f, \"][\").concat(y, '=\"').concat(v, '\"]'),\n Ee = new RegExp(\"^\".concat(f, '\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)')),\n Ne = function Ne(e, t, n) {\n for (var o, r = n.split(\",\"), s = 0, i = r.length; s < i; s++) (o = r[s]) && e.registerName(t, o);\n },\n Pe = function Pe(e, t) {\n for (var n, o = (null !== (n = t.textContent) && void 0 !== n ? n : \"\").split(g), r = [], s = 0, i = o.length; s < i; s++) {\n var a = o[s].trim();\n if (a) {\n var c = a.match(Ee);\n if (c) {\n var l = 0 | parseInt(c[1], 10),\n u = c[2];\n 0 !== l && (we(u, l), Ne(e, u, c[3]), e.getTag().insertRules(l, r)), r.length = 0;\n } else r.push(a);\n }\n }\n },\n _e = function _e(e) {\n for (var t = document.querySelectorAll(be), n = 0, o = t.length; n < o; n++) {\n var r = t[n];\n r && r.getAttribute(f) !== m && (Pe(e, r), r.parentNode && r.parentNode.removeChild(r));\n }\n };\nfunction Ce() {\n return \"undefined\" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;\n}\nvar Ie = function Ie(e) {\n var t = document.head,\n n = e || t,\n o = document.createElement(\"style\"),\n r = function (e) {\n var t = Array.from(e.querySelectorAll(\"style[\".concat(f, \"]\")));\n return t[t.length - 1];\n }(n),\n s = void 0 !== r ? r.nextSibling : null;\n o.setAttribute(f, m), o.setAttribute(y, v);\n var i = Ce();\n return i && o.setAttribute(\"nonce\", i), n.insertBefore(o, s), o;\n },\n Ae = function () {\n function e(e) {\n this.element = Ie(e), this.element.appendChild(document.createTextNode(\"\")), this.sheet = function (e) {\n if (e.sheet) return e.sheet;\n for (var t = document.styleSheets, n = 0, o = t.length; n < o; n++) {\n var r = t[n];\n if (r.ownerNode === e) return r;\n }\n throw he(17);\n }(this.element), this.length = 0;\n }\n return e.prototype.insertRule = function (e, t) {\n try {\n return this.sheet.insertRule(t, e), this.length++, !0;\n } catch (e) {\n return !1;\n }\n }, e.prototype.deleteRule = function (e) {\n this.sheet.deleteRule(e), this.length--;\n }, e.prototype.getRule = function (e) {\n var t = this.sheet.cssRules[e];\n return t && t.cssText ? t.cssText : \"\";\n }, e;\n }(),\n Oe = function () {\n function e(e) {\n this.element = Ie(e), this.nodes = this.element.childNodes, this.length = 0;\n }\n return e.prototype.insertRule = function (e, t) {\n if (e <= this.length && e >= 0) {\n var n = document.createTextNode(t);\n return this.element.insertBefore(n, this.nodes[e] || null), this.length++, !0;\n }\n return !1;\n }, e.prototype.deleteRule = function (e) {\n this.element.removeChild(this.nodes[e]), this.length--;\n }, e.prototype.getRule = function (e) {\n return e < this.length ? this.nodes[e].textContent : \"\";\n }, e;\n }(),\n De = function () {\n function e(e) {\n this.rules = [], this.length = 0;\n }\n return e.prototype.insertRule = function (e, t) {\n return e <= this.length && (this.rules.splice(e, 0, t), this.length++, !0);\n }, e.prototype.deleteRule = function (e) {\n this.rules.splice(e, 1), this.length--;\n }, e.prototype.getRule = function (e) {\n return e < this.length ? this.rules[e] : \"\";\n }, e;\n }(),\n Re = S,\n Te = {\n isServer: !S,\n useCSSOMInjection: !w\n },\n ke = function () {\n function e(e, n, o) {\n void 0 === e && (e = C), void 0 === n && (n = {});\n var r = this;\n this.options = t(t({}, Te), e), this.gs = n, this.names = new Map(o), this.server = !!e.isServer, !this.server && S && Re && (Re = !1, _e(this)), ue(this, function () {\n return function (e) {\n for (var t = e.getTag(), n = t.length, o = \"\", r = function r(n) {\n var r = function (e) {\n return ve.get(e);\n }(n);\n if (void 0 === r) return \"continue\";\n var s = e.names.get(r),\n i = t.getGroup(n);\n if (void 0 === s || !s.size || 0 === i.length) return \"continue\";\n var a = \"\".concat(f, \".g\").concat(n, '[id=\"').concat(r, '\"]'),\n c = \"\";\n void 0 !== s && s.forEach(function (e) {\n e.length > 0 && (c += \"\".concat(e, \",\"));\n }), o += \"\".concat(i).concat(a, '{content:\"').concat(c, '\"}').concat(g);\n }, s = 0; s < n; s++) r(s);\n return o;\n }(r);\n });\n }\n return e.registerId = function (e) {\n return Se(e);\n }, e.prototype.rehydrate = function () {\n !this.server && S && _e(this);\n }, e.prototype.reconstructWithOptions = function (n, o) {\n return void 0 === o && (o = !0), new e(t(t({}, this.options), n), this.gs, o && this.names || void 0);\n }, e.prototype.allocateGSInstance = function (e) {\n return this.gs[e] = (this.gs[e] || 0) + 1;\n }, e.prototype.getTag = function () {\n return this.tag || (this.tag = (e = function (e) {\n var t = e.useCSSOMInjection,\n n = e.target;\n return e.isServer ? new De(n) : t ? new Ae(n) : new Oe(n);\n }(this.options), new fe(e)));\n var e;\n }, e.prototype.hasNameForId = function (e, t) {\n return this.names.has(e) && this.names.get(e).has(t);\n }, e.prototype.registerName = function (e, t) {\n if (Se(e), this.names.has(e)) this.names.get(e).add(t);else {\n var n = new Set();\n n.add(t), this.names.set(e, n);\n }\n }, e.prototype.insertRules = function (e, t, n) {\n this.registerName(e, t), this.getTag().insertRules(Se(e), n);\n }, e.prototype.clearNames = function (e) {\n this.names.has(e) && this.names.get(e).clear();\n }, e.prototype.clearRules = function (e) {\n this.getTag().clearGroup(Se(e)), this.clearNames(e);\n }, e.prototype.clearTag = function () {\n this.tag = void 0;\n }, e;\n }(),\n je = /&/g,\n xe = /^\\s*\\/\\/.*$/gm;\nfunction Ve(e, t) {\n return e.map(function (e) {\n return \"rule\" === e.type && (e.value = \"\".concat(t, \" \").concat(e.value), e.value = e.value.replaceAll(\",\", \",\".concat(t, \" \")), e.props = e.props.map(function (e) {\n return \"\".concat(t, \" \").concat(e);\n })), Array.isArray(e.children) && \"@keyframes\" !== e.type && (e.children = Ve(e.children, t)), e;\n });\n}\nfunction Fe(e) {\n var t,\n n,\n o,\n r = void 0 === e ? C : e,\n s = r.options,\n i = void 0 === s ? C : s,\n a = r.plugins,\n c = void 0 === a ? _ : a,\n l = function l(e, o, r) {\n return r.startsWith(n) && r.endsWith(n) && r.replaceAll(n, \"\").length > 0 ? \".\".concat(t) : e;\n },\n u = c.slice();\n u.push(function (e) {\n e.type === d.RULESET && e.value.includes(\"&\") && (e.props[0] = e.props[0].replace(je, n).replace(o, l));\n }), i.prefix && u.push(d.prefixer), u.push(d.stringify);\n var p = function p(e, r, s, a) {\n void 0 === r && (r = \"\"), void 0 === s && (s = \"\"), void 0 === a && (a = \"&\"), t = a, n = r, o = new RegExp(\"\\\\\".concat(n, \"\\\\b\"), \"g\");\n var c = e.replace(xe, \"\"),\n l = d.compile(s || r ? \"\".concat(s, \" \").concat(r, \" { \").concat(c, \" }\") : c);\n i.namespace && (l = Ve(l, i.namespace));\n var p = [];\n return d.serialize(l, d.middleware(u.concat(d.rulesheet(function (e) {\n return p.push(e);\n })))), p;\n };\n return p.hash = c.length ? c.reduce(function (e, t) {\n return t.name || he(15), M(e, t.name);\n }, F).toString() : \"\", p;\n}\nvar Me = new ke(),\n ze = Fe(),\n $e = o.createContext({\n shouldForwardProp: void 0,\n styleSheet: Me,\n stylis: ze\n }),\n Be = $e.Consumer,\n Le = o.createContext(void 0);\nfunction Ge() {\n return c($e);\n}\nfunction Ye(e) {\n var t = s(e.stylisPlugins),\n n = t[0],\n r = t[1],\n c = Ge().styleSheet,\n l = i(function () {\n var t = c;\n return e.sheet ? t = e.sheet : e.target && (t = t.reconstructWithOptions({\n target: e.target\n }, !1)), e.disableCSSOMInjection && (t = t.reconstructWithOptions({\n useCSSOMInjection: !1\n })), t;\n }, [e.disableCSSOMInjection, e.sheet, e.target, c]),\n u = i(function () {\n return Fe({\n options: {\n namespace: e.namespace,\n prefix: e.enableVendorPrefixes\n },\n plugins: n\n });\n }, [e.enableVendorPrefixes, e.namespace, n]);\n a(function () {\n p(n, e.stylisPlugins) || r(e.stylisPlugins);\n }, [e.stylisPlugins]);\n var d = i(function () {\n return {\n shouldForwardProp: e.shouldForwardProp,\n styleSheet: l,\n stylis: u\n };\n }, [e.shouldForwardProp, l, u]);\n return o.createElement($e.Provider, {\n value: d\n }, o.createElement(Le.Provider, {\n value: u\n }, e.children));\n}\nvar We = function () {\n function e(e, t) {\n var n = this;\n this.inject = function (e, t) {\n void 0 === t && (t = ze);\n var o = n.name + t.hash;\n e.hasNameForId(n.id, o) || e.insertRules(n.id, o, t(n.rules, o, \"@keyframes\"));\n }, this.name = e, this.id = \"sc-keyframes-\".concat(e), this.rules = t, ue(this, function () {\n throw he(12, String(n.name));\n });\n }\n return e.prototype.getName = function (e) {\n return void 0 === e && (e = ze), this.name + e.hash;\n }, e;\n }(),\n qe = function qe(e) {\n return e >= \"A\" && e <= \"Z\";\n };\nfunction He(e) {\n for (var t = \"\", n = 0; n < e.length; n++) {\n var o = e[n];\n if (1 === n && \"-\" === o && \"-\" === e[0]) return e;\n qe(o) ? t += \"-\" + o.toLowerCase() : t += o;\n }\n return t.startsWith(\"ms-\") ? \"-\" + t : t;\n}\nvar Ue = function Ue(e) {\n return null == e || !1 === e || \"\" === e;\n },\n _Je = function Je(t) {\n var n,\n o,\n r = [];\n for (var s in t) {\n var i = t[s];\n t.hasOwnProperty(s) && !Ue(i) && (Array.isArray(i) && i.isCss || re(i) ? r.push(\"\".concat(He(s), \":\"), i, \";\") : ce(i) ? r.push.apply(r, e(e([\"\".concat(s, \" {\")], _Je(i), !1), [\"}\"], !1)) : r.push(\"\".concat(He(s), \": \").concat((n = s, null == (o = i) || \"boolean\" == typeof o || \"\" === o ? \"\" : \"number\" != typeof o || 0 === o || n in h || n.startsWith(\"--\") ? String(o).trim() : \"\".concat(o, \"px\")), \";\")));\n }\n return r;\n };\nfunction Xe(e, t, n, o) {\n if (Ue(e)) return [];\n if (se(e)) return [\".\".concat(e.styledComponentId)];\n if (re(e)) {\n if (!re(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];\n var r = e(t);\n return \"production\" === process.env.NODE_ENV || \"object\" != typeof r || Array.isArray(r) || r instanceof We || ce(r) || null === r || console.error(\"\".concat(B(e), \" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\")), Xe(r, t, n, o);\n }\n var s;\n return e instanceof We ? n ? (e.inject(n, o), [e.getName(o)]) : [e] : ce(e) ? _Je(e) : Array.isArray(e) ? Array.prototype.concat.apply(_, e.map(function (e) {\n return Xe(e, t, n, o);\n })) : [e.toString()];\n}\nfunction Ze(e) {\n for (var t = 0; t < e.length; t += 1) {\n var n = e[t];\n if (re(n) && !se(n)) return !1;\n }\n return !0;\n}\nvar Ke = z(v),\n Qe = function () {\n function e(e, t, n) {\n this.rules = e, this.staticRulesId = \"\", this.isStatic = \"production\" === process.env.NODE_ENV && (void 0 === n || n.isStatic) && Ze(e), this.componentId = t, this.baseHash = M(Ke, t), this.baseStyle = n, ke.registerId(t);\n }\n return e.prototype.generateAndInjectStyles = function (e, t, n) {\n var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, t, n) : \"\";\n if (this.isStatic && !n.hash) {\n if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o = ie(o, this.staticRulesId);else {\n var r = ae(Xe(this.rules, e, t, n)),\n s = x(M(this.baseHash, r) >>> 0);\n if (!t.hasNameForId(this.componentId, s)) {\n var i = n(r, \".\".concat(s), void 0, this.componentId);\n t.insertRules(this.componentId, s, i);\n }\n o = ie(o, s), this.staticRulesId = s;\n }\n } else {\n for (var a = M(this.baseHash, n.hash), c = \"\", l = 0; l < this.rules.length; l++) {\n var u = this.rules[l];\n if (\"string\" == typeof u) c += u, \"production\" !== process.env.NODE_ENV && (a = M(a, u));else if (u) {\n var p = ae(Xe(u, e, t, n));\n a = M(a, p + l), c += p;\n }\n }\n if (c) {\n var d = x(a >>> 0);\n t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, \".\".concat(d), void 0, this.componentId)), o = ie(o, d);\n }\n }\n return o;\n }, e;\n }(),\n et = o.createContext(void 0),\n tt = et.Consumer;\nfunction nt() {\n var e = c(et);\n if (!e) throw he(18);\n return e;\n}\nfunction ot(e) {\n var n = o.useContext(et),\n r = i(function () {\n return function (e, n) {\n if (!e) throw he(14);\n if (re(e)) {\n var o = e(n);\n if (\"production\" !== process.env.NODE_ENV && (null === o || Array.isArray(o) || \"object\" != typeof o)) throw he(7);\n return o;\n }\n if (Array.isArray(e) || \"object\" != typeof e) throw he(8);\n return n ? t(t({}, n), e) : e;\n }(e.theme, n);\n }, [e.theme, n]);\n return e.children ? o.createElement(et.Provider, {\n value: r\n }, e.children) : null;\n}\nvar rt = {},\n st = new Set();\nfunction it(e, r, s) {\n var i = se(e),\n a = e,\n c = !L(e),\n p = r.attrs,\n d = void 0 === p ? _ : p,\n h = r.componentId,\n f = void 0 === h ? function (e, t) {\n var n = \"string\" != typeof e ? \"sc\" : R(e);\n rt[n] = (rt[n] || 0) + 1;\n var o = \"\".concat(n, \"-\").concat($(v + n + rt[n]));\n return t ? \"\".concat(t, \"-\").concat(o) : o;\n }(r.displayName, r.parentComponentId) : h,\n m = r.displayName,\n y = void 0 === m ? function (e) {\n return L(e) ? \"styled.\".concat(e) : \"Styled(\".concat(B(e), \")\");\n }(e) : m,\n g = r.displayName && r.componentId ? \"\".concat(R(r.displayName), \"-\").concat(r.componentId) : r.componentId || f,\n S = i && a.attrs ? a.attrs.concat(d).filter(Boolean) : d,\n w = r.shouldForwardProp;\n if (i && a.shouldForwardProp) {\n var b = a.shouldForwardProp;\n if (r.shouldForwardProp) {\n var E = r.shouldForwardProp;\n w = function w(e, t) {\n return b(e, t) && E(e, t);\n };\n } else w = b;\n }\n var N = new Qe(s, g, i ? a.componentStyle : void 0);\n function O(e, r) {\n return function (e, r, s) {\n var i = e.attrs,\n a = e.componentStyle,\n c = e.defaultProps,\n p = e.foldedComponentIds,\n d = e.styledComponentId,\n h = e.target,\n f = o.useContext(et),\n m = Ge(),\n y = e.shouldForwardProp || m.shouldForwardProp;\n \"production\" !== process.env.NODE_ENV && l(d);\n var v = I(r, f, c) || C,\n g = function (e, n, o) {\n for (var r, s = t(t({}, n), {\n className: void 0,\n theme: o\n }), i = 0; i < e.length; i += 1) {\n var a = re(r = e[i]) ? r(s) : r;\n for (var c in a) s[c] = \"className\" === c ? ie(s[c], a[c]) : \"style\" === c ? t(t({}, s[c]), a[c]) : a[c];\n }\n return n.className && (s.className = ie(s.className, n.className)), s;\n }(i, r, v),\n S = g.as || h,\n w = {};\n for (var b in g) void 0 === g[b] || \"$\" === b[0] || \"as\" === b || \"theme\" === b && g.theme === v || (\"forwardedAs\" === b ? w.as = g.forwardedAs : y && !y(b, S) || (w[b] = g[b], y || \"development\" !== process.env.NODE_ENV || n(b) || st.has(b) || !A.has(S) || (st.add(b), console.warn('styled-components: it looks like an unknown prop \"'.concat(b, '\" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));\n var E = function (e, t) {\n var n = Ge(),\n o = e.generateAndInjectStyles(t, n.styleSheet, n.stylis);\n return \"production\" !== process.env.NODE_ENV && l(o), o;\n }(a, g);\n \"production\" !== process.env.NODE_ENV && e.warnTooManyClasses && e.warnTooManyClasses(E);\n var N = ie(p, d);\n return E && (N += \" \" + E), g.className && (N += \" \" + g.className), w[L(S) && !A.has(S) ? \"class\" : \"className\"] = N, w.ref = s, u(S, w);\n }(D, e, r);\n }\n O.displayName = y;\n var D = o.forwardRef(O);\n return D.attrs = S, D.componentStyle = N, D.displayName = y, D.shouldForwardProp = w, D.foldedComponentIds = i ? ie(a.foldedComponentIds, a.styledComponentId) : \"\", D.styledComponentId = g, D.target = i ? a.target : e, Object.defineProperty(D, \"defaultProps\", {\n get: function get() {\n return this._foldedDefaultProps;\n },\n set: function set(e) {\n this._foldedDefaultProps = i ? function (e) {\n for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];\n for (var o = 0, r = t; o < r.length; o++) le(e, r[o], !0);\n return e;\n }({}, a.defaultProps, e) : e;\n }\n }), \"production\" !== process.env.NODE_ENV && (P(y, g), D.warnTooManyClasses = function (e, t) {\n var n = {},\n o = !1;\n return function (r) {\n if (!o && (n[r] = !0, Object.keys(n).length >= 200)) {\n var s = t ? ' with the id of \"'.concat(t, '\"') : \"\";\n console.warn(\"Over \".concat(200, \" classes were generated for component \").concat(e).concat(s, \".\\n\") + \"Consider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"), o = !0, n = {};\n }\n };\n }(y, g)), ue(D, function () {\n return \".\".concat(D.styledComponentId);\n }), c && oe(D, e, {\n attrs: !0,\n componentStyle: !0,\n displayName: !0,\n foldedComponentIds: !0,\n shouldForwardProp: !0,\n styledComponentId: !0,\n target: !0\n }), D;\n}\nfunction at(e, t) {\n for (var n = [e[0]], o = 0, r = t.length; o < r; o += 1) n.push(t[o], e[o + 1]);\n return n;\n}\nvar ct = function ct(e) {\n return Object.assign(e, {\n isCss: !0\n });\n};\nfunction lt(t) {\n for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];\n if (re(t) || ce(t)) return ct(Xe(at(_, e([t], n, !0))));\n var r = t;\n return 0 === n.length && 1 === r.length && \"string\" == typeof r[0] ? Xe(r) : ct(Xe(at(r, n)));\n}\nfunction ut(n, o, r) {\n if (void 0 === r && (r = C), !o) throw he(1, o);\n var s = function s(t) {\n for (var s = [], i = 1; i < arguments.length; i++) s[i - 1] = arguments[i];\n return n(o, r, lt.apply(void 0, e([t], s, !1)));\n };\n return s.attrs = function (e) {\n return ut(n, o, t(t({}, r), {\n attrs: Array.prototype.concat(r.attrs, e).filter(Boolean)\n }));\n }, s.withConfig = function (e) {\n return ut(n, o, t(t({}, r), e));\n }, s;\n}\nvar pt = function pt(e) {\n return ut(it, e);\n },\n dt = pt;\nA.forEach(function (e) {\n dt[e] = pt(e);\n});\nvar ht = function () {\n function e(e, t) {\n this.rules = e, this.componentId = t, this.isStatic = Ze(e), ke.registerId(this.componentId + 1);\n }\n return e.prototype.createStyles = function (e, t, n, o) {\n var r = o(ae(Xe(this.rules, t, n, o)), \"\"),\n s = this.componentId + e;\n n.insertRules(s, s, r);\n }, e.prototype.removeStyles = function (e, t) {\n t.clearRules(this.componentId + e);\n }, e.prototype.renderStyles = function (e, t, n, o) {\n e > 2 && ke.registerId(this.componentId + e), this.removeStyles(e, n), this.createStyles(e, t, n, o);\n }, e;\n}();\nfunction ft(n) {\n for (var r = [], s = 1; s < arguments.length; s++) r[s - 1] = arguments[s];\n var i = lt.apply(void 0, e([n], r, !1)),\n a = \"sc-global-\".concat($(JSON.stringify(i))),\n c = new ht(i, a);\n \"production\" !== process.env.NODE_ENV && P(a);\n var l = function l(e) {\n var t = Ge(),\n n = o.useContext(et),\n r = o.useRef(t.styleSheet.allocateGSInstance(a)).current;\n return \"production\" !== process.env.NODE_ENV && o.Children.count(e.children) && console.warn(\"The global style component \".concat(a, \" was given child JSX. createGlobalStyle does not render children.\")), \"production\" !== process.env.NODE_ENV && i.some(function (e) {\n return \"string\" == typeof e && -1 !== e.indexOf(\"@import\");\n }) && console.warn(\"Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"), t.styleSheet.server && u(r, e, t.styleSheet, n, t.stylis), o.useLayoutEffect(function () {\n if (!t.styleSheet.server) return u(r, e, t.styleSheet, n, t.stylis), function () {\n return c.removeStyles(r, t.styleSheet);\n };\n }, [r, e, t.styleSheet, n, t.stylis]), null;\n };\n function u(e, n, o, r, s) {\n if (c.isStatic) c.renderStyles(e, b, o, s);else {\n var i = t(t({}, n), {\n theme: I(n, r, l.defaultProps)\n });\n c.renderStyles(e, i, o, s);\n }\n }\n return o.memo(l);\n}\nfunction mt(t) {\n for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];\n \"production\" !== process.env.NODE_ENV && \"undefined\" != typeof navigator && \"ReactNative\" === navigator.product && console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");\n var r = ae(lt.apply(void 0, e([t], n, !1))),\n s = $(r);\n return new We(s, r);\n}\nfunction yt(e) {\n var n = o.forwardRef(function (n, r) {\n var s = I(n, o.useContext(et), e.defaultProps);\n return \"production\" !== process.env.NODE_ENV && void 0 === s && console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'.concat(B(e), '\"')), o.createElement(e, t({}, n, {\n theme: s,\n ref: r\n }));\n });\n return n.displayName = \"WithTheme(\".concat(B(e), \")\"), oe(n, e);\n}\nvar vt = function () {\n function e() {\n var e = this;\n this._emitSheetCSS = function () {\n var t = e.instance.toString();\n if (!t) return \"\";\n var n = Ce(),\n o = ae([n && 'nonce=\"'.concat(n, '\"'), \"\".concat(f, '=\"true\"'), \"\".concat(y, '=\"').concat(v, '\"')].filter(Boolean), \" \");\n return \"\");\n }, this.getStyleTags = function () {\n if (e.sealed) throw he(2);\n return e._emitSheetCSS();\n }, this.getStyleElement = function () {\n var n;\n if (e.sealed) throw he(2);\n var r = e.instance.toString();\n if (!r) return [];\n var s = ((n = {})[f] = \"\", n[y] = v, n.dangerouslySetInnerHTML = {\n __html: r\n }, n),\n i = Ce();\n return i && (s.nonce = i), [o.createElement(\"style\", t({}, s, {\n key: \"sc-0-0\"\n }))];\n }, this.seal = function () {\n e.sealed = !0;\n }, this.instance = new ke({\n isServer: !0\n }), this.sealed = !1;\n }\n return e.prototype.collectStyles = function (e) {\n if (this.sealed) throw he(2);\n return o.createElement(Ye, {\n sheet: this.instance\n }, e);\n }, e.prototype.interleaveWithNodeStream = function (e) {\n throw he(3);\n }, e;\n }(),\n gt = {\n StyleSheet: ke,\n mainSheet: Me\n };\n\"production\" !== process.env.NODE_ENV && \"undefined\" != typeof navigator && \"ReactNative\" === navigator.product && console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\");\nvar St = \"__sc-\".concat(f, \"__\");\n\"production\" !== process.env.NODE_ENV && \"test\" !== process.env.NODE_ENV && \"undefined\" != typeof window && (window[St] || (window[St] = 0), 1 === window[St] && console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"), window[St] += 1);\nexport { vt as ServerStyleSheet, Be as StyleSheetConsumer, $e as StyleSheetContext, Ye as StyleSheetManager, tt as ThemeConsumer, et as ThemeContext, ot as ThemeProvider, gt as __PRIVATE__, ft as createGlobalStyle, lt as css, dt as default, se as isStyledComponent, mt as keyframes, dt as styled, nt as useTheme, v as version, yt as withTheme };","/*! *****************************************************************************\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***************************************************************************** */\n/* global Reflect, Promise */\n\nvar _extendStatics = function extendStatics(d, b) {\n _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 (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n};\nexport function __extends(d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar _assign = function __assign() {\n _assign = 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 _assign.apply(this, arguments);\n};\nexport { _assign as __assign };\nexport function __rest(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\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);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}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(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}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) 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 = [op[0] & 2, t.value];\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 = [0];\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 = [6, e];\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}\nexport function __createBinding(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}\nexport function __exportStar(m, exports) {\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\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}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n 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}\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\nexport function __spreadArrays() {\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}\n;\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\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 __await ? 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}\nexport function __asyncDelegator(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: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\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 () {\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}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result.default = mod;\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n}","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;\n(function (root) {\n /** Detect free variables */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n var freeModule = typeof module == 'object' && module && !module.nodeType && module;\n var freeGlobal = typeof global == 'object' && global;\n if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n root = freeGlobal;\n }\n\n /**\n * The `punycode` object.\n * @name punycode\n * @type Object\n */\n var punycode,\n /** Highest positive signed 32-bit float value */\n maxInt = 2147483647,\n // aka. 0x7FFFFFFF or 2^31-1\n\n /** Bootstring parameters */\n base = 36,\n tMin = 1,\n tMax = 26,\n skew = 38,\n damp = 700,\n initialBias = 72,\n initialN = 128,\n // 0x80\n delimiter = '-',\n // '\\x2D'\n\n /** Regular expressions */\n regexPunycode = /^xn--/,\n regexNonASCII = /[^\\x20-\\x7E]/,\n // unprintable ASCII chars + non-ASCII chars\n regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n // RFC 3490 separators\n\n /** Error messages */\n errors = {\n 'overflow': 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n },\n /** Convenience shortcuts */\n baseMinusTMin = base - tMin,\n floor = Math.floor,\n stringFromCharCode = String.fromCharCode,\n /** Temporary variable */\n key;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\n function error(type) {\n throw new RangeError(errors[type]);\n }\n\n /**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\n function map(array, fn) {\n var length = array.length;\n var result = [];\n while (length--) {\n result[length] = fn(array[length]);\n }\n return result;\n }\n\n /**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\n function mapDomain(string, fn) {\n var parts = string.split('@');\n var result = '';\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n string = parts[1];\n }\n // Avoid `split(regex)` for IE8 compatibility. See #17.\n string = string.replace(regexSeparators, '\\x2E');\n var labels = string.split('.');\n var encoded = map(labels, fn).join('.');\n return result + encoded;\n }\n\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n function ucs2decode(string) {\n var output = [],\n counter = 0,\n length = string.length,\n value,\n extra;\n while (counter < length) {\n value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) {\n // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n\n /**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\n function ucs2encode(array) {\n return map(array, function (value) {\n var output = '';\n if (value > 0xFFFF) {\n value -= 0x10000;\n output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n value = 0xDC00 | value & 0x3FF;\n }\n output += stringFromCharCode(value);\n return output;\n }).join('');\n }\n\n /**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\n function basicToDigit(codePoint) {\n if (codePoint - 48 < 10) {\n return codePoint - 22;\n }\n if (codePoint - 65 < 26) {\n return codePoint - 65;\n }\n if (codePoint - 97 < 26) {\n return codePoint - 97;\n }\n return base;\n }\n\n /**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\n function digitToBasic(digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n }\n\n /**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\n function adapt(delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for /* no initialization */\n (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n }\n\n /**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\n function decode(input) {\n // Don't use UCS-2\n var output = [],\n inputLength = input.length,\n out,\n i = 0,\n n = initialN,\n bias = initialBias,\n basic,\n j,\n index,\n oldi,\n w,\n k,\n digit,\n t,\n /** Cached calculation results */\n baseMinusT;\n\n // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n basic = input.lastIndexOf(delimiter);\n if (basic < 0) {\n basic = 0;\n }\n for (j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n output.push(input.charCodeAt(j));\n }\n\n // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n for /* no final expression */\n (index = basic > 0 ? basic + 1 : 0; index < inputLength;) {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n for /* no condition */\n (oldi = i, w = 1, k = base;; k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n digit = basicToDigit(input.charCodeAt(index++));\n if (digit >= base || digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n i += digit * w;\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (digit < t) {\n break;\n }\n baseMinusT = base - t;\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n w *= baseMinusT;\n }\n out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0);\n\n // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n n += floor(i / out);\n i %= out;\n\n // Insert `n` at position `i` of the output\n output.splice(i++, 0, n);\n }\n return ucs2encode(output);\n }\n\n /**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\n function encode(input) {\n var n,\n delta,\n handledCPCount,\n basicLength,\n bias,\n j,\n m,\n q,\n k,\n t,\n currentValue,\n output = [],\n /** `inputLength` will hold the number of code points in `input`. */\n inputLength,\n /** Cached calculation results */\n handledCPCountPlusOne,\n baseMinusT,\n qMinusT;\n\n // Convert the input in UCS-2 to Unicode\n input = ucs2decode(input);\n\n // Cache the length\n inputLength = input.length;\n\n // Initialize the state\n n = initialN;\n delta = 0;\n bias = initialBias;\n\n // Handle the basic code points\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n handledCPCount = basicLength = output.length;\n\n // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n\n // Finish the basic string - if it is not empty - with a delimiter\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n for (m = maxInt, j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow\n handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer\n for /* no condition */\n (q = delta, k = base;; k += base) {\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (q < t) {\n break;\n }\n qMinusT = q - t;\n baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n q = floor(qMinusT / baseMinusT);\n }\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n ++delta;\n ++n;\n }\n return output.join('');\n }\n\n /**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\n function toUnicode(input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n }\n\n /**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\n function toASCII(input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n }\n\n /*--------------------------------------------------------------------------*/\n\n /** Define the public API */\n punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n 'version': '1.4.1',\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n 'ucs2': {\n 'decode': ucs2decode,\n 'encode': ucs2encode\n },\n 'decode': decode,\n 'encode': encode,\n 'toASCII': toASCII,\n 'toUnicode': toUnicode\n };\n\n /** Expose `punycode` */\n // Some AMD build optimizers, like r.js, check for specific condition patterns\n // like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n define('punycode', function () {\n return punycode;\n });\n } else if (freeExports && freeModule) {\n if (module.exports == freeExports) {\n // in Node.js, io.js, or RingoJS v0.8.0+\n freeModule.exports = punycode;\n } else {\n // in Narwhal or RingoJS v0.7.0-\n for (key in punycode) {\n punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n }\n }\n } else {\n // in Rhino or a web browser\n root.punycode = punycode;\n }\n})(this);","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function RFC1738(value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function RFC3986(value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};","'use strict';\n\nvar utils = require('./utils');\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar defaults = {\n allowDots: false,\n allowEmptyArrays: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decodeDotInKeys: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n duplicates: 'combine',\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictDepth: false,\n strictNullHandling: false\n};\nvar interpretNumericEntities = function interpretNumericEntities(str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\nvar parseArrayValue = function parseArrayValue(val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {\n __proto__: null\n };\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n });\n }\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n var existing = has.call(obj, key);\n if (existing && options.duplicates === 'combine') {\n obj[key] = utils.combine(obj[key], val);\n } else if (!existing || options.duplicates === 'last') {\n obj[key] = val;\n }\n }\n return obj;\n};\nvar parseObject = function parseObject(chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n if (root === '[]' && options.parseArrays) {\n obj = options.allowEmptyArrays && (leaf === '' || options.strictNullHandling && leaf === null) ? [] : [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;\n var index = parseInt(decodedRoot, 10);\n if (!options.parseArrays && decodedRoot === '') {\n obj = {\n 0: leaf\n };\n } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) {\n obj = [];\n obj[index] = leaf;\n } else if (decodedRoot !== '__proto__') {\n obj[decodedRoot] = leaf;\n }\n }\n leaf = obj;\n }\n return leaf;\n};\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, check strictDepth option for throw, else just add whatever is left\n\n if (segment) {\n if (options.strictDepth === true) {\n throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');\n }\n keys.push('[' + key.slice(segment.index) + ']');\n }\n return parseObject(keys, val, options, valuesParsed);\n};\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {\n throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;\n if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {\n throw new TypeError('The duplicates option must be either combine, first, or last');\n }\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n return {\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth,\n duplicates: duplicates,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n if (options.allowSparse === true) {\n return obj;\n }\n return utils.compact(obj);\n};","'use strict';\n\nrequire(\"core-js/modules/es.array.sort.js\");\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function pushToArray(arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\nvar toISO = Date.prototype.toISOString;\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n allowEmptyArrays: false,\n arrayFormat: 'indices',\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encodeDotInKeys: false,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' || typeof v === 'symbol' || typeof v === 'bigint';\n};\nvar sentinel = {};\nvar stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {\n var obj = object;\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n obj = '';\n }\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n var values = [];\n if (typeof obj === 'undefined') {\n return values;\n }\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{\n value: obj.length > 0 ? obj.join(',') || null : void undefined\n }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n var encodedPrefix = encodeDotInKeys ? prefix.replace(/\\./g, '%2E') : prefix;\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;\n if (allowEmptyArrays && isArray(obj) && obj.length === 0) {\n return adjustedPrefix + '[]';\n }\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n if (skipNulls && value === null) {\n continue;\n }\n var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\\./g, '%2E') : key;\n var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));\n }\n return values;\n};\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {\n throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n var arrayFormat;\n if (opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if ('indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = defaults.arrayFormat;\n }\n if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n arrayFormat: arrayFormat,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n commaRoundTrip: opts.commaRoundTrip,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n var objKeys;\n var filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n var keys = [];\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];\n var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(obj[key], key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));\n }\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n return joined.length > 0 ? prefix + joined : '';\n};","'use strict';\n\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar hexTable = function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n return array;\n}();\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n if (isArray(obj)) {\n var compacted = [];\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n item.obj[item.prop] = compacted;\n }\n }\n};\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n return obj;\n};\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n return target;\n }\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\nvar decode = function decode(str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\nvar limit = 1024;\n\n/* eslint operator-linebreak: [2, \"before\"] */\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n var out = '';\n for (var j = 0; j < string.length; j += limit) {\n var segment = string.length >= limit ? string.slice(j, j + limit) : string;\n var arr = [];\n for (var i = 0; i < segment.length; ++i) {\n var c = segment.charCodeAt(i);\n if (c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || c >= 0x30 && c <= 0x39 // 0-9\n || c >= 0x41 && c <= 0x5A // a-z\n || c >= 0x61 && c <= 0x7A // A-Z\n || format === formats.RFC1738 && (c === 0x28 || c === 0x29) // ( )\n ) {\n arr[arr.length] = segment.charAt(i);\n continue;\n }\n if (c < 0x80) {\n arr[arr.length] = hexTable[c];\n continue;\n }\n if (c < 0x800) {\n arr[arr.length] = hexTable[0xC0 | c >> 6] + hexTable[0x80 | c & 0x3F];\n continue;\n }\n if (c < 0xD800 || c >= 0xE000) {\n arr[arr.length] = hexTable[0xE0 | c >> 12] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | c & 0x3F];\n continue;\n }\n i += 1;\n c = 0x10000 + ((c & 0x3FF) << 10 | segment.charCodeAt(i) & 0x3FF);\n arr[arr.length] = hexTable[0xF0 | c >> 18] + hexTable[0x80 | c >> 12 & 0x3F] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | c & 0x3F];\n }\n out += arr.join('');\n }\n return out;\n};\nvar compact = function compact(value) {\n var queue = [{\n obj: {\n o: value\n },\n prop: 'o'\n }];\n var refs = [];\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({\n obj: obj,\n prop: key\n });\n refs.push(val);\n }\n }\n }\n compactQueue(queue);\n return value;\n};\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};","/*\n * Copyright Joyent, Inc. and other Node contributors.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * 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 permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n'use strict';\n\nvar punycode = require('punycode/');\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n/*\n * define these here so at least they only have to be\n * compiled once on the first module load.\n */\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,\n /*\n * RFC 2396: characters reserved for delimiting URLs.\n * We actually just auto-escape these.\n */\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n /*\n * Characters that are never ever allowed in a hostname.\n * Note that any invalid chars are also handled, but these\n * are the ones that are *expected* to be seen, so we fast-path\n * them.\n */\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n http: true,\n https: true,\n ftp: true,\n gopher: true,\n file: true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('qs');\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && typeof url === 'object' && url instanceof Url) {\n return url;\n }\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (typeof url !== 'string') {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n /*\n * Copy chrome, IE, opera backslash-handling behavior.\n * Back slashes before the query string get converted to forward slashes\n * See: https://code.google.com/p/chromium/issues/detail?id=25916\n */\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n var rest = url;\n\n /*\n * trim before proceeding.\n * This is to support parse stuff like \" http://foo.com \\n\"\n */\n rest = rest.trim();\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n /*\n * figure out if it's got a host\n * user@server is *always* interpreted as a hostname, and url\n * resolution will treat //foo/bar as host=foo,path=bar because that's\n * how the browser resolves relative URLs.\n */\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@/]+@[^@/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n /*\n * there's a hostname.\n * the first instance of /, ?, ;, or # ends the host.\n *\n * If there is an @ in the hostname, then non-host chars *are* allowed\n * to the left of the last @ sign, unless some host-ending character\n * comes *before* the @-sign.\n * URLs are obnoxious.\n *\n * ex:\n * http://a@b@c/ => user:a@b host:c\n * http://a@b?@c => user:a host:c path:/?@c\n */\n\n /*\n * v0.12 TODO(isaacs): This is not quite how Chrome does things.\n * Review our test case against browsers more comprehensively.\n */\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n /*\n * at this point, either we have an explicit point where the\n * auth portion cannot go past, or the last @ char is the decider.\n */\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n /*\n * atSign must be in auth portion.\n * http://a@b/c@d => host:b auth:a path:/c@d\n */\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n /*\n * Now we have a portion which is definitely the auth.\n * Pull that off.\n */\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n /*\n * we've indicated that there is a hostname,\n * so even if it's empty, it has to be present.\n */\n this.hostname = this.hostname || '';\n\n /*\n * if hostname begins with [ and ends with ]\n * assume that it's an IPv6 address.\n */\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) {\n continue;\n }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n /*\n * we replace non-ASCII char with a temporary placeholder\n * we need this to make sure size of hostname is not\n * broken by replacing non-ASCII by nothing\n */\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n if (!ipv6Hostname) {\n /*\n * IDNA Support: Returns a punycoded representation of \"domain\".\n * It only converts parts of the domain name that\n * have non-ASCII characters, i.e. it doesn't matter if\n * you call it with a domain that already is ASCII-only.\n */\n this.hostname = punycode.toASCII(this.hostname);\n }\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n /*\n * strip [ and ] from the hostname\n * the host field still retains them, though\n */\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n /*\n * now rest is set to the post-host stuff.\n * chop off any delim chars.\n */\n if (!unsafeProtocol[lowerProto]) {\n /*\n * First, make 100% sure that any \"autoEscape\" chars get\n * escaped, even if encodeURIComponent doesn't think they\n * need to be.\n */\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) {\n continue;\n }\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) {\n this.pathname = rest;\n }\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n // to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n /*\n * ensure it's an object, and not a string url.\n * If it's an obj, this is a no-op.\n * this way, you can call url_format() on strings\n * to clean up potentially wonky urls.\n */\n if (typeof obj === 'string') {\n obj = urlParse(obj);\n }\n if (!(obj instanceof Url)) {\n return Url.prototype.format.call(obj);\n }\n return obj.format();\n}\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\n query = querystring.stringify(this.query, {\n arrayFormat: 'repeat',\n addQueryPrefix: false\n });\n }\n var search = this.search || query && '?' + query || '';\n if (protocol && protocol.substr(-1) !== ':') {\n protocol += ':';\n }\n\n /*\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n * unless they had them to begin with.\n */\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n } else if (!host) {\n host = '';\n }\n if (hash && hash.charAt(0) !== '#') {\n hash = '#' + hash;\n }\n if (search && search.charAt(0) !== '?') {\n search = '?' + search;\n }\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n return protocol + host + pathname + search + hash;\n};\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\nfunction urlResolveObject(source, relative) {\n if (!source) {\n return relative;\n }\n return urlParse(source, false, true).resolveObject(relative);\n}\nUrl.prototype.resolveObject = function (relative) {\n if (typeof relative === 'string') {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n /*\n * hash is always overridden, no matter what.\n * even href=\"\" will remove it.\n */\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') {\n result[rkey] = relative[rkey];\n }\n }\n\n // urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.pathname = '/';\n result.path = result.pathname;\n }\n result.href = result.format();\n return result;\n }\n if (relative.protocol && relative.protocol !== result.protocol) {\n /*\n * if it's a known url protocol, then changing\n * the protocol does weird things\n * first, if it's not file:, then we MUST have a host,\n * and if there was a path\n * to begin with, then we MUST have a path.\n * if it is file:, then the host is dropped,\n * because that's known to be hostless.\n * anything else is assumed to be absolute.\n */\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift())) {}\n if (!relative.host) {\n relative.host = '';\n }\n if (!relative.hostname) {\n relative.hostname = '';\n }\n if (relPath[0] !== '') {\n relPath.unshift('');\n }\n if (relPath.length < 2) {\n relPath.unshift('');\n }\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname,\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n /*\n * if the url is a non-slashed url, then relative\n * links like ../.. should be able\n * to crawl up to the hostname, as well. This is strange.\n * result.protocol has already been set by now.\n * Later on, put the first path part into the host field.\n */\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') {\n srcPath[0] = result.host;\n } else {\n srcPath.unshift(result.host);\n }\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') {\n relPath[0] = relative.host;\n } else {\n relPath.unshift(relative.host);\n }\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n /*\n * it's relative\n * throw away the existing file, and take the new path instead.\n */\n if (!srcPath) {\n srcPath = [];\n }\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (relative.search != null) {\n /*\n * just pull out the search.\n * like href='?foo'.\n * Put this after the other two cases because it simplifies the booleans\n */\n if (psychotic) {\n result.host = srcPath.shift();\n result.hostname = result.host;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n // to support http.request\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n if (!srcPath.length) {\n /*\n * no path at all. easy.\n * we've already handled the other stuff above.\n */\n result.pathname = null;\n // to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n /*\n * if a url ENDs in . or .., then it must get a trailing slash.\n * however, if it ends in anything else non-slashy,\n * then it must NOT get a trailing slash.\n */\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\n /*\n * strip single dots, resolve double dots to parent dir\n * if the path tries to go above the root, `up` ends up > 0\n */\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') {\n srcPath.push('');\n }\n var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/';\n\n // put the host back\n if (psychotic) {\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n result.host = result.hostname;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n mustEndAbs = mustEndAbs || result.host && srcPath.length;\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n if (srcPath.length > 0) {\n result.pathname = srcPath.join('/');\n } else {\n result.pathname = null;\n result.path = null;\n }\n\n // to support request.http\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) {\n this.hostname = host;\n }\n};\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\nexports.Url = Url;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar logDeprecationNotice = function logDeprecationNotice(prop, replacement) {\n if (process.env.NODE_ENV === \"production\") {\n return;\n }\n\n console.log(\"\\n The \\\"\" + prop + \"\\\" prop is now deprecated and will be removed in the next major version\\n of \\\"gatsby-image\\\".\\n \");\n\n if (replacement) {\n console.log(\"Please use \" + replacement + \" instead of \\\"\" + prop + \"\\\".\");\n }\n}; // Handle legacy props during their deprecation phase\n\n\nvar convertProps = function convertProps(props) {\n var convertedProps = (0, _extends2.default)({}, props);\n var resolutions = convertedProps.resolutions,\n sizes = convertedProps.sizes,\n critical = convertedProps.critical;\n\n if (resolutions) {\n convertedProps.fixed = resolutions;\n logDeprecationNotice(\"resolutions\", \"the gatsby-image v2 prop \\\"fixed\\\"\");\n delete convertedProps.resolutions;\n }\n\n if (sizes) {\n convertedProps.fluid = sizes;\n logDeprecationNotice(\"sizes\", \"the gatsby-image v2 prop \\\"fluid\\\"\");\n delete convertedProps.sizes;\n }\n\n if (critical) {\n logDeprecationNotice(\"critical\", \"the native \\\"loading\\\" attribute\");\n convertedProps.loading = \"eager\";\n } // convert fluid & fixed to arrays so we only have to work with arrays\n\n\n if (convertedProps.fluid) {\n convertedProps.fluid = groupByMedia([].concat(convertedProps.fluid));\n }\n\n if (convertedProps.fixed) {\n convertedProps.fixed = groupByMedia([].concat(convertedProps.fixed));\n }\n\n return convertedProps;\n};\n/**\n * Checks if fluid or fixed are art-direction arrays.\n *\n * @param currentData {{media?: string}[]} The props to check for images.\n * @return {boolean}\n */\n\n\nvar hasArtDirectionSupport = function hasArtDirectionSupport(currentData) {\n return !!currentData && Array.isArray(currentData) && currentData.some(function (image) {\n return typeof image.media !== \"undefined\";\n });\n};\n/**\n * Tries to detect if a media query matches the current viewport.\n * @property media {{media?: string}} A media query string.\n * @return {boolean}\n */\n\n\nvar matchesMedia = function matchesMedia(_ref) {\n var media = _ref.media;\n return media ? isBrowser && !!window.matchMedia(media).matches : false;\n};\n/**\n * Find the source of an image to use as a key in the image cache.\n * Use `the first image in either `fixed` or `fluid`\n * @param {{fluid: {src: string, media?: string}[], fixed: {src: string, media?: string}[]}} args\n * @return {string?} Returns image src or undefined it not given.\n */\n\n\nvar getImageCacheKey = function getImageCacheKey(_ref2) {\n var fluid = _ref2.fluid,\n fixed = _ref2.fixed;\n var srcData = getCurrentSrcData(fluid || fixed || []);\n return srcData && srcData.src;\n};\n/**\n * Returns the current src - Preferably with art-direction support.\n * @param currentData {{media?: string}[], maxWidth?: Number, maxHeight?: Number} The fluid or fixed image array.\n * @return {{src: string, media?: string, maxWidth?: Number, maxHeight?: Number}}\n */\n\n\nvar getCurrentSrcData = function getCurrentSrcData(currentData) {\n if (isBrowser && hasArtDirectionSupport(currentData)) {\n // Do we have an image for the current Viewport?\n var foundMedia = currentData.findIndex(matchesMedia);\n\n if (foundMedia !== -1) {\n return currentData[foundMedia];\n } // No media matches, select first element without a media condition\n\n\n var noMedia = currentData.findIndex(function (image) {\n return typeof image.media === \"undefined\";\n });\n\n if (noMedia !== -1) {\n return currentData[noMedia];\n }\n } // Else return the first image.\n\n\n return currentData[0];\n}; // Cache if we've seen an image before so we don't bother with\n// lazy-loading & fading in on subsequent mounts.\n\n\nvar imageCache = Object.create({});\n\nvar inImageCache = function inImageCache(props) {\n var convertedProps = convertProps(props);\n var cacheKey = getImageCacheKey(convertedProps);\n return imageCache[cacheKey] || false;\n};\n\nvar activateCacheForImage = function activateCacheForImage(props) {\n var convertedProps = convertProps(props);\n var cacheKey = getImageCacheKey(convertedProps);\n\n if (cacheKey) {\n imageCache[cacheKey] = true;\n }\n}; // Native lazy-loading support: https://addyosmani.com/blog/lazy-loading/\n\n\nvar hasNativeLazyLoadSupport = typeof HTMLImageElement !== \"undefined\" && \"loading\" in HTMLImageElement.prototype;\nvar isBrowser = typeof window !== \"undefined\";\nvar hasIOSupport = isBrowser && window.IntersectionObserver;\nvar io;\nvar listeners = new WeakMap();\n\nfunction getIO() {\n if (typeof io === \"undefined\" && typeof window !== \"undefined\" && window.IntersectionObserver) {\n io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (listeners.has(entry.target)) {\n var cb = listeners.get(entry.target); // Edge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(entry.target);\n listeners.delete(entry.target);\n cb();\n }\n }\n });\n }, {\n rootMargin: \"200px\"\n });\n }\n\n return io;\n}\n\nfunction generateImageSources(imageVariants) {\n return imageVariants.map(function (_ref3) {\n var src = _ref3.src,\n srcSet = _ref3.srcSet,\n srcSetWebp = _ref3.srcSetWebp,\n media = _ref3.media,\n sizes = _ref3.sizes;\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {\n key: src\n }, srcSetWebp && /*#__PURE__*/_react.default.createElement(\"source\", {\n type: \"image/webp\",\n media: media,\n srcSet: srcSetWebp,\n sizes: sizes\n }), srcSet && /*#__PURE__*/_react.default.createElement(\"source\", {\n media: media,\n srcSet: srcSet,\n sizes: sizes\n }));\n });\n} // Return an array ordered by elements having a media prop, does not use\n// native sort, as a stable sort is not guaranteed by all browsers/versions\n\n\nfunction groupByMedia(imageVariants) {\n var withMedia = [];\n var without = [];\n imageVariants.forEach(function (variant) {\n return (variant.media ? withMedia : without).push(variant);\n });\n\n if (without.length > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"We've found \" + without.length + \" sources without a media property. They might be ignored by the browser, see: https://www.gatsbyjs.org/packages/gatsby-image/#art-directing-multiple-images\");\n }\n\n return [].concat(withMedia, without);\n}\n\nfunction generateTracedSVGSources(imageVariants) {\n return imageVariants.map(function (_ref4) {\n var src = _ref4.src,\n media = _ref4.media,\n tracedSVG = _ref4.tracedSVG;\n return /*#__PURE__*/_react.default.createElement(\"source\", {\n key: src,\n media: media,\n srcSet: tracedSVG\n });\n });\n}\n\nfunction generateBase64Sources(imageVariants) {\n return imageVariants.map(function (_ref5) {\n var src = _ref5.src,\n media = _ref5.media,\n base64 = _ref5.base64;\n return /*#__PURE__*/_react.default.createElement(\"source\", {\n key: src,\n media: media,\n srcSet: base64\n });\n });\n}\n\nfunction generateNoscriptSource(_ref6, isWebp) {\n var srcSet = _ref6.srcSet,\n srcSetWebp = _ref6.srcSetWebp,\n media = _ref6.media,\n sizes = _ref6.sizes;\n var src = isWebp ? srcSetWebp : srcSet;\n var mediaAttr = media ? \"media=\\\"\" + media + \"\\\" \" : \"\";\n var typeAttr = isWebp ? \"type='image/webp' \" : \"\";\n var sizesAttr = sizes ? \"sizes=\\\"\" + sizes + \"\\\" \" : \"\";\n return \"\";\n}\n\nfunction generateNoscriptSources(imageVariants) {\n return imageVariants.map(function (variant) {\n return (variant.srcSetWebp ? generateNoscriptSource(variant, true) : \"\") + generateNoscriptSource(variant);\n }).join(\"\");\n}\n\nvar listenToIntersections = function listenToIntersections(el, cb) {\n var observer = getIO();\n\n if (observer) {\n observer.observe(el);\n listeners.set(el, cb);\n }\n\n return function () {\n observer.unobserve(el);\n listeners.delete(el);\n };\n};\n\nvar noscriptImg = function noscriptImg(props) {\n // Check if prop exists before adding each attribute to the string output below to prevent\n // HTML validation issues caused by empty values like width=\"\" and height=\"\"\n var src = props.src ? \"src=\\\"\" + props.src + \"\\\" \" : \"src=\\\"\\\" \"; // required attribute\n\n var sizes = props.sizes ? \"sizes=\\\"\" + props.sizes + \"\\\" \" : \"\";\n var srcSet = props.srcSet ? \"srcset=\\\"\" + props.srcSet + \"\\\" \" : \"\";\n var title = props.title ? \"title=\\\"\" + props.title + \"\\\" \" : \"\";\n var alt = props.alt ? \"alt=\\\"\" + props.alt + \"\\\" \" : \"alt=\\\"\\\" \"; // required attribute\n\n var width = props.width ? \"width=\\\"\" + props.width + \"\\\" \" : \"\";\n var height = props.height ? \"height=\\\"\" + props.height + \"\\\" \" : \"\";\n var crossOrigin = props.crossOrigin ? \"crossorigin=\\\"\" + props.crossOrigin + \"\\\" \" : \"\";\n var loading = props.loading ? \"loading=\\\"\" + props.loading + \"\\\" \" : \"\";\n var draggable = props.draggable ? \"draggable=\\\"\" + props.draggable + \"\\\" \" : \"\";\n var sources = generateNoscriptSources(props.imageVariants);\n return \"\" + sources + \"\";\n}; // Earlier versions of gatsby-image during the 2.x cycle did not wrap\n// the `Img` component in a `picture` element. This maintains compatibility\n// until a breaking change can be introduced in the next major release\n\n\nvar Placeholder = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var src = props.src,\n imageVariants = props.imageVariants,\n generateSources = props.generateSources,\n spreadProps = props.spreadProps,\n ariaHidden = props.ariaHidden;\n\n var baseImage = /*#__PURE__*/_react.default.createElement(Img, (0, _extends2.default)({\n ref: ref,\n src: src\n }, spreadProps, {\n ariaHidden: ariaHidden\n }));\n\n return imageVariants.length > 1 ? /*#__PURE__*/_react.default.createElement(\"picture\", null, generateSources(imageVariants), baseImage) : baseImage;\n});\n\nvar Img = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var sizes = props.sizes,\n srcSet = props.srcSet,\n src = props.src,\n style = props.style,\n onLoad = props.onLoad,\n onError = props.onError,\n loading = props.loading,\n draggable = props.draggable,\n ariaHidden = props.ariaHidden,\n otherProps = (0, _objectWithoutPropertiesLoose2.default)(props, [\"sizes\", \"srcSet\", \"src\", \"style\", \"onLoad\", \"onError\", \"loading\", \"draggable\", \"ariaHidden\"]);\n return /*#__PURE__*/_react.default.createElement(\"img\", (0, _extends2.default)({\n \"aria-hidden\": ariaHidden,\n sizes: sizes,\n srcSet: srcSet,\n src: src\n }, otherProps, {\n onLoad: onLoad,\n onError: onError,\n ref: ref,\n loading: loading,\n draggable: draggable,\n style: (0, _extends2.default)({\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n objectPosition: \"center\"\n }, style)\n }));\n});\n\nImg.propTypes = {\n style: _propTypes.default.object,\n onError: _propTypes.default.func,\n onLoad: _propTypes.default.func\n};\n\nvar Image = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(Image, _React$Component);\n\n function Image(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // If this image has already been loaded before then we can assume it's\n // already in the browser cache so it's cheap to just show directly.\n\n _this.seenBefore = isBrowser && inImageCache(props);\n _this.isCritical = props.loading === \"eager\" || props.critical;\n _this.addNoScript = !(_this.isCritical && !props.fadeIn);\n _this.useIOSupport = !hasNativeLazyLoadSupport && hasIOSupport && !_this.isCritical && !_this.seenBefore;\n var isVisible = _this.isCritical || isBrowser && (hasNativeLazyLoadSupport || !_this.useIOSupport);\n _this.state = {\n isVisible: isVisible,\n imgLoaded: false,\n imgCached: false,\n fadeIn: !_this.seenBefore && props.fadeIn,\n isHydrated: false\n };\n _this.imageRef = /*#__PURE__*/_react.default.createRef();\n _this.placeholderRef = props.placeholderRef || /*#__PURE__*/_react.default.createRef();\n _this.handleImageLoaded = _this.handleImageLoaded.bind((0, _assertThisInitialized2.default)(_this));\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = Image.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.setState({\n isHydrated: isBrowser\n });\n\n if (this.state.isVisible && typeof this.props.onStartLoad === \"function\") {\n this.props.onStartLoad({\n wasCached: inImageCache(this.props)\n });\n }\n\n if (this.isCritical) {\n var img = this.imageRef.current;\n\n if (img && img.complete) {\n this.handleImageLoaded();\n }\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.cleanUpListeners) {\n this.cleanUpListeners();\n }\n } // Specific to IntersectionObserver based lazy-load support\n ;\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.useIOSupport && ref) {\n this.cleanUpListeners = listenToIntersections(ref, function () {\n var imageInCache = inImageCache(_this2.props);\n\n if (!_this2.state.isVisible && typeof _this2.props.onStartLoad === \"function\") {\n _this2.props.onStartLoad({\n wasCached: imageInCache\n });\n } // imgCached and imgLoaded must update after isVisible,\n // Once isVisible is true, imageRef becomes accessible, which imgCached needs access to.\n // imgLoaded and imgCached are in a 2nd setState call to be changed together,\n // avoiding initiating unnecessary animation frames from style changes.\n\n\n _this2.setState({\n isVisible: true\n }, function () {\n _this2.setState({\n imgLoaded: imageInCache,\n // `currentSrc` should be a string, but can be `undefined` in IE,\n // !! operator validates the value is not undefined/null/\"\"\n // for lazyloaded components this might be null\n // TODO fix imgCached behaviour as it's now false when it's lazyloaded\n imgCached: !!(_this2.imageRef.current && _this2.imageRef.current.currentSrc)\n });\n });\n });\n }\n };\n\n _proto.handleImageLoaded = function handleImageLoaded() {\n activateCacheForImage(this.props);\n this.setState({\n imgLoaded: true\n });\n\n if (this.props.onLoad) {\n this.props.onLoad();\n }\n };\n\n _proto.render = function render() {\n var _convertProps = convertProps(this.props),\n title = _convertProps.title,\n alt = _convertProps.alt,\n className = _convertProps.className,\n _convertProps$style = _convertProps.style,\n style = _convertProps$style === void 0 ? {} : _convertProps$style,\n _convertProps$imgStyl = _convertProps.imgStyle,\n imgStyle = _convertProps$imgStyl === void 0 ? {} : _convertProps$imgStyl,\n _convertProps$placeho = _convertProps.placeholderStyle,\n placeholderStyle = _convertProps$placeho === void 0 ? {} : _convertProps$placeho,\n placeholderClassName = _convertProps.placeholderClassName,\n fluid = _convertProps.fluid,\n fixed = _convertProps.fixed,\n backgroundColor = _convertProps.backgroundColor,\n durationFadeIn = _convertProps.durationFadeIn,\n Tag = _convertProps.Tag,\n itemProp = _convertProps.itemProp,\n loading = _convertProps.loading,\n draggable = _convertProps.draggable;\n\n var imageVariants = fluid || fixed; // Abort early if missing image data (#25371)\n\n if (!imageVariants) {\n return null;\n }\n\n var shouldReveal = this.state.fadeIn === false || this.state.imgLoaded;\n var shouldFadeIn = this.state.fadeIn === true && !this.state.imgCached;\n var imageStyle = (0, _extends2.default)({\n opacity: shouldReveal ? 1 : 0,\n transition: shouldFadeIn ? \"opacity \" + durationFadeIn + \"ms\" : \"none\"\n }, imgStyle);\n var bgColor = typeof backgroundColor === \"boolean\" ? \"lightgray\" : backgroundColor;\n var delayHideStyle = {\n transitionDelay: durationFadeIn + \"ms\"\n };\n var imagePlaceholderStyle = (0, _extends2.default)({\n opacity: this.state.imgLoaded ? 0 : 1\n }, shouldFadeIn && delayHideStyle, imgStyle, placeholderStyle);\n var placeholderImageProps = {\n title: title,\n alt: !this.state.isVisible ? alt : \"\",\n style: imagePlaceholderStyle,\n className: placeholderClassName,\n itemProp: itemProp\n }; // Initial client render state needs to match SSR until hydration finishes.\n // Once hydration completes, render again to update to the correct image.\n // `imageVariants` is always an Array type at this point due to `convertProps()`\n\n var image = !this.state.isHydrated ? imageVariants[0] : getCurrentSrcData(imageVariants);\n\n if (fluid) {\n return /*#__PURE__*/_react.default.createElement(Tag, {\n className: (className ? className : \"\") + \" gatsby-image-wrapper\",\n style: (0, _extends2.default)({\n position: \"relative\",\n overflow: \"hidden\",\n maxWidth: image.maxWidth ? image.maxWidth + \"px\" : null,\n maxHeight: image.maxHeight ? image.maxHeight + \"px\" : null\n }, style),\n ref: this.handleRef,\n key: \"fluid-\" + JSON.stringify(image.srcSet)\n }, /*#__PURE__*/_react.default.createElement(Tag, {\n \"aria-hidden\": true,\n style: {\n width: \"100%\",\n paddingBottom: 100 / image.aspectRatio + \"%\"\n }\n }), bgColor && /*#__PURE__*/_react.default.createElement(Tag, {\n \"aria-hidden\": true,\n title: title,\n style: (0, _extends2.default)({\n backgroundColor: bgColor,\n position: \"absolute\",\n top: 0,\n bottom: 0,\n opacity: !this.state.imgLoaded ? 1 : 0,\n right: 0,\n left: 0\n }, shouldFadeIn && delayHideStyle)\n }), image.base64 && /*#__PURE__*/_react.default.createElement(Placeholder, {\n ariaHidden: true,\n ref: this.placeholderRef,\n src: image.base64,\n spreadProps: placeholderImageProps,\n imageVariants: imageVariants,\n generateSources: generateBase64Sources\n }), image.tracedSVG && /*#__PURE__*/_react.default.createElement(Placeholder, {\n ariaHidden: true,\n ref: this.placeholderRef,\n src: image.tracedSVG,\n spreadProps: placeholderImageProps,\n imageVariants: imageVariants,\n generateSources: generateTracedSVGSources\n }), this.state.isVisible && /*#__PURE__*/_react.default.createElement(\"picture\", null, generateImageSources(imageVariants), /*#__PURE__*/_react.default.createElement(Img, {\n alt: alt,\n title: title,\n sizes: image.sizes,\n src: image.src,\n crossOrigin: this.props.crossOrigin,\n srcSet: image.srcSet,\n style: imageStyle,\n ref: this.imageRef,\n onLoad: this.handleImageLoaded,\n onError: this.props.onError,\n itemProp: itemProp,\n loading: loading,\n draggable: draggable\n })), this.addNoScript && /*#__PURE__*/_react.default.createElement(\"noscript\", {\n dangerouslySetInnerHTML: {\n __html: noscriptImg((0, _extends2.default)({\n alt: alt,\n title: title,\n loading: loading\n }, image, {\n imageVariants: imageVariants\n }))\n }\n }));\n }\n\n if (fixed) {\n var divStyle = (0, _extends2.default)({\n position: \"relative\",\n overflow: \"hidden\",\n display: \"inline-block\",\n width: image.width,\n height: image.height\n }, style);\n\n if (style.display === \"inherit\") {\n delete divStyle.display;\n }\n\n return /*#__PURE__*/_react.default.createElement(Tag, {\n className: (className ? className : \"\") + \" gatsby-image-wrapper\",\n style: divStyle,\n ref: this.handleRef,\n key: \"fixed-\" + JSON.stringify(image.srcSet)\n }, bgColor && /*#__PURE__*/_react.default.createElement(Tag, {\n \"aria-hidden\": true,\n title: title,\n style: (0, _extends2.default)({\n backgroundColor: bgColor,\n width: image.width,\n opacity: !this.state.imgLoaded ? 1 : 0,\n height: image.height\n }, shouldFadeIn && delayHideStyle)\n }), image.base64 && /*#__PURE__*/_react.default.createElement(Placeholder, {\n ariaHidden: true,\n ref: this.placeholderRef,\n src: image.base64,\n spreadProps: placeholderImageProps,\n imageVariants: imageVariants,\n generateSources: generateBase64Sources\n }), image.tracedSVG && /*#__PURE__*/_react.default.createElement(Placeholder, {\n ariaHidden: true,\n ref: this.placeholderRef,\n src: image.tracedSVG,\n spreadProps: placeholderImageProps,\n imageVariants: imageVariants,\n generateSources: generateTracedSVGSources\n }), this.state.isVisible && /*#__PURE__*/_react.default.createElement(\"picture\", null, generateImageSources(imageVariants), /*#__PURE__*/_react.default.createElement(Img, {\n alt: alt,\n title: title,\n width: image.width,\n height: image.height,\n sizes: image.sizes,\n src: image.src,\n crossOrigin: this.props.crossOrigin,\n srcSet: image.srcSet,\n style: imageStyle,\n ref: this.imageRef,\n onLoad: this.handleImageLoaded,\n onError: this.props.onError,\n itemProp: itemProp,\n loading: loading,\n draggable: draggable\n })), this.addNoScript && /*#__PURE__*/_react.default.createElement(\"noscript\", {\n dangerouslySetInnerHTML: {\n __html: noscriptImg((0, _extends2.default)({\n alt: alt,\n title: title,\n loading: loading\n }, image, {\n imageVariants: imageVariants\n }))\n }\n }));\n }\n\n return null;\n };\n\n return Image;\n}(_react.default.Component);\n\nImage.defaultProps = {\n fadeIn: true,\n durationFadeIn: 500,\n alt: \"\",\n Tag: \"div\",\n // We set it to `lazy` by default because it's best to default to a performant\n // setting and let the user \"opt out\" to `eager`\n loading: \"lazy\"\n};\n\nvar fixedObject = _propTypes.default.shape({\n width: _propTypes.default.number.isRequired,\n height: _propTypes.default.number.isRequired,\n src: _propTypes.default.string.isRequired,\n srcSet: _propTypes.default.string.isRequired,\n base64: _propTypes.default.string,\n tracedSVG: _propTypes.default.string,\n srcWebp: _propTypes.default.string,\n srcSetWebp: _propTypes.default.string,\n media: _propTypes.default.string\n});\n\nvar fluidObject = _propTypes.default.shape({\n aspectRatio: _propTypes.default.number.isRequired,\n src: _propTypes.default.string.isRequired,\n srcSet: _propTypes.default.string.isRequired,\n sizes: _propTypes.default.string.isRequired,\n base64: _propTypes.default.string,\n tracedSVG: _propTypes.default.string,\n srcWebp: _propTypes.default.string,\n srcSetWebp: _propTypes.default.string,\n media: _propTypes.default.string,\n maxWidth: _propTypes.default.number,\n maxHeight: _propTypes.default.number\n});\n\nfunction requireFixedOrFluid(originalPropTypes) {\n return function (props, propName, componentName) {\n var _PropTypes$checkPropT;\n\n if (!props.fixed && !props.fluid) {\n throw new Error(\"The prop `fluid` or `fixed` is marked as required in `\" + componentName + \"`, but their values are both `undefined`.\");\n }\n\n _propTypes.default.checkPropTypes((_PropTypes$checkPropT = {}, _PropTypes$checkPropT[propName] = originalPropTypes, _PropTypes$checkPropT), props, \"prop\", componentName);\n };\n} // If you modify these propTypes, please don't forget to update following files as well:\n// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/index.d.ts\n// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/README.md#gatsby-image-props\n// https://github.com/gatsbyjs/gatsby/blob/master/docs/docs/gatsby-image.md#gatsby-image-props\n\n\nImage.propTypes = {\n resolutions: fixedObject,\n sizes: fluidObject,\n fixed: requireFixedOrFluid(_propTypes.default.oneOfType([fixedObject, _propTypes.default.arrayOf(fixedObject)])),\n fluid: requireFixedOrFluid(_propTypes.default.oneOfType([fluidObject, _propTypes.default.arrayOf(fluidObject)])),\n fadeIn: _propTypes.default.bool,\n durationFadeIn: _propTypes.default.number,\n title: _propTypes.default.string,\n alt: _propTypes.default.string,\n className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),\n // Support Glamor's css prop.\n critical: _propTypes.default.bool,\n crossOrigin: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),\n style: _propTypes.default.object,\n imgStyle: _propTypes.default.object,\n placeholderStyle: _propTypes.default.object,\n placeholderClassName: _propTypes.default.string,\n backgroundColor: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),\n onLoad: _propTypes.default.func,\n onError: _propTypes.default.func,\n onStartLoad: _propTypes.default.func,\n Tag: _propTypes.default.string,\n itemProp: _propTypes.default.string,\n loading: _propTypes.default.oneOf([\"auto\", \"lazy\", \"eager\"]),\n draggable: _propTypes.default.bool\n};\nvar _default = Image;\nexports.default = _default;","const AWS_REGION = process.env.GATSBY_AWS_REGION\nexport const AWS_CONFIG = {\n Auth: {\n region: AWS_REGION,\n userPoolId: process.env.GATSBY_AWS_COGNITO_USER_POOL_ID,\n userPoolWebClientId: process.env.GATSBY_AWS_USER_POOL_WEB_CLIENT_ID,\n identityPoolId: process.env.GATSBY_AWS_IDENTITY_POOL_ID,\n },\n Storage: {\n AWSS3: {\n bucket: process.env.GATSBY_AWS_BUCKET, //REQUIRED - Amazon S3 bucket name\n region: AWS_REGION, //OPTIONAL - Amazon service region\n },\n },\n aws_appsync_graphqlEndpoint: process.env.GATSBY_AWS_APPSYNC_GRAPHQL_ENDPOINT,\n aws_appsync_region: AWS_REGION,\n aws_appsync_authenticationType:\n process.env.GATSBY_AWS_APPSYNC_AUTHENTICATION_TYPE,\n aws_appsync_apiKey: process.env.GATSBY_AWS_APPSYNC_API_KEY,\n aws_bucket: process.env.GATSBY_AWS_BUCKET,\n}\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { iAppButton } from \"../types\"\nimport { Button as RBButton } from \"react-bootstrap\"\n\nconst appButtonTWS =\n \"flex items-center px-3 py-2 sm:py-2 leading-none transition duration-100\"\nconst darkAppButtonTWS =\n \"bg-site-primary-dark text-white button-bg-site-blue-dark\"\nconst roundedAppButtonTWS = \"rounded-full\"\n\nconst makeNewClassName = (classNames: string[]) => classNames.join(\" \")\n\nconst TitleComponent: React.FC<{ title: string | undefined }> = ({ title }) => {\n if (title) return {title}\n return null\n}\n\nexport interface ButtonProps {\n readonly children: React.ReactNode\n readonly onClick?: Function\n readonly outline?: boolean\n readonly className?: string\n readonly style?: any\n readonly size?: string\n readonly light?: boolean\n readonly id?: string\n}\n\nconst StyledButton = styled((props: any) => )`\n border-radius: 20px;\n font-size: 14px;\n padding: 6px 16px 7px;\n font-family: \"Open Sans\";\n font-weight: 600;\n white-space: nowrap;\n`\n\nexport const Button: React.FC = ({\n children,\n onClick,\n outline,\n className,\n style,\n size,\n light,\n id,\n}) => {\n let variant\n if (outline) {\n variant = \"outline-primary\"\n }\n let btnStyle: any = {}\n if (size === \"lg\") {\n btnStyle.padding = \"12px 28px\"\n btnStyle.borderRadius = \"24px\"\n btnStyle.fontSize = \"16px\"\n }\n if (light) {\n btnStyle.color = \"#EC4D7B\"\n btnStyle.background = \"#058c9b\"\n btnStyle.border = \"none\"\n }\n return (\n \n {children}\n \n )\n}\n\nexport const AppButton: React.FC = ({\n title,\n Icon,\n className,\n onClick,\n iconOnRight,\n ...rest\n}) => {\n const newClassName = makeNewClassName([appButtonTWS, className || \"\"])\n const SeperatorDivComponent =\n Icon && title ?
: \n return (\n \n {!iconOnRight && Icon}\n {SeperatorDivComponent}\n \n {iconOnRight && SeperatorDivComponent}\n {iconOnRight && Icon}\n \n )\n}\n\nexport const applyClassName = (\n Button: React.FC,\n classNameToApply: string\n) => {\n return ({ className, ...rest }: iAppButton) => {\n const newClassName = makeNewClassName([className || \"\", classNameToApply])\n return