{"version":3,"file":"index.js","sources":["../../index.web-extension.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Core functionality shared by all clients\nexport * from './src';\n\nimport { ClientPlatform } from './src/core/util/version';\n\nimport { indexedDBLocalPersistence } from './src/platform_browser/persistence/indexed_db';\n\nimport {\n TotpMultiFactorGenerator,\n TotpSecret\n} from './src/mfa/assertions/totp';\nimport { FirebaseApp, getApp, _getProvider } from '@firebase/app';\nimport { Auth, connectAuthEmulator, initializeAuth } from './index.shared';\nimport { getDefaultEmulatorHost } from '@firebase/util';\nimport { registerAuth } from './src/core/auth/register';\n\n/**\n * Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.\n * If no instance exists, initializes an Auth instance with platform-specific default dependencies.\n *\n * @param app - The Firebase App.\n *\n * @public\n */\nfunction getAuth(app: FirebaseApp = getApp()): Auth {\n const provider = _getProvider(app, 'auth');\n\n if (provider.isInitialized()) {\n return provider.getImmediate();\n }\n\n const auth = initializeAuth(app, {\n persistence: [indexedDBLocalPersistence]\n });\n\n const authEmulatorHost = getDefaultEmulatorHost('auth');\n if (authEmulatorHost) {\n connectAuthEmulator(auth, `http://${authEmulatorHost}`);\n }\n\n return auth;\n}\n\nregisterAuth(ClientPlatform.WEB_EXTENSION);\n\nexport {\n indexedDBLocalPersistence,\n TotpMultiFactorGenerator,\n TotpSecret,\n getAuth\n};\n"],"names":["app","getApp","_getProvider","initializeAuth","indexedDBLocalPersistence","getDefaultEmulatorHost","connectAuthEmulator","registerAuth"],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAkBH;;;;;;;AAOG;AACH,SAAS,OAAO,CAACA,KAAmB,GAAAC,UAAM,EAAE,EAAA;IAC1C,MAAM,QAAQ,GAAGC,gBAAY,CAACF,KAAG,EAAE,MAAM,CAAC,CAAC;AAE3C,IAAA,IAAI,QAAQ,CAAC,aAAa,EAAE,EAAE;AAC5B,QAAA,OAAO,QAAQ,CAAC,YAAY,EAAE,CAAC;AAChC,KAAA;AAED,IAAA,MAAM,IAAI,GAAGG,uBAAc,CAACH,KAAG,EAAE;QAC/B,WAAW,EAAE,CAACI,kCAAyB,CAAC;AACzC,KAAA,CAAC,CAAC;AAEH,IAAA,MAAM,gBAAgB,GAAGC,2BAAsB,CAAC,MAAM,CAAC,CAAC;AACxD,IAAA,IAAI,gBAAgB,EAAE;AACpB,QAAAC,4BAAmB,CAAC,IAAI,EAAE,UAAU,gBAAgB,CAAA,CAAE,CAAC,CAAC;AACzD,KAAA;AAED,IAAA,OAAO,IAAI,CAAC;AACd,CAAC;AAEDC,qBAAY,mDAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}