@firebase/auth 1.10.8-canary.2d720995d → 1.10.8-canary.f11b55294

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/dist/browser-cjs/{index-6ce158e3.js → index-8213225f.js} +202 -212
  2. package/dist/browser-cjs/{index-6ce158e3.js.map → index-8213225f.js.map} +1 -1
  3. package/dist/browser-cjs/index.js +2 -1
  4. package/dist/browser-cjs/index.js.map +1 -1
  5. package/dist/browser-cjs/internal.js +18 -13
  6. package/dist/browser-cjs/internal.js.map +1 -1
  7. package/dist/cordova/index.js +3 -2
  8. package/dist/cordova/index.js.map +1 -1
  9. package/dist/cordova/internal.js +44 -37
  10. package/dist/cordova/internal.js.map +1 -1
  11. package/dist/cordova/{popup_redirect-cf21324f.js → popup_redirect-4521497d.js} +177 -189
  12. package/dist/cordova/{popup_redirect-cf21324f.js.map → popup_redirect-4521497d.js.map} +1 -1
  13. package/dist/{esm/index-04a6cf1f.js → esm2017/index-01816cb6.js} +202 -212
  14. package/dist/{esm/index-04a6cf1f.js.map → esm2017/index-01816cb6.js.map} +1 -1
  15. package/dist/{esm → esm2017}/index.js +2 -1
  16. package/dist/{esm → esm2017}/index.js.map +1 -1
  17. package/dist/{esm → esm2017}/internal.js +19 -14
  18. package/dist/{esm → esm2017}/internal.js.map +1 -1
  19. package/dist/index.webworker.js +148 -169
  20. package/dist/index.webworker.js.map +1 -1
  21. package/dist/node/index.js +2 -1
  22. package/dist/node/index.js.map +1 -1
  23. package/dist/node/internal.js +22 -16
  24. package/dist/node/internal.js.map +1 -1
  25. package/dist/node/{totp-c876705c.js → totp-a8a94eeb.js} +144 -165
  26. package/dist/{node-esm/totp-5c32046f.js.map → node/totp-a8a94eeb.js.map} +1 -1
  27. package/dist/node-esm/index.js +2 -1
  28. package/dist/node-esm/index.js.map +1 -1
  29. package/dist/node-esm/internal.js +23 -17
  30. package/dist/node-esm/internal.js.map +1 -1
  31. package/dist/node-esm/{totp-5c32046f.js → totp-eeec07b6.js} +144 -165
  32. package/dist/{node/totp-c876705c.js.map → node-esm/totp-eeec07b6.js.map} +1 -1
  33. package/dist/rn/{index-f31531e2.js → index-bb0cd5b2.js} +168 -183
  34. package/dist/rn/{index-f31531e2.js.map → index-bb0cd5b2.js.map} +1 -1
  35. package/dist/rn/index.js +4 -3
  36. package/dist/rn/index.js.map +1 -1
  37. package/dist/rn/internal.js +52 -42
  38. package/dist/rn/internal.js.map +1 -1
  39. package/dist/web-extension-cjs/index.js +2 -1
  40. package/dist/web-extension-cjs/index.js.map +1 -1
  41. package/dist/web-extension-cjs/internal.js +58 -48
  42. package/dist/web-extension-cjs/internal.js.map +1 -1
  43. package/dist/web-extension-cjs/{register-00faf08f.js → register-e0354297.js} +162 -177
  44. package/dist/{web-extension-esm/register-c354ab3e.js.map → web-extension-cjs/register-e0354297.js.map} +1 -1
  45. package/dist/{web-extension-esm → web-extension-esm2017}/index.js +3 -2
  46. package/dist/{web-extension-esm → web-extension-esm2017}/index.js.map +1 -1
  47. package/dist/{web-extension-esm → web-extension-esm2017}/internal.js +59 -49
  48. package/dist/{web-extension-esm → web-extension-esm2017}/internal.js.map +1 -1
  49. package/dist/{web-extension-esm/register-c354ab3e.js → web-extension-esm2017/register-f15e4ec1.js} +162 -177
  50. package/dist/{web-extension-cjs/register-00faf08f.js.map → web-extension-esm2017/register-f15e4ec1.js.map} +1 -1
  51. package/internal/package.json +3 -3
  52. package/package.json +18 -18
  53. package/web-extension/package.json +3 -3
  54. /package/dist/{esm → esm2017}/index.cordova.d.ts +0 -0
  55. /package/dist/{esm → esm2017}/index.d.ts +0 -0
  56. /package/dist/{esm → esm2017}/index.doc.d.ts +0 -0
  57. /package/dist/{esm → esm2017}/index.node.d.ts +0 -0
  58. /package/dist/{esm → esm2017}/index.rn.d.ts +0 -0
  59. /package/dist/{esm → esm2017}/index.shared.d.ts +0 -0
  60. /package/dist/{esm → esm2017}/index.web-extension.d.ts +0 -0
  61. /package/dist/{esm → esm2017}/index.webworker.d.ts +0 -0
  62. /package/dist/{esm → esm2017}/internal/index.d.ts +0 -0
  63. /package/dist/{esm → esm2017}/scripts/run_node_tests.d.ts +0 -0
  64. /package/dist/{esm → esm2017}/src/api/account_management/account.d.ts +0 -0
  65. /package/dist/{esm → esm2017}/src/api/account_management/email_and_password.d.ts +0 -0
  66. /package/dist/{esm → esm2017}/src/api/account_management/mfa.d.ts +0 -0
  67. /package/dist/{esm → esm2017}/src/api/account_management/profile.d.ts +0 -0
  68. /package/dist/{esm → esm2017}/src/api/authentication/create_auth_uri.d.ts +0 -0
  69. /package/dist/{esm → esm2017}/src/api/authentication/custom_token.d.ts +0 -0
  70. /package/dist/{esm → esm2017}/src/api/authentication/email_and_password.d.ts +0 -0
  71. /package/dist/{esm → esm2017}/src/api/authentication/email_link.d.ts +0 -0
  72. /package/dist/{esm → esm2017}/src/api/authentication/idp.d.ts +0 -0
  73. /package/dist/{esm → esm2017}/src/api/authentication/mfa.d.ts +0 -0
  74. /package/dist/{esm → esm2017}/src/api/authentication/recaptcha.d.ts +0 -0
  75. /package/dist/{esm → esm2017}/src/api/authentication/sign_up.d.ts +0 -0
  76. /package/dist/{esm → esm2017}/src/api/authentication/sms.d.ts +0 -0
  77. /package/dist/{esm → esm2017}/src/api/authentication/token.d.ts +0 -0
  78. /package/dist/{esm → esm2017}/src/api/errors.d.ts +0 -0
  79. /package/dist/{esm → esm2017}/src/api/index.d.ts +0 -0
  80. /package/dist/{esm → esm2017}/src/api/password_policy/get_password_policy.d.ts +0 -0
  81. /package/dist/{esm → esm2017}/src/api/project_config/get_project_config.d.ts +0 -0
  82. /package/dist/{esm → esm2017}/src/core/action_code_url.d.ts +0 -0
  83. /package/dist/{esm → esm2017}/src/core/auth/auth_event_manager.d.ts +0 -0
  84. /package/dist/{esm → esm2017}/src/core/auth/auth_impl.d.ts +0 -0
  85. /package/dist/{esm → esm2017}/src/core/auth/emulator.d.ts +0 -0
  86. /package/dist/{esm → esm2017}/src/core/auth/firebase_internal.d.ts +0 -0
  87. /package/dist/{esm → esm2017}/src/core/auth/initialize.d.ts +0 -0
  88. /package/dist/{esm → esm2017}/src/core/auth/middleware.d.ts +0 -0
  89. /package/dist/{esm → esm2017}/src/core/auth/password_policy_impl.d.ts +0 -0
  90. /package/dist/{esm → esm2017}/src/core/auth/register.d.ts +0 -0
  91. /package/dist/{esm → esm2017}/src/core/credentials/auth_credential.d.ts +0 -0
  92. /package/dist/{esm → esm2017}/src/core/credentials/email.d.ts +0 -0
  93. /package/dist/{esm → esm2017}/src/core/credentials/index.d.ts +0 -0
  94. /package/dist/{esm → esm2017}/src/core/credentials/oauth.d.ts +0 -0
  95. /package/dist/{esm → esm2017}/src/core/credentials/phone.d.ts +0 -0
  96. /package/dist/{esm → esm2017}/src/core/credentials/saml.d.ts +0 -0
  97. /package/dist/{esm → esm2017}/src/core/errors.d.ts +0 -0
  98. /package/dist/{esm → esm2017}/src/core/index.d.ts +0 -0
  99. /package/dist/{esm → esm2017}/src/core/persistence/in_memory.d.ts +0 -0
  100. /package/dist/{esm → esm2017}/src/core/persistence/index.d.ts +0 -0
  101. /package/dist/{esm → esm2017}/src/core/persistence/persistence_user_manager.d.ts +0 -0
  102. /package/dist/{esm → esm2017}/src/core/providers/email.d.ts +0 -0
  103. /package/dist/{esm → esm2017}/src/core/providers/facebook.d.ts +0 -0
  104. /package/dist/{esm → esm2017}/src/core/providers/federated.d.ts +0 -0
  105. /package/dist/{esm → esm2017}/src/core/providers/github.d.ts +0 -0
  106. /package/dist/{esm → esm2017}/src/core/providers/google.d.ts +0 -0
  107. /package/dist/{esm → esm2017}/src/core/providers/oauth.d.ts +0 -0
  108. /package/dist/{esm → esm2017}/src/core/providers/saml.d.ts +0 -0
  109. /package/dist/{esm → esm2017}/src/core/providers/twitter.d.ts +0 -0
  110. /package/dist/{esm → esm2017}/src/core/strategies/abstract_popup_redirect_operation.d.ts +0 -0
  111. /package/dist/{esm → esm2017}/src/core/strategies/action_code_settings.d.ts +0 -0
  112. /package/dist/{esm → esm2017}/src/core/strategies/anonymous.d.ts +0 -0
  113. /package/dist/{esm → esm2017}/src/core/strategies/credential.d.ts +0 -0
  114. /package/dist/{esm → esm2017}/src/core/strategies/custom_token.d.ts +0 -0
  115. /package/dist/{esm → esm2017}/src/core/strategies/email.d.ts +0 -0
  116. /package/dist/{esm → esm2017}/src/core/strategies/email_and_password.d.ts +0 -0
  117. /package/dist/{esm → esm2017}/src/core/strategies/email_link.d.ts +0 -0
  118. /package/dist/{esm → esm2017}/src/core/strategies/idp.d.ts +0 -0
  119. /package/dist/{esm → esm2017}/src/core/strategies/redirect.d.ts +0 -0
  120. /package/dist/{esm → esm2017}/src/core/user/account_info.d.ts +0 -0
  121. /package/dist/{esm → esm2017}/src/core/user/additional_user_info.d.ts +0 -0
  122. /package/dist/{esm → esm2017}/src/core/user/id_token_result.d.ts +0 -0
  123. /package/dist/{esm → esm2017}/src/core/user/invalidation.d.ts +0 -0
  124. /package/dist/{esm → esm2017}/src/core/user/link_unlink.d.ts +0 -0
  125. /package/dist/{esm → esm2017}/src/core/user/proactive_refresh.d.ts +0 -0
  126. /package/dist/{esm → esm2017}/src/core/user/reauthenticate.d.ts +0 -0
  127. /package/dist/{esm → esm2017}/src/core/user/reload.d.ts +0 -0
  128. /package/dist/{esm → esm2017}/src/core/user/token_manager.d.ts +0 -0
  129. /package/dist/{esm → esm2017}/src/core/user/user_credential_impl.d.ts +0 -0
  130. /package/dist/{esm → esm2017}/src/core/user/user_impl.d.ts +0 -0
  131. /package/dist/{esm → esm2017}/src/core/user/user_metadata.d.ts +0 -0
  132. /package/dist/{esm → esm2017}/src/core/util/assert.d.ts +0 -0
  133. /package/dist/{esm → esm2017}/src/core/util/browser.d.ts +0 -0
  134. /package/dist/{esm → esm2017}/src/core/util/delay.d.ts +0 -0
  135. /package/dist/{esm → esm2017}/src/core/util/emulator.d.ts +0 -0
  136. /package/dist/{esm → esm2017}/src/core/util/event_id.d.ts +0 -0
  137. /package/dist/{esm → esm2017}/src/core/util/fetch_provider.d.ts +0 -0
  138. /package/dist/{esm → esm2017}/src/core/util/handler.d.ts +0 -0
  139. /package/dist/{esm → esm2017}/src/core/util/instantiator.d.ts +0 -0
  140. /package/dist/{esm → esm2017}/src/core/util/location.d.ts +0 -0
  141. /package/dist/{esm → esm2017}/src/core/util/log.d.ts +0 -0
  142. /package/dist/{esm → esm2017}/src/core/util/navigator.d.ts +0 -0
  143. /package/dist/{esm → esm2017}/src/core/util/providers.d.ts +0 -0
  144. /package/dist/{esm → esm2017}/src/core/util/resolver.d.ts +0 -0
  145. /package/dist/{esm → esm2017}/src/core/util/time.d.ts +0 -0
  146. /package/dist/{esm → esm2017}/src/core/util/validate_origin.d.ts +0 -0
  147. /package/dist/{esm → esm2017}/src/core/util/version.d.ts +0 -0
  148. /package/dist/{esm → esm2017}/src/index.d.ts +0 -0
  149. /package/dist/{esm → esm2017}/src/mfa/assertions/totp.d.ts +0 -0
  150. /package/dist/{esm → esm2017}/src/mfa/index.d.ts +0 -0
  151. /package/dist/{esm → esm2017}/src/mfa/mfa_assertion.d.ts +0 -0
  152. /package/dist/{esm → esm2017}/src/mfa/mfa_error.d.ts +0 -0
  153. /package/dist/{esm → esm2017}/src/mfa/mfa_info.d.ts +0 -0
  154. /package/dist/{esm → esm2017}/src/mfa/mfa_resolver.d.ts +0 -0
  155. /package/dist/{esm → esm2017}/src/mfa/mfa_session.d.ts +0 -0
  156. /package/dist/{esm → esm2017}/src/mfa/mfa_user.d.ts +0 -0
  157. /package/dist/{esm → esm2017}/src/model/application_verifier.d.ts +0 -0
  158. /package/dist/{esm → esm2017}/src/model/auth.d.ts +0 -0
  159. /package/dist/{esm → esm2017}/src/model/enum_maps.d.ts +0 -0
  160. /package/dist/{esm → esm2017}/src/model/enums.d.ts +0 -0
  161. /package/dist/{esm → esm2017}/src/model/id_token.d.ts +0 -0
  162. /package/dist/{esm → esm2017}/src/model/password_policy.d.ts +0 -0
  163. /package/dist/{esm → esm2017}/src/model/popup_redirect.d.ts +0 -0
  164. /package/dist/{esm → esm2017}/src/model/public_types.d.ts +0 -0
  165. /package/dist/{esm → esm2017}/src/model/user.d.ts +0 -0
  166. /package/dist/{esm → esm2017}/src/platform_browser/auth_window.d.ts +0 -0
  167. /package/dist/{esm → esm2017}/src/platform_browser/iframe/gapi.d.ts +0 -0
  168. /package/dist/{esm → esm2017}/src/platform_browser/iframe/gapi.iframes.d.ts +0 -0
  169. /package/dist/{esm → esm2017}/src/platform_browser/iframe/iframe.d.ts +0 -0
  170. /package/dist/{esm → esm2017}/src/platform_browser/index.d.ts +0 -0
  171. /package/dist/{esm → esm2017}/src/platform_browser/load_js.d.ts +0 -0
  172. /package/dist/{esm → esm2017}/src/platform_browser/messagechannel/index.d.ts +0 -0
  173. /package/dist/{esm → esm2017}/src/platform_browser/messagechannel/promise.d.ts +0 -0
  174. /package/dist/{esm → esm2017}/src/platform_browser/messagechannel/receiver.d.ts +0 -0
  175. /package/dist/{esm → esm2017}/src/platform_browser/messagechannel/sender.d.ts +0 -0
  176. /package/dist/{esm → esm2017}/src/platform_browser/mfa/assertions/phone.d.ts +0 -0
  177. /package/dist/{esm → esm2017}/src/platform_browser/persistence/browser.d.ts +0 -0
  178. /package/dist/{esm → esm2017}/src/platform_browser/persistence/cookie_storage.d.ts +0 -0
  179. /package/dist/{esm → esm2017}/src/platform_browser/persistence/indexed_db.d.ts +0 -0
  180. /package/dist/{esm → esm2017}/src/platform_browser/persistence/local_storage.d.ts +0 -0
  181. /package/dist/{esm → esm2017}/src/platform_browser/persistence/session_storage.d.ts +0 -0
  182. /package/dist/{esm → esm2017}/src/platform_browser/popup_redirect.d.ts +0 -0
  183. /package/dist/{esm → esm2017}/src/platform_browser/providers/phone.d.ts +0 -0
  184. /package/dist/{esm → esm2017}/src/platform_browser/recaptcha/recaptcha.d.ts +0 -0
  185. /package/dist/{esm → esm2017}/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +0 -0
  186. /package/dist/{esm → esm2017}/src/platform_browser/recaptcha/recaptcha_loader.d.ts +0 -0
  187. /package/dist/{esm → esm2017}/src/platform_browser/recaptcha/recaptcha_mock.d.ts +0 -0
  188. /package/dist/{esm → esm2017}/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +0 -0
  189. /package/dist/{esm → esm2017}/src/platform_browser/strategies/phone.d.ts +0 -0
  190. /package/dist/{esm → esm2017}/src/platform_browser/strategies/popup.d.ts +0 -0
  191. /package/dist/{esm → esm2017}/src/platform_browser/strategies/redirect.d.ts +0 -0
  192. /package/dist/{esm → esm2017}/src/platform_browser/util/popup.d.ts +0 -0
  193. /package/dist/{esm → esm2017}/src/platform_browser/util/worker.d.ts +0 -0
  194. /package/dist/{esm → esm2017}/src/platform_cordova/plugins.d.ts +0 -0
  195. /package/dist/{esm → esm2017}/src/platform_cordova/popup_redirect/events.d.ts +0 -0
  196. /package/dist/{esm → esm2017}/src/platform_cordova/popup_redirect/popup_redirect.d.ts +0 -0
  197. /package/dist/{esm → esm2017}/src/platform_cordova/popup_redirect/utils.d.ts +0 -0
  198. /package/dist/{esm → esm2017}/src/platform_cordova/strategies/redirect.d.ts +0 -0
  199. /package/dist/{esm → esm2017}/src/platform_node/index.d.ts +0 -0
  200. /package/dist/{esm → esm2017}/src/platform_react_native/persistence/react_native.d.ts +0 -0
  201. /package/dist/{esm → esm2017}/test/helpers/api/helper.d.ts +0 -0
  202. /package/dist/{esm → esm2017}/test/helpers/delay.d.ts +0 -0
  203. /package/dist/{esm → esm2017}/test/helpers/erroring_unavailable_persistence.d.ts +0 -0
  204. /package/dist/{esm → esm2017}/test/helpers/fake_service_worker.d.ts +0 -0
  205. /package/dist/{esm → esm2017}/test/helpers/id_token_response.d.ts +0 -0
  206. /package/dist/{esm → esm2017}/test/helpers/iframe_event.d.ts +0 -0
  207. /package/dist/{esm → esm2017}/test/helpers/integration/emulator_rest_helpers.d.ts +0 -0
  208. /package/dist/{esm → esm2017}/test/helpers/integration/helpers.d.ts +0 -0
  209. /package/dist/{esm → esm2017}/test/helpers/integration/settings.d.ts +0 -0
  210. /package/dist/{esm → esm2017}/test/helpers/jwt.d.ts +0 -0
  211. /package/dist/{esm → esm2017}/test/helpers/mock_auth.d.ts +0 -0
  212. /package/dist/{esm → esm2017}/test/helpers/mock_auth_credential.d.ts +0 -0
  213. /package/dist/{esm → esm2017}/test/helpers/mock_fetch.d.ts +0 -0
  214. /package/dist/{esm → esm2017}/test/helpers/mock_popup_redirect_resolver.d.ts +0 -0
  215. /package/dist/{esm → esm2017}/test/helpers/redirect_persistence.d.ts +0 -0
  216. /package/dist/{esm → esm2017}/test/helpers/timeout_stub.d.ts +0 -0
  217. /package/dist/{esm → esm2017}/test/integration/flows/middleware_test_generator.d.ts +0 -0
  218. /package/dist/{esm → esm2017}/test/integration/webdriver/util/auth_driver.d.ts +0 -0
  219. /package/dist/{esm → esm2017}/test/integration/webdriver/util/functions.d.ts +0 -0
  220. /package/dist/{esm → esm2017}/test/integration/webdriver/util/idp_page.d.ts +0 -0
  221. /package/dist/{esm → esm2017}/test/integration/webdriver/util/js_load_condition.d.ts +0 -0
  222. /package/dist/{esm → esm2017}/test/integration/webdriver/util/test_runner.d.ts +0 -0
  223. /package/dist/{esm → esm2017}/test/integration/webdriver/util/test_server.d.ts +0 -0
  224. /package/dist/{esm → esm2017}/test/integration/webdriver/util/ui_page.d.ts +0 -0
  225. /package/dist/{web-extension-esm → web-extension-esm2017}/auth-web-extension-public.d.ts +0 -0
  226. /package/dist/{web-extension-esm → web-extension-esm2017}/auth-web-extension.d.ts +0 -0
  227. /package/dist/{web-extension-esm → web-extension-esm2017}/index.cordova.d.ts +0 -0
  228. /package/dist/{web-extension-esm → web-extension-esm2017}/index.d.ts +0 -0
  229. /package/dist/{web-extension-esm → web-extension-esm2017}/index.doc.d.ts +0 -0
  230. /package/dist/{web-extension-esm → web-extension-esm2017}/index.node.d.ts +0 -0
  231. /package/dist/{web-extension-esm → web-extension-esm2017}/index.rn.d.ts +0 -0
  232. /package/dist/{web-extension-esm → web-extension-esm2017}/index.shared.d.ts +0 -0
  233. /package/dist/{web-extension-esm → web-extension-esm2017}/index.web-extension.d.ts +0 -0
  234. /package/dist/{web-extension-esm → web-extension-esm2017}/index.webworker.d.ts +0 -0
  235. /package/dist/{web-extension-esm → web-extension-esm2017}/internal/index.d.ts +0 -0
  236. /package/dist/{web-extension-esm → web-extension-esm2017}/package.json +0 -0
  237. /package/dist/{web-extension-esm → web-extension-esm2017}/scripts/run_node_tests.d.ts +0 -0
  238. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/account_management/account.d.ts +0 -0
  239. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/account_management/email_and_password.d.ts +0 -0
  240. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/account_management/mfa.d.ts +0 -0
  241. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/account_management/profile.d.ts +0 -0
  242. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/create_auth_uri.d.ts +0 -0
  243. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/custom_token.d.ts +0 -0
  244. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/email_and_password.d.ts +0 -0
  245. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/email_link.d.ts +0 -0
  246. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/idp.d.ts +0 -0
  247. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/mfa.d.ts +0 -0
  248. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/recaptcha.d.ts +0 -0
  249. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/sign_up.d.ts +0 -0
  250. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/sms.d.ts +0 -0
  251. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/authentication/token.d.ts +0 -0
  252. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/errors.d.ts +0 -0
  253. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/index.d.ts +0 -0
  254. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/password_policy/get_password_policy.d.ts +0 -0
  255. /package/dist/{web-extension-esm → web-extension-esm2017}/src/api/project_config/get_project_config.d.ts +0 -0
  256. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/action_code_url.d.ts +0 -0
  257. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/auth_event_manager.d.ts +0 -0
  258. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/auth_impl.d.ts +0 -0
  259. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/emulator.d.ts +0 -0
  260. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/firebase_internal.d.ts +0 -0
  261. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/initialize.d.ts +0 -0
  262. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/middleware.d.ts +0 -0
  263. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/password_policy_impl.d.ts +0 -0
  264. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/auth/register.d.ts +0 -0
  265. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/credentials/auth_credential.d.ts +0 -0
  266. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/credentials/email.d.ts +0 -0
  267. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/credentials/index.d.ts +0 -0
  268. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/credentials/oauth.d.ts +0 -0
  269. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/credentials/phone.d.ts +0 -0
  270. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/credentials/saml.d.ts +0 -0
  271. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/errors.d.ts +0 -0
  272. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/index.d.ts +0 -0
  273. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/persistence/in_memory.d.ts +0 -0
  274. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/persistence/index.d.ts +0 -0
  275. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/persistence/persistence_user_manager.d.ts +0 -0
  276. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/email.d.ts +0 -0
  277. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/facebook.d.ts +0 -0
  278. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/federated.d.ts +0 -0
  279. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/github.d.ts +0 -0
  280. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/google.d.ts +0 -0
  281. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/oauth.d.ts +0 -0
  282. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/saml.d.ts +0 -0
  283. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/providers/twitter.d.ts +0 -0
  284. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/abstract_popup_redirect_operation.d.ts +0 -0
  285. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/action_code_settings.d.ts +0 -0
  286. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/anonymous.d.ts +0 -0
  287. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/credential.d.ts +0 -0
  288. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/custom_token.d.ts +0 -0
  289. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/email.d.ts +0 -0
  290. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/email_and_password.d.ts +0 -0
  291. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/email_link.d.ts +0 -0
  292. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/idp.d.ts +0 -0
  293. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/strategies/redirect.d.ts +0 -0
  294. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/account_info.d.ts +0 -0
  295. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/additional_user_info.d.ts +0 -0
  296. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/id_token_result.d.ts +0 -0
  297. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/invalidation.d.ts +0 -0
  298. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/link_unlink.d.ts +0 -0
  299. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/proactive_refresh.d.ts +0 -0
  300. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/reauthenticate.d.ts +0 -0
  301. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/reload.d.ts +0 -0
  302. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/token_manager.d.ts +0 -0
  303. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/user_credential_impl.d.ts +0 -0
  304. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/user_impl.d.ts +0 -0
  305. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/user/user_metadata.d.ts +0 -0
  306. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/assert.d.ts +0 -0
  307. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/browser.d.ts +0 -0
  308. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/delay.d.ts +0 -0
  309. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/emulator.d.ts +0 -0
  310. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/event_id.d.ts +0 -0
  311. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/fetch_provider.d.ts +0 -0
  312. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/handler.d.ts +0 -0
  313. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/instantiator.d.ts +0 -0
  314. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/location.d.ts +0 -0
  315. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/log.d.ts +0 -0
  316. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/navigator.d.ts +0 -0
  317. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/providers.d.ts +0 -0
  318. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/resolver.d.ts +0 -0
  319. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/time.d.ts +0 -0
  320. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/validate_origin.d.ts +0 -0
  321. /package/dist/{web-extension-esm → web-extension-esm2017}/src/core/util/version.d.ts +0 -0
  322. /package/dist/{web-extension-esm → web-extension-esm2017}/src/index.d.ts +0 -0
  323. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/assertions/totp.d.ts +0 -0
  324. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/index.d.ts +0 -0
  325. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/mfa_assertion.d.ts +0 -0
  326. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/mfa_error.d.ts +0 -0
  327. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/mfa_info.d.ts +0 -0
  328. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/mfa_resolver.d.ts +0 -0
  329. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/mfa_session.d.ts +0 -0
  330. /package/dist/{web-extension-esm → web-extension-esm2017}/src/mfa/mfa_user.d.ts +0 -0
  331. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/application_verifier.d.ts +0 -0
  332. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/auth.d.ts +0 -0
  333. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/enum_maps.d.ts +0 -0
  334. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/enums.d.ts +0 -0
  335. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/id_token.d.ts +0 -0
  336. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/password_policy.d.ts +0 -0
  337. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/popup_redirect.d.ts +0 -0
  338. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/public_types.d.ts +0 -0
  339. /package/dist/{web-extension-esm → web-extension-esm2017}/src/model/user.d.ts +0 -0
  340. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/auth_window.d.ts +0 -0
  341. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/iframe/gapi.d.ts +0 -0
  342. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/iframe/gapi.iframes.d.ts +0 -0
  343. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/iframe/iframe.d.ts +0 -0
  344. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/index.d.ts +0 -0
  345. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/load_js.d.ts +0 -0
  346. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/messagechannel/index.d.ts +0 -0
  347. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/messagechannel/promise.d.ts +0 -0
  348. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/messagechannel/receiver.d.ts +0 -0
  349. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/messagechannel/sender.d.ts +0 -0
  350. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/mfa/assertions/phone.d.ts +0 -0
  351. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/persistence/browser.d.ts +0 -0
  352. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/persistence/cookie_storage.d.ts +0 -0
  353. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/persistence/indexed_db.d.ts +0 -0
  354. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/persistence/local_storage.d.ts +0 -0
  355. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/persistence/session_storage.d.ts +0 -0
  356. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/popup_redirect.d.ts +0 -0
  357. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/providers/phone.d.ts +0 -0
  358. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/recaptcha/recaptcha.d.ts +0 -0
  359. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +0 -0
  360. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/recaptcha/recaptcha_loader.d.ts +0 -0
  361. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/recaptcha/recaptcha_mock.d.ts +0 -0
  362. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/recaptcha/recaptcha_verifier.d.ts +0 -0
  363. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/strategies/phone.d.ts +0 -0
  364. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/strategies/popup.d.ts +0 -0
  365. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/strategies/redirect.d.ts +0 -0
  366. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/util/popup.d.ts +0 -0
  367. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_browser/util/worker.d.ts +0 -0
  368. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_cordova/plugins.d.ts +0 -0
  369. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_cordova/popup_redirect/events.d.ts +0 -0
  370. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_cordova/popup_redirect/popup_redirect.d.ts +0 -0
  371. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_cordova/popup_redirect/utils.d.ts +0 -0
  372. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_cordova/strategies/redirect.d.ts +0 -0
  373. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_node/index.d.ts +0 -0
  374. /package/dist/{web-extension-esm → web-extension-esm2017}/src/platform_react_native/persistence/react_native.d.ts +0 -0
  375. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/api/helper.d.ts +0 -0
  376. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/delay.d.ts +0 -0
  377. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/erroring_unavailable_persistence.d.ts +0 -0
  378. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/fake_service_worker.d.ts +0 -0
  379. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/id_token_response.d.ts +0 -0
  380. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/iframe_event.d.ts +0 -0
  381. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/integration/emulator_rest_helpers.d.ts +0 -0
  382. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/integration/helpers.d.ts +0 -0
  383. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/integration/settings.d.ts +0 -0
  384. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/jwt.d.ts +0 -0
  385. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/mock_auth.d.ts +0 -0
  386. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/mock_auth_credential.d.ts +0 -0
  387. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/mock_fetch.d.ts +0 -0
  388. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/mock_popup_redirect_resolver.d.ts +0 -0
  389. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/redirect_persistence.d.ts +0 -0
  390. /package/dist/{web-extension-esm → web-extension-esm2017}/test/helpers/timeout_stub.d.ts +0 -0
  391. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/flows/middleware_test_generator.d.ts +0 -0
  392. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/auth_driver.d.ts +0 -0
  393. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/functions.d.ts +0 -0
  394. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/idp_page.d.ts +0 -0
  395. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/js_load_condition.d.ts +0 -0
  396. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/test_runner.d.ts +0 -0
  397. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/test_server.d.ts +0 -0
  398. /package/dist/{web-extension-esm → web-extension-esm2017}/test/integration/webdriver/util/ui_page.d.ts +0 -0
  399. /package/dist/{web-extension-esm → web-extension-esm2017}/tsdoc-metadata.json +0 -0
@@ -3,6 +3,7 @@
3
3
  var app = require('@firebase/app');
4
4
  var util = require('@firebase/util');
5
5
  var logger = require('@firebase/logger');
6
+ var tslib = require('tslib');
6
7
  var component = require('@firebase/component');
7
8
 
8
9
  /**
@@ -478,10 +479,7 @@ function _createError(authOrCode, ...rest) {
478
479
  return createErrorInternal(authOrCode, ...rest);
479
480
  }
480
481
  function _errorWithCustomMessage(auth, code, message) {
481
- const errorMap = {
482
- ...prodErrorMap(),
483
- [code]: message
484
- };
482
+ const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });
485
483
  const factory = new util.ErrorFactory('auth', 'Firebase', errorMap);
486
484
  return factory.create(code, {
487
485
  appName: auth.name
@@ -562,13 +560,15 @@ function debugAssert(assertion, message) {
562
560
  * limitations under the License.
563
561
  */
564
562
  function _getCurrentUrl() {
565
- return (typeof self !== 'undefined' && self.location?.href) || '';
563
+ var _a;
564
+ return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href)) || '';
566
565
  }
567
566
  function _isHttpOrHttps() {
568
567
  return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';
569
568
  }
570
569
  function _getCurrentScheme() {
571
- return (typeof self !== 'undefined' && self.location?.protocol) || null;
570
+ var _a;
571
+ return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol)) || null;
572
572
  }
573
573
 
574
574
  /**
@@ -882,10 +882,7 @@ const CookieAuthProxiedEndpoints = [
882
882
  const DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);
883
883
  function _addTidIfNecessary(auth, request) {
884
884
  if (auth.tenantId && !request.tenantId) {
885
- return {
886
- ...request,
887
- tenantId: auth.tenantId
888
- };
885
+ return Object.assign(Object.assign({}, request), { tenantId: auth.tenantId });
889
886
  }
890
887
  return request;
891
888
  }
@@ -903,20 +900,14 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
903
900
  };
904
901
  }
905
902
  }
906
- const query = util.querystring({
907
- key: auth.config.apiKey,
908
- ...params
909
- }).slice(1);
903
+ const query = util.querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);
910
904
  const headers = await auth._getAdditionalHeaders();
911
905
  headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
912
906
  if (auth.languageCode) {
913
907
  headers["X-Firebase-Locale" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;
914
908
  }
915
- const fetchArgs = {
916
- method,
917
- headers,
918
- ...body
919
- };
909
+ const fetchArgs = Object.assign({ method,
910
+ headers }, body);
920
911
  /* Security-conscious server-side frameworks tend to have built in mitigations for referrer
921
912
  problems". See the Cloudflare GitHub issue #487: Error: The 'referrerPolicy' field on
922
913
  'RequestInitializerDict' is not implemented."
@@ -932,7 +923,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
932
923
  }
933
924
  async function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {
934
925
  auth._canInitEmulator = false;
935
- const errorMap = { ...SERVER_ERROR_MAP, ...customErrorMap };
926
+ const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);
936
927
  try {
937
928
  const networkTimeout = new NetworkTimeout(auth);
938
929
  const response = await Promise.race([
@@ -1273,7 +1264,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1273
1264
  const claims = _parseToken(token);
1274
1265
  _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1275
1266
  const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;
1276
- const signInProvider = firebase?.['sign_in_provider'];
1267
+ const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];
1277
1268
  return {
1278
1269
  claims,
1279
1270
  token,
@@ -1281,7 +1272,7 @@ async function getIdTokenResult(user, forceRefresh = false) {
1281
1272
  issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),
1282
1273
  expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),
1283
1274
  signInProvider: signInProvider || null,
1284
- signInSecondFactor: firebase?.['sign_in_second_factor'] || null
1275
+ signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null
1285
1276
  };
1286
1277
  }
1287
1278
  function secondsStringToMilliseconds(seconds) {
@@ -1304,7 +1295,7 @@ function _parseToken(token) {
1304
1295
  return JSON.parse(decoded);
1305
1296
  }
1306
1297
  catch (e) {
1307
- _logError('Caught error parsing JWT payload as JSON', e?.toString());
1298
+ _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());
1308
1299
  return null;
1309
1300
  }
1310
1301
  }
@@ -1400,6 +1391,7 @@ class ProactiveRefresh {
1400
1391
  }
1401
1392
  }
1402
1393
  getInterval(wasError) {
1394
+ var _a;
1403
1395
  if (wasError) {
1404
1396
  const interval = this.errorBackoff;
1405
1397
  this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);
@@ -1408,7 +1400,7 @@ class ProactiveRefresh {
1408
1400
  else {
1409
1401
  // Reset the error backoff
1410
1402
  this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;
1411
- const expTime = this.user.stsTokenManager.expirationTime ?? 0;
1403
+ const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;
1412
1404
  const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;
1413
1405
  return Math.max(0, interval);
1414
1406
  }
@@ -1429,7 +1421,7 @@ class ProactiveRefresh {
1429
1421
  }
1430
1422
  catch (e) {
1431
1423
  // Only retry on network errors
1432
- if (e?.code ===
1424
+ if ((e === null || e === void 0 ? void 0 : e.code) ===
1433
1425
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
1434
1426
  this.schedule(/* wasError */ true);
1435
1427
  }
@@ -1495,13 +1487,14 @@ class UserMetadata {
1495
1487
  * limitations under the License.
1496
1488
  */
1497
1489
  async function _reloadWithoutSaving(user) {
1490
+ var _a;
1498
1491
  const auth = user.auth;
1499
1492
  const idToken = await user.getIdToken();
1500
1493
  const response = await _logoutIfInvalidated(user, getAccountInfo(auth, { idToken }));
1501
- _assert(response?.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1494
+ _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1502
1495
  const coreAccount = response.users[0];
1503
1496
  user._notifyReloadListener(coreAccount);
1504
- const newProviderData = coreAccount.providerUserInfo?.length
1497
+ const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length)
1505
1498
  ? extractProviderData(coreAccount.providerUserInfo)
1506
1499
  : [];
1507
1500
  const providerData = mergeProviderData(user.providerData, newProviderData);
@@ -1511,7 +1504,7 @@ async function _reloadWithoutSaving(user) {
1511
1504
  // On the other hand, if it was not anonymous before, it should never be
1512
1505
  // considered anonymous now.
1513
1506
  const oldIsAnonymous = user.isAnonymous;
1514
- const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !providerData?.length;
1507
+ const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1515
1508
  const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;
1516
1509
  const updates = {
1517
1510
  uid: coreAccount.localId,
@@ -1548,7 +1541,8 @@ function mergeProviderData(original, newData) {
1548
1541
  return [...deduped, ...newData];
1549
1542
  }
1550
1543
  function extractProviderData(providers) {
1551
- return providers.map(({ providerId, ...provider }) => {
1544
+ return providers.map((_a) => {
1545
+ var { providerId } = _a, provider = tslib.__rest(_a, ["providerId"]);
1552
1546
  return {
1553
1547
  providerId,
1554
1548
  uid: provider.rawId || '',
@@ -1740,7 +1734,8 @@ function assertStringOrUndefined(assertion, appName) {
1740
1734
  _assert(typeof assertion === 'string' || typeof assertion === 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */, { appName });
1741
1735
  }
1742
1736
  class UserImpl {
1743
- constructor({ uid, auth, stsTokenManager, ...opt }) {
1737
+ constructor(_a) {
1738
+ var { uid, auth, stsTokenManager } = _a, opt = tslib.__rest(_a, ["uid", "auth", "stsTokenManager"]);
1744
1739
  // For the user object, provider is always Firebase.
1745
1740
  this.providerId = "firebase" /* ProviderId.FIREBASE */;
1746
1741
  this.proactiveRefresh = new ProactiveRefresh(this);
@@ -1788,16 +1783,12 @@ class UserImpl {
1788
1783
  this.phoneNumber = user.phoneNumber;
1789
1784
  this.isAnonymous = user.isAnonymous;
1790
1785
  this.tenantId = user.tenantId;
1791
- this.providerData = user.providerData.map(userInfo => ({ ...userInfo }));
1786
+ this.providerData = user.providerData.map(userInfo => (Object.assign({}, userInfo)));
1792
1787
  this.metadata._copy(user.metadata);
1793
1788
  this.stsTokenManager._assign(user.stsTokenManager);
1794
1789
  }
1795
1790
  _clone(auth) {
1796
- const newUser = new UserImpl({
1797
- ...this,
1798
- auth,
1799
- stsTokenManager: this.stsTokenManager._clone()
1800
- });
1791
+ const newUser = new UserImpl(Object.assign(Object.assign({}, this), { auth, stsTokenManager: this.stsTokenManager._clone() }));
1801
1792
  newUser.metadata._copy(this.metadata);
1802
1793
  return newUser;
1803
1794
  }
@@ -1852,40 +1843,26 @@ class UserImpl {
1852
1843
  return this.auth.signOut();
1853
1844
  }
1854
1845
  toJSON() {
1855
- return {
1856
- uid: this.uid,
1857
- email: this.email || undefined,
1858
- emailVerified: this.emailVerified,
1859
- displayName: this.displayName || undefined,
1860
- isAnonymous: this.isAnonymous,
1861
- photoURL: this.photoURL || undefined,
1862
- phoneNumber: this.phoneNumber || undefined,
1863
- tenantId: this.tenantId || undefined,
1864
- providerData: this.providerData.map(userInfo => ({ ...userInfo })),
1865
- stsTokenManager: this.stsTokenManager.toJSON(),
1846
+ return Object.assign(Object.assign({ uid: this.uid, email: this.email || undefined, emailVerified: this.emailVerified, displayName: this.displayName || undefined, isAnonymous: this.isAnonymous, photoURL: this.photoURL || undefined, phoneNumber: this.phoneNumber || undefined, tenantId: this.tenantId || undefined, providerData: this.providerData.map(userInfo => (Object.assign({}, userInfo))), stsTokenManager: this.stsTokenManager.toJSON(),
1866
1847
  // Redirect event ID must be maintained in case there is a pending
1867
1848
  // redirect event.
1868
- _redirectEventId: this._redirectEventId,
1869
- ...this.metadata.toJSON(),
1849
+ _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), {
1870
1850
  // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):
1871
- apiKey: this.auth.config.apiKey,
1872
- appName: this.auth.name
1873
- // Missing authDomain will be tolerated by the legacy SDK.
1874
- // stsTokenManager.apiKey isn't actually required (despite the legacy SDK persisting it).
1875
- };
1851
+ apiKey: this.auth.config.apiKey, appName: this.auth.name });
1876
1852
  }
1877
1853
  get refreshToken() {
1878
1854
  return this.stsTokenManager.refreshToken || '';
1879
1855
  }
1880
1856
  static _fromJSON(auth, object) {
1881
- const displayName = object.displayName ?? undefined;
1882
- const email = object.email ?? undefined;
1883
- const phoneNumber = object.phoneNumber ?? undefined;
1884
- const photoURL = object.photoURL ?? undefined;
1885
- const tenantId = object.tenantId ?? undefined;
1886
- const _redirectEventId = object._redirectEventId ?? undefined;
1887
- const createdAt = object.createdAt ?? undefined;
1888
- const lastLoginAt = object.lastLoginAt ?? undefined;
1857
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1858
+ const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;
1859
+ const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;
1860
+ const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;
1861
+ const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;
1862
+ const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;
1863
+ const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;
1864
+ const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
1865
+ const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;
1889
1866
  const { uid, emailVerified, isAnonymous, providerData, stsTokenManager: plainObjectTokenManager } = object;
1890
1867
  _assert(uid && plainObjectTokenManager, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
1891
1868
  const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);
@@ -1915,7 +1892,7 @@ class UserImpl {
1915
1892
  lastLoginAt
1916
1893
  });
1917
1894
  if (providerData && Array.isArray(providerData)) {
1918
- user.providerData = providerData.map(userInfo => ({ ...userInfo }));
1895
+ user.providerData = providerData.map(userInfo => (Object.assign({}, userInfo)));
1919
1896
  }
1920
1897
  if (_redirectEventId) {
1921
1898
  user._redirectEventId = _redirectEventId;
@@ -1952,7 +1929,7 @@ class UserImpl {
1952
1929
  const providerData = coreAccount.providerUserInfo !== undefined
1953
1930
  ? extractProviderData(coreAccount.providerUserInfo)
1954
1931
  : [];
1955
- const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !providerData?.length;
1932
+ const isAnonymous = !(coreAccount.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);
1956
1933
  const stsTokenManager = new StsTokenManager();
1957
1934
  stsTokenManager.updateFromIdToken(idToken);
1958
1935
  // Initialize the Firebase Auth user.
@@ -1974,7 +1951,7 @@ class UserImpl {
1974
1951
  providerData,
1975
1952
  metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),
1976
1953
  isAnonymous: !(coreAccount.email && coreAccount.passwordHash) &&
1977
- !providerData?.length
1954
+ !(providerData === null || providerData === void 0 ? void 0 : providerData.length)
1978
1955
  };
1979
1956
  Object.assign(user, updates);
1980
1957
  return user;
@@ -2173,7 +2150,7 @@ class PersistenceUserManager {
2173
2150
  break;
2174
2151
  }
2175
2152
  }
2176
- catch { }
2153
+ catch (_a) { }
2177
2154
  }
2178
2155
  // If we find the user in a persistence that does support migration, use
2179
2156
  // that migration path (of only persistences that support migration)
@@ -2196,7 +2173,7 @@ class PersistenceUserManager {
2196
2173
  try {
2197
2174
  await persistence._remove(key);
2198
2175
  }
2199
- catch { }
2176
+ catch (_a) { }
2200
2177
  }
2201
2178
  }));
2202
2179
  return new PersistenceUserManager(selectedPersistence, auth, userKey);
@@ -2266,7 +2243,7 @@ function _getBrowserName(userAgent) {
2266
2243
  // Most modern browsers have name/version at end of user agent string.
2267
2244
  const re = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/;
2268
2245
  const matches = userAgent.match(re);
2269
- if (matches?.length === 2) {
2246
+ if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {
2270
2247
  return matches[1];
2271
2248
  }
2272
2249
  }
@@ -2306,7 +2283,8 @@ function _isIOS7Or8(ua = util.getUA()) {
2306
2283
  /(iPad|iPhone|iPod).*OS 8_\d/i.test(ua));
2307
2284
  }
2308
2285
  function _isIOSStandalone(ua = util.getUA()) {
2309
- return _isIOS(ua) && !!window.navigator?.standalone;
2286
+ var _a;
2287
+ return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);
2310
2288
  }
2311
2289
  function _isIE10() {
2312
2290
  return util.isIE() && document.documentMode === 10;
@@ -2437,7 +2415,7 @@ class AuthMiddlewareQueue {
2437
2415
  }
2438
2416
  }
2439
2417
  throw this.auth._errorFactory.create("login-blocked" /* AuthErrorCode.LOGIN_BLOCKED */, {
2440
- originalMessage: e?.message
2418
+ originalMessage: e === null || e === void 0 ? void 0 : e.message
2441
2419
  });
2442
2420
  }
2443
2421
  }
@@ -2495,12 +2473,13 @@ const MINIMUM_MIN_PASSWORD_LENGTH = 6;
2495
2473
  */
2496
2474
  class PasswordPolicyImpl {
2497
2475
  constructor(response) {
2476
+ var _a, _b, _c, _d;
2498
2477
  // Only include custom strength options defined in the response.
2499
2478
  const responseOptions = response.customStrengthOptions;
2500
2479
  this.customStrengthOptions = {};
2501
2480
  // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.
2502
2481
  this.customStrengthOptions.minPasswordLength =
2503
- responseOptions.minPasswordLength ?? MINIMUM_MIN_PASSWORD_LENGTH;
2482
+ (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;
2504
2483
  if (responseOptions.maxPasswordLength) {
2505
2484
  this.customStrengthOptions.maxPasswordLength =
2506
2485
  responseOptions.maxPasswordLength;
@@ -2527,11 +2506,12 @@ class PasswordPolicyImpl {
2527
2506
  }
2528
2507
  // Use an empty string if no non-alphanumeric characters are specified in the response.
2529
2508
  this.allowedNonAlphanumericCharacters =
2530
- response.allowedNonAlphanumericCharacters?.join('') ?? '';
2531
- this.forceUpgradeOnSignin = response.forceUpgradeOnSignin ?? false;
2509
+ (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';
2510
+ this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;
2532
2511
  this.schemaVersion = response.schemaVersion;
2533
2512
  }
2534
2513
  validatePassword(password) {
2514
+ var _a, _b, _c, _d, _e, _f;
2535
2515
  const status = {
2536
2516
  isValid: true,
2537
2517
  passwordPolicy: this
@@ -2540,12 +2520,12 @@ class PasswordPolicyImpl {
2540
2520
  this.validatePasswordLengthOptions(password, status);
2541
2521
  this.validatePasswordCharacterOptions(password, status);
2542
2522
  // Combine the status into single isValid property.
2543
- status.isValid && (status.isValid = status.meetsMinPasswordLength ?? true);
2544
- status.isValid && (status.isValid = status.meetsMaxPasswordLength ?? true);
2545
- status.isValid && (status.isValid = status.containsLowercaseLetter ?? true);
2546
- status.isValid && (status.isValid = status.containsUppercaseLetter ?? true);
2547
- status.isValid && (status.isValid = status.containsNumericCharacter ?? true);
2548
- status.isValid && (status.isValid = status.containsNonAlphanumericCharacter ?? true);
2523
+ status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);
2524
+ status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);
2525
+ status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);
2526
+ status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);
2527
+ status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);
2528
+ status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);
2549
2529
  return status;
2550
2530
  }
2551
2531
  /**
@@ -2682,17 +2662,18 @@ class AuthImpl {
2682
2662
  // Have to check for app deletion throughout initialization (after each
2683
2663
  // promise resolution)
2684
2664
  this._initializationPromise = this.queue(async () => {
2665
+ var _a, _b, _c;
2685
2666
  if (this._deleted) {
2686
2667
  return;
2687
2668
  }
2688
2669
  this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);
2689
- this._resolvePersistenceManagerAvailable?.();
2670
+ (_a = this._resolvePersistenceManagerAvailable) === null || _a === void 0 ? void 0 : _a.call(this);
2690
2671
  if (this._deleted) {
2691
2672
  return;
2692
2673
  }
2693
2674
  // Initialize the resolver early if necessary (only applicable to web:
2694
2675
  // this will cause the iframe to load immediately in certain cases)
2695
- if (this._popupRedirectResolver?._shouldInitProactively) {
2676
+ if ((_b = this._popupRedirectResolver) === null || _b === void 0 ? void 0 : _b._shouldInitProactively) {
2696
2677
  // If this fails, don't halt auth loading
2697
2678
  try {
2698
2679
  await this._popupRedirectResolver._initialize(this);
@@ -2702,7 +2683,7 @@ class AuthImpl {
2702
2683
  }
2703
2684
  }
2704
2685
  await this.initializeCurrentUser(popupRedirectResolver);
2705
- this.lastNotifiedUid = this.currentUser?.uid || null;
2686
+ this.lastNotifiedUid = ((_c = this.currentUser) === null || _c === void 0 ? void 0 : _c.uid) || null;
2706
2687
  if (this._deleted) {
2707
2688
  return;
2708
2689
  }
@@ -2747,6 +2728,7 @@ class AuthImpl {
2747
2728
  }
2748
2729
  }
2749
2730
  async initializeCurrentUser(popupRedirectResolver) {
2731
+ var _a;
2750
2732
  if (app._isFirebaseServerApp(this.app)) {
2751
2733
  const idToken = this.app.settings.authIdToken;
2752
2734
  if (idToken) {
@@ -2766,15 +2748,15 @@ class AuthImpl {
2766
2748
  let needsTocheckMiddleware = false;
2767
2749
  if (popupRedirectResolver && this.config.authDomain) {
2768
2750
  await this.getOrInitRedirectPersistenceManager();
2769
- const redirectUserEventId = this.redirectUser?._redirectEventId;
2770
- const storedUserEventId = futureCurrentUser?._redirectEventId;
2751
+ const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;
2752
+ const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;
2771
2753
  const result = await this.tryRedirectSignIn(popupRedirectResolver);
2772
2754
  // If the stored user (i.e. the old "currentUser") has a redirectId that
2773
2755
  // matches the redirect user, then we want to initially sign in with the
2774
2756
  // new user object from result.
2775
2757
  // TODO(samgho): More thoroughly test all of this
2776
2758
  if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) &&
2777
- result?.user) {
2759
+ (result === null || result === void 0 ? void 0 : result.user)) {
2778
2760
  futureCurrentUser = result.user;
2779
2761
  needsTocheckMiddleware = true;
2780
2762
  }
@@ -2849,7 +2831,7 @@ class AuthImpl {
2849
2831
  await _reloadWithoutSaving(user);
2850
2832
  }
2851
2833
  catch (e) {
2852
- if (e?.code !==
2834
+ if ((e === null || e === void 0 ? void 0 : e.code) !==
2853
2835
  `auth/${"network-request-failed" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {
2854
2836
  // Something's wrong with the user's token. Log them out and remove
2855
2837
  // them from storage
@@ -3006,11 +2988,12 @@ class AuthImpl {
3006
2988
  }
3007
2989
  }
3008
2990
  toJSON() {
2991
+ var _a;
3009
2992
  return {
3010
2993
  apiKey: this.config.apiKey,
3011
2994
  authDomain: this.config.authDomain,
3012
2995
  appName: this.name,
3013
- currentUser: this._currentUser?.toJSON()
2996
+ currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()
3014
2997
  };
3015
2998
  }
3016
2999
  async _setRedirectUser(user, popupRedirectResolver) {
@@ -3031,15 +3014,16 @@ class AuthImpl {
3031
3014
  return this.redirectPersistenceManager;
3032
3015
  }
3033
3016
  async _redirectUserForId(id) {
3017
+ var _a, _b;
3034
3018
  // Make sure we've cleared any pending persistence actions if we're not in
3035
3019
  // the initializer
3036
3020
  if (this._isInitialized) {
3037
3021
  await this.queue(async () => { });
3038
3022
  }
3039
- if (this._currentUser?._redirectEventId === id) {
3023
+ if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {
3040
3024
  return this._currentUser;
3041
3025
  }
3042
- if (this.redirectUser?._redirectEventId === id) {
3026
+ if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {
3043
3027
  return this.redirectUser;
3044
3028
  }
3045
3029
  return null;
@@ -3075,11 +3059,12 @@ class AuthImpl {
3075
3059
  return this.currentUser;
3076
3060
  }
3077
3061
  notifyAuthListeners() {
3062
+ var _a, _b;
3078
3063
  if (!this._isInitialized) {
3079
3064
  return;
3080
3065
  }
3081
3066
  this.idTokenSubscription.next(this.currentUser);
3082
- const currentUid = this.currentUser?.uid ?? null;
3067
+ const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;
3083
3068
  if (this.lastNotifiedUid !== currentUid) {
3084
3069
  this.lastNotifiedUid = currentUid;
3085
3070
  this.authStateSubscription.next(this.currentUser);
@@ -3164,6 +3149,7 @@ class AuthImpl {
3164
3149
  return this.frameworks;
3165
3150
  }
3166
3151
  async _getAdditionalHeaders() {
3152
+ var _a;
3167
3153
  // Additional headers on every request
3168
3154
  const headers = {
3169
3155
  ["X-Client-Version" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion
@@ -3172,11 +3158,10 @@ class AuthImpl {
3172
3158
  headers["X-Firebase-gmpid" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;
3173
3159
  }
3174
3160
  // If the heartbeat service exists, add the heartbeat string
3175
- const heartbeatsHeader = await this.heartbeatServiceProvider
3161
+ const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider
3176
3162
  .getImmediate({
3177
3163
  optional: true
3178
- })
3179
- ?.getHeartbeatsHeader();
3164
+ })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());
3180
3165
  if (heartbeatsHeader) {
3181
3166
  headers["X-Firebase-Client" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;
3182
3167
  }
@@ -3188,20 +3173,20 @@ class AuthImpl {
3188
3173
  return headers;
3189
3174
  }
3190
3175
  async _getAppCheckToken() {
3176
+ var _a;
3191
3177
  if (app._isFirebaseServerApp(this.app) && this.app.settings.appCheckToken) {
3192
3178
  return this.app.settings.appCheckToken;
3193
3179
  }
3194
- const appCheckTokenResult = await this.appCheckServiceProvider
3195
- .getImmediate({ optional: true })
3196
- ?.getToken();
3197
- if (appCheckTokenResult?.error) {
3180
+ const appCheckTokenResult = await ((_a = this.appCheckServiceProvider
3181
+ .getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());
3182
+ if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {
3198
3183
  // Context: appCheck.getToken() will never throw even if an error happened.
3199
3184
  // In the error case, a dummy token will be returned along with an error field describing
3200
3185
  // the error. In general, we shouldn't care about the error condition and just use
3201
3186
  // the token (actual or dummy) to send requests.
3202
3187
  _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);
3203
3188
  }
3204
- return appCheckTokenResult?.token;
3189
+ return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;
3205
3190
  }
3206
3191
  }
3207
3192
  /**
@@ -3301,17 +3286,20 @@ class MockReCaptcha {
3301
3286
  return id;
3302
3287
  }
3303
3288
  reset(optWidgetId) {
3289
+ var _a;
3304
3290
  const id = optWidgetId || _WIDGET_ID_START;
3305
- void this._widgets.get(id)?.delete();
3291
+ void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());
3306
3292
  this._widgets.delete(id);
3307
3293
  }
3308
3294
  getResponse(optWidgetId) {
3295
+ var _a;
3309
3296
  const id = optWidgetId || _WIDGET_ID_START;
3310
- return this._widgets.get(id)?.getResponse() || '';
3297
+ return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';
3311
3298
  }
3312
3299
  async execute(optWidgetId) {
3300
+ var _a;
3313
3301
  const id = optWidgetId || _WIDGET_ID_START;
3314
- void this._widgets.get(id)?.execute();
3302
+ void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());
3315
3303
  return '';
3316
3304
  }
3317
3305
  }
@@ -3551,7 +3539,7 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3551
3539
  captchaResponse = await verifier.verify(action, true);
3552
3540
  }
3553
3541
  }
3554
- const newRequest = { ...request };
3542
+ const newRequest = Object.assign({}, request);
3555
3543
  if (action === "mfaSmsEnrollment" /* RecaptchaActionName.MFA_SMS_ENROLLMENT */ ||
3556
3544
  action === "mfaSmsSignIn" /* RecaptchaActionName.MFA_SMS_SIGNIN */) {
3557
3545
  if ('phoneEnrollmentInfo' in newRequest) {
@@ -3593,10 +3581,10 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
3593
3581
  return newRequest;
3594
3582
  }
3595
3583
  async function handleRecaptchaFlow(authInstance, request, actionName, actionMethod, recaptchaAuthProvider) {
3584
+ var _a, _b;
3596
3585
  if (recaptchaAuthProvider === "EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */) {
3597
- if (authInstance
3598
- ._getRecaptchaConfig()
3599
- ?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3586
+ if ((_a = authInstance
3587
+ ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
3600
3588
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */);
3601
3589
  return actionMethod(authInstance, requestWithRecaptcha);
3602
3590
  }
@@ -3614,14 +3602,13 @@ async function handleRecaptchaFlow(authInstance, request, actionName, actionMeth
3614
3602
  }
3615
3603
  }
3616
3604
  else if (recaptchaAuthProvider === "PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) {
3617
- if (authInstance
3618
- ._getRecaptchaConfig()
3619
- ?.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3605
+ if ((_b = authInstance
3606
+ ._getRecaptchaConfig()) === null || _b === void 0 ? void 0 : _b.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
3620
3607
  const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName);
3621
3608
  return actionMethod(authInstance, requestWithRecaptcha).catch(async (error) => {
3622
- if (authInstance
3623
- ._getRecaptchaConfig()
3624
- ?.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) === "AUDIT" /* EnforcementState.AUDIT */) {
3609
+ var _a;
3610
+ if (((_a = authInstance
3611
+ ._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) === "AUDIT" /* EnforcementState.AUDIT */) {
3625
3612
  // AUDIT mode
3626
3613
  if (error.code === `auth/${"missing-recaptcha-token" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}` ||
3627
3614
  error.code === `auth/${"invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */}`) {
@@ -3718,7 +3705,7 @@ function initializeAuth(app$1, deps) {
3718
3705
  if (provider.isInitialized()) {
3719
3706
  const auth = provider.getImmediate();
3720
3707
  const initialOptions = provider.getOptions();
3721
- if (util.deepEqual(initialOptions, deps ?? {})) {
3708
+ if (util.deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
3722
3709
  return auth;
3723
3710
  }
3724
3711
  else {
@@ -3729,15 +3716,15 @@ function initializeAuth(app$1, deps) {
3729
3716
  return auth;
3730
3717
  }
3731
3718
  function _initializeAuthInstance(auth, deps) {
3732
- const persistence = deps?.persistence || [];
3719
+ const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
3733
3720
  const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
3734
- if (deps?.errorMap) {
3721
+ if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
3735
3722
  auth._updateErrorMap(deps.errorMap);
3736
3723
  }
3737
3724
  // This promise is intended to float; auth initialization happens in the
3738
3725
  // background, meanwhile the auth object may be used by the app.
3739
3726
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
3740
- auth._initializeWithPersistence(hierarchy, deps?.popupRedirectResolver);
3727
+ auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
3741
3728
  }
3742
3729
 
3743
3730
  /**
@@ -3765,7 +3752,7 @@ function _initializeAuthInstance(auth, deps) {
3765
3752
  function connectAuthEmulator(auth, url, options) {
3766
3753
  const authInternal = _castAuth(auth);
3767
3754
  _assert(/^https?:\/\//.test(url), authInternal, "invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);
3768
- const disableWarnings = !!options?.disableWarnings;
3755
+ const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);
3769
3756
  const protocol = extractProtocol(url);
3770
3757
  const { host, port } = extractHostAndPort(url);
3771
3758
  const portStr = port === null ? '' : `:${port}`;
@@ -4091,7 +4078,7 @@ class EmailAuthCredential extends AuthCredential {
4091
4078
  */
4092
4079
  static fromJSON(json) {
4093
4080
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4094
- if (obj?.email && obj?.password) {
4081
+ if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {
4095
4082
  if (obj.signInMethod === "password" /* SignInMethod.EMAIL_PASSWORD */) {
4096
4083
  return this._fromEmailAndPassword(obj.email, obj.password);
4097
4084
  }
@@ -4251,7 +4238,7 @@ class OAuthCredential extends AuthCredential {
4251
4238
  */
4252
4239
  static fromJSON(json) {
4253
4240
  const obj = typeof json === 'string' ? JSON.parse(json) : json;
4254
- const { providerId, signInMethod, ...rest } = obj;
4241
+ const { providerId, signInMethod } = obj, rest = tslib.__rest(obj, ["providerId", "signInMethod"]);
4255
4242
  if (!providerId || !signInMethod) {
4256
4243
  return null;
4257
4244
  }
@@ -4342,10 +4329,7 @@ const VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {
4342
4329
  ["USER_NOT_FOUND" /* ServerError.USER_NOT_FOUND */]: "user-not-found" /* AuthErrorCode.USER_DELETED */
4343
4330
  };
4344
4331
  async function verifyPhoneNumberForExisting(auth, request) {
4345
- const apiRequest = {
4346
- ...request,
4347
- operation: 'REAUTH'
4348
- };
4332
+ const apiRequest = Object.assign(Object.assign({}, request), { operation: 'REAUTH' });
4349
4333
  return _performSignInRequest(auth, "POST" /* HttpMethod.POST */, "/v1/accounts:signInWithPhoneNumber" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);
4350
4334
  }
4351
4335
 
@@ -4389,10 +4373,7 @@ class PhoneAuthCredential extends AuthCredential {
4389
4373
  }
4390
4374
  /** @internal */
4391
4375
  _linkToIdToken(auth, idToken) {
4392
- return linkWithPhoneNumber$1(auth, {
4393
- idToken,
4394
- ...this._makeVerificationRequest()
4395
- });
4376
+ return linkWithPhoneNumber$1(auth, Object.assign({ idToken }, this._makeVerificationRequest()));
4396
4377
  }
4397
4378
  /** @internal */
4398
4379
  _getReauthenticationResolver(auth) {
@@ -4520,18 +4501,19 @@ class ActionCodeURL {
4520
4501
  * @internal
4521
4502
  */
4522
4503
  constructor(actionLink) {
4504
+ var _a, _b, _c, _d, _e, _f;
4523
4505
  const searchParams = util.querystringDecode(util.extractQuerystring(actionLink));
4524
- const apiKey = searchParams["apiKey" /* QueryField.API_KEY */] ?? null;
4525
- const code = searchParams["oobCode" /* QueryField.CODE */] ?? null;
4526
- const operation = parseMode(searchParams["mode" /* QueryField.MODE */] ?? null);
4506
+ const apiKey = (_a = searchParams["apiKey" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;
4507
+ const code = (_b = searchParams["oobCode" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;
4508
+ const operation = parseMode((_c = searchParams["mode" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);
4527
4509
  // Validate API key, code and mode.
4528
4510
  _assert(apiKey && code && operation, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4529
4511
  this.apiKey = apiKey;
4530
4512
  this.operation = operation;
4531
4513
  this.code = code;
4532
- this.continueUrl = searchParams["continueUrl" /* QueryField.CONTINUE_URL */] ?? null;
4533
- this.languageCode = searchParams["lang" /* QueryField.LANGUAGE_CODE */] ?? null;
4534
- this.tenantId = searchParams["tenantId" /* QueryField.TENANT_ID */] ?? null;
4514
+ this.continueUrl = (_d = searchParams["continueUrl" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;
4515
+ this.languageCode = (_e = searchParams["lang" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;
4516
+ this.tenantId = (_f = searchParams["tenantId" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;
4535
4517
  }
4536
4518
  /**
4537
4519
  * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
@@ -4547,7 +4529,7 @@ class ActionCodeURL {
4547
4529
  try {
4548
4530
  return new ActionCodeURL(actionLink);
4549
4531
  }
4550
- catch {
4532
+ catch (_a) {
4551
4533
  return null;
4552
4534
  }
4553
4535
  }
@@ -4837,17 +4819,13 @@ class OAuthProvider extends BaseOAuthProvider {
4837
4819
  * or the ID token string.
4838
4820
  */
4839
4821
  credential(params) {
4840
- return this._credential({ ...params, nonce: params.rawNonce });
4822
+ return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));
4841
4823
  }
4842
4824
  /** An internal credential method that accepts more permissive options */
4843
4825
  _credential(params) {
4844
4826
  _assert(params.idToken || params.accessToken, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
4845
4827
  // For OAuthCredential, sign in method is same as providerId.
4846
- return OAuthCredential._fromParams({
4847
- ...params,
4848
- providerId: this.providerId,
4849
- signInMethod: this.providerId
4850
- });
4828
+ return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));
4851
4829
  }
4852
4830
  /**
4853
4831
  * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.
@@ -4999,7 +4977,7 @@ class FacebookAuthProvider extends BaseOAuthProvider {
4999
4977
  try {
5000
4978
  return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);
5001
4979
  }
5002
- catch {
4980
+ catch (_a) {
5003
4981
  return null;
5004
4982
  }
5005
4983
  }
@@ -5121,7 +5099,7 @@ class GoogleAuthProvider extends BaseOAuthProvider {
5121
5099
  try {
5122
5100
  return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);
5123
5101
  }
5124
- catch {
5102
+ catch (_a) {
5125
5103
  return null;
5126
5104
  }
5127
5105
  }
@@ -5232,7 +5210,7 @@ class GithubAuthProvider extends BaseOAuthProvider {
5232
5210
  try {
5233
5211
  return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);
5234
5212
  }
5235
- catch {
5213
+ catch (_a) {
5236
5214
  return null;
5237
5215
  }
5238
5216
  }
@@ -5516,7 +5494,7 @@ class TwitterAuthProvider extends BaseOAuthProvider {
5516
5494
  try {
5517
5495
  return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);
5518
5496
  }
5519
- catch {
5497
+ catch (_a) {
5520
5498
  return null;
5521
5499
  }
5522
5500
  }
@@ -5632,12 +5610,13 @@ function providerIdForResponse(response) {
5632
5610
  * @public
5633
5611
  */
5634
5612
  async function signInAnonymously(auth) {
5613
+ var _a;
5635
5614
  if (app._isFirebaseServerApp(auth.app)) {
5636
5615
  return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(auth));
5637
5616
  }
5638
5617
  const authInternal = _castAuth(auth);
5639
5618
  await authInternal._initializationPromise;
5640
- if (authInternal.currentUser?.isAnonymous) {
5619
+ if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {
5641
5620
  // If an anonymous user is already signed in, no need to sign them in again.
5642
5621
  return new UserCredentialImpl({
5643
5622
  user: authInternal.currentUser,
@@ -5671,6 +5650,7 @@ async function signInAnonymously(auth) {
5671
5650
  */
5672
5651
  class MultiFactorError extends util.FirebaseError {
5673
5652
  constructor(auth, error, operationType, user) {
5653
+ var _a;
5674
5654
  super(error.code, error.message);
5675
5655
  this.operationType = operationType;
5676
5656
  this.user = user;
@@ -5678,7 +5658,7 @@ class MultiFactorError extends util.FirebaseError {
5678
5658
  Object.setPrototypeOf(this, MultiFactorError.prototype);
5679
5659
  this.customData = {
5680
5660
  appName: auth.name,
5681
- tenantId: auth.tenantId ?? undefined,
5661
+ tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,
5682
5662
  _serverResponse: error.customData._serverResponse,
5683
5663
  operationType
5684
5664
  };
@@ -5809,7 +5789,7 @@ async function _reauthenticate(user, credential, bypassAuthState = false) {
5809
5789
  }
5810
5790
  catch (e) {
5811
5791
  // Convert user deleted error into user mismatch
5812
- if (e?.code === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5792
+ if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${"user-not-found" /* AuthErrorCode.USER_DELETED */}`) {
5813
5793
  _fail(auth, "user-mismatch" /* AuthErrorCode.USER_MISMATCH */);
5814
5794
  }
5815
5795
  throw e;
@@ -6034,7 +6014,8 @@ class TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {
6034
6014
  * limitations under the License.
6035
6015
  */
6036
6016
  function _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {
6037
- _assert(actionCodeSettings.url?.length > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6017
+ var _a;
6018
+ _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, "invalid-continue-uri" /* AuthErrorCode.INVALID_CONTINUE_URI */);
6038
6019
  _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' ||
6039
6020
  actionCodeSettings.dynamicLinkDomain.length > 0, auth, "invalid-dynamic-link-domain" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);
6040
6021
  _assert(typeof actionCodeSettings.linkDomain === 'undefined' ||
@@ -6395,7 +6376,7 @@ async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
6395
6376
  */
6396
6377
  function isSignInWithEmailLink(auth, emailLink) {
6397
6378
  const actionCodeUrl = ActionCodeURL.parseLink(emailLink);
6398
- return actionCodeUrl?.operation === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6379
+ return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === "EMAIL_SIGNIN" /* ActionCodeOperation.EMAIL_SIGNIN */;
6399
6380
  }
6400
6381
  /**
6401
6382
  * Asynchronously signs in using an email and sign-in email link.
@@ -6768,6 +6749,7 @@ async function updateEmailOrPassword(user, email, password) {
6768
6749
  *
6769
6750
  */
6770
6751
  function _fromIdTokenResponse(idTokenResponse) {
6752
+ var _a, _b;
6771
6753
  if (!idTokenResponse) {
6772
6754
  return null;
6773
6755
  }
@@ -6777,8 +6759,8 @@ function _fromIdTokenResponse(idTokenResponse) {
6777
6759
  : {};
6778
6760
  const isNewUser = idTokenResponse.isNewUser ||
6779
6761
  idTokenResponse.kind === "identitytoolkit#SignupNewUserResponse" /* IdTokenResponseKind.SignupNewUser */;
6780
- if (!providerId && idTokenResponse?.idToken) {
6781
- const signInProvider = _parseToken(idTokenResponse.idToken)?.firebase?.['sign_in_provider'];
6762
+ if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {
6763
+ const signInProvider = (_b = (_a = _parseToken(idTokenResponse.idToken)) === null || _a === void 0 ? void 0 : _a.firebase) === null || _b === void 0 ? void 0 : _b['sign_in_provider'];
6782
6764
  if (signInProvider) {
6783
6765
  const filteredProviderId = signInProvider !== "anonymous" /* ProviderId.ANONYMOUS */ &&
6784
6766
  signInProvider !== "custom" /* ProviderId.CUSTOM */
@@ -6827,7 +6809,7 @@ class FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {
6827
6809
  }
6828
6810
  class GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {
6829
6811
  constructor(isNewUser, profile) {
6830
- super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof profile?.login === 'string' ? profile?.login : null);
6812
+ super(isNewUser, "github.com" /* ProviderId.GITHUB */, profile, typeof (profile === null || profile === void 0 ? void 0 : profile.login) === 'string' ? profile === null || profile === void 0 ? void 0 : profile.login : null);
6831
6813
  }
6832
6814
  }
6833
6815
  class GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {
@@ -7127,11 +7109,12 @@ class MultiFactorSessionImpl {
7127
7109
  };
7128
7110
  }
7129
7111
  static fromJSON(obj) {
7130
- if (obj?.multiFactorSession) {
7131
- if (obj.multiFactorSession?.pendingCredential) {
7112
+ var _a, _b;
7113
+ if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {
7114
+ if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {
7132
7115
  return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);
7133
7116
  }
7134
- else if (obj.multiFactorSession?.idToken) {
7117
+ else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {
7135
7118
  return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);
7136
7119
  }
7137
7120
  }
@@ -7174,11 +7157,7 @@ class MultiFactorResolverImpl {
7174
7157
  delete serverResponse.mfaInfo;
7175
7158
  delete serverResponse.mfaPendingCredential;
7176
7159
  // Use in the new token & refresh token in the old response
7177
- const idTokenResponse = {
7178
- ...serverResponse,
7179
- idToken: mfaResponse.idToken,
7180
- refreshToken: mfaResponse.refreshToken
7181
- };
7160
+ const idTokenResponse = Object.assign(Object.assign({}, serverResponse), { idToken: mfaResponse.idToken, refreshToken: mfaResponse.refreshToken });
7182
7161
  // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case
7183
7162
  switch (error.operationType) {
7184
7163
  case "signIn" /* OperationType.SIGN_IN */:
@@ -7209,10 +7188,11 @@ class MultiFactorResolverImpl {
7209
7188
  * @public
7210
7189
  */
7211
7190
  function getMultiFactorResolver(auth, error) {
7191
+ var _a;
7212
7192
  const authModular = util.getModularInstance(auth);
7213
7193
  const errorInternal = error;
7214
7194
  _assert(error.customData.operationType, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7215
- _assert(errorInternal.customData._serverResponse?.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7195
+ _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
7216
7196
  return MultiFactorResolverImpl._fromError(authModular, errorInternal);
7217
7197
  }
7218
7198
 
@@ -7352,7 +7332,7 @@ class BrowserPersistenceClass {
7352
7332
  this.storage.removeItem(STORAGE_AVAILABLE_KEY);
7353
7333
  return Promise.resolve(true);
7354
7334
  }
7355
- catch {
7335
+ catch (_a) {
7356
7336
  return Promise.resolve(false);
7357
7337
  }
7358
7338
  }
@@ -7574,9 +7554,10 @@ const browserLocalPersistence = BrowserLocalPersistence;
7574
7554
  const POLLING_INTERVAL_MS = 1000;
7575
7555
  // Pull a cookie value from document.cookie
7576
7556
  function getDocumentCookie(name) {
7557
+ var _a, _b;
7577
7558
  const escapedName = name.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
7578
7559
  const matcher = RegExp(`${escapedName}=([^;]+)`);
7579
- return document.cookie.match(matcher)?.[1] ?? null;
7560
+ return (_b = (_a = document.cookie.match(matcher)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
7580
7561
  }
7581
7562
  // Produce a sanitized cookie name from the persistence key
7582
7563
  function getCookieName(key) {
@@ -7604,13 +7585,14 @@ class CookiePersistence {
7604
7585
  // prerequisites have been met, namely that we're in a secureContext, navigator and document are
7605
7586
  // available and cookies are enabled. Not all UAs support these method, so fallback accordingly.
7606
7587
  async _isAvailable() {
7588
+ var _a;
7607
7589
  if (typeof isSecureContext === 'boolean' && !isSecureContext) {
7608
7590
  return false;
7609
7591
  }
7610
7592
  if (typeof navigator === 'undefined' || typeof document === 'undefined') {
7611
7593
  return false;
7612
7594
  }
7613
- return navigator.cookieEnabled ?? true;
7595
+ return (_a = navigator.cookieEnabled) !== null && _a !== void 0 ? _a : true;
7614
7596
  }
7615
7597
  // Set should be a noop as we expect middleware to handle this
7616
7598
  async _set(_key, _value) {
@@ -7624,7 +7606,7 @@ class CookiePersistence {
7624
7606
  const name = getCookieName(key);
7625
7607
  if (window.cookieStore) {
7626
7608
  const cookie = await window.cookieStore.get(name);
7627
- return cookie?.value;
7609
+ return cookie === null || cookie === void 0 ? void 0 : cookie.value;
7628
7610
  }
7629
7611
  return getDocumentCookie(name);
7630
7612
  }
@@ -7835,7 +7817,7 @@ class Receiver {
7835
7817
  const messageEvent = event;
7836
7818
  const { eventId, eventType, data } = messageEvent.data;
7837
7819
  const handlers = this.handlersMap[eventType];
7838
- if (!handlers?.size) {
7820
+ if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {
7839
7821
  return;
7840
7822
  }
7841
7823
  messageEvent.ports[0].postMessage({
@@ -8071,19 +8053,20 @@ function _isWorker() {
8071
8053
  typeof _window()['importScripts'] === 'function');
8072
8054
  }
8073
8055
  async function _getActiveServiceWorker() {
8074
- if (!navigator?.serviceWorker) {
8056
+ if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {
8075
8057
  return null;
8076
8058
  }
8077
8059
  try {
8078
8060
  const registration = await navigator.serviceWorker.ready;
8079
8061
  return registration.active;
8080
8062
  }
8081
- catch {
8063
+ catch (_a) {
8082
8064
  return null;
8083
8065
  }
8084
8066
  }
8085
8067
  function _getServiceWorkerController() {
8086
- return navigator?.serviceWorker?.controller || null;
8068
+ var _a;
8069
+ return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;
8087
8070
  }
8088
8071
  function _getWorkerGlobalScope() {
8089
8072
  return _isWorker() ? self : null;
@@ -8266,6 +8249,7 @@ class IndexedDBLocalPersistence {
8266
8249
  * may not resolve.
8267
8250
  */
8268
8251
  async initializeSender() {
8252
+ var _a, _b;
8269
8253
  // Check to see if there's an active service worker.
8270
8254
  this.activeServiceWorker = await _getActiveServiceWorker();
8271
8255
  if (!this.activeServiceWorker) {
@@ -8277,8 +8261,8 @@ class IndexedDBLocalPersistence {
8277
8261
  if (!results) {
8278
8262
  return;
8279
8263
  }
8280
- if (results[0]?.fulfilled &&
8281
- results[0]?.value.includes("keyChanged" /* _EventType.KEY_CHANGED */)) {
8264
+ if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) &&
8265
+ ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes("keyChanged" /* _EventType.KEY_CHANGED */))) {
8282
8266
  this.serviceWorkerReceiverAvailable = true;
8283
8267
  }
8284
8268
  }
@@ -8304,7 +8288,7 @@ class IndexedDBLocalPersistence {
8304
8288
  ? 800 /* _TimeoutDuration.LONG_ACK */
8305
8289
  : 50 /* _TimeoutDuration.ACK */);
8306
8290
  }
8307
- catch {
8291
+ catch (_a) {
8308
8292
  // This is a best effort approach. Ignore errors.
8309
8293
  }
8310
8294
  }
@@ -8318,7 +8302,7 @@ class IndexedDBLocalPersistence {
8318
8302
  await _deleteObject(db, STORAGE_AVAILABLE_KEY);
8319
8303
  return true;
8320
8304
  }
8321
- catch { }
8305
+ catch (_a) { }
8322
8306
  return false;
8323
8307
  }
8324
8308
  async _withPendingWrite(write) {
@@ -8484,6 +8468,7 @@ const NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);
8484
8468
  */
8485
8469
  class ReCaptchaLoaderImpl {
8486
8470
  constructor() {
8471
+ var _a;
8487
8472
  this.hostLanguage = '';
8488
8473
  this.counter = 0;
8489
8474
  /**
@@ -8491,7 +8476,7 @@ class ReCaptchaLoaderImpl {
8491
8476
  * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but
8492
8477
  * `window.grecaptcha.render()` will not. Another load will add it.
8493
8478
  */
8494
- this.librarySeparatelyLoaded = !!_window().grecaptcha?.render;
8479
+ this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);
8495
8480
  }
8496
8481
  load(auth, hl = '') {
8497
8482
  _assert(isHostLanguageValid(hl), auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
@@ -8536,6 +8521,7 @@ class ReCaptchaLoaderImpl {
8536
8521
  this.counter--;
8537
8522
  }
8538
8523
  shouldResolveImmediately(hl) {
8524
+ var _a;
8539
8525
  // We can resolve immediately if:
8540
8526
  // • grecaptcha is already defined AND (
8541
8527
  // 1. the requested language codes are the same OR
@@ -8543,7 +8529,7 @@ class ReCaptchaLoaderImpl {
8543
8529
  // 3. the library was already loaded by the app
8544
8530
  // In cases (2) and (3), we _can't_ reload as it would break the recaptchas
8545
8531
  // that are already in the page
8546
- return (!!_window().grecaptcha?.render &&
8532
+ return (!!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) &&
8547
8533
  (hl === this.hostLanguage ||
8548
8534
  this.counter > 0 ||
8549
8535
  this.librarySeparatelyLoaded));
@@ -8608,9 +8594,7 @@ class RecaptchaVerifier {
8608
8594
  * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value
8609
8595
  * 'invisible'.
8610
8596
  */
8611
- constructor(authExtern, containerOrId, parameters = {
8612
- ...DEFAULT_PARAMS
8613
- }) {
8597
+ constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {
8614
8598
  this.parameters = parameters;
8615
8599
  /**
8616
8600
  * The application verifier type.
@@ -8894,6 +8878,7 @@ async function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {
8894
8878
  *
8895
8879
  */
8896
8880
  async function _verifyPhoneNumber(auth, options, verifier) {
8881
+ var _a;
8897
8882
  if (!auth._getRecaptchaConfig()) {
8898
8883
  try {
8899
8884
  await _initializeRecaptchaConfig(auth);
@@ -8930,7 +8915,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8930
8915
  const startEnrollPhoneMfaActionCallback = async (authInstance, request) => {
8931
8916
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8932
8917
  if (request.phoneEnrollmentInfo.captchaResponse === FAKE_TOKEN) {
8933
- _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8918
+ _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8934
8919
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8935
8920
  return startEnrollPhoneMfa(authInstance, requestWithRecaptchaV2);
8936
8921
  }
@@ -8944,7 +8929,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8944
8929
  }
8945
8930
  else {
8946
8931
  _assert(session.type === "signin" /* MultiFactorSessionType.SIGN_IN */, auth, "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
8947
- const mfaEnrollmentId = phoneInfoOptions.multiFactorHint?.uid ||
8932
+ const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) ||
8948
8933
  phoneInfoOptions.multiFactorUid;
8949
8934
  _assert(mfaEnrollmentId, auth, "missing-multi-factor-info" /* AuthErrorCode.MISSING_MFA_INFO */);
8950
8935
  const startPhoneMfaSignInRequest = {
@@ -8957,7 +8942,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8957
8942
  const startSignInPhoneMfaActionCallback = async (authInstance, request) => {
8958
8943
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8959
8944
  if (request.phoneSignInInfo.captchaResponse === FAKE_TOKEN) {
8960
- _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8945
+ _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8961
8946
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8962
8947
  return startSignInPhoneMfa(authInstance, requestWithRecaptchaV2);
8963
8948
  }
@@ -8978,7 +8963,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8978
8963
  const sendPhoneVerificationCodeActionCallback = async (authInstance, request) => {
8979
8964
  // If reCAPTCHA Enterprise token is FAKE_TOKEN, fetch reCAPTCHA v2 token and inject into request.
8980
8965
  if (request.captchaResponse === FAKE_TOKEN) {
8981
- _assert(verifier?.type === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8966
+ _assert((verifier === null || verifier === void 0 ? void 0 : verifier.type) === RECAPTCHA_VERIFIER_TYPE, authInstance, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
8982
8967
  const requestWithRecaptchaV2 = await injectRecaptchaV2Token(authInstance, request, verifier);
8983
8968
  return sendPhoneVerificationCode(authInstance, requestWithRecaptchaV2);
8984
8969
  }
@@ -8992,7 +8977,7 @@ async function _verifyPhoneNumber(auth, options, verifier) {
8992
8977
  }
8993
8978
  }
8994
8979
  finally {
8995
- verifier?._reset();
8980
+ verifier === null || verifier === void 0 ? void 0 : verifier._reset();
8996
8981
  }
8997
8982
  }
8998
8983
  /**
@@ -9030,7 +9015,7 @@ async function injectRecaptchaV2Token(auth, request, recaptchaV2Verifier) {
9030
9015
  _assert(recaptchaV2Verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9031
9016
  const recaptchaV2Token = await recaptchaV2Verifier.verify();
9032
9017
  _assert(typeof recaptchaV2Token === 'string', auth, "argument-error" /* AuthErrorCode.ARGUMENT_ERROR */);
9033
- const newRequest = { ...request };
9018
+ const newRequest = Object.assign({}, request);
9034
9019
  if ('phoneEnrollmentInfo' in newRequest) {
9035
9020
  const phoneNumber = newRequest.phoneEnrollmentInfo.phoneNumber;
9036
9021
  const captchaResponse = newRequest.phoneEnrollmentInfo.captchaResponse;
@@ -9604,7 +9589,8 @@ class PopupOperation extends AbstractPopupRedirectOperation {
9604
9589
  this.pollUserCancellation();
9605
9590
  }
9606
9591
  get eventId() {
9607
- return this.authWindow?.associatedEvent || null;
9592
+ var _a;
9593
+ return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;
9608
9594
  }
9609
9595
  cancel() {
9610
9596
  this.reject(_createError(this.auth, "cancelled-popup-request" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));
@@ -9622,7 +9608,8 @@ class PopupOperation extends AbstractPopupRedirectOperation {
9622
9608
  }
9623
9609
  pollUserCancellation() {
9624
9610
  const poll = () => {
9625
- if (this.authWindow?.window?.closed) {
9611
+ var _a, _b;
9612
+ if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {
9626
9613
  // Make sure that there is sufficient time for whatever action to
9627
9614
  // complete. The window could have closed but the sign in network
9628
9615
  // call could still be in flight. This is specifically true for
@@ -10060,8 +10047,9 @@ class AuthEventManager {
10060
10047
  return handled;
10061
10048
  }
10062
10049
  sendToConsumer(event, consumer) {
10050
+ var _a;
10063
10051
  if (event.error && !isNullRedirectEvent(event)) {
10064
- const code = event.error.code?.split('auth/')[1] ||
10052
+ const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) ||
10065
10053
  "internal-error" /* AuthErrorCode.INTERNAL_ERROR */;
10066
10054
  consumer.onError(_createError(this.auth, code));
10067
10055
  }
@@ -10091,7 +10079,7 @@ function eventUid(e) {
10091
10079
  }
10092
10080
  function isNullRedirectEvent({ type, error }) {
10093
10081
  return (type === "unknown" /* AuthEventType.UNKNOWN */ &&
10094
- error?.code === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
10082
+ (error === null || error === void 0 ? void 0 : error.code) === `auth/${"no-auth-event" /* AuthErrorCode.NO_AUTH_EVENT */}`);
10095
10083
  }
10096
10084
  function isRedirectEvent(event) {
10097
10085
  switch (event.type) {
@@ -10156,7 +10144,7 @@ async function _validateOrigin(auth) {
10156
10144
  return;
10157
10145
  }
10158
10146
  }
10159
- catch {
10147
+ catch (_a) {
10160
10148
  // Do nothing if there's a URL error; just continue searching
10161
10149
  }
10162
10150
  }
@@ -10219,7 +10207,7 @@ function resetUnloadedGapiModules() {
10219
10207
  // Get gapix.beacon context.
10220
10208
  const beacon = _window().___jsl;
10221
10209
  // Get current hint.
10222
- if (beacon?.H) {
10210
+ if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {
10223
10211
  // Get gapi hint.
10224
10212
  for (const hint of Object.keys(beacon.H)) {
10225
10213
  // Requested modules.
@@ -10240,6 +10228,7 @@ function resetUnloadedGapiModules() {
10240
10228
  }
10241
10229
  function loadGapi(auth) {
10242
10230
  return new Promise((resolve, reject) => {
10231
+ var _a, _b, _c;
10243
10232
  // Function to run when gapi.load is ready.
10244
10233
  function loadGapiIframe() {
10245
10234
  // The developer may have tried to previously run gapi.load and failed.
@@ -10262,11 +10251,11 @@ function loadGapi(auth) {
10262
10251
  timeout: NETWORK_TIMEOUT.get()
10263
10252
  });
10264
10253
  }
10265
- if (_window().gapi?.iframes?.Iframe) {
10254
+ if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {
10266
10255
  // If gapi.iframes.Iframe available, resolve.
10267
10256
  resolve(gapi.iframes.getContext());
10268
10257
  }
10269
- else if (!!_window().gapi?.load) {
10258
+ else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {
10270
10259
  // Gapi loader ready, load gapi.iframes.
10271
10260
  loadGapiIframe();
10272
10261
  }
@@ -10439,13 +10428,8 @@ function _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT)
10439
10428
  const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();
10440
10429
  const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();
10441
10430
  let target = '';
10442
- const options = {
10443
- ...BASE_POPUP_OPTIONS,
10444
- width: width.toString(),
10445
- height: height.toString(),
10446
- top,
10447
- left
10448
- };
10431
+ const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), { width: width.toString(), height: height.toString(), top,
10432
+ left });
10449
10433
  // Chrome iOS 7 and 8 is returning an undefined popup win when target is
10450
10434
  // specified, even though the popup is not necessarily blocked.
10451
10435
  const ua = util.getUA().toLowerCase();
@@ -10605,7 +10589,8 @@ class BrowserPopupRedirectResolver {
10605
10589
  // Wrapping in async even though we don't await anywhere in order
10606
10590
  // to make sure errors are raised as promise rejections
10607
10591
  async _openPopup(auth, provider, authType, eventId) {
10608
- debugAssert(this.eventManagers[auth._key()]?.manager, '_initialize() not called before _openPopup()');
10592
+ var _a;
10593
+ debugAssert((_a = this.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');
10609
10594
  const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);
10610
10595
  return _open(auth, url, _generateEventId());
10611
10596
  }
@@ -10640,7 +10625,7 @@ class BrowserPopupRedirectResolver {
10640
10625
  const iframe = await _openIframe(auth);
10641
10626
  const manager = new AuthEventManager(auth);
10642
10627
  iframe.register('authEvent', (iframeEvent) => {
10643
- _assert(iframeEvent?.authEvent, auth, "invalid-auth-event" /* AuthErrorCode.INVALID_AUTH_EVENT */);
10628
+ _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, "invalid-auth-event" /* AuthErrorCode.INVALID_AUTH_EVENT */);
10644
10629
  // TODO: Consider splitting redirect and popup events earlier on
10645
10630
  const handled = manager.onEvent(iframeEvent.authEvent);
10646
10631
  return { status: handled ? "ACK" /* GapiOutcome.ACK */ : "ERROR" /* GapiOutcome.ERROR */ };
@@ -10652,7 +10637,8 @@ class BrowserPopupRedirectResolver {
10652
10637
  _isIframeWebStorageSupported(auth, cb) {
10653
10638
  const iframe = this.iframes[auth._key()];
10654
10639
  iframe.send(WEB_STORAGE_SUPPORT_KEY, { type: WEB_STORAGE_SUPPORT_KEY }, result => {
10655
- const isSupported = result?.[0]?.[WEB_STORAGE_SUPPORT_KEY];
10640
+ var _a;
10641
+ const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];
10656
10642
  if (isSupported !== undefined) {
10657
10643
  cb(!!isSupported);
10658
10644
  }
@@ -10795,8 +10781,9 @@ class TotpMultiFactorGenerator {
10795
10781
  * @returns A promise to {@link TotpSecret}.
10796
10782
  */
10797
10783
  static async generateSecret(session) {
10784
+ var _a;
10798
10785
  const mfaSession = session;
10799
- _assert(typeof mfaSession.user?.auth !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
10786
+ _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', "internal-error" /* AuthErrorCode.INTERNAL_ERROR */);
10800
10787
  const response = await startEnrollTotpMfa(mfaSession.user.auth, {
10801
10788
  idToken: mfaSession.credential,
10802
10789
  totpEnrollmentInfo: {}
@@ -10880,13 +10867,14 @@ class TotpSecret {
10880
10867
  * @returns A QR code URL string.
10881
10868
  */
10882
10869
  generateQrCodeUrl(accountName, issuer) {
10870
+ var _a;
10883
10871
  let useDefaults = false;
10884
10872
  if (_isEmptyString(accountName) || _isEmptyString(issuer)) {
10885
10873
  useDefaults = true;
10886
10874
  }
10887
10875
  if (useDefaults) {
10888
10876
  if (_isEmptyString(accountName)) {
10889
- accountName = this.auth.currentUser?.email || 'unknownuser';
10877
+ accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';
10890
10878
  }
10891
10879
  if (_isEmptyString(issuer)) {
10892
10880
  issuer = this.auth.name;
@@ -10897,11 +10885,11 @@ class TotpSecret {
10897
10885
  }
10898
10886
  /** @internal */
10899
10887
  function _isEmptyString(input) {
10900
- return typeof input === 'undefined' || input?.length === 0;
10888
+ return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;
10901
10889
  }
10902
10890
 
10903
10891
  var name = "@firebase/auth";
10904
- var version = "1.10.8-canary.2d720995d";
10892
+ var version = "1.10.8-canary.f11b55294";
10905
10893
 
10906
10894
  /**
10907
10895
  * @license
@@ -10925,8 +10913,9 @@ class AuthInterop {
10925
10913
  this.internalListeners = new Map();
10926
10914
  }
10927
10915
  getUid() {
10916
+ var _a;
10928
10917
  this.assertAuthConfigured();
10929
- return this.auth.currentUser?.uid || null;
10918
+ return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;
10930
10919
  }
10931
10920
  async getToken(forceRefresh) {
10932
10921
  this.assertAuthConfigured();
@@ -10943,7 +10932,7 @@ class AuthInterop {
10943
10932
  return;
10944
10933
  }
10945
10934
  const unsubscribe = this.auth.onIdTokenChanged(user => {
10946
- listener(user?.stsTokenManager.accessToken || null);
10935
+ listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
10947
10936
  });
10948
10937
  this.internalListeners.set(listener, unsubscribe);
10949
10938
  this.updateProactiveRefresh();
@@ -11042,8 +11031,8 @@ function registerAuth(clientPlatform) {
11042
11031
  return (auth => new AuthInterop(auth))(auth);
11043
11032
  }, "PRIVATE" /* ComponentType.PRIVATE */).setInstantiationMode("EXPLICIT" /* InstantiationMode.EXPLICIT */));
11044
11033
  app.registerVersion(name, version, getVersionForPlatform(clientPlatform));
11045
- // BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
11046
- app.registerVersion(name, version, 'cjs2020');
11034
+ // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
11035
+ app.registerVersion(name, version, 'cjs2017');
11047
11036
  }
11048
11037
 
11049
11038
  /**
@@ -11073,7 +11062,7 @@ const mintCookieFactory = (url) => async (user) => {
11073
11062
  return;
11074
11063
  }
11075
11064
  // Specifically trip null => undefined when logged out, to delete any existing cookie
11076
- const idToken = idTokenResult?.token;
11065
+ const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
11077
11066
  if (lastPostedIdToken === idToken) {
11078
11067
  return;
11079
11068
  }
@@ -11128,7 +11117,8 @@ function getAuth(app$1 = app.getApp()) {
11128
11117
  return auth;
11129
11118
  }
11130
11119
  function getScriptParentElement() {
11131
- return document.getElementsByTagName('head')?.[0] ?? document;
11120
+ var _a, _b;
11121
+ return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;
11132
11122
  }
11133
11123
  _setExternalJSProvider({
11134
11124
  loadJS(url) {
@@ -11261,4 +11251,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
11261
11251
  exports.validatePassword = validatePassword;
11262
11252
  exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
11263
11253
  exports.verifyPasswordResetCode = verifyPasswordResetCode;
11264
- //# sourceMappingURL=index-6ce158e3.js.map
11254
+ //# sourceMappingURL=index-8213225f.js.map