diff options
Diffstat (limited to 'frontend-old/node_modules/@firebase/firestore-compat/dist')
81 files changed, 0 insertions, 7296 deletions
diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.cjs.js b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.cjs.js deleted file mode 100644 index 8168414..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.cjs.js +++ /dev/null @@ -1,1013 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var firebase = require('@firebase/app-compat'); -var firestore = require('@firebase/firestore'); -var util = require('@firebase/util'); -var component = require('@firebase/component'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase); - -const name = "@firebase/firestore-compat"; -const version = "0.4.2"; - -/** - * @license - * Copyright 2021 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. - */ -function validateSetOptions(methodName, options) { - if (options === undefined) { - return { - merge: false - }; - } - if (options.mergeFields !== undefined && options.merge !== undefined) { - throw new firestore.FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + - 'specify both "merge" and "mergeFields".'); - } - return options; -} - -/** - * @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. - */ -/** Helper function to assert Uint8Array is available at runtime. */ -function assertUint8ArrayAvailable() { - if (typeof Uint8Array === 'undefined') { - throw new firestore.FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.'); - } -} -/** Helper function to assert Base64 functions are available at runtime. */ -function assertBase64Available() { - if (!firestore._isBase64Available()) { - throw new firestore.FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.'); - } -} -/** Immutable class holding a blob (binary data) */ -class Blob { - constructor(_delegate) { - this._delegate = _delegate; - } - static fromBase64String(base64) { - assertBase64Available(); - return new Blob(firestore.Bytes.fromBase64String(base64)); - } - static fromUint8Array(array) { - assertUint8ArrayAvailable(); - return new Blob(firestore.Bytes.fromUint8Array(array)); - } - toBase64() { - assertBase64Available(); - return this._delegate.toBase64(); - } - toUint8Array() { - assertUint8ArrayAvailable(); - return this._delegate.toUint8Array(); - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } - toString() { - return 'Blob(base64: ' + this.toBase64() + ')'; - } -} - -/** - * @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. - */ -function isPartialObserver(obj) { - return implementsAnyMethods(obj, ['next', 'error', 'complete']); -} -/** - * Returns true if obj is an object and contains at least one of the specified - * methods. - */ -function implementsAnyMethods(obj, methods) { - if (typeof obj !== 'object' || obj === null) { - return false; - } - const object = obj; - for (const method of methods) { - if (method in object && typeof object[method] === 'function') { - return true; - } - } - return false; -} - -/** - * @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. - */ -/** - * The persistence provider included with the full Firestore SDK. - */ -class IndexedDbPersistenceProvider { - enableIndexedDbPersistence(firestore$1, forceOwnership) { - return firestore.enableIndexedDbPersistence(firestore$1._delegate, { forceOwnership }); - } - enableMultiTabIndexedDbPersistence(firestore$1) { - return firestore.enableMultiTabIndexedDbPersistence(firestore$1._delegate); - } - clearIndexedDbPersistence(firestore$1) { - return firestore.clearIndexedDbPersistence(firestore$1._delegate); - } -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -class Firestore { - constructor(databaseIdOrApp, _delegate, _persistenceProvider) { - this._delegate = _delegate; - this._persistenceProvider = _persistenceProvider; - this.INTERNAL = { - delete: () => this.terminate() - }; - if (!(databaseIdOrApp instanceof firestore._DatabaseId)) { - this._appCompat = databaseIdOrApp; - } - } - get _databaseId() { - return this._delegate._databaseId; - } - settings(settingsLiteral) { - const currentSettings = this._delegate._getSettings(); - if (!settingsLiteral.merge && - currentSettings.host !== settingsLiteral.host) { - firestore._logWarn('You are overriding the original host. If you did not intend ' + - 'to override your settings, use {merge: true}.'); - } - if (settingsLiteral.merge) { - settingsLiteral = { - ...currentSettings, - ...settingsLiteral - }; - // Remove the property from the settings once the merge is completed - delete settingsLiteral.merge; - } - this._delegate._setSettings(settingsLiteral); - } - useEmulator(host, port, options = {}) { - firestore.connectFirestoreEmulator(this._delegate, host, port, options); - } - enableNetwork() { - return firestore.enableNetwork(this._delegate); - } - disableNetwork() { - return firestore.disableNetwork(this._delegate); - } - enablePersistence(settings) { - let synchronizeTabs = false; - let experimentalForceOwningTab = false; - if (settings) { - synchronizeTabs = !!settings.synchronizeTabs; - experimentalForceOwningTab = !!settings.experimentalForceOwningTab; - firestore._validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab); - } - return synchronizeTabs - ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) - : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab); - } - clearPersistence() { - return this._persistenceProvider.clearIndexedDbPersistence(this); - } - terminate() { - if (this._appCompat) { - this._appCompat._removeServiceInstance('firestore-compat'); - this._appCompat._removeServiceInstance('firestore'); - } - return this._delegate._delete(); - } - waitForPendingWrites() { - return firestore.waitForPendingWrites(this._delegate); - } - onSnapshotsInSync(arg) { - return firestore.onSnapshotsInSync(this._delegate, arg); - } - get app() { - if (!this._appCompat) { - throw new firestore.FirestoreError('failed-precondition', "Firestore was not initialized using the Firebase SDK. 'app' is " + - 'not available'); - } - return this._appCompat; - } - collection(pathString) { - try { - return new CollectionReference(this, firestore.collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'Firestore.collection()'); - } - } - doc(pathString) { - try { - return new DocumentReference(this, firestore.doc(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'Firestore.doc()'); - } - } - collectionGroup(collectionId) { - try { - return new Query(this, firestore.collectionGroup(this._delegate, collectionId)); - } - catch (e) { - throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()'); - } - } - runTransaction(updateFunction) { - return firestore.runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction))); - } - batch() { - firestore.ensureFirestoreConfigured(this._delegate); - return new WriteBatch(new firestore.WriteBatch(this._delegate, mutations => firestore.executeWrite(this._delegate, mutations))); - } - loadBundle(bundleData) { - return firestore.loadBundle(this._delegate, bundleData); - } - namedQuery(name) { - return firestore.namedQuery(this._delegate, name).then(expQuery => { - if (!expQuery) { - return null; - } - return new Query(this, - // We can pass `expQuery` here directly since named queries don't have a UserDataConverter. - // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter. - expQuery); - }); - } -} -class UserDataWriter extends firestore.AbstractUserDataWriter { - constructor(firestore) { - super(); - this.firestore = firestore; - } - convertBytes(bytes) { - return new Blob(new firestore.Bytes(bytes)); - } - convertReference(name) { - const key = this.convertDocumentKey(name, this.firestore._databaseId); - return DocumentReference.forKey(key, this.firestore, /* converter= */ null); - } -} -function setLogLevel(level) { - firestore.setLogLevel(level); -} -/** - * A reference to a transaction. - */ -class Transaction { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(_firestore); - } - get(documentRef) { - const ref = castReference(documentRef); - return this._delegate - .get(ref) - .then(result => new DocumentSnapshot(this._firestore, new firestore.DocumentSnapshot(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter))); - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('Transaction.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } -} -class WriteBatch { - constructor(_delegate) { - this._delegate = _delegate; - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('WriteBatch.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } - commit() { - return this._delegate.commit(); - } -} -/** - * Wraps a `PublicFirestoreDataConverter` translating the types from the - * experimental SDK into corresponding types from the Classic SDK before passing - * them to the wrapped converter. - */ -class FirestoreDataConverter { - constructor(_firestore, _userDataWriter, _delegate) { - this._firestore = _firestore; - this._userDataWriter = _userDataWriter; - this._delegate = _delegate; - } - fromFirestore(snapshot, options) { - const expSnapshot = new firestore.QueryDocumentSnapshot(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, - /* converter= */ null); - return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options ?? {}); - } - toFirestore(modelObject, options) { - if (!options) { - return this._delegate.toFirestore(modelObject); - } - else { - return this._delegate.toFirestore(modelObject, options); - } - } - // Use the same instance of `FirestoreDataConverter` for the given instances - // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will - // compare equal for two objects created with the same converter instance. - static getInstance(firestore, converter) { - const converterMapByFirestore = FirestoreDataConverter.INSTANCES; - let untypedConverterByConverter = converterMapByFirestore.get(firestore); - if (!untypedConverterByConverter) { - untypedConverterByConverter = new WeakMap(); - converterMapByFirestore.set(firestore, untypedConverterByConverter); - } - let instance = untypedConverterByConverter.get(converter); - if (!instance) { - instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter); - untypedConverterByConverter.set(converter, instance); - } - return instance; - } -} -FirestoreDataConverter.INSTANCES = new WeakMap(); -/** - * A reference to a particular document in a collection in the database. - */ -class DocumentReference { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - static forPath(path, firestore$1, converter) { - if (path.length % 2 !== 0) { - throw new firestore.FirestoreError('invalid-argument', 'Invalid document reference. Document ' + - 'references must have an even number of segments, but ' + - `${path.canonicalString()} has ${path.length}`); - } - return new DocumentReference(firestore$1, new firestore.DocumentReference(firestore$1._delegate, converter, new firestore._DocumentKey(path))); - } - static forKey(key, firestore$1, converter) { - return new DocumentReference(firestore$1, new firestore.DocumentReference(firestore$1._delegate, converter, key)); - } - get id() { - return this._delegate.id; - } - get parent() { - return new CollectionReference(this.firestore, this._delegate.parent); - } - get path() { - return this._delegate.path; - } - collection(pathString) { - try { - return new CollectionReference(this.firestore, firestore.collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()'); - } - } - isEqual(other) { - other = util.getModularInstance(other); - if (!(other instanceof firestore.DocumentReference)) { - return false; - } - return firestore.refEqual(this._delegate, other); - } - set(value, options) { - options = validateSetOptions('DocumentReference.set', options); - try { - if (options) { - return firestore.setDoc(this._delegate, value, options); - } - else { - return firestore.setDoc(this._delegate, value); - } - } - catch (e) { - throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()'); - } - } - update(fieldOrUpdateData, value, ...moreFieldsAndValues) { - try { - if (arguments.length === 1) { - return firestore.updateDoc(this._delegate, fieldOrUpdateData); - } - else { - return firestore.updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues); - } - } - catch (e) { - throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()'); - } - } - delete() { - return firestore.deleteDoc(this._delegate); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new firestore.DocumentSnapshot(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - return firestore.onSnapshot(this._delegate, options, observer); - } - get(options) { - let snap; - if (options?.source === 'cache') { - snap = firestore.getDocFromCache(this._delegate); - } - else if (options?.source === 'server') { - snap = firestore.getDocFromServer(this._delegate); - } - else { - snap = firestore.getDoc(this._delegate); - } - return snap.then(result => new DocumentSnapshot(this.firestore, new firestore.DocumentSnapshot(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - } - withConverter(converter) { - return new DocumentReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -/** - * Replaces the function name in an error thrown by the firestore-exp API - * with the function names used in the classic API. - */ -function replaceFunctionName(e, original, updated) { - e.message = e.message.replace(original, updated); - return e; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -function extractSnapshotOptions(args) { - for (const arg of args) { - if (typeof arg === 'object' && !isPartialObserver(arg)) { - return arg; - } - } - return {}; -} -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -function wrapObserver(args, wrapper) { - let userObserver; - if (isPartialObserver(args[0])) { - userObserver = args[0]; - } - else if (isPartialObserver(args[1])) { - userObserver = args[1]; - } - else if (typeof args[0] === 'function') { - userObserver = { - next: args[0], - error: args[1], - complete: args[2] - }; - } - else { - userObserver = { - next: args[1], - error: args[2], - complete: args[3] - }; - } - return { - next: val => { - if (userObserver.next) { - userObserver.next(wrapper(val)); - } - }, - error: userObserver.error?.bind(userObserver), - complete: userObserver.complete?.bind(userObserver) - }; -} -class DocumentSnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get ref() { - return new DocumentReference(this._firestore, this._delegate.ref); - } - get id() { - return this._delegate.id; - } - get metadata() { - return this._delegate.metadata; - } - get exists() { - return this._delegate.exists(); - } - data(options) { - return this._delegate.data(options); - } - get(fieldPath, options - // We are using `any` here to avoid an explicit cast by our users. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ) { - return this._delegate.get(fieldPath, options); - } - isEqual(other) { - return firestore.snapshotEqual(this._delegate, other._delegate); - } -} -class QueryDocumentSnapshot extends DocumentSnapshot { - data(options) { - const data = this._delegate.data(options); - if (this._delegate._converter) { - // Undefined is a possible valid value from converter. - return data; - } - else { - firestore._debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist'); - return data; - } - } -} -class Query { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - where(fieldPath, opStr, value) { - try { - // The "as string" cast is a little bit of a hack. `where` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, firestore.query(this._delegate, firestore.where(fieldPath, opStr, value))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - orderBy(fieldPath, directionStr) { - try { - // The "as string" cast is a little bit of a hack. `orderBy` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, firestore.query(this._delegate, firestore.orderBy(fieldPath, directionStr))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - limit(n) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.limit(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limit()', 'Query.limit()'); - } - } - limitToLast(n) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.limitToLast(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()'); - } - } - startAt(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.startAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAt()', 'Query.startAt()'); - } - } - startAfter(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.startAfter(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()'); - } - } - endBefore(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.endBefore(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()'); - } - } - endAt(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.endAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endAt()', 'Query.endAt()'); - } - } - isEqual(other) { - return firestore.queryEqual(this._delegate, other._delegate); - } - get(options) { - let query; - if (options?.source === 'cache') { - query = firestore.getDocsFromCache(this._delegate); - } - else if (options?.source === 'server') { - query = firestore.getDocsFromServer(this._delegate); - } - else { - query = firestore.getDocs(this._delegate); - } - return query.then(result => new QuerySnapshot(this.firestore, new firestore.QuerySnapshot(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot))); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new firestore.QuerySnapshot(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot))); - return firestore.onSnapshot(this._delegate, options, observer); - } - withConverter(converter) { - return new Query(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -class DocumentChange { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get type() { - return this._delegate.type; - } - get doc() { - return new QueryDocumentSnapshot(this._firestore, this._delegate.doc); - } - get oldIndex() { - return this._delegate.oldIndex; - } - get newIndex() { - return this._delegate.newIndex; - } -} -class QuerySnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get query() { - return new Query(this._firestore, this._delegate.query); - } - get metadata() { - return this._delegate.metadata; - } - get size() { - return this._delegate.size; - } - get empty() { - return this._delegate.empty; - } - get docs() { - return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc)); - } - docChanges(options) { - return this._delegate - .docChanges(options) - .map(docChange => new DocumentChange(this._firestore, docChange)); - } - forEach(callback, thisArg) { - this._delegate.forEach(snapshot => { - callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot)); - }); - } - isEqual(other) { - return firestore.snapshotEqual(this._delegate, other._delegate); - } -} -class CollectionReference extends Query { - constructor(firestore, _delegate) { - super(firestore, _delegate); - this.firestore = firestore; - this._delegate = _delegate; - } - get id() { - return this._delegate.id; - } - get path() { - return this._delegate.path; - } - get parent() { - const docRef = this._delegate.parent; - return docRef ? new DocumentReference(this.firestore, docRef) : null; - } - doc(documentPath) { - try { - if (documentPath === undefined) { - // Call `doc` without `documentPath` if `documentPath` is `undefined` - // as `doc` validates the number of arguments to prevent users from - // accidentally passing `undefined`. - return new DocumentReference(this.firestore, firestore.doc(this._delegate)); - } - else { - return new DocumentReference(this.firestore, firestore.doc(this._delegate, documentPath)); - } - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()'); - } - } - add(data) { - return firestore.addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef)); - } - isEqual(other) { - return firestore.refEqual(this._delegate, other._delegate); - } - withConverter(converter) { - return new CollectionReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -function castReference(documentRef) { - return firestore._cast(documentRef, firestore.DocumentReference); -} - -/** - * @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. - */ -// The objects that are a part of this API are exposed to third-parties as -// compiled javascript so we want to flag our private members with a leading -// underscore to discourage their use. -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -class FieldPath { - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames) { - this._delegate = new firestore.FieldPath(...fieldNames); - } - static documentId() { - /** - * Internal Note: The backend doesn't technically support querying by - * document ID. Instead it queries by the entire document name (full path - * included), but in the cases we currently support documentId(), the net - * effect is the same. - */ - return new FieldPath(firestore._FieldPath.keyField().canonicalString()); - } - isEqual(other) { - other = util.getModularInstance(other); - if (!(other instanceof firestore.FieldPath)) { - return false; - } - return this._delegate._internalPath.isEqual(other._internalPath); - } -} - -/** - * @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. - */ -class FieldValue { - static serverTimestamp() { - const delegate = firestore.serverTimestamp(); - delegate._methodName = 'FieldValue.serverTimestamp'; - return new FieldValue(delegate); - } - static delete() { - const delegate = firestore.deleteField(); - delegate._methodName = 'FieldValue.delete'; - return new FieldValue(delegate); - } - static arrayUnion(...elements) { - const delegate = firestore.arrayUnion(...elements); - delegate._methodName = 'FieldValue.arrayUnion'; - return new FieldValue(delegate); - } - static arrayRemove(...elements) { - const delegate = firestore.arrayRemove(...elements); - delegate._methodName = 'FieldValue.arrayRemove'; - return new FieldValue(delegate); - } - static increment(n) { - const delegate = firestore.increment(n); - delegate._methodName = 'FieldValue.increment'; - return new FieldValue(delegate); - } - constructor(_delegate) { - this._delegate = _delegate; - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } -} - -/** - * @license - * Copyright 2021 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 firestoreNamespace = { - Firestore, - GeoPoint: firestore.GeoPoint, - Timestamp: firestore.Timestamp, - Blob, - Transaction, - WriteBatch, - DocumentReference, - DocumentSnapshot, - Query, - QueryDocumentSnapshot, - QuerySnapshot, - CollectionReference, - FieldPath, - FieldValue, - setLogLevel, - CACHE_SIZE_UNLIMITED: firestore.CACHE_SIZE_UNLIMITED -}; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -function configureForFirebase(firebase, firestoreFactory) { - firebase.INTERNAL.registerComponent(new component.Component('firestore-compat', container => { - const app = container.getProvider('app-compat').getImmediate(); - const firestoreExp = container.getProvider('firestore').getImmediate(); - return firestoreFactory(app, firestoreExp); - }, 'PUBLIC').setServiceProps({ ...firestoreNamespace })); -} - -/** - * @license - * Copyright 2020 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. - */ -/** - * Registers the main Firestore build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -function registerFirestore(instance) { - configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())); - instance.registerVersion(name, version); -} -registerFirestore(firebase__default["default"]); - -exports.registerFirestore = registerFirestore; -//# sourceMappingURL=index.cjs.js.map diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.cjs.js.map b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.cjs.js.map deleted file mode 100644 index d8cf8ad..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.cjs.js","sources":["../src/util/input_validation.ts","../src/api/blob.ts","../src/api/observer.ts","../src/api/database.ts","../src/api/field_path.ts","../src/api/field_value.ts","../src/config.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 { FirestoreError } from '@firebase/firestore';\nimport { SetOptions } from '@firebase/firestore-types';\n\nexport function validateSetOptions(\n methodName: string,\n options: SetOptions | undefined\n): SetOptions {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError(\n 'invalid-argument',\n `Invalid options passed to function ${methodName}(): You cannot ` +\n 'specify both \"merge\" and \"mergeFields\".'\n );\n }\n\n return options;\n}\n","/**\n * @license\n * Copyright 2017 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 { Bytes, FirestoreError, _isBase64Available } from '@firebase/firestore';\nimport { Compat } from '@firebase/util';\n\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable(): void {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(\n 'unimplemented',\n 'Uint8Arrays are not available in this environment.'\n );\n }\n}\n\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available(): void {\n if (!_isBase64Available()) {\n throw new FirestoreError(\n 'unimplemented',\n 'Blobs are unavailable in Firestore in this environment.'\n );\n }\n}\n\n/** Immutable class holding a blob (binary data) */\nexport class Blob implements Compat<Bytes> {\n constructor(readonly _delegate: Bytes) {}\n static fromBase64String(base64: string): Blob {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n\n static fromUint8Array(array: Uint8Array): Blob {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n\n toBase64(): string {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n\n toUint8Array(): Uint8Array {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n\n isEqual(other: Blob): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n\n toString(): string {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n","/**\n * @license\n * Copyright 2017 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 { FirestoreError } from '@firebase/firestore';\n\n/**\n * Observer/Subscribe interfaces.\n */\nexport type NextFn<T> = (value: T) => void;\nexport type ErrorFn = (error: FirestoreError) => void;\nexport type CompleteFn = () => void;\n\n// Allow for any of the Observer methods to be undefined.\nexport interface PartialObserver<T> {\n next?: NextFn<T>;\n error?: ErrorFn;\n complete?: CompleteFn;\n}\n\nexport function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T> {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj: unknown, methods: string[]): boolean {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n const object = obj as Record<string, unknown>;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n","/**\n * @license\n * Copyright 2017 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 { FirebaseApp } from '@firebase/app-types';\nimport { _FirebaseApp, FirebaseService } from '@firebase/app-types/private';\nimport {\n LoadBundleTask,\n Bytes,\n clearIndexedDbPersistence,\n disableNetwork,\n enableIndexedDbPersistence,\n enableMultiTabIndexedDbPersistence,\n enableNetwork,\n ensureFirestoreConfigured,\n Firestore as ExpFirestore,\n connectFirestoreEmulator,\n waitForPendingWrites,\n FieldPath as ExpFieldPath,\n limit,\n limitToLast,\n where,\n orderBy,\n startAfter,\n startAt,\n query,\n endBefore,\n endAt,\n doc,\n collection,\n collectionGroup,\n queryEqual,\n Query as ExpQuery,\n CollectionReference as ExpCollectionReference,\n DocumentReference as ExpDocumentReference,\n refEqual,\n addDoc,\n deleteDoc,\n executeWrite,\n getDoc,\n getDocFromCache,\n getDocFromServer,\n getDocs,\n getDocsFromCache,\n getDocsFromServer,\n onSnapshot,\n onSnapshotsInSync,\n setDoc,\n updateDoc,\n Unsubscribe,\n DocumentChange as ExpDocumentChange,\n DocumentSnapshot as ExpDocumentSnapshot,\n QueryDocumentSnapshot as ExpQueryDocumentSnapshot,\n QuerySnapshot as ExpQuerySnapshot,\n snapshotEqual,\n SnapshotMetadata,\n runTransaction,\n Transaction as ExpTransaction,\n WriteBatch as ExpWriteBatch,\n AbstractUserDataWriter,\n FirestoreError,\n FirestoreDataConverter as ModularFirestoreDataConverter,\n setLogLevel as setClientLogLevel,\n _DatabaseId,\n _validateIsNotUsedTogether,\n _cast,\n _DocumentKey,\n _debugAssert,\n _FieldPath,\n _ResourcePath,\n _ByteString,\n _logWarn,\n namedQuery,\n loadBundle,\n PartialWithFieldValue,\n WithFieldValue\n} from '@firebase/firestore';\nimport {\n CollectionReference as PublicCollectionReference,\n DocumentChange as PublicDocumentChange,\n DocumentChangeType as PublicDocumentChangeType,\n DocumentData,\n DocumentData as PublicDocumentData,\n DocumentReference as PublicDocumentReference,\n DocumentSnapshot as PublicDocumentSnapshot,\n FieldPath as PublicFieldPath,\n FirebaseFirestore as PublicFirestore,\n FirestoreDataConverter as PublicFirestoreDataConverter,\n GetOptions as PublicGetOptions,\n LogLevel as PublicLogLevel,\n OrderByDirection as PublicOrderByDirection,\n PersistenceSettings as PublicPersistenceSettings,\n Query as PublicQuery,\n QueryDocumentSnapshot as PublicQueryDocumentSnapshot,\n QuerySnapshot as PublicQuerySnapshot,\n SetOptions as PublicSetOptions,\n Settings as PublicSettings,\n SnapshotListenOptions as PublicSnapshotListenOptions,\n SnapshotOptions as PublicSnapshotOptions,\n Transaction as PublicTransaction,\n UpdateData as PublicUpdateData,\n WhereFilterOp as PublicWhereFilterOp,\n WriteBatch as PublicWriteBatch\n} from '@firebase/firestore-types';\nimport {\n Compat,\n EmulatorMockTokenOptions,\n getModularInstance\n} from '@firebase/util';\n\nimport { validateSetOptions } from '../util/input_validation';\n\nimport { Blob } from './blob';\nimport {\n CompleteFn,\n ErrorFn,\n isPartialObserver,\n NextFn,\n PartialObserver\n} from './observer';\n\n/**\n * A persistence provider for either memory-only or IndexedDB persistence.\n * Mainly used to allow optional inclusion of IndexedDB code.\n */\nexport interface PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void>;\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;\n clearIndexedDbPersistence(firestore: Firestore): Promise<void>;\n}\n\n/**\n * The persistence provider included with the full Firestore SDK.\n */\nexport class IndexedDbPersistenceProvider implements PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void> {\n return enableIndexedDbPersistence(firestore._delegate, { forceOwnership });\n }\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n\n/**\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\n * to the functional API of firestore-exp.\n */\nexport class Firestore\n implements PublicFirestore, FirebaseService, Compat<ExpFirestore>\n{\n _appCompat?: FirebaseApp;\n constructor(\n databaseIdOrApp: _DatabaseId | FirebaseApp,\n readonly _delegate: ExpFirestore,\n private _persistenceProvider: PersistenceProvider\n ) {\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp as FirebaseApp;\n }\n }\n\n get _databaseId(): _DatabaseId {\n return this._delegate._databaseId;\n }\n\n settings(settingsLiteral: PublicSettings): void {\n const currentSettings = this._delegate._getSettings();\n if (\n !settingsLiteral.merge &&\n currentSettings.host !== settingsLiteral.host\n ) {\n _logWarn(\n 'You are overriding the original host. If you did not intend ' +\n 'to override your settings, use {merge: true}.'\n );\n }\n\n if (settingsLiteral.merge) {\n settingsLiteral = {\n ...currentSettings,\n ...settingsLiteral\n };\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n\n this._delegate._setSettings(settingsLiteral);\n }\n\n useEmulator(\n host: string,\n port: number,\n options: {\n mockUserToken?: EmulatorMockTokenOptions | string;\n } = {}\n ): void {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n\n enableNetwork(): Promise<void> {\n return enableNetwork(this._delegate);\n }\n\n disableNetwork(): Promise<void> {\n return disableNetwork(this._delegate);\n }\n\n enablePersistence(settings?: PublicPersistenceSettings): Promise<void> {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n\n _validateIsNotUsedTogether(\n 'synchronizeTabs',\n synchronizeTabs,\n 'experimentalForceOwningTab',\n experimentalForceOwningTab\n );\n }\n\n return synchronizeTabs\n ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this)\n : this._persistenceProvider.enableIndexedDbPersistence(\n this,\n experimentalForceOwningTab\n );\n }\n\n clearPersistence(): Promise<void> {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n\n terminate(): Promise<void> {\n if (this._appCompat) {\n (this._appCompat as _FirebaseApp)._removeServiceInstance(\n 'firestore-compat'\n );\n (this._appCompat as _FirebaseApp)._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n\n waitForPendingWrites(): Promise<void> {\n return waitForPendingWrites(this._delegate);\n }\n\n onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe;\n onSnapshotsInSync(onSync: () => void): Unsubscribe;\n onSnapshotsInSync(arg: unknown): Unsubscribe {\n return onSnapshotsInSync(this._delegate, arg as PartialObserver<void>);\n }\n\n get app(): FirebaseApp {\n if (!this._appCompat) {\n throw new FirestoreError(\n 'failed-precondition',\n \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available'\n );\n }\n return this._appCompat as FirebaseApp;\n }\n\n INTERNAL = {\n delete: () => this.terminate()\n };\n\n collection(pathString: string): PublicCollectionReference {\n try {\n return new CollectionReference(\n this,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'Firestore.collection()'\n );\n }\n }\n\n doc(pathString: string): PublicDocumentReference {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'doc()', 'Firestore.doc()');\n }\n }\n\n collectionGroup(collectionId: string): PublicQuery {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collectionGroup()',\n 'Firestore.collectionGroup()'\n );\n }\n }\n\n runTransaction<T>(\n updateFunction: (transaction: PublicTransaction) => Promise<T>\n ): Promise<T> {\n return runTransaction(this._delegate, transaction =>\n updateFunction(new Transaction(this, transaction))\n );\n }\n\n batch(): PublicWriteBatch {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(\n new ExpWriteBatch(this._delegate, mutations =>\n executeWrite(this._delegate, mutations)\n )\n );\n }\n\n loadBundle(\n bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string\n ): LoadBundleTask {\n return loadBundle(this._delegate, bundleData);\n }\n\n namedQuery(name: string): Promise<PublicQuery<DocumentData> | null> {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(\n this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery\n );\n });\n }\n}\n\nexport class UserDataWriter extends AbstractUserDataWriter {\n constructor(protected firestore: Firestore) {\n super();\n }\n\n protected convertBytes(bytes: _ByteString): Blob {\n return new Blob(new Bytes(bytes));\n }\n\n protected convertReference(name: string): DocumentReference {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */ null);\n }\n}\n\nexport function setLogLevel(level: PublicLogLevel): void {\n setClientLogLevel(level);\n}\n\n/**\n * A reference to a transaction.\n */\nexport class Transaction implements PublicTransaction, Compat<ExpTransaction> {\n private _userDataWriter: UserDataWriter;\n\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpTransaction\n ) {\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n\n get<T>(\n documentRef: PublicDocumentReference<T>\n ): Promise<PublicDocumentSnapshot<T>> {\n const ref = castReference(documentRef);\n return this._delegate\n .get(ref)\n .then(\n result =>\n new DocumentSnapshot(\n this._firestore,\n new ExpDocumentSnapshot<T>(\n this._firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n ref.converter\n )\n )\n );\n }\n\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): Transaction;\n set<T>(documentRef: DocumentReference<T>, data: T): Transaction;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): Transaction {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: unknown,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): Transaction {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\n\nexport class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> {\n constructor(readonly _delegate: ExpWriteBatch) {}\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): WriteBatch;\n set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): WriteBatch {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n\n commit(): Promise<void> {\n return this._delegate.commit();\n }\n}\n\n/**\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\n * experimental SDK into corresponding types from the Classic SDK before passing\n * them to the wrapped converter.\n */\nclass FirestoreDataConverter<U>\n implements\n ModularFirestoreDataConverter<U>,\n Compat<PublicFirestoreDataConverter<U>>\n{\n private static readonly INSTANCES = new WeakMap();\n\n private constructor(\n private readonly _firestore: Firestore,\n private readonly _userDataWriter: UserDataWriter,\n readonly _delegate: PublicFirestoreDataConverter<U>\n ) {}\n\n fromFirestore(\n snapshot: ExpQueryDocumentSnapshot,\n options?: PublicSnapshotOptions\n ): U {\n const expSnapshot = new ExpQueryDocumentSnapshot(\n this._firestore._delegate,\n this._userDataWriter,\n snapshot._key,\n snapshot._document,\n snapshot.metadata,\n /* converter= */ null\n );\n return this._delegate.fromFirestore(\n new QueryDocumentSnapshot(this._firestore, expSnapshot),\n options ?? {}\n );\n }\n\n toFirestore(modelObject: WithFieldValue<U>): PublicDocumentData;\n toFirestore(\n modelObject: PartialWithFieldValue<U>,\n options: PublicSetOptions\n ): PublicDocumentData;\n toFirestore(\n modelObject: WithFieldValue<U> | PartialWithFieldValue<U>,\n options?: PublicSetOptions\n ): PublicDocumentData {\n if (!options) {\n return this._delegate.toFirestore(modelObject as U);\n } else {\n return this._delegate.toFirestore(modelObject as Partial<U>, options);\n }\n }\n\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance<U>(\n firestore: Firestore,\n converter: PublicFirestoreDataConverter<U>\n ): FirestoreDataConverter<U> {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(\n firestore,\n new UserDataWriter(firestore),\n converter\n );\n untypedConverterByConverter.set(converter, instance);\n }\n\n return instance;\n }\n}\n\n/**\n * A reference to a particular document in a collection in the database.\n */\nexport class DocumentReference<T = PublicDocumentData>\n implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>>\n{\n private _userDataWriter: UserDataWriter;\n\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpDocumentReference<T>\n ) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n static forPath<U>(\n path: _ResourcePath,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(\n 'invalid-argument',\n 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n `${path.canonicalString()} has ${path.length}`\n );\n }\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(\n firestore._delegate,\n converter,\n new _DocumentKey(path)\n )\n );\n }\n\n static forKey<U>(\n key: _DocumentKey,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(firestore._delegate, converter, key)\n );\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get parent(): PublicCollectionReference<T> {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n collection(\n pathString: string\n ): PublicCollectionReference<PublicDocumentData> {\n try {\n return new CollectionReference(\n this.firestore,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'DocumentReference.collection()'\n );\n }\n }\n\n isEqual(other: PublicDocumentReference<T>): boolean {\n other = getModularInstance<PublicDocumentReference<T>>(other);\n\n if (!(other instanceof ExpDocumentReference)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n\n set(value: Partial<T>, options: PublicSetOptions): Promise<void>;\n set(value: T): Promise<void>;\n set(value: T | Partial<T>, options?: PublicSetOptions): Promise<void> {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(\n this._delegate,\n value as PartialWithFieldValue<T>,\n options\n );\n } else {\n return setDoc(this._delegate, value as WithFieldValue<T>);\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'setDoc()',\n 'DocumentReference.set()'\n );\n }\n }\n\n update(value: PublicUpdateData): Promise<void>;\n update(\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void>;\n update(\n fieldOrUpdateData: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void> {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData as PublicUpdateData);\n } else {\n return updateDoc(\n this._delegate,\n fieldOrUpdateData as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'updateDoc()',\n 'DocumentReference.update()'\n );\n }\n }\n\n delete(): Promise<void> {\n return deleteDoc(this._delegate);\n }\n\n onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicDocumentSnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<DocumentSnapshot<T>, ExpDocumentSnapshot<T>>(\n args,\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>> {\n let snap: Promise<ExpDocumentSnapshot<T>>;\n if (options?.source === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if (options?.source === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n\n return snap.then(\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n }\n\n withConverter(converter: null): PublicDocumentReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): PublicDocumentReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): PublicDocumentReference<U> {\n return new DocumentReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpDocumentReference<U>)\n );\n }\n}\n\n/**\n * Replaces the function name in an error thrown by the firestore-exp API\n * with the function names used in the classic API.\n */\nfunction replaceFunctionName(\n e: Error,\n original: string | RegExp,\n updated: string\n): Error {\n e.message = e.message.replace(original, updated);\n return e;\n}\n\n/**\n * Iterates the list of arguments from an `onSnapshot` call and returns the\n * first argument that may be an `SnapshotListenOptions` object. Returns an\n * empty object if none is found.\n */\nexport function extractSnapshotOptions(\n args: unknown[]\n): PublicSnapshotListenOptions {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg as PublicSnapshotListenOptions;\n }\n }\n return {};\n}\n\n/**\n * Creates an observer that can be passed to the firestore-exp SDK. The\n * observer converts all observed values into the format expected by the classic\n * SDK.\n *\n * @param args - The list of arguments from an `onSnapshot` call.\n * @param wrapper - The function that converts the firestore-exp type into the\n * type used by this shim.\n */\nexport function wrapObserver<CompatType, ExpType>(\n args: unknown[],\n wrapper: (val: ExpType) => CompatType\n): PartialObserver<ExpType> {\n let userObserver: PartialObserver<CompatType>;\n if (isPartialObserver(args[0])) {\n userObserver = args[0] as PartialObserver<CompatType>;\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0] as NextFn<CompatType> | undefined,\n error: args[1] as ErrorFn | undefined,\n complete: args[2] as CompleteFn | undefined\n };\n } else {\n userObserver = {\n next: args[1] as NextFn<CompatType> | undefined,\n error: args[2] as ErrorFn | undefined,\n complete: args[3] as CompleteFn | undefined\n };\n }\n\n return {\n next: val => {\n if (userObserver!.next) {\n userObserver!.next(wrapper(val));\n }\n },\n error: userObserver.error?.bind(userObserver),\n complete: userObserver.complete?.bind(userObserver)\n };\n}\n\n/**\n * Options interface that can be provided to configure the deserialization of\n * DocumentSnapshots.\n */\nexport interface SnapshotOptions extends PublicSnapshotOptions {}\n\nexport class DocumentSnapshot<T = PublicDocumentData>\n implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentSnapshot<T>\n ) {}\n\n get ref(): DocumentReference<T> {\n return new DocumentReference<T>(this._firestore, this._delegate.ref);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get exists(): boolean {\n return this._delegate.exists();\n }\n\n data(options?: PublicSnapshotOptions): T | undefined {\n return this._delegate.data(options);\n }\n\n get(\n fieldPath: string | PublicFieldPath,\n options?: PublicSnapshotOptions\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any {\n return this._delegate.get(fieldPath as string | ExpFieldPath, options);\n }\n\n isEqual(other: DocumentSnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class QueryDocumentSnapshot<T = PublicDocumentData>\n extends DocumentSnapshot<T>\n implements PublicQueryDocumentSnapshot<T>\n{\n data(options?: PublicSnapshotOptions): T {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data as T;\n } else {\n _debugAssert(\n data !== undefined,\n 'Document in a QueryDocumentSnapshot should exist'\n );\n return data;\n }\n }\n}\n\nexport class Query<T = PublicDocumentData>\n implements PublicQuery<T>, Compat<ExpQuery<T>>\n{\n private readonly _userDataWriter: UserDataWriter;\n\n constructor(readonly firestore: Firestore, readonly _delegate: ExpQuery<T>) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n where(\n fieldPath: string | _FieldPath,\n opStr: PublicWhereFilterOp,\n value: unknown\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, where(fieldPath as string, opStr, value))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n orderBy(\n fieldPath: string | _FieldPath,\n directionStr?: PublicOrderByDirection\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, orderBy(fieldPath as string, directionStr))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n limit(n: number): Query<T> {\n try {\n return new Query<T>(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'limit()', 'Query.limit()');\n }\n }\n\n limitToLast(n: number): Query<T> {\n try {\n return new Query<T>(\n this.firestore,\n query(this._delegate, limitToLast(n))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'limitToLast()',\n 'Query.limitToLast()'\n );\n }\n }\n\n startAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'startAt()', 'Query.startAt()');\n }\n }\n\n startAfter(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, startAfter(...args))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'startAfter()',\n 'Query.startAfter()'\n );\n }\n }\n\n endBefore(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, endBefore(...args))\n );\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endBefore()', 'Query.endBefore()');\n }\n }\n\n endAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endAt()', 'Query.endAt()');\n }\n }\n\n isEqual(other: PublicQuery<T>): boolean {\n return queryEqual(this._delegate, (other as Query<T>)._delegate);\n }\n\n get(options?: PublicGetOptions): Promise<QuerySnapshot<T>> {\n let query: Promise<ExpQuerySnapshot<T>>;\n if (options?.source === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if (options?.source === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(\n result =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n result._snapshot\n )\n )\n );\n }\n\n onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicQuerySnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<QuerySnapshot<T>, ExpQuerySnapshot<T>>(\n args,\n snap =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n snap._snapshot\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n withConverter(converter: null): Query<PublicDocumentData>;\n withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): Query<U> {\n return new Query<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpQuery<U>)\n );\n }\n}\n\nexport class DocumentChange<T = PublicDocumentData>\n implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentChange<T>\n ) {}\n\n get type(): PublicDocumentChangeType {\n return this._delegate.type;\n }\n\n get doc(): QueryDocumentSnapshot<T> {\n return new QueryDocumentSnapshot<T>(this._firestore, this._delegate.doc);\n }\n\n get oldIndex(): number {\n return this._delegate.oldIndex;\n }\n\n get newIndex(): number {\n return this._delegate.newIndex;\n }\n}\n\nexport class QuerySnapshot<T = PublicDocumentData>\n implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>>\n{\n constructor(\n readonly _firestore: Firestore,\n readonly _delegate: ExpQuerySnapshot<T>\n ) {}\n\n get query(): Query<T> {\n return new Query(this._firestore, this._delegate.query);\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get size(): number {\n return this._delegate.size;\n }\n\n get empty(): boolean {\n return this._delegate.empty;\n }\n\n get docs(): Array<QueryDocumentSnapshot<T>> {\n return this._delegate.docs.map(\n doc => new QueryDocumentSnapshot<T>(this._firestore, doc)\n );\n }\n\n docChanges(\n options?: PublicSnapshotListenOptions\n ): Array<PublicDocumentChange<T>> {\n return this._delegate\n .docChanges(options)\n .map(docChange => new DocumentChange<T>(this._firestore, docChange));\n }\n\n forEach(\n callback: (result: QueryDocumentSnapshot<T>) => void,\n thisArg?: unknown\n ): void {\n this._delegate.forEach(snapshot => {\n callback.call(\n thisArg,\n new QueryDocumentSnapshot(this._firestore, snapshot)\n );\n });\n }\n\n isEqual(other: QuerySnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class CollectionReference<T = PublicDocumentData>\n extends Query<T>\n implements PublicCollectionReference<T>\n{\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpCollectionReference<T>\n ) {\n super(firestore, _delegate);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n get parent(): DocumentReference<PublicDocumentData> | null {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n\n doc(documentPath?: string): DocumentReference<T> {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(\n this.firestore,\n doc(this._delegate, documentPath)\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'doc()',\n 'CollectionReference.doc()'\n );\n }\n }\n\n add(data: T): Promise<DocumentReference<T>> {\n return addDoc(this._delegate, data as WithFieldValue<T>).then(\n docRef => new DocumentReference(this.firestore, docRef)\n );\n }\n\n isEqual(other: CollectionReference<T>): boolean {\n return refEqual(this._delegate, other._delegate);\n }\n\n withConverter(converter: null): CollectionReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): CollectionReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): CollectionReference<U> {\n return new CollectionReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpCollectionReference<U>)\n );\n }\n}\n\nfunction castReference<T>(\n documentRef: PublicDocumentReference<T>\n): ExpDocumentReference<T> {\n return _cast<ExpDocumentReference<T>>(documentRef, ExpDocumentReference);\n}\n","/**\n * @license\n * Copyright 2017 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 {\n FieldPath as ExpFieldPath,\n _FieldPath as InternalFieldPath\n} from '@firebase/firestore';\nimport { FieldPath as PublicFieldPath } from '@firebase/firestore-types';\nimport { Compat, getModularInstance } from '@firebase/util';\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a list\n * of field names (referring to a nested field in the document).\n */\nexport class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> {\n readonly _delegate: ExpFieldPath;\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames - A list of field names.\n */\n constructor(...fieldNames: string[]) {\n this._delegate = new ExpFieldPath(...fieldNames);\n }\n\n static documentId(): FieldPath {\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n return new FieldPath(InternalFieldPath.keyField().canonicalString());\n }\n\n isEqual(other: PublicFieldPath): boolean {\n other = getModularInstance(other);\n\n if (!(other instanceof ExpFieldPath)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n","/**\n * @license\n * Copyright 2017 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 {\n arrayRemove,\n arrayUnion,\n deleteField,\n FieldValue as FieldValue1,\n increment,\n serverTimestamp\n} from '@firebase/firestore';\nimport { FieldValue as PublicFieldValue } from '@firebase/firestore-types';\nimport { Compat } from '@firebase/util';\n\nexport class FieldValue implements PublicFieldValue, Compat<FieldValue1> {\n static serverTimestamp(): FieldValue {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n\n static delete(): FieldValue {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n\n static arrayUnion(...elements: unknown[]): FieldValue {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n\n static arrayRemove(...elements: unknown[]): FieldValue {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n\n static increment(n: number): FieldValue {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n\n constructor(readonly _delegate: FieldValue1) {}\n\n isEqual(other: FieldValue): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { FirebaseApp } from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport { Component, ComponentType } from '@firebase/component';\nimport {\n Firestore as ModularFirestore,\n CACHE_SIZE_UNLIMITED,\n GeoPoint,\n Timestamp\n} from '@firebase/firestore';\n\nimport { Blob } from './api/blob';\nimport {\n Firestore,\n Transaction,\n CollectionReference,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n WriteBatch,\n setLogLevel\n} from './api/database';\nimport { FieldPath } from './api/field_path';\nimport { FieldValue } from './api/field_value';\n\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\nexport function configureForFirebase(\n firebase: FirebaseNamespace,\n firestoreFactory: (\n app: FirebaseApp,\n firestoreExp: ModularFirestore\n ) => Firestore\n): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'firestore-compat',\n container => {\n const app = container.getProvider('app-compat').getImmediate()!;\n const firestoreExp = container.getProvider('firestore').getImmediate()!;\n return firestoreFactory(app, firestoreExp);\n },\n 'PUBLIC' as ComponentType.PUBLIC\n ).setServiceProps({ ...firestoreNamespace })\n );\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport firebase from '@firebase/app-compat';\nimport type { FirebaseNamespace } from '@firebase/app-types';\nimport * as types from '@firebase/firestore-types';\n\nimport { name, version } from '../package.json';\n\nimport { Firestore, IndexedDbPersistenceProvider } from './api/database';\nimport { configureForFirebase } from './config';\n\nimport './register-module';\n\n/**\n * Registers the main Firestore build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\nexport function registerFirestore(instance: FirebaseNamespace): void {\n configureForFirebase(\n instance,\n (app, firestoreExp) =>\n new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())\n );\n instance.registerVersion(name, version);\n}\n\nregisterFirestore(firebase as unknown as FirebaseNamespace);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n firestore: {\n (app?: FirebaseApp): types.FirebaseFirestore;\n Blob: typeof types.Blob;\n CollectionReference: typeof types.CollectionReference;\n DocumentReference: typeof types.DocumentReference;\n DocumentSnapshot: typeof types.DocumentSnapshot;\n FieldPath: typeof types.FieldPath;\n FieldValue: typeof types.FieldValue;\n Firestore: typeof types.FirebaseFirestore;\n GeoPoint: typeof types.GeoPoint;\n Query: typeof types.Query;\n QueryDocumentSnapshot: typeof types.QueryDocumentSnapshot;\n QuerySnapshot: typeof types.QuerySnapshot;\n Timestamp: typeof types.Timestamp;\n Transaction: typeof types.Transaction;\n WriteBatch: typeof types.WriteBatch;\n setLogLevel: typeof types.setLogLevel;\n };\n }\n interface FirebaseApp {\n firestore?(): types.FirebaseFirestore;\n }\n}\n"],"names":["FirestoreError","_isBase64Available","Bytes","firestore","enableIndexedDbPersistence","enableMultiTabIndexedDbPersistence","clearIndexedDbPersistence","_DatabaseId","_logWarn","connectFirestoreEmulator","enableNetwork","disableNetwork","_validateIsNotUsedTogether","waitForPendingWrites","onSnapshotsInSync","collection","doc","collectionGroup","runTransaction","ensureFirestoreConfigured","ExpWriteBatch","executeWrite","loadBundle","namedQuery","AbstractUserDataWriter","setClientLogLevel","ExpDocumentSnapshot","ExpQueryDocumentSnapshot","ExpDocumentReference","_DocumentKey","getModularInstance","refEqual","setDoc","updateDoc","deleteDoc","onSnapshot","getDocFromCache","getDocFromServer","getDoc","snapshotEqual","_debugAssert","query","where","orderBy","limit","limitToLast","startAt","startAfter","endBefore","endAt","queryEqual","getDocsFromCache","getDocsFromServer","getDocs","ExpQuerySnapshot","addDoc","_cast","ExpFieldPath","InternalFieldPath","serverTimestamp","deleteField","arrayUnion","arrayRemove","increment","GeoPoint","Timestamp","CACHE_SIZE_UNLIMITED","Component","firebase"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAKa,SAAA,kBAAkB,CAChC,UAAkB,EAClB,OAA+B,EAAA;AAE/B,IAAA,IAAI,OAAO,KAAK,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A;AAEb,IAAA,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAIC,mBAAS,CACX,kBAAkB,EAClB,SAAS,IAAG;QACV,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAG,CAAC;QAChE,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,YAAY,EAAG,CAAC;AACxE,QAAA,OAAO,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AAC7C,KAAC,EACD,QAAgC,CACjC,CAAC,eAAe,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAC,CAC7C,CAAC;AACJ;;ACzFA;;;;;;;;;;;;;;;AAeG;AAcH;;;AAGG;AACG,SAAU,iBAAiB,CAAC,QAA2B,EAAA;IAC3D,oBAAoB,CAClB,QAAQ,EACR,CAAC,GAAG,EAAE,YAAY,KAChB,IAAI,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,4BAA4B,EAAE,CAAC,CACvE,CAAC;AACF,IAAA,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,iBAAiB,CAACC,4BAAwC,CAAC;;;;"}
\ No newline at end of file diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.esm.js b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.esm.js deleted file mode 100644 index 7d66d30..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.esm.js +++ /dev/null @@ -1,1005 +0,0 @@ -import firebase from '@firebase/app-compat'; -import { FirestoreError, Bytes, _isBase64Available, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, clearIndexedDbPersistence, _DatabaseId, _logWarn, connectFirestoreEmulator, enableNetwork, disableNetwork, _validateIsNotUsedTogether, waitForPendingWrites, onSnapshotsInSync, collection, doc, collectionGroup, runTransaction, ensureFirestoreConfigured, WriteBatch as WriteBatch$1, executeWrite, loadBundle, namedQuery, DocumentSnapshot as DocumentSnapshot$1, DocumentReference as DocumentReference$1, _DocumentKey, refEqual, setDoc, updateDoc, deleteDoc, onSnapshot, getDocFromCache, getDocFromServer, getDoc, snapshotEqual, query, where, orderBy, limit, limitToLast, startAt, startAfter, endBefore, endAt, queryEqual, getDocsFromCache, getDocsFromServer, getDocs, QuerySnapshot as QuerySnapshot$1, addDoc, _cast, AbstractUserDataWriter, setLogLevel as setLogLevel$1, QueryDocumentSnapshot as QueryDocumentSnapshot$1, _debugAssert, FieldPath as FieldPath$1, _FieldPath, serverTimestamp, deleteField, arrayUnion, arrayRemove, increment, GeoPoint, Timestamp, CACHE_SIZE_UNLIMITED } from '@firebase/firestore'; -import { getModularInstance } from '@firebase/util'; -import { Component } from '@firebase/component'; - -const name = "@firebase/firestore-compat"; -const version = "0.4.2"; - -/** - * @license - * Copyright 2021 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. - */ -function validateSetOptions(methodName, options) { - if (options === undefined) { - return { - merge: false - }; - } - if (options.mergeFields !== undefined && options.merge !== undefined) { - throw new FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + - 'specify both "merge" and "mergeFields".'); - } - return options; -} - -/** - * @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. - */ -/** Helper function to assert Uint8Array is available at runtime. */ -function assertUint8ArrayAvailable() { - if (typeof Uint8Array === 'undefined') { - throw new FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.'); - } -} -/** Helper function to assert Base64 functions are available at runtime. */ -function assertBase64Available() { - if (!_isBase64Available()) { - throw new FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.'); - } -} -/** Immutable class holding a blob (binary data) */ -class Blob { - constructor(_delegate) { - this._delegate = _delegate; - } - static fromBase64String(base64) { - assertBase64Available(); - return new Blob(Bytes.fromBase64String(base64)); - } - static fromUint8Array(array) { - assertUint8ArrayAvailable(); - return new Blob(Bytes.fromUint8Array(array)); - } - toBase64() { - assertBase64Available(); - return this._delegate.toBase64(); - } - toUint8Array() { - assertUint8ArrayAvailable(); - return this._delegate.toUint8Array(); - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } - toString() { - return 'Blob(base64: ' + this.toBase64() + ')'; - } -} - -/** - * @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. - */ -function isPartialObserver(obj) { - return implementsAnyMethods(obj, ['next', 'error', 'complete']); -} -/** - * Returns true if obj is an object and contains at least one of the specified - * methods. - */ -function implementsAnyMethods(obj, methods) { - if (typeof obj !== 'object' || obj === null) { - return false; - } - const object = obj; - for (const method of methods) { - if (method in object && typeof object[method] === 'function') { - return true; - } - } - return false; -} - -/** - * @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. - */ -/** - * The persistence provider included with the full Firestore SDK. - */ -class IndexedDbPersistenceProvider { - enableIndexedDbPersistence(firestore, forceOwnership) { - return enableIndexedDbPersistence(firestore._delegate, { forceOwnership }); - } - enableMultiTabIndexedDbPersistence(firestore) { - return enableMultiTabIndexedDbPersistence(firestore._delegate); - } - clearIndexedDbPersistence(firestore) { - return clearIndexedDbPersistence(firestore._delegate); - } -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -class Firestore { - constructor(databaseIdOrApp, _delegate, _persistenceProvider) { - this._delegate = _delegate; - this._persistenceProvider = _persistenceProvider; - this.INTERNAL = { - delete: () => this.terminate() - }; - if (!(databaseIdOrApp instanceof _DatabaseId)) { - this._appCompat = databaseIdOrApp; - } - } - get _databaseId() { - return this._delegate._databaseId; - } - settings(settingsLiteral) { - const currentSettings = this._delegate._getSettings(); - if (!settingsLiteral.merge && - currentSettings.host !== settingsLiteral.host) { - _logWarn('You are overriding the original host. If you did not intend ' + - 'to override your settings, use {merge: true}.'); - } - if (settingsLiteral.merge) { - settingsLiteral = { - ...currentSettings, - ...settingsLiteral - }; - // Remove the property from the settings once the merge is completed - delete settingsLiteral.merge; - } - this._delegate._setSettings(settingsLiteral); - } - useEmulator(host, port, options = {}) { - connectFirestoreEmulator(this._delegate, host, port, options); - } - enableNetwork() { - return enableNetwork(this._delegate); - } - disableNetwork() { - return disableNetwork(this._delegate); - } - enablePersistence(settings) { - let synchronizeTabs = false; - let experimentalForceOwningTab = false; - if (settings) { - synchronizeTabs = !!settings.synchronizeTabs; - experimentalForceOwningTab = !!settings.experimentalForceOwningTab; - _validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab); - } - return synchronizeTabs - ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) - : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab); - } - clearPersistence() { - return this._persistenceProvider.clearIndexedDbPersistence(this); - } - terminate() { - if (this._appCompat) { - this._appCompat._removeServiceInstance('firestore-compat'); - this._appCompat._removeServiceInstance('firestore'); - } - return this._delegate._delete(); - } - waitForPendingWrites() { - return waitForPendingWrites(this._delegate); - } - onSnapshotsInSync(arg) { - return onSnapshotsInSync(this._delegate, arg); - } - get app() { - if (!this._appCompat) { - throw new FirestoreError('failed-precondition', "Firestore was not initialized using the Firebase SDK. 'app' is " + - 'not available'); - } - return this._appCompat; - } - collection(pathString) { - try { - return new CollectionReference(this, collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'Firestore.collection()'); - } - } - doc(pathString) { - try { - return new DocumentReference(this, doc(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'Firestore.doc()'); - } - } - collectionGroup(collectionId) { - try { - return new Query(this, collectionGroup(this._delegate, collectionId)); - } - catch (e) { - throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()'); - } - } - runTransaction(updateFunction) { - return runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction))); - } - batch() { - ensureFirestoreConfigured(this._delegate); - return new WriteBatch(new WriteBatch$1(this._delegate, mutations => executeWrite(this._delegate, mutations))); - } - loadBundle(bundleData) { - return loadBundle(this._delegate, bundleData); - } - namedQuery(name) { - return namedQuery(this._delegate, name).then(expQuery => { - if (!expQuery) { - return null; - } - return new Query(this, - // We can pass `expQuery` here directly since named queries don't have a UserDataConverter. - // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter. - expQuery); - }); - } -} -class UserDataWriter extends AbstractUserDataWriter { - constructor(firestore) { - super(); - this.firestore = firestore; - } - convertBytes(bytes) { - return new Blob(new Bytes(bytes)); - } - convertReference(name) { - const key = this.convertDocumentKey(name, this.firestore._databaseId); - return DocumentReference.forKey(key, this.firestore, /* converter= */ null); - } -} -function setLogLevel(level) { - setLogLevel$1(level); -} -/** - * A reference to a transaction. - */ -class Transaction { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(_firestore); - } - get(documentRef) { - const ref = castReference(documentRef); - return this._delegate - .get(ref) - .then(result => new DocumentSnapshot(this._firestore, new DocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter))); - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('Transaction.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } -} -class WriteBatch { - constructor(_delegate) { - this._delegate = _delegate; - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('WriteBatch.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } - commit() { - return this._delegate.commit(); - } -} -/** - * Wraps a `PublicFirestoreDataConverter` translating the types from the - * experimental SDK into corresponding types from the Classic SDK before passing - * them to the wrapped converter. - */ -class FirestoreDataConverter { - constructor(_firestore, _userDataWriter, _delegate) { - this._firestore = _firestore; - this._userDataWriter = _userDataWriter; - this._delegate = _delegate; - } - fromFirestore(snapshot, options) { - const expSnapshot = new QueryDocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, - /* converter= */ null); - return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options ?? {}); - } - toFirestore(modelObject, options) { - if (!options) { - return this._delegate.toFirestore(modelObject); - } - else { - return this._delegate.toFirestore(modelObject, options); - } - } - // Use the same instance of `FirestoreDataConverter` for the given instances - // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will - // compare equal for two objects created with the same converter instance. - static getInstance(firestore, converter) { - const converterMapByFirestore = FirestoreDataConverter.INSTANCES; - let untypedConverterByConverter = converterMapByFirestore.get(firestore); - if (!untypedConverterByConverter) { - untypedConverterByConverter = new WeakMap(); - converterMapByFirestore.set(firestore, untypedConverterByConverter); - } - let instance = untypedConverterByConverter.get(converter); - if (!instance) { - instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter); - untypedConverterByConverter.set(converter, instance); - } - return instance; - } -} -FirestoreDataConverter.INSTANCES = new WeakMap(); -/** - * A reference to a particular document in a collection in the database. - */ -class DocumentReference { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - static forPath(path, firestore, converter) { - if (path.length % 2 !== 0) { - throw new FirestoreError('invalid-argument', 'Invalid document reference. Document ' + - 'references must have an even number of segments, but ' + - `${path.canonicalString()} has ${path.length}`); - } - return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, new _DocumentKey(path))); - } - static forKey(key, firestore, converter) { - return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, key)); - } - get id() { - return this._delegate.id; - } - get parent() { - return new CollectionReference(this.firestore, this._delegate.parent); - } - get path() { - return this._delegate.path; - } - collection(pathString) { - try { - return new CollectionReference(this.firestore, collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()'); - } - } - isEqual(other) { - other = getModularInstance(other); - if (!(other instanceof DocumentReference$1)) { - return false; - } - return refEqual(this._delegate, other); - } - set(value, options) { - options = validateSetOptions('DocumentReference.set', options); - try { - if (options) { - return setDoc(this._delegate, value, options); - } - else { - return setDoc(this._delegate, value); - } - } - catch (e) { - throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()'); - } - } - update(fieldOrUpdateData, value, ...moreFieldsAndValues) { - try { - if (arguments.length === 1) { - return updateDoc(this._delegate, fieldOrUpdateData); - } - else { - return updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues); - } - } - catch (e) { - throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()'); - } - } - delete() { - return deleteDoc(this._delegate); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - return onSnapshot(this._delegate, options, observer); - } - get(options) { - let snap; - if (options?.source === 'cache') { - snap = getDocFromCache(this._delegate); - } - else if (options?.source === 'server') { - snap = getDocFromServer(this._delegate); - } - else { - snap = getDoc(this._delegate); - } - return snap.then(result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - } - withConverter(converter) { - return new DocumentReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -/** - * Replaces the function name in an error thrown by the firestore-exp API - * with the function names used in the classic API. - */ -function replaceFunctionName(e, original, updated) { - e.message = e.message.replace(original, updated); - return e; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -function extractSnapshotOptions(args) { - for (const arg of args) { - if (typeof arg === 'object' && !isPartialObserver(arg)) { - return arg; - } - } - return {}; -} -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -function wrapObserver(args, wrapper) { - let userObserver; - if (isPartialObserver(args[0])) { - userObserver = args[0]; - } - else if (isPartialObserver(args[1])) { - userObserver = args[1]; - } - else if (typeof args[0] === 'function') { - userObserver = { - next: args[0], - error: args[1], - complete: args[2] - }; - } - else { - userObserver = { - next: args[1], - error: args[2], - complete: args[3] - }; - } - return { - next: val => { - if (userObserver.next) { - userObserver.next(wrapper(val)); - } - }, - error: userObserver.error?.bind(userObserver), - complete: userObserver.complete?.bind(userObserver) - }; -} -class DocumentSnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get ref() { - return new DocumentReference(this._firestore, this._delegate.ref); - } - get id() { - return this._delegate.id; - } - get metadata() { - return this._delegate.metadata; - } - get exists() { - return this._delegate.exists(); - } - data(options) { - return this._delegate.data(options); - } - get(fieldPath, options - // We are using `any` here to avoid an explicit cast by our users. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ) { - return this._delegate.get(fieldPath, options); - } - isEqual(other) { - return snapshotEqual(this._delegate, other._delegate); - } -} -class QueryDocumentSnapshot extends DocumentSnapshot { - data(options) { - const data = this._delegate.data(options); - if (this._delegate._converter) { - // Undefined is a possible valid value from converter. - return data; - } - else { - _debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist'); - return data; - } - } -} -class Query { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - where(fieldPath, opStr, value) { - try { - // The "as string" cast is a little bit of a hack. `where` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, query(this._delegate, where(fieldPath, opStr, value))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - orderBy(fieldPath, directionStr) { - try { - // The "as string" cast is a little bit of a hack. `orderBy` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, query(this._delegate, orderBy(fieldPath, directionStr))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - limit(n) { - try { - return new Query(this.firestore, query(this._delegate, limit(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limit()', 'Query.limit()'); - } - } - limitToLast(n) { - try { - return new Query(this.firestore, query(this._delegate, limitToLast(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()'); - } - } - startAt(...args) { - try { - return new Query(this.firestore, query(this._delegate, startAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAt()', 'Query.startAt()'); - } - } - startAfter(...args) { - try { - return new Query(this.firestore, query(this._delegate, startAfter(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()'); - } - } - endBefore(...args) { - try { - return new Query(this.firestore, query(this._delegate, endBefore(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()'); - } - } - endAt(...args) { - try { - return new Query(this.firestore, query(this._delegate, endAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endAt()', 'Query.endAt()'); - } - } - isEqual(other) { - return queryEqual(this._delegate, other._delegate); - } - get(options) { - let query; - if (options?.source === 'cache') { - query = getDocsFromCache(this._delegate); - } - else if (options?.source === 'server') { - query = getDocsFromServer(this._delegate); - } - else { - query = getDocs(this._delegate); - } - return query.then(result => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot))); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot))); - return onSnapshot(this._delegate, options, observer); - } - withConverter(converter) { - return new Query(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -class DocumentChange { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get type() { - return this._delegate.type; - } - get doc() { - return new QueryDocumentSnapshot(this._firestore, this._delegate.doc); - } - get oldIndex() { - return this._delegate.oldIndex; - } - get newIndex() { - return this._delegate.newIndex; - } -} -class QuerySnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get query() { - return new Query(this._firestore, this._delegate.query); - } - get metadata() { - return this._delegate.metadata; - } - get size() { - return this._delegate.size; - } - get empty() { - return this._delegate.empty; - } - get docs() { - return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc)); - } - docChanges(options) { - return this._delegate - .docChanges(options) - .map(docChange => new DocumentChange(this._firestore, docChange)); - } - forEach(callback, thisArg) { - this._delegate.forEach(snapshot => { - callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot)); - }); - } - isEqual(other) { - return snapshotEqual(this._delegate, other._delegate); - } -} -class CollectionReference extends Query { - constructor(firestore, _delegate) { - super(firestore, _delegate); - this.firestore = firestore; - this._delegate = _delegate; - } - get id() { - return this._delegate.id; - } - get path() { - return this._delegate.path; - } - get parent() { - const docRef = this._delegate.parent; - return docRef ? new DocumentReference(this.firestore, docRef) : null; - } - doc(documentPath) { - try { - if (documentPath === undefined) { - // Call `doc` without `documentPath` if `documentPath` is `undefined` - // as `doc` validates the number of arguments to prevent users from - // accidentally passing `undefined`. - return new DocumentReference(this.firestore, doc(this._delegate)); - } - else { - return new DocumentReference(this.firestore, doc(this._delegate, documentPath)); - } - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()'); - } - } - add(data) { - return addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef)); - } - isEqual(other) { - return refEqual(this._delegate, other._delegate); - } - withConverter(converter) { - return new CollectionReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -function castReference(documentRef) { - return _cast(documentRef, DocumentReference$1); -} - -/** - * @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. - */ -// The objects that are a part of this API are exposed to third-parties as -// compiled javascript so we want to flag our private members with a leading -// underscore to discourage their use. -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -class FieldPath { - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames) { - this._delegate = new FieldPath$1(...fieldNames); - } - static documentId() { - /** - * Internal Note: The backend doesn't technically support querying by - * document ID. Instead it queries by the entire document name (full path - * included), but in the cases we currently support documentId(), the net - * effect is the same. - */ - return new FieldPath(_FieldPath.keyField().canonicalString()); - } - isEqual(other) { - other = getModularInstance(other); - if (!(other instanceof FieldPath$1)) { - return false; - } - return this._delegate._internalPath.isEqual(other._internalPath); - } -} - -/** - * @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. - */ -class FieldValue { - static serverTimestamp() { - const delegate = serverTimestamp(); - delegate._methodName = 'FieldValue.serverTimestamp'; - return new FieldValue(delegate); - } - static delete() { - const delegate = deleteField(); - delegate._methodName = 'FieldValue.delete'; - return new FieldValue(delegate); - } - static arrayUnion(...elements) { - const delegate = arrayUnion(...elements); - delegate._methodName = 'FieldValue.arrayUnion'; - return new FieldValue(delegate); - } - static arrayRemove(...elements) { - const delegate = arrayRemove(...elements); - delegate._methodName = 'FieldValue.arrayRemove'; - return new FieldValue(delegate); - } - static increment(n) { - const delegate = increment(n); - delegate._methodName = 'FieldValue.increment'; - return new FieldValue(delegate); - } - constructor(_delegate) { - this._delegate = _delegate; - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } -} - -/** - * @license - * Copyright 2021 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 firestoreNamespace = { - Firestore, - GeoPoint, - Timestamp, - Blob, - Transaction, - WriteBatch, - DocumentReference, - DocumentSnapshot, - Query, - QueryDocumentSnapshot, - QuerySnapshot, - CollectionReference, - FieldPath, - FieldValue, - setLogLevel, - CACHE_SIZE_UNLIMITED -}; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -function configureForFirebase(firebase, firestoreFactory) { - firebase.INTERNAL.registerComponent(new Component('firestore-compat', container => { - const app = container.getProvider('app-compat').getImmediate(); - const firestoreExp = container.getProvider('firestore').getImmediate(); - return firestoreFactory(app, firestoreExp); - }, 'PUBLIC').setServiceProps({ ...firestoreNamespace })); -} - -/** - * @license - * Copyright 2020 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. - */ -/** - * Registers the main Firestore build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -function registerFirestore(instance) { - configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())); - instance.registerVersion(name, version); -} -registerFirestore(firebase); - -export { registerFirestore }; -//# sourceMappingURL=index.esm.js.map diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.esm.js.map b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.esm.js.map deleted file mode 100644 index ccd702d..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.esm.js","sources":["../src/util/input_validation.ts","../src/api/blob.ts","../src/api/observer.ts","../src/api/database.ts","../src/api/field_path.ts","../src/api/field_value.ts","../src/config.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 { FirestoreError } from '@firebase/firestore';\nimport { SetOptions } from '@firebase/firestore-types';\n\nexport function validateSetOptions(\n methodName: string,\n options: SetOptions | undefined\n): SetOptions {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError(\n 'invalid-argument',\n `Invalid options passed to function ${methodName}(): You cannot ` +\n 'specify both \"merge\" and \"mergeFields\".'\n );\n }\n\n return options;\n}\n","/**\n * @license\n * Copyright 2017 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 { Bytes, FirestoreError, _isBase64Available } from '@firebase/firestore';\nimport { Compat } from '@firebase/util';\n\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable(): void {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(\n 'unimplemented',\n 'Uint8Arrays are not available in this environment.'\n );\n }\n}\n\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available(): void {\n if (!_isBase64Available()) {\n throw new FirestoreError(\n 'unimplemented',\n 'Blobs are unavailable in Firestore in this environment.'\n );\n }\n}\n\n/** Immutable class holding a blob (binary data) */\nexport class Blob implements Compat<Bytes> {\n constructor(readonly _delegate: Bytes) {}\n static fromBase64String(base64: string): Blob {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n\n static fromUint8Array(array: Uint8Array): Blob {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n\n toBase64(): string {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n\n toUint8Array(): Uint8Array {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n\n isEqual(other: Blob): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n\n toString(): string {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n","/**\n * @license\n * Copyright 2017 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 { FirestoreError } from '@firebase/firestore';\n\n/**\n * Observer/Subscribe interfaces.\n */\nexport type NextFn<T> = (value: T) => void;\nexport type ErrorFn = (error: FirestoreError) => void;\nexport type CompleteFn = () => void;\n\n// Allow for any of the Observer methods to be undefined.\nexport interface PartialObserver<T> {\n next?: NextFn<T>;\n error?: ErrorFn;\n complete?: CompleteFn;\n}\n\nexport function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T> {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj: unknown, methods: string[]): boolean {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n const object = obj as Record<string, unknown>;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n","/**\n * @license\n * Copyright 2017 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 { FirebaseApp } from '@firebase/app-types';\nimport { _FirebaseApp, FirebaseService } from '@firebase/app-types/private';\nimport {\n LoadBundleTask,\n Bytes,\n clearIndexedDbPersistence,\n disableNetwork,\n enableIndexedDbPersistence,\n enableMultiTabIndexedDbPersistence,\n enableNetwork,\n ensureFirestoreConfigured,\n Firestore as ExpFirestore,\n connectFirestoreEmulator,\n waitForPendingWrites,\n FieldPath as ExpFieldPath,\n limit,\n limitToLast,\n where,\n orderBy,\n startAfter,\n startAt,\n query,\n endBefore,\n endAt,\n doc,\n collection,\n collectionGroup,\n queryEqual,\n Query as ExpQuery,\n CollectionReference as ExpCollectionReference,\n DocumentReference as ExpDocumentReference,\n refEqual,\n addDoc,\n deleteDoc,\n executeWrite,\n getDoc,\n getDocFromCache,\n getDocFromServer,\n getDocs,\n getDocsFromCache,\n getDocsFromServer,\n onSnapshot,\n onSnapshotsInSync,\n setDoc,\n updateDoc,\n Unsubscribe,\n DocumentChange as ExpDocumentChange,\n DocumentSnapshot as ExpDocumentSnapshot,\n QueryDocumentSnapshot as ExpQueryDocumentSnapshot,\n QuerySnapshot as ExpQuerySnapshot,\n snapshotEqual,\n SnapshotMetadata,\n runTransaction,\n Transaction as ExpTransaction,\n WriteBatch as ExpWriteBatch,\n AbstractUserDataWriter,\n FirestoreError,\n FirestoreDataConverter as ModularFirestoreDataConverter,\n setLogLevel as setClientLogLevel,\n _DatabaseId,\n _validateIsNotUsedTogether,\n _cast,\n _DocumentKey,\n _debugAssert,\n _FieldPath,\n _ResourcePath,\n _ByteString,\n _logWarn,\n namedQuery,\n loadBundle,\n PartialWithFieldValue,\n WithFieldValue\n} from '@firebase/firestore';\nimport {\n CollectionReference as PublicCollectionReference,\n DocumentChange as PublicDocumentChange,\n DocumentChangeType as PublicDocumentChangeType,\n DocumentData,\n DocumentData as PublicDocumentData,\n DocumentReference as PublicDocumentReference,\n DocumentSnapshot as PublicDocumentSnapshot,\n FieldPath as PublicFieldPath,\n FirebaseFirestore as PublicFirestore,\n FirestoreDataConverter as PublicFirestoreDataConverter,\n GetOptions as PublicGetOptions,\n LogLevel as PublicLogLevel,\n OrderByDirection as PublicOrderByDirection,\n PersistenceSettings as PublicPersistenceSettings,\n Query as PublicQuery,\n QueryDocumentSnapshot as PublicQueryDocumentSnapshot,\n QuerySnapshot as PublicQuerySnapshot,\n SetOptions as PublicSetOptions,\n Settings as PublicSettings,\n SnapshotListenOptions as PublicSnapshotListenOptions,\n SnapshotOptions as PublicSnapshotOptions,\n Transaction as PublicTransaction,\n UpdateData as PublicUpdateData,\n WhereFilterOp as PublicWhereFilterOp,\n WriteBatch as PublicWriteBatch\n} from '@firebase/firestore-types';\nimport {\n Compat,\n EmulatorMockTokenOptions,\n getModularInstance\n} from '@firebase/util';\n\nimport { validateSetOptions } from '../util/input_validation';\n\nimport { Blob } from './blob';\nimport {\n CompleteFn,\n ErrorFn,\n isPartialObserver,\n NextFn,\n PartialObserver\n} from './observer';\n\n/**\n * A persistence provider for either memory-only or IndexedDB persistence.\n * Mainly used to allow optional inclusion of IndexedDB code.\n */\nexport interface PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void>;\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;\n clearIndexedDbPersistence(firestore: Firestore): Promise<void>;\n}\n\n/**\n * The persistence provider included with the full Firestore SDK.\n */\nexport class IndexedDbPersistenceProvider implements PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void> {\n return enableIndexedDbPersistence(firestore._delegate, { forceOwnership });\n }\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n\n/**\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\n * to the functional API of firestore-exp.\n */\nexport class Firestore\n implements PublicFirestore, FirebaseService, Compat<ExpFirestore>\n{\n _appCompat?: FirebaseApp;\n constructor(\n databaseIdOrApp: _DatabaseId | FirebaseApp,\n readonly _delegate: ExpFirestore,\n private _persistenceProvider: PersistenceProvider\n ) {\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp as FirebaseApp;\n }\n }\n\n get _databaseId(): _DatabaseId {\n return this._delegate._databaseId;\n }\n\n settings(settingsLiteral: PublicSettings): void {\n const currentSettings = this._delegate._getSettings();\n if (\n !settingsLiteral.merge &&\n currentSettings.host !== settingsLiteral.host\n ) {\n _logWarn(\n 'You are overriding the original host. If you did not intend ' +\n 'to override your settings, use {merge: true}.'\n );\n }\n\n if (settingsLiteral.merge) {\n settingsLiteral = {\n ...currentSettings,\n ...settingsLiteral\n };\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n\n this._delegate._setSettings(settingsLiteral);\n }\n\n useEmulator(\n host: string,\n port: number,\n options: {\n mockUserToken?: EmulatorMockTokenOptions | string;\n } = {}\n ): void {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n\n enableNetwork(): Promise<void> {\n return enableNetwork(this._delegate);\n }\n\n disableNetwork(): Promise<void> {\n return disableNetwork(this._delegate);\n }\n\n enablePersistence(settings?: PublicPersistenceSettings): Promise<void> {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n\n _validateIsNotUsedTogether(\n 'synchronizeTabs',\n synchronizeTabs,\n 'experimentalForceOwningTab',\n experimentalForceOwningTab\n );\n }\n\n return synchronizeTabs\n ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this)\n : this._persistenceProvider.enableIndexedDbPersistence(\n this,\n experimentalForceOwningTab\n );\n }\n\n clearPersistence(): Promise<void> {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n\n terminate(): Promise<void> {\n if (this._appCompat) {\n (this._appCompat as _FirebaseApp)._removeServiceInstance(\n 'firestore-compat'\n );\n (this._appCompat as _FirebaseApp)._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n\n waitForPendingWrites(): Promise<void> {\n return waitForPendingWrites(this._delegate);\n }\n\n onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe;\n onSnapshotsInSync(onSync: () => void): Unsubscribe;\n onSnapshotsInSync(arg: unknown): Unsubscribe {\n return onSnapshotsInSync(this._delegate, arg as PartialObserver<void>);\n }\n\n get app(): FirebaseApp {\n if (!this._appCompat) {\n throw new FirestoreError(\n 'failed-precondition',\n \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available'\n );\n }\n return this._appCompat as FirebaseApp;\n }\n\n INTERNAL = {\n delete: () => this.terminate()\n };\n\n collection(pathString: string): PublicCollectionReference {\n try {\n return new CollectionReference(\n this,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'Firestore.collection()'\n );\n }\n }\n\n doc(pathString: string): PublicDocumentReference {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'doc()', 'Firestore.doc()');\n }\n }\n\n collectionGroup(collectionId: string): PublicQuery {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collectionGroup()',\n 'Firestore.collectionGroup()'\n );\n }\n }\n\n runTransaction<T>(\n updateFunction: (transaction: PublicTransaction) => Promise<T>\n ): Promise<T> {\n return runTransaction(this._delegate, transaction =>\n updateFunction(new Transaction(this, transaction))\n );\n }\n\n batch(): PublicWriteBatch {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(\n new ExpWriteBatch(this._delegate, mutations =>\n executeWrite(this._delegate, mutations)\n )\n );\n }\n\n loadBundle(\n bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string\n ): LoadBundleTask {\n return loadBundle(this._delegate, bundleData);\n }\n\n namedQuery(name: string): Promise<PublicQuery<DocumentData> | null> {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(\n this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery\n );\n });\n }\n}\n\nexport class UserDataWriter extends AbstractUserDataWriter {\n constructor(protected firestore: Firestore) {\n super();\n }\n\n protected convertBytes(bytes: _ByteString): Blob {\n return new Blob(new Bytes(bytes));\n }\n\n protected convertReference(name: string): DocumentReference {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */ null);\n }\n}\n\nexport function setLogLevel(level: PublicLogLevel): void {\n setClientLogLevel(level);\n}\n\n/**\n * A reference to a transaction.\n */\nexport class Transaction implements PublicTransaction, Compat<ExpTransaction> {\n private _userDataWriter: UserDataWriter;\n\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpTransaction\n ) {\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n\n get<T>(\n documentRef: PublicDocumentReference<T>\n ): Promise<PublicDocumentSnapshot<T>> {\n const ref = castReference(documentRef);\n return this._delegate\n .get(ref)\n .then(\n result =>\n new DocumentSnapshot(\n this._firestore,\n new ExpDocumentSnapshot<T>(\n this._firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n ref.converter\n )\n )\n );\n }\n\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): Transaction;\n set<T>(documentRef: DocumentReference<T>, data: T): Transaction;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): Transaction {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: unknown,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): Transaction {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\n\nexport class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> {\n constructor(readonly _delegate: ExpWriteBatch) {}\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): WriteBatch;\n set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): WriteBatch {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n\n commit(): Promise<void> {\n return this._delegate.commit();\n }\n}\n\n/**\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\n * experimental SDK into corresponding types from the Classic SDK before passing\n * them to the wrapped converter.\n */\nclass FirestoreDataConverter<U>\n implements\n ModularFirestoreDataConverter<U>,\n Compat<PublicFirestoreDataConverter<U>>\n{\n private static readonly INSTANCES = new WeakMap();\n\n private constructor(\n private readonly _firestore: Firestore,\n private readonly _userDataWriter: UserDataWriter,\n readonly _delegate: PublicFirestoreDataConverter<U>\n ) {}\n\n fromFirestore(\n snapshot: ExpQueryDocumentSnapshot,\n options?: PublicSnapshotOptions\n ): U {\n const expSnapshot = new ExpQueryDocumentSnapshot(\n this._firestore._delegate,\n this._userDataWriter,\n snapshot._key,\n snapshot._document,\n snapshot.metadata,\n /* converter= */ null\n );\n return this._delegate.fromFirestore(\n new QueryDocumentSnapshot(this._firestore, expSnapshot),\n options ?? {}\n );\n }\n\n toFirestore(modelObject: WithFieldValue<U>): PublicDocumentData;\n toFirestore(\n modelObject: PartialWithFieldValue<U>,\n options: PublicSetOptions\n ): PublicDocumentData;\n toFirestore(\n modelObject: WithFieldValue<U> | PartialWithFieldValue<U>,\n options?: PublicSetOptions\n ): PublicDocumentData {\n if (!options) {\n return this._delegate.toFirestore(modelObject as U);\n } else {\n return this._delegate.toFirestore(modelObject as Partial<U>, options);\n }\n }\n\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance<U>(\n firestore: Firestore,\n converter: PublicFirestoreDataConverter<U>\n ): FirestoreDataConverter<U> {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(\n firestore,\n new UserDataWriter(firestore),\n converter\n );\n untypedConverterByConverter.set(converter, instance);\n }\n\n return instance;\n }\n}\n\n/**\n * A reference to a particular document in a collection in the database.\n */\nexport class DocumentReference<T = PublicDocumentData>\n implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>>\n{\n private _userDataWriter: UserDataWriter;\n\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpDocumentReference<T>\n ) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n static forPath<U>(\n path: _ResourcePath,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(\n 'invalid-argument',\n 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n `${path.canonicalString()} has ${path.length}`\n );\n }\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(\n firestore._delegate,\n converter,\n new _DocumentKey(path)\n )\n );\n }\n\n static forKey<U>(\n key: _DocumentKey,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(firestore._delegate, converter, key)\n );\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get parent(): PublicCollectionReference<T> {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n collection(\n pathString: string\n ): PublicCollectionReference<PublicDocumentData> {\n try {\n return new CollectionReference(\n this.firestore,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'DocumentReference.collection()'\n );\n }\n }\n\n isEqual(other: PublicDocumentReference<T>): boolean {\n other = getModularInstance<PublicDocumentReference<T>>(other);\n\n if (!(other instanceof ExpDocumentReference)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n\n set(value: Partial<T>, options: PublicSetOptions): Promise<void>;\n set(value: T): Promise<void>;\n set(value: T | Partial<T>, options?: PublicSetOptions): Promise<void> {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(\n this._delegate,\n value as PartialWithFieldValue<T>,\n options\n );\n } else {\n return setDoc(this._delegate, value as WithFieldValue<T>);\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'setDoc()',\n 'DocumentReference.set()'\n );\n }\n }\n\n update(value: PublicUpdateData): Promise<void>;\n update(\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void>;\n update(\n fieldOrUpdateData: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void> {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData as PublicUpdateData);\n } else {\n return updateDoc(\n this._delegate,\n fieldOrUpdateData as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'updateDoc()',\n 'DocumentReference.update()'\n );\n }\n }\n\n delete(): Promise<void> {\n return deleteDoc(this._delegate);\n }\n\n onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicDocumentSnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<DocumentSnapshot<T>, ExpDocumentSnapshot<T>>(\n args,\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>> {\n let snap: Promise<ExpDocumentSnapshot<T>>;\n if (options?.source === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if (options?.source === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n\n return snap.then(\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n }\n\n withConverter(converter: null): PublicDocumentReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): PublicDocumentReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): PublicDocumentReference<U> {\n return new DocumentReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpDocumentReference<U>)\n );\n }\n}\n\n/**\n * Replaces the function name in an error thrown by the firestore-exp API\n * with the function names used in the classic API.\n */\nfunction replaceFunctionName(\n e: Error,\n original: string | RegExp,\n updated: string\n): Error {\n e.message = e.message.replace(original, updated);\n return e;\n}\n\n/**\n * Iterates the list of arguments from an `onSnapshot` call and returns the\n * first argument that may be an `SnapshotListenOptions` object. Returns an\n * empty object if none is found.\n */\nexport function extractSnapshotOptions(\n args: unknown[]\n): PublicSnapshotListenOptions {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg as PublicSnapshotListenOptions;\n }\n }\n return {};\n}\n\n/**\n * Creates an observer that can be passed to the firestore-exp SDK. The\n * observer converts all observed values into the format expected by the classic\n * SDK.\n *\n * @param args - The list of arguments from an `onSnapshot` call.\n * @param wrapper - The function that converts the firestore-exp type into the\n * type used by this shim.\n */\nexport function wrapObserver<CompatType, ExpType>(\n args: unknown[],\n wrapper: (val: ExpType) => CompatType\n): PartialObserver<ExpType> {\n let userObserver: PartialObserver<CompatType>;\n if (isPartialObserver(args[0])) {\n userObserver = args[0] as PartialObserver<CompatType>;\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0] as NextFn<CompatType> | undefined,\n error: args[1] as ErrorFn | undefined,\n complete: args[2] as CompleteFn | undefined\n };\n } else {\n userObserver = {\n next: args[1] as NextFn<CompatType> | undefined,\n error: args[2] as ErrorFn | undefined,\n complete: args[3] as CompleteFn | undefined\n };\n }\n\n return {\n next: val => {\n if (userObserver!.next) {\n userObserver!.next(wrapper(val));\n }\n },\n error: userObserver.error?.bind(userObserver),\n complete: userObserver.complete?.bind(userObserver)\n };\n}\n\n/**\n * Options interface that can be provided to configure the deserialization of\n * DocumentSnapshots.\n */\nexport interface SnapshotOptions extends PublicSnapshotOptions {}\n\nexport class DocumentSnapshot<T = PublicDocumentData>\n implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentSnapshot<T>\n ) {}\n\n get ref(): DocumentReference<T> {\n return new DocumentReference<T>(this._firestore, this._delegate.ref);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get exists(): boolean {\n return this._delegate.exists();\n }\n\n data(options?: PublicSnapshotOptions): T | undefined {\n return this._delegate.data(options);\n }\n\n get(\n fieldPath: string | PublicFieldPath,\n options?: PublicSnapshotOptions\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any {\n return this._delegate.get(fieldPath as string | ExpFieldPath, options);\n }\n\n isEqual(other: DocumentSnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class QueryDocumentSnapshot<T = PublicDocumentData>\n extends DocumentSnapshot<T>\n implements PublicQueryDocumentSnapshot<T>\n{\n data(options?: PublicSnapshotOptions): T {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data as T;\n } else {\n _debugAssert(\n data !== undefined,\n 'Document in a QueryDocumentSnapshot should exist'\n );\n return data;\n }\n }\n}\n\nexport class Query<T = PublicDocumentData>\n implements PublicQuery<T>, Compat<ExpQuery<T>>\n{\n private readonly _userDataWriter: UserDataWriter;\n\n constructor(readonly firestore: Firestore, readonly _delegate: ExpQuery<T>) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n where(\n fieldPath: string | _FieldPath,\n opStr: PublicWhereFilterOp,\n value: unknown\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, where(fieldPath as string, opStr, value))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n orderBy(\n fieldPath: string | _FieldPath,\n directionStr?: PublicOrderByDirection\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, orderBy(fieldPath as string, directionStr))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n limit(n: number): Query<T> {\n try {\n return new Query<T>(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'limit()', 'Query.limit()');\n }\n }\n\n limitToLast(n: number): Query<T> {\n try {\n return new Query<T>(\n this.firestore,\n query(this._delegate, limitToLast(n))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'limitToLast()',\n 'Query.limitToLast()'\n );\n }\n }\n\n startAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'startAt()', 'Query.startAt()');\n }\n }\n\n startAfter(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, startAfter(...args))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'startAfter()',\n 'Query.startAfter()'\n );\n }\n }\n\n endBefore(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, endBefore(...args))\n );\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endBefore()', 'Query.endBefore()');\n }\n }\n\n endAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endAt()', 'Query.endAt()');\n }\n }\n\n isEqual(other: PublicQuery<T>): boolean {\n return queryEqual(this._delegate, (other as Query<T>)._delegate);\n }\n\n get(options?: PublicGetOptions): Promise<QuerySnapshot<T>> {\n let query: Promise<ExpQuerySnapshot<T>>;\n if (options?.source === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if (options?.source === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(\n result =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n result._snapshot\n )\n )\n );\n }\n\n onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicQuerySnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<QuerySnapshot<T>, ExpQuerySnapshot<T>>(\n args,\n snap =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n snap._snapshot\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n withConverter(converter: null): Query<PublicDocumentData>;\n withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): Query<U> {\n return new Query<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpQuery<U>)\n );\n }\n}\n\nexport class DocumentChange<T = PublicDocumentData>\n implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentChange<T>\n ) {}\n\n get type(): PublicDocumentChangeType {\n return this._delegate.type;\n }\n\n get doc(): QueryDocumentSnapshot<T> {\n return new QueryDocumentSnapshot<T>(this._firestore, this._delegate.doc);\n }\n\n get oldIndex(): number {\n return this._delegate.oldIndex;\n }\n\n get newIndex(): number {\n return this._delegate.newIndex;\n }\n}\n\nexport class QuerySnapshot<T = PublicDocumentData>\n implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>>\n{\n constructor(\n readonly _firestore: Firestore,\n readonly _delegate: ExpQuerySnapshot<T>\n ) {}\n\n get query(): Query<T> {\n return new Query(this._firestore, this._delegate.query);\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get size(): number {\n return this._delegate.size;\n }\n\n get empty(): boolean {\n return this._delegate.empty;\n }\n\n get docs(): Array<QueryDocumentSnapshot<T>> {\n return this._delegate.docs.map(\n doc => new QueryDocumentSnapshot<T>(this._firestore, doc)\n );\n }\n\n docChanges(\n options?: PublicSnapshotListenOptions\n ): Array<PublicDocumentChange<T>> {\n return this._delegate\n .docChanges(options)\n .map(docChange => new DocumentChange<T>(this._firestore, docChange));\n }\n\n forEach(\n callback: (result: QueryDocumentSnapshot<T>) => void,\n thisArg?: unknown\n ): void {\n this._delegate.forEach(snapshot => {\n callback.call(\n thisArg,\n new QueryDocumentSnapshot(this._firestore, snapshot)\n );\n });\n }\n\n isEqual(other: QuerySnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class CollectionReference<T = PublicDocumentData>\n extends Query<T>\n implements PublicCollectionReference<T>\n{\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpCollectionReference<T>\n ) {\n super(firestore, _delegate);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n get parent(): DocumentReference<PublicDocumentData> | null {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n\n doc(documentPath?: string): DocumentReference<T> {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(\n this.firestore,\n doc(this._delegate, documentPath)\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'doc()',\n 'CollectionReference.doc()'\n );\n }\n }\n\n add(data: T): Promise<DocumentReference<T>> {\n return addDoc(this._delegate, data as WithFieldValue<T>).then(\n docRef => new DocumentReference(this.firestore, docRef)\n );\n }\n\n isEqual(other: CollectionReference<T>): boolean {\n return refEqual(this._delegate, other._delegate);\n }\n\n withConverter(converter: null): CollectionReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): CollectionReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): CollectionReference<U> {\n return new CollectionReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpCollectionReference<U>)\n );\n }\n}\n\nfunction castReference<T>(\n documentRef: PublicDocumentReference<T>\n): ExpDocumentReference<T> {\n return _cast<ExpDocumentReference<T>>(documentRef, ExpDocumentReference);\n}\n","/**\n * @license\n * Copyright 2017 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 {\n FieldPath as ExpFieldPath,\n _FieldPath as InternalFieldPath\n} from '@firebase/firestore';\nimport { FieldPath as PublicFieldPath } from '@firebase/firestore-types';\nimport { Compat, getModularInstance } from '@firebase/util';\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a list\n * of field names (referring to a nested field in the document).\n */\nexport class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> {\n readonly _delegate: ExpFieldPath;\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames - A list of field names.\n */\n constructor(...fieldNames: string[]) {\n this._delegate = new ExpFieldPath(...fieldNames);\n }\n\n static documentId(): FieldPath {\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n return new FieldPath(InternalFieldPath.keyField().canonicalString());\n }\n\n isEqual(other: PublicFieldPath): boolean {\n other = getModularInstance(other);\n\n if (!(other instanceof ExpFieldPath)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n","/**\n * @license\n * Copyright 2017 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 {\n arrayRemove,\n arrayUnion,\n deleteField,\n FieldValue as FieldValue1,\n increment,\n serverTimestamp\n} from '@firebase/firestore';\nimport { FieldValue as PublicFieldValue } from '@firebase/firestore-types';\nimport { Compat } from '@firebase/util';\n\nexport class FieldValue implements PublicFieldValue, Compat<FieldValue1> {\n static serverTimestamp(): FieldValue {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n\n static delete(): FieldValue {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n\n static arrayUnion(...elements: unknown[]): FieldValue {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n\n static arrayRemove(...elements: unknown[]): FieldValue {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n\n static increment(n: number): FieldValue {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n\n constructor(readonly _delegate: FieldValue1) {}\n\n isEqual(other: FieldValue): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { FirebaseApp } from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport { Component, ComponentType } from '@firebase/component';\nimport {\n Firestore as ModularFirestore,\n CACHE_SIZE_UNLIMITED,\n GeoPoint,\n Timestamp\n} from '@firebase/firestore';\n\nimport { Blob } from './api/blob';\nimport {\n Firestore,\n Transaction,\n CollectionReference,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n WriteBatch,\n setLogLevel\n} from './api/database';\nimport { FieldPath } from './api/field_path';\nimport { FieldValue } from './api/field_value';\n\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\nexport function configureForFirebase(\n firebase: FirebaseNamespace,\n firestoreFactory: (\n app: FirebaseApp,\n firestoreExp: ModularFirestore\n ) => Firestore\n): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'firestore-compat',\n container => {\n const app = container.getProvider('app-compat').getImmediate()!;\n const firestoreExp = container.getProvider('firestore').getImmediate()!;\n return firestoreFactory(app, firestoreExp);\n },\n 'PUBLIC' as ComponentType.PUBLIC\n ).setServiceProps({ ...firestoreNamespace })\n );\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport firebase from '@firebase/app-compat';\nimport type { FirebaseNamespace } from '@firebase/app-types';\nimport * as types from '@firebase/firestore-types';\n\nimport { name, version } from '../package.json';\n\nimport { Firestore, IndexedDbPersistenceProvider } from './api/database';\nimport { configureForFirebase } from './config';\n\nimport './register-module';\n\n/**\n * Registers the main Firestore build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\nexport function registerFirestore(instance: FirebaseNamespace): void {\n configureForFirebase(\n instance,\n (app, firestoreExp) =>\n new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())\n );\n instance.registerVersion(name, version);\n}\n\nregisterFirestore(firebase as unknown as FirebaseNamespace);\n\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n firestore: {\n (app?: FirebaseApp): types.FirebaseFirestore;\n Blob: typeof types.Blob;\n CollectionReference: typeof types.CollectionReference;\n DocumentReference: typeof types.DocumentReference;\n DocumentSnapshot: typeof types.DocumentSnapshot;\n FieldPath: typeof types.FieldPath;\n FieldValue: typeof types.FieldValue;\n Firestore: typeof types.FirebaseFirestore;\n GeoPoint: typeof types.GeoPoint;\n Query: typeof types.Query;\n QueryDocumentSnapshot: typeof types.QueryDocumentSnapshot;\n QuerySnapshot: typeof types.QuerySnapshot;\n Timestamp: typeof types.Timestamp;\n Transaction: typeof types.Transaction;\n WriteBatch: typeof types.WriteBatch;\n setLogLevel: typeof types.setLogLevel;\n };\n }\n interface FirebaseApp {\n firestore?(): types.FirebaseFirestore;\n }\n}\n"],"names":["ExpWriteBatch","setClientLogLevel","Ex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,QAA2B,EAC3B,gBAGc,EAAA;AAEb,IAAA,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAI,SAAS,CACX,kBAAkB,EAClB,SAAS,IAAG;QACV,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAG,CAAC;QAChE,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,YAAY,EAAG,CAAC;AACxE,QAAA,OAAO,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AAC7C,KAAC,EACD,QAAgC,CACjC,CAAC,eAAe,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAC,CAC7C,CAAC;AACJ;;ACzFA;;;;;;;;;;;;;;;AAeG;AAcH;;;AAGG;AACG,SAAU,iBAAiB,CAAC,QAA2B,EAAA;IAC3D,oBAAoB,CAClB,QAAQ,EACR,CAAC,GAAG,EAAE,YAAY,KAChB,IAAI,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,4BAA4B,EAAE,CAAC,CACvE,CAAC;AACF,IAAA,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,iBAAiB,CAAC,QAAwC,CAAC;;;;"}
\ No newline at end of file diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.node.cjs.js b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.node.cjs.js deleted file mode 100644 index d550647..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.node.cjs.js +++ /dev/null @@ -1,1013 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var firebase = require('@firebase/app-compat'); -var firestore = require('@firebase/firestore'); -var util = require('@firebase/util'); -var component = require('@firebase/component'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase); - -const name = "@firebase/firestore-compat"; -const version = "0.4.2"; - -/** - * @license - * Copyright 2021 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. - */ -function validateSetOptions(methodName, options) { - if (options === undefined) { - return { - merge: false - }; - } - if (options.mergeFields !== undefined && options.merge !== undefined) { - throw new firestore.FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + - 'specify both "merge" and "mergeFields".'); - } - return options; -} - -/** - * @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. - */ -/** Helper function to assert Uint8Array is available at runtime. */ -function assertUint8ArrayAvailable() { - if (typeof Uint8Array === 'undefined') { - throw new firestore.FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.'); - } -} -/** Helper function to assert Base64 functions are available at runtime. */ -function assertBase64Available() { - if (!firestore._isBase64Available()) { - throw new firestore.FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.'); - } -} -/** Immutable class holding a blob (binary data) */ -class Blob { - constructor(_delegate) { - this._delegate = _delegate; - } - static fromBase64String(base64) { - assertBase64Available(); - return new Blob(firestore.Bytes.fromBase64String(base64)); - } - static fromUint8Array(array) { - assertUint8ArrayAvailable(); - return new Blob(firestore.Bytes.fromUint8Array(array)); - } - toBase64() { - assertBase64Available(); - return this._delegate.toBase64(); - } - toUint8Array() { - assertUint8ArrayAvailable(); - return this._delegate.toUint8Array(); - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } - toString() { - return 'Blob(base64: ' + this.toBase64() + ')'; - } -} - -/** - * @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. - */ -function isPartialObserver(obj) { - return implementsAnyMethods(obj, ['next', 'error', 'complete']); -} -/** - * Returns true if obj is an object and contains at least one of the specified - * methods. - */ -function implementsAnyMethods(obj, methods) { - if (typeof obj !== 'object' || obj === null) { - return false; - } - const object = obj; - for (const method of methods) { - if (method in object && typeof object[method] === 'function') { - return true; - } - } - return false; -} - -/** - * @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. - */ -/** - * The persistence provider included with the full Firestore SDK. - */ -class IndexedDbPersistenceProvider { - enableIndexedDbPersistence(firestore$1, forceOwnership) { - return firestore.enableIndexedDbPersistence(firestore$1._delegate, { forceOwnership }); - } - enableMultiTabIndexedDbPersistence(firestore$1) { - return firestore.enableMultiTabIndexedDbPersistence(firestore$1._delegate); - } - clearIndexedDbPersistence(firestore$1) { - return firestore.clearIndexedDbPersistence(firestore$1._delegate); - } -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -class Firestore { - constructor(databaseIdOrApp, _delegate, _persistenceProvider) { - this._delegate = _delegate; - this._persistenceProvider = _persistenceProvider; - this.INTERNAL = { - delete: () => this.terminate() - }; - if (!(databaseIdOrApp instanceof firestore._DatabaseId)) { - this._appCompat = databaseIdOrApp; - } - } - get _databaseId() { - return this._delegate._databaseId; - } - settings(settingsLiteral) { - const currentSettings = this._delegate._getSettings(); - if (!settingsLiteral.merge && - currentSettings.host !== settingsLiteral.host) { - firestore._logWarn('You are overriding the original host. If you did not intend ' + - 'to override your settings, use {merge: true}.'); - } - if (settingsLiteral.merge) { - settingsLiteral = { - ...currentSettings, - ...settingsLiteral - }; - // Remove the property from the settings once the merge is completed - delete settingsLiteral.merge; - } - this._delegate._setSettings(settingsLiteral); - } - useEmulator(host, port, options = {}) { - firestore.connectFirestoreEmulator(this._delegate, host, port, options); - } - enableNetwork() { - return firestore.enableNetwork(this._delegate); - } - disableNetwork() { - return firestore.disableNetwork(this._delegate); - } - enablePersistence(settings) { - let synchronizeTabs = false; - let experimentalForceOwningTab = false; - if (settings) { - synchronizeTabs = !!settings.synchronizeTabs; - experimentalForceOwningTab = !!settings.experimentalForceOwningTab; - firestore._validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab); - } - return synchronizeTabs - ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) - : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab); - } - clearPersistence() { - return this._persistenceProvider.clearIndexedDbPersistence(this); - } - terminate() { - if (this._appCompat) { - this._appCompat._removeServiceInstance('firestore-compat'); - this._appCompat._removeServiceInstance('firestore'); - } - return this._delegate._delete(); - } - waitForPendingWrites() { - return firestore.waitForPendingWrites(this._delegate); - } - onSnapshotsInSync(arg) { - return firestore.onSnapshotsInSync(this._delegate, arg); - } - get app() { - if (!this._appCompat) { - throw new firestore.FirestoreError('failed-precondition', "Firestore was not initialized using the Firebase SDK. 'app' is " + - 'not available'); - } - return this._appCompat; - } - collection(pathString) { - try { - return new CollectionReference(this, firestore.collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'Firestore.collection()'); - } - } - doc(pathString) { - try { - return new DocumentReference(this, firestore.doc(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'Firestore.doc()'); - } - } - collectionGroup(collectionId) { - try { - return new Query(this, firestore.collectionGroup(this._delegate, collectionId)); - } - catch (e) { - throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()'); - } - } - runTransaction(updateFunction) { - return firestore.runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction))); - } - batch() { - firestore.ensureFirestoreConfigured(this._delegate); - return new WriteBatch(new firestore.WriteBatch(this._delegate, mutations => firestore.executeWrite(this._delegate, mutations))); - } - loadBundle(bundleData) { - return firestore.loadBundle(this._delegate, bundleData); - } - namedQuery(name) { - return firestore.namedQuery(this._delegate, name).then(expQuery => { - if (!expQuery) { - return null; - } - return new Query(this, - // We can pass `expQuery` here directly since named queries don't have a UserDataConverter. - // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter. - expQuery); - }); - } -} -class UserDataWriter extends firestore.AbstractUserDataWriter { - constructor(firestore) { - super(); - this.firestore = firestore; - } - convertBytes(bytes) { - return new Blob(new firestore.Bytes(bytes)); - } - convertReference(name) { - const key = this.convertDocumentKey(name, this.firestore._databaseId); - return DocumentReference.forKey(key, this.firestore, /* converter= */ null); - } -} -function setLogLevel(level) { - firestore.setLogLevel(level); -} -/** - * A reference to a transaction. - */ -class Transaction { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(_firestore); - } - get(documentRef) { - const ref = castReference(documentRef); - return this._delegate - .get(ref) - .then(result => new DocumentSnapshot(this._firestore, new firestore.DocumentSnapshot(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter))); - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('Transaction.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } -} -class WriteBatch { - constructor(_delegate) { - this._delegate = _delegate; - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('WriteBatch.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } - commit() { - return this._delegate.commit(); - } -} -/** - * Wraps a `PublicFirestoreDataConverter` translating the types from the - * experimental SDK into corresponding types from the Classic SDK before passing - * them to the wrapped converter. - */ -class FirestoreDataConverter { - constructor(_firestore, _userDataWriter, _delegate) { - this._firestore = _firestore; - this._userDataWriter = _userDataWriter; - this._delegate = _delegate; - } - fromFirestore(snapshot, options) { - const expSnapshot = new firestore.QueryDocumentSnapshot(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, - /* converter= */ null); - return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options ?? {}); - } - toFirestore(modelObject, options) { - if (!options) { - return this._delegate.toFirestore(modelObject); - } - else { - return this._delegate.toFirestore(modelObject, options); - } - } - // Use the same instance of `FirestoreDataConverter` for the given instances - // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will - // compare equal for two objects created with the same converter instance. - static getInstance(firestore, converter) { - const converterMapByFirestore = FirestoreDataConverter.INSTANCES; - let untypedConverterByConverter = converterMapByFirestore.get(firestore); - if (!untypedConverterByConverter) { - untypedConverterByConverter = new WeakMap(); - converterMapByFirestore.set(firestore, untypedConverterByConverter); - } - let instance = untypedConverterByConverter.get(converter); - if (!instance) { - instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter); - untypedConverterByConverter.set(converter, instance); - } - return instance; - } -} -FirestoreDataConverter.INSTANCES = new WeakMap(); -/** - * A reference to a particular document in a collection in the database. - */ -class DocumentReference { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - static forPath(path, firestore$1, converter) { - if (path.length % 2 !== 0) { - throw new firestore.FirestoreError('invalid-argument', 'Invalid document reference. Document ' + - 'references must have an even number of segments, but ' + - `${path.canonicalString()} has ${path.length}`); - } - return new DocumentReference(firestore$1, new firestore.DocumentReference(firestore$1._delegate, converter, new firestore._DocumentKey(path))); - } - static forKey(key, firestore$1, converter) { - return new DocumentReference(firestore$1, new firestore.DocumentReference(firestore$1._delegate, converter, key)); - } - get id() { - return this._delegate.id; - } - get parent() { - return new CollectionReference(this.firestore, this._delegate.parent); - } - get path() { - return this._delegate.path; - } - collection(pathString) { - try { - return new CollectionReference(this.firestore, firestore.collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()'); - } - } - isEqual(other) { - other = util.getModularInstance(other); - if (!(other instanceof firestore.DocumentReference)) { - return false; - } - return firestore.refEqual(this._delegate, other); - } - set(value, options) { - options = validateSetOptions('DocumentReference.set', options); - try { - if (options) { - return firestore.setDoc(this._delegate, value, options); - } - else { - return firestore.setDoc(this._delegate, value); - } - } - catch (e) { - throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()'); - } - } - update(fieldOrUpdateData, value, ...moreFieldsAndValues) { - try { - if (arguments.length === 1) { - return firestore.updateDoc(this._delegate, fieldOrUpdateData); - } - else { - return firestore.updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues); - } - } - catch (e) { - throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()'); - } - } - delete() { - return firestore.deleteDoc(this._delegate); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new firestore.DocumentSnapshot(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - return firestore.onSnapshot(this._delegate, options, observer); - } - get(options) { - let snap; - if (options?.source === 'cache') { - snap = firestore.getDocFromCache(this._delegate); - } - else if (options?.source === 'server') { - snap = firestore.getDocFromServer(this._delegate); - } - else { - snap = firestore.getDoc(this._delegate); - } - return snap.then(result => new DocumentSnapshot(this.firestore, new firestore.DocumentSnapshot(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - } - withConverter(converter) { - return new DocumentReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -/** - * Replaces the function name in an error thrown by the firestore-exp API - * with the function names used in the classic API. - */ -function replaceFunctionName(e, original, updated) { - e.message = e.message.replace(original, updated); - return e; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -function extractSnapshotOptions(args) { - for (const arg of args) { - if (typeof arg === 'object' && !isPartialObserver(arg)) { - return arg; - } - } - return {}; -} -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -function wrapObserver(args, wrapper) { - let userObserver; - if (isPartialObserver(args[0])) { - userObserver = args[0]; - } - else if (isPartialObserver(args[1])) { - userObserver = args[1]; - } - else if (typeof args[0] === 'function') { - userObserver = { - next: args[0], - error: args[1], - complete: args[2] - }; - } - else { - userObserver = { - next: args[1], - error: args[2], - complete: args[3] - }; - } - return { - next: val => { - if (userObserver.next) { - userObserver.next(wrapper(val)); - } - }, - error: userObserver.error?.bind(userObserver), - complete: userObserver.complete?.bind(userObserver) - }; -} -class DocumentSnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get ref() { - return new DocumentReference(this._firestore, this._delegate.ref); - } - get id() { - return this._delegate.id; - } - get metadata() { - return this._delegate.metadata; - } - get exists() { - return this._delegate.exists(); - } - data(options) { - return this._delegate.data(options); - } - get(fieldPath, options - // We are using `any` here to avoid an explicit cast by our users. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ) { - return this._delegate.get(fieldPath, options); - } - isEqual(other) { - return firestore.snapshotEqual(this._delegate, other._delegate); - } -} -class QueryDocumentSnapshot extends DocumentSnapshot { - data(options) { - const data = this._delegate.data(options); - if (this._delegate._converter) { - // Undefined is a possible valid value from converter. - return data; - } - else { - firestore._debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist'); - return data; - } - } -} -class Query { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - where(fieldPath, opStr, value) { - try { - // The "as string" cast is a little bit of a hack. `where` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, firestore.query(this._delegate, firestore.where(fieldPath, opStr, value))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - orderBy(fieldPath, directionStr) { - try { - // The "as string" cast is a little bit of a hack. `orderBy` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, firestore.query(this._delegate, firestore.orderBy(fieldPath, directionStr))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - limit(n) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.limit(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limit()', 'Query.limit()'); - } - } - limitToLast(n) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.limitToLast(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()'); - } - } - startAt(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.startAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAt()', 'Query.startAt()'); - } - } - startAfter(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.startAfter(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()'); - } - } - endBefore(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.endBefore(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()'); - } - } - endAt(...args) { - try { - return new Query(this.firestore, firestore.query(this._delegate, firestore.endAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endAt()', 'Query.endAt()'); - } - } - isEqual(other) { - return firestore.queryEqual(this._delegate, other._delegate); - } - get(options) { - let query; - if (options?.source === 'cache') { - query = firestore.getDocsFromCache(this._delegate); - } - else if (options?.source === 'server') { - query = firestore.getDocsFromServer(this._delegate); - } - else { - query = firestore.getDocs(this._delegate); - } - return query.then(result => new QuerySnapshot(this.firestore, new firestore.QuerySnapshot(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot))); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new firestore.QuerySnapshot(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot))); - return firestore.onSnapshot(this._delegate, options, observer); - } - withConverter(converter) { - return new Query(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -class DocumentChange { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get type() { - return this._delegate.type; - } - get doc() { - return new QueryDocumentSnapshot(this._firestore, this._delegate.doc); - } - get oldIndex() { - return this._delegate.oldIndex; - } - get newIndex() { - return this._delegate.newIndex; - } -} -class QuerySnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get query() { - return new Query(this._firestore, this._delegate.query); - } - get metadata() { - return this._delegate.metadata; - } - get size() { - return this._delegate.size; - } - get empty() { - return this._delegate.empty; - } - get docs() { - return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc)); - } - docChanges(options) { - return this._delegate - .docChanges(options) - .map(docChange => new DocumentChange(this._firestore, docChange)); - } - forEach(callback, thisArg) { - this._delegate.forEach(snapshot => { - callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot)); - }); - } - isEqual(other) { - return firestore.snapshotEqual(this._delegate, other._delegate); - } -} -class CollectionReference extends Query { - constructor(firestore, _delegate) { - super(firestore, _delegate); - this.firestore = firestore; - this._delegate = _delegate; - } - get id() { - return this._delegate.id; - } - get path() { - return this._delegate.path; - } - get parent() { - const docRef = this._delegate.parent; - return docRef ? new DocumentReference(this.firestore, docRef) : null; - } - doc(documentPath) { - try { - if (documentPath === undefined) { - // Call `doc` without `documentPath` if `documentPath` is `undefined` - // as `doc` validates the number of arguments to prevent users from - // accidentally passing `undefined`. - return new DocumentReference(this.firestore, firestore.doc(this._delegate)); - } - else { - return new DocumentReference(this.firestore, firestore.doc(this._delegate, documentPath)); - } - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()'); - } - } - add(data) { - return firestore.addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef)); - } - isEqual(other) { - return firestore.refEqual(this._delegate, other._delegate); - } - withConverter(converter) { - return new CollectionReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -function castReference(documentRef) { - return firestore._cast(documentRef, firestore.DocumentReference); -} - -/** - * @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. - */ -// The objects that are a part of this API are exposed to third-parties as -// compiled javascript so we want to flag our private members with a leading -// underscore to discourage their use. -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -class FieldPath { - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames) { - this._delegate = new firestore.FieldPath(...fieldNames); - } - static documentId() { - /** - * Internal Note: The backend doesn't technically support querying by - * document ID. Instead it queries by the entire document name (full path - * included), but in the cases we currently support documentId(), the net - * effect is the same. - */ - return new FieldPath(firestore._FieldPath.keyField().canonicalString()); - } - isEqual(other) { - other = util.getModularInstance(other); - if (!(other instanceof firestore.FieldPath)) { - return false; - } - return this._delegate._internalPath.isEqual(other._internalPath); - } -} - -/** - * @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. - */ -class FieldValue { - static serverTimestamp() { - const delegate = firestore.serverTimestamp(); - delegate._methodName = 'FieldValue.serverTimestamp'; - return new FieldValue(delegate); - } - static delete() { - const delegate = firestore.deleteField(); - delegate._methodName = 'FieldValue.delete'; - return new FieldValue(delegate); - } - static arrayUnion(...elements) { - const delegate = firestore.arrayUnion(...elements); - delegate._methodName = 'FieldValue.arrayUnion'; - return new FieldValue(delegate); - } - static arrayRemove(...elements) { - const delegate = firestore.arrayRemove(...elements); - delegate._methodName = 'FieldValue.arrayRemove'; - return new FieldValue(delegate); - } - static increment(n) { - const delegate = firestore.increment(n); - delegate._methodName = 'FieldValue.increment'; - return new FieldValue(delegate); - } - constructor(_delegate) { - this._delegate = _delegate; - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } -} - -/** - * @license - * Copyright 2021 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 firestoreNamespace = { - Firestore, - GeoPoint: firestore.GeoPoint, - Timestamp: firestore.Timestamp, - Blob, - Transaction, - WriteBatch, - DocumentReference, - DocumentSnapshot, - Query, - QueryDocumentSnapshot, - QuerySnapshot, - CollectionReference, - FieldPath, - FieldValue, - setLogLevel, - CACHE_SIZE_UNLIMITED: firestore.CACHE_SIZE_UNLIMITED -}; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -function configureForFirebase(firebase, firestoreFactory) { - firebase.INTERNAL.registerComponent(new component.Component('firestore-compat', container => { - const app = container.getProvider('app-compat').getImmediate(); - const firestoreExp = container.getProvider('firestore').getImmediate(); - return firestoreFactory(app, firestoreExp); - }, 'PUBLIC').setServiceProps({ ...firestoreNamespace })); -} - -/** - * @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. - */ -/** - * Registers the main Firestore Node build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -function registerFirestore(instance) { - configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())); - instance.registerVersion(name, version, 'node'); -} -registerFirestore(firebase__default["default"]); - -exports.registerFirestore = registerFirestore; -//# sourceMappingURL=index.node.cjs.js.map diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.node.cjs.js.map b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.node.cjs.js.map deleted file mode 100644 index daf7ab7..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.node.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.node.cjs.js","sources":["../src/util/input_validation.ts","../src/api/blob.ts","../src/api/observer.ts","../src/api/database.ts","../src/api/field_path.ts","../src/api/field_value.ts","../src/config.ts","../src/index.node.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 { FirestoreError } from '@firebase/firestore';\nimport { SetOptions } from '@firebase/firestore-types';\n\nexport function validateSetOptions(\n methodName: string,\n options: SetOptions | undefined\n): SetOptions {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError(\n 'invalid-argument',\n `Invalid options passed to function ${methodName}(): You cannot ` +\n 'specify both \"merge\" and \"mergeFields\".'\n );\n }\n\n return options;\n}\n","/**\n * @license\n * Copyright 2017 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 { Bytes, FirestoreError, _isBase64Available } from '@firebase/firestore';\nimport { Compat } from '@firebase/util';\n\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable(): void {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(\n 'unimplemented',\n 'Uint8Arrays are not available in this environment.'\n );\n }\n}\n\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available(): void {\n if (!_isBase64Available()) {\n throw new FirestoreError(\n 'unimplemented',\n 'Blobs are unavailable in Firestore in this environment.'\n );\n }\n}\n\n/** Immutable class holding a blob (binary data) */\nexport class Blob implements Compat<Bytes> {\n constructor(readonly _delegate: Bytes) {}\n static fromBase64String(base64: string): Blob {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n\n static fromUint8Array(array: Uint8Array): Blob {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n\n toBase64(): string {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n\n toUint8Array(): Uint8Array {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n\n isEqual(other: Blob): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n\n toString(): string {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n","/**\n * @license\n * Copyright 2017 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 { FirestoreError } from '@firebase/firestore';\n\n/**\n * Observer/Subscribe interfaces.\n */\nexport type NextFn<T> = (value: T) => void;\nexport type ErrorFn = (error: FirestoreError) => void;\nexport type CompleteFn = () => void;\n\n// Allow for any of the Observer methods to be undefined.\nexport interface PartialObserver<T> {\n next?: NextFn<T>;\n error?: ErrorFn;\n complete?: CompleteFn;\n}\n\nexport function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T> {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj: unknown, methods: string[]): boolean {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n const object = obj as Record<string, unknown>;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n","/**\n * @license\n * Copyright 2017 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 { FirebaseApp } from '@firebase/app-types';\nimport { _FirebaseApp, FirebaseService } from '@firebase/app-types/private';\nimport {\n LoadBundleTask,\n Bytes,\n clearIndexedDbPersistence,\n disableNetwork,\n enableIndexedDbPersistence,\n enableMultiTabIndexedDbPersistence,\n enableNetwork,\n ensureFirestoreConfigured,\n Firestore as ExpFirestore,\n connectFirestoreEmulator,\n waitForPendingWrites,\n FieldPath as ExpFieldPath,\n limit,\n limitToLast,\n where,\n orderBy,\n startAfter,\n startAt,\n query,\n endBefore,\n endAt,\n doc,\n collection,\n collectionGroup,\n queryEqual,\n Query as ExpQuery,\n CollectionReference as ExpCollectionReference,\n DocumentReference as ExpDocumentReference,\n refEqual,\n addDoc,\n deleteDoc,\n executeWrite,\n getDoc,\n getDocFromCache,\n getDocFromServer,\n getDocs,\n getDocsFromCache,\n getDocsFromServer,\n onSnapshot,\n onSnapshotsInSync,\n setDoc,\n updateDoc,\n Unsubscribe,\n DocumentChange as ExpDocumentChange,\n DocumentSnapshot as ExpDocumentSnapshot,\n QueryDocumentSnapshot as ExpQueryDocumentSnapshot,\n QuerySnapshot as ExpQuerySnapshot,\n snapshotEqual,\n SnapshotMetadata,\n runTransaction,\n Transaction as ExpTransaction,\n WriteBatch as ExpWriteBatch,\n AbstractUserDataWriter,\n FirestoreError,\n FirestoreDataConverter as ModularFirestoreDataConverter,\n setLogLevel as setClientLogLevel,\n _DatabaseId,\n _validateIsNotUsedTogether,\n _cast,\n _DocumentKey,\n _debugAssert,\n _FieldPath,\n _ResourcePath,\n _ByteString,\n _logWarn,\n namedQuery,\n loadBundle,\n PartialWithFieldValue,\n WithFieldValue\n} from '@firebase/firestore';\nimport {\n CollectionReference as PublicCollectionReference,\n DocumentChange as PublicDocumentChange,\n DocumentChangeType as PublicDocumentChangeType,\n DocumentData,\n DocumentData as PublicDocumentData,\n DocumentReference as PublicDocumentReference,\n DocumentSnapshot as PublicDocumentSnapshot,\n FieldPath as PublicFieldPath,\n FirebaseFirestore as PublicFirestore,\n FirestoreDataConverter as PublicFirestoreDataConverter,\n GetOptions as PublicGetOptions,\n LogLevel as PublicLogLevel,\n OrderByDirection as PublicOrderByDirection,\n PersistenceSettings as PublicPersistenceSettings,\n Query as PublicQuery,\n QueryDocumentSnapshot as PublicQueryDocumentSnapshot,\n QuerySnapshot as PublicQuerySnapshot,\n SetOptions as PublicSetOptions,\n Settings as PublicSettings,\n SnapshotListenOptions as PublicSnapshotListenOptions,\n SnapshotOptions as PublicSnapshotOptions,\n Transaction as PublicTransaction,\n UpdateData as PublicUpdateData,\n WhereFilterOp as PublicWhereFilterOp,\n WriteBatch as PublicWriteBatch\n} from '@firebase/firestore-types';\nimport {\n Compat,\n EmulatorMockTokenOptions,\n getModularInstance\n} from '@firebase/util';\n\nimport { validateSetOptions } from '../util/input_validation';\n\nimport { Blob } from './blob';\nimport {\n CompleteFn,\n ErrorFn,\n isPartialObserver,\n NextFn,\n PartialObserver\n} from './observer';\n\n/**\n * A persistence provider for either memory-only or IndexedDB persistence.\n * Mainly used to allow optional inclusion of IndexedDB code.\n */\nexport interface PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void>;\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;\n clearIndexedDbPersistence(firestore: Firestore): Promise<void>;\n}\n\n/**\n * The persistence provider included with the full Firestore SDK.\n */\nexport class IndexedDbPersistenceProvider implements PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void> {\n return enableIndexedDbPersistence(firestore._delegate, { forceOwnership });\n }\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n\n/**\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\n * to the functional API of firestore-exp.\n */\nexport class Firestore\n implements PublicFirestore, FirebaseService, Compat<ExpFirestore>\n{\n _appCompat?: FirebaseApp;\n constructor(\n databaseIdOrApp: _DatabaseId | FirebaseApp,\n readonly _delegate: ExpFirestore,\n private _persistenceProvider: PersistenceProvider\n ) {\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp as FirebaseApp;\n }\n }\n\n get _databaseId(): _DatabaseId {\n return this._delegate._databaseId;\n }\n\n settings(settingsLiteral: PublicSettings): void {\n const currentSettings = this._delegate._getSettings();\n if (\n !settingsLiteral.merge &&\n currentSettings.host !== settingsLiteral.host\n ) {\n _logWarn(\n 'You are overriding the original host. If you did not intend ' +\n 'to override your settings, use {merge: true}.'\n );\n }\n\n if (settingsLiteral.merge) {\n settingsLiteral = {\n ...currentSettings,\n ...settingsLiteral\n };\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n\n this._delegate._setSettings(settingsLiteral);\n }\n\n useEmulator(\n host: string,\n port: number,\n options: {\n mockUserToken?: EmulatorMockTokenOptions | string;\n } = {}\n ): void {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n\n enableNetwork(): Promise<void> {\n return enableNetwork(this._delegate);\n }\n\n disableNetwork(): Promise<void> {\n return disableNetwork(this._delegate);\n }\n\n enablePersistence(settings?: PublicPersistenceSettings): Promise<void> {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n\n _validateIsNotUsedTogether(\n 'synchronizeTabs',\n synchronizeTabs,\n 'experimentalForceOwningTab',\n experimentalForceOwningTab\n );\n }\n\n return synchronizeTabs\n ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this)\n : this._persistenceProvider.enableIndexedDbPersistence(\n this,\n experimentalForceOwningTab\n );\n }\n\n clearPersistence(): Promise<void> {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n\n terminate(): Promise<void> {\n if (this._appCompat) {\n (this._appCompat as _FirebaseApp)._removeServiceInstance(\n 'firestore-compat'\n );\n (this._appCompat as _FirebaseApp)._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n\n waitForPendingWrites(): Promise<void> {\n return waitForPendingWrites(this._delegate);\n }\n\n onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe;\n onSnapshotsInSync(onSync: () => void): Unsubscribe;\n onSnapshotsInSync(arg: unknown): Unsubscribe {\n return onSnapshotsInSync(this._delegate, arg as PartialObserver<void>);\n }\n\n get app(): FirebaseApp {\n if (!this._appCompat) {\n throw new FirestoreError(\n 'failed-precondition',\n \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available'\n );\n }\n return this._appCompat as FirebaseApp;\n }\n\n INTERNAL = {\n delete: () => this.terminate()\n };\n\n collection(pathString: string): PublicCollectionReference {\n try {\n return new CollectionReference(\n this,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'Firestore.collection()'\n );\n }\n }\n\n doc(pathString: string): PublicDocumentReference {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'doc()', 'Firestore.doc()');\n }\n }\n\n collectionGroup(collectionId: string): PublicQuery {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collectionGroup()',\n 'Firestore.collectionGroup()'\n );\n }\n }\n\n runTransaction<T>(\n updateFunction: (transaction: PublicTransaction) => Promise<T>\n ): Promise<T> {\n return runTransaction(this._delegate, transaction =>\n updateFunction(new Transaction(this, transaction))\n );\n }\n\n batch(): PublicWriteBatch {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(\n new ExpWriteBatch(this._delegate, mutations =>\n executeWrite(this._delegate, mutations)\n )\n );\n }\n\n loadBundle(\n bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string\n ): LoadBundleTask {\n return loadBundle(this._delegate, bundleData);\n }\n\n namedQuery(name: string): Promise<PublicQuery<DocumentData> | null> {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(\n this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery\n );\n });\n }\n}\n\nexport class UserDataWriter extends AbstractUserDataWriter {\n constructor(protected firestore: Firestore) {\n super();\n }\n\n protected convertBytes(bytes: _ByteString): Blob {\n return new Blob(new Bytes(bytes));\n }\n\n protected convertReference(name: string): DocumentReference {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */ null);\n }\n}\n\nexport function setLogLevel(level: PublicLogLevel): void {\n setClientLogLevel(level);\n}\n\n/**\n * A reference to a transaction.\n */\nexport class Transaction implements PublicTransaction, Compat<ExpTransaction> {\n private _userDataWriter: UserDataWriter;\n\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpTransaction\n ) {\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n\n get<T>(\n documentRef: PublicDocumentReference<T>\n ): Promise<PublicDocumentSnapshot<T>> {\n const ref = castReference(documentRef);\n return this._delegate\n .get(ref)\n .then(\n result =>\n new DocumentSnapshot(\n this._firestore,\n new ExpDocumentSnapshot<T>(\n this._firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n ref.converter\n )\n )\n );\n }\n\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): Transaction;\n set<T>(documentRef: DocumentReference<T>, data: T): Transaction;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): Transaction {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: unknown,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): Transaction {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\n\nexport class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> {\n constructor(readonly _delegate: ExpWriteBatch) {}\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): WriteBatch;\n set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): WriteBatch {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n\n commit(): Promise<void> {\n return this._delegate.commit();\n }\n}\n\n/**\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\n * experimental SDK into corresponding types from the Classic SDK before passing\n * them to the wrapped converter.\n */\nclass FirestoreDataConverter<U>\n implements\n ModularFirestoreDataConverter<U>,\n Compat<PublicFirestoreDataConverter<U>>\n{\n private static readonly INSTANCES = new WeakMap();\n\n private constructor(\n private readonly _firestore: Firestore,\n private readonly _userDataWriter: UserDataWriter,\n readonly _delegate: PublicFirestoreDataConverter<U>\n ) {}\n\n fromFirestore(\n snapshot: ExpQueryDocumentSnapshot,\n options?: PublicSnapshotOptions\n ): U {\n const expSnapshot = new ExpQueryDocumentSnapshot(\n this._firestore._delegate,\n this._userDataWriter,\n snapshot._key,\n snapshot._document,\n snapshot.metadata,\n /* converter= */ null\n );\n return this._delegate.fromFirestore(\n new QueryDocumentSnapshot(this._firestore, expSnapshot),\n options ?? {}\n );\n }\n\n toFirestore(modelObject: WithFieldValue<U>): PublicDocumentData;\n toFirestore(\n modelObject: PartialWithFieldValue<U>,\n options: PublicSetOptions\n ): PublicDocumentData;\n toFirestore(\n modelObject: WithFieldValue<U> | PartialWithFieldValue<U>,\n options?: PublicSetOptions\n ): PublicDocumentData {\n if (!options) {\n return this._delegate.toFirestore(modelObject as U);\n } else {\n return this._delegate.toFirestore(modelObject as Partial<U>, options);\n }\n }\n\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance<U>(\n firestore: Firestore,\n converter: PublicFirestoreDataConverter<U>\n ): FirestoreDataConverter<U> {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(\n firestore,\n new UserDataWriter(firestore),\n converter\n );\n untypedConverterByConverter.set(converter, instance);\n }\n\n return instance;\n }\n}\n\n/**\n * A reference to a particular document in a collection in the database.\n */\nexport class DocumentReference<T = PublicDocumentData>\n implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>>\n{\n private _userDataWriter: UserDataWriter;\n\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpDocumentReference<T>\n ) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n static forPath<U>(\n path: _ResourcePath,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(\n 'invalid-argument',\n 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n `${path.canonicalString()} has ${path.length}`\n );\n }\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(\n firestore._delegate,\n converter,\n new _DocumentKey(path)\n )\n );\n }\n\n static forKey<U>(\n key: _DocumentKey,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(firestore._delegate, converter, key)\n );\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get parent(): PublicCollectionReference<T> {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n collection(\n pathString: string\n ): PublicCollectionReference<PublicDocumentData> {\n try {\n return new CollectionReference(\n this.firestore,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'DocumentReference.collection()'\n );\n }\n }\n\n isEqual(other: PublicDocumentReference<T>): boolean {\n other = getModularInstance<PublicDocumentReference<T>>(other);\n\n if (!(other instanceof ExpDocumentReference)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n\n set(value: Partial<T>, options: PublicSetOptions): Promise<void>;\n set(value: T): Promise<void>;\n set(value: T | Partial<T>, options?: PublicSetOptions): Promise<void> {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(\n this._delegate,\n value as PartialWithFieldValue<T>,\n options\n );\n } else {\n return setDoc(this._delegate, value as WithFieldValue<T>);\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'setDoc()',\n 'DocumentReference.set()'\n );\n }\n }\n\n update(value: PublicUpdateData): Promise<void>;\n update(\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void>;\n update(\n fieldOrUpdateData: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void> {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData as PublicUpdateData);\n } else {\n return updateDoc(\n this._delegate,\n fieldOrUpdateData as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'updateDoc()',\n 'DocumentReference.update()'\n );\n }\n }\n\n delete(): Promise<void> {\n return deleteDoc(this._delegate);\n }\n\n onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicDocumentSnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<DocumentSnapshot<T>, ExpDocumentSnapshot<T>>(\n args,\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>> {\n let snap: Promise<ExpDocumentSnapshot<T>>;\n if (options?.source === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if (options?.source === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n\n return snap.then(\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n }\n\n withConverter(converter: null): PublicDocumentReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): PublicDocumentReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): PublicDocumentReference<U> {\n return new DocumentReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpDocumentReference<U>)\n );\n }\n}\n\n/**\n * Replaces the function name in an error thrown by the firestore-exp API\n * with the function names used in the classic API.\n */\nfunction replaceFunctionName(\n e: Error,\n original: string | RegExp,\n updated: string\n): Error {\n e.message = e.message.replace(original, updated);\n return e;\n}\n\n/**\n * Iterates the list of arguments from an `onSnapshot` call and returns the\n * first argument that may be an `SnapshotListenOptions` object. Returns an\n * empty object if none is found.\n */\nexport function extractSnapshotOptions(\n args: unknown[]\n): PublicSnapshotListenOptions {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg as PublicSnapshotListenOptions;\n }\n }\n return {};\n}\n\n/**\n * Creates an observer that can be passed to the firestore-exp SDK. The\n * observer converts all observed values into the format expected by the classic\n * SDK.\n *\n * @param args - The list of arguments from an `onSnapshot` call.\n * @param wrapper - The function that converts the firestore-exp type into the\n * type used by this shim.\n */\nexport function wrapObserver<CompatType, ExpType>(\n args: unknown[],\n wrapper: (val: ExpType) => CompatType\n): PartialObserver<ExpType> {\n let userObserver: PartialObserver<CompatType>;\n if (isPartialObserver(args[0])) {\n userObserver = args[0] as PartialObserver<CompatType>;\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0] as NextFn<CompatType> | undefined,\n error: args[1] as ErrorFn | undefined,\n complete: args[2] as CompleteFn | undefined\n };\n } else {\n userObserver = {\n next: args[1] as NextFn<CompatType> | undefined,\n error: args[2] as ErrorFn | undefined,\n complete: args[3] as CompleteFn | undefined\n };\n }\n\n return {\n next: val => {\n if (userObserver!.next) {\n userObserver!.next(wrapper(val));\n }\n },\n error: userObserver.error?.bind(userObserver),\n complete: userObserver.complete?.bind(userObserver)\n };\n}\n\n/**\n * Options interface that can be provided to configure the deserialization of\n * DocumentSnapshots.\n */\nexport interface SnapshotOptions extends PublicSnapshotOptions {}\n\nexport class DocumentSnapshot<T = PublicDocumentData>\n implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentSnapshot<T>\n ) {}\n\n get ref(): DocumentReference<T> {\n return new DocumentReference<T>(this._firestore, this._delegate.ref);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get exists(): boolean {\n return this._delegate.exists();\n }\n\n data(options?: PublicSnapshotOptions): T | undefined {\n return this._delegate.data(options);\n }\n\n get(\n fieldPath: string | PublicFieldPath,\n options?: PublicSnapshotOptions\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any {\n return this._delegate.get(fieldPath as string | ExpFieldPath, options);\n }\n\n isEqual(other: DocumentSnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class QueryDocumentSnapshot<T = PublicDocumentData>\n extends DocumentSnapshot<T>\n implements PublicQueryDocumentSnapshot<T>\n{\n data(options?: PublicSnapshotOptions): T {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data as T;\n } else {\n _debugAssert(\n data !== undefined,\n 'Document in a QueryDocumentSnapshot should exist'\n );\n return data;\n }\n }\n}\n\nexport class Query<T = PublicDocumentData>\n implements PublicQuery<T>, Compat<ExpQuery<T>>\n{\n private readonly _userDataWriter: UserDataWriter;\n\n constructor(readonly firestore: Firestore, readonly _delegate: ExpQuery<T>) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n where(\n fieldPath: string | _FieldPath,\n opStr: PublicWhereFilterOp,\n value: unknown\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, where(fieldPath as string, opStr, value))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n orderBy(\n fieldPath: string | _FieldPath,\n directionStr?: PublicOrderByDirection\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, orderBy(fieldPath as string, directionStr))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n limit(n: number): Query<T> {\n try {\n return new Query<T>(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'limit()', 'Query.limit()');\n }\n }\n\n limitToLast(n: number): Query<T> {\n try {\n return new Query<T>(\n this.firestore,\n query(this._delegate, limitToLast(n))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'limitToLast()',\n 'Query.limitToLast()'\n );\n }\n }\n\n startAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'startAt()', 'Query.startAt()');\n }\n }\n\n startAfter(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, startAfter(...args))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'startAfter()',\n 'Query.startAfter()'\n );\n }\n }\n\n endBefore(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, endBefore(...args))\n );\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endBefore()', 'Query.endBefore()');\n }\n }\n\n endAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endAt()', 'Query.endAt()');\n }\n }\n\n isEqual(other: PublicQuery<T>): boolean {\n return queryEqual(this._delegate, (other as Query<T>)._delegate);\n }\n\n get(options?: PublicGetOptions): Promise<QuerySnapshot<T>> {\n let query: Promise<ExpQuerySnapshot<T>>;\n if (options?.source === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if (options?.source === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(\n result =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n result._snapshot\n )\n )\n );\n }\n\n onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicQuerySnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<QuerySnapshot<T>, ExpQuerySnapshot<T>>(\n args,\n snap =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n snap._snapshot\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n withConverter(converter: null): Query<PublicDocumentData>;\n withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): Query<U> {\n return new Query<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpQuery<U>)\n );\n }\n}\n\nexport class DocumentChange<T = PublicDocumentData>\n implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentChange<T>\n ) {}\n\n get type(): PublicDocumentChangeType {\n return this._delegate.type;\n }\n\n get doc(): QueryDocumentSnapshot<T> {\n return new QueryDocumentSnapshot<T>(this._firestore, this._delegate.doc);\n }\n\n get oldIndex(): number {\n return this._delegate.oldIndex;\n }\n\n get newIndex(): number {\n return this._delegate.newIndex;\n }\n}\n\nexport class QuerySnapshot<T = PublicDocumentData>\n implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>>\n{\n constructor(\n readonly _firestore: Firestore,\n readonly _delegate: ExpQuerySnapshot<T>\n ) {}\n\n get query(): Query<T> {\n return new Query(this._firestore, this._delegate.query);\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get size(): number {\n return this._delegate.size;\n }\n\n get empty(): boolean {\n return this._delegate.empty;\n }\n\n get docs(): Array<QueryDocumentSnapshot<T>> {\n return this._delegate.docs.map(\n doc => new QueryDocumentSnapshot<T>(this._firestore, doc)\n );\n }\n\n docChanges(\n options?: PublicSnapshotListenOptions\n ): Array<PublicDocumentChange<T>> {\n return this._delegate\n .docChanges(options)\n .map(docChange => new DocumentChange<T>(this._firestore, docChange));\n }\n\n forEach(\n callback: (result: QueryDocumentSnapshot<T>) => void,\n thisArg?: unknown\n ): void {\n this._delegate.forEach(snapshot => {\n callback.call(\n thisArg,\n new QueryDocumentSnapshot(this._firestore, snapshot)\n );\n });\n }\n\n isEqual(other: QuerySnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class CollectionReference<T = PublicDocumentData>\n extends Query<T>\n implements PublicCollectionReference<T>\n{\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpCollectionReference<T>\n ) {\n super(firestore, _delegate);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n get parent(): DocumentReference<PublicDocumentData> | null {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n\n doc(documentPath?: string): DocumentReference<T> {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(\n this.firestore,\n doc(this._delegate, documentPath)\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'doc()',\n 'CollectionReference.doc()'\n );\n }\n }\n\n add(data: T): Promise<DocumentReference<T>> {\n return addDoc(this._delegate, data as WithFieldValue<T>).then(\n docRef => new DocumentReference(this.firestore, docRef)\n );\n }\n\n isEqual(other: CollectionReference<T>): boolean {\n return refEqual(this._delegate, other._delegate);\n }\n\n withConverter(converter: null): CollectionReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): CollectionReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): CollectionReference<U> {\n return new CollectionReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpCollectionReference<U>)\n );\n }\n}\n\nfunction castReference<T>(\n documentRef: PublicDocumentReference<T>\n): ExpDocumentReference<T> {\n return _cast<ExpDocumentReference<T>>(documentRef, ExpDocumentReference);\n}\n","/**\n * @license\n * Copyright 2017 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 {\n FieldPath as ExpFieldPath,\n _FieldPath as InternalFieldPath\n} from '@firebase/firestore';\nimport { FieldPath as PublicFieldPath } from '@firebase/firestore-types';\nimport { Compat, getModularInstance } from '@firebase/util';\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a list\n * of field names (referring to a nested field in the document).\n */\nexport class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> {\n readonly _delegate: ExpFieldPath;\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames - A list of field names.\n */\n constructor(...fieldNames: string[]) {\n this._delegate = new ExpFieldPath(...fieldNames);\n }\n\n static documentId(): FieldPath {\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n return new FieldPath(InternalFieldPath.keyField().canonicalString());\n }\n\n isEqual(other: PublicFieldPath): boolean {\n other = getModularInstance(other);\n\n if (!(other instanceof ExpFieldPath)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n","/**\n * @license\n * Copyright 2017 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 {\n arrayRemove,\n arrayUnion,\n deleteField,\n FieldValue as FieldValue1,\n increment,\n serverTimestamp\n} from '@firebase/firestore';\nimport { FieldValue as PublicFieldValue } from '@firebase/firestore-types';\nimport { Compat } from '@firebase/util';\n\nexport class FieldValue implements PublicFieldValue, Compat<FieldValue1> {\n static serverTimestamp(): FieldValue {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n\n static delete(): FieldValue {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n\n static arrayUnion(...elements: unknown[]): FieldValue {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n\n static arrayRemove(...elements: unknown[]): FieldValue {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n\n static increment(n: number): FieldValue {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n\n constructor(readonly _delegate: FieldValue1) {}\n\n isEqual(other: FieldValue): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { FirebaseApp } from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport { Component, ComponentType } from '@firebase/component';\nimport {\n Firestore as ModularFirestore,\n CACHE_SIZE_UNLIMITED,\n GeoPoint,\n Timestamp\n} from '@firebase/firestore';\n\nimport { Blob } from './api/blob';\nimport {\n Firestore,\n Transaction,\n CollectionReference,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n WriteBatch,\n setLogLevel\n} from './api/database';\nimport { FieldPath } from './api/field_path';\nimport { FieldValue } from './api/field_value';\n\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\nexport function configureForFirebase(\n firebase: FirebaseNamespace,\n firestoreFactory: (\n app: FirebaseApp,\n firestoreExp: ModularFirestore\n ) => Firestore\n): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'firestore-compat',\n container => {\n const app = container.getProvider('app-compat').getImmediate()!;\n const firestoreExp = container.getProvider('firestore').getImmediate()!;\n return firestoreFactory(app, firestoreExp);\n },\n 'PUBLIC' as ComponentType.PUBLIC\n ).setServiceProps({ ...firestoreNamespace })\n );\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport firebase from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\n\nimport { name, version } from '../package.json';\n\nimport { Firestore, IndexedDbPersistenceProvider } from './api/database';\nimport { configureForFirebase } from './config';\n\n/**\n * Registers the main Firestore Node build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\nexport function registerFirestore(instance: FirebaseNamespace): void {\n configureForFirebase(\n instance,\n (app, firestoreExp) =>\n new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())\n );\n instance.registerVersion(name, version, 'node');\n}\n\nregisterFirestore(firebase as unknown as FirebaseNamespace);\n"],"names":["FirestoreError","_isBase64Available","Bytes","firestore","enableIndexedDbPersistence","enableMultiTabIndexedDbPersistence","clearIndexedDbPersistence","_DatabaseId","_logWarn","connectFirestoreEmulator","enableNetwork","disableNetwork","_validateIsNotUsedTogether","waitForPendingWrites","onSnapshotsInSync","collection","doc","collectionGroup","runTransaction","ensureFirestoreConfigured","ExpWriteBatch","executeWrite","loadBundle","namedQuery","AbstractUserDataWriter","setClientLogLevel","ExpDocumentSnapshot","ExpQueryDocumentSnapshot","ExpDocumentReference","_DocumentKey","getModularInstance","refEqual","setDoc","updateDoc","deleteDoc","onSnapshot","getDocFromCache","getDocFromServer","getDoc","snapshotEqual","_debugAssert","query","where","orderBy","limit","limitToLast","startAt","startAfter","endBefore","endAt","queryEqual","getDocsFromCache","getDocsFromServer","getDocs","ExpQuerySnapshot","addDoc","_cast","ExpFieldPath","InternalFieldPath","serverTimestamp","deleteField","arrayUnion","arrayRemove","increment","GeoPoint","Timestamp","CACHE_SIZE_UNLIMITED","Component","firebase"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAKa,SAAA,kBAAkB,CAChC,UAAkB,EAClB,OAA+B,EAAA;AAE/B,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,OAAO;AACL,YAAA,KAAK,EAAE,KAAK;SACb,CAAC;KACH;AAED,IAAA,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE;AACpE,QAAA,MAAM,IAAIA,wBAAc,CACtB,kBAAkB,EAClB,CAAA,mCAAA,EAAsC,UAAU,CAAiB,eAAA,CAAA;AAC/D,YAAA,yCAAyC,CAC5C,CAAC;KACH;AAED,IAAA,OAAO,OAAO,CAAC;AACjB;;ACvCA;;;;;;;;;;;;;;;AAeG;AAKH;AACA,SAAS,yBAAyB,GAAA;AAChC,IAAA,IAAI,OAAO,UAAU,KAAK,WAAW,EAAE;AACrC,QAAA,MAAM,IAAIA,wBAAc,CACtB,eAAe,EACf,oDAAoD,CACrD,CAAC;KACH;AACH,CAAC;AAED;AACA,SAAS,qBAAqB,GAAA;AAC5B,IAAA,IAAI,CAACC,4BAAkB,EAAE,EAAE;AACzB,QAAA,MAAM,IAAID,wBAAc,CACtB,eAAe,EACf,yDAAyD,CAC1D,CAAC;KACH;AACH,CAAC;AAED;MACa,IAAI,CAAA;AACf,IAAA,WAAA,CAAqB,SAAgB,EAAA;QAAhB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAO;KAAI;IACzC,OAAO,gBAAgB,CAAC,MAAc,EAAA;AACpC,QAAA,qBAAqB,EAAE,CAAC;QACxB,OAAO,IAAI,IAAI,CAACE,eAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;KACjD;IAED,OAAO,cAAc,CAAC,KAAiB,EAAA;AACrC,QAAA,yBAAyB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AW;IACX,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,KAAK;IACL,qBAAqB;IACrB,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,UAAU;IACV,WAAW;0BACXC,8BAAoB;CACrB,CAAC;AAEF;;;;;;AAMG;AACa,SAAA,oBAAoB,CAClC,QAA2B,EAC3B,gBAGc,EAAA;AAEb,IAAA,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAIC,mBAAS,CACX,kBAAkB,EAClB,SAAS,IAAG;QACV,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAG,CAAC;QAChE,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,YAAY,EAAG,CAAC;AACxE,QAAA,OAAO,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AAC7C,KAAC,EACD,QAAgC,CACjC,CAAC,eAAe,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAC,CAC7C,CAAC;AACJ;;ACzFA;;;;;;;;;;;;;;;AAeG;AAWH;;;AAGG;AACG,SAAU,iBAAiB,CAAC,QAA2B,EAAA;IAC3D,oBAAoB,CAClB,QAAQ,EACR,CAAC,GAAG,EAAE,YAAY,KAChB,IAAI,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,4BAA4B,EAAE,CAAC,CACvE,CAAC;IACF,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,iBAAiB,CAACC,4BAAwC,CAAC;;;;"}
\ No newline at end of file diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.rn.js b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.rn.js deleted file mode 100644 index cef8bb8..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.rn.js +++ /dev/null @@ -1,1005 +0,0 @@ -import firebase from '@firebase/app-compat'; -import { FirestoreError, Bytes, _isBase64Available, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, clearIndexedDbPersistence, _DatabaseId, _logWarn, connectFirestoreEmulator, enableNetwork, disableNetwork, _validateIsNotUsedTogether, waitForPendingWrites, onSnapshotsInSync, collection, doc, collectionGroup, runTransaction, ensureFirestoreConfigured, WriteBatch as WriteBatch$1, executeWrite, loadBundle, namedQuery, DocumentSnapshot as DocumentSnapshot$1, DocumentReference as DocumentReference$1, _DocumentKey, refEqual, setDoc, updateDoc, deleteDoc, onSnapshot, getDocFromCache, getDocFromServer, getDoc, snapshotEqual, query, where, orderBy, limit, limitToLast, startAt, startAfter, endBefore, endAt, queryEqual, getDocsFromCache, getDocsFromServer, getDocs, QuerySnapshot as QuerySnapshot$1, addDoc, _cast, AbstractUserDataWriter, setLogLevel as setLogLevel$1, QueryDocumentSnapshot as QueryDocumentSnapshot$1, _debugAssert, FieldPath as FieldPath$1, _FieldPath, serverTimestamp, deleteField, arrayUnion, arrayRemove, increment, GeoPoint, Timestamp, CACHE_SIZE_UNLIMITED } from '@firebase/firestore'; -import { getModularInstance } from '@firebase/util'; -import { Component } from '@firebase/component'; - -const name = "@firebase/firestore-compat"; -const version = "0.4.2"; - -/** - * @license - * Copyright 2021 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. - */ -function validateSetOptions(methodName, options) { - if (options === undefined) { - return { - merge: false - }; - } - if (options.mergeFields !== undefined && options.merge !== undefined) { - throw new FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + - 'specify both "merge" and "mergeFields".'); - } - return options; -} - -/** - * @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. - */ -/** Helper function to assert Uint8Array is available at runtime. */ -function assertUint8ArrayAvailable() { - if (typeof Uint8Array === 'undefined') { - throw new FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.'); - } -} -/** Helper function to assert Base64 functions are available at runtime. */ -function assertBase64Available() { - if (!_isBase64Available()) { - throw new FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.'); - } -} -/** Immutable class holding a blob (binary data) */ -class Blob { - constructor(_delegate) { - this._delegate = _delegate; - } - static fromBase64String(base64) { - assertBase64Available(); - return new Blob(Bytes.fromBase64String(base64)); - } - static fromUint8Array(array) { - assertUint8ArrayAvailable(); - return new Blob(Bytes.fromUint8Array(array)); - } - toBase64() { - assertBase64Available(); - return this._delegate.toBase64(); - } - toUint8Array() { - assertUint8ArrayAvailable(); - return this._delegate.toUint8Array(); - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } - toString() { - return 'Blob(base64: ' + this.toBase64() + ')'; - } -} - -/** - * @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. - */ -function isPartialObserver(obj) { - return implementsAnyMethods(obj, ['next', 'error', 'complete']); -} -/** - * Returns true if obj is an object and contains at least one of the specified - * methods. - */ -function implementsAnyMethods(obj, methods) { - if (typeof obj !== 'object' || obj === null) { - return false; - } - const object = obj; - for (const method of methods) { - if (method in object && typeof object[method] === 'function') { - return true; - } - } - return false; -} - -/** - * @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. - */ -/** - * The persistence provider included with the full Firestore SDK. - */ -class IndexedDbPersistenceProvider { - enableIndexedDbPersistence(firestore, forceOwnership) { - return enableIndexedDbPersistence(firestore._delegate, { forceOwnership }); - } - enableMultiTabIndexedDbPersistence(firestore) { - return enableMultiTabIndexedDbPersistence(firestore._delegate); - } - clearIndexedDbPersistence(firestore) { - return clearIndexedDbPersistence(firestore._delegate); - } -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -class Firestore { - constructor(databaseIdOrApp, _delegate, _persistenceProvider) { - this._delegate = _delegate; - this._persistenceProvider = _persistenceProvider; - this.INTERNAL = { - delete: () => this.terminate() - }; - if (!(databaseIdOrApp instanceof _DatabaseId)) { - this._appCompat = databaseIdOrApp; - } - } - get _databaseId() { - return this._delegate._databaseId; - } - settings(settingsLiteral) { - const currentSettings = this._delegate._getSettings(); - if (!settingsLiteral.merge && - currentSettings.host !== settingsLiteral.host) { - _logWarn('You are overriding the original host. If you did not intend ' + - 'to override your settings, use {merge: true}.'); - } - if (settingsLiteral.merge) { - settingsLiteral = { - ...currentSettings, - ...settingsLiteral - }; - // Remove the property from the settings once the merge is completed - delete settingsLiteral.merge; - } - this._delegate._setSettings(settingsLiteral); - } - useEmulator(host, port, options = {}) { - connectFirestoreEmulator(this._delegate, host, port, options); - } - enableNetwork() { - return enableNetwork(this._delegate); - } - disableNetwork() { - return disableNetwork(this._delegate); - } - enablePersistence(settings) { - let synchronizeTabs = false; - let experimentalForceOwningTab = false; - if (settings) { - synchronizeTabs = !!settings.synchronizeTabs; - experimentalForceOwningTab = !!settings.experimentalForceOwningTab; - _validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab); - } - return synchronizeTabs - ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) - : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab); - } - clearPersistence() { - return this._persistenceProvider.clearIndexedDbPersistence(this); - } - terminate() { - if (this._appCompat) { - this._appCompat._removeServiceInstance('firestore-compat'); - this._appCompat._removeServiceInstance('firestore'); - } - return this._delegate._delete(); - } - waitForPendingWrites() { - return waitForPendingWrites(this._delegate); - } - onSnapshotsInSync(arg) { - return onSnapshotsInSync(this._delegate, arg); - } - get app() { - if (!this._appCompat) { - throw new FirestoreError('failed-precondition', "Firestore was not initialized using the Firebase SDK. 'app' is " + - 'not available'); - } - return this._appCompat; - } - collection(pathString) { - try { - return new CollectionReference(this, collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'Firestore.collection()'); - } - } - doc(pathString) { - try { - return new DocumentReference(this, doc(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'Firestore.doc()'); - } - } - collectionGroup(collectionId) { - try { - return new Query(this, collectionGroup(this._delegate, collectionId)); - } - catch (e) { - throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()'); - } - } - runTransaction(updateFunction) { - return runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction))); - } - batch() { - ensureFirestoreConfigured(this._delegate); - return new WriteBatch(new WriteBatch$1(this._delegate, mutations => executeWrite(this._delegate, mutations))); - } - loadBundle(bundleData) { - return loadBundle(this._delegate, bundleData); - } - namedQuery(name) { - return namedQuery(this._delegate, name).then(expQuery => { - if (!expQuery) { - return null; - } - return new Query(this, - // We can pass `expQuery` here directly since named queries don't have a UserDataConverter. - // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter. - expQuery); - }); - } -} -class UserDataWriter extends AbstractUserDataWriter { - constructor(firestore) { - super(); - this.firestore = firestore; - } - convertBytes(bytes) { - return new Blob(new Bytes(bytes)); - } - convertReference(name) { - const key = this.convertDocumentKey(name, this.firestore._databaseId); - return DocumentReference.forKey(key, this.firestore, /* converter= */ null); - } -} -function setLogLevel(level) { - setLogLevel$1(level); -} -/** - * A reference to a transaction. - */ -class Transaction { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(_firestore); - } - get(documentRef) { - const ref = castReference(documentRef); - return this._delegate - .get(ref) - .then(result => new DocumentSnapshot(this._firestore, new DocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter))); - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('Transaction.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } -} -class WriteBatch { - constructor(_delegate) { - this._delegate = _delegate; - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('WriteBatch.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } - commit() { - return this._delegate.commit(); - } -} -/** - * Wraps a `PublicFirestoreDataConverter` translating the types from the - * experimental SDK into corresponding types from the Classic SDK before passing - * them to the wrapped converter. - */ -class FirestoreDataConverter { - constructor(_firestore, _userDataWriter, _delegate) { - this._firestore = _firestore; - this._userDataWriter = _userDataWriter; - this._delegate = _delegate; - } - fromFirestore(snapshot, options) { - const expSnapshot = new QueryDocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, - /* converter= */ null); - return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options ?? {}); - } - toFirestore(modelObject, options) { - if (!options) { - return this._delegate.toFirestore(modelObject); - } - else { - return this._delegate.toFirestore(modelObject, options); - } - } - // Use the same instance of `FirestoreDataConverter` for the given instances - // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will - // compare equal for two objects created with the same converter instance. - static getInstance(firestore, converter) { - const converterMapByFirestore = FirestoreDataConverter.INSTANCES; - let untypedConverterByConverter = converterMapByFirestore.get(firestore); - if (!untypedConverterByConverter) { - untypedConverterByConverter = new WeakMap(); - converterMapByFirestore.set(firestore, untypedConverterByConverter); - } - let instance = untypedConverterByConverter.get(converter); - if (!instance) { - instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter); - untypedConverterByConverter.set(converter, instance); - } - return instance; - } -} -FirestoreDataConverter.INSTANCES = new WeakMap(); -/** - * A reference to a particular document in a collection in the database. - */ -class DocumentReference { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - static forPath(path, firestore, converter) { - if (path.length % 2 !== 0) { - throw new FirestoreError('invalid-argument', 'Invalid document reference. Document ' + - 'references must have an even number of segments, but ' + - `${path.canonicalString()} has ${path.length}`); - } - return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, new _DocumentKey(path))); - } - static forKey(key, firestore, converter) { - return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, key)); - } - get id() { - return this._delegate.id; - } - get parent() { - return new CollectionReference(this.firestore, this._delegate.parent); - } - get path() { - return this._delegate.path; - } - collection(pathString) { - try { - return new CollectionReference(this.firestore, collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()'); - } - } - isEqual(other) { - other = getModularInstance(other); - if (!(other instanceof DocumentReference$1)) { - return false; - } - return refEqual(this._delegate, other); - } - set(value, options) { - options = validateSetOptions('DocumentReference.set', options); - try { - if (options) { - return setDoc(this._delegate, value, options); - } - else { - return setDoc(this._delegate, value); - } - } - catch (e) { - throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()'); - } - } - update(fieldOrUpdateData, value, ...moreFieldsAndValues) { - try { - if (arguments.length === 1) { - return updateDoc(this._delegate, fieldOrUpdateData); - } - else { - return updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues); - } - } - catch (e) { - throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()'); - } - } - delete() { - return deleteDoc(this._delegate); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - return onSnapshot(this._delegate, options, observer); - } - get(options) { - let snap; - if (options?.source === 'cache') { - snap = getDocFromCache(this._delegate); - } - else if (options?.source === 'server') { - snap = getDocFromServer(this._delegate); - } - else { - snap = getDoc(this._delegate); - } - return snap.then(result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - } - withConverter(converter) { - return new DocumentReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -/** - * Replaces the function name in an error thrown by the firestore-exp API - * with the function names used in the classic API. - */ -function replaceFunctionName(e, original, updated) { - e.message = e.message.replace(original, updated); - return e; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -function extractSnapshotOptions(args) { - for (const arg of args) { - if (typeof arg === 'object' && !isPartialObserver(arg)) { - return arg; - } - } - return {}; -} -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -function wrapObserver(args, wrapper) { - let userObserver; - if (isPartialObserver(args[0])) { - userObserver = args[0]; - } - else if (isPartialObserver(args[1])) { - userObserver = args[1]; - } - else if (typeof args[0] === 'function') { - userObserver = { - next: args[0], - error: args[1], - complete: args[2] - }; - } - else { - userObserver = { - next: args[1], - error: args[2], - complete: args[3] - }; - } - return { - next: val => { - if (userObserver.next) { - userObserver.next(wrapper(val)); - } - }, - error: userObserver.error?.bind(userObserver), - complete: userObserver.complete?.bind(userObserver) - }; -} -class DocumentSnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get ref() { - return new DocumentReference(this._firestore, this._delegate.ref); - } - get id() { - return this._delegate.id; - } - get metadata() { - return this._delegate.metadata; - } - get exists() { - return this._delegate.exists(); - } - data(options) { - return this._delegate.data(options); - } - get(fieldPath, options - // We are using `any` here to avoid an explicit cast by our users. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ) { - return this._delegate.get(fieldPath, options); - } - isEqual(other) { - return snapshotEqual(this._delegate, other._delegate); - } -} -class QueryDocumentSnapshot extends DocumentSnapshot { - data(options) { - const data = this._delegate.data(options); - if (this._delegate._converter) { - // Undefined is a possible valid value from converter. - return data; - } - else { - _debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist'); - return data; - } - } -} -class Query { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - where(fieldPath, opStr, value) { - try { - // The "as string" cast is a little bit of a hack. `where` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, query(this._delegate, where(fieldPath, opStr, value))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - orderBy(fieldPath, directionStr) { - try { - // The "as string" cast is a little bit of a hack. `orderBy` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, query(this._delegate, orderBy(fieldPath, directionStr))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - limit(n) { - try { - return new Query(this.firestore, query(this._delegate, limit(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limit()', 'Query.limit()'); - } - } - limitToLast(n) { - try { - return new Query(this.firestore, query(this._delegate, limitToLast(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()'); - } - } - startAt(...args) { - try { - return new Query(this.firestore, query(this._delegate, startAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAt()', 'Query.startAt()'); - } - } - startAfter(...args) { - try { - return new Query(this.firestore, query(this._delegate, startAfter(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()'); - } - } - endBefore(...args) { - try { - return new Query(this.firestore, query(this._delegate, endBefore(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()'); - } - } - endAt(...args) { - try { - return new Query(this.firestore, query(this._delegate, endAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endAt()', 'Query.endAt()'); - } - } - isEqual(other) { - return queryEqual(this._delegate, other._delegate); - } - get(options) { - let query; - if (options?.source === 'cache') { - query = getDocsFromCache(this._delegate); - } - else if (options?.source === 'server') { - query = getDocsFromServer(this._delegate); - } - else { - query = getDocs(this._delegate); - } - return query.then(result => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot))); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot))); - return onSnapshot(this._delegate, options, observer); - } - withConverter(converter) { - return new Query(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -class DocumentChange { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get type() { - return this._delegate.type; - } - get doc() { - return new QueryDocumentSnapshot(this._firestore, this._delegate.doc); - } - get oldIndex() { - return this._delegate.oldIndex; - } - get newIndex() { - return this._delegate.newIndex; - } -} -class QuerySnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get query() { - return new Query(this._firestore, this._delegate.query); - } - get metadata() { - return this._delegate.metadata; - } - get size() { - return this._delegate.size; - } - get empty() { - return this._delegate.empty; - } - get docs() { - return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc)); - } - docChanges(options) { - return this._delegate - .docChanges(options) - .map(docChange => new DocumentChange(this._firestore, docChange)); - } - forEach(callback, thisArg) { - this._delegate.forEach(snapshot => { - callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot)); - }); - } - isEqual(other) { - return snapshotEqual(this._delegate, other._delegate); - } -} -class CollectionReference extends Query { - constructor(firestore, _delegate) { - super(firestore, _delegate); - this.firestore = firestore; - this._delegate = _delegate; - } - get id() { - return this._delegate.id; - } - get path() { - return this._delegate.path; - } - get parent() { - const docRef = this._delegate.parent; - return docRef ? new DocumentReference(this.firestore, docRef) : null; - } - doc(documentPath) { - try { - if (documentPath === undefined) { - // Call `doc` without `documentPath` if `documentPath` is `undefined` - // as `doc` validates the number of arguments to prevent users from - // accidentally passing `undefined`. - return new DocumentReference(this.firestore, doc(this._delegate)); - } - else { - return new DocumentReference(this.firestore, doc(this._delegate, documentPath)); - } - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()'); - } - } - add(data) { - return addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef)); - } - isEqual(other) { - return refEqual(this._delegate, other._delegate); - } - withConverter(converter) { - return new CollectionReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -function castReference(documentRef) { - return _cast(documentRef, DocumentReference$1); -} - -/** - * @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. - */ -// The objects that are a part of this API are exposed to third-parties as -// compiled javascript so we want to flag our private members with a leading -// underscore to discourage their use. -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -class FieldPath { - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames) { - this._delegate = new FieldPath$1(...fieldNames); - } - static documentId() { - /** - * Internal Note: The backend doesn't technically support querying by - * document ID. Instead it queries by the entire document name (full path - * included), but in the cases we currently support documentId(), the net - * effect is the same. - */ - return new FieldPath(_FieldPath.keyField().canonicalString()); - } - isEqual(other) { - other = getModularInstance(other); - if (!(other instanceof FieldPath$1)) { - return false; - } - return this._delegate._internalPath.isEqual(other._internalPath); - } -} - -/** - * @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. - */ -class FieldValue { - static serverTimestamp() { - const delegate = serverTimestamp(); - delegate._methodName = 'FieldValue.serverTimestamp'; - return new FieldValue(delegate); - } - static delete() { - const delegate = deleteField(); - delegate._methodName = 'FieldValue.delete'; - return new FieldValue(delegate); - } - static arrayUnion(...elements) { - const delegate = arrayUnion(...elements); - delegate._methodName = 'FieldValue.arrayUnion'; - return new FieldValue(delegate); - } - static arrayRemove(...elements) { - const delegate = arrayRemove(...elements); - delegate._methodName = 'FieldValue.arrayRemove'; - return new FieldValue(delegate); - } - static increment(n) { - const delegate = increment(n); - delegate._methodName = 'FieldValue.increment'; - return new FieldValue(delegate); - } - constructor(_delegate) { - this._delegate = _delegate; - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } -} - -/** - * @license - * Copyright 2021 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 firestoreNamespace = { - Firestore, - GeoPoint, - Timestamp, - Blob, - Transaction, - WriteBatch, - DocumentReference, - DocumentSnapshot, - Query, - QueryDocumentSnapshot, - QuerySnapshot, - CollectionReference, - FieldPath, - FieldValue, - setLogLevel, - CACHE_SIZE_UNLIMITED -}; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -function configureForFirebase(firebase, firestoreFactory) { - firebase.INTERNAL.registerComponent(new Component('firestore-compat', container => { - const app = container.getProvider('app-compat').getImmediate(); - const firestoreExp = container.getProvider('firestore').getImmediate(); - return firestoreFactory(app, firestoreExp); - }, 'PUBLIC').setServiceProps({ ...firestoreNamespace })); -} - -/** - * @license - * Copyright 2020 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. - */ -/** - * Registers the main Firestore ReactNative build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -function registerFirestore(instance) { - configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())); - instance.registerVersion(name, version, 'rn'); -} -registerFirestore(firebase); - -export { registerFirestore }; -//# sourceMappingURL=index.rn.js.map diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.rn.js.map b/frontend-old/node_modules/@firebase/firestore-compat/dist/index.rn.js.map deleted file mode 100644 index 11ef7a8..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/index.rn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.rn.js","sources":["../src/util/input_validation.ts","../src/api/blob.ts","../src/api/observer.ts","../src/api/database.ts","../src/api/field_path.ts","../src/api/field_value.ts","../src/config.ts","../src/index.rn.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 { FirestoreError } from '@firebase/firestore';\nimport { SetOptions } from '@firebase/firestore-types';\n\nexport function validateSetOptions(\n methodName: string,\n options: SetOptions | undefined\n): SetOptions {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError(\n 'invalid-argument',\n `Invalid options passed to function ${methodName}(): You cannot ` +\n 'specify both \"merge\" and \"mergeFields\".'\n );\n }\n\n return options;\n}\n","/**\n * @license\n * Copyright 2017 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 { Bytes, FirestoreError, _isBase64Available } from '@firebase/firestore';\nimport { Compat } from '@firebase/util';\n\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable(): void {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(\n 'unimplemented',\n 'Uint8Arrays are not available in this environment.'\n );\n }\n}\n\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available(): void {\n if (!_isBase64Available()) {\n throw new FirestoreError(\n 'unimplemented',\n 'Blobs are unavailable in Firestore in this environment.'\n );\n }\n}\n\n/** Immutable class holding a blob (binary data) */\nexport class Blob implements Compat<Bytes> {\n constructor(readonly _delegate: Bytes) {}\n static fromBase64String(base64: string): Blob {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n\n static fromUint8Array(array: Uint8Array): Blob {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n\n toBase64(): string {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n\n toUint8Array(): Uint8Array {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n\n isEqual(other: Blob): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n\n toString(): string {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n","/**\n * @license\n * Copyright 2017 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 { FirestoreError } from '@firebase/firestore';\n\n/**\n * Observer/Subscribe interfaces.\n */\nexport type NextFn<T> = (value: T) => void;\nexport type ErrorFn = (error: FirestoreError) => void;\nexport type CompleteFn = () => void;\n\n// Allow for any of the Observer methods to be undefined.\nexport interface PartialObserver<T> {\n next?: NextFn<T>;\n error?: ErrorFn;\n complete?: CompleteFn;\n}\n\nexport function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T> {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj: unknown, methods: string[]): boolean {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n const object = obj as Record<string, unknown>;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n","/**\n * @license\n * Copyright 2017 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 { FirebaseApp } from '@firebase/app-types';\nimport { _FirebaseApp, FirebaseService } from '@firebase/app-types/private';\nimport {\n LoadBundleTask,\n Bytes,\n clearIndexedDbPersistence,\n disableNetwork,\n enableIndexedDbPersistence,\n enableMultiTabIndexedDbPersistence,\n enableNetwork,\n ensureFirestoreConfigured,\n Firestore as ExpFirestore,\n connectFirestoreEmulator,\n waitForPendingWrites,\n FieldPath as ExpFieldPath,\n limit,\n limitToLast,\n where,\n orderBy,\n startAfter,\n startAt,\n query,\n endBefore,\n endAt,\n doc,\n collection,\n collectionGroup,\n queryEqual,\n Query as ExpQuery,\n CollectionReference as ExpCollectionReference,\n DocumentReference as ExpDocumentReference,\n refEqual,\n addDoc,\n deleteDoc,\n executeWrite,\n getDoc,\n getDocFromCache,\n getDocFromServer,\n getDocs,\n getDocsFromCache,\n getDocsFromServer,\n onSnapshot,\n onSnapshotsInSync,\n setDoc,\n updateDoc,\n Unsubscribe,\n DocumentChange as ExpDocumentChange,\n DocumentSnapshot as ExpDocumentSnapshot,\n QueryDocumentSnapshot as ExpQueryDocumentSnapshot,\n QuerySnapshot as ExpQuerySnapshot,\n snapshotEqual,\n SnapshotMetadata,\n runTransaction,\n Transaction as ExpTransaction,\n WriteBatch as ExpWriteBatch,\n AbstractUserDataWriter,\n FirestoreError,\n FirestoreDataConverter as ModularFirestoreDataConverter,\n setLogLevel as setClientLogLevel,\n _DatabaseId,\n _validateIsNotUsedTogether,\n _cast,\n _DocumentKey,\n _debugAssert,\n _FieldPath,\n _ResourcePath,\n _ByteString,\n _logWarn,\n namedQuery,\n loadBundle,\n PartialWithFieldValue,\n WithFieldValue\n} from '@firebase/firestore';\nimport {\n CollectionReference as PublicCollectionReference,\n DocumentChange as PublicDocumentChange,\n DocumentChangeType as PublicDocumentChangeType,\n DocumentData,\n DocumentData as PublicDocumentData,\n DocumentReference as PublicDocumentReference,\n DocumentSnapshot as PublicDocumentSnapshot,\n FieldPath as PublicFieldPath,\n FirebaseFirestore as PublicFirestore,\n FirestoreDataConverter as PublicFirestoreDataConverter,\n GetOptions as PublicGetOptions,\n LogLevel as PublicLogLevel,\n OrderByDirection as PublicOrderByDirection,\n PersistenceSettings as PublicPersistenceSettings,\n Query as PublicQuery,\n QueryDocumentSnapshot as PublicQueryDocumentSnapshot,\n QuerySnapshot as PublicQuerySnapshot,\n SetOptions as PublicSetOptions,\n Settings as PublicSettings,\n SnapshotListenOptions as PublicSnapshotListenOptions,\n SnapshotOptions as PublicSnapshotOptions,\n Transaction as PublicTransaction,\n UpdateData as PublicUpdateData,\n WhereFilterOp as PublicWhereFilterOp,\n WriteBatch as PublicWriteBatch\n} from '@firebase/firestore-types';\nimport {\n Compat,\n EmulatorMockTokenOptions,\n getModularInstance\n} from '@firebase/util';\n\nimport { validateSetOptions } from '../util/input_validation';\n\nimport { Blob } from './blob';\nimport {\n CompleteFn,\n ErrorFn,\n isPartialObserver,\n NextFn,\n PartialObserver\n} from './observer';\n\n/**\n * A persistence provider for either memory-only or IndexedDB persistence.\n * Mainly used to allow optional inclusion of IndexedDB code.\n */\nexport interface PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void>;\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;\n clearIndexedDbPersistence(firestore: Firestore): Promise<void>;\n}\n\n/**\n * The persistence provider included with the full Firestore SDK.\n */\nexport class IndexedDbPersistenceProvider implements PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void> {\n return enableIndexedDbPersistence(firestore._delegate, { forceOwnership });\n }\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n\n/**\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\n * to the functional API of firestore-exp.\n */\nexport class Firestore\n implements PublicFirestore, FirebaseService, Compat<ExpFirestore>\n{\n _appCompat?: FirebaseApp;\n constructor(\n databaseIdOrApp: _DatabaseId | FirebaseApp,\n readonly _delegate: ExpFirestore,\n private _persistenceProvider: PersistenceProvider\n ) {\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp as FirebaseApp;\n }\n }\n\n get _databaseId(): _DatabaseId {\n return this._delegate._databaseId;\n }\n\n settings(settingsLiteral: PublicSettings): void {\n const currentSettings = this._delegate._getSettings();\n if (\n !settingsLiteral.merge &&\n currentSettings.host !== settingsLiteral.host\n ) {\n _logWarn(\n 'You are overriding the original host. If you did not intend ' +\n 'to override your settings, use {merge: true}.'\n );\n }\n\n if (settingsLiteral.merge) {\n settingsLiteral = {\n ...currentSettings,\n ...settingsLiteral\n };\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n\n this._delegate._setSettings(settingsLiteral);\n }\n\n useEmulator(\n host: string,\n port: number,\n options: {\n mockUserToken?: EmulatorMockTokenOptions | string;\n } = {}\n ): void {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n\n enableNetwork(): Promise<void> {\n return enableNetwork(this._delegate);\n }\n\n disableNetwork(): Promise<void> {\n return disableNetwork(this._delegate);\n }\n\n enablePersistence(settings?: PublicPersistenceSettings): Promise<void> {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n\n _validateIsNotUsedTogether(\n 'synchronizeTabs',\n synchronizeTabs,\n 'experimentalForceOwningTab',\n experimentalForceOwningTab\n );\n }\n\n return synchronizeTabs\n ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this)\n : this._persistenceProvider.enableIndexedDbPersistence(\n this,\n experimentalForceOwningTab\n );\n }\n\n clearPersistence(): Promise<void> {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n\n terminate(): Promise<void> {\n if (this._appCompat) {\n (this._appCompat as _FirebaseApp)._removeServiceInstance(\n 'firestore-compat'\n );\n (this._appCompat as _FirebaseApp)._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n\n waitForPendingWrites(): Promise<void> {\n return waitForPendingWrites(this._delegate);\n }\n\n onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe;\n onSnapshotsInSync(onSync: () => void): Unsubscribe;\n onSnapshotsInSync(arg: unknown): Unsubscribe {\n return onSnapshotsInSync(this._delegate, arg as PartialObserver<void>);\n }\n\n get app(): FirebaseApp {\n if (!this._appCompat) {\n throw new FirestoreError(\n 'failed-precondition',\n \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available'\n );\n }\n return this._appCompat as FirebaseApp;\n }\n\n INTERNAL = {\n delete: () => this.terminate()\n };\n\n collection(pathString: string): PublicCollectionReference {\n try {\n return new CollectionReference(\n this,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'Firestore.collection()'\n );\n }\n }\n\n doc(pathString: string): PublicDocumentReference {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'doc()', 'Firestore.doc()');\n }\n }\n\n collectionGroup(collectionId: string): PublicQuery {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collectionGroup()',\n 'Firestore.collectionGroup()'\n );\n }\n }\n\n runTransaction<T>(\n updateFunction: (transaction: PublicTransaction) => Promise<T>\n ): Promise<T> {\n return runTransaction(this._delegate, transaction =>\n updateFunction(new Transaction(this, transaction))\n );\n }\n\n batch(): PublicWriteBatch {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(\n new ExpWriteBatch(this._delegate, mutations =>\n executeWrite(this._delegate, mutations)\n )\n );\n }\n\n loadBundle(\n bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string\n ): LoadBundleTask {\n return loadBundle(this._delegate, bundleData);\n }\n\n namedQuery(name: string): Promise<PublicQuery<DocumentData> | null> {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(\n this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery\n );\n });\n }\n}\n\nexport class UserDataWriter extends AbstractUserDataWriter {\n constructor(protected firestore: Firestore) {\n super();\n }\n\n protected convertBytes(bytes: _ByteString): Blob {\n return new Blob(new Bytes(bytes));\n }\n\n protected convertReference(name: string): DocumentReference {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */ null);\n }\n}\n\nexport function setLogLevel(level: PublicLogLevel): void {\n setClientLogLevel(level);\n}\n\n/**\n * A reference to a transaction.\n */\nexport class Transaction implements PublicTransaction, Compat<ExpTransaction> {\n private _userDataWriter: UserDataWriter;\n\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpTransaction\n ) {\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n\n get<T>(\n documentRef: PublicDocumentReference<T>\n ): Promise<PublicDocumentSnapshot<T>> {\n const ref = castReference(documentRef);\n return this._delegate\n .get(ref)\n .then(\n result =>\n new DocumentSnapshot(\n this._firestore,\n new ExpDocumentSnapshot<T>(\n this._firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n ref.converter\n )\n )\n );\n }\n\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): Transaction;\n set<T>(documentRef: DocumentReference<T>, data: T): Transaction;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): Transaction {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: unknown,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): Transaction {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\n\nexport class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> {\n constructor(readonly _delegate: ExpWriteBatch) {}\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): WriteBatch;\n set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): WriteBatch {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n\n commit(): Promise<void> {\n return this._delegate.commit();\n }\n}\n\n/**\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\n * experimental SDK into corresponding types from the Classic SDK before passing\n * them to the wrapped converter.\n */\nclass FirestoreDataConverter<U>\n implements\n ModularFirestoreDataConverter<U>,\n Compat<PublicFirestoreDataConverter<U>>\n{\n private static readonly INSTANCES = new WeakMap();\n\n private constructor(\n private readonly _firestore: Firestore,\n private readonly _userDataWriter: UserDataWriter,\n readonly _delegate: PublicFirestoreDataConverter<U>\n ) {}\n\n fromFirestore(\n snapshot: ExpQueryDocumentSnapshot,\n options?: PublicSnapshotOptions\n ): U {\n const expSnapshot = new ExpQueryDocumentSnapshot(\n this._firestore._delegate,\n this._userDataWriter,\n snapshot._key,\n snapshot._document,\n snapshot.metadata,\n /* converter= */ null\n );\n return this._delegate.fromFirestore(\n new QueryDocumentSnapshot(this._firestore, expSnapshot),\n options ?? {}\n );\n }\n\n toFirestore(modelObject: WithFieldValue<U>): PublicDocumentData;\n toFirestore(\n modelObject: PartialWithFieldValue<U>,\n options: PublicSetOptions\n ): PublicDocumentData;\n toFirestore(\n modelObject: WithFieldValue<U> | PartialWithFieldValue<U>,\n options?: PublicSetOptions\n ): PublicDocumentData {\n if (!options) {\n return this._delegate.toFirestore(modelObject as U);\n } else {\n return this._delegate.toFirestore(modelObject as Partial<U>, options);\n }\n }\n\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance<U>(\n firestore: Firestore,\n converter: PublicFirestoreDataConverter<U>\n ): FirestoreDataConverter<U> {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(\n firestore,\n new UserDataWriter(firestore),\n converter\n );\n untypedConverterByConverter.set(converter, instance);\n }\n\n return instance;\n }\n}\n\n/**\n * A reference to a particular document in a collection in the database.\n */\nexport class DocumentReference<T = PublicDocumentData>\n implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>>\n{\n private _userDataWriter: UserDataWriter;\n\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpDocumentReference<T>\n ) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n static forPath<U>(\n path: _ResourcePath,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(\n 'invalid-argument',\n 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n `${path.canonicalString()} has ${path.length}`\n );\n }\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(\n firestore._delegate,\n converter,\n new _DocumentKey(path)\n )\n );\n }\n\n static forKey<U>(\n key: _DocumentKey,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(firestore._delegate, converter, key)\n );\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get parent(): PublicCollectionReference<T> {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n collection(\n pathString: string\n ): PublicCollectionReference<PublicDocumentData> {\n try {\n return new CollectionReference(\n this.firestore,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'DocumentReference.collection()'\n );\n }\n }\n\n isEqual(other: PublicDocumentReference<T>): boolean {\n other = getModularInstance<PublicDocumentReference<T>>(other);\n\n if (!(other instanceof ExpDocumentReference)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n\n set(value: Partial<T>, options: PublicSetOptions): Promise<void>;\n set(value: T): Promise<void>;\n set(value: T | Partial<T>, options?: PublicSetOptions): Promise<void> {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(\n this._delegate,\n value as PartialWithFieldValue<T>,\n options\n );\n } else {\n return setDoc(this._delegate, value as WithFieldValue<T>);\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'setDoc()',\n 'DocumentReference.set()'\n );\n }\n }\n\n update(value: PublicUpdateData): Promise<void>;\n update(\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void>;\n update(\n fieldOrUpdateData: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void> {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData as PublicUpdateData);\n } else {\n return updateDoc(\n this._delegate,\n fieldOrUpdateData as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'updateDoc()',\n 'DocumentReference.update()'\n );\n }\n }\n\n delete(): Promise<void> {\n return deleteDoc(this._delegate);\n }\n\n onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicDocumentSnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<DocumentSnapshot<T>, ExpDocumentSnapshot<T>>(\n args,\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>> {\n let snap: Promise<ExpDocumentSnapshot<T>>;\n if (options?.source === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if (options?.source === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n\n return snap.then(\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n }\n\n withConverter(converter: null): PublicDocumentReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): PublicDocumentReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): PublicDocumentReference<U> {\n return new DocumentReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpDocumentReference<U>)\n );\n }\n}\n\n/**\n * Replaces the function name in an error thrown by the firestore-exp API\n * with the function names used in the classic API.\n */\nfunction replaceFunctionName(\n e: Error,\n original: string | RegExp,\n updated: string\n): Error {\n e.message = e.message.replace(original, updated);\n return e;\n}\n\n/**\n * Iterates the list of arguments from an `onSnapshot` call and returns the\n * first argument that may be an `SnapshotListenOptions` object. Returns an\n * empty object if none is found.\n */\nexport function extractSnapshotOptions(\n args: unknown[]\n): PublicSnapshotListenOptions {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg as PublicSnapshotListenOptions;\n }\n }\n return {};\n}\n\n/**\n * Creates an observer that can be passed to the firestore-exp SDK. The\n * observer converts all observed values into the format expected by the classic\n * SDK.\n *\n * @param args - The list of arguments from an `onSnapshot` call.\n * @param wrapper - The function that converts the firestore-exp type into the\n * type used by this shim.\n */\nexport function wrapObserver<CompatType, ExpType>(\n args: unknown[],\n wrapper: (val: ExpType) => CompatType\n): PartialObserver<ExpType> {\n let userObserver: PartialObserver<CompatType>;\n if (isPartialObserver(args[0])) {\n userObserver = args[0] as PartialObserver<CompatType>;\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0] as NextFn<CompatType> | undefined,\n error: args[1] as ErrorFn | undefined,\n complete: args[2] as CompleteFn | undefined\n };\n } else {\n userObserver = {\n next: args[1] as NextFn<CompatType> | undefined,\n error: args[2] as ErrorFn | undefined,\n complete: args[3] as CompleteFn | undefined\n };\n }\n\n return {\n next: val => {\n if (userObserver!.next) {\n userObserver!.next(wrapper(val));\n }\n },\n error: userObserver.error?.bind(userObserver),\n complete: userObserver.complete?.bind(userObserver)\n };\n}\n\n/**\n * Options interface that can be provided to configure the deserialization of\n * DocumentSnapshots.\n */\nexport interface SnapshotOptions extends PublicSnapshotOptions {}\n\nexport class DocumentSnapshot<T = PublicDocumentData>\n implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentSnapshot<T>\n ) {}\n\n get ref(): DocumentReference<T> {\n return new DocumentReference<T>(this._firestore, this._delegate.ref);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get exists(): boolean {\n return this._delegate.exists();\n }\n\n data(options?: PublicSnapshotOptions): T | undefined {\n return this._delegate.data(options);\n }\n\n get(\n fieldPath: string | PublicFieldPath,\n options?: PublicSnapshotOptions\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any {\n return this._delegate.get(fieldPath as string | ExpFieldPath, options);\n }\n\n isEqual(other: DocumentSnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class QueryDocumentSnapshot<T = PublicDocumentData>\n extends DocumentSnapshot<T>\n implements PublicQueryDocumentSnapshot<T>\n{\n data(options?: PublicSnapshotOptions): T {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data as T;\n } else {\n _debugAssert(\n data !== undefined,\n 'Document in a QueryDocumentSnapshot should exist'\n );\n return data;\n }\n }\n}\n\nexport class Query<T = PublicDocumentData>\n implements PublicQuery<T>, Compat<ExpQuery<T>>\n{\n private readonly _userDataWriter: UserDataWriter;\n\n constructor(readonly firestore: Firestore, readonly _delegate: ExpQuery<T>) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n where(\n fieldPath: string | _FieldPath,\n opStr: PublicWhereFilterOp,\n value: unknown\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, where(fieldPath as string, opStr, value))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n orderBy(\n fieldPath: string | _FieldPath,\n directionStr?: PublicOrderByDirection\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, orderBy(fieldPath as string, directionStr))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n limit(n: number): Query<T> {\n try {\n return new Query<T>(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'limit()', 'Query.limit()');\n }\n }\n\n limitToLast(n: number): Query<T> {\n try {\n return new Query<T>(\n this.firestore,\n query(this._delegate, limitToLast(n))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'limitToLast()',\n 'Query.limitToLast()'\n );\n }\n }\n\n startAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'startAt()', 'Query.startAt()');\n }\n }\n\n startAfter(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, startAfter(...args))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'startAfter()',\n 'Query.startAfter()'\n );\n }\n }\n\n endBefore(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, endBefore(...args))\n );\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endBefore()', 'Query.endBefore()');\n }\n }\n\n endAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endAt()', 'Query.endAt()');\n }\n }\n\n isEqual(other: PublicQuery<T>): boolean {\n return queryEqual(this._delegate, (other as Query<T>)._delegate);\n }\n\n get(options?: PublicGetOptions): Promise<QuerySnapshot<T>> {\n let query: Promise<ExpQuerySnapshot<T>>;\n if (options?.source === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if (options?.source === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(\n result =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n result._snapshot\n )\n )\n );\n }\n\n onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicQuerySnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<QuerySnapshot<T>, ExpQuerySnapshot<T>>(\n args,\n snap =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n snap._snapshot\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n withConverter(converter: null): Query<PublicDocumentData>;\n withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): Query<U> {\n return new Query<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpQuery<U>)\n );\n }\n}\n\nexport class DocumentChange<T = PublicDocumentData>\n implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentChange<T>\n ) {}\n\n get type(): PublicDocumentChangeType {\n return this._delegate.type;\n }\n\n get doc(): QueryDocumentSnapshot<T> {\n return new QueryDocumentSnapshot<T>(this._firestore, this._delegate.doc);\n }\n\n get oldIndex(): number {\n return this._delegate.oldIndex;\n }\n\n get newIndex(): number {\n return this._delegate.newIndex;\n }\n}\n\nexport class QuerySnapshot<T = PublicDocumentData>\n implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>>\n{\n constructor(\n readonly _firestore: Firestore,\n readonly _delegate: ExpQuerySnapshot<T>\n ) {}\n\n get query(): Query<T> {\n return new Query(this._firestore, this._delegate.query);\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get size(): number {\n return this._delegate.size;\n }\n\n get empty(): boolean {\n return this._delegate.empty;\n }\n\n get docs(): Array<QueryDocumentSnapshot<T>> {\n return this._delegate.docs.map(\n doc => new QueryDocumentSnapshot<T>(this._firestore, doc)\n );\n }\n\n docChanges(\n options?: PublicSnapshotListenOptions\n ): Array<PublicDocumentChange<T>> {\n return this._delegate\n .docChanges(options)\n .map(docChange => new DocumentChange<T>(this._firestore, docChange));\n }\n\n forEach(\n callback: (result: QueryDocumentSnapshot<T>) => void,\n thisArg?: unknown\n ): void {\n this._delegate.forEach(snapshot => {\n callback.call(\n thisArg,\n new QueryDocumentSnapshot(this._firestore, snapshot)\n );\n });\n }\n\n isEqual(other: QuerySnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class CollectionReference<T = PublicDocumentData>\n extends Query<T>\n implements PublicCollectionReference<T>\n{\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpCollectionReference<T>\n ) {\n super(firestore, _delegate);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n get parent(): DocumentReference<PublicDocumentData> | null {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n\n doc(documentPath?: string): DocumentReference<T> {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(\n this.firestore,\n doc(this._delegate, documentPath)\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'doc()',\n 'CollectionReference.doc()'\n );\n }\n }\n\n add(data: T): Promise<DocumentReference<T>> {\n return addDoc(this._delegate, data as WithFieldValue<T>).then(\n docRef => new DocumentReference(this.firestore, docRef)\n );\n }\n\n isEqual(other: CollectionReference<T>): boolean {\n return refEqual(this._delegate, other._delegate);\n }\n\n withConverter(converter: null): CollectionReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): CollectionReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): CollectionReference<U> {\n return new CollectionReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpCollectionReference<U>)\n );\n }\n}\n\nfunction castReference<T>(\n documentRef: PublicDocumentReference<T>\n): ExpDocumentReference<T> {\n return _cast<ExpDocumentReference<T>>(documentRef, ExpDocumentReference);\n}\n","/**\n * @license\n * Copyright 2017 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 {\n FieldPath as ExpFieldPath,\n _FieldPath as InternalFieldPath\n} from '@firebase/firestore';\nimport { FieldPath as PublicFieldPath } from '@firebase/firestore-types';\nimport { Compat, getModularInstance } from '@firebase/util';\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a list\n * of field names (referring to a nested field in the document).\n */\nexport class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> {\n readonly _delegate: ExpFieldPath;\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames - A list of field names.\n */\n constructor(...fieldNames: string[]) {\n this._delegate = new ExpFieldPath(...fieldNames);\n }\n\n static documentId(): FieldPath {\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n return new FieldPath(InternalFieldPath.keyField().canonicalString());\n }\n\n isEqual(other: PublicFieldPath): boolean {\n other = getModularInstance(other);\n\n if (!(other instanceof ExpFieldPath)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n","/**\n * @license\n * Copyright 2017 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 {\n arrayRemove,\n arrayUnion,\n deleteField,\n FieldValue as FieldValue1,\n increment,\n serverTimestamp\n} from '@firebase/firestore';\nimport { FieldValue as PublicFieldValue } from '@firebase/firestore-types';\nimport { Compat } from '@firebase/util';\n\nexport class FieldValue implements PublicFieldValue, Compat<FieldValue1> {\n static serverTimestamp(): FieldValue {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n\n static delete(): FieldValue {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n\n static arrayUnion(...elements: unknown[]): FieldValue {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n\n static arrayRemove(...elements: unknown[]): FieldValue {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n\n static increment(n: number): FieldValue {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n\n constructor(readonly _delegate: FieldValue1) {}\n\n isEqual(other: FieldValue): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { FirebaseApp } from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport { Component, ComponentType } from '@firebase/component';\nimport {\n Firestore as ModularFirestore,\n CACHE_SIZE_UNLIMITED,\n GeoPoint,\n Timestamp\n} from '@firebase/firestore';\n\nimport { Blob } from './api/blob';\nimport {\n Firestore,\n Transaction,\n CollectionReference,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n WriteBatch,\n setLogLevel\n} from './api/database';\nimport { FieldPath } from './api/field_path';\nimport { FieldValue } from './api/field_value';\n\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\nexport function configureForFirebase(\n firebase: FirebaseNamespace,\n firestoreFactory: (\n app: FirebaseApp,\n firestoreExp: ModularFirestore\n ) => Firestore\n): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'firestore-compat',\n container => {\n const app = container.getProvider('app-compat').getImmediate()!;\n const firestoreExp = container.getProvider('firestore').getImmediate()!;\n return firestoreFactory(app, firestoreExp);\n },\n 'PUBLIC' as ComponentType.PUBLIC\n ).setServiceProps({ ...firestoreNamespace })\n );\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport firebase from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\n\nimport { name, version } from '../package.json';\n\nimport { Firestore, IndexedDbPersistenceProvider } from './api/database';\nimport { configureForFirebase } from './config';\n/**\n * Registers the main Firestore ReactNative build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\nexport function registerFirestore(instance: FirebaseNamespace): void {\n configureForFirebase(\n instance,\n (app, firestoreExp) =>\n new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())\n );\n instance.registerVersion(name, version, 'rn');\n}\n\nregisterFirestore(firebase as unknown as FirebaseNamespace);\n"],"names":["ExpWriteBatch","setClientLogLevel","ExpDocumentSnapshot","ExpQueryDocumentSnapshot","ExpDocumentReference","ExpQuerySnapshot","ExpFieldPath","InternalFieldPath"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAKa,SAAA,kBAAkB,CAChC,UAAkB,EAClB,OAA+B,EAAA;AAE/B,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,OAAO;AACL,YAAA,KAAK,EAAE,KAAK;SACb,CAAC;KACH;AAED,IAAA,IAAI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xE,QAAA,OAAO,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AAC7C,KAAC,EACD,QAAgC,CACjC,CAAC,eAAe,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAC,CAC7C,CAAC;AACJ;;ACzFA;;;;;;;;;;;;;;;AAeG;AAUH;;;AAGG;AACG,SAAU,iBAAiB,CAAC,QAA2B,EAAA;IAC3D,oBAAoB,CAClB,QAAQ,EACR,CAAC,GAAG,EAAE,YAAY,KAChB,IAAI,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,4BAA4B,EAAE,CAAC,CACvE,CAAC;IACF,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,iBAAiB,CAAC,QAAwC,CAAC;;;;"}
\ No newline at end of file diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/index.node.esm.js b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/index.node.esm.js deleted file mode 100644 index e5f9806..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/index.node.esm.js +++ /dev/null @@ -1,1005 +0,0 @@ -import firebase from '@firebase/app-compat'; -import { FirestoreError, Bytes, _isBase64Available, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, clearIndexedDbPersistence, _DatabaseId, _logWarn, connectFirestoreEmulator, enableNetwork, disableNetwork, _validateIsNotUsedTogether, waitForPendingWrites, onSnapshotsInSync, collection, doc, collectionGroup, runTransaction, ensureFirestoreConfigured, WriteBatch as WriteBatch$1, executeWrite, loadBundle, namedQuery, DocumentSnapshot as DocumentSnapshot$1, DocumentReference as DocumentReference$1, _DocumentKey, refEqual, setDoc, updateDoc, deleteDoc, onSnapshot, getDocFromCache, getDocFromServer, getDoc, snapshotEqual, query, where, orderBy, limit, limitToLast, startAt, startAfter, endBefore, endAt, queryEqual, getDocsFromCache, getDocsFromServer, getDocs, QuerySnapshot as QuerySnapshot$1, addDoc, _cast, AbstractUserDataWriter, setLogLevel as setLogLevel$1, QueryDocumentSnapshot as QueryDocumentSnapshot$1, _debugAssert, FieldPath as FieldPath$1, _FieldPath, serverTimestamp, deleteField, arrayUnion, arrayRemove, increment, GeoPoint, Timestamp, CACHE_SIZE_UNLIMITED } from '@firebase/firestore'; -import { getModularInstance } from '@firebase/util'; -import { Component } from '@firebase/component'; - -const name = "@firebase/firestore-compat"; -const version = "0.4.2"; - -/** - * @license - * Copyright 2021 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. - */ -function validateSetOptions(methodName, options) { - if (options === undefined) { - return { - merge: false - }; - } - if (options.mergeFields !== undefined && options.merge !== undefined) { - throw new FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + - 'specify both "merge" and "mergeFields".'); - } - return options; -} - -/** - * @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. - */ -/** Helper function to assert Uint8Array is available at runtime. */ -function assertUint8ArrayAvailable() { - if (typeof Uint8Array === 'undefined') { - throw new FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.'); - } -} -/** Helper function to assert Base64 functions are available at runtime. */ -function assertBase64Available() { - if (!_isBase64Available()) { - throw new FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.'); - } -} -/** Immutable class holding a blob (binary data) */ -class Blob { - constructor(_delegate) { - this._delegate = _delegate; - } - static fromBase64String(base64) { - assertBase64Available(); - return new Blob(Bytes.fromBase64String(base64)); - } - static fromUint8Array(array) { - assertUint8ArrayAvailable(); - return new Blob(Bytes.fromUint8Array(array)); - } - toBase64() { - assertBase64Available(); - return this._delegate.toBase64(); - } - toUint8Array() { - assertUint8ArrayAvailable(); - return this._delegate.toUint8Array(); - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } - toString() { - return 'Blob(base64: ' + this.toBase64() + ')'; - } -} - -/** - * @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. - */ -function isPartialObserver(obj) { - return implementsAnyMethods(obj, ['next', 'error', 'complete']); -} -/** - * Returns true if obj is an object and contains at least one of the specified - * methods. - */ -function implementsAnyMethods(obj, methods) { - if (typeof obj !== 'object' || obj === null) { - return false; - } - const object = obj; - for (const method of methods) { - if (method in object && typeof object[method] === 'function') { - return true; - } - } - return false; -} - -/** - * @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. - */ -/** - * The persistence provider included with the full Firestore SDK. - */ -class IndexedDbPersistenceProvider { - enableIndexedDbPersistence(firestore, forceOwnership) { - return enableIndexedDbPersistence(firestore._delegate, { forceOwnership }); - } - enableMultiTabIndexedDbPersistence(firestore) { - return enableMultiTabIndexedDbPersistence(firestore._delegate); - } - clearIndexedDbPersistence(firestore) { - return clearIndexedDbPersistence(firestore._delegate); - } -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -class Firestore { - constructor(databaseIdOrApp, _delegate, _persistenceProvider) { - this._delegate = _delegate; - this._persistenceProvider = _persistenceProvider; - this.INTERNAL = { - delete: () => this.terminate() - }; - if (!(databaseIdOrApp instanceof _DatabaseId)) { - this._appCompat = databaseIdOrApp; - } - } - get _databaseId() { - return this._delegate._databaseId; - } - settings(settingsLiteral) { - const currentSettings = this._delegate._getSettings(); - if (!settingsLiteral.merge && - currentSettings.host !== settingsLiteral.host) { - _logWarn('You are overriding the original host. If you did not intend ' + - 'to override your settings, use {merge: true}.'); - } - if (settingsLiteral.merge) { - settingsLiteral = { - ...currentSettings, - ...settingsLiteral - }; - // Remove the property from the settings once the merge is completed - delete settingsLiteral.merge; - } - this._delegate._setSettings(settingsLiteral); - } - useEmulator(host, port, options = {}) { - connectFirestoreEmulator(this._delegate, host, port, options); - } - enableNetwork() { - return enableNetwork(this._delegate); - } - disableNetwork() { - return disableNetwork(this._delegate); - } - enablePersistence(settings) { - let synchronizeTabs = false; - let experimentalForceOwningTab = false; - if (settings) { - synchronizeTabs = !!settings.synchronizeTabs; - experimentalForceOwningTab = !!settings.experimentalForceOwningTab; - _validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab); - } - return synchronizeTabs - ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) - : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab); - } - clearPersistence() { - return this._persistenceProvider.clearIndexedDbPersistence(this); - } - terminate() { - if (this._appCompat) { - this._appCompat._removeServiceInstance('firestore-compat'); - this._appCompat._removeServiceInstance('firestore'); - } - return this._delegate._delete(); - } - waitForPendingWrites() { - return waitForPendingWrites(this._delegate); - } - onSnapshotsInSync(arg) { - return onSnapshotsInSync(this._delegate, arg); - } - get app() { - if (!this._appCompat) { - throw new FirestoreError('failed-precondition', "Firestore was not initialized using the Firebase SDK. 'app' is " + - 'not available'); - } - return this._appCompat; - } - collection(pathString) { - try { - return new CollectionReference(this, collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'Firestore.collection()'); - } - } - doc(pathString) { - try { - return new DocumentReference(this, doc(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'Firestore.doc()'); - } - } - collectionGroup(collectionId) { - try { - return new Query(this, collectionGroup(this._delegate, collectionId)); - } - catch (e) { - throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()'); - } - } - runTransaction(updateFunction) { - return runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction))); - } - batch() { - ensureFirestoreConfigured(this._delegate); - return new WriteBatch(new WriteBatch$1(this._delegate, mutations => executeWrite(this._delegate, mutations))); - } - loadBundle(bundleData) { - return loadBundle(this._delegate, bundleData); - } - namedQuery(name) { - return namedQuery(this._delegate, name).then(expQuery => { - if (!expQuery) { - return null; - } - return new Query(this, - // We can pass `expQuery` here directly since named queries don't have a UserDataConverter. - // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter. - expQuery); - }); - } -} -class UserDataWriter extends AbstractUserDataWriter { - constructor(firestore) { - super(); - this.firestore = firestore; - } - convertBytes(bytes) { - return new Blob(new Bytes(bytes)); - } - convertReference(name) { - const key = this.convertDocumentKey(name, this.firestore._databaseId); - return DocumentReference.forKey(key, this.firestore, /* converter= */ null); - } -} -function setLogLevel(level) { - setLogLevel$1(level); -} -/** - * A reference to a transaction. - */ -class Transaction { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(_firestore); - } - get(documentRef) { - const ref = castReference(documentRef); - return this._delegate - .get(ref) - .then(result => new DocumentSnapshot(this._firestore, new DocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter))); - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('Transaction.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } -} -class WriteBatch { - constructor(_delegate) { - this._delegate = _delegate; - } - set(documentRef, data, options) { - const ref = castReference(documentRef); - if (options) { - validateSetOptions('WriteBatch.set', options); - this._delegate.set(ref, data, options); - } - else { - this._delegate.set(ref, data); - } - return this; - } - update(documentRef, dataOrField, value, ...moreFieldsAndValues) { - const ref = castReference(documentRef); - if (arguments.length === 2) { - this._delegate.update(ref, dataOrField); - } - else { - this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues); - } - return this; - } - delete(documentRef) { - const ref = castReference(documentRef); - this._delegate.delete(ref); - return this; - } - commit() { - return this._delegate.commit(); - } -} -/** - * Wraps a `PublicFirestoreDataConverter` translating the types from the - * experimental SDK into corresponding types from the Classic SDK before passing - * them to the wrapped converter. - */ -class FirestoreDataConverter { - constructor(_firestore, _userDataWriter, _delegate) { - this._firestore = _firestore; - this._userDataWriter = _userDataWriter; - this._delegate = _delegate; - } - fromFirestore(snapshot, options) { - const expSnapshot = new QueryDocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, - /* converter= */ null); - return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options ?? {}); - } - toFirestore(modelObject, options) { - if (!options) { - return this._delegate.toFirestore(modelObject); - } - else { - return this._delegate.toFirestore(modelObject, options); - } - } - // Use the same instance of `FirestoreDataConverter` for the given instances - // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will - // compare equal for two objects created with the same converter instance. - static getInstance(firestore, converter) { - const converterMapByFirestore = FirestoreDataConverter.INSTANCES; - let untypedConverterByConverter = converterMapByFirestore.get(firestore); - if (!untypedConverterByConverter) { - untypedConverterByConverter = new WeakMap(); - converterMapByFirestore.set(firestore, untypedConverterByConverter); - } - let instance = untypedConverterByConverter.get(converter); - if (!instance) { - instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter); - untypedConverterByConverter.set(converter, instance); - } - return instance; - } -} -FirestoreDataConverter.INSTANCES = new WeakMap(); -/** - * A reference to a particular document in a collection in the database. - */ -class DocumentReference { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - static forPath(path, firestore, converter) { - if (path.length % 2 !== 0) { - throw new FirestoreError('invalid-argument', 'Invalid document reference. Document ' + - 'references must have an even number of segments, but ' + - `${path.canonicalString()} has ${path.length}`); - } - return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, new _DocumentKey(path))); - } - static forKey(key, firestore, converter) { - return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, key)); - } - get id() { - return this._delegate.id; - } - get parent() { - return new CollectionReference(this.firestore, this._delegate.parent); - } - get path() { - return this._delegate.path; - } - collection(pathString) { - try { - return new CollectionReference(this.firestore, collection(this._delegate, pathString)); - } - catch (e) { - throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()'); - } - } - isEqual(other) { - other = getModularInstance(other); - if (!(other instanceof DocumentReference$1)) { - return false; - } - return refEqual(this._delegate, other); - } - set(value, options) { - options = validateSetOptions('DocumentReference.set', options); - try { - if (options) { - return setDoc(this._delegate, value, options); - } - else { - return setDoc(this._delegate, value); - } - } - catch (e) { - throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()'); - } - } - update(fieldOrUpdateData, value, ...moreFieldsAndValues) { - try { - if (arguments.length === 1) { - return updateDoc(this._delegate, fieldOrUpdateData); - } - else { - return updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues); - } - } - catch (e) { - throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()'); - } - } - delete() { - return deleteDoc(this._delegate); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - return onSnapshot(this._delegate, options, observer); - } - get(options) { - let snap; - if (options?.source === 'cache') { - snap = getDocFromCache(this._delegate); - } - else if (options?.source === 'server') { - snap = getDocFromServer(this._delegate); - } - else { - snap = getDoc(this._delegate); - } - return snap.then(result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter))); - } - withConverter(converter) { - return new DocumentReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -/** - * Replaces the function name in an error thrown by the firestore-exp API - * with the function names used in the classic API. - */ -function replaceFunctionName(e, original, updated) { - e.message = e.message.replace(original, updated); - return e; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -function extractSnapshotOptions(args) { - for (const arg of args) { - if (typeof arg === 'object' && !isPartialObserver(arg)) { - return arg; - } - } - return {}; -} -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -function wrapObserver(args, wrapper) { - let userObserver; - if (isPartialObserver(args[0])) { - userObserver = args[0]; - } - else if (isPartialObserver(args[1])) { - userObserver = args[1]; - } - else if (typeof args[0] === 'function') { - userObserver = { - next: args[0], - error: args[1], - complete: args[2] - }; - } - else { - userObserver = { - next: args[1], - error: args[2], - complete: args[3] - }; - } - return { - next: val => { - if (userObserver.next) { - userObserver.next(wrapper(val)); - } - }, - error: userObserver.error?.bind(userObserver), - complete: userObserver.complete?.bind(userObserver) - }; -} -class DocumentSnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get ref() { - return new DocumentReference(this._firestore, this._delegate.ref); - } - get id() { - return this._delegate.id; - } - get metadata() { - return this._delegate.metadata; - } - get exists() { - return this._delegate.exists(); - } - data(options) { - return this._delegate.data(options); - } - get(fieldPath, options - // We are using `any` here to avoid an explicit cast by our users. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ) { - return this._delegate.get(fieldPath, options); - } - isEqual(other) { - return snapshotEqual(this._delegate, other._delegate); - } -} -class QueryDocumentSnapshot extends DocumentSnapshot { - data(options) { - const data = this._delegate.data(options); - if (this._delegate._converter) { - // Undefined is a possible valid value from converter. - return data; - } - else { - _debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist'); - return data; - } - } -} -class Query { - constructor(firestore, _delegate) { - this.firestore = firestore; - this._delegate = _delegate; - this._userDataWriter = new UserDataWriter(firestore); - } - where(fieldPath, opStr, value) { - try { - // The "as string" cast is a little bit of a hack. `where` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, query(this._delegate, where(fieldPath, opStr, value))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - orderBy(fieldPath, directionStr) { - try { - // The "as string" cast is a little bit of a hack. `orderBy` accepts the - // FieldPath Compat type as input, but is not typed as such in order to - // not expose this via our public typings file. - return new Query(this.firestore, query(this._delegate, orderBy(fieldPath, directionStr))); - } - catch (e) { - throw replaceFunctionName(e, /(orderBy|where)\(\)/, 'Query.$1()'); - } - } - limit(n) { - try { - return new Query(this.firestore, query(this._delegate, limit(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limit()', 'Query.limit()'); - } - } - limitToLast(n) { - try { - return new Query(this.firestore, query(this._delegate, limitToLast(n))); - } - catch (e) { - throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()'); - } - } - startAt(...args) { - try { - return new Query(this.firestore, query(this._delegate, startAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAt()', 'Query.startAt()'); - } - } - startAfter(...args) { - try { - return new Query(this.firestore, query(this._delegate, startAfter(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()'); - } - } - endBefore(...args) { - try { - return new Query(this.firestore, query(this._delegate, endBefore(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()'); - } - } - endAt(...args) { - try { - return new Query(this.firestore, query(this._delegate, endAt(...args))); - } - catch (e) { - throw replaceFunctionName(e, 'endAt()', 'Query.endAt()'); - } - } - isEqual(other) { - return queryEqual(this._delegate, other._delegate); - } - get(options) { - let query; - if (options?.source === 'cache') { - query = getDocsFromCache(this._delegate); - } - else if (options?.source === 'server') { - query = getDocsFromServer(this._delegate); - } - else { - query = getDocs(this._delegate); - } - return query.then(result => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot))); - } - onSnapshot(...args) { - const options = extractSnapshotOptions(args); - const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot))); - return onSnapshot(this._delegate, options, observer); - } - withConverter(converter) { - return new Query(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -class DocumentChange { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get type() { - return this._delegate.type; - } - get doc() { - return new QueryDocumentSnapshot(this._firestore, this._delegate.doc); - } - get oldIndex() { - return this._delegate.oldIndex; - } - get newIndex() { - return this._delegate.newIndex; - } -} -class QuerySnapshot { - constructor(_firestore, _delegate) { - this._firestore = _firestore; - this._delegate = _delegate; - } - get query() { - return new Query(this._firestore, this._delegate.query); - } - get metadata() { - return this._delegate.metadata; - } - get size() { - return this._delegate.size; - } - get empty() { - return this._delegate.empty; - } - get docs() { - return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc)); - } - docChanges(options) { - return this._delegate - .docChanges(options) - .map(docChange => new DocumentChange(this._firestore, docChange)); - } - forEach(callback, thisArg) { - this._delegate.forEach(snapshot => { - callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot)); - }); - } - isEqual(other) { - return snapshotEqual(this._delegate, other._delegate); - } -} -class CollectionReference extends Query { - constructor(firestore, _delegate) { - super(firestore, _delegate); - this.firestore = firestore; - this._delegate = _delegate; - } - get id() { - return this._delegate.id; - } - get path() { - return this._delegate.path; - } - get parent() { - const docRef = this._delegate.parent; - return docRef ? new DocumentReference(this.firestore, docRef) : null; - } - doc(documentPath) { - try { - if (documentPath === undefined) { - // Call `doc` without `documentPath` if `documentPath` is `undefined` - // as `doc` validates the number of arguments to prevent users from - // accidentally passing `undefined`. - return new DocumentReference(this.firestore, doc(this._delegate)); - } - else { - return new DocumentReference(this.firestore, doc(this._delegate, documentPath)); - } - } - catch (e) { - throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()'); - } - } - add(data) { - return addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef)); - } - isEqual(other) { - return refEqual(this._delegate, other._delegate); - } - withConverter(converter) { - return new CollectionReference(this.firestore, converter - ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) - : this._delegate.withConverter(null)); - } -} -function castReference(documentRef) { - return _cast(documentRef, DocumentReference$1); -} - -/** - * @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. - */ -// The objects that are a part of this API are exposed to third-parties as -// compiled javascript so we want to flag our private members with a leading -// underscore to discourage their use. -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -class FieldPath { - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames) { - this._delegate = new FieldPath$1(...fieldNames); - } - static documentId() { - /** - * Internal Note: The backend doesn't technically support querying by - * document ID. Instead it queries by the entire document name (full path - * included), but in the cases we currently support documentId(), the net - * effect is the same. - */ - return new FieldPath(_FieldPath.keyField().canonicalString()); - } - isEqual(other) { - other = getModularInstance(other); - if (!(other instanceof FieldPath$1)) { - return false; - } - return this._delegate._internalPath.isEqual(other._internalPath); - } -} - -/** - * @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. - */ -class FieldValue { - static serverTimestamp() { - const delegate = serverTimestamp(); - delegate._methodName = 'FieldValue.serverTimestamp'; - return new FieldValue(delegate); - } - static delete() { - const delegate = deleteField(); - delegate._methodName = 'FieldValue.delete'; - return new FieldValue(delegate); - } - static arrayUnion(...elements) { - const delegate = arrayUnion(...elements); - delegate._methodName = 'FieldValue.arrayUnion'; - return new FieldValue(delegate); - } - static arrayRemove(...elements) { - const delegate = arrayRemove(...elements); - delegate._methodName = 'FieldValue.arrayRemove'; - return new FieldValue(delegate); - } - static increment(n) { - const delegate = increment(n); - delegate._methodName = 'FieldValue.increment'; - return new FieldValue(delegate); - } - constructor(_delegate) { - this._delegate = _delegate; - } - isEqual(other) { - return this._delegate.isEqual(other._delegate); - } -} - -/** - * @license - * Copyright 2021 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 firestoreNamespace = { - Firestore, - GeoPoint, - Timestamp, - Blob, - Transaction, - WriteBatch, - DocumentReference, - DocumentSnapshot, - Query, - QueryDocumentSnapshot, - QuerySnapshot, - CollectionReference, - FieldPath, - FieldValue, - setLogLevel, - CACHE_SIZE_UNLIMITED -}; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -function configureForFirebase(firebase, firestoreFactory) { - firebase.INTERNAL.registerComponent(new Component('firestore-compat', container => { - const app = container.getProvider('app-compat').getImmediate(); - const firestoreExp = container.getProvider('firestore').getImmediate(); - return firestoreFactory(app, firestoreExp); - }, 'PUBLIC').setServiceProps({ ...firestoreNamespace })); -} - -/** - * @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. - */ -/** - * Registers the main Firestore Node build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -function registerFirestore(instance) { - configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())); - instance.registerVersion(name, version, 'node'); -} -registerFirestore(firebase); - -export { registerFirestore }; -//# sourceMappingURL=index.node.esm.js.map diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/index.node.esm.js.map b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/index.node.esm.js.map deleted file mode 100644 index 543e348..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/index.node.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.node.esm.js","sources":["../../src/util/input_validation.ts","../../src/api/blob.ts","../../src/api/observer.ts","../../src/api/database.ts","../../src/api/field_path.ts","../../src/api/field_value.ts","../../src/config.ts","../../src/index.node.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 { FirestoreError } from '@firebase/firestore';\nimport { SetOptions } from '@firebase/firestore-types';\n\nexport function validateSetOptions(\n methodName: string,\n options: SetOptions | undefined\n): SetOptions {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError(\n 'invalid-argument',\n `Invalid options passed to function ${methodName}(): You cannot ` +\n 'specify both \"merge\" and \"mergeFields\".'\n );\n }\n\n return options;\n}\n","/**\n * @license\n * Copyright 2017 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 { Bytes, FirestoreError, _isBase64Available } from '@firebase/firestore';\nimport { Compat } from '@firebase/util';\n\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable(): void {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(\n 'unimplemented',\n 'Uint8Arrays are not available in this environment.'\n );\n }\n}\n\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available(): void {\n if (!_isBase64Available()) {\n throw new FirestoreError(\n 'unimplemented',\n 'Blobs are unavailable in Firestore in this environment.'\n );\n }\n}\n\n/** Immutable class holding a blob (binary data) */\nexport class Blob implements Compat<Bytes> {\n constructor(readonly _delegate: Bytes) {}\n static fromBase64String(base64: string): Blob {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n\n static fromUint8Array(array: Uint8Array): Blob {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n\n toBase64(): string {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n\n toUint8Array(): Uint8Array {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n\n isEqual(other: Blob): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n\n toString(): string {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n","/**\n * @license\n * Copyright 2017 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 { FirestoreError } from '@firebase/firestore';\n\n/**\n * Observer/Subscribe interfaces.\n */\nexport type NextFn<T> = (value: T) => void;\nexport type ErrorFn = (error: FirestoreError) => void;\nexport type CompleteFn = () => void;\n\n// Allow for any of the Observer methods to be undefined.\nexport interface PartialObserver<T> {\n next?: NextFn<T>;\n error?: ErrorFn;\n complete?: CompleteFn;\n}\n\nexport function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T> {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj: unknown, methods: string[]): boolean {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n const object = obj as Record<string, unknown>;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n","/**\n * @license\n * Copyright 2017 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 { FirebaseApp } from '@firebase/app-types';\nimport { _FirebaseApp, FirebaseService } from '@firebase/app-types/private';\nimport {\n LoadBundleTask,\n Bytes,\n clearIndexedDbPersistence,\n disableNetwork,\n enableIndexedDbPersistence,\n enableMultiTabIndexedDbPersistence,\n enableNetwork,\n ensureFirestoreConfigured,\n Firestore as ExpFirestore,\n connectFirestoreEmulator,\n waitForPendingWrites,\n FieldPath as ExpFieldPath,\n limit,\n limitToLast,\n where,\n orderBy,\n startAfter,\n startAt,\n query,\n endBefore,\n endAt,\n doc,\n collection,\n collectionGroup,\n queryEqual,\n Query as ExpQuery,\n CollectionReference as ExpCollectionReference,\n DocumentReference as ExpDocumentReference,\n refEqual,\n addDoc,\n deleteDoc,\n executeWrite,\n getDoc,\n getDocFromCache,\n getDocFromServer,\n getDocs,\n getDocsFromCache,\n getDocsFromServer,\n onSnapshot,\n onSnapshotsInSync,\n setDoc,\n updateDoc,\n Unsubscribe,\n DocumentChange as ExpDocumentChange,\n DocumentSnapshot as ExpDocumentSnapshot,\n QueryDocumentSnapshot as ExpQueryDocumentSnapshot,\n QuerySnapshot as ExpQuerySnapshot,\n snapshotEqual,\n SnapshotMetadata,\n runTransaction,\n Transaction as ExpTransaction,\n WriteBatch as ExpWriteBatch,\n AbstractUserDataWriter,\n FirestoreError,\n FirestoreDataConverter as ModularFirestoreDataConverter,\n setLogLevel as setClientLogLevel,\n _DatabaseId,\n _validateIsNotUsedTogether,\n _cast,\n _DocumentKey,\n _debugAssert,\n _FieldPath,\n _ResourcePath,\n _ByteString,\n _logWarn,\n namedQuery,\n loadBundle,\n PartialWithFieldValue,\n WithFieldValue\n} from '@firebase/firestore';\nimport {\n CollectionReference as PublicCollectionReference,\n DocumentChange as PublicDocumentChange,\n DocumentChangeType as PublicDocumentChangeType,\n DocumentData,\n DocumentData as PublicDocumentData,\n DocumentReference as PublicDocumentReference,\n DocumentSnapshot as PublicDocumentSnapshot,\n FieldPath as PublicFieldPath,\n FirebaseFirestore as PublicFirestore,\n FirestoreDataConverter as PublicFirestoreDataConverter,\n GetOptions as PublicGetOptions,\n LogLevel as PublicLogLevel,\n OrderByDirection as PublicOrderByDirection,\n PersistenceSettings as PublicPersistenceSettings,\n Query as PublicQuery,\n QueryDocumentSnapshot as PublicQueryDocumentSnapshot,\n QuerySnapshot as PublicQuerySnapshot,\n SetOptions as PublicSetOptions,\n Settings as PublicSettings,\n SnapshotListenOptions as PublicSnapshotListenOptions,\n SnapshotOptions as PublicSnapshotOptions,\n Transaction as PublicTransaction,\n UpdateData as PublicUpdateData,\n WhereFilterOp as PublicWhereFilterOp,\n WriteBatch as PublicWriteBatch\n} from '@firebase/firestore-types';\nimport {\n Compat,\n EmulatorMockTokenOptions,\n getModularInstance\n} from '@firebase/util';\n\nimport { validateSetOptions } from '../util/input_validation';\n\nimport { Blob } from './blob';\nimport {\n CompleteFn,\n ErrorFn,\n isPartialObserver,\n NextFn,\n PartialObserver\n} from './observer';\n\n/**\n * A persistence provider for either memory-only or IndexedDB persistence.\n * Mainly used to allow optional inclusion of IndexedDB code.\n */\nexport interface PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void>;\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;\n clearIndexedDbPersistence(firestore: Firestore): Promise<void>;\n}\n\n/**\n * The persistence provider included with the full Firestore SDK.\n */\nexport class IndexedDbPersistenceProvider implements PersistenceProvider {\n enableIndexedDbPersistence(\n firestore: Firestore,\n forceOwnership: boolean\n ): Promise<void> {\n return enableIndexedDbPersistence(firestore._delegate, { forceOwnership });\n }\n enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore: Firestore): Promise<void> {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n\n/**\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\n * to the functional API of firestore-exp.\n */\nexport class Firestore\n implements PublicFirestore, FirebaseService, Compat<ExpFirestore>\n{\n _appCompat?: FirebaseApp;\n constructor(\n databaseIdOrApp: _DatabaseId | FirebaseApp,\n readonly _delegate: ExpFirestore,\n private _persistenceProvider: PersistenceProvider\n ) {\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp as FirebaseApp;\n }\n }\n\n get _databaseId(): _DatabaseId {\n return this._delegate._databaseId;\n }\n\n settings(settingsLiteral: PublicSettings): void {\n const currentSettings = this._delegate._getSettings();\n if (\n !settingsLiteral.merge &&\n currentSettings.host !== settingsLiteral.host\n ) {\n _logWarn(\n 'You are overriding the original host. If you did not intend ' +\n 'to override your settings, use {merge: true}.'\n );\n }\n\n if (settingsLiteral.merge) {\n settingsLiteral = {\n ...currentSettings,\n ...settingsLiteral\n };\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n\n this._delegate._setSettings(settingsLiteral);\n }\n\n useEmulator(\n host: string,\n port: number,\n options: {\n mockUserToken?: EmulatorMockTokenOptions | string;\n } = {}\n ): void {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n\n enableNetwork(): Promise<void> {\n return enableNetwork(this._delegate);\n }\n\n disableNetwork(): Promise<void> {\n return disableNetwork(this._delegate);\n }\n\n enablePersistence(settings?: PublicPersistenceSettings): Promise<void> {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n\n _validateIsNotUsedTogether(\n 'synchronizeTabs',\n synchronizeTabs,\n 'experimentalForceOwningTab',\n experimentalForceOwningTab\n );\n }\n\n return synchronizeTabs\n ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this)\n : this._persistenceProvider.enableIndexedDbPersistence(\n this,\n experimentalForceOwningTab\n );\n }\n\n clearPersistence(): Promise<void> {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n\n terminate(): Promise<void> {\n if (this._appCompat) {\n (this._appCompat as _FirebaseApp)._removeServiceInstance(\n 'firestore-compat'\n );\n (this._appCompat as _FirebaseApp)._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n\n waitForPendingWrites(): Promise<void> {\n return waitForPendingWrites(this._delegate);\n }\n\n onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe;\n onSnapshotsInSync(onSync: () => void): Unsubscribe;\n onSnapshotsInSync(arg: unknown): Unsubscribe {\n return onSnapshotsInSync(this._delegate, arg as PartialObserver<void>);\n }\n\n get app(): FirebaseApp {\n if (!this._appCompat) {\n throw new FirestoreError(\n 'failed-precondition',\n \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available'\n );\n }\n return this._appCompat as FirebaseApp;\n }\n\n INTERNAL = {\n delete: () => this.terminate()\n };\n\n collection(pathString: string): PublicCollectionReference {\n try {\n return new CollectionReference(\n this,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'Firestore.collection()'\n );\n }\n }\n\n doc(pathString: string): PublicDocumentReference {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'doc()', 'Firestore.doc()');\n }\n }\n\n collectionGroup(collectionId: string): PublicQuery {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collectionGroup()',\n 'Firestore.collectionGroup()'\n );\n }\n }\n\n runTransaction<T>(\n updateFunction: (transaction: PublicTransaction) => Promise<T>\n ): Promise<T> {\n return runTransaction(this._delegate, transaction =>\n updateFunction(new Transaction(this, transaction))\n );\n }\n\n batch(): PublicWriteBatch {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(\n new ExpWriteBatch(this._delegate, mutations =>\n executeWrite(this._delegate, mutations)\n )\n );\n }\n\n loadBundle(\n bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string\n ): LoadBundleTask {\n return loadBundle(this._delegate, bundleData);\n }\n\n namedQuery(name: string): Promise<PublicQuery<DocumentData> | null> {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(\n this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery\n );\n });\n }\n}\n\nexport class UserDataWriter extends AbstractUserDataWriter {\n constructor(protected firestore: Firestore) {\n super();\n }\n\n protected convertBytes(bytes: _ByteString): Blob {\n return new Blob(new Bytes(bytes));\n }\n\n protected convertReference(name: string): DocumentReference {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */ null);\n }\n}\n\nexport function setLogLevel(level: PublicLogLevel): void {\n setClientLogLevel(level);\n}\n\n/**\n * A reference to a transaction.\n */\nexport class Transaction implements PublicTransaction, Compat<ExpTransaction> {\n private _userDataWriter: UserDataWriter;\n\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpTransaction\n ) {\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n\n get<T>(\n documentRef: PublicDocumentReference<T>\n ): Promise<PublicDocumentSnapshot<T>> {\n const ref = castReference(documentRef);\n return this._delegate\n .get(ref)\n .then(\n result =>\n new DocumentSnapshot(\n this._firestore,\n new ExpDocumentSnapshot<T>(\n this._firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n ref.converter\n )\n )\n );\n }\n\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): Transaction;\n set<T>(documentRef: DocumentReference<T>, data: T): Transaction;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): Transaction {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: unknown,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Transaction {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): Transaction {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\n\nexport class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> {\n constructor(readonly _delegate: ExpWriteBatch) {}\n set<T>(\n documentRef: DocumentReference<T>,\n data: Partial<T>,\n options: PublicSetOptions\n ): WriteBatch;\n set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;\n set<T>(\n documentRef: PublicDocumentReference<T>,\n data: T | Partial<T>,\n options?: PublicSetOptions\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data as PartialWithFieldValue<T>, options);\n } else {\n this._delegate.set(ref, data as WithFieldValue<T>);\n }\n return this;\n }\n\n update(\n documentRef: PublicDocumentReference<unknown>,\n data: PublicUpdateData\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch;\n update(\n documentRef: PublicDocumentReference<unknown>,\n dataOrField: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): WriteBatch {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField as PublicUpdateData);\n } else {\n this._delegate.update(\n ref,\n dataOrField as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n return this;\n }\n\n delete(documentRef: PublicDocumentReference<unknown>): WriteBatch {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n\n commit(): Promise<void> {\n return this._delegate.commit();\n }\n}\n\n/**\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\n * experimental SDK into corresponding types from the Classic SDK before passing\n * them to the wrapped converter.\n */\nclass FirestoreDataConverter<U>\n implements\n ModularFirestoreDataConverter<U>,\n Compat<PublicFirestoreDataConverter<U>>\n{\n private static readonly INSTANCES = new WeakMap();\n\n private constructor(\n private readonly _firestore: Firestore,\n private readonly _userDataWriter: UserDataWriter,\n readonly _delegate: PublicFirestoreDataConverter<U>\n ) {}\n\n fromFirestore(\n snapshot: ExpQueryDocumentSnapshot,\n options?: PublicSnapshotOptions\n ): U {\n const expSnapshot = new ExpQueryDocumentSnapshot(\n this._firestore._delegate,\n this._userDataWriter,\n snapshot._key,\n snapshot._document,\n snapshot.metadata,\n /* converter= */ null\n );\n return this._delegate.fromFirestore(\n new QueryDocumentSnapshot(this._firestore, expSnapshot),\n options ?? {}\n );\n }\n\n toFirestore(modelObject: WithFieldValue<U>): PublicDocumentData;\n toFirestore(\n modelObject: PartialWithFieldValue<U>,\n options: PublicSetOptions\n ): PublicDocumentData;\n toFirestore(\n modelObject: WithFieldValue<U> | PartialWithFieldValue<U>,\n options?: PublicSetOptions\n ): PublicDocumentData {\n if (!options) {\n return this._delegate.toFirestore(modelObject as U);\n } else {\n return this._delegate.toFirestore(modelObject as Partial<U>, options);\n }\n }\n\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance<U>(\n firestore: Firestore,\n converter: PublicFirestoreDataConverter<U>\n ): FirestoreDataConverter<U> {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(\n firestore,\n new UserDataWriter(firestore),\n converter\n );\n untypedConverterByConverter.set(converter, instance);\n }\n\n return instance;\n }\n}\n\n/**\n * A reference to a particular document in a collection in the database.\n */\nexport class DocumentReference<T = PublicDocumentData>\n implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>>\n{\n private _userDataWriter: UserDataWriter;\n\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpDocumentReference<T>\n ) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n static forPath<U>(\n path: _ResourcePath,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(\n 'invalid-argument',\n 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n `${path.canonicalString()} has ${path.length}`\n );\n }\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(\n firestore._delegate,\n converter,\n new _DocumentKey(path)\n )\n );\n }\n\n static forKey<U>(\n key: _DocumentKey,\n firestore: Firestore,\n converter: ModularFirestoreDataConverter<U> | null\n ): DocumentReference<U> {\n return new DocumentReference(\n firestore,\n new ExpDocumentReference(firestore._delegate, converter, key)\n );\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get parent(): PublicCollectionReference<T> {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n collection(\n pathString: string\n ): PublicCollectionReference<PublicDocumentData> {\n try {\n return new CollectionReference(\n this.firestore,\n collection(this._delegate, pathString)\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'collection()',\n 'DocumentReference.collection()'\n );\n }\n }\n\n isEqual(other: PublicDocumentReference<T>): boolean {\n other = getModularInstance<PublicDocumentReference<T>>(other);\n\n if (!(other instanceof ExpDocumentReference)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n\n set(value: Partial<T>, options: PublicSetOptions): Promise<void>;\n set(value: T): Promise<void>;\n set(value: T | Partial<T>, options?: PublicSetOptions): Promise<void> {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(\n this._delegate,\n value as PartialWithFieldValue<T>,\n options\n );\n } else {\n return setDoc(this._delegate, value as WithFieldValue<T>);\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'setDoc()',\n 'DocumentReference.set()'\n );\n }\n }\n\n update(value: PublicUpdateData): Promise<void>;\n update(\n field: string | PublicFieldPath,\n value: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void>;\n update(\n fieldOrUpdateData: string | PublicFieldPath | PublicUpdateData,\n value?: unknown,\n ...moreFieldsAndValues: unknown[]\n ): Promise<void> {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData as PublicUpdateData);\n } else {\n return updateDoc(\n this._delegate,\n fieldOrUpdateData as string | ExpFieldPath,\n value,\n ...moreFieldsAndValues\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'updateDoc()',\n 'DocumentReference.update()'\n );\n }\n }\n\n delete(): Promise<void> {\n return deleteDoc(this._delegate);\n }\n\n onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicDocumentSnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicDocumentSnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<DocumentSnapshot<T>, ExpDocumentSnapshot<T>>(\n args,\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>> {\n let snap: Promise<ExpDocumentSnapshot<T>>;\n if (options?.source === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if (options?.source === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n\n return snap.then(\n result =>\n new DocumentSnapshot(\n this.firestore,\n new ExpDocumentSnapshot(\n this.firestore._delegate,\n this._userDataWriter,\n result._key,\n result._document,\n result.metadata,\n this._delegate.converter\n )\n )\n );\n }\n\n withConverter(converter: null): PublicDocumentReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): PublicDocumentReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): PublicDocumentReference<U> {\n return new DocumentReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpDocumentReference<U>)\n );\n }\n}\n\n/**\n * Replaces the function name in an error thrown by the firestore-exp API\n * with the function names used in the classic API.\n */\nfunction replaceFunctionName(\n e: Error,\n original: string | RegExp,\n updated: string\n): Error {\n e.message = e.message.replace(original, updated);\n return e;\n}\n\n/**\n * Iterates the list of arguments from an `onSnapshot` call and returns the\n * first argument that may be an `SnapshotListenOptions` object. Returns an\n * empty object if none is found.\n */\nexport function extractSnapshotOptions(\n args: unknown[]\n): PublicSnapshotListenOptions {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg as PublicSnapshotListenOptions;\n }\n }\n return {};\n}\n\n/**\n * Creates an observer that can be passed to the firestore-exp SDK. The\n * observer converts all observed values into the format expected by the classic\n * SDK.\n *\n * @param args - The list of arguments from an `onSnapshot` call.\n * @param wrapper - The function that converts the firestore-exp type into the\n * type used by this shim.\n */\nexport function wrapObserver<CompatType, ExpType>(\n args: unknown[],\n wrapper: (val: ExpType) => CompatType\n): PartialObserver<ExpType> {\n let userObserver: PartialObserver<CompatType>;\n if (isPartialObserver(args[0])) {\n userObserver = args[0] as PartialObserver<CompatType>;\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0] as NextFn<CompatType> | undefined,\n error: args[1] as ErrorFn | undefined,\n complete: args[2] as CompleteFn | undefined\n };\n } else {\n userObserver = {\n next: args[1] as NextFn<CompatType> | undefined,\n error: args[2] as ErrorFn | undefined,\n complete: args[3] as CompleteFn | undefined\n };\n }\n\n return {\n next: val => {\n if (userObserver!.next) {\n userObserver!.next(wrapper(val));\n }\n },\n error: userObserver.error?.bind(userObserver),\n complete: userObserver.complete?.bind(userObserver)\n };\n}\n\n/**\n * Options interface that can be provided to configure the deserialization of\n * DocumentSnapshots.\n */\nexport interface SnapshotOptions extends PublicSnapshotOptions {}\n\nexport class DocumentSnapshot<T = PublicDocumentData>\n implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentSnapshot<T>\n ) {}\n\n get ref(): DocumentReference<T> {\n return new DocumentReference<T>(this._firestore, this._delegate.ref);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get exists(): boolean {\n return this._delegate.exists();\n }\n\n data(options?: PublicSnapshotOptions): T | undefined {\n return this._delegate.data(options);\n }\n\n get(\n fieldPath: string | PublicFieldPath,\n options?: PublicSnapshotOptions\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any {\n return this._delegate.get(fieldPath as string | ExpFieldPath, options);\n }\n\n isEqual(other: DocumentSnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class QueryDocumentSnapshot<T = PublicDocumentData>\n extends DocumentSnapshot<T>\n implements PublicQueryDocumentSnapshot<T>\n{\n data(options?: PublicSnapshotOptions): T {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data as T;\n } else {\n _debugAssert(\n data !== undefined,\n 'Document in a QueryDocumentSnapshot should exist'\n );\n return data;\n }\n }\n}\n\nexport class Query<T = PublicDocumentData>\n implements PublicQuery<T>, Compat<ExpQuery<T>>\n{\n private readonly _userDataWriter: UserDataWriter;\n\n constructor(readonly firestore: Firestore, readonly _delegate: ExpQuery<T>) {\n this._userDataWriter = new UserDataWriter(firestore);\n }\n\n where(\n fieldPath: string | _FieldPath,\n opStr: PublicWhereFilterOp,\n value: unknown\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, where(fieldPath as string, opStr, value))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n orderBy(\n fieldPath: string | _FieldPath,\n directionStr?: PublicOrderByDirection\n ): Query<T> {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query<T>(\n this.firestore,\n query(this._delegate, orderBy(fieldPath as string, directionStr))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n /(orderBy|where)\\(\\)/,\n 'Query.$1()'\n );\n }\n }\n\n limit(n: number): Query<T> {\n try {\n return new Query<T>(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'limit()', 'Query.limit()');\n }\n }\n\n limitToLast(n: number): Query<T> {\n try {\n return new Query<T>(\n this.firestore,\n query(this._delegate, limitToLast(n))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'limitToLast()',\n 'Query.limitToLast()'\n );\n }\n }\n\n startAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'startAt()', 'Query.startAt()');\n }\n }\n\n startAfter(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, startAfter(...args))\n );\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'startAfter()',\n 'Query.startAfter()'\n );\n }\n }\n\n endBefore(...args: any[]): Query<T> {\n try {\n return new Query(\n this.firestore,\n query(this._delegate, endBefore(...args))\n );\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endBefore()', 'Query.endBefore()');\n }\n }\n\n endAt(...args: any[]): Query<T> {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e as Error, 'endAt()', 'Query.endAt()');\n }\n }\n\n isEqual(other: PublicQuery<T>): boolean {\n return queryEqual(this._delegate, (other as Query<T>)._delegate);\n }\n\n get(options?: PublicGetOptions): Promise<QuerySnapshot<T>> {\n let query: Promise<ExpQuerySnapshot<T>>;\n if (options?.source === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if (options?.source === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(\n result =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n result._snapshot\n )\n )\n );\n }\n\n onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n observer: PartialObserver<PublicQuerySnapshot<T>>\n ): Unsubscribe;\n onSnapshot(\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n onSnapshot(\n options: PublicSnapshotListenOptions,\n onNext: NextFn<PublicQuerySnapshot<T>>,\n onError?: ErrorFn,\n onCompletion?: CompleteFn\n ): Unsubscribe;\n\n onSnapshot(...args: unknown[]): Unsubscribe {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver<QuerySnapshot<T>, ExpQuerySnapshot<T>>(\n args,\n snap =>\n new QuerySnapshot(\n this.firestore,\n new ExpQuerySnapshot<T>(\n this.firestore._delegate,\n this._userDataWriter,\n this._delegate,\n snap._snapshot\n )\n )\n );\n return onSnapshot(this._delegate, options, observer);\n }\n\n withConverter(converter: null): Query<PublicDocumentData>;\n withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): Query<U> {\n return new Query<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpQuery<U>)\n );\n }\n}\n\nexport class DocumentChange<T = PublicDocumentData>\n implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>>\n{\n constructor(\n private readonly _firestore: Firestore,\n readonly _delegate: ExpDocumentChange<T>\n ) {}\n\n get type(): PublicDocumentChangeType {\n return this._delegate.type;\n }\n\n get doc(): QueryDocumentSnapshot<T> {\n return new QueryDocumentSnapshot<T>(this._firestore, this._delegate.doc);\n }\n\n get oldIndex(): number {\n return this._delegate.oldIndex;\n }\n\n get newIndex(): number {\n return this._delegate.newIndex;\n }\n}\n\nexport class QuerySnapshot<T = PublicDocumentData>\n implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>>\n{\n constructor(\n readonly _firestore: Firestore,\n readonly _delegate: ExpQuerySnapshot<T>\n ) {}\n\n get query(): Query<T> {\n return new Query(this._firestore, this._delegate.query);\n }\n\n get metadata(): SnapshotMetadata {\n return this._delegate.metadata;\n }\n\n get size(): number {\n return this._delegate.size;\n }\n\n get empty(): boolean {\n return this._delegate.empty;\n }\n\n get docs(): Array<QueryDocumentSnapshot<T>> {\n return this._delegate.docs.map(\n doc => new QueryDocumentSnapshot<T>(this._firestore, doc)\n );\n }\n\n docChanges(\n options?: PublicSnapshotListenOptions\n ): Array<PublicDocumentChange<T>> {\n return this._delegate\n .docChanges(options)\n .map(docChange => new DocumentChange<T>(this._firestore, docChange));\n }\n\n forEach(\n callback: (result: QueryDocumentSnapshot<T>) => void,\n thisArg?: unknown\n ): void {\n this._delegate.forEach(snapshot => {\n callback.call(\n thisArg,\n new QueryDocumentSnapshot(this._firestore, snapshot)\n );\n });\n }\n\n isEqual(other: QuerySnapshot<T>): boolean {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\n\nexport class CollectionReference<T = PublicDocumentData>\n extends Query<T>\n implements PublicCollectionReference<T>\n{\n constructor(\n readonly firestore: Firestore,\n readonly _delegate: ExpCollectionReference<T>\n ) {\n super(firestore, _delegate);\n }\n\n get id(): string {\n return this._delegate.id;\n }\n\n get path(): string {\n return this._delegate.path;\n }\n\n get parent(): DocumentReference<PublicDocumentData> | null {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n\n doc(documentPath?: string): DocumentReference<T> {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(\n this.firestore,\n doc(this._delegate, documentPath)\n );\n }\n } catch (e) {\n throw replaceFunctionName(\n e as Error,\n 'doc()',\n 'CollectionReference.doc()'\n );\n }\n }\n\n add(data: T): Promise<DocumentReference<T>> {\n return addDoc(this._delegate, data as WithFieldValue<T>).then(\n docRef => new DocumentReference(this.firestore, docRef)\n );\n }\n\n isEqual(other: CollectionReference<T>): boolean {\n return refEqual(this._delegate, other._delegate);\n }\n\n withConverter(converter: null): CollectionReference<PublicDocumentData>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U>\n ): CollectionReference<U>;\n withConverter<U>(\n converter: PublicFirestoreDataConverter<U> | null\n ): CollectionReference<U> {\n return new CollectionReference<U>(\n this.firestore,\n converter\n ? this._delegate.withConverter(\n FirestoreDataConverter.getInstance(this.firestore, converter)\n )\n : (this._delegate.withConverter(null) as ExpCollectionReference<U>)\n );\n }\n}\n\nfunction castReference<T>(\n documentRef: PublicDocumentReference<T>\n): ExpDocumentReference<T> {\n return _cast<ExpDocumentReference<T>>(documentRef, ExpDocumentReference);\n}\n","/**\n * @license\n * Copyright 2017 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 {\n FieldPath as ExpFieldPath,\n _FieldPath as InternalFieldPath\n} from '@firebase/firestore';\nimport { FieldPath as PublicFieldPath } from '@firebase/firestore-types';\nimport { Compat, getModularInstance } from '@firebase/util';\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a list\n * of field names (referring to a nested field in the document).\n */\nexport class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> {\n readonly _delegate: ExpFieldPath;\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames - A list of field names.\n */\n constructor(...fieldNames: string[]) {\n this._delegate = new ExpFieldPath(...fieldNames);\n }\n\n static documentId(): FieldPath {\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n return new FieldPath(InternalFieldPath.keyField().canonicalString());\n }\n\n isEqual(other: PublicFieldPath): boolean {\n other = getModularInstance(other);\n\n if (!(other instanceof ExpFieldPath)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n","/**\n * @license\n * Copyright 2017 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 {\n arrayRemove,\n arrayUnion,\n deleteField,\n FieldValue as FieldValue1,\n increment,\n serverTimestamp\n} from '@firebase/firestore';\nimport { FieldValue as PublicFieldValue } from '@firebase/firestore-types';\nimport { Compat } from '@firebase/util';\n\nexport class FieldValue implements PublicFieldValue, Compat<FieldValue1> {\n static serverTimestamp(): FieldValue {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n\n static delete(): FieldValue {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n\n static arrayUnion(...elements: unknown[]): FieldValue {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n\n static arrayRemove(...elements: unknown[]): FieldValue {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n\n static increment(n: number): FieldValue {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n\n constructor(readonly _delegate: FieldValue1) {}\n\n isEqual(other: FieldValue): boolean {\n return this._delegate.isEqual(other._delegate);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { FirebaseApp } from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport { Component, ComponentType } from '@firebase/component';\nimport {\n Firestore as ModularFirestore,\n CACHE_SIZE_UNLIMITED,\n GeoPoint,\n Timestamp\n} from '@firebase/firestore';\n\nimport { Blob } from './api/blob';\nimport {\n Firestore,\n Transaction,\n CollectionReference,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n WriteBatch,\n setLogLevel\n} from './api/database';\nimport { FieldPath } from './api/field_path';\nimport { FieldValue } from './api/field_value';\n\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\nexport function configureForFirebase(\n firebase: FirebaseNamespace,\n firestoreFactory: (\n app: FirebaseApp,\n firestoreExp: ModularFirestore\n ) => Firestore\n): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'firestore-compat',\n container => {\n const app = container.getProvider('app-compat').getImmediate()!;\n const firestoreExp = container.getProvider('firestore').getImmediate()!;\n return firestoreFactory(app, firestoreExp);\n },\n 'PUBLIC' as ComponentType.PUBLIC\n ).setServiceProps({ ...firestoreNamespace })\n );\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport firebase from '@firebase/app-compat';\nimport { FirebaseNamespace } from '@firebase/app-types';\n\nimport { name, version } from '../package.json';\n\nimport { Firestore, IndexedDbPersistenceProvider } from './api/database';\nimport { configureForFirebase } from './config';\n\n/**\n * Registers the main Firestore Node build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\nexport function registerFirestore(instance: FirebaseNamespace): void {\n configureForFirebase(\n instance,\n (app, firestoreExp) =>\n new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider())\n );\n instance.registerVersion(name, version, 'node');\n}\n\nregisterFirestore(firebase as unknown as FirebaseNamespace);\n"],"names":["ExpWriteBatch","setClientLogLevel","ExpDocumentSnapshot","ExpQueryDocumentSnapshot","ExpDocumentReference","ExpQuerySnapshot","ExpFieldPath","InternalFieldPath"],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAKa,SAAA,kBAAkB,CAChC,UAAkB,EAClB,OAA+B,EAAA;AAE/B,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,OAAO;AACL,YAAA,KAAK,EAAE,KAAK;SACb,CAAC;KACH;AAED,IAAA,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE;AACpE,QAAA,MAAM,IAAI,cAAc,CACtB,kBAAkB,EAClB,CAAA,mCAAA,EAAsC,UAAU,CAAiB,eAAA,CAAA;AAC/D,YAAA,yCAAyC,CAC5C,CAAC;KACH;AAED,IAAA,OAAO,OAAO,CAAC;AACjB;;ACvCA;;;;;;;;;;;;;;;AAeG;AAKH;AACA,SAAS,yBAAyB,GAAA;AAChC,IAAA,IAAI,OAAO,UAAU,KAAK,WAAW,EAAE;AACrC,QAAA,MAAM,IAAI,cAAc,CACtB,eAAe,EACf,oDAAoD,CACrD,CAAC;KACH;AACH,CAAC;AAED;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,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,iBAAiB,CAAC,QAAwC,CAAC;;;;"}
\ No newline at end of file diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/package.json b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/package.json deleted file mode 100644 index 7c34deb..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"}
\ No newline at end of file diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/blob.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/blob.d.ts deleted file mode 100644 index 10d532d..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/blob.d.ts +++ /dev/null @@ -1,29 +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. - */ -import { Bytes } from '@firebase/firestore'; -import { Compat } from '@firebase/util'; -/** Immutable class holding a blob (binary data) */ -export declare class Blob implements Compat<Bytes> { - readonly _delegate: Bytes; - constructor(_delegate: Bytes); - static fromBase64String(base64: string): Blob; - static fromUint8Array(array: Uint8Array): Blob; - toBase64(): string; - toUint8Array(): Uint8Array; - isEqual(other: Blob): boolean; - toString(): string; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/database.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/database.d.ts deleted file mode 100644 index 403e63b..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/database.d.ts +++ /dev/null @@ -1,228 +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. - */ -import { FirebaseApp } from '@firebase/app-types'; -import { FirebaseService } from '@firebase/app-types/private'; -import { LoadBundleTask, Firestore as ExpFirestore, Query as ExpQuery, CollectionReference as ExpCollectionReference, DocumentReference as ExpDocumentReference, Unsubscribe, DocumentChange as ExpDocumentChange, DocumentSnapshot as ExpDocumentSnapshot, QuerySnapshot as ExpQuerySnapshot, SnapshotMetadata, Transaction as ExpTransaction, WriteBatch as ExpWriteBatch, AbstractUserDataWriter, FirestoreDataConverter as ModularFirestoreDataConverter, _DatabaseId, _DocumentKey, _FieldPath, _ResourcePath, _ByteString } from '@firebase/firestore'; -import { CollectionReference as PublicCollectionReference, DocumentChange as PublicDocumentChange, DocumentChangeType as PublicDocumentChangeType, DocumentData, DocumentData as PublicDocumentData, DocumentReference as PublicDocumentReference, DocumentSnapshot as PublicDocumentSnapshot, FieldPath as PublicFieldPath, FirebaseFirestore as PublicFirestore, FirestoreDataConverter as PublicFirestoreDataConverter, GetOptions as PublicGetOptions, LogLevel as PublicLogLevel, OrderByDirection as PublicOrderByDirection, PersistenceSettings as PublicPersistenceSettings, Query as PublicQuery, QueryDocumentSnapshot as PublicQueryDocumentSnapshot, QuerySnapshot as PublicQuerySnapshot, SetOptions as PublicSetOptions, Settings as PublicSettings, SnapshotListenOptions as PublicSnapshotListenOptions, SnapshotOptions as PublicSnapshotOptions, Transaction as PublicTransaction, UpdateData as PublicUpdateData, WhereFilterOp as PublicWhereFilterOp, WriteBatch as PublicWriteBatch } from '@firebase/firestore-types'; -import { Compat, EmulatorMockTokenOptions } from '@firebase/util'; -import { Blob } from './blob'; -import { CompleteFn, ErrorFn, NextFn, PartialObserver } from './observer'; -/** - * A persistence provider for either memory-only or IndexedDB persistence. - * Mainly used to allow optional inclusion of IndexedDB code. - */ -export interface PersistenceProvider { - enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>; - enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>; - clearIndexedDbPersistence(firestore: Firestore): Promise<void>; -} -/** - * The persistence provider included with the full Firestore SDK. - */ -export declare class IndexedDbPersistenceProvider implements PersistenceProvider { - enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>; - enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>; - clearIndexedDbPersistence(firestore: Firestore): Promise<void>; -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -export declare class Firestore implements PublicFirestore, FirebaseService, Compat<ExpFirestore> { - readonly _delegate: ExpFirestore; - private _persistenceProvider; - _appCompat?: FirebaseApp; - constructor(databaseIdOrApp: _DatabaseId | FirebaseApp, _delegate: ExpFirestore, _persistenceProvider: PersistenceProvider); - get _databaseId(): _DatabaseId; - settings(settingsLiteral: PublicSettings): void; - useEmulator(host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; - }): void; - enableNetwork(): Promise<void>; - disableNetwork(): Promise<void>; - enablePersistence(settings?: PublicPersistenceSettings): Promise<void>; - clearPersistence(): Promise<void>; - terminate(): Promise<void>; - waitForPendingWrites(): Promise<void>; - onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe; - onSnapshotsInSync(onSync: () => void): Unsubscribe; - get app(): FirebaseApp; - INTERNAL: { - delete: () => Promise<void>; - }; - collection(pathString: string): PublicCollectionReference; - doc(pathString: string): PublicDocumentReference; - collectionGroup(collectionId: string): PublicQuery; - runTransaction<T>(updateFunction: (transaction: PublicTransaction) => Promise<T>): Promise<T>; - batch(): PublicWriteBatch; - loadBundle(bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string): LoadBundleTask; - namedQuery(name: string): Promise<PublicQuery<DocumentData> | null>; -} -export declare class UserDataWriter extends AbstractUserDataWriter { - protected firestore: Firestore; - constructor(firestore: Firestore); - protected convertBytes(bytes: _ByteString): Blob; - protected convertReference(name: string): DocumentReference; -} -export declare function setLogLevel(level: PublicLogLevel): void; -/** - * A reference to a transaction. - */ -export declare class Transaction implements PublicTransaction, Compat<ExpTransaction> { - private readonly _firestore; - readonly _delegate: ExpTransaction; - private _userDataWriter; - constructor(_firestore: Firestore, _delegate: ExpTransaction); - get<T>(documentRef: PublicDocumentReference<T>): Promise<PublicDocumentSnapshot<T>>; - set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: PublicSetOptions): Transaction; - set<T>(documentRef: DocumentReference<T>, data: T): Transaction; - update(documentRef: PublicDocumentReference<unknown>, data: PublicUpdateData): Transaction; - update(documentRef: PublicDocumentReference<unknown>, field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Transaction; - delete(documentRef: PublicDocumentReference<unknown>): Transaction; -} -export declare class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> { - readonly _delegate: ExpWriteBatch; - constructor(_delegate: ExpWriteBatch); - set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: PublicSetOptions): WriteBatch; - set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch; - update(documentRef: PublicDocumentReference<unknown>, data: PublicUpdateData): WriteBatch; - update(documentRef: PublicDocumentReference<unknown>, field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; - delete(documentRef: PublicDocumentReference<unknown>): WriteBatch; - commit(): Promise<void>; -} -/** - * A reference to a particular document in a collection in the database. - */ -export declare class DocumentReference<T = PublicDocumentData> implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>> { - readonly firestore: Firestore; - readonly _delegate: ExpDocumentReference<T>; - private _userDataWriter; - constructor(firestore: Firestore, _delegate: ExpDocumentReference<T>); - static forPath<U>(path: _ResourcePath, firestore: Firestore, converter: ModularFirestoreDataConverter<U> | null): DocumentReference<U>; - static forKey<U>(key: _DocumentKey, firestore: Firestore, converter: ModularFirestoreDataConverter<U> | null): DocumentReference<U>; - get id(): string; - get parent(): PublicCollectionReference<T>; - get path(): string; - collection(pathString: string): PublicCollectionReference<PublicDocumentData>; - isEqual(other: PublicDocumentReference<T>): boolean; - set(value: Partial<T>, options: PublicSetOptions): Promise<void>; - set(value: T): Promise<void>; - update(value: PublicUpdateData): Promise<void>; - update(field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>; - delete(): Promise<void>; - onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe; - onSnapshot(onNext: NextFn<PublicDocumentSnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, onNext: NextFn<PublicDocumentSnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>>; - withConverter(converter: null): PublicDocumentReference<PublicDocumentData>; - withConverter<U>(converter: PublicFirestoreDataConverter<U>): PublicDocumentReference<U>; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -export declare function extractSnapshotOptions(args: unknown[]): PublicSnapshotListenOptions; -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -export declare function wrapObserver<CompatType, ExpType>(args: unknown[], wrapper: (val: ExpType) => CompatType): PartialObserver<ExpType>; -/** - * Options interface that can be provided to configure the deserialization of - * DocumentSnapshots. - */ -export interface SnapshotOptions extends PublicSnapshotOptions { -} -export declare class DocumentSnapshot<T = PublicDocumentData> implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>> { - private readonly _firestore; - readonly _delegate: ExpDocumentSnapshot<T>; - constructor(_firestore: Firestore, _delegate: ExpDocumentSnapshot<T>); - get ref(): DocumentReference<T>; - get id(): string; - get metadata(): SnapshotMetadata; - get exists(): boolean; - data(options?: PublicSnapshotOptions): T | undefined; - get(fieldPath: string | PublicFieldPath, options?: PublicSnapshotOptions): any; - isEqual(other: DocumentSnapshot<T>): boolean; -} -export declare class QueryDocumentSnapshot<T = PublicDocumentData> extends DocumentSnapshot<T> implements PublicQueryDocumentSnapshot<T> { - data(options?: PublicSnapshotOptions): T; -} -export declare class Query<T = PublicDocumentData> implements PublicQuery<T>, Compat<ExpQuery<T>> { - readonly firestore: Firestore; - readonly _delegate: ExpQuery<T>; - private readonly _userDataWriter; - constructor(firestore: Firestore, _delegate: ExpQuery<T>); - where(fieldPath: string | _FieldPath, opStr: PublicWhereFilterOp, value: unknown): Query<T>; - orderBy(fieldPath: string | _FieldPath, directionStr?: PublicOrderByDirection): Query<T>; - limit(n: number): Query<T>; - limitToLast(n: number): Query<T>; - startAt(...args: any[]): Query<T>; - startAfter(...args: any[]): Query<T>; - endBefore(...args: any[]): Query<T>; - endAt(...args: any[]): Query<T>; - isEqual(other: PublicQuery<T>): boolean; - get(options?: PublicGetOptions): Promise<QuerySnapshot<T>>; - onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe; - onSnapshot(onNext: NextFn<PublicQuerySnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, onNext: NextFn<PublicQuerySnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - withConverter(converter: null): Query<PublicDocumentData>; - withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>; -} -export declare class DocumentChange<T = PublicDocumentData> implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>> { - private readonly _firestore; - readonly _delegate: ExpDocumentChange<T>; - constructor(_firestore: Firestore, _delegate: ExpDocumentChange<T>); - get type(): PublicDocumentChangeType; - get doc(): QueryDocumentSnapshot<T>; - get oldIndex(): number; - get newIndex(): number; -} -export declare class QuerySnapshot<T = PublicDocumentData> implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>> { - readonly _firestore: Firestore; - readonly _delegate: ExpQuerySnapshot<T>; - constructor(_firestore: Firestore, _delegate: ExpQuerySnapshot<T>); - get query(): Query<T>; - get metadata(): SnapshotMetadata; - get size(): number; - get empty(): boolean; - get docs(): Array<QueryDocumentSnapshot<T>>; - docChanges(options?: PublicSnapshotListenOptions): Array<PublicDocumentChange<T>>; - forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void; - isEqual(other: QuerySnapshot<T>): boolean; -} -export declare class CollectionReference<T = PublicDocumentData> extends Query<T> implements PublicCollectionReference<T> { - readonly firestore: Firestore; - readonly _delegate: ExpCollectionReference<T>; - constructor(firestore: Firestore, _delegate: ExpCollectionReference<T>); - get id(): string; - get path(): string; - get parent(): DocumentReference<PublicDocumentData> | null; - doc(documentPath?: string): DocumentReference<T>; - add(data: T): Promise<DocumentReference<T>>; - isEqual(other: CollectionReference<T>): boolean; - withConverter(converter: null): CollectionReference<PublicDocumentData>; - withConverter<U>(converter: PublicFirestoreDataConverter<U>): CollectionReference<U>; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/field_path.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/field_path.d.ts deleted file mode 100644 index 1602ad7..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/field_path.d.ts +++ /dev/null @@ -1,36 +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. - */ -import { FieldPath as ExpFieldPath } from '@firebase/firestore'; -import { FieldPath as PublicFieldPath } from '@firebase/firestore-types'; -import { Compat } from '@firebase/util'; -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -export declare class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> { - readonly _delegate: ExpFieldPath; - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames: string[]); - static documentId(): FieldPath; - isEqual(other: PublicFieldPath): boolean; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/field_value.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/field_value.d.ts deleted file mode 100644 index 69110a9..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/field_value.d.ts +++ /dev/null @@ -1,29 +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. - */ -import { FieldValue as FieldValue1 } from '@firebase/firestore'; -import { FieldValue as PublicFieldValue } from '@firebase/firestore-types'; -import { Compat } from '@firebase/util'; -export declare class FieldValue implements PublicFieldValue, Compat<FieldValue1> { - readonly _delegate: FieldValue1; - static serverTimestamp(): FieldValue; - static delete(): FieldValue; - static arrayUnion(...elements: unknown[]): FieldValue; - static arrayRemove(...elements: unknown[]): FieldValue; - static increment(n: number): FieldValue; - constructor(_delegate: FieldValue1); - isEqual(other: FieldValue): boolean; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/geo_point.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/geo_point.d.ts deleted file mode 100644 index 39cb546..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/geo_point.d.ts +++ /dev/null @@ -1,17 +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 { GeoPoint } from '@firebase/firestore'; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/observer.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/observer.d.ts deleted file mode 100644 index a59ec68..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/observer.d.ts +++ /dev/null @@ -1,29 +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. - */ -import { FirestoreError } from '@firebase/firestore'; -/** - * Observer/Subscribe interfaces. - */ -export type NextFn<T> = (value: T) => void; -export type ErrorFn = (error: FirestoreError) => void; -export type CompleteFn = () => void; -export interface PartialObserver<T> { - next?: NextFn<T>; - error?: ErrorFn; - complete?: CompleteFn; -} -export declare function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T>; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/timestamp.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/timestamp.d.ts deleted file mode 100644 index 2758926..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/api/timestamp.d.ts +++ /dev/null @@ -1,17 +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 { Timestamp } from '@firebase/firestore'; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/config.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/config.d.ts deleted file mode 100644 index f1b045a..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/config.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @license - * Copyright 2021 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 { FirebaseApp } from '@firebase/app-compat'; -import { FirebaseNamespace } from '@firebase/app-types'; -import { Firestore as ModularFirestore } from '@firebase/firestore'; -import { Firestore } from './api/database'; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -export declare function configureForFirebase(firebase: FirebaseNamespace, firestoreFactory: (app: FirebaseApp, firestoreExp: ModularFirestore) => Firestore): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.console.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.console.d.ts deleted file mode 100644 index efb8b31..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.console.d.ts +++ /dev/null @@ -1,48 +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 { FirebaseAuthInternalName } from '@firebase/auth-interop-types'; -import { Provider } from '@firebase/component'; -import { Query as ExpQuery } from '@firebase/firestore'; -import { Compat } from '@firebase/util'; -import { Firestore as FirestoreCompat, PersistenceProvider } from './api/database'; -export { CollectionReference, DocumentReference, DocumentSnapshot, QuerySnapshot } from './api/database'; -export { Blob } from './api/blob'; -export { GeoPoint } from './api/geo_point'; -export { FieldPath } from './api/field_path'; -export { FieldValue } from './api/field_value'; -export { Timestamp } from './api/timestamp'; -export interface FirestoreDatabase { - projectId: string; - database?: string; -} -/** - * The persistence provider included with the memory-only SDK. This provider - * errors for all attempts to access persistence. - */ -export declare class MemoryPersistenceProvider implements PersistenceProvider { - enableIndexedDbPersistence(firestore: FirestoreCompat, forceOwnership: boolean): Promise<void>; - enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>; - clearIndexedDbPersistence(firestore: Firestore): Promise<void>; -} -/** Firestore class that exposes the constructor expected by the Console. */ -export declare class Firestore extends FirestoreCompat { - constructor(firestoreDatabase: FirestoreDatabase, authProvider: Provider<FirebaseAuthInternalName>); - INTERNAL: { - delete: () => Promise<void>; - count: (query: Compat<ExpQuery<unknown>>) => Promise<number>; - }; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.d.ts deleted file mode 100644 index 9c5dcda..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @license - * Copyright 2020 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 type { FirebaseNamespace } from '@firebase/app-types'; -import * as types from '@firebase/firestore-types'; -import './register-module'; -/** - * Registers the main Firestore build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -export declare function registerFirestore(instance: FirebaseNamespace): void; -declare module '@firebase/app-compat' { - interface FirebaseNamespace { - firestore: { - (app?: FirebaseApp): types.FirebaseFirestore; - Blob: typeof types.Blob; - CollectionReference: typeof types.CollectionReference; - DocumentReference: typeof types.DocumentReference; - DocumentSnapshot: typeof types.DocumentSnapshot; - FieldPath: typeof types.FieldPath; - FieldValue: typeof types.FieldValue; - Firestore: typeof types.FirebaseFirestore; - GeoPoint: typeof types.GeoPoint; - Query: typeof types.Query; - QueryDocumentSnapshot: typeof types.QueryDocumentSnapshot; - QuerySnapshot: typeof types.QuerySnapshot; - Timestamp: typeof types.Timestamp; - Transaction: typeof types.Transaction; - WriteBatch: typeof types.WriteBatch; - setLogLevel: typeof types.setLogLevel; - }; - } - interface FirebaseApp { - firestore?(): types.FirebaseFirestore; - } -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.node.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.node.d.ts deleted file mode 100644 index bfd630e..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.node.d.ts +++ /dev/null @@ -1,22 +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. - */ -import { FirebaseNamespace } from '@firebase/app-types'; -/** - * Registers the main Firestore Node build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -export declare function registerFirestore(instance: FirebaseNamespace): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.rn.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.rn.d.ts deleted file mode 100644 index 33714dc..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/index.rn.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license - * Copyright 2020 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 { FirebaseNamespace } from '@firebase/app-types'; -/** - * Registers the main Firestore ReactNative build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -export declare function registerFirestore(instance: FirebaseNamespace): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/register-module.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/register-module.d.ts deleted file mode 100644 index 2364be3..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/register-module.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @license - * Copyright 2020 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 * as types from '@firebase/firestore-types'; -declare module '@firebase/app-compat' { - interface FirebaseNamespace { - firestore: { - (app?: FirebaseApp): types.FirebaseFirestore; - Blob: typeof types.Blob; - CollectionReference: typeof types.CollectionReference; - DocumentReference: typeof types.DocumentReference; - DocumentSnapshot: typeof types.DocumentSnapshot; - FieldPath: typeof types.FieldPath; - FieldValue: typeof types.FieldValue; - Firestore: typeof types.FirebaseFirestore; - GeoPoint: typeof types.GeoPoint; - Query: typeof types.Query; - QueryDocumentSnapshot: typeof types.QueryDocumentSnapshot; - QuerySnapshot: typeof types.QuerySnapshot; - Timestamp: typeof types.Timestamp; - Transaction: typeof types.Transaction; - WriteBatch: typeof types.WriteBatch; - setLogLevel: typeof types.setLogLevel; - }; - } - interface FirebaseApp { - firestore?(): types.FirebaseFirestore; - } -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/util/input_validation.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/util/input_validation.d.ts deleted file mode 100644 index 23469ed..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/src/util/input_validation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2021 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 { SetOptions } from '@firebase/firestore-types'; -export declare function validateSetOptions(methodName: string, options: SetOptions | undefined): SetOptions; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/array_transforms.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/array_transforms.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/array_transforms.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/batch_writes.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/batch_writes.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/batch_writes.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/bootstrap.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/bootstrap.d.ts deleted file mode 100644 index 6785ce9..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/bootstrap.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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 '../src/index'; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/bundle.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/bundle.test.d.ts deleted file mode 100644 index a84d7e7..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/bundle.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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 encoder: TextEncoder; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/cursor.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/cursor.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/cursor.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/database.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/database.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/database.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/fields.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/fields.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/fields.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/get_options.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/get_options.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/get_options.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/numeric_transforms.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/numeric_transforms.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/numeric_transforms.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/query.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/query.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/query.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/server_timestamp.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/server_timestamp.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/server_timestamp.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/smoke.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/smoke.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/smoke.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/transactions.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/transactions.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/transactions.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/type.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/type.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/type.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/node-esm/test/util/equality_matcher.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/equality_matcher.d.ts deleted file mode 100644 index 57994ad..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/equality_matcher.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @license - * Copyright 2022 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. - */ -/** - * Duck-typed interface for objects that have an isEqual() method. - * - * Note: This is copied from src/util/misc.ts to avoid importing private types. - */ -export interface Equatable<T> { - isEqual(other: T): boolean; -} -/** - * Custom equals override for types that have a free-standing equals functions - * (such as `queryEquals()`). - */ -export interface CustomMatcher<T> { - equalsFn: (left: T, right: T) => boolean; - forType: Function; -} -export declare function addEqualityMatcher(...customMatchers: Array<CustomMatcher<any>>): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/events_accumulator.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/events_accumulator.d.ts deleted file mode 100644 index 7205365..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/events_accumulator.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @license - * Copyright 2022 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 * as firestore from '@firebase/firestore-types'; -/** - * A helper object that can accumulate an arbitrary amount of events and resolve - * a promise when expected number has been emitted. - */ -export declare class EventsAccumulator<T extends firestore.DocumentSnapshot | firestore.QuerySnapshot> { - private events; - private waitingFor; - private deferred; - private rejectAdditionalEvents; - storeEvent: (evt: T) => void; - awaitEvents(length: number): Promise<T[]>; - awaitEvent(): Promise<T>; - /** Waits for a latency compensated local snapshot. */ - awaitLocalEvent(): Promise<T>; - /** Waits for multiple latency compensated local snapshot. */ - awaitLocalEvents(count: number): Promise<T[]>; - /** Waits for a snapshot that has no pending writes */ - awaitRemoteEvent(): Promise<T>; - assertNoAdditionalEvents(): Promise<void>; - allowAdditionalEvents(): void; - private checkFulfilled; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/firebase_export.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/firebase_export.d.ts deleted file mode 100644 index 8db0ed3..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/firebase_export.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Copyright 2022 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 { FirebaseApp } from '@firebase/app-types'; -import { GeoPoint, Timestamp } from '@firebase/firestore'; -import * as firestore from '@firebase/firestore-types'; -import { Blob } from '../../src/api/blob'; -import { Firestore, DocumentReference, QueryDocumentSnapshot } from '../../src/api/database'; -import { FieldPath } from '../../src/api/field_path'; -import { FieldValue } from '../../src/api/field_value'; -/** - * Creates a new test instance of Firestore using either firebase.firestore() - * or `initializeFirestore` from the modular API. - */ -export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: firestore.Settings): firestore.FirebaseFirestore; -export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint, DocumentReference, QueryDocumentSnapshot }; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/helpers.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/helpers.d.ts deleted file mode 100644 index 38cf3fc..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/helpers.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @license - * Copyright 2022 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 * as firestore from '@firebase/firestore-types'; -export declare function isPersistenceAvailable(): boolean; -type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void; -interface ApiDescribe { - (message: string, testSuite: (persistence: boolean) => void): void; - skip: ApiSuiteFunction; - only: ApiSuiteFunction; -} -export declare const apiDescribe: ApiDescribe; -/** Converts the documents in a QuerySnapshot to an array with the data of each document. */ -export declare function toDataArray(docSet: firestore.QuerySnapshot): firestore.DocumentData[]; -/** Converts the changes in a QuerySnapshot to an array with the data of each document. */ -export declare function toChangesArray(docSet: firestore.QuerySnapshot, options?: firestore.SnapshotListenOptions): firestore.DocumentData[]; -export declare function toDataMap(docSet: firestore.QuerySnapshot): { - [field: string]: firestore.DocumentData; -}; -/** Converts a DocumentSet to an array with the id of each document */ -export declare function toIds(docSet: firestore.QuerySnapshot): string[]; -export declare function withTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>; -/** Runs provided fn with a db for an alternate project id. */ -export declare function withAlternateTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>; -export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>; -export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: firestore.Settings, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>; -export declare function withTestDoc(persistence: boolean, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>; -export declare function withTestDocAndSettings(persistence: boolean, settings: firestore.Settings, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>; -export declare function withTestDocAndInitialData(persistence: boolean, initialData: firestore.DocumentData | null, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>; -export declare function withTestCollection(persistence: boolean, docs: { - [key: string]: firestore.DocumentData; -}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>; -export declare function withTestCollectionSettings(persistence: boolean, settings: firestore.Settings, docs: { - [key: string]: firestore.DocumentData; -}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>; -export {}; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/promise.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/promise.d.ts deleted file mode 100644 index 0826bce..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/promise.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @license - * Copyright 2022 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 interface Resolver<R> { - (value: R | Promise<R>): void; -} -export interface Rejecter { - (reason?: Error): void; -} -export declare class Deferred<R> { - promise: Promise<R>; - resolve: Resolver<R>; - reject: Rejecter; - constructor(); -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/settings.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/settings.d.ts deleted file mode 100644 index 0b8cfb6..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/util/settings.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2022 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 USE_EMULATOR: boolean; -export declare const DEFAULT_SETTINGS: { - host: string; - ssl: boolean; -}; -export declare const DEFAULT_PROJECT_ID: any; -export declare const ALT_PROJECT_ID = "test-db2"; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/validation.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/validation.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/node-esm/test/validation.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/src/api/blob.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/blob.d.ts deleted file mode 100644 index 10d532d..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/blob.d.ts +++ /dev/null @@ -1,29 +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. - */ -import { Bytes } from '@firebase/firestore'; -import { Compat } from '@firebase/util'; -/** Immutable class holding a blob (binary data) */ -export declare class Blob implements Compat<Bytes> { - readonly _delegate: Bytes; - constructor(_delegate: Bytes); - static fromBase64String(base64: string): Blob; - static fromUint8Array(array: Uint8Array): Blob; - toBase64(): string; - toUint8Array(): Uint8Array; - isEqual(other: Blob): boolean; - toString(): string; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/database.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/database.d.ts deleted file mode 100644 index 403e63b..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/database.d.ts +++ /dev/null @@ -1,228 +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. - */ -import { FirebaseApp } from '@firebase/app-types'; -import { FirebaseService } from '@firebase/app-types/private'; -import { LoadBundleTask, Firestore as ExpFirestore, Query as ExpQuery, CollectionReference as ExpCollectionReference, DocumentReference as ExpDocumentReference, Unsubscribe, DocumentChange as ExpDocumentChange, DocumentSnapshot as ExpDocumentSnapshot, QuerySnapshot as ExpQuerySnapshot, SnapshotMetadata, Transaction as ExpTransaction, WriteBatch as ExpWriteBatch, AbstractUserDataWriter, FirestoreDataConverter as ModularFirestoreDataConverter, _DatabaseId, _DocumentKey, _FieldPath, _ResourcePath, _ByteString } from '@firebase/firestore'; -import { CollectionReference as PublicCollectionReference, DocumentChange as PublicDocumentChange, DocumentChangeType as PublicDocumentChangeType, DocumentData, DocumentData as PublicDocumentData, DocumentReference as PublicDocumentReference, DocumentSnapshot as PublicDocumentSnapshot, FieldPath as PublicFieldPath, FirebaseFirestore as PublicFirestore, FirestoreDataConverter as PublicFirestoreDataConverter, GetOptions as PublicGetOptions, LogLevel as PublicLogLevel, OrderByDirection as PublicOrderByDirection, PersistenceSettings as PublicPersistenceSettings, Query as PublicQuery, QueryDocumentSnapshot as PublicQueryDocumentSnapshot, QuerySnapshot as PublicQuerySnapshot, SetOptions as PublicSetOptions, Settings as PublicSettings, SnapshotListenOptions as PublicSnapshotListenOptions, SnapshotOptions as PublicSnapshotOptions, Transaction as PublicTransaction, UpdateData as PublicUpdateData, WhereFilterOp as PublicWhereFilterOp, WriteBatch as PublicWriteBatch } from '@firebase/firestore-types'; -import { Compat, EmulatorMockTokenOptions } from '@firebase/util'; -import { Blob } from './blob'; -import { CompleteFn, ErrorFn, NextFn, PartialObserver } from './observer'; -/** - * A persistence provider for either memory-only or IndexedDB persistence. - * Mainly used to allow optional inclusion of IndexedDB code. - */ -export interface PersistenceProvider { - enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>; - enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>; - clearIndexedDbPersistence(firestore: Firestore): Promise<void>; -} -/** - * The persistence provider included with the full Firestore SDK. - */ -export declare class IndexedDbPersistenceProvider implements PersistenceProvider { - enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>; - enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>; - clearIndexedDbPersistence(firestore: Firestore): Promise<void>; -} -/** - * Compat class for Firestore. Exposes Firestore Legacy API, but delegates - * to the functional API of firestore-exp. - */ -export declare class Firestore implements PublicFirestore, FirebaseService, Compat<ExpFirestore> { - readonly _delegate: ExpFirestore; - private _persistenceProvider; - _appCompat?: FirebaseApp; - constructor(databaseIdOrApp: _DatabaseId | FirebaseApp, _delegate: ExpFirestore, _persistenceProvider: PersistenceProvider); - get _databaseId(): _DatabaseId; - settings(settingsLiteral: PublicSettings): void; - useEmulator(host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; - }): void; - enableNetwork(): Promise<void>; - disableNetwork(): Promise<void>; - enablePersistence(settings?: PublicPersistenceSettings): Promise<void>; - clearPersistence(): Promise<void>; - terminate(): Promise<void>; - waitForPendingWrites(): Promise<void>; - onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe; - onSnapshotsInSync(onSync: () => void): Unsubscribe; - get app(): FirebaseApp; - INTERNAL: { - delete: () => Promise<void>; - }; - collection(pathString: string): PublicCollectionReference; - doc(pathString: string): PublicDocumentReference; - collectionGroup(collectionId: string): PublicQuery; - runTransaction<T>(updateFunction: (transaction: PublicTransaction) => Promise<T>): Promise<T>; - batch(): PublicWriteBatch; - loadBundle(bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string): LoadBundleTask; - namedQuery(name: string): Promise<PublicQuery<DocumentData> | null>; -} -export declare class UserDataWriter extends AbstractUserDataWriter { - protected firestore: Firestore; - constructor(firestore: Firestore); - protected convertBytes(bytes: _ByteString): Blob; - protected convertReference(name: string): DocumentReference; -} -export declare function setLogLevel(level: PublicLogLevel): void; -/** - * A reference to a transaction. - */ -export declare class Transaction implements PublicTransaction, Compat<ExpTransaction> { - private readonly _firestore; - readonly _delegate: ExpTransaction; - private _userDataWriter; - constructor(_firestore: Firestore, _delegate: ExpTransaction); - get<T>(documentRef: PublicDocumentReference<T>): Promise<PublicDocumentSnapshot<T>>; - set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: PublicSetOptions): Transaction; - set<T>(documentRef: DocumentReference<T>, data: T): Transaction; - update(documentRef: PublicDocumentReference<unknown>, data: PublicUpdateData): Transaction; - update(documentRef: PublicDocumentReference<unknown>, field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Transaction; - delete(documentRef: PublicDocumentReference<unknown>): Transaction; -} -export declare class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> { - readonly _delegate: ExpWriteBatch; - constructor(_delegate: ExpWriteBatch); - set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: PublicSetOptions): WriteBatch; - set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch; - update(documentRef: PublicDocumentReference<unknown>, data: PublicUpdateData): WriteBatch; - update(documentRef: PublicDocumentReference<unknown>, field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; - delete(documentRef: PublicDocumentReference<unknown>): WriteBatch; - commit(): Promise<void>; -} -/** - * A reference to a particular document in a collection in the database. - */ -export declare class DocumentReference<T = PublicDocumentData> implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>> { - readonly firestore: Firestore; - readonly _delegate: ExpDocumentReference<T>; - private _userDataWriter; - constructor(firestore: Firestore, _delegate: ExpDocumentReference<T>); - static forPath<U>(path: _ResourcePath, firestore: Firestore, converter: ModularFirestoreDataConverter<U> | null): DocumentReference<U>; - static forKey<U>(key: _DocumentKey, firestore: Firestore, converter: ModularFirestoreDataConverter<U> | null): DocumentReference<U>; - get id(): string; - get parent(): PublicCollectionReference<T>; - get path(): string; - collection(pathString: string): PublicCollectionReference<PublicDocumentData>; - isEqual(other: PublicDocumentReference<T>): boolean; - set(value: Partial<T>, options: PublicSetOptions): Promise<void>; - set(value: T): Promise<void>; - update(value: PublicUpdateData): Promise<void>; - update(field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>; - delete(): Promise<void>; - onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe; - onSnapshot(onNext: NextFn<PublicDocumentSnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, onNext: NextFn<PublicDocumentSnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>>; - withConverter(converter: null): PublicDocumentReference<PublicDocumentData>; - withConverter<U>(converter: PublicFirestoreDataConverter<U>): PublicDocumentReference<U>; -} -/** - * Iterates the list of arguments from an `onSnapshot` call and returns the - * first argument that may be an `SnapshotListenOptions` object. Returns an - * empty object if none is found. - */ -export declare function extractSnapshotOptions(args: unknown[]): PublicSnapshotListenOptions; -/** - * Creates an observer that can be passed to the firestore-exp SDK. The - * observer converts all observed values into the format expected by the classic - * SDK. - * - * @param args - The list of arguments from an `onSnapshot` call. - * @param wrapper - The function that converts the firestore-exp type into the - * type used by this shim. - */ -export declare function wrapObserver<CompatType, ExpType>(args: unknown[], wrapper: (val: ExpType) => CompatType): PartialObserver<ExpType>; -/** - * Options interface that can be provided to configure the deserialization of - * DocumentSnapshots. - */ -export interface SnapshotOptions extends PublicSnapshotOptions { -} -export declare class DocumentSnapshot<T = PublicDocumentData> implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>> { - private readonly _firestore; - readonly _delegate: ExpDocumentSnapshot<T>; - constructor(_firestore: Firestore, _delegate: ExpDocumentSnapshot<T>); - get ref(): DocumentReference<T>; - get id(): string; - get metadata(): SnapshotMetadata; - get exists(): boolean; - data(options?: PublicSnapshotOptions): T | undefined; - get(fieldPath: string | PublicFieldPath, options?: PublicSnapshotOptions): any; - isEqual(other: DocumentSnapshot<T>): boolean; -} -export declare class QueryDocumentSnapshot<T = PublicDocumentData> extends DocumentSnapshot<T> implements PublicQueryDocumentSnapshot<T> { - data(options?: PublicSnapshotOptions): T; -} -export declare class Query<T = PublicDocumentData> implements PublicQuery<T>, Compat<ExpQuery<T>> { - readonly firestore: Firestore; - readonly _delegate: ExpQuery<T>; - private readonly _userDataWriter; - constructor(firestore: Firestore, _delegate: ExpQuery<T>); - where(fieldPath: string | _FieldPath, opStr: PublicWhereFilterOp, value: unknown): Query<T>; - orderBy(fieldPath: string | _FieldPath, directionStr?: PublicOrderByDirection): Query<T>; - limit(n: number): Query<T>; - limitToLast(n: number): Query<T>; - startAt(...args: any[]): Query<T>; - startAfter(...args: any[]): Query<T>; - endBefore(...args: any[]): Query<T>; - endAt(...args: any[]): Query<T>; - isEqual(other: PublicQuery<T>): boolean; - get(options?: PublicGetOptions): Promise<QuerySnapshot<T>>; - onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe; - onSnapshot(onNext: NextFn<PublicQuerySnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - onSnapshot(options: PublicSnapshotListenOptions, onNext: NextFn<PublicQuerySnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe; - withConverter(converter: null): Query<PublicDocumentData>; - withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>; -} -export declare class DocumentChange<T = PublicDocumentData> implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>> { - private readonly _firestore; - readonly _delegate: ExpDocumentChange<T>; - constructor(_firestore: Firestore, _delegate: ExpDocumentChange<T>); - get type(): PublicDocumentChangeType; - get doc(): QueryDocumentSnapshot<T>; - get oldIndex(): number; - get newIndex(): number; -} -export declare class QuerySnapshot<T = PublicDocumentData> implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>> { - readonly _firestore: Firestore; - readonly _delegate: ExpQuerySnapshot<T>; - constructor(_firestore: Firestore, _delegate: ExpQuerySnapshot<T>); - get query(): Query<T>; - get metadata(): SnapshotMetadata; - get size(): number; - get empty(): boolean; - get docs(): Array<QueryDocumentSnapshot<T>>; - docChanges(options?: PublicSnapshotListenOptions): Array<PublicDocumentChange<T>>; - forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void; - isEqual(other: QuerySnapshot<T>): boolean; -} -export declare class CollectionReference<T = PublicDocumentData> extends Query<T> implements PublicCollectionReference<T> { - readonly firestore: Firestore; - readonly _delegate: ExpCollectionReference<T>; - constructor(firestore: Firestore, _delegate: ExpCollectionReference<T>); - get id(): string; - get path(): string; - get parent(): DocumentReference<PublicDocumentData> | null; - doc(documentPath?: string): DocumentReference<T>; - add(data: T): Promise<DocumentReference<T>>; - isEqual(other: CollectionReference<T>): boolean; - withConverter(converter: null): CollectionReference<PublicDocumentData>; - withConverter<U>(converter: PublicFirestoreDataConverter<U>): CollectionReference<U>; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/field_path.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/field_path.d.ts deleted file mode 100644 index 1602ad7..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/field_path.d.ts +++ /dev/null @@ -1,36 +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. - */ -import { FieldPath as ExpFieldPath } from '@firebase/firestore'; -import { FieldPath as PublicFieldPath } from '@firebase/firestore-types'; -import { Compat } from '@firebase/util'; -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a list - * of field names (referring to a nested field in the document). - */ -export declare class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> { - readonly _delegate: ExpFieldPath; - /** - * Creates a FieldPath from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames: string[]); - static documentId(): FieldPath; - isEqual(other: PublicFieldPath): boolean; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/field_value.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/field_value.d.ts deleted file mode 100644 index 69110a9..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/field_value.d.ts +++ /dev/null @@ -1,29 +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. - */ -import { FieldValue as FieldValue1 } from '@firebase/firestore'; -import { FieldValue as PublicFieldValue } from '@firebase/firestore-types'; -import { Compat } from '@firebase/util'; -export declare class FieldValue implements PublicFieldValue, Compat<FieldValue1> { - readonly _delegate: FieldValue1; - static serverTimestamp(): FieldValue; - static delete(): FieldValue; - static arrayUnion(...elements: unknown[]): FieldValue; - static arrayRemove(...elements: unknown[]): FieldValue; - static increment(n: number): FieldValue; - constructor(_delegate: FieldValue1); - isEqual(other: FieldValue): boolean; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/geo_point.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/geo_point.d.ts deleted file mode 100644 index 39cb546..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/geo_point.d.ts +++ /dev/null @@ -1,17 +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 { GeoPoint } from '@firebase/firestore'; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/observer.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/observer.d.ts deleted file mode 100644 index a59ec68..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/observer.d.ts +++ /dev/null @@ -1,29 +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. - */ -import { FirestoreError } from '@firebase/firestore'; -/** - * Observer/Subscribe interfaces. - */ -export type NextFn<T> = (value: T) => void; -export type ErrorFn = (error: FirestoreError) => void; -export type CompleteFn = () => void; -export interface PartialObserver<T> { - next?: NextFn<T>; - error?: ErrorFn; - complete?: CompleteFn; -} -export declare function isPartialObserver<T>(obj: unknown): obj is PartialObserver<T>; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/timestamp.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/timestamp.d.ts deleted file mode 100644 index 2758926..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/api/timestamp.d.ts +++ /dev/null @@ -1,17 +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 { Timestamp } from '@firebase/firestore'; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/config.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/config.d.ts deleted file mode 100644 index f1b045a..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/config.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @license - * Copyright 2021 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 { FirebaseApp } from '@firebase/app-compat'; -import { FirebaseNamespace } from '@firebase/app-types'; -import { Firestore as ModularFirestore } from '@firebase/firestore'; -import { Firestore } from './api/database'; -/** - * Configures Firestore as part of the Firebase SDK by calling registerComponent. - * - * @param firebase - The FirebaseNamespace to register Firestore with - * @param firestoreFactory - A factory function that returns a new Firestore - * instance. - */ -export declare function configureForFirebase(firebase: FirebaseNamespace, firestoreFactory: (app: FirebaseApp, firestoreExp: ModularFirestore) => Firestore): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.console.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.console.d.ts deleted file mode 100644 index efb8b31..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.console.d.ts +++ /dev/null @@ -1,48 +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 { FirebaseAuthInternalName } from '@firebase/auth-interop-types'; -import { Provider } from '@firebase/component'; -import { Query as ExpQuery } from '@firebase/firestore'; -import { Compat } from '@firebase/util'; -import { Firestore as FirestoreCompat, PersistenceProvider } from './api/database'; -export { CollectionReference, DocumentReference, DocumentSnapshot, QuerySnapshot } from './api/database'; -export { Blob } from './api/blob'; -export { GeoPoint } from './api/geo_point'; -export { FieldPath } from './api/field_path'; -export { FieldValue } from './api/field_value'; -export { Timestamp } from './api/timestamp'; -export interface FirestoreDatabase { - projectId: string; - database?: string; -} -/** - * The persistence provider included with the memory-only SDK. This provider - * errors for all attempts to access persistence. - */ -export declare class MemoryPersistenceProvider implements PersistenceProvider { - enableIndexedDbPersistence(firestore: FirestoreCompat, forceOwnership: boolean): Promise<void>; - enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>; - clearIndexedDbPersistence(firestore: Firestore): Promise<void>; -} -/** Firestore class that exposes the constructor expected by the Console. */ -export declare class Firestore extends FirestoreCompat { - constructor(firestoreDatabase: FirestoreDatabase, authProvider: Provider<FirebaseAuthInternalName>); - INTERNAL: { - delete: () => Promise<void>; - count: (query: Compat<ExpQuery<unknown>>) => Promise<number>; - }; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.d.ts deleted file mode 100644 index 4b64982..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -/** - * @license - * Copyright 2020 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 type { FirebaseNamespace } from '@firebase/app-types'; -import * as types from '@firebase/firestore-types'; -import './register-module'; -/** - * Registers the main Firestore build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -export declare function registerFirestore(instance: FirebaseNamespace): void; -declare module '@firebase/app-compat' { - interface FirebaseNamespace { - firestore: { - (app?: FirebaseApp): types.FirebaseFirestore; - Blob: typeof types.Blob; - CollectionReference: typeof types.CollectionReference; - DocumentReference: typeof types.DocumentReference; - DocumentSnapshot: typeof types.DocumentSnapshot; - FieldPath: typeof types.FieldPath; - FieldValue: typeof types.FieldValue; - Firestore: typeof types.FirebaseFirestore; - GeoPoint: typeof types.GeoPoint; - Query: typeof types.Query; - QueryDocumentSnapshot: typeof types.QueryDocumentSnapshot; - QuerySnapshot: typeof types.QuerySnapshot; - Timestamp: typeof types.Timestamp; - Transaction: typeof types.Transaction; - WriteBatch: typeof types.WriteBatch; - setLogLevel: typeof types.setLogLevel; - }; - } - interface FirebaseApp { - firestore?(): types.FirebaseFirestore; - } -} - -import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat"; -import { type DocumentData, type WithFieldValue, type DocumentReference, type CollectionReference, type Query, type EmulatorMockTokenOptions, type DocumentSnapshot, type FirestoreDataConverter, type PersistenceSettings, type AggregateSpec, type AggregateQuerySnapshot, type AggregateField, type QuerySnapshot, type Firestore, type PersistentCacheIndexManager, type FirestoreSettings, type LoadBundleTask, type FirestoreError, type Unsubscribe, type SnapshotListenOptions, type QueryCompositeFilterConstraint, type QueryNonFilterConstraint, type QueryConstraint, type Transaction, type TransactionOptions, type PartialWithFieldValue, type SetOptions, type IndexConfiguration, type UpdateData, type FieldPath, type WriteBatch } from "@firebase/firestore"; -declare module "@firebase/firestore" { - function addDoc<AppModelType, DbModelType extends DocumentData>(reference: types.CollectionReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): Promise<DocumentReference<AppModelType, DbModelType>>; - function clearIndexedDbPersistence(firestore: types.FirebaseFirestore): Promise<void>; - function collection(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>; - function collection<AppModelType, DbModelType extends DocumentData>(reference: types.CollectionReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>; - function collection<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>; - function collectionGroup(firestore: types.FirebaseFirestore, collectionId: string): Query<DocumentData, DocumentData>; - function connectFirestoreEmulator(firestore: types.FirebaseFirestore, host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; - }): void; - function deleteDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<void>; - function disableNetwork(firestore: types.FirebaseFirestore): Promise<void>; - function doc(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>; - function doc<AppModelType, DbModelType extends DocumentData>(reference: types.CollectionReference<AppModelType, DbModelType>, path?: string, ...pathSegments: string[]): DocumentReference<AppModelType, DbModelType>; - function doc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>; - function documentSnapshotFromJSON(db: types.FirebaseFirestore, json: object): DocumentSnapshot; - function documentSnapshotFromJSON<AppModelType, DbModelType extends DocumentData = DocumentData>(db: types.FirebaseFirestore, json: object, converter: FirestoreDataConverter<AppModelType, DbModelType>): DocumentSnapshot<AppModelType, DbModelType>; - function enableIndexedDbPersistence(firestore: types.FirebaseFirestore, persistenceSettings?: PersistenceSettings): Promise<void>; - function enableMultiTabIndexedDbPersistence(firestore: types.FirebaseFirestore): Promise<void>; - function enableNetwork(firestore: types.FirebaseFirestore): Promise<void>; - function getAggregateFromServer<AggregateSpecType extends AggregateSpec, AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, aggregateSpec: AggregateSpecType): Promise<AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>>; - function getCountFromServer<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<AggregateQuerySnapshot<{ - count: AggregateField<number>; - }, AppModelType, DbModelType>>; - function getDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>; - function getDocFromCache<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>; - function getDocFromServer<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>; - function getDocs<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>; - function getDocsFromCache<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>; - function getDocsFromServer<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>; - function getFirestore(app: FirebaseAppCompat): Firestore; - function getFirestore(app: FirebaseAppCompat, databaseId: string): Firestore; - function getPersistentCacheIndexManager(firestore: types.FirebaseFirestore): PersistentCacheIndexManager | null; - function initializeFirestore(app: FirebaseAppCompat, settings: FirestoreSettings, databaseId?: string): Firestore; - function loadBundle(firestore: types.FirebaseFirestore, bundleData: ReadableStream<Uint8Array> | ArrayBuffer | string): LoadBundleTask; - function namedQuery(firestore: types.FirebaseFirestore, name: string): Promise<Query | null>; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, observer: { - next?: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, options: SnapshotListenOptions, observer: { - next?: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, observer: { - next?: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, options: SnapshotListenOptions, observer: { - next?: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, observer: { - next: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, observer: { - next: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, options: SnapshotListenOptions, observer: { - next: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotResume<AppModelType, DbModelType extends DocumentData>(firestore: types.FirebaseFirestore, snapshotJson: object, options: SnapshotListenOptions, observer: { - next: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe; - function onSnapshotsInSync(firestore: types.FirebaseFirestore, observer: { - next?: (value: void) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; - }): Unsubscribe; - function onSnapshotsInSync(firestore: types.FirebaseFirestore, onSync: () => void): Unsubscribe; - function query<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<AppModelType, DbModelType>; - function query<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, ...queryConstraints: QueryConstraint[]): Query<AppModelType, DbModelType>; - function queryEqual<AppModelType, DbModelType extends DocumentData>(left: types.Query<AppModelType, DbModelType>, right: types.Query<AppModelType, DbModelType>): boolean; - function querySnapshotFromJSON(db: types.FirebaseFirestore, json: object): QuerySnapshot; - function querySnapshotFromJSON<AppModelType, DbModelType extends DocumentData = DocumentData>(db: types.FirebaseFirestore, json: object, converter: FirestoreDataConverter<AppModelType, DbModelType>): QuerySnapshot<AppModelType, DbModelType>; - function runTransaction<T>(firestore: types.FirebaseFirestore, updateFunction: (transaction: Transaction) => Promise<T>, options?: TransactionOptions): Promise<T>; - function setDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): Promise<void>; - function setDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): Promise<void>; - function setIndexConfiguration(firestore: types.FirebaseFirestore, configuration: IndexConfiguration): Promise<void>; - function setIndexConfiguration(firestore: types.FirebaseFirestore, json: string): Promise<void>; - function terminate(firestore: types.FirebaseFirestore): Promise<void>; - function updateDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): Promise<void>; - function updateDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>; - function waitForPendingWrites(firestore: types.FirebaseFirestore): Promise<void>; - function writeBatch(firestore: types.FirebaseFirestore): WriteBatch; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.node.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.node.d.ts deleted file mode 100644 index bfd630e..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.node.d.ts +++ /dev/null @@ -1,22 +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. - */ -import { FirebaseNamespace } from '@firebase/app-types'; -/** - * Registers the main Firestore Node build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -export declare function registerFirestore(instance: FirebaseNamespace): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.rn.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.rn.d.ts deleted file mode 100644 index 33714dc..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/index.rn.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license - * Copyright 2020 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 { FirebaseNamespace } from '@firebase/app-types'; -/** - * Registers the main Firestore ReactNative build with the components framework. - * Persistence can be enabled via `firebase.firestore().enablePersistence()`. - */ -export declare function registerFirestore(instance: FirebaseNamespace): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/register-module.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/register-module.d.ts deleted file mode 100644 index 2364be3..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/register-module.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @license - * Copyright 2020 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 * as types from '@firebase/firestore-types'; -declare module '@firebase/app-compat' { - interface FirebaseNamespace { - firestore: { - (app?: FirebaseApp): types.FirebaseFirestore; - Blob: typeof types.Blob; - CollectionReference: typeof types.CollectionReference; - DocumentReference: typeof types.DocumentReference; - DocumentSnapshot: typeof types.DocumentSnapshot; - FieldPath: typeof types.FieldPath; - FieldValue: typeof types.FieldValue; - Firestore: typeof types.FirebaseFirestore; - GeoPoint: typeof types.GeoPoint; - Query: typeof types.Query; - QueryDocumentSnapshot: typeof types.QueryDocumentSnapshot; - QuerySnapshot: typeof types.QuerySnapshot; - Timestamp: typeof types.Timestamp; - Transaction: typeof types.Transaction; - WriteBatch: typeof types.WriteBatch; - setLogLevel: typeof types.setLogLevel; - }; - } - interface FirebaseApp { - firestore?(): types.FirebaseFirestore; - } -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/util/input_validation.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/src/util/input_validation.d.ts deleted file mode 100644 index 23469ed..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/src/util/input_validation.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2021 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 { SetOptions } from '@firebase/firestore-types'; -export declare function validateSetOptions(methodName: string, options: SetOptions | undefined): SetOptions; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/array_transforms.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/array_transforms.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/array_transforms.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/batch_writes.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/batch_writes.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/batch_writes.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/bootstrap.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/bootstrap.d.ts deleted file mode 100644 index 6785ce9..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/bootstrap.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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 '../src/index'; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/bundle.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/bundle.test.d.ts deleted file mode 100644 index a84d7e7..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/bundle.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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 encoder: TextEncoder; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/cursor.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/cursor.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/cursor.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/database.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/database.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/database.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/fields.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/fields.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/fields.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/get_options.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/get_options.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/get_options.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/numeric_transforms.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/numeric_transforms.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/numeric_transforms.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/query.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/query.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/query.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/server_timestamp.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/server_timestamp.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/server_timestamp.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/smoke.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/smoke.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/smoke.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/transactions.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/transactions.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/transactions.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/type.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/type.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/type.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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/firestore-compat/dist/test/util/equality_matcher.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/equality_matcher.d.ts deleted file mode 100644 index 57994ad..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/equality_matcher.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @license - * Copyright 2022 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. - */ -/** - * Duck-typed interface for objects that have an isEqual() method. - * - * Note: This is copied from src/util/misc.ts to avoid importing private types. - */ -export interface Equatable<T> { - isEqual(other: T): boolean; -} -/** - * Custom equals override for types that have a free-standing equals functions - * (such as `queryEquals()`). - */ -export interface CustomMatcher<T> { - equalsFn: (left: T, right: T) => boolean; - forType: Function; -} -export declare function addEqualityMatcher(...customMatchers: Array<CustomMatcher<any>>): void; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/events_accumulator.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/events_accumulator.d.ts deleted file mode 100644 index 7205365..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/events_accumulator.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @license - * Copyright 2022 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 * as firestore from '@firebase/firestore-types'; -/** - * A helper object that can accumulate an arbitrary amount of events and resolve - * a promise when expected number has been emitted. - */ -export declare class EventsAccumulator<T extends firestore.DocumentSnapshot | firestore.QuerySnapshot> { - private events; - private waitingFor; - private deferred; - private rejectAdditionalEvents; - storeEvent: (evt: T) => void; - awaitEvents(length: number): Promise<T[]>; - awaitEvent(): Promise<T>; - /** Waits for a latency compensated local snapshot. */ - awaitLocalEvent(): Promise<T>; - /** Waits for multiple latency compensated local snapshot. */ - awaitLocalEvents(count: number): Promise<T[]>; - /** Waits for a snapshot that has no pending writes */ - awaitRemoteEvent(): Promise<T>; - assertNoAdditionalEvents(): Promise<void>; - allowAdditionalEvents(): void; - private checkFulfilled; -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/firebase_export.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/firebase_export.d.ts deleted file mode 100644 index 8db0ed3..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/firebase_export.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Copyright 2022 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 { FirebaseApp } from '@firebase/app-types'; -import { GeoPoint, Timestamp } from '@firebase/firestore'; -import * as firestore from '@firebase/firestore-types'; -import { Blob } from '../../src/api/blob'; -import { Firestore, DocumentReference, QueryDocumentSnapshot } from '../../src/api/database'; -import { FieldPath } from '../../src/api/field_path'; -import { FieldValue } from '../../src/api/field_value'; -/** - * Creates a new test instance of Firestore using either firebase.firestore() - * or `initializeFirestore` from the modular API. - */ -export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: firestore.Settings): firestore.FirebaseFirestore; -export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint, DocumentReference, QueryDocumentSnapshot }; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/helpers.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/helpers.d.ts deleted file mode 100644 index 38cf3fc..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/helpers.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @license - * Copyright 2022 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 * as firestore from '@firebase/firestore-types'; -export declare function isPersistenceAvailable(): boolean; -type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void; -interface ApiDescribe { - (message: string, testSuite: (persistence: boolean) => void): void; - skip: ApiSuiteFunction; - only: ApiSuiteFunction; -} -export declare const apiDescribe: ApiDescribe; -/** Converts the documents in a QuerySnapshot to an array with the data of each document. */ -export declare function toDataArray(docSet: firestore.QuerySnapshot): firestore.DocumentData[]; -/** Converts the changes in a QuerySnapshot to an array with the data of each document. */ -export declare function toChangesArray(docSet: firestore.QuerySnapshot, options?: firestore.SnapshotListenOptions): firestore.DocumentData[]; -export declare function toDataMap(docSet: firestore.QuerySnapshot): { - [field: string]: firestore.DocumentData; -}; -/** Converts a DocumentSet to an array with the id of each document */ -export declare function toIds(docSet: firestore.QuerySnapshot): string[]; -export declare function withTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>; -/** Runs provided fn with a db for an alternate project id. */ -export declare function withAlternateTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>; -export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>; -export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: firestore.Settings, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>; -export declare function withTestDoc(persistence: boolean, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>; -export declare function withTestDocAndSettings(persistence: boolean, settings: firestore.Settings, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>; -export declare function withTestDocAndInitialData(persistence: boolean, initialData: firestore.DocumentData | null, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>; -export declare function withTestCollection(persistence: boolean, docs: { - [key: string]: firestore.DocumentData; -}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>; -export declare function withTestCollectionSettings(persistence: boolean, settings: firestore.Settings, docs: { - [key: string]: firestore.DocumentData; -}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>; -export {}; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/promise.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/promise.d.ts deleted file mode 100644 index 0826bce..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/promise.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @license - * Copyright 2022 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 interface Resolver<R> { - (value: R | Promise<R>): void; -} -export interface Rejecter { - (reason?: Error): void; -} -export declare class Deferred<R> { - promise: Promise<R>; - resolve: Resolver<R>; - reject: Rejecter; - constructor(); -} diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/settings.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/settings.d.ts deleted file mode 100644 index 0b8cfb6..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/util/settings.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2022 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 USE_EMULATOR: boolean; -export declare const DEFAULT_SETTINGS: { - host: string; - ssl: boolean; -}; -export declare const DEFAULT_PROJECT_ID: any; -export declare const ALT_PROJECT_ID = "test-db2"; diff --git a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/validation.test.d.ts b/frontend-old/node_modules/@firebase/firestore-compat/dist/test/validation.test.d.ts deleted file mode 100644 index 9b0c1ff..0000000 --- a/frontend-old/node_modules/@firebase/firestore-compat/dist/test/validation.test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2022 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 {}; |
