summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@firebase/component/dist
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-11-16 19:08:29 +0800
committeraltaf-creator <dev@altafcreator.com>2025-11-16 19:08:29 +0800
commit434aa8343fdcbb4d5002f934979913c099489bee (patch)
tree55bab4ec5a6151be57797d34f61faf5ea744471b /frontend-old/node_modules/@firebase/component/dist
parent893c388d4e99442a36005e5971a87730623f946e (diff)
sdk, del
Diffstat (limited to 'frontend-old/node_modules/@firebase/component/dist')
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/index.d.ts20
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js408
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js.map1
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/package.json1
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/src/component.d.ts43
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/src/component_container.d.ts47
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/src/constants.d.ts17
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/src/provider.d.ts79
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/src/types.d.ts62
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/test/setup.d.ts17
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/esm/test/util.d.ts5
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/index.cjs.js414
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/index.cjs.js.map1
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/index.d.ts20
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/src/component.d.ts43
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/src/component_container.d.ts47
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/src/constants.d.ts17
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/src/provider.d.ts79
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/src/types.d.ts62
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/test/setup.d.ts17
-rw-r--r--frontend-old/node_modules/@firebase/component/dist/test/util.d.ts5
21 files changed, 0 insertions, 1405 deletions
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/index.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/index.d.ts
deleted file mode 100644
index 7b21e7b..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/index.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * @license
- * Copyright 2017 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export { Component } from './src/component';
-export { ComponentContainer } from './src/component_container';
-export { Provider } from './src/provider';
-export { ComponentType, InstanceFactory, InstantiationMode, NameServiceMapping, Name, InstanceFactoryOptions } from './src/types';
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js b/frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js
deleted file mode 100644
index 2c1c094..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js
+++ /dev/null
@@ -1,408 +0,0 @@
-import { Deferred } from '@firebase/util';
-
-/**
- * Component for service name T, e.g. `auth`, `auth-internal`
- */
-class Component {
- /**
- *
- * @param name The public service name, e.g. app, auth, firestore, database
- * @param instanceFactory Service factory responsible for creating the public interface
- * @param type whether the service provided by the component is public or private
- */
- constructor(name, instanceFactory, type) {
- this.name = name;
- this.instanceFactory = instanceFactory;
- this.type = type;
- this.multipleInstances = false;
- /**
- * Properties to be added to the service namespace
- */
- this.serviceProps = {};
- this.instantiationMode = "LAZY" /* InstantiationMode.LAZY */;
- this.onInstanceCreated = null;
- }
- setInstantiationMode(mode) {
- this.instantiationMode = mode;
- return this;
- }
- setMultipleInstances(multipleInstances) {
- this.multipleInstances = multipleInstances;
- return this;
- }
- setServiceProps(props) {
- this.serviceProps = props;
- return this;
- }
- setInstanceCreatedCallback(callback) {
- this.onInstanceCreated = callback;
- return this;
- }
-}
-
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-const DEFAULT_ENTRY_NAME = '[DEFAULT]';
-
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Provider for instance for service name T, e.g. 'auth', 'auth-internal'
- * NameServiceMapping[T] is an alias for the type of the instance
- */
-class Provider {
- constructor(name, container) {
- this.name = name;
- this.container = container;
- this.component = null;
- this.instances = new Map();
- this.instancesDeferred = new Map();
- this.instancesOptions = new Map();
- this.onInitCallbacks = new Map();
- }
- /**
- * @param identifier A provider can provide multiple instances of a service
- * if this.component.multipleInstances is true.
- */
- get(identifier) {
- // if multipleInstances is not supported, use the default name
- const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
- if (!this.instancesDeferred.has(normalizedIdentifier)) {
- const deferred = new Deferred();
- this.instancesDeferred.set(normalizedIdentifier, deferred);
- if (this.isInitialized(normalizedIdentifier) ||
- this.shouldAutoInitialize()) {
- // initialize the service if it can be auto-initialized
- try {
- const instance = this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier
- });
- if (instance) {
- deferred.resolve(instance);
- }
- }
- catch (e) {
- // when the instance factory throws an exception during get(), it should not cause
- // a fatal error. We just return the unresolved promise in this case.
- }
- }
- }
- return this.instancesDeferred.get(normalizedIdentifier).promise;
- }
- getImmediate(options) {
- // if multipleInstances is not supported, use the default name
- const normalizedIdentifier = this.normalizeInstanceIdentifier(options?.identifier);
- const optional = options?.optional ?? false;
- if (this.isInitialized(normalizedIdentifier) ||
- this.shouldAutoInitialize()) {
- try {
- return this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier
- });
- }
- catch (e) {
- if (optional) {
- return null;
- }
- else {
- throw e;
- }
- }
- }
- else {
- // In case a component is not initialized and should/cannot be auto-initialized at the moment, return null if the optional flag is set, or throw
- if (optional) {
- return null;
- }
- else {
- throw Error(`Service ${this.name} is not available`);
- }
- }
- }
- getComponent() {
- return this.component;
- }
- setComponent(component) {
- if (component.name !== this.name) {
- throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);
- }
- if (this.component) {
- throw Error(`Component for ${this.name} has already been provided`);
- }
- this.component = component;
- // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)
- if (!this.shouldAutoInitialize()) {
- return;
- }
- // if the service is eager, initialize the default instance
- if (isComponentEager(component)) {
- try {
- this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });
- }
- catch (e) {
- // when the instance factory for an eager Component throws an exception during the eager
- // initialization, it should not cause a fatal error.
- // TODO: Investigate if we need to make it configurable, because some component may want to cause
- // a fatal error in this case?
- }
- }
- // Create service instances for the pending promises and resolve them
- // NOTE: if this.multipleInstances is false, only the default instance will be created
- // and all promises with resolve with it regardless of the identifier.
- for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {
- const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);
- try {
- // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.
- const instance = this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier
- });
- instanceDeferred.resolve(instance);
- }
- catch (e) {
- // when the instance factory throws an exception, it should not cause
- // a fatal error. We just leave the promise unresolved.
- }
- }
- }
- clearInstance(identifier = DEFAULT_ENTRY_NAME) {
- this.instancesDeferred.delete(identifier);
- this.instancesOptions.delete(identifier);
- this.instances.delete(identifier);
- }
- // app.delete() will call this method on every provider to delete the services
- // TODO: should we mark the provider as deleted?
- async delete() {
- const services = Array.from(this.instances.values());
- await Promise.all([
- ...services
- .filter(service => 'INTERNAL' in service) // legacy services
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- .map(service => service.INTERNAL.delete()),
- ...services
- .filter(service => '_delete' in service) // modularized services
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- .map(service => service._delete())
- ]);
- }
- isComponentSet() {
- return this.component != null;
- }
- isInitialized(identifier = DEFAULT_ENTRY_NAME) {
- return this.instances.has(identifier);
- }
- getOptions(identifier = DEFAULT_ENTRY_NAME) {
- return this.instancesOptions.get(identifier) || {};
- }
- initialize(opts = {}) {
- const { options = {} } = opts;
- const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);
- if (this.isInitialized(normalizedIdentifier)) {
- throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);
- }
- if (!this.isComponentSet()) {
- throw Error(`Component ${this.name} has not been registered yet`);
- }
- const instance = this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier,
- options
- });
- // resolve any pending promise waiting for the service instance
- for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {
- const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);
- if (normalizedIdentifier === normalizedDeferredIdentifier) {
- instanceDeferred.resolve(instance);
- }
- }
- return instance;
- }
- /**
- *
- * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
- * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
- *
- * @param identifier An optional instance identifier
- * @returns a function to unregister the callback
- */
- onInit(callback, identifier) {
- const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
- const existingCallbacks = this.onInitCallbacks.get(normalizedIdentifier) ??
- new Set();
- existingCallbacks.add(callback);
- this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);
- const existingInstance = this.instances.get(normalizedIdentifier);
- if (existingInstance) {
- callback(existingInstance, normalizedIdentifier);
- }
- return () => {
- existingCallbacks.delete(callback);
- };
- }
- /**
- * Invoke onInit callbacks synchronously
- * @param instance the service instance`
- */
- invokeOnInitCallbacks(instance, identifier) {
- const callbacks = this.onInitCallbacks.get(identifier);
- if (!callbacks) {
- return;
- }
- for (const callback of callbacks) {
- try {
- callback(instance, identifier);
- }
- catch {
- // ignore errors in the onInit callback
- }
- }
- }
- getOrInitializeService({ instanceIdentifier, options = {} }) {
- let instance = this.instances.get(instanceIdentifier);
- if (!instance && this.component) {
- instance = this.component.instanceFactory(this.container, {
- instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),
- options
- });
- this.instances.set(instanceIdentifier, instance);
- this.instancesOptions.set(instanceIdentifier, options);
- /**
- * Invoke onInit listeners.
- * Note this.component.onInstanceCreated is different, which is used by the component creator,
- * while onInit listeners are registered by consumers of the provider.
- */
- this.invokeOnInitCallbacks(instance, instanceIdentifier);
- /**
- * Order is important
- * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which
- * makes `isInitialized()` return true.
- */
- if (this.component.onInstanceCreated) {
- try {
- this.component.onInstanceCreated(this.container, instanceIdentifier, instance);
- }
- catch {
- // ignore errors in the onInstanceCreatedCallback
- }
- }
- }
- return instance || null;
- }
- normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {
- if (this.component) {
- return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;
- }
- else {
- return identifier; // assume multiple instances are supported before the component is provided.
- }
- }
- shouldAutoInitialize() {
- return (!!this.component &&
- this.component.instantiationMode !== "EXPLICIT" /* InstantiationMode.EXPLICIT */);
- }
-}
-// undefined should be passed to the service factory for the default instance
-function normalizeIdentifierForFactory(identifier) {
- return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;
-}
-function isComponentEager(component) {
- return component.instantiationMode === "EAGER" /* InstantiationMode.EAGER */;
-}
-
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`
- */
-class ComponentContainer {
- constructor(name) {
- this.name = name;
- this.providers = new Map();
- }
- /**
- *
- * @param component Component being added
- * @param overwrite When a component with the same name has already been registered,
- * if overwrite is true: overwrite the existing component with the new component and create a new
- * provider with the new component. It can be useful in tests where you want to use different mocks
- * for different tests.
- * if overwrite is false: throw an exception
- */
- addComponent(component) {
- const provider = this.getProvider(component.name);
- if (provider.isComponentSet()) {
- throw new Error(`Component ${component.name} has already been registered with ${this.name}`);
- }
- provider.setComponent(component);
- }
- addOrOverwriteComponent(component) {
- const provider = this.getProvider(component.name);
- if (provider.isComponentSet()) {
- // delete the existing provider from the container, so we can register the new component
- this.providers.delete(component.name);
- }
- this.addComponent(component);
- }
- /**
- * getProvider provides a type safe interface where it can only be called with a field name
- * present in NameServiceMapping interface.
- *
- * Firebase SDKs providing services should extend NameServiceMapping interface to register
- * themselves.
- */
- getProvider(name) {
- if (this.providers.has(name)) {
- return this.providers.get(name);
- }
- // create a Provider for a service that hasn't registered with Firebase
- const provider = new Provider(name, this);
- this.providers.set(name, provider);
- return provider;
- }
- getProviders() {
- return Array.from(this.providers.values());
- }
-}
-
-export { Component, ComponentContainer, Provider };
-//# sourceMappingURL=index.esm.js.map
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js.map b/frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js.map
deleted file mode 100644
index 78b937f..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/index.esm.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.esm.js","sources":["../../src/component.ts","../../src/constants.ts","../../src/provider.ts","../../src/component_container.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n InstantiationMode,\n InstanceFactory,\n ComponentType,\n Dictionary,\n Name,\n onInstanceCreatedCallback\n} from './types';\n\n/**\n * Component for service name T, e.g. `auth`, `auth-internal`\n */\nexport class Component<T extends Name = Name> {\n multipleInstances = false;\n /**\n * Properties to be added to the service namespace\n */\n serviceProps: Dictionary = {};\n\n instantiationMode = InstantiationMode.LAZY;\n\n onInstanceCreated: onInstanceCreatedCallback<T> | null = null;\n\n /**\n *\n * @param name The public service name, e.g. app, auth, firestore, database\n * @param instanceFactory Service factory responsible for creating the public interface\n * @param type whether the service provided by the component is public or private\n */\n constructor(\n readonly name: T,\n readonly instanceFactory: InstanceFactory<T>,\n readonly type: ComponentType\n ) {}\n\n setInstantiationMode(mode: InstantiationMode): this {\n this.instantiationMode = mode;\n return this;\n }\n\n setMultipleInstances(multipleInstances: boolean): this {\n this.multipleInstances = multipleInstances;\n return this;\n }\n\n setServiceProps(props: Dictionary): this {\n this.serviceProps = props;\n return this;\n }\n\n setInstanceCreatedCallback(callback: onInstanceCreatedCallback<T>): this {\n this.onInstanceCreated = callback;\n return this;\n }\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const DEFAULT_ENTRY_NAME = '[DEFAULT]';\n","/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Deferred } from '@firebase/util';\nimport { ComponentContainer } from './component_container';\nimport { DEFAULT_ENTRY_NAME } from './constants';\nimport {\n InitializeOptions,\n InstantiationMode,\n Name,\n NameServiceMapping,\n OnInitCallBack\n} from './types';\nimport { Component } from './component';\n\n/**\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\n * NameServiceMapping[T] is an alias for the type of the instance\n */\nexport class Provider<T extends Name> {\n private component: Component<T> | null = null;\n private readonly instances: Map<string, NameServiceMapping[T]> = new Map();\n private readonly instancesDeferred: Map<\n string,\n Deferred<NameServiceMapping[T]>\n > = new Map();\n private readonly instancesOptions: Map<string, Record<string, unknown>> =\n new Map();\n private onInitCallbacks: Map<string, Set<OnInitCallBack<T>>> = new Map();\n\n constructor(\n private readonly name: T,\n private readonly container: ComponentContainer\n ) {}\n\n /**\n * @param identifier A provider can provide multiple instances of a service\n * if this.component.multipleInstances is true.\n */\n get(identifier?: string): Promise<NameServiceMapping[T]> {\n // if multipleInstances is not supported, use the default name\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n\n if (!this.instancesDeferred.has(normalizedIdentifier)) {\n const deferred = new Deferred<NameServiceMapping[T]>();\n this.instancesDeferred.set(normalizedIdentifier, deferred);\n\n if (\n this.isInitialized(normalizedIdentifier) ||\n this.shouldAutoInitialize()\n ) {\n // initialize the service if it can be auto-initialized\n try {\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n if (instance) {\n deferred.resolve(instance);\n }\n } catch (e) {\n // when the instance factory throws an exception during get(), it should not cause\n // a fatal error. We just return the unresolved promise in this case.\n }\n }\n }\n\n return this.instancesDeferred.get(normalizedIdentifier)!.promise;\n }\n\n /**\n *\n * @param options.identifier A provider can provide multiple instances of a service\n * if this.component.multipleInstances is true.\n * @param options.optional If optional is false or not provided, the method throws an error when\n * the service is not immediately available.\n * If optional is true, the method returns null if the service is not immediately available.\n */\n getImmediate(options: {\n identifier?: string;\n optional: true;\n }): NameServiceMapping[T] | null;\n getImmediate(options?: {\n identifier?: string;\n optional?: false;\n }): NameServiceMapping[T];\n getImmediate(options?: {\n identifier?: string;\n optional?: boolean;\n }): NameServiceMapping[T] | null {\n // if multipleInstances is not supported, use the default name\n const normalizedIdentifier = this.normalizeInstanceIdentifier(\n options?.identifier\n );\n const optional = options?.optional ?? false;\n\n if (\n this.isInitialized(normalizedIdentifier) ||\n this.shouldAutoInitialize()\n ) {\n try {\n return this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n } catch (e) {\n if (optional) {\n return null;\n } else {\n throw e;\n }\n }\n } else {\n // In case a component is not initialized and should/cannot be auto-initialized at the moment, return null if the optional flag is set, or throw\n if (optional) {\n return null;\n } else {\n throw Error(`Service ${this.name} is not available`);\n }\n }\n }\n\n getComponent(): Component<T> | null {\n return this.component;\n }\n\n setComponent(component: Component<T>): void {\n if (component.name !== this.name) {\n throw Error(\n `Mismatching Component ${component.name} for Provider ${this.name}.`\n );\n }\n\n if (this.component) {\n throw Error(`Component for ${this.name} has already been provided`);\n }\n\n this.component = component;\n\n // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\n if (!this.shouldAutoInitialize()) {\n return;\n }\n\n // if the service is eager, initialize the default instance\n if (isComponentEager(component)) {\n try {\n this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });\n } catch (e) {\n // when the instance factory for an eager Component throws an exception during the eager\n // initialization, it should not cause a fatal error.\n // TODO: Investigate if we need to make it configurable, because some component may want to cause\n // a fatal error in this case?\n }\n }\n\n // Create service instances for the pending promises and resolve them\n // NOTE: if this.multipleInstances is false, only the default instance will be created\n // and all promises with resolve with it regardless of the identifier.\n for (const [\n instanceIdentifier,\n instanceDeferred\n ] of this.instancesDeferred.entries()) {\n const normalizedIdentifier =\n this.normalizeInstanceIdentifier(instanceIdentifier);\n\n try {\n // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n })!;\n instanceDeferred.resolve(instance);\n } catch (e) {\n // when the instance factory throws an exception, it should not cause\n // a fatal error. We just leave the promise unresolved.\n }\n }\n }\n\n clearInstance(identifier: string = DEFAULT_ENTRY_NAME): void {\n this.instancesDeferred.delete(identifier);\n this.instancesOptions.delete(identifier);\n this.instances.delete(identifier);\n }\n\n // app.delete() will call this method on every provider to delete the services\n // TODO: should we mark the provider as deleted?\n async delete(): Promise<void> {\n const services = Array.from(this.instances.values());\n\n await Promise.all([\n ...services\n .filter(service => 'INTERNAL' in service) // legacy services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(service => (service as any).INTERNAL!.delete()),\n ...services\n .filter(service => '_delete' in service) // modularized services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(service => (service as any)._delete())\n ]);\n }\n\n isComponentSet(): boolean {\n return this.component != null;\n }\n\n isInitialized(identifier: string = DEFAULT_ENTRY_NAME): boolean {\n return this.instances.has(identifier);\n }\n\n getOptions(identifier: string = DEFAULT_ENTRY_NAME): Record<string, unknown> {\n return this.instancesOptions.get(identifier) || {};\n }\n\n initialize(opts: InitializeOptions = {}): NameServiceMapping[T] {\n const { options = {} } = opts;\n const normalizedIdentifier = this.normalizeInstanceIdentifier(\n opts.instanceIdentifier\n );\n if (this.isInitialized(normalizedIdentifier)) {\n throw Error(\n `${this.name}(${normalizedIdentifier}) has already been initialized`\n );\n }\n\n if (!this.isComponentSet()) {\n throw Error(`Component ${this.name} has not been registered yet`);\n }\n\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier,\n options\n })!;\n\n // resolve any pending promise waiting for the service instance\n for (const [\n instanceIdentifier,\n instanceDeferred\n ] of this.instancesDeferred.entries()) {\n const normalizedDeferredIdentifier =\n this.normalizeInstanceIdentifier(instanceIdentifier);\n if (normalizedIdentifier === normalizedDeferredIdentifier) {\n instanceDeferred.resolve(instance);\n }\n }\n\n return instance;\n }\n\n /**\n *\n * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().\n * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\n *\n * @param identifier An optional instance identifier\n * @returns a function to unregister the callback\n */\n onInit(callback: OnInitCallBack<T>, identifier?: string): () => void {\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n const existingCallbacks =\n this.onInitCallbacks.get(normalizedIdentifier) ??\n new Set<OnInitCallBack<T>>();\n existingCallbacks.add(callback);\n this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\n\n const existingInstance = this.instances.get(normalizedIdentifier);\n if (existingInstance) {\n callback(existingInstance, normalizedIdentifier);\n }\n\n return () => {\n existingCallbacks.delete(callback);\n };\n }\n\n /**\n * Invoke onInit callbacks synchronously\n * @param instance the service instance`\n */\n private invokeOnInitCallbacks(\n instance: NameServiceMapping[T],\n identifier: string\n ): void {\n const callbacks = this.onInitCallbacks.get(identifier);\n if (!callbacks) {\n return;\n }\n for (const callback of callbacks) {\n try {\n callback(instance, identifier);\n } catch {\n // ignore errors in the onInit callback\n }\n }\n }\n\n private getOrInitializeService({\n instanceIdentifier,\n options = {}\n }: {\n instanceIdentifier: string;\n options?: Record<string, unknown>;\n }): NameServiceMapping[T] | null {\n let instance = this.instances.get(instanceIdentifier);\n if (!instance && this.component) {\n instance = this.component.instanceFactory(this.container, {\n instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\n options\n });\n this.instances.set(instanceIdentifier, instance!);\n this.instancesOptions.set(instanceIdentifier, options);\n\n /**\n * Invoke onInit listeners.\n * Note this.component.onInstanceCreated is different, which is used by the component creator,\n * while onInit listeners are registered by consumers of the provider.\n */\n this.invokeOnInitCallbacks(instance!, instanceIdentifier);\n\n /**\n * Order is important\n * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\n * makes `isInitialized()` return true.\n */\n if (this.component.onInstanceCreated) {\n try {\n this.component.onInstanceCreated(\n this.container,\n instanceIdentifier,\n instance!\n );\n } catch {\n // ignore errors in the onInstanceCreatedCallback\n }\n }\n }\n\n return instance || null;\n }\n\n private normalizeInstanceIdentifier(\n identifier: string = DEFAULT_ENTRY_NAME\n ): string {\n if (this.component) {\n return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\n } else {\n return identifier; // assume multiple instances are supported before the component is provided.\n }\n }\n\n private shouldAutoInitialize(): boolean {\n return (\n !!this.component &&\n this.component.instantiationMode !== InstantiationMode.EXPLICIT\n );\n }\n}\n\n// undefined should be passed to the service factory for the default instance\nfunction normalizeIdentifierForFactory(identifier: string): string | undefined {\n return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\n}\n\nfunction isComponentEager<T extends Name>(component: Component<T>): boolean {\n return component.instantiationMode === InstantiationMode.EAGER;\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Provider } from './provider';\nimport { Component } from './component';\nimport { Name } from './types';\n\n/**\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\n */\nexport class ComponentContainer {\n private readonly providers = new Map<string, Provider<Name>>();\n\n constructor(private readonly name: string) {}\n\n /**\n *\n * @param component Component being added\n * @param overwrite When a component with the same name has already been registered,\n * if overwrite is true: overwrite the existing component with the new component and create a new\n * provider with the new component. It can be useful in tests where you want to use different mocks\n * for different tests.\n * if overwrite is false: throw an exception\n */\n addComponent<T extends Name>(component: Component<T>): void {\n const provider = this.getProvider(component.name);\n if (provider.isComponentSet()) {\n throw new Error(\n `Component ${component.name} has already been registered with ${this.name}`\n );\n }\n\n provider.setComponent(component);\n }\n\n addOrOverwriteComponent<T extends Name>(component: Component<T>): void {\n const provider = this.getProvider(component.name);\n if (provider.isComponentSet()) {\n // delete the existing provider from the container, so we can register the new component\n this.providers.delete(component.name);\n }\n\n this.addComponent(component);\n }\n\n /**\n * getProvider provides a type safe interface where it can only be called with a field name\n * present in NameServiceMapping interface.\n *\n * Firebase SDKs providing services should extend NameServiceMapping interface to register\n * themselves.\n */\n getProvider<T extends Name>(name: T): Provider<T> {\n if (this.providers.has(name)) {\n return this.providers.get(name) as unknown as Provider<T>;\n }\n\n // create a Provider for a service that hasn't registered with Firebase\n const provider = new Provider<T>(name, this);\n this.providers.set(name, provider as unknown as Provider<Name>);\n\n return provider as Provider<T>;\n }\n\n getProviders(): Array<Provider<Name>> {\n return Array.from(this.providers.values());\n }\n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,CAAC,EAAE;YAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAA2B,CAAC;SAC3D;;QAGD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAqC,CAAC,CAAC;AAEhE,QAAA,OAAO,QAAuB,CAAC;KAChC;IAED,YAAY,GAAA;QACV,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;KAC5C;AACF;;;;"} \ No newline at end of file
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/package.json b/frontend-old/node_modules/@firebase/component/dist/esm/package.json
deleted file mode 100644
index 7c34deb..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"type":"module"} \ No newline at end of file
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/src/component.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/src/component.d.ts
deleted file mode 100644
index debdf77..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/src/component.d.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { InstantiationMode, InstanceFactory, ComponentType, Dictionary, Name, onInstanceCreatedCallback } from './types';
-/**
- * Component for service name T, e.g. `auth`, `auth-internal`
- */
-export declare class Component<T extends Name = Name> {
- readonly name: T;
- readonly instanceFactory: InstanceFactory<T>;
- readonly type: ComponentType;
- multipleInstances: boolean;
- /**
- * Properties to be added to the service namespace
- */
- serviceProps: Dictionary;
- instantiationMode: InstantiationMode;
- onInstanceCreated: onInstanceCreatedCallback<T> | null;
- /**
- *
- * @param name The public service name, e.g. app, auth, firestore, database
- * @param instanceFactory Service factory responsible for creating the public interface
- * @param type whether the service provided by the component is public or private
- */
- constructor(name: T, instanceFactory: InstanceFactory<T>, type: ComponentType);
- setInstantiationMode(mode: InstantiationMode): this;
- setMultipleInstances(multipleInstances: boolean): this;
- setServiceProps(props: Dictionary): this;
- setInstanceCreatedCallback(callback: onInstanceCreatedCallback<T>): this;
-}
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/src/component_container.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/src/component_container.d.ts
deleted file mode 100644
index a1322f3..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/src/component_container.d.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { Provider } from './provider';
-import { Component } from './component';
-import { Name } from './types';
-/**
- * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`
- */
-export declare class ComponentContainer {
- private readonly name;
- private readonly providers;
- constructor(name: string);
- /**
- *
- * @param component Component being added
- * @param overwrite When a component with the same name has already been registered,
- * if overwrite is true: overwrite the existing component with the new component and create a new
- * provider with the new component. It can be useful in tests where you want to use different mocks
- * for different tests.
- * if overwrite is false: throw an exception
- */
- addComponent<T extends Name>(component: Component<T>): void;
- addOrOverwriteComponent<T extends Name>(component: Component<T>): void;
- /**
- * getProvider provides a type safe interface where it can only be called with a field name
- * present in NameServiceMapping interface.
- *
- * Firebase SDKs providing services should extend NameServiceMapping interface to register
- * themselves.
- */
- getProvider<T extends Name>(name: T): Provider<T>;
- getProviders(): Array<Provider<Name>>;
-}
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/src/constants.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/src/constants.d.ts
deleted file mode 100644
index b069f4e..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/src/constants.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export declare const DEFAULT_ENTRY_NAME = "[DEFAULT]";
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/src/provider.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/src/provider.d.ts
deleted file mode 100644
index 8039aff..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/src/provider.d.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { ComponentContainer } from './component_container';
-import { InitializeOptions, Name, NameServiceMapping, OnInitCallBack } from './types';
-import { Component } from './component';
-/**
- * Provider for instance for service name T, e.g. 'auth', 'auth-internal'
- * NameServiceMapping[T] is an alias for the type of the instance
- */
-export declare class Provider<T extends Name> {
- private readonly name;
- private readonly container;
- private component;
- private readonly instances;
- private readonly instancesDeferred;
- private readonly instancesOptions;
- private onInitCallbacks;
- constructor(name: T, container: ComponentContainer);
- /**
- * @param identifier A provider can provide multiple instances of a service
- * if this.component.multipleInstances is true.
- */
- get(identifier?: string): Promise<NameServiceMapping[T]>;
- /**
- *
- * @param options.identifier A provider can provide multiple instances of a service
- * if this.component.multipleInstances is true.
- * @param options.optional If optional is false or not provided, the method throws an error when
- * the service is not immediately available.
- * If optional is true, the method returns null if the service is not immediately available.
- */
- getImmediate(options: {
- identifier?: string;
- optional: true;
- }): NameServiceMapping[T] | null;
- getImmediate(options?: {
- identifier?: string;
- optional?: false;
- }): NameServiceMapping[T];
- getComponent(): Component<T> | null;
- setComponent(component: Component<T>): void;
- clearInstance(identifier?: string): void;
- delete(): Promise<void>;
- isComponentSet(): boolean;
- isInitialized(identifier?: string): boolean;
- getOptions(identifier?: string): Record<string, unknown>;
- initialize(opts?: InitializeOptions): NameServiceMapping[T];
- /**
- *
- * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
- * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
- *
- * @param identifier An optional instance identifier
- * @returns a function to unregister the callback
- */
- onInit(callback: OnInitCallBack<T>, identifier?: string): () => void;
- /**
- * Invoke onInit callbacks synchronously
- * @param instance the service instance`
- */
- private invokeOnInitCallbacks;
- private getOrInitializeService;
- private normalizeInstanceIdentifier;
- private shouldAutoInitialize;
-}
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/src/types.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/src/types.d.ts
deleted file mode 100644
index 40eac68..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/src/types.d.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { ComponentContainer } from './component_container';
-export declare const enum InstantiationMode {
- LAZY = "LAZY",// Currently most components are LAZY in JS SDK
- EAGER = "EAGER",// EAGER components are initialized immediately upon registration
- EXPLICIT = "EXPLICIT"
-}
-/**
- * PUBLIC: A public component provides a set of public APIs to customers. A service namespace will be patched
- * onto `firebase` namespace. Assume the component name is `test`, customers will be able
- * to get the service by calling `firebase.test()` or `app.test()` where `app` is a `FirebaseApp` instance.
- *
- * PRIVATE: A private component provides a set of private APIs that are used internally by other
- * Firebase SDKs. No service namespace is created in `firebase` namespace and customers have no way to get them.
- */
-export declare const enum ComponentType {
- PUBLIC = "PUBLIC",
- PRIVATE = "PRIVATE",
- VERSION = "VERSION"
-}
-export interface InstanceFactoryOptions {
- instanceIdentifier?: string;
- options?: {};
-}
-export type InitializeOptions = InstanceFactoryOptions;
-/**
- * Factory to create an instance of type T, given a ComponentContainer.
- * ComponentContainer is the IOC container that provides {@link Provider}
- * for dependencies.
- *
- * NOTE: The container only provides {@link Provider} rather than the actual instances of dependencies.
- * It is useful for lazily loaded dependencies and optional dependencies.
- */
-export type InstanceFactory<T extends Name> = (container: ComponentContainer, options: InstanceFactoryOptions) => NameServiceMapping[T];
-export type onInstanceCreatedCallback<T extends Name> = (container: ComponentContainer, instanceIdentifier: string, instance: NameServiceMapping[T]) => void;
-export interface Dictionary {
- [key: string]: unknown;
-}
-/**
- * This interface will be extended by Firebase SDKs to provide service name and service type mapping.
- * It is used as a generic constraint to ensure type safety.
- */
-export interface NameServiceMapping {
-}
-export type Name = keyof NameServiceMapping;
-export type Service = NameServiceMapping[Name];
-export type OnInitCallBack<T extends Name> = (instance: NameServiceMapping[T], identifier: string) => void;
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/test/setup.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/test/setup.d.ts
deleted file mode 100644
index 1c93d90..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/test/setup.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export {};
diff --git a/frontend-old/node_modules/@firebase/component/dist/esm/test/util.d.ts b/frontend-old/node_modules/@firebase/component/dist/esm/test/util.d.ts
deleted file mode 100644
index 93dbf0a..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/esm/test/util.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { FirebaseApp } from '@firebase/app-types';
-import { InstanceFactory, InstantiationMode, Name } from '../src/types';
-import { Component } from '../src/component';
-export declare function getFakeApp(appName?: string): FirebaseApp;
-export declare function getFakeComponent<T extends Name>(name: T, factory: InstanceFactory<T>, multipleInstance?: boolean, instantiationMode?: InstantiationMode): Component<T>;
diff --git a/frontend-old/node_modules/@firebase/component/dist/index.cjs.js b/frontend-old/node_modules/@firebase/component/dist/index.cjs.js
deleted file mode 100644
index 2955acd..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/index.cjs.js
+++ /dev/null
@@ -1,414 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var util = require('@firebase/util');
-
-/**
- * Component for service name T, e.g. `auth`, `auth-internal`
- */
-class Component {
- /**
- *
- * @param name The public service name, e.g. app, auth, firestore, database
- * @param instanceFactory Service factory responsible for creating the public interface
- * @param type whether the service provided by the component is public or private
- */
- constructor(name, instanceFactory, type) {
- this.name = name;
- this.instanceFactory = instanceFactory;
- this.type = type;
- this.multipleInstances = false;
- /**
- * Properties to be added to the service namespace
- */
- this.serviceProps = {};
- this.instantiationMode = "LAZY" /* InstantiationMode.LAZY */;
- this.onInstanceCreated = null;
- }
- setInstantiationMode(mode) {
- this.instantiationMode = mode;
- return this;
- }
- setMultipleInstances(multipleInstances) {
- this.multipleInstances = multipleInstances;
- return this;
- }
- setServiceProps(props) {
- this.serviceProps = props;
- return this;
- }
- setInstanceCreatedCallback(callback) {
- this.onInstanceCreated = callback;
- return this;
- }
-}
-
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-const DEFAULT_ENTRY_NAME = '[DEFAULT]';
-
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Provider for instance for service name T, e.g. 'auth', 'auth-internal'
- * NameServiceMapping[T] is an alias for the type of the instance
- */
-class Provider {
- constructor(name, container) {
- this.name = name;
- this.container = container;
- this.component = null;
- this.instances = new Map();
- this.instancesDeferred = new Map();
- this.instancesOptions = new Map();
- this.onInitCallbacks = new Map();
- }
- /**
- * @param identifier A provider can provide multiple instances of a service
- * if this.component.multipleInstances is true.
- */
- get(identifier) {
- // if multipleInstances is not supported, use the default name
- const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
- if (!this.instancesDeferred.has(normalizedIdentifier)) {
- const deferred = new util.Deferred();
- this.instancesDeferred.set(normalizedIdentifier, deferred);
- if (this.isInitialized(normalizedIdentifier) ||
- this.shouldAutoInitialize()) {
- // initialize the service if it can be auto-initialized
- try {
- const instance = this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier
- });
- if (instance) {
- deferred.resolve(instance);
- }
- }
- catch (e) {
- // when the instance factory throws an exception during get(), it should not cause
- // a fatal error. We just return the unresolved promise in this case.
- }
- }
- }
- return this.instancesDeferred.get(normalizedIdentifier).promise;
- }
- getImmediate(options) {
- // if multipleInstances is not supported, use the default name
- const normalizedIdentifier = this.normalizeInstanceIdentifier(options?.identifier);
- const optional = options?.optional ?? false;
- if (this.isInitialized(normalizedIdentifier) ||
- this.shouldAutoInitialize()) {
- try {
- return this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier
- });
- }
- catch (e) {
- if (optional) {
- return null;
- }
- else {
- throw e;
- }
- }
- }
- else {
- // In case a component is not initialized and should/cannot be auto-initialized at the moment, return null if the optional flag is set, or throw
- if (optional) {
- return null;
- }
- else {
- throw Error(`Service ${this.name} is not available`);
- }
- }
- }
- getComponent() {
- return this.component;
- }
- setComponent(component) {
- if (component.name !== this.name) {
- throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);
- }
- if (this.component) {
- throw Error(`Component for ${this.name} has already been provided`);
- }
- this.component = component;
- // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)
- if (!this.shouldAutoInitialize()) {
- return;
- }
- // if the service is eager, initialize the default instance
- if (isComponentEager(component)) {
- try {
- this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });
- }
- catch (e) {
- // when the instance factory for an eager Component throws an exception during the eager
- // initialization, it should not cause a fatal error.
- // TODO: Investigate if we need to make it configurable, because some component may want to cause
- // a fatal error in this case?
- }
- }
- // Create service instances for the pending promises and resolve them
- // NOTE: if this.multipleInstances is false, only the default instance will be created
- // and all promises with resolve with it regardless of the identifier.
- for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {
- const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);
- try {
- // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.
- const instance = this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier
- });
- instanceDeferred.resolve(instance);
- }
- catch (e) {
- // when the instance factory throws an exception, it should not cause
- // a fatal error. We just leave the promise unresolved.
- }
- }
- }
- clearInstance(identifier = DEFAULT_ENTRY_NAME) {
- this.instancesDeferred.delete(identifier);
- this.instancesOptions.delete(identifier);
- this.instances.delete(identifier);
- }
- // app.delete() will call this method on every provider to delete the services
- // TODO: should we mark the provider as deleted?
- async delete() {
- const services = Array.from(this.instances.values());
- await Promise.all([
- ...services
- .filter(service => 'INTERNAL' in service) // legacy services
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- .map(service => service.INTERNAL.delete()),
- ...services
- .filter(service => '_delete' in service) // modularized services
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- .map(service => service._delete())
- ]);
- }
- isComponentSet() {
- return this.component != null;
- }
- isInitialized(identifier = DEFAULT_ENTRY_NAME) {
- return this.instances.has(identifier);
- }
- getOptions(identifier = DEFAULT_ENTRY_NAME) {
- return this.instancesOptions.get(identifier) || {};
- }
- initialize(opts = {}) {
- const { options = {} } = opts;
- const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);
- if (this.isInitialized(normalizedIdentifier)) {
- throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);
- }
- if (!this.isComponentSet()) {
- throw Error(`Component ${this.name} has not been registered yet`);
- }
- const instance = this.getOrInitializeService({
- instanceIdentifier: normalizedIdentifier,
- options
- });
- // resolve any pending promise waiting for the service instance
- for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {
- const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);
- if (normalizedIdentifier === normalizedDeferredIdentifier) {
- instanceDeferred.resolve(instance);
- }
- }
- return instance;
- }
- /**
- *
- * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
- * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
- *
- * @param identifier An optional instance identifier
- * @returns a function to unregister the callback
- */
- onInit(callback, identifier) {
- const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
- const existingCallbacks = this.onInitCallbacks.get(normalizedIdentifier) ??
- new Set();
- existingCallbacks.add(callback);
- this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);
- const existingInstance = this.instances.get(normalizedIdentifier);
- if (existingInstance) {
- callback(existingInstance, normalizedIdentifier);
- }
- return () => {
- existingCallbacks.delete(callback);
- };
- }
- /**
- * Invoke onInit callbacks synchronously
- * @param instance the service instance`
- */
- invokeOnInitCallbacks(instance, identifier) {
- const callbacks = this.onInitCallbacks.get(identifier);
- if (!callbacks) {
- return;
- }
- for (const callback of callbacks) {
- try {
- callback(instance, identifier);
- }
- catch {
- // ignore errors in the onInit callback
- }
- }
- }
- getOrInitializeService({ instanceIdentifier, options = {} }) {
- let instance = this.instances.get(instanceIdentifier);
- if (!instance && this.component) {
- instance = this.component.instanceFactory(this.container, {
- instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),
- options
- });
- this.instances.set(instanceIdentifier, instance);
- this.instancesOptions.set(instanceIdentifier, options);
- /**
- * Invoke onInit listeners.
- * Note this.component.onInstanceCreated is different, which is used by the component creator,
- * while onInit listeners are registered by consumers of the provider.
- */
- this.invokeOnInitCallbacks(instance, instanceIdentifier);
- /**
- * Order is important
- * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which
- * makes `isInitialized()` return true.
- */
- if (this.component.onInstanceCreated) {
- try {
- this.component.onInstanceCreated(this.container, instanceIdentifier, instance);
- }
- catch {
- // ignore errors in the onInstanceCreatedCallback
- }
- }
- }
- return instance || null;
- }
- normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {
- if (this.component) {
- return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;
- }
- else {
- return identifier; // assume multiple instances are supported before the component is provided.
- }
- }
- shouldAutoInitialize() {
- return (!!this.component &&
- this.component.instantiationMode !== "EXPLICIT" /* InstantiationMode.EXPLICIT */);
- }
-}
-// undefined should be passed to the service factory for the default instance
-function normalizeIdentifierForFactory(identifier) {
- return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;
-}
-function isComponentEager(component) {
- return component.instantiationMode === "EAGER" /* InstantiationMode.EAGER */;
-}
-
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`
- */
-class ComponentContainer {
- constructor(name) {
- this.name = name;
- this.providers = new Map();
- }
- /**
- *
- * @param component Component being added
- * @param overwrite When a component with the same name has already been registered,
- * if overwrite is true: overwrite the existing component with the new component and create a new
- * provider with the new component. It can be useful in tests where you want to use different mocks
- * for different tests.
- * if overwrite is false: throw an exception
- */
- addComponent(component) {
- const provider = this.getProvider(component.name);
- if (provider.isComponentSet()) {
- throw new Error(`Component ${component.name} has already been registered with ${this.name}`);
- }
- provider.setComponent(component);
- }
- addOrOverwriteComponent(component) {
- const provider = this.getProvider(component.name);
- if (provider.isComponentSet()) {
- // delete the existing provider from the container, so we can register the new component
- this.providers.delete(component.name);
- }
- this.addComponent(component);
- }
- /**
- * getProvider provides a type safe interface where it can only be called with a field name
- * present in NameServiceMapping interface.
- *
- * Firebase SDKs providing services should extend NameServiceMapping interface to register
- * themselves.
- */
- getProvider(name) {
- if (this.providers.has(name)) {
- return this.providers.get(name);
- }
- // create a Provider for a service that hasn't registered with Firebase
- const provider = new Provider(name, this);
- this.providers.set(name, provider);
- return provider;
- }
- getProviders() {
- return Array.from(this.providers.values());
- }
-}
-
-exports.Component = Component;
-exports.ComponentContainer = ComponentContainer;
-exports.Provider = Provider;
-//# sourceMappingURL=index.cjs.js.map
diff --git a/frontend-old/node_modules/@firebase/component/dist/index.cjs.js.map b/frontend-old/node_modules/@firebase/component/dist/index.cjs.js.map
deleted file mode 100644
index 81291c8..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/index.cjs.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.cjs.js","sources":["../src/component.ts","../src/constants.ts","../src/provider.ts","../src/component_container.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n InstantiationMode,\n InstanceFactory,\n ComponentType,\n Dictionary,\n Name,\n onInstanceCreatedCallback\n} from './types';\n\n/**\n * Component for service name T, e.g. `auth`, `auth-internal`\n */\nexport class Component<T extends Name = Name> {\n multipleInstances = false;\n /**\n * Properties to be added to the service namespace\n */\n serviceProps: Dictionary = {};\n\n instantiationMode = InstantiationMode.LAZY;\n\n onInstanceCreated: onInstanceCreatedCallback<T> | null = null;\n\n /**\n *\n * @param name The public service name, e.g. app, auth, firestore, database\n * @param instanceFactory Service factory responsible for creating the public interface\n * @param type whether the service provided by the component is public or private\n */\n constructor(\n readonly name: T,\n readonly instanceFactory: InstanceFactory<T>,\n readonly type: ComponentType\n ) {}\n\n setInstantiationMode(mode: InstantiationMode): this {\n this.instantiationMode = mode;\n return this;\n }\n\n setMultipleInstances(multipleInstances: boolean): this {\n this.multipleInstances = multipleInstances;\n return this;\n }\n\n setServiceProps(props: Dictionary): this {\n this.serviceProps = props;\n return this;\n }\n\n setInstanceCreatedCallback(callback: onInstanceCreatedCallback<T>): this {\n this.onInstanceCreated = callback;\n return this;\n }\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const DEFAULT_ENTRY_NAME = '[DEFAULT]';\n","/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Deferred } from '@firebase/util';\nimport { ComponentContainer } from './component_container';\nimport { DEFAULT_ENTRY_NAME } from './constants';\nimport {\n InitializeOptions,\n InstantiationMode,\n Name,\n NameServiceMapping,\n OnInitCallBack\n} from './types';\nimport { Component } from './component';\n\n/**\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\n * NameServiceMapping[T] is an alias for the type of the instance\n */\nexport class Provider<T extends Name> {\n private component: Component<T> | null = null;\n private readonly instances: Map<string, NameServiceMapping[T]> = new Map();\n private readonly instancesDeferred: Map<\n string,\n Deferred<NameServiceMapping[T]>\n > = new Map();\n private readonly instancesOptions: Map<string, Record<string, unknown>> =\n new Map();\n private onInitCallbacks: Map<string, Set<OnInitCallBack<T>>> = new Map();\n\n constructor(\n private readonly name: T,\n private readonly container: ComponentContainer\n ) {}\n\n /**\n * @param identifier A provider can provide multiple instances of a service\n * if this.component.multipleInstances is true.\n */\n get(identifier?: string): Promise<NameServiceMapping[T]> {\n // if multipleInstances is not supported, use the default name\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n\n if (!this.instancesDeferred.has(normalizedIdentifier)) {\n const deferred = new Deferred<NameServiceMapping[T]>();\n this.instancesDeferred.set(normalizedIdentifier, deferred);\n\n if (\n this.isInitialized(normalizedIdentifier) ||\n this.shouldAutoInitialize()\n ) {\n // initialize the service if it can be auto-initialized\n try {\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n if (instance) {\n deferred.resolve(instance);\n }\n } catch (e) {\n // when the instance factory throws an exception during get(), it should not cause\n // a fatal error. We just return the unresolved promise in this case.\n }\n }\n }\n\n return this.instancesDeferred.get(normalizedIdentifier)!.promise;\n }\n\n /**\n *\n * @param options.identifier A provider can provide multiple instances of a service\n * if this.component.multipleInstances is true.\n * @param options.optional If optional is false or not provided, the method throws an error when\n * the service is not immediately available.\n * If optional is true, the method returns null if the service is not immediately available.\n */\n getImmediate(options: {\n identifier?: string;\n optional: true;\n }): NameServiceMapping[T] | null;\n getImmediate(options?: {\n identifier?: string;\n optional?: false;\n }): NameServiceMapping[T];\n getImmediate(options?: {\n identifier?: string;\n optional?: boolean;\n }): NameServiceMapping[T] | null {\n // if multipleInstances is not supported, use the default name\n const normalizedIdentifier = this.normalizeInstanceIdentifier(\n options?.identifier\n );\n const optional = options?.optional ?? false;\n\n if (\n this.isInitialized(normalizedIdentifier) ||\n this.shouldAutoInitialize()\n ) {\n try {\n return this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n } catch (e) {\n if (optional) {\n return null;\n } else {\n throw e;\n }\n }\n } else {\n // In case a component is not initialized and should/cannot be auto-initialized at the moment, return null if the optional flag is set, or throw\n if (optional) {\n return null;\n } else {\n throw Error(`Service ${this.name} is not available`);\n }\n }\n }\n\n getComponent(): Component<T> | null {\n return this.component;\n }\n\n setComponent(component: Component<T>): void {\n if (component.name !== this.name) {\n throw Error(\n `Mismatching Component ${component.name} for Provider ${this.name}.`\n );\n }\n\n if (this.component) {\n throw Error(`Component for ${this.name} has already been provided`);\n }\n\n this.component = component;\n\n // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\n if (!this.shouldAutoInitialize()) {\n return;\n }\n\n // if the service is eager, initialize the default instance\n if (isComponentEager(component)) {\n try {\n this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });\n } catch (e) {\n // when the instance factory for an eager Component throws an exception during the eager\n // initialization, it should not cause a fatal error.\n // TODO: Investigate if we need to make it configurable, because some component may want to cause\n // a fatal error in this case?\n }\n }\n\n // Create service instances for the pending promises and resolve them\n // NOTE: if this.multipleInstances is false, only the default instance will be created\n // and all promises with resolve with it regardless of the identifier.\n for (const [\n instanceIdentifier,\n instanceDeferred\n ] of this.instancesDeferred.entries()) {\n const normalizedIdentifier =\n this.normalizeInstanceIdentifier(instanceIdentifier);\n\n try {\n // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n })!;\n instanceDeferred.resolve(instance);\n } catch (e) {\n // when the instance factory throws an exception, it should not cause\n // a fatal error. We just leave the promise unresolved.\n }\n }\n }\n\n clearInstance(identifier: string = DEFAULT_ENTRY_NAME): void {\n this.instancesDeferred.delete(identifier);\n this.instancesOptions.delete(identifier);\n this.instances.delete(identifier);\n }\n\n // app.delete() will call this method on every provider to delete the services\n // TODO: should we mark the provider as deleted?\n async delete(): Promise<void> {\n const services = Array.from(this.instances.values());\n\n await Promise.all([\n ...services\n .filter(service => 'INTERNAL' in service) // legacy services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(service => (service as any).INTERNAL!.delete()),\n ...services\n .filter(service => '_delete' in service) // modularized services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(service => (service as any)._delete())\n ]);\n }\n\n isComponentSet(): boolean {\n return this.component != null;\n }\n\n isInitialized(identifier: string = DEFAULT_ENTRY_NAME): boolean {\n return this.instances.has(identifier);\n }\n\n getOptions(identifier: string = DEFAULT_ENTRY_NAME): Record<string, unknown> {\n return this.instancesOptions.get(identifier) || {};\n }\n\n initialize(opts: InitializeOptions = {}): NameServiceMapping[T] {\n const { options = {} } = opts;\n const normalizedIdentifier = this.normalizeInstanceIdentifier(\n opts.instanceIdentifier\n );\n if (this.isInitialized(normalizedIdentifier)) {\n throw Error(\n `${this.name}(${normalizedIdentifier}) has already been initialized`\n );\n }\n\n if (!this.isComponentSet()) {\n throw Error(`Component ${this.name} has not been registered yet`);\n }\n\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier,\n options\n })!;\n\n // resolve any pending promise waiting for the service instance\n for (const [\n instanceIdentifier,\n instanceDeferred\n ] of this.instancesDeferred.entries()) {\n const normalizedDeferredIdentifier =\n this.normalizeInstanceIdentifier(instanceIdentifier);\n if (normalizedIdentifier === normalizedDeferredIdentifier) {\n instanceDeferred.resolve(instance);\n }\n }\n\n return instance;\n }\n\n /**\n *\n * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().\n * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\n *\n * @param identifier An optional instance identifier\n * @returns a function to unregister the callback\n */\n onInit(callback: OnInitCallBack<T>, identifier?: string): () => void {\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n const existingCallbacks =\n this.onInitCallbacks.get(normalizedIdentifier) ??\n new Set<OnInitCallBack<T>>();\n existingCallbacks.add(callback);\n this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\n\n const existingInstance = this.instances.get(normalizedIdentifier);\n if (existingInstance) {\n callback(existingInstance, normalizedIdentifier);\n }\n\n return () => {\n existingCallbacks.delete(callback);\n };\n }\n\n /**\n * Invoke onInit callbacks synchronously\n * @param instance the service instance`\n */\n private invokeOnInitCallbacks(\n instance: NameServiceMapping[T],\n identifier: string\n ): void {\n const callbacks = this.onInitCallbacks.get(identifier);\n if (!callbacks) {\n return;\n }\n for (const callback of callbacks) {\n try {\n callback(instance, identifier);\n } catch {\n // ignore errors in the onInit callback\n }\n }\n }\n\n private getOrInitializeService({\n instanceIdentifier,\n options = {}\n }: {\n instanceIdentifier: string;\n options?: Record<string, unknown>;\n }): NameServiceMapping[T] | null {\n let instance = this.instances.get(instanceIdentifier);\n if (!instance && this.component) {\n instance = this.component.instanceFactory(this.container, {\n instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\n options\n });\n this.instances.set(instanceIdentifier, instance!);\n this.instancesOptions.set(instanceIdentifier, options);\n\n /**\n * Invoke onInit listeners.\n * Note this.component.onInstanceCreated is different, which is used by the component creator,\n * while onInit listeners are registered by consumers of the provider.\n */\n this.invokeOnInitCallbacks(instance!, instanceIdentifier);\n\n /**\n * Order is important\n * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\n * makes `isInitialized()` return true.\n */\n if (this.component.onInstanceCreated) {\n try {\n this.component.onInstanceCreated(\n this.container,\n instanceIdentifier,\n instance!\n );\n } catch {\n // ignore errors in the onInstanceCreatedCallback\n }\n }\n }\n\n return instance || null;\n }\n\n private normalizeInstanceIdentifier(\n identifier: string = DEFAULT_ENTRY_NAME\n ): string {\n if (this.component) {\n return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\n } else {\n return identifier; // assume multiple instances are supported before the component is provided.\n }\n }\n\n private shouldAutoInitialize(): boolean {\n return (\n !!this.component &&\n this.component.instantiationMode !== InstantiationMode.EXPLICIT\n );\n }\n}\n\n// undefined should be passed to the service factory for the default instance\nfunction normalizeIdentifierForFactory(identifier: string): string | undefined {\n return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\n}\n\nfunction isComponentEager<T extends Name>(component: Component<T>): boolean {\n return component.instantiationMode === InstantiationMode.EAGER;\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Provider } from './provider';\nimport { Component } from './component';\nimport { Name } from './types';\n\n/**\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\n */\nexport class ComponentContainer {\n private readonly providers = new Map<string, Provider<Name>>();\n\n constructor(private readonly name: string) {}\n\n /**\n *\n * @param component Component being added\n * @param overwrite When a component with the same name has already been registered,\n * if overwrite is true: overwrite the existing component with the new component and create a new\n * provider with the new component. It can be useful in tests where you want to use different mocks\n * for different tests.\n * if overwrite is false: throw an exception\n */\n addComponent<T extends Name>(component: Component<T>): void {\n const provider = this.getProvider(component.name);\n if (provider.isComponentSet()) {\n throw new Error(\n `Component ${component.name} has already been registered with ${this.name}`\n );\n }\n\n provider.setComponent(component);\n }\n\n addOrOverwriteComponent<T extends Name>(component: Component<T>): void {\n const provider = this.getProvider(component.name);\n if (provider.isComponentSet()) {\n // delete the existing provider from the container, so we can register the new component\n this.providers.delete(component.name);\n }\n\n this.addComponent(component);\n }\n\n /**\n * getProvider provides a type safe interface where it can only be called with a field name\n * present in NameServiceMapping interface.\n *\n * Firebase SDKs providing services should extend NameServiceMapping interface to register\n * themselves.\n */\n getProvider<T extends Name>(name: T): Provider<T> {\n if (this.providers.has(name)) {\n return this.providers.get(name) as unknown as Provider<T>;\n }\n\n // create a Provider for a service that hasn't registered with Firebase\n const provider = new Provider<T>(name, this);\n this.providers.set(name, provider as unknown as Provider<Name>);\n\n return provider as Provider<T>;\n }\n\n getProviders(): Array<Provider<Name>> {\n return Array.from(this.providers.values());\n }\n}\n"],"names":["Deferred"],"mappings":";;;;;;AAyBA;;AAEG;MACU,SAAS,CAAA;AAWpB;;;;;AAKG;AACH,IAAA,WAAA,CACW,IAAO,EACP,eAAmC,EACnC,IAAmB,EAAA;QAFnB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAG;QACP,IAAe,CAAA,eAAA,GAAf,eAAe,CAAoB;QACnC,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAe;QAnB9B,IAAiB,CAAA,iBAAA,GAAG,KAAK,CAAC;AAC1B;;AAEG;QACH,IAAY,CAAA,YAAA,GAAe,EAAE,CAAC;AAE9B,QAAA,IAAA,CAAA,iBAAiB,GAA0B,MAAA,8BAAA;QAE3C,IAAiB,CAAA,iBAAA,GAAwC,IAAI,CAAC;KAY1D;AAEJ,IAAA,oBAAoB,CAAC,IAAuB,EAAA;AAC1C,QAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;AAC9B,QAAA,OAAO,IAAI,CAAC;KACb;AAED,IAAA,oBAAoB,CAAC,iBAA0B,EAAA;AAC7C,QAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,OAAO,IAAI,CAAC;KACb;AAED,IAAA,eAAe,CAAC,KAAiB,EAAA;AAC/B,QAAA,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;AAC1B,QAAA,OAAO,IAAI,CAAC;KACb;AAED,IAAA,0BAA0B,CAAC,QAAsC,EAAA;AAC/D,QAAA,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC;AAClC,QAAA,OAAO,IAAI,CAAC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AAc,EAAE,EAAE;;YAE7B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACvC;AAED,QAAA,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;KAC9B;AAED;;;;;;AAMG;AACH,IAAA,WAAW,CAAiB,IAAO,EAAA;QACjC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAA2B,CAAC;SAC3D;;QAGD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAqC,CAAC,CAAC;AAEhE,QAAA,OAAO,QAAuB,CAAC;KAChC;IAED,YAAY,GAAA;QACV,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;KAC5C;AACF;;;;;;"} \ No newline at end of file
diff --git a/frontend-old/node_modules/@firebase/component/dist/index.d.ts b/frontend-old/node_modules/@firebase/component/dist/index.d.ts
deleted file mode 100644
index 7b21e7b..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/index.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * @license
- * Copyright 2017 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export { Component } from './src/component';
-export { ComponentContainer } from './src/component_container';
-export { Provider } from './src/provider';
-export { ComponentType, InstanceFactory, InstantiationMode, NameServiceMapping, Name, InstanceFactoryOptions } from './src/types';
diff --git a/frontend-old/node_modules/@firebase/component/dist/src/component.d.ts b/frontend-old/node_modules/@firebase/component/dist/src/component.d.ts
deleted file mode 100644
index debdf77..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/src/component.d.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { InstantiationMode, InstanceFactory, ComponentType, Dictionary, Name, onInstanceCreatedCallback } from './types';
-/**
- * Component for service name T, e.g. `auth`, `auth-internal`
- */
-export declare class Component<T extends Name = Name> {
- readonly name: T;
- readonly instanceFactory: InstanceFactory<T>;
- readonly type: ComponentType;
- multipleInstances: boolean;
- /**
- * Properties to be added to the service namespace
- */
- serviceProps: Dictionary;
- instantiationMode: InstantiationMode;
- onInstanceCreated: onInstanceCreatedCallback<T> | null;
- /**
- *
- * @param name The public service name, e.g. app, auth, firestore, database
- * @param instanceFactory Service factory responsible for creating the public interface
- * @param type whether the service provided by the component is public or private
- */
- constructor(name: T, instanceFactory: InstanceFactory<T>, type: ComponentType);
- setInstantiationMode(mode: InstantiationMode): this;
- setMultipleInstances(multipleInstances: boolean): this;
- setServiceProps(props: Dictionary): this;
- setInstanceCreatedCallback(callback: onInstanceCreatedCallback<T>): this;
-}
diff --git a/frontend-old/node_modules/@firebase/component/dist/src/component_container.d.ts b/frontend-old/node_modules/@firebase/component/dist/src/component_container.d.ts
deleted file mode 100644
index a1322f3..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/src/component_container.d.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { Provider } from './provider';
-import { Component } from './component';
-import { Name } from './types';
-/**
- * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`
- */
-export declare class ComponentContainer {
- private readonly name;
- private readonly providers;
- constructor(name: string);
- /**
- *
- * @param component Component being added
- * @param overwrite When a component with the same name has already been registered,
- * if overwrite is true: overwrite the existing component with the new component and create a new
- * provider with the new component. It can be useful in tests where you want to use different mocks
- * for different tests.
- * if overwrite is false: throw an exception
- */
- addComponent<T extends Name>(component: Component<T>): void;
- addOrOverwriteComponent<T extends Name>(component: Component<T>): void;
- /**
- * getProvider provides a type safe interface where it can only be called with a field name
- * present in NameServiceMapping interface.
- *
- * Firebase SDKs providing services should extend NameServiceMapping interface to register
- * themselves.
- */
- getProvider<T extends Name>(name: T): Provider<T>;
- getProviders(): Array<Provider<Name>>;
-}
diff --git a/frontend-old/node_modules/@firebase/component/dist/src/constants.d.ts b/frontend-old/node_modules/@firebase/component/dist/src/constants.d.ts
deleted file mode 100644
index b069f4e..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/src/constants.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export declare const DEFAULT_ENTRY_NAME = "[DEFAULT]";
diff --git a/frontend-old/node_modules/@firebase/component/dist/src/provider.d.ts b/frontend-old/node_modules/@firebase/component/dist/src/provider.d.ts
deleted file mode 100644
index 8039aff..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/src/provider.d.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { ComponentContainer } from './component_container';
-import { InitializeOptions, Name, NameServiceMapping, OnInitCallBack } from './types';
-import { Component } from './component';
-/**
- * Provider for instance for service name T, e.g. 'auth', 'auth-internal'
- * NameServiceMapping[T] is an alias for the type of the instance
- */
-export declare class Provider<T extends Name> {
- private readonly name;
- private readonly container;
- private component;
- private readonly instances;
- private readonly instancesDeferred;
- private readonly instancesOptions;
- private onInitCallbacks;
- constructor(name: T, container: ComponentContainer);
- /**
- * @param identifier A provider can provide multiple instances of a service
- * if this.component.multipleInstances is true.
- */
- get(identifier?: string): Promise<NameServiceMapping[T]>;
- /**
- *
- * @param options.identifier A provider can provide multiple instances of a service
- * if this.component.multipleInstances is true.
- * @param options.optional If optional is false or not provided, the method throws an error when
- * the service is not immediately available.
- * If optional is true, the method returns null if the service is not immediately available.
- */
- getImmediate(options: {
- identifier?: string;
- optional: true;
- }): NameServiceMapping[T] | null;
- getImmediate(options?: {
- identifier?: string;
- optional?: false;
- }): NameServiceMapping[T];
- getComponent(): Component<T> | null;
- setComponent(component: Component<T>): void;
- clearInstance(identifier?: string): void;
- delete(): Promise<void>;
- isComponentSet(): boolean;
- isInitialized(identifier?: string): boolean;
- getOptions(identifier?: string): Record<string, unknown>;
- initialize(opts?: InitializeOptions): NameServiceMapping[T];
- /**
- *
- * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
- * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
- *
- * @param identifier An optional instance identifier
- * @returns a function to unregister the callback
- */
- onInit(callback: OnInitCallBack<T>, identifier?: string): () => void;
- /**
- * Invoke onInit callbacks synchronously
- * @param instance the service instance`
- */
- private invokeOnInitCallbacks;
- private getOrInitializeService;
- private normalizeInstanceIdentifier;
- private shouldAutoInitialize;
-}
diff --git a/frontend-old/node_modules/@firebase/component/dist/src/types.d.ts b/frontend-old/node_modules/@firebase/component/dist/src/types.d.ts
deleted file mode 100644
index 40eac68..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/src/types.d.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { ComponentContainer } from './component_container';
-export declare const enum InstantiationMode {
- LAZY = "LAZY",// Currently most components are LAZY in JS SDK
- EAGER = "EAGER",// EAGER components are initialized immediately upon registration
- EXPLICIT = "EXPLICIT"
-}
-/**
- * PUBLIC: A public component provides a set of public APIs to customers. A service namespace will be patched
- * onto `firebase` namespace. Assume the component name is `test`, customers will be able
- * to get the service by calling `firebase.test()` or `app.test()` where `app` is a `FirebaseApp` instance.
- *
- * PRIVATE: A private component provides a set of private APIs that are used internally by other
- * Firebase SDKs. No service namespace is created in `firebase` namespace and customers have no way to get them.
- */
-export declare const enum ComponentType {
- PUBLIC = "PUBLIC",
- PRIVATE = "PRIVATE",
- VERSION = "VERSION"
-}
-export interface InstanceFactoryOptions {
- instanceIdentifier?: string;
- options?: {};
-}
-export type InitializeOptions = InstanceFactoryOptions;
-/**
- * Factory to create an instance of type T, given a ComponentContainer.
- * ComponentContainer is the IOC container that provides {@link Provider}
- * for dependencies.
- *
- * NOTE: The container only provides {@link Provider} rather than the actual instances of dependencies.
- * It is useful for lazily loaded dependencies and optional dependencies.
- */
-export type InstanceFactory<T extends Name> = (container: ComponentContainer, options: InstanceFactoryOptions) => NameServiceMapping[T];
-export type onInstanceCreatedCallback<T extends Name> = (container: ComponentContainer, instanceIdentifier: string, instance: NameServiceMapping[T]) => void;
-export interface Dictionary {
- [key: string]: unknown;
-}
-/**
- * This interface will be extended by Firebase SDKs to provide service name and service type mapping.
- * It is used as a generic constraint to ensure type safety.
- */
-export interface NameServiceMapping {
-}
-export type Name = keyof NameServiceMapping;
-export type Service = NameServiceMapping[Name];
-export type OnInitCallBack<T extends Name> = (instance: NameServiceMapping[T], identifier: string) => void;
diff --git a/frontend-old/node_modules/@firebase/component/dist/test/setup.d.ts b/frontend-old/node_modules/@firebase/component/dist/test/setup.d.ts
deleted file mode 100644
index 1c93d90..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/test/setup.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export {};
diff --git a/frontend-old/node_modules/@firebase/component/dist/test/util.d.ts b/frontend-old/node_modules/@firebase/component/dist/test/util.d.ts
deleted file mode 100644
index 93dbf0a..0000000
--- a/frontend-old/node_modules/@firebase/component/dist/test/util.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { FirebaseApp } from '@firebase/app-types';
-import { InstanceFactory, InstantiationMode, Name } from '../src/types';
-import { Component } from '../src/component';
-export declare function getFakeApp(appName?: string): FirebaseApp;
-export declare function getFakeComponent<T extends Name>(name: T, factory: InstanceFactory<T>, multipleInstance?: boolean, instantiationMode?: InstantiationMode): Component<T>;