@firebase/firestore 4.7.17-canary.a0583094a → 4.7.17-canary.b97eab36a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm2017.js +2 -2
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/index.rn.js +90 -90
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@ var util = require('@firebase/util');
|
|
|
9
9
|
var bloomBlob = require('@firebase/webchannel-wrapper/bloom-blob');
|
|
10
10
|
var webchannelBlob = require('@firebase/webchannel-wrapper/webchannel-blob');
|
|
11
11
|
|
|
12
|
-
const F = "@firebase/firestore", M = "4.7.17-canary.
|
|
12
|
+
const F = "@firebase/firestore", M = "4.7.17-canary.b97eab36a";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -71,7 +71,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
71
71
|
* See the License for the specific language governing permissions and
|
|
72
72
|
* limitations under the License.
|
|
73
73
|
*/
|
|
74
|
-
let x = "11.9.1-canary.
|
|
74
|
+
let x = "11.9.1-canary.b97eab36a";
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
package/dist/index.esm2017.js
CHANGED
|
@@ -5,7 +5,7 @@ import { FirebaseError, isCloudWorkstation, pingServer, updateEmulatorBanner, de
|
|
|
5
5
|
import { Integer, Md5 } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
import { XhrIo, EventType, ErrorCode, createWebChannelTransport, getStatEventTarget, WebChannel, Event, Stat } from '@firebase/webchannel-wrapper/webchannel-blob';
|
|
7
7
|
|
|
8
|
-
const F = "@firebase/firestore", M = "4.7.17-canary.
|
|
8
|
+
const F = "@firebase/firestore", M = "4.7.17-canary.b97eab36a";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -67,7 +67,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
let x = "11.9.1-canary.
|
|
70
|
+
let x = "11.9.1-canary.b97eab36a";
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
package/dist/index.node.cjs.js
CHANGED
|
@@ -34,7 +34,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
|
|
|
34
34
|
var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
|
|
35
35
|
|
|
36
36
|
const name = "@firebase/firestore";
|
|
37
|
-
const version$1 = "4.7.17-canary.
|
|
37
|
+
const version$1 = "4.7.17-canary.b97eab36a";
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
@@ -87,7 +87,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
87
87
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
88
88
|
User.MOCK_USER = new User('mock-user');
|
|
89
89
|
|
|
90
|
-
const version = "11.9.1-canary.
|
|
90
|
+
const version = "11.9.1-canary.b97eab36a";
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* @license
|
package/dist/index.node.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
9
9
|
import * as protoLoader from '@grpc/proto-loader';
|
|
10
10
|
|
|
11
11
|
const name = "@firebase/firestore";
|
|
12
|
-
const version$1 = "4.7.17-canary.
|
|
12
|
+
const version$1 = "4.7.17-canary.b97eab36a";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -62,7 +62,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
62
62
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
63
63
|
User.MOCK_USER = new User('mock-user');
|
|
64
64
|
|
|
65
|
-
const version = "11.9.1-canary.
|
|
65
|
+
const version = "11.9.1-canary.b97eab36a";
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @license
|
package/dist/index.rn.js
CHANGED
|
@@ -8,9 +8,9 @@ import { FirebaseError as u, getGlobal as c, isIndexedDBAvailable as l, getUA as
|
|
|
8
8
|
|
|
9
9
|
import { Integer as p, Md5 as y } from "@firebase/webchannel-wrapper/bloom-blob";
|
|
10
10
|
|
|
11
|
-
import { XhrIo as w, EventType as
|
|
11
|
+
import { XhrIo as w, EventType as b, ErrorCode as S, createWebChannelTransport as D, getStatEventTarget as v, WebChannel as C, Event as F, Stat as M } from "@firebase/webchannel-wrapper/webchannel-blob";
|
|
12
12
|
|
|
13
|
-
const x = "@firebase/firestore", O = "4.7.17-canary.
|
|
13
|
+
const x = "@firebase/firestore", O = "4.7.17-canary.b97eab36a";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -72,7 +72,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
72
72
|
* See the License for the specific language governing permissions and
|
|
73
73
|
* limitations under the License.
|
|
74
74
|
*/
|
|
75
|
-
let N = "11.9.1-canary.
|
|
75
|
+
let N = "11.9.1-canary.b97eab36a";
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @license
|
|
@@ -2439,7 +2439,7 @@ function __PRIVATE_newDbDocumentMutationPrefixForPath(e, t) {
|
|
|
2439
2439
|
* there is no useful information to store as the value. The raw (unencoded)
|
|
2440
2440
|
* path cannot be stored because IndexedDb doesn't store prototype
|
|
2441
2441
|
* information.
|
|
2442
|
-
*/ const se = {}, oe = "documentMutations", _e = "remoteDocumentsV14", ae = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], ue = "documentKeyIndex", ce = [ "prefixPath", "collectionGroup", "documentId" ], le = "collectionGroupIndex", he = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], Pe = "remoteDocumentGlobal", Te = "remoteDocumentGlobalKey", Ie = "targets", Ee = "queryTargetsIndex", de = [ "canonicalId", "targetId" ], Ae = "targetDocuments", Re = [ "targetId", "path" ], Ve = "documentTargetsIndex", me = [ "path", "targetId" ], fe = "targetGlobalKey", ge = "targetGlobal", pe = "collectionParents", ye = [ "collectionId", "parent" ], we = "clientMetadata",
|
|
2442
|
+
*/ const se = {}, oe = "documentMutations", _e = "remoteDocumentsV14", ae = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], ue = "documentKeyIndex", ce = [ "prefixPath", "collectionGroup", "documentId" ], le = "collectionGroupIndex", he = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], Pe = "remoteDocumentGlobal", Te = "remoteDocumentGlobalKey", Ie = "targets", Ee = "queryTargetsIndex", de = [ "canonicalId", "targetId" ], Ae = "targetDocuments", Re = [ "targetId", "path" ], Ve = "documentTargetsIndex", me = [ "path", "targetId" ], fe = "targetGlobalKey", ge = "targetGlobal", pe = "collectionParents", ye = [ "collectionId", "parent" ], we = "clientMetadata", be = "clientId", Se = "bundles", De = "bundleId", ve = "namedQueries", Ce = "name", Fe = "indexConfiguration", Me = "indexId", xe = "collectionGroupIndex", Oe = "collectionGroup", Ne = "indexState", Be = [ "indexId", "uid" ], Le = "sequenceNumberIndex", ke = [ "uid", "sequenceNumber" ], qe = "indexEntries", Qe = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], $e = "documentKeyIndex", Ue = [ "indexId", "uid", "orderedDocumentKey" ], Ke = "documentOverlays", We = [ "userId", "collectionPath", "documentId" ], Ge = "collectionPathOverlayIndex", ze = [ "userId", "collectionPath", "largestBatchId" ], je = "collectionGroupOverlayIndex", He = [ "userId", "collectionGroup", "largestBatchId" ], Je = "globals", Ye = "name", Ze = [ ...[ ...[ ...[ ...[ X, te, oe, J, Ie, Y, ge, Ae ], we ], Pe ], pe ], Se, ve ], Xe = [ ...Ze, Ke ], et = [ X, te, oe, _e, Ie, Y, ge, Ae, we, Pe, pe, Se, ve, Ke ], tt = et, nt = [ ...tt, Fe, Ne, qe ], rt = nt, it = [ ...nt, Je ], st = it;
|
|
2443
2443
|
|
|
2444
2444
|
/**
|
|
2445
2445
|
* @license
|
|
@@ -5999,7 +5999,7 @@ wt[wt.INTERNAL = 13] = "INTERNAL", wt[wt.UNAVAILABLE = 14] = "UNAVAILABLE", wt[w
|
|
|
5999
5999
|
* integration tests that have registered callbacks to be notified of events
|
|
6000
6000
|
* that happen during the test execution.
|
|
6001
6001
|
*/
|
|
6002
|
-
let
|
|
6002
|
+
let bt = null;
|
|
6003
6003
|
|
|
6004
6004
|
/**
|
|
6005
6005
|
* Sets the value of the `testingHooksSpi` object.
|
|
@@ -6021,7 +6021,7 @@ let St = null;
|
|
|
6021
6021
|
* See the License for the specific language governing permissions and
|
|
6022
6022
|
* limitations under the License.
|
|
6023
6023
|
*/
|
|
6024
|
-
const
|
|
6024
|
+
const St = new p([ 4294967295, 4294967295 ], 0);
|
|
6025
6025
|
|
|
6026
6026
|
// Hash a string using md5 hashing algorithm.
|
|
6027
6027
|
function __PRIVATE_getMd5HashValue(e) {
|
|
@@ -6056,11 +6056,11 @@ class BloomFilter {
|
|
|
6056
6056
|
// Calculate hashed value h(i) = h1 + (i * h2).
|
|
6057
6057
|
let r = e.add(t.multiply(p.fromNumber(n)));
|
|
6058
6058
|
// Wrap if hash value overflow 64bit.
|
|
6059
|
-
return 1 === r.compare(
|
|
6059
|
+
return 1 === r.compare(St) && (r = new p([ r.getBits(0), r.getBits(1) ], 0)),
|
|
6060
6060
|
r.modulo(this.ye).toNumber();
|
|
6061
6061
|
}
|
|
6062
6062
|
// Return whether the bit on the given index in the bitmap is set to 1.
|
|
6063
|
-
|
|
6063
|
+
be(e) {
|
|
6064
6064
|
return !!(this.bitmap[Math.floor(e / 8)] & 1 << e % 8);
|
|
6065
6065
|
}
|
|
6066
6066
|
mightContain(e) {
|
|
@@ -6069,7 +6069,7 @@ class BloomFilter {
|
|
|
6069
6069
|
const t = __PRIVATE_getMd5HashValue(e), [n, r] = __PRIVATE_get64BitUints(t);
|
|
6070
6070
|
for (let e = 0; e < this.hashCount; e++) {
|
|
6071
6071
|
const t = this.we(n, r, e);
|
|
6072
|
-
if (!this.
|
|
6072
|
+
if (!this.be(t)) return !1;
|
|
6073
6073
|
}
|
|
6074
6074
|
return !0;
|
|
6075
6075
|
}
|
|
@@ -6082,10 +6082,10 @@ class BloomFilter {
|
|
|
6082
6082
|
const t = __PRIVATE_getMd5HashValue(e), [n, r] = __PRIVATE_get64BitUints(t);
|
|
6083
6083
|
for (let e = 0; e < this.hashCount; e++) {
|
|
6084
6084
|
const t = this.we(n, r, e);
|
|
6085
|
-
this.
|
|
6085
|
+
this.Se(t);
|
|
6086
6086
|
}
|
|
6087
6087
|
}
|
|
6088
|
-
|
|
6088
|
+
Se(e) {
|
|
6089
6089
|
const t = Math.floor(e / 8), n = e % 8;
|
|
6090
6090
|
this.bitmap[t] |= 1 << n;
|
|
6091
6091
|
}
|
|
@@ -6482,7 +6482,7 @@ class __PRIVATE_WatchChangeAggregator {
|
|
|
6482
6482
|
const e = 2 /* BloomFilterApplicationStatus.FalsePositive */ === i ? "TargetPurposeExistenceFilterMismatchBloom" /* TargetPurpose.ExistenceFilterMismatchBloom */ : "TargetPurposeExistenceFilterMismatch" /* TargetPurpose.ExistenceFilterMismatch */;
|
|
6483
6483
|
this.Ze = this.Ze.insert(t, e);
|
|
6484
6484
|
}
|
|
6485
|
-
null ==
|
|
6485
|
+
null == bt || bt.ht(function __PRIVATE_createExistenceFilterMismatchInfoForTestingHooks(e, t, n, r, i) {
|
|
6486
6486
|
var s, o, _, a, u, c;
|
|
6487
6487
|
const l = {
|
|
6488
6488
|
localCacheCount: e,
|
|
@@ -7740,7 +7740,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
|
|
|
7740
7740
|
/**
|
|
7741
7741
|
* Helper to get a typed SimpleDbStore for the bundles object store.
|
|
7742
7742
|
*/ function __PRIVATE_bundlesStore(e) {
|
|
7743
|
-
return __PRIVATE_getStore(e,
|
|
7743
|
+
return __PRIVATE_getStore(e, Se);
|
|
7744
7744
|
}
|
|
7745
7745
|
|
|
7746
7746
|
/**
|
|
@@ -7775,7 +7775,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
|
|
|
7775
7775
|
constructor(e, t) {
|
|
7776
7776
|
this.serializer = e, this.userId = t;
|
|
7777
7777
|
}
|
|
7778
|
-
static
|
|
7778
|
+
static bt(e, t) {
|
|
7779
7779
|
const n = t.uid || "";
|
|
7780
7780
|
return new __PRIVATE_IndexedDbDocumentOverlayCache(e, n);
|
|
7781
7781
|
}
|
|
@@ -7792,7 +7792,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
|
|
|
7792
7792
|
const r = [];
|
|
7793
7793
|
return n.forEach(((n, i) => {
|
|
7794
7794
|
const s = new Overlay(t, i);
|
|
7795
|
-
r.push(this.
|
|
7795
|
+
r.push(this.St(e, s));
|
|
7796
7796
|
})), PersistencePromise.waitFor(r);
|
|
7797
7797
|
}
|
|
7798
7798
|
removeOverlaysForBatchId(e, t, n) {
|
|
@@ -7837,7 +7837,7 @@ function __PRIVATE_toDbIndexState(e, t, n, r) {
|
|
|
7837
7837
|
i.size() < r || o.largestBatchId === s ? (i.set(o.getKey(), o), s = o.largestBatchId) : n.done();
|
|
7838
7838
|
})).next((() => i));
|
|
7839
7839
|
}
|
|
7840
|
-
|
|
7840
|
+
St(e, t) {
|
|
7841
7841
|
return __PRIVATE_documentOverlayStore(e).put(function __PRIVATE_toDbDocumentOverlay(e, t, n) {
|
|
7842
7842
|
const [r, i, s] = __PRIVATE_toDbDocumentOverlayKey(t, n.mutation.key);
|
|
7843
7843
|
return {
|
|
@@ -8415,11 +8415,11 @@ class __PRIVATE_TargetIndexMatcher {
|
|
|
8415
8415
|
return !1;
|
|
8416
8416
|
// If there is an array element, find a matching filter.
|
|
8417
8417
|
const t = __PRIVATE_fieldIndexGetArraySegment(e);
|
|
8418
|
-
if (void 0 !== t && !this.
|
|
8418
|
+
if (void 0 !== t && !this.bn(t)) return !1;
|
|
8419
8419
|
const n = __PRIVATE_fieldIndexGetDirectionalSegments(e);
|
|
8420
8420
|
let r = new Set, i = 0, s = 0;
|
|
8421
8421
|
// Process all equalities first. Equalities can appear out of order.
|
|
8422
|
-
for (;i < n.length && this.
|
|
8422
|
+
for (;i < n.length && this.bn(n[i]); ++i) r = r.add(n[i].fieldPath.canonicalString());
|
|
8423
8423
|
// If we already have processed all segments, all segments are used to serve
|
|
8424
8424
|
// the equality filters and we do not need to map any segments to the
|
|
8425
8425
|
// target's inequality and orderBy clauses.
|
|
@@ -8432,7 +8432,7 @@ class __PRIVATE_TargetIndexMatcher {
|
|
|
8432
8432
|
// and the first orderBy clause.
|
|
8433
8433
|
if (!r.has(e.field.canonicalString())) {
|
|
8434
8434
|
const t = n[i];
|
|
8435
|
-
if (!this.
|
|
8435
|
+
if (!this.Sn(e, t) || !this.Dn(this.gn[s++], t)) return !1;
|
|
8436
8436
|
}
|
|
8437
8437
|
++i;
|
|
8438
8438
|
}
|
|
@@ -8474,11 +8474,11 @@ class __PRIVATE_TargetIndexMatcher {
|
|
|
8474
8474
|
n.field.isKeyField() || e.has(n.field) || (e = e.add(n.field), t.push(new IndexSegment(n.field, "asc" /* Direction.ASCENDING */ === n.dir ? 0 /* IndexKind.ASCENDING */ : 1 /* IndexKind.DESCENDING */)));
|
|
8475
8475
|
return new FieldIndex(FieldIndex.UNKNOWN_ID, this.collectionId, t, IndexState.empty());
|
|
8476
8476
|
}
|
|
8477
|
-
|
|
8478
|
-
for (const t of this.pn) if (this.
|
|
8477
|
+
bn(e) {
|
|
8478
|
+
for (const t of this.pn) if (this.Sn(t, e)) return !0;
|
|
8479
8479
|
return !1;
|
|
8480
8480
|
}
|
|
8481
|
-
|
|
8481
|
+
Sn(e, t) {
|
|
8482
8482
|
if (void 0 === e || !e.field.isEqual(t.fieldPath)) return !1;
|
|
8483
8483
|
const n = "array-contains" /* Operator.ARRAY_CONTAINS */ === e.op || "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ === e.op;
|
|
8484
8484
|
return 2 /* IndexKind.CONTAINS */ === t.kind === n;
|
|
@@ -9448,7 +9448,7 @@ class __PRIVATE_IndexedDbMutationQueue {
|
|
|
9448
9448
|
* Creates a new mutation queue for the given user.
|
|
9449
9449
|
* @param user - The user for which to create a mutation queue.
|
|
9450
9450
|
* @param serializer - The serializer to use when persisting to IndexedDb.
|
|
9451
|
-
*/ static
|
|
9451
|
+
*/ static bt(e, t, n, r) {
|
|
9452
9452
|
// TODO(mcg): Figure out what constraints there are on userIDs
|
|
9453
9453
|
// In particular, are there any reserved characters? are empty ids allowed?
|
|
9454
9454
|
// For the moment store these together in the same mutations table assuming
|
|
@@ -10132,10 +10132,10 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
|
|
|
10132
10132
|
this.db = e, this.garbageCollector = __PRIVATE_newLruGarbageCollector(this, t);
|
|
10133
10133
|
}
|
|
10134
10134
|
pr(e) {
|
|
10135
|
-
const t = this.
|
|
10135
|
+
const t = this.br(e);
|
|
10136
10136
|
return this.db.getTargetCache().getTargetCount(e).next((e => t.next((t => e + t))));
|
|
10137
10137
|
}
|
|
10138
|
-
|
|
10138
|
+
br(e) {
|
|
10139
10139
|
let t = 0;
|
|
10140
10140
|
return this.yr(e, (e => {
|
|
10141
10141
|
t++;
|
|
@@ -10145,7 +10145,7 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
|
|
|
10145
10145
|
return this.db.getTargetCache().forEachTarget(e, t);
|
|
10146
10146
|
}
|
|
10147
10147
|
yr(e, t) {
|
|
10148
|
-
return this.
|
|
10148
|
+
return this.Sr(e, ((e, n) => t(n)));
|
|
10149
10149
|
}
|
|
10150
10150
|
addReference(e, t, n) {
|
|
10151
10151
|
return __PRIVATE_writeSentinelKey(e, n);
|
|
@@ -10174,7 +10174,7 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
|
|
|
10174
10174
|
removeOrphanedDocuments(e, t) {
|
|
10175
10175
|
const n = this.db.getRemoteDocumentCache().newChangeBuffer(), r = [];
|
|
10176
10176
|
let i = 0;
|
|
10177
|
-
return this.
|
|
10177
|
+
return this.Sr(e, ((s, o) => {
|
|
10178
10178
|
if (o <= t) {
|
|
10179
10179
|
const t = this.Dr(e, s).next((t => {
|
|
10180
10180
|
if (!t)
|
|
@@ -10205,7 +10205,7 @@ function __PRIVATE_newLruGarbageCollector(e, t) {
|
|
|
10205
10205
|
* means not a part of any target, so the only entry in the target-document index for
|
|
10206
10206
|
* that document will be the sentinel row (targetId 0), which will also have the sequence
|
|
10207
10207
|
* number for the last time the document was accessed.
|
|
10208
|
-
*/
|
|
10208
|
+
*/ Sr(e, t) {
|
|
10209
10209
|
const n = __PRIVATE_documentTargetStore(e);
|
|
10210
10210
|
let r, i = __PRIVATE_ListenSequence.le;
|
|
10211
10211
|
return n.te({
|
|
@@ -11041,7 +11041,7 @@ class OverlayedDocument {
|
|
|
11041
11041
|
}
|
|
11042
11042
|
saveOverlays(e, t, n) {
|
|
11043
11043
|
return n.forEach(((n, r) => {
|
|
11044
|
-
this.
|
|
11044
|
+
this.St(e, t, r);
|
|
11045
11045
|
})), PersistencePromise.resolve();
|
|
11046
11046
|
}
|
|
11047
11047
|
removeOverlaysForBatchId(e, t, n) {
|
|
@@ -11076,7 +11076,7 @@ class OverlayedDocument {
|
|
|
11076
11076
|
}
|
|
11077
11077
|
return PersistencePromise.resolve(o);
|
|
11078
11078
|
}
|
|
11079
|
-
|
|
11079
|
+
St(e, t, n) {
|
|
11080
11080
|
// Remove the association of the overlay to its batch id.
|
|
11081
11081
|
const r = this.overlays.get(n.key);
|
|
11082
11082
|
if (null !== r) {
|
|
@@ -11789,10 +11789,10 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
11789
11789
|
return this.persistence.getTargetCache().forEachTarget(e, t);
|
|
11790
11790
|
}
|
|
11791
11791
|
pr(e) {
|
|
11792
|
-
const t = this.
|
|
11792
|
+
const t = this.br(e);
|
|
11793
11793
|
return this.persistence.getTargetCache().getTargetCount(e).next((e => t.next((t => e + t))));
|
|
11794
11794
|
}
|
|
11795
|
-
|
|
11795
|
+
br(e) {
|
|
11796
11796
|
let t = 0;
|
|
11797
11797
|
return this.yr(e, (e => {
|
|
11798
11798
|
t++;
|
|
@@ -11935,12 +11935,12 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
11935
11935
|
}(e, i)))), s = s.next((() => {
|
|
11936
11936
|
!function __PRIVATE_createClientMetadataStore(e) {
|
|
11937
11937
|
e.createObjectStore(we, {
|
|
11938
|
-
keyPath:
|
|
11938
|
+
keyPath: be
|
|
11939
11939
|
});
|
|
11940
11940
|
}(e);
|
|
11941
11941
|
}))), n < 5 && r >= 5 && (s = s.next((() => this.wi(i)))), n < 6 && r >= 6 && (s = s.next((() => (function __PRIVATE_createDocumentGlobalStore(e) {
|
|
11942
11942
|
e.createObjectStore(Pe);
|
|
11943
|
-
}(e), this.
|
|
11943
|
+
}(e), this.bi(i))))), n < 7 && r >= 7 && (s = s.next((() => this.Si(i)))), n < 8 && r >= 8 && (s = s.next((() => this.Di(e, i)))),
|
|
11944
11944
|
n < 9 && r >= 9 && (s = s.next((() => {
|
|
11945
11945
|
// Multi-Tab used to manage its own changelog, but this has been moved
|
|
11946
11946
|
// to the DbRemoteDocument object store itself. Since the previous change
|
|
@@ -11952,7 +11952,7 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
11952
11952
|
// RemoteDocumentCache. This is now done with schema version 13.
|
|
11953
11953
|
}))), n < 10 && r >= 10 && (s = s.next((() => this.Ci(i)))), n < 11 && r >= 11 && (s = s.next((() => {
|
|
11954
11954
|
!function __PRIVATE_createBundlesStore(e) {
|
|
11955
|
-
e.createObjectStore(
|
|
11955
|
+
e.createObjectStore(Se, {
|
|
11956
11956
|
keyPath: De
|
|
11957
11957
|
});
|
|
11958
11958
|
}(e), function __PRIVATE_createNamedQueriesStore(e) {
|
|
@@ -12015,7 +12015,7 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
12015
12015
|
t.objectStore(qe).clear();
|
|
12016
12016
|
}))), s;
|
|
12017
12017
|
}
|
|
12018
|
-
|
|
12018
|
+
bi(e) {
|
|
12019
12019
|
let t = 0;
|
|
12020
12020
|
return e.store(J).te(((e, n) => {
|
|
12021
12021
|
t += __PRIVATE_dbDocumentSize(n);
|
|
@@ -12042,7 +12042,7 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
12042
12042
|
/**
|
|
12043
12043
|
* Ensures that every document in the remote document cache has a corresponding sentinel row
|
|
12044
12044
|
* with a sequence number. Missing rows are given the most recently used sequence number.
|
|
12045
|
-
*/
|
|
12045
|
+
*/ Si(e) {
|
|
12046
12046
|
const t = e.store(Ae), n = e.store(J);
|
|
12047
12047
|
return e.store(ge).get(fe).next((e => {
|
|
12048
12048
|
const r = [];
|
|
@@ -12137,7 +12137,7 @@ class __PRIVATE_MemoryLruDelegate {
|
|
|
12137
12137
|
__PRIVATE_fromDbMutationBatch(this.serializer, e).keys().forEach((e => r = r.add(e))),
|
|
12138
12138
|
n.set(e.userId, r);
|
|
12139
12139
|
})), PersistencePromise.forEach(n, ((e, n) => {
|
|
12140
|
-
const s = new User(n), o = __PRIVATE_IndexedDbDocumentOverlayCache.
|
|
12140
|
+
const s = new User(n), o = __PRIVATE_IndexedDbDocumentOverlayCache.bt(this.serializer, s), _ = i.getIndexManager(s), a = __PRIVATE_IndexedDbMutationQueue.bt(s, this.serializer, _, i.referenceDelegate);
|
|
12141
12141
|
return new LocalDocumentsView(r, a, o, _).recalculateAndSaveOverlaysForDocumentKeys(new __PRIVATE_IndexedDbTransaction(t, __PRIVATE_ListenSequence.le), e).next();
|
|
12142
12142
|
}));
|
|
12143
12143
|
}));
|
|
@@ -12446,7 +12446,7 @@ class __PRIVATE_IndexedDbPersistence {
|
|
|
12446
12446
|
return this.Pi;
|
|
12447
12447
|
}
|
|
12448
12448
|
getMutationQueue(e, t) {
|
|
12449
|
-
return __PRIVATE_IndexedDbMutationQueue.
|
|
12449
|
+
return __PRIVATE_IndexedDbMutationQueue.bt(e, this.serializer, t, this.referenceDelegate);
|
|
12450
12450
|
}
|
|
12451
12451
|
getTargetCache() {
|
|
12452
12452
|
return this.Ti;
|
|
@@ -12458,7 +12458,7 @@ class __PRIVATE_IndexedDbPersistence {
|
|
|
12458
12458
|
return new __PRIVATE_IndexedDbIndexManager(e, this.serializer.wt.databaseId);
|
|
12459
12459
|
}
|
|
12460
12460
|
getDocumentOverlayCache(e) {
|
|
12461
|
-
return __PRIVATE_IndexedDbDocumentOverlayCache.
|
|
12461
|
+
return __PRIVATE_IndexedDbDocumentOverlayCache.bt(this.serializer, e);
|
|
12462
12462
|
}
|
|
12463
12463
|
getBundleCache() {
|
|
12464
12464
|
return this.Ei;
|
|
@@ -12778,13 +12778,13 @@ class __PRIVATE_QueryEngine {
|
|
|
12778
12778
|
return this.ws(e, t).next((e => {
|
|
12779
12779
|
i.result = e;
|
|
12780
12780
|
})).next((() => {
|
|
12781
|
-
if (!i.result) return this.
|
|
12781
|
+
if (!i.result) return this.bs(e, t, r, n).next((e => {
|
|
12782
12782
|
i.result = e;
|
|
12783
12783
|
}));
|
|
12784
12784
|
})).next((() => {
|
|
12785
12785
|
if (i.result) return;
|
|
12786
12786
|
const n = new QueryContext;
|
|
12787
|
-
return this.
|
|
12787
|
+
return this.Ss(e, t, n).next((r => {
|
|
12788
12788
|
if (i.result = r, this.fs) return this.Ds(e, t, n, r.size);
|
|
12789
12789
|
}));
|
|
12790
12790
|
})).next((() => i.result));
|
|
@@ -12825,7 +12825,7 @@ class __PRIVATE_QueryEngine {
|
|
|
12825
12825
|
/**
|
|
12826
12826
|
* Performs a query based on the target's persisted query mapping. Returns
|
|
12827
12827
|
* `null` if the mapping is not available or cannot be used.
|
|
12828
|
-
*/
|
|
12828
|
+
*/ bs(e, t, n, r) {
|
|
12829
12829
|
return __PRIVATE_queryMatchesAllDocuments(t) || r.isEqual(SnapshotVersion.min()) ? PersistencePromise.resolve(null) : this.ys.getDocuments(e, n).next((i => {
|
|
12830
12830
|
const s = this.vs(t, i);
|
|
12831
12831
|
return this.Cs(t, s, n, r) ? PersistencePromise.resolve(null) : (__PRIVATE_getLogLevel() <= a.DEBUG && __PRIVATE_logDebug("QueryEngine", "Re-using previous result from %s to execute query: %s", r.toString(), __PRIVATE_stringifyQuery(t)),
|
|
@@ -12872,7 +12872,7 @@ class __PRIVATE_QueryEngine {
|
|
|
12872
12872
|
const i = "F" /* LimitType.First */ === e.limitType ? t.last() : t.first();
|
|
12873
12873
|
return !!i && (i.hasPendingWrites || i.version.compareTo(r) > 0);
|
|
12874
12874
|
}
|
|
12875
|
-
|
|
12875
|
+
Ss(e, t, n) {
|
|
12876
12876
|
return __PRIVATE_getLogLevel() <= a.DEBUG && __PRIVATE_logDebug("QueryEngine", "Using full collection scan to execute query:", __PRIVATE_stringifyQuery(t)),
|
|
12877
12877
|
this.ys.getDocumentsMatchingQuery(e, t, IndexOffset.min(), n);
|
|
12878
12878
|
}
|
|
@@ -13748,7 +13748,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13748
13748
|
} else if (this.oo.test(t.key)) {
|
|
13749
13749
|
if (null !== t.newValue) {
|
|
13750
13750
|
const e = this.wo(t.key, t.newValue);
|
|
13751
|
-
if (e) return this.
|
|
13751
|
+
if (e) return this.bo(e);
|
|
13752
13752
|
}
|
|
13753
13753
|
} else if (t.key === this._o) {
|
|
13754
13754
|
if (null !== t.newValue) {
|
|
@@ -13761,7 +13761,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13761
13761
|
if (null != e) try {
|
|
13762
13762
|
const n = JSON.parse(e);
|
|
13763
13763
|
__PRIVATE_hardAssert("number" == typeof n, 30636, {
|
|
13764
|
-
|
|
13764
|
+
So: e
|
|
13765
13765
|
}), t = n;
|
|
13766
13766
|
} catch (e) {
|
|
13767
13767
|
__PRIVATE_logError(Ht, "Failed to read sequence number from WebStorage", e);
|
|
@@ -13852,7 +13852,7 @@ class __PRIVATE_LocalClientState {
|
|
|
13852
13852
|
if (e.user.uid === this.currentUser.uid) return this.syncEngine.Co(e.batchId, e.state, e.error);
|
|
13853
13853
|
__PRIVATE_logDebug(Ht, `Ignoring mutation for non-active user ${e.user.uid}`);
|
|
13854
13854
|
}
|
|
13855
|
-
|
|
13855
|
+
bo(e) {
|
|
13856
13856
|
return this.syncEngine.Fo(e.targetId, e.state, e.error);
|
|
13857
13857
|
}
|
|
13858
13858
|
mo(e, t) {
|
|
@@ -14228,20 +14228,20 @@ class __PRIVATE_WebChannelConnection extends __PRIVATE_RestConnection {
|
|
|
14228
14228
|
const s = __PRIVATE_generateUniqueDebugId();
|
|
14229
14229
|
return new Promise(((i, o) => {
|
|
14230
14230
|
const _ = new w;
|
|
14231
|
-
_.setWithCredentials(!0), _.listenOnce(
|
|
14231
|
+
_.setWithCredentials(!0), _.listenOnce(b.COMPLETE, (() => {
|
|
14232
14232
|
try {
|
|
14233
14233
|
switch (_.getLastErrorCode()) {
|
|
14234
|
-
case
|
|
14234
|
+
case S.NO_ERROR:
|
|
14235
14235
|
const t = _.getResponseJson();
|
|
14236
14236
|
__PRIVATE_logDebug(en, `XHR for RPC '${e}' ${s} received:`, JSON.stringify(t)),
|
|
14237
14237
|
i(t);
|
|
14238
14238
|
break;
|
|
14239
14239
|
|
|
14240
|
-
case
|
|
14240
|
+
case S.TIMEOUT:
|
|
14241
14241
|
__PRIVATE_logDebug(en, `RPC '${e}' ${s} timed out`), o(new FirestoreError(L.DEADLINE_EXCEEDED, "Request time out"));
|
|
14242
14242
|
break;
|
|
14243
14243
|
|
|
14244
|
-
case
|
|
14244
|
+
case S.HTTP_ERROR:
|
|
14245
14245
|
const n = _.getStatus();
|
|
14246
14246
|
if (__PRIVATE_logDebug(en, `RPC '${e}' ${s} failed with status:`, n, "response text:", _.getResponseText()),
|
|
14247
14247
|
n > 0) {
|
|
@@ -14576,7 +14576,7 @@ class __PRIVATE_ExponentialBackoff {
|
|
|
14576
14576
|
// bounds.
|
|
14577
14577
|
this.m_ *= this.R_, this.m_ < this.A_ && (this.m_ = this.A_), this.m_ > this.V_ && (this.m_ = this.V_);
|
|
14578
14578
|
}
|
|
14579
|
-
|
|
14579
|
+
b_() {
|
|
14580
14580
|
null !== this.f_ && (this.f_.skipDelay(), this.f_ = null);
|
|
14581
14581
|
}
|
|
14582
14582
|
cancel() {
|
|
@@ -14639,7 +14639,7 @@ class __PRIVATE_ExponentialBackoff {
|
|
|
14639
14639
|
*/
|
|
14640
14640
|
class __PRIVATE_PersistentStream {
|
|
14641
14641
|
constructor(e, t, n, r, i, s, o, _) {
|
|
14642
|
-
this.xi = e, this.
|
|
14642
|
+
this.xi = e, this.S_ = n, this.D_ = r, this.connection = i, this.authCredentialsProvider = s,
|
|
14643
14643
|
this.appCheckCredentialsProvider = o, this.listener = _, this.state = 0 /* PersistentStreamState.Initial */ ,
|
|
14644
14644
|
/**
|
|
14645
14645
|
* A close count that's incremented every time the stream is closed; used by
|
|
@@ -14706,7 +14706,7 @@ class __PRIVATE_PersistentStream {
|
|
|
14706
14706
|
*/ k_() {
|
|
14707
14707
|
// Starts the idle time if we are in state 'Open' and are not yet already
|
|
14708
14708
|
// running a timer (in which case the previous idle timeout still applies).
|
|
14709
|
-
this.N_() && null === this.C_ && (this.C_ = this.xi.enqueueAfterDelay(this.
|
|
14709
|
+
this.N_() && null === this.C_ && (this.C_ = this.xi.enqueueAfterDelay(this.S_, 6e4, (() => this.q_())));
|
|
14710
14710
|
}
|
|
14711
14711
|
/** Sends a message to the underlying stream. */ Q_(e) {
|
|
14712
14712
|
this.U_(), this.stream.send(e);
|
|
@@ -15865,11 +15865,11 @@ class ViewSnapshot {
|
|
|
15865
15865
|
* tracked by EventManager.
|
|
15866
15866
|
*/ class __PRIVATE_QueryListenersInfo {
|
|
15867
15867
|
constructor() {
|
|
15868
|
-
this.
|
|
15868
|
+
this.ba = void 0, this.Sa = [];
|
|
15869
15869
|
}
|
|
15870
15870
|
// Helper methods that checks if the query has listeners that listening to remote store
|
|
15871
15871
|
Da() {
|
|
15872
|
-
return this.
|
|
15872
|
+
return this.Sa.some((e => e.va()));
|
|
15873
15873
|
}
|
|
15874
15874
|
}
|
|
15875
15875
|
|
|
@@ -15883,7 +15883,7 @@ class __PRIVATE_EventManagerImpl {
|
|
|
15883
15883
|
const n = __PRIVATE_debugCast(e), r = n.queries;
|
|
15884
15884
|
// Prevent further access by clearing ObjectMap.
|
|
15885
15885
|
n.queries = __PRIVATE_newQueriesObjectMap(), r.forEach(((e, n) => {
|
|
15886
|
-
for (const e of n.
|
|
15886
|
+
for (const e of n.Sa) e.onError(t);
|
|
15887
15887
|
}));
|
|
15888
15888
|
}
|
|
15889
15889
|
// Call all global snapshot listeners that have been set.
|
|
@@ -15907,12 +15907,12 @@ async function __PRIVATE_eventManagerListen(e, t) {
|
|
|
15907
15907
|
try {
|
|
15908
15908
|
switch (r) {
|
|
15909
15909
|
case 0 /* ListenerSetupAction.InitializeLocalListenAndRequireWatchConnection */ :
|
|
15910
|
-
s.
|
|
15910
|
+
s.ba = await n.onListen(i,
|
|
15911
15911
|
/** enableRemoteListen= */ !0);
|
|
15912
15912
|
break;
|
|
15913
15913
|
|
|
15914
15914
|
case 1 /* ListenerSetupAction.InitializeLocalListenOnly */ :
|
|
15915
|
-
s.
|
|
15915
|
+
s.ba = await n.onListen(i,
|
|
15916
15916
|
/** enableRemoteListen= */ !1);
|
|
15917
15917
|
break;
|
|
15918
15918
|
|
|
@@ -15923,10 +15923,10 @@ async function __PRIVATE_eventManagerListen(e, t) {
|
|
|
15923
15923
|
const n = __PRIVATE_wrapInUserErrorIfRecoverable(e, `Initialization of query '${__PRIVATE_stringifyQuery(t.query)}' failed`);
|
|
15924
15924
|
return void t.onError(n);
|
|
15925
15925
|
}
|
|
15926
|
-
if (n.queries.set(i, s), s.
|
|
15926
|
+
if (n.queries.set(i, s), s.Sa.push(t),
|
|
15927
15927
|
// Run global snapshot listeners if a consistent snapshot has been emitted.
|
|
15928
|
-
t.Fa(n.onlineState), s.
|
|
15929
|
-
t.Ma(s.
|
|
15928
|
+
t.Fa(n.onlineState), s.ba) {
|
|
15929
|
+
t.Ma(s.ba) && __PRIVATE_raiseSnapshotsInSyncEvent(n);
|
|
15930
15930
|
}
|
|
15931
15931
|
}
|
|
15932
15932
|
|
|
@@ -15935,8 +15935,8 @@ async function __PRIVATE_eventManagerUnlisten(e, t) {
|
|
|
15935
15935
|
let i = 3 /* ListenerRemovalAction.NoActionRequired */;
|
|
15936
15936
|
const s = n.queries.get(r);
|
|
15937
15937
|
if (s) {
|
|
15938
|
-
const e = s.
|
|
15939
|
-
e >= 0 && (s.
|
|
15938
|
+
const e = s.Sa.indexOf(t);
|
|
15939
|
+
e >= 0 && (s.Sa.splice(e, 1), 0 === s.Sa.length ? i = t.va() ? 0 /* ListenerRemovalAction.TerminateLocalListenAndRequireWatchDisconnection */ : 1 /* ListenerRemovalAction.TerminateLocalListenOnly */ : !s.Da() && t.va() && (
|
|
15940
15940
|
// The removed listener is the last one that sourced from watch.
|
|
15941
15941
|
i = 2 /* ListenerRemovalAction.RequireWatchDisconnectionOnly */));
|
|
15942
15942
|
}
|
|
@@ -15963,8 +15963,8 @@ function __PRIVATE_eventManagerOnWatchChange(e, t) {
|
|
|
15963
15963
|
for (const e of t) {
|
|
15964
15964
|
const t = e.query, i = n.queries.get(t);
|
|
15965
15965
|
if (i) {
|
|
15966
|
-
for (const t of i.
|
|
15967
|
-
i.
|
|
15966
|
+
for (const t of i.Sa) t.Ma(e) && (r = !0);
|
|
15967
|
+
i.ba = e;
|
|
15968
15968
|
}
|
|
15969
15969
|
}
|
|
15970
15970
|
r && __PRIVATE_raiseSnapshotsInSyncEvent(n);
|
|
@@ -15972,7 +15972,7 @@ function __PRIVATE_eventManagerOnWatchChange(e, t) {
|
|
|
15972
15972
|
|
|
15973
15973
|
function __PRIVATE_eventManagerOnWatchError(e, t, n) {
|
|
15974
15974
|
const r = __PRIVATE_debugCast(e), i = r.queries.get(t);
|
|
15975
|
-
if (i) for (const e of i.
|
|
15975
|
+
if (i) for (const e of i.Sa) e.onError(n);
|
|
15976
15976
|
// Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()
|
|
15977
15977
|
// after an error.
|
|
15978
15978
|
r.queries.delete(t);
|
|
@@ -16794,7 +16794,7 @@ async function __PRIVATE_allocateTargetAndMaybeListen(e, t, n, r) {
|
|
|
16794
16794
|
n.onlineState = t;
|
|
16795
16795
|
let r = !1;
|
|
16796
16796
|
n.queries.forEach(((e, n) => {
|
|
16797
|
-
for (const e of n.
|
|
16797
|
+
for (const e of n.Sa)
|
|
16798
16798
|
// Run global snapshot listeners if a consistent snapshot has been emitted.
|
|
16799
16799
|
e.Fa(t) && (r = !0);
|
|
16800
16800
|
})), r && __PRIVATE_raiseSnapshotsInSyncEvent(n);
|
|
@@ -17361,8 +17361,8 @@ class __PRIVATE_MemoryOfflineComponentProvider {
|
|
|
17361
17361
|
this.kind = "memory", this.synchronizeTabs = !1;
|
|
17362
17362
|
}
|
|
17363
17363
|
async initialize(e) {
|
|
17364
|
-
this.serializer = __PRIVATE_newSerializer(e.databaseInfo.databaseId), this.sharedClientState = this.
|
|
17365
|
-
this.persistence = this.
|
|
17364
|
+
this.serializer = __PRIVATE_newSerializer(e.databaseInfo.databaseId), this.sharedClientState = this.bu(e),
|
|
17365
|
+
this.persistence = this.Su(e), await this.persistence.start(), this.localStore = this.Du(e),
|
|
17366
17366
|
this.gcScheduler = this.vu(e, this.localStore), this.indexBackfillerScheduler = this.Cu(e, this.localStore);
|
|
17367
17367
|
}
|
|
17368
17368
|
vu(e, t) {
|
|
@@ -17374,10 +17374,10 @@ class __PRIVATE_MemoryOfflineComponentProvider {
|
|
|
17374
17374
|
Du(e) {
|
|
17375
17375
|
return __PRIVATE_newLocalStore(this.persistence, new __PRIVATE_QueryEngine, e.initialUser, this.serializer);
|
|
17376
17376
|
}
|
|
17377
|
-
|
|
17377
|
+
Su(e) {
|
|
17378
17378
|
return new __PRIVATE_MemoryPersistence(__PRIVATE_MemoryEagerDelegate.fi, this.serializer);
|
|
17379
17379
|
}
|
|
17380
|
-
|
|
17380
|
+
bu(e) {
|
|
17381
17381
|
return new __PRIVATE_MemorySharedClientState;
|
|
17382
17382
|
}
|
|
17383
17383
|
async terminate() {
|
|
@@ -17400,7 +17400,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
|
|
|
17400
17400
|
const n = this.persistence.referenceDelegate.garbageCollector;
|
|
17401
17401
|
return new __PRIVATE_LruScheduler(n, e.asyncQueue, t);
|
|
17402
17402
|
}
|
|
17403
|
-
|
|
17403
|
+
Su(e) {
|
|
17404
17404
|
const t = void 0 !== this.cacheSizeBytes ? LruParams.withCacheSize(this.cacheSizeBytes) : LruParams.DEFAULT;
|
|
17405
17405
|
return new __PRIVATE_MemoryPersistence((e => __PRIVATE_MemoryLruDelegate.fi(e, t)), this.serializer);
|
|
17406
17406
|
}
|
|
@@ -17434,11 +17434,11 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
|
|
|
17434
17434
|
const n = new __PRIVATE_IndexBackfiller(t, this.persistence);
|
|
17435
17435
|
return new __PRIVATE_IndexBackfillerScheduler(e.asyncQueue, n);
|
|
17436
17436
|
}
|
|
17437
|
-
|
|
17437
|
+
Su(e) {
|
|
17438
17438
|
const t = __PRIVATE_indexedDbStoragePrefix(e.databaseInfo.databaseId, e.databaseInfo.persistenceKey), n = void 0 !== this.cacheSizeBytes ? LruParams.withCacheSize(this.cacheSizeBytes) : LruParams.DEFAULT;
|
|
17439
17439
|
return new __PRIVATE_IndexedDbPersistence(this.synchronizeTabs, t, e.clientId, n, e.asyncQueue, __PRIVATE_getWindow(), getDocument(), this.serializer, this.sharedClientState, !!this.forceOwnership);
|
|
17440
17440
|
}
|
|
17441
|
-
|
|
17441
|
+
bu(e) {
|
|
17442
17442
|
return new __PRIVATE_MemorySharedClientState;
|
|
17443
17443
|
}
|
|
17444
17444
|
}
|
|
@@ -17471,7 +17471,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOffl
|
|
|
17471
17471
|
this.indexBackfillerScheduler && (e && !this.indexBackfillerScheduler.started ? this.indexBackfillerScheduler.start() : e || this.indexBackfillerScheduler.stop());
|
|
17472
17472
|
}));
|
|
17473
17473
|
}
|
|
17474
|
-
|
|
17474
|
+
bu(e) {
|
|
17475
17475
|
const t = __PRIVATE_getWindow();
|
|
17476
17476
|
if (!__PRIVATE_WebStorageSharedClientState.C(t)) throw new FirestoreError(L.UNIMPLEMENTED, "IndexedDB persistence is only available on platforms that support LocalStorage.");
|
|
17477
17477
|
const n = __PRIVATE_indexedDbStoragePrefix(e.databaseInfo.databaseId, e.databaseInfo.persistenceKey);
|
|
@@ -18991,7 +18991,7 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
18991
18991
|
this.rc = () => {
|
|
18992
18992
|
const e = getDocument();
|
|
18993
18993
|
e && __PRIVATE_logDebug(ln, "Visibility state changed to " + e.visibilityState),
|
|
18994
|
-
this.x_.
|
|
18994
|
+
this.x_.b_();
|
|
18995
18995
|
}, this.sc = e;
|
|
18996
18996
|
const t = getDocument();
|
|
18997
18997
|
t && "function" == typeof t.addEventListener && t.addEventListener("visibilitychange", this.rc);
|
|
@@ -20064,7 +20064,7 @@ function __PRIVATE_isWrite(e) {
|
|
|
20064
20064
|
constructor(e, t, n) {
|
|
20065
20065
|
this.databaseId = e, this.ignoreUndefinedProperties = t, this.serializer = n || __PRIVATE_newSerializer(e);
|
|
20066
20066
|
}
|
|
20067
|
-
/** Creates a new top-level parse context. */
|
|
20067
|
+
/** Creates a new top-level parse context. */ bc(e, t, n, r = !1) {
|
|
20068
20068
|
return new __PRIVATE_ParseContextImpl({
|
|
20069
20069
|
Ic: e,
|
|
20070
20070
|
methodName: t,
|
|
@@ -20082,7 +20082,7 @@ function __PRIVATE_newUserDataReader(e) {
|
|
|
20082
20082
|
}
|
|
20083
20083
|
|
|
20084
20084
|
/** Parse document data from a set() call. */ function __PRIVATE_parseSetData(e, t, n, r, i, s = {}) {
|
|
20085
|
-
const o = e.
|
|
20085
|
+
const o = e.bc(s.merge || s.mergeFields ? 2 /* UserDataSource.MergeSet */ : 0 /* UserDataSource.Set */ , t, n, i);
|
|
20086
20086
|
__PRIVATE_validatePlainObject("Data must be an object, but it was:", o, r);
|
|
20087
20087
|
const _ = __PRIVATE_parseObject(r, o);
|
|
20088
20088
|
let a, u;
|
|
@@ -20145,29 +20145,29 @@ class __PRIVATE_ServerTimestampFieldValueImpl extends FieldValue {
|
|
|
20145
20145
|
|
|
20146
20146
|
class __PRIVATE_ArrayUnionFieldValueImpl extends FieldValue {
|
|
20147
20147
|
constructor(e, t) {
|
|
20148
|
-
super(e), this.
|
|
20148
|
+
super(e), this.Sc = t;
|
|
20149
20149
|
}
|
|
20150
20150
|
_toFieldTransform(e) {
|
|
20151
20151
|
const t = __PRIVATE_createSentinelChildContext(this, e,
|
|
20152
|
-
/*array=*/ !0), n = this.
|
|
20152
|
+
/*array=*/ !0), n = this.Sc.map((e => __PRIVATE_parseData(e, t))), r = new __PRIVATE_ArrayUnionTransformOperation(n);
|
|
20153
20153
|
return new FieldTransform(e.path, r);
|
|
20154
20154
|
}
|
|
20155
20155
|
isEqual(e) {
|
|
20156
|
-
return e instanceof __PRIVATE_ArrayUnionFieldValueImpl && V(this.
|
|
20156
|
+
return e instanceof __PRIVATE_ArrayUnionFieldValueImpl && V(this.Sc, e.Sc);
|
|
20157
20157
|
}
|
|
20158
20158
|
}
|
|
20159
20159
|
|
|
20160
20160
|
class __PRIVATE_ArrayRemoveFieldValueImpl extends FieldValue {
|
|
20161
20161
|
constructor(e, t) {
|
|
20162
|
-
super(e), this.
|
|
20162
|
+
super(e), this.Sc = t;
|
|
20163
20163
|
}
|
|
20164
20164
|
_toFieldTransform(e) {
|
|
20165
20165
|
const t = __PRIVATE_createSentinelChildContext(this, e,
|
|
20166
|
-
/*array=*/ !0), n = this.
|
|
20166
|
+
/*array=*/ !0), n = this.Sc.map((e => __PRIVATE_parseData(e, t))), r = new __PRIVATE_ArrayRemoveTransformOperation(n);
|
|
20167
20167
|
return new FieldTransform(e.path, r);
|
|
20168
20168
|
}
|
|
20169
20169
|
isEqual(e) {
|
|
20170
|
-
return e instanceof __PRIVATE_ArrayRemoveFieldValueImpl && V(this.
|
|
20170
|
+
return e instanceof __PRIVATE_ArrayRemoveFieldValueImpl && V(this.Sc, e.Sc);
|
|
20171
20171
|
}
|
|
20172
20172
|
}
|
|
20173
20173
|
|
|
@@ -20185,7 +20185,7 @@ class __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue {
|
|
|
20185
20185
|
}
|
|
20186
20186
|
|
|
20187
20187
|
/** Parse update data from an update() call. */ function __PRIVATE_parseUpdateData(e, t, n, r) {
|
|
20188
|
-
const i = e.
|
|
20188
|
+
const i = e.bc(1 /* UserDataSource.Update */ , t, n);
|
|
20189
20189
|
__PRIVATE_validatePlainObject("Data must be an object, but it was:", i, r);
|
|
20190
20190
|
const s = [], o = ObjectValue.empty();
|
|
20191
20191
|
forEach(r, ((e, r) => {
|
|
@@ -20206,7 +20206,7 @@ class __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue {
|
|
|
20206
20206
|
}
|
|
20207
20207
|
|
|
20208
20208
|
/** Parse update data from a list of field/value arguments. */ function __PRIVATE_parseUpdateVarargs(e, t, n, r, i, s) {
|
|
20209
|
-
const o = e.
|
|
20209
|
+
const o = e.bc(1 /* UserDataSource.Update */ , t, n), _ = [ __PRIVATE_fieldPathFromArgument$1(t, r, n) ], a = [ i ];
|
|
20210
20210
|
if (s.length % 2 != 0) throw new FirestoreError(L.INVALID_ARGUMENT, `Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);
|
|
20211
20211
|
for (let e = 0; e < s.length; e += 2) _.push(__PRIVATE_fieldPathFromArgument$1(t, s[e])),
|
|
20212
20212
|
a.push(s[e + 1]);
|
|
@@ -20238,7 +20238,7 @@ class __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue {
|
|
|
20238
20238
|
* @param allowArrays - Whether the query value is an array that may directly
|
|
20239
20239
|
* contain additional arrays (e.g. the operand of an `in` query).
|
|
20240
20240
|
*/ function __PRIVATE_parseQueryValue(e, t, n, r = !1) {
|
|
20241
|
-
return __PRIVATE_parseData(n, e.
|
|
20241
|
+
return __PRIVATE_parseData(n, e.bc(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , t));
|
|
20242
20242
|
}
|
|
20243
20243
|
|
|
20244
20244
|
/**
|
|
@@ -22598,8 +22598,8 @@ function _internalQueryToProtoQueryTarget(e) {
|
|
|
22598
22598
|
}
|
|
22599
22599
|
static get instance() {
|
|
22600
22600
|
return dn || (dn = new __PRIVATE_TestingHooksSpiImpl, function __PRIVATE_setTestingHooksSpi(e) {
|
|
22601
|
-
if (
|
|
22602
|
-
|
|
22601
|
+
if (bt) throw new Error("a TestingHooksSpi instance is already set");
|
|
22602
|
+
bt = e;
|
|
22603
22603
|
}(dn)), dn;
|
|
22604
22604
|
}
|
|
22605
22605
|
ht(e) {
|
|
@@ -4,7 +4,7 @@ import { Logger, LogLevel } from '@firebase/logger';
|
|
|
4
4
|
import { FirebaseError, getDefaultEmulatorHostnameAndPort, isCloudWorkstation, pingServer, updateEmulatorBanner, deepEqual, createMockUserToken, getModularInstance } from '@firebase/util';
|
|
5
5
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
|
|
7
|
-
const A = "4.7.17-canary.
|
|
7
|
+
const A = "4.7.17-canary.b97eab36a";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -65,7 +65,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
65
65
|
* See the License for the specific language governing permissions and
|
|
66
66
|
* limitations under the License.
|
|
67
67
|
*/
|
|
68
|
-
let P = "11.9.1-canary.
|
|
68
|
+
let P = "11.9.1-canary.b97eab36a";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
package/dist/lite/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Logger, LogLevel } from '@firebase/logger';
|
|
|
4
4
|
import { FirebaseError, getDefaultEmulatorHostnameAndPort, isCloudWorkstation, pingServer, updateEmulatorBanner, deepEqual, createMockUserToken, getModularInstance } from '@firebase/util';
|
|
5
5
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
|
|
7
|
-
const A = "4.7.17-canary.
|
|
7
|
+
const A = "4.7.17-canary.b97eab36a";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -65,7 +65,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
65
65
|
* See the License for the specific language governing permissions and
|
|
66
66
|
* limitations under the License.
|
|
67
67
|
*/
|
|
68
|
-
let P = "11.9.1-canary.
|
|
68
|
+
let P = "11.9.1-canary.b97eab36a";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
@@ -10,7 +10,7 @@ var util = require('@firebase/util');
|
|
|
10
10
|
var bloomBlob = require('@firebase/webchannel-wrapper/bloom-blob');
|
|
11
11
|
var crypto = require('crypto');
|
|
12
12
|
|
|
13
|
-
const version$1 = "4.7.17-canary.
|
|
13
|
+
const version$1 = "4.7.17-canary.b97eab36a";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -63,7 +63,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
63
63
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
64
64
|
User.MOCK_USER = new User('mock-user');
|
|
65
65
|
|
|
66
|
-
const version = "11.9.1-canary.
|
|
66
|
+
const version = "11.9.1-canary.b97eab36a";
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
package/dist/lite/index.node.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { FirebaseError, getDefaultEmulatorHostnameAndPort, isCloudWorkstation, p
|
|
|
6
6
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
7
7
|
import { randomBytes as randomBytes$1 } from 'crypto';
|
|
8
8
|
|
|
9
|
-
const version$1 = "4.7.17-canary.
|
|
9
|
+
const version$1 = "4.7.17-canary.b97eab36a";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -59,7 +59,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
59
59
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
60
60
|
User.MOCK_USER = new User('mock-user');
|
|
61
61
|
|
|
62
|
-
const version = "11.9.1-canary.
|
|
62
|
+
const version = "11.9.1-canary.b97eab36a";
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
@@ -8,7 +8,7 @@ import { FirebaseError as _, isCloudWorkstation as c, base64 as l, DecodeBase64S
|
|
|
8
8
|
|
|
9
9
|
import { Integer as P } from "@firebase/webchannel-wrapper/bloom-blob";
|
|
10
10
|
|
|
11
|
-
const R = "4.7.17-canary.
|
|
11
|
+
const R = "4.7.17-canary.b97eab36a";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -69,7 +69,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
69
69
|
* See the License for the specific language governing permissions and
|
|
70
70
|
* limitations under the License.
|
|
71
71
|
*/
|
|
72
|
-
let I = "11.9.1-canary.
|
|
72
|
+
let I = "11.9.1-canary.b97eab36a";
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @license
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "4.7.17-canary.
|
|
3
|
+
"version": "4.7.17-canary.b97eab36a",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0"
|
|
6
6
|
},
|
|
@@ -100,21 +100,21 @@
|
|
|
100
100
|
"lite/package.json"
|
|
101
101
|
],
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@firebase/component": "0.6.17-canary.
|
|
104
|
-
"@firebase/logger": "0.4.4-canary.
|
|
105
|
-
"@firebase/util": "1.12.0-canary.
|
|
106
|
-
"@firebase/webchannel-wrapper": "1.0.3-canary.
|
|
103
|
+
"@firebase/component": "0.6.17-canary.b97eab36a",
|
|
104
|
+
"@firebase/logger": "0.4.4-canary.b97eab36a",
|
|
105
|
+
"@firebase/util": "1.12.0-canary.b97eab36a",
|
|
106
|
+
"@firebase/webchannel-wrapper": "1.0.3-canary.b97eab36a",
|
|
107
107
|
"@grpc/grpc-js": "~1.9.0",
|
|
108
108
|
"@grpc/proto-loader": "^0.7.8",
|
|
109
109
|
"tslib": "^2.1.0"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
|
-
"@firebase/app": "0.13.1-canary.
|
|
112
|
+
"@firebase/app": "0.13.1-canary.b97eab36a"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@firebase/app": "0.13.1-canary.
|
|
116
|
-
"@firebase/app-compat": "0.4.1-canary.
|
|
117
|
-
"@firebase/auth": "1.10.7-canary.
|
|
115
|
+
"@firebase/app": "0.13.1-canary.b97eab36a",
|
|
116
|
+
"@firebase/app-compat": "0.4.1-canary.b97eab36a",
|
|
117
|
+
"@firebase/auth": "1.10.7-canary.b97eab36a",
|
|
118
118
|
"@rollup/plugin-alias": "5.1.1",
|
|
119
119
|
"@rollup/plugin-json": "6.1.0",
|
|
120
120
|
"@types/eslint": "7.29.0",
|