@firebase/firestore 3.4.0 → 3.4.1-canary.0db840a09
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/CHANGELOG.md +8 -0
- package/dist/firestore/compat/index.d.ts +1 -1
- package/dist/firestore/src/model/collections.d.ts +1 -1
- package/dist/firestore/src/model/document.d.ts +3 -1
- package/dist/index.esm2017.js +159 -159
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +68 -68
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +14 -21
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +14 -17
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +852 -852
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +3 -1
- package/dist/lite/firestore/compat/index.d.ts +1 -1
- package/dist/lite/firestore/src/model/collections.d.ts +1 -1
- package/dist/lite/firestore/src/model/document.d.ts +3 -1
- package/dist/lite/index.browser.esm2017.js +4 -4
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +4 -4
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +4 -4
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +4 -4
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +61 -61
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +67 -0
- package/dist/lite/packages/firestore/babel-register.d.ts +1 -0
- package/dist/lite/packages/firestore/compat/index.d.ts +1 -1
- package/dist/lite/packages/firestore/src/model/collections.d.ts +1 -1
- package/dist/lite/packages/firestore/src/model/document.d.ts +3 -1
- package/dist/lite/private.d.ts +67 -0
- package/dist/packages/firestore/babel-register.d.ts +1 -0
- package/dist/packages/firestore/compat/index.d.ts +1 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +21 -21
- package/dist/packages/firestore/src/model/collections.d.ts +1 -1
- package/dist/packages/firestore/src/model/document.d.ts +3 -1
- package/dist/private.d.ts +3 -1
- package/package.json +10 -10
package/dist/index.esm5.js
CHANGED
|
@@ -70,7 +70,7 @@ O.MOCK_USER = new O("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
var P = "9.6.
|
|
73
|
+
var P = "9.6.1-canary.0db840a09", F = new h("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -1859,7 +1859,7 @@ var Jt = /** @class */ function() {
|
|
|
1859
1859
|
return 3 /* UNKNOWN_DOCUMENT */ === this.documentType;
|
|
1860
1860
|
}, t.prototype.isEqual = function(e) {
|
|
1861
1861
|
return e instanceof t && this.key.isEqual(e.key) && this.version.isEqual(e.version) && this.documentType === e.documentType && this.documentState === e.documentState && this.data.isEqual(e.data);
|
|
1862
|
-
}, t.prototype.
|
|
1862
|
+
}, t.prototype.mutableCopy = function() {
|
|
1863
1863
|
return new t(this.key, this.documentType, this.version, this.data.clone(), this.documentState);
|
|
1864
1864
|
}, t.prototype.toString = function() {
|
|
1865
1865
|
return "Document(" + this.key + ", " + this.version + ", " + JSON.stringify(this.data.value) + ", {documentType: " + this.documentType + "}), {documentState: " + this.documentState + "})";
|
|
@@ -5194,12 +5194,12 @@ var Br = e(e([], e(e([], e(e([], e(e([], [ Ar.store, Dr.store, Nr.store, Rr.stor
|
|
|
5194
5194
|
// bug we're checking for should exist in iOS >= 12.2 and < 13, but for
|
|
5195
5195
|
// whatever reason it's much harder to hit after 12.2 so we only proactively
|
|
5196
5196
|
// log on 12.2.
|
|
5197
|
-
12.2 === t.
|
|
5197
|
+
12.2 === t.bt(l()) && U("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");
|
|
5198
5198
|
}
|
|
5199
5199
|
/** Deletes the specified database. */ return t.delete = function(t) {
|
|
5200
5200
|
return q("SimpleDb", "Removing database:", t), Xr(window.indexedDB.deleteDatabase(t)).toPromise();
|
|
5201
5201
|
},
|
|
5202
|
-
/** Returns true if IndexedDB is available in the current environment. */ t.
|
|
5202
|
+
/** Returns true if IndexedDB is available in the current environment. */ t.Pt = function() {
|
|
5203
5203
|
if (!E()) return !1;
|
|
5204
5204
|
if (t.vt()) return !0;
|
|
5205
5205
|
// We extensively use indexed array values and compound keys,
|
|
@@ -5209,7 +5209,7 @@ var Br = e(e([], e(e([], e(e([], e(e([], [ Ar.store, Dr.store, Nr.store, Rr.stor
|
|
|
5209
5209
|
// For tracking support of this feature, see here:
|
|
5210
5210
|
// https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/
|
|
5211
5211
|
// Check the UA string to find out the browser.
|
|
5212
|
-
var e = l(), n = t.
|
|
5212
|
+
var e = l(), n = t.bt(e), r = 0 < n && n < 10, i = t.Vt(e), o = 0 < i && i < 4.5;
|
|
5213
5213
|
// IE 10
|
|
5214
5214
|
// ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
|
|
5215
5215
|
// IE 11
|
|
@@ -5233,7 +5233,7 @@ var Br = e(e([], e(e([], e(e([], e(e([], [ Ar.store, Dr.store, Nr.store, Rr.stor
|
|
|
5233
5233
|
},
|
|
5234
5234
|
// visible for testing
|
|
5235
5235
|
/** Parse User Agent to determine iOS version. Returns -1 if not found. */
|
|
5236
|
-
t.
|
|
5236
|
+
t.bt = function(t) {
|
|
5237
5237
|
var e = t.match(/i(?:phone|pad|pod) os ([\d_]+)/i), n = e ? e[1].split("_").slice(0, 2).join(".") : "-1";
|
|
5238
5238
|
return Number(n);
|
|
5239
5239
|
},
|
|
@@ -5574,7 +5574,7 @@ var Br = e(e([], e(e([], e(e([], e(e([], [ Ar.store, Dr.store, Nr.store, Rr.stor
|
|
|
5574
5574
|
var Zr = !1;
|
|
5575
5575
|
|
|
5576
5576
|
function $r(t) {
|
|
5577
|
-
var e = Qr.
|
|
5577
|
+
var e = Qr.bt(l());
|
|
5578
5578
|
if (e >= 12.2 && e < 13) {
|
|
5579
5579
|
var n = "An internal error was encountered in the Indexed Database server";
|
|
5580
5580
|
if (t.message.indexOf(n) >= 0) {
|
|
@@ -7240,7 +7240,7 @@ function Oi(t) {
|
|
|
7240
7240
|
}, t.prototype.getEntry = function(t, e) {
|
|
7241
7241
|
var n = this;
|
|
7242
7242
|
return Yi(t).get(Ji(e)).next((function(t) {
|
|
7243
|
-
return n.
|
|
7243
|
+
return n.be(e, t);
|
|
7244
7244
|
}));
|
|
7245
7245
|
},
|
|
7246
7246
|
/**
|
|
@@ -7249,18 +7249,18 @@ function Oi(t) {
|
|
|
7249
7249
|
* @param documentKey - The key of the entry to look up.
|
|
7250
7250
|
* @returns The cached document entry and its size.
|
|
7251
7251
|
*/
|
|
7252
|
-
t.prototype.
|
|
7252
|
+
t.prototype.Pe = function(t, e) {
|
|
7253
7253
|
var n = this;
|
|
7254
7254
|
return Yi(t).get(Ji(e)).next((function(t) {
|
|
7255
7255
|
return {
|
|
7256
|
-
document: n.
|
|
7256
|
+
document: n.be(e, t),
|
|
7257
7257
|
size: ki(t)
|
|
7258
7258
|
};
|
|
7259
7259
|
}));
|
|
7260
7260
|
}, t.prototype.getEntries = function(t, e) {
|
|
7261
7261
|
var n = this, r = Sn();
|
|
7262
7262
|
return this.ve(t, e, (function(t, e) {
|
|
7263
|
-
var i = n.
|
|
7263
|
+
var i = n.be(t, e);
|
|
7264
7264
|
r = r.insert(t, i);
|
|
7265
7265
|
})).next((function() {
|
|
7266
7266
|
return r;
|
|
@@ -7276,7 +7276,7 @@ function Oi(t) {
|
|
|
7276
7276
|
t.prototype.Ve = function(t, e) {
|
|
7277
7277
|
var n = this, r = Sn(), i = new gn(Lt.comparator);
|
|
7278
7278
|
return this.ve(t, e, (function(t, e) {
|
|
7279
|
-
var o = n.
|
|
7279
|
+
var o = n.be(t, e);
|
|
7280
7280
|
r = r.insert(t, o), i = i.insert(t, ki(e));
|
|
7281
7281
|
})).next((function() {
|
|
7282
7282
|
return {
|
|
@@ -7347,7 +7347,7 @@ function Oi(t) {
|
|
|
7347
7347
|
* Decodes `remoteDoc` and returns the document (or null, if the document
|
|
7348
7348
|
* corresponds to the format used for sentinel deletes).
|
|
7349
7349
|
*/
|
|
7350
|
-
t.prototype.
|
|
7350
|
+
t.prototype.be = function(t, e) {
|
|
7351
7351
|
if (e) {
|
|
7352
7352
|
var n = si(this.k, e);
|
|
7353
7353
|
// Whether the document is a sentinel removal and should only be used in the
|
|
@@ -7397,7 +7397,7 @@ function Oi(t) {
|
|
|
7397
7397
|
}, n.prototype.getFromCache = function(t, e) {
|
|
7398
7398
|
var n = this;
|
|
7399
7399
|
// Record the size of everything we load from the cache so we can compute a delta later.
|
|
7400
|
-
return this.De.
|
|
7400
|
+
return this.De.Pe(t, e).next((function(t) {
|
|
7401
7401
|
return n.Ce.set(e, t.size), t.document;
|
|
7402
7402
|
}));
|
|
7403
7403
|
}, n.prototype.getAllFromCache = function(t, e) {
|
|
@@ -7714,7 +7714,7 @@ var $i = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
7714
7714
|
/** A listener to notify on primary state changes. */
|
|
7715
7715
|
this.We = function(t) {
|
|
7716
7716
|
return Promise.resolve();
|
|
7717
|
-
}, !t.
|
|
7717
|
+
}, !t.Pt()) throw new H(W.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
|
|
7718
7718
|
this.referenceDelegate = new ji(this, i), this.Ge = n + "main", this.k = new oi(u),
|
|
7719
7719
|
this.ze = new Qr(this.Ge, 11, new Xi(this.k)), this.He = new Li(this.referenceDelegate, this.k),
|
|
7720
7720
|
this.Jt = new Ii, this.Je = function(t, e) {
|
|
@@ -8092,8 +8092,8 @@ var $i = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
8092
8092
|
t.prototype.cn = function(t) {
|
|
8093
8093
|
var e = new kr(this.clientId, this.allowTabSynchronization, Date.now());
|
|
8094
8094
|
return eo(t).put(kr.key, e);
|
|
8095
|
-
}, t.
|
|
8096
|
-
return Qr.
|
|
8095
|
+
}, t.Pt = function() {
|
|
8096
|
+
return Qr.Pt();
|
|
8097
8097
|
},
|
|
8098
8098
|
/** Checks the primary lease and removes it if we are the current primary. */ t.prototype.an = function(t) {
|
|
8099
8099
|
var e = this, n = eo(t);
|
|
@@ -8289,10 +8289,10 @@ var io = function(t, e) {
|
|
|
8289
8289
|
return t.prototype.Rn = function(t, e) {
|
|
8290
8290
|
var n = this;
|
|
8291
8291
|
return this.An.getAllMutationBatchesAffectingDocumentKey(t, e).next((function(r) {
|
|
8292
|
-
return n.
|
|
8292
|
+
return n.bn(t, e, r);
|
|
8293
8293
|
}));
|
|
8294
8294
|
},
|
|
8295
|
-
/** Internal version of `getDocument` that allows reusing batches. */ t.prototype.
|
|
8295
|
+
/** Internal version of `getDocument` that allows reusing batches. */ t.prototype.bn = function(t, e, n) {
|
|
8296
8296
|
return this.Je.getEntry(t, e).next((function(t) {
|
|
8297
8297
|
for (var e = 0, r = n; e < r.length; e++) {
|
|
8298
8298
|
r[e].applyToLocalView(t);
|
|
@@ -8302,7 +8302,7 @@ var io = function(t, e) {
|
|
|
8302
8302
|
},
|
|
8303
8303
|
// Returns the view of the given `docs` as they would appear after applying
|
|
8304
8304
|
// all mutations in the given `batches`.
|
|
8305
|
-
t.prototype.
|
|
8305
|
+
t.prototype.Pn = function(t, e) {
|
|
8306
8306
|
t.forEach((function(t, n) {
|
|
8307
8307
|
for (var r = 0, i = e; r < i.length; r++) {
|
|
8308
8308
|
i[r].applyToLocalView(n);
|
|
@@ -8330,7 +8330,7 @@ var io = function(t, e) {
|
|
|
8330
8330
|
t.prototype.Vn = function(t, e) {
|
|
8331
8331
|
var n = this;
|
|
8332
8332
|
return this.An.getAllMutationBatchesAffectingDocumentKeys(t, e).next((function(t) {
|
|
8333
|
-
return n.
|
|
8333
|
+
return n.Pn(e, t);
|
|
8334
8334
|
}));
|
|
8335
8335
|
},
|
|
8336
8336
|
/**
|
|
@@ -9347,7 +9347,7 @@ function To(t) {
|
|
|
9347
9347
|
return t.prototype.addEntry = function(t, e, n) {
|
|
9348
9348
|
var r = e.key, i = this.docs.get(r), o = i ? i.size : 0, s = this.Ts(e);
|
|
9349
9349
|
return this.docs = this.docs.insert(r, {
|
|
9350
|
-
document: e.
|
|
9350
|
+
document: e.mutableCopy(),
|
|
9351
9351
|
size: s,
|
|
9352
9352
|
readTime: n
|
|
9353
9353
|
}), this.size += s - o, this.Jt.addToCollectionParentIndex(t, r.path.popLast());
|
|
@@ -9363,12 +9363,12 @@ function To(t) {
|
|
|
9363
9363
|
e && (this.docs = this.docs.remove(t), this.size -= e.size);
|
|
9364
9364
|
}, t.prototype.getEntry = function(t, e) {
|
|
9365
9365
|
var n = this.docs.get(e);
|
|
9366
|
-
return Gr.resolve(n ? n.document.
|
|
9366
|
+
return Gr.resolve(n ? n.document.mutableCopy() : Jt.newInvalidDocument(e));
|
|
9367
9367
|
}, t.prototype.getEntries = function(t, e) {
|
|
9368
9368
|
var n = this, r = Sn();
|
|
9369
9369
|
return e.forEach((function(t) {
|
|
9370
9370
|
var e = n.docs.get(t);
|
|
9371
|
-
r = r.insert(t, e ? e.document.
|
|
9371
|
+
r = r.insert(t, e ? e.document.mutableCopy() : Jt.newInvalidDocument(t));
|
|
9372
9372
|
})), Gr.resolve(r);
|
|
9373
9373
|
}, t.prototype.getDocumentsMatchingQuery = function(t, e, n) {
|
|
9374
9374
|
for (var r = Sn(), i = new Lt(e.path.child("")), o = this.docs.getIteratorFrom(i)
|
|
@@ -9377,7 +9377,7 @@ function To(t) {
|
|
|
9377
9377
|
; o.hasNext(); ) {
|
|
9378
9378
|
var s = o.getNext(), a = s.key, u = s.value, c = u.document, h = u.readTime;
|
|
9379
9379
|
if (!e.path.isPrefixOf(a.path)) break;
|
|
9380
|
-
h.compareTo(n) <= 0 || xe(e, c) && (r = r.insert(c.key, c.
|
|
9380
|
+
h.compareTo(n) <= 0 || xe(e, c) && (r = r.insert(c.key, c.mutableCopy()));
|
|
9381
9381
|
}
|
|
9382
9382
|
return Gr.resolve(r);
|
|
9383
9383
|
}, t.prototype.Es = function(t, e) {
|
|
@@ -9425,7 +9425,7 @@ function To(t) {
|
|
|
9425
9425
|
* A ordered bidirectional mapping between documents and the remote target
|
|
9426
9426
|
* IDs.
|
|
9427
9427
|
*/
|
|
9428
|
-
this.Rs = new ko, this.targetCount = 0, this.
|
|
9428
|
+
this.Rs = new ko, this.targetCount = 0, this.bs = Ri.ie();
|
|
9429
9429
|
}
|
|
9430
9430
|
return t.prototype.forEachTarget = function(t, e) {
|
|
9431
9431
|
return this.Is.forEach((function(t, n) {
|
|
@@ -9436,14 +9436,14 @@ function To(t) {
|
|
|
9436
9436
|
}, t.prototype.getHighestSequenceNumber = function(t) {
|
|
9437
9437
|
return Gr.resolve(this.As);
|
|
9438
9438
|
}, t.prototype.allocateTargetId = function(t) {
|
|
9439
|
-
return this.highestTargetId = this.
|
|
9439
|
+
return this.highestTargetId = this.bs.next(), Gr.resolve(this.highestTargetId);
|
|
9440
9440
|
}, t.prototype.setTargetsMetadata = function(t, e, n) {
|
|
9441
9441
|
return n && (this.lastRemoteSnapshotVersion = n), e > this.As && (this.As = e),
|
|
9442
9442
|
Gr.resolve();
|
|
9443
9443
|
}, t.prototype.ce = function(t) {
|
|
9444
9444
|
this.Is.set(t.target, t);
|
|
9445
9445
|
var e = t.targetId;
|
|
9446
|
-
e > this.highestTargetId && (this.
|
|
9446
|
+
e > this.highestTargetId && (this.bs = new Ri(e), this.highestTargetId = e), t.sequenceNumber > this.As && (this.As = t.sequenceNumber);
|
|
9447
9447
|
}, t.prototype.addTargetData = function(t, e) {
|
|
9448
9448
|
return this.ce(e), this.targetCount += 1, Gr.resolve();
|
|
9449
9449
|
}, t.prototype.updateTargetData = function(t, e) {
|
|
@@ -9489,7 +9489,7 @@ function To(t) {
|
|
|
9489
9489
|
*/
|
|
9490
9490
|
function t(t, e) {
|
|
9491
9491
|
var n = this;
|
|
9492
|
-
this.
|
|
9492
|
+
this.Ps = {}, this.Be = new ot(0), this.Ue = !1, this.Ue = !0, this.referenceDelegate = t(this),
|
|
9493
9493
|
this.He = new xo(this), this.Jt = new wi, this.Je = function(t, e) {
|
|
9494
9494
|
return new No(t, (function(t) {
|
|
9495
9495
|
return n.referenceDelegate.vs(t);
|
|
@@ -9514,8 +9514,8 @@ function To(t) {
|
|
|
9514
9514
|
}, t.prototype.getIndexManager = function() {
|
|
9515
9515
|
return this.Jt;
|
|
9516
9516
|
}, t.prototype.getMutationQueue = function(t) {
|
|
9517
|
-
var e = this.
|
|
9518
|
-
return e || (e = new Do(this.Jt, this.referenceDelegate), this.
|
|
9517
|
+
var e = this.Ps[t.toKey()];
|
|
9518
|
+
return e || (e = new Do(this.Jt, this.referenceDelegate), this.Ps[t.toKey()] = e),
|
|
9519
9519
|
e;
|
|
9520
9520
|
}, t.prototype.getTargetCache = function() {
|
|
9521
9521
|
return this.He;
|
|
@@ -9535,7 +9535,7 @@ function To(t) {
|
|
|
9535
9535
|
return i.raiseOnCommittedEvent(), t;
|
|
9536
9536
|
}));
|
|
9537
9537
|
}, t.prototype.Ds = function(t, e) {
|
|
9538
|
-
return Gr.or(Object.values(this.
|
|
9538
|
+
return Gr.or(Object.values(this.Ps).map((function(n) {
|
|
9539
9539
|
return function() {
|
|
9540
9540
|
return n.containsKey(t, e);
|
|
9541
9541
|
};
|
|
@@ -9823,7 +9823,7 @@ var Vo = /** @class */ function() {
|
|
|
9823
9823
|
// mutations but before we observe WebStorage events.
|
|
9824
9824
|
this.window.addEventListener("storage", this.Us);
|
|
9825
9825
|
}
|
|
9826
|
-
/** Returns 'true' if WebStorage is available in the current environment. */ return t.
|
|
9826
|
+
/** Returns 'true' if WebStorage is available in the current environment. */ return t.Pt = function(t) {
|
|
9827
9827
|
return !(!t || !t.localStorage);
|
|
9828
9828
|
}, t.prototype.start = function() {
|
|
9829
9829
|
return n(this, void 0, void 0, (function() {
|
|
@@ -10080,30 +10080,30 @@ var Vo = /** @class */ function() {
|
|
|
10080
10080
|
this.Ii = function() {
|
|
10081
10081
|
return t.Ai();
|
|
10082
10082
|
}, this.Ri = function() {
|
|
10083
|
-
return t.
|
|
10084
|
-
}, this.
|
|
10083
|
+
return t.bi();
|
|
10084
|
+
}, this.Pi = [], this.vi();
|
|
10085
10085
|
}
|
|
10086
10086
|
return t.prototype.Ei = function(t) {
|
|
10087
|
-
this.
|
|
10087
|
+
this.Pi.push(t);
|
|
10088
10088
|
}, t.prototype.shutdown = function() {
|
|
10089
10089
|
window.removeEventListener("online", this.Ii), window.removeEventListener("offline", this.Ri);
|
|
10090
10090
|
}, t.prototype.vi = function() {
|
|
10091
10091
|
window.addEventListener("online", this.Ii), window.addEventListener("offline", this.Ri);
|
|
10092
10092
|
}, t.prototype.Ai = function() {
|
|
10093
10093
|
q("ConnectivityMonitor", "Network connectivity changed: AVAILABLE");
|
|
10094
|
-
for (var t = 0, e = this.
|
|
10094
|
+
for (var t = 0, e = this.Pi; t < e.length; t++) {
|
|
10095
10095
|
(0, e[t])(0 /* AVAILABLE */);
|
|
10096
10096
|
}
|
|
10097
|
-
}, t.prototype.
|
|
10097
|
+
}, t.prototype.bi = function() {
|
|
10098
10098
|
q("ConnectivityMonitor", "Network connectivity changed: UNAVAILABLE");
|
|
10099
|
-
for (var t = 0, e = this.
|
|
10099
|
+
for (var t = 0, e = this.Pi; t < e.length; t++) {
|
|
10100
10100
|
(0, e[t])(1 /* UNAVAILABLE */);
|
|
10101
10101
|
}
|
|
10102
10102
|
},
|
|
10103
10103
|
// TODO(chenbrian): Consider passing in window either into this component or
|
|
10104
10104
|
// here for testing via FakeWindow.
|
|
10105
10105
|
/** Checks that all used attributes of window are available. */
|
|
10106
|
-
t.
|
|
10106
|
+
t.Pt = function() {
|
|
10107
10107
|
return "undefined" != typeof window && void 0 !== window.addEventListener && void 0 !== window.removeEventListener;
|
|
10108
10108
|
}, t;
|
|
10109
10109
|
}(), Wo = {
|
|
@@ -10802,7 +10802,7 @@ function Jo() {
|
|
|
10802
10802
|
var e = t.targetChange;
|
|
10803
10803
|
return e.targetIds && e.targetIds.length ? lt.min() : e.readTime ? Hn(e.readTime) : lt.min();
|
|
10804
10804
|
}(t);
|
|
10805
|
-
return this.listener.
|
|
10805
|
+
return this.listener.br(e, n);
|
|
10806
10806
|
},
|
|
10807
10807
|
/**
|
|
10808
10808
|
* Registers interest in the results of the given target. If the target
|
|
@@ -10810,7 +10810,7 @@ function Jo() {
|
|
|
10810
10810
|
* affect the target will be streamed back as WatchChange messages that
|
|
10811
10811
|
* reference the targetId.
|
|
10812
10812
|
*/
|
|
10813
|
-
n.prototype.
|
|
10813
|
+
n.prototype.Pr = function(t) {
|
|
10814
10814
|
var e = {};
|
|
10815
10815
|
e.database = er(this.k), e.addTarget = function(t, e) {
|
|
10816
10816
|
var n, r = e.target;
|
|
@@ -11241,7 +11241,7 @@ e, i, o, s) {
|
|
|
11241
11241
|
* We need to increment the the expected number of pending responses we're due
|
|
11242
11242
|
* from watch so we wait for the ack to process any messages from this target.
|
|
11243
11243
|
*/ function hs(t, e) {
|
|
11244
|
-
t.Yr.X(e.targetId), Ns(t).
|
|
11244
|
+
t.Yr.X(e.targetId), Ns(t).Pr(e)
|
|
11245
11245
|
/**
|
|
11246
11246
|
* We need to increment the expected number of pending responses we're due
|
|
11247
11247
|
* from watch so we wait for the removal on the server before we process any
|
|
@@ -11687,7 +11687,7 @@ function As(t, e) {
|
|
|
11687
11687
|
}(t.datastore, t.asyncQueue, {
|
|
11688
11688
|
Di: vs.bind(null, t),
|
|
11689
11689
|
Ni: ms.bind(null, t),
|
|
11690
|
-
|
|
11690
|
+
br: gs.bind(null, t)
|
|
11691
11691
|
}), t.zr.push((function(i) {
|
|
11692
11692
|
return n(e, void 0, void 0, (function() {
|
|
11693
11693
|
return r(this, (function(e) {
|
|
@@ -12340,7 +12340,7 @@ function Ws(t) {
|
|
|
12340
12340
|
/** Document Keys that have local changes */
|
|
12341
12341
|
this.mutatedKeys = Cn(), this.Ao = Re(t), this.Ro = new Ls(this.Ao);
|
|
12342
12342
|
}
|
|
12343
|
-
return Object.defineProperty(t.prototype, "
|
|
12343
|
+
return Object.defineProperty(t.prototype, "bo", {
|
|
12344
12344
|
/**
|
|
12345
12345
|
* The set of remote documents that the server has told us belongs to the target associated with
|
|
12346
12346
|
* this view.
|
|
@@ -12361,7 +12361,7 @@ function Ws(t) {
|
|
|
12361
12361
|
* with this set of docs and changes instead of the current view.
|
|
12362
12362
|
* @returns a new set of docs, changes, and refill flag.
|
|
12363
12363
|
*/
|
|
12364
|
-
t.prototype.
|
|
12364
|
+
t.prototype.Po = function(t, e) {
|
|
12365
12365
|
var n = this, r = e ? e.vo : new Os, i = e ? e.Ro : this.Ro, o = e ? e.mutatedKeys : this.mutatedKeys, s = i, a = !1, u = be(this.query) && i.size === this.query.limit ? i.last() : null, c = Ie(this.query) && i.size === this.query.limit ? i.first() : null;
|
|
12366
12366
|
// Drop documents out to meet limit/limitToLast requirement.
|
|
12367
12367
|
if (t.inorderTraversal((function(t, e) {
|
|
@@ -12545,7 +12545,7 @@ function Ws(t) {
|
|
|
12545
12545
|
// PORTING NOTE: Multi-tab only.
|
|
12546
12546
|
t.prototype.ko = function(t) {
|
|
12547
12547
|
this.To = t.zn, this.Io = Cn();
|
|
12548
|
-
var e = this.
|
|
12548
|
+
var e = this.Po(t.documents);
|
|
12549
12549
|
return this.applyChanges(e, /*updateLimboDocuments=*/ !0);
|
|
12550
12550
|
},
|
|
12551
12551
|
/**
|
|
@@ -12686,10 +12686,10 @@ function ta(t, e) {
|
|
|
12686
12686
|
return r(this, (function(r) {
|
|
12687
12687
|
switch (r.label) {
|
|
12688
12688
|
case 0:
|
|
12689
|
-
return n = e.view.
|
|
12689
|
+
return n = e.view.Po(i), n.Bn ? [ 4 /*yield*/ , wo(t.localStore, e.query,
|
|
12690
12690
|
/* usePreviousResults= */ !1).then((function(t) {
|
|
12691
12691
|
var r = t.documents;
|
|
12692
|
-
return e.view.
|
|
12692
|
+
return e.view.Po(r, n);
|
|
12693
12693
|
})) ] : [ 3 /*break*/ , 2 ];
|
|
12694
12694
|
|
|
12695
12695
|
case 1:
|
|
@@ -12710,7 +12710,7 @@ function ta(t, e) {
|
|
|
12710
12710
|
/* usePreviousResults= */ !0) ];
|
|
12711
12711
|
|
|
12712
12712
|
case 1:
|
|
12713
|
-
return s = l.sent(), a = new Js(e, s.zn), u = a.
|
|
12713
|
+
return s = l.sent(), a = new Js(e, s.zn), u = a.Po(s.documents), c = On.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* Offline */ !== t.onlineState),
|
|
12714
12714
|
h = a.applyChanges(u,
|
|
12715
12715
|
/* updateLimboDocuments= */ t.isPrimaryClient, c), pa(t, i, h.Co), f = new Xs(e, i, a),
|
|
12716
12716
|
[ 2 /*return*/ , (t.Oo.set(e, f), t.Mo.has(i) ? t.Mo.get(i).push(e) : t.Mo.set(i, [ e ]),
|
|
@@ -12897,7 +12897,7 @@ function ta(t, e) {
|
|
|
12897
12897
|
o[i].ro(e) && (r = !0);
|
|
12898
12898
|
}
|
|
12899
12899
|
})), r && js(n);
|
|
12900
|
-
}(r.eventManager, e), i.length && r.Fo.
|
|
12900
|
+
}(r.eventManager, e), i.length && r.Fo.br(i), r.onlineState = e, r.isPrimaryClient && r.sharedClientState.setOnlineState(e);
|
|
12901
12901
|
}
|
|
12902
12902
|
}
|
|
12903
12903
|
|
|
@@ -13167,7 +13167,7 @@ function ma(t, e, i) {
|
|
|
13167
13167
|
})), [ 4 /*yield*/ , Promise.all(u) ]);
|
|
13168
13168
|
|
|
13169
13169
|
case 1:
|
|
13170
|
-
return c.sent(), o.Fo.
|
|
13170
|
+
return c.sent(), o.Fo.br(s), [ 4 /*yield*/ , function(t, e) {
|
|
13171
13171
|
return n(this, void 0, void 0, (function() {
|
|
13172
13172
|
var n, i, o, s, a, u, c, h, f;
|
|
13173
13173
|
return r(this, (function(r) {
|
|
@@ -13260,7 +13260,7 @@ function wa(t, e) {
|
|
|
13260
13260
|
if (!o) return i;
|
|
13261
13261
|
for (var s = 0, a = o; s < a.length; s++) {
|
|
13262
13262
|
var u = a[s], c = n.Oo.get(u);
|
|
13263
|
-
i = i.unionWith(c.view.
|
|
13263
|
+
i = i.unionWith(c.view.bo);
|
|
13264
13264
|
}
|
|
13265
13265
|
return i;
|
|
13266
13266
|
}
|
|
@@ -13458,7 +13458,7 @@ function Sa(t, e, i) {
|
|
|
13458
13458
|
return s++, [ 3 /*break*/ , 1 ];
|
|
13459
13459
|
|
|
13460
13460
|
case 13:
|
|
13461
|
-
return [ 2 /*return*/ , (n.Fo.
|
|
13461
|
+
return [ 2 /*return*/ , (n.Fo.br(o), i) ];
|
|
13462
13462
|
}
|
|
13463
13463
|
}));
|
|
13464
13464
|
}));
|
|
@@ -13605,7 +13605,7 @@ function Aa(t, e, i, o) {
|
|
|
13605
13605
|
function Na(t) {
|
|
13606
13606
|
var e = Q(t);
|
|
13607
13607
|
return e.remoteStore.remoteSyncer.applyRemoteEvent = ia.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = wa.bind(null, e),
|
|
13608
|
-
e.remoteStore.remoteSyncer.rejectListen = sa.bind(null, e), e.Fo.
|
|
13608
|
+
e.remoteStore.remoteSyncer.rejectListen = sa.bind(null, e), e.Fo.br = Us.bind(null, e.eventManager),
|
|
13609
13609
|
e.Fo.zo = Bs.bind(null, e.eventManager), e;
|
|
13610
13610
|
}
|
|
13611
13611
|
|
|
@@ -13887,7 +13887,7 @@ var Ra = /** @class */ function() {
|
|
|
13887
13887
|
}));
|
|
13888
13888
|
}, i.prototype.Jo = function(t) {
|
|
13889
13889
|
var e = Jo();
|
|
13890
|
-
if (!Ko.
|
|
13890
|
+
if (!Ko.Pt(e)) throw new H(W.UNIMPLEMENTED, "IndexedDB persistence is only available on platforms that support LocalStorage.");
|
|
13891
13891
|
var n = ro(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey);
|
|
13892
13892
|
return new Ko(e, t.asyncQueue, n, t.clientId, t.initialUser);
|
|
13893
13893
|
}, i;
|
|
@@ -13927,7 +13927,7 @@ var Ra = /** @class */ function() {
|
|
|
13927
13927
|
var e, n, r, i, o, s = this;
|
|
13928
13928
|
return e = this.localStore, n = this.datastore, r = t.asyncQueue, i = function(t) {
|
|
13929
13929
|
return oa(s.syncEngine, t, 0 /* RemoteStore */);
|
|
13930
|
-
}, o = Qo.
|
|
13930
|
+
}, o = Qo.Pt() ? new Qo : new zo, new os(e, n, r, i, o);
|
|
13931
13931
|
}, t.prototype.createSyncEngine = function(t, e) {
|
|
13932
13932
|
return function(t, e, n,
|
|
13933
13933
|
// PORTING NOTE: Manages state synchronization in multi-tab environments.
|
|
@@ -15401,9 +15401,9 @@ var bu = /** @class */ function() {
|
|
|
15401
15401
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
15402
15402
|
this.enqueue(t);
|
|
15403
15403
|
}, t.prototype.enqueueAndForgetEvenWhileRestricted = function(t) {
|
|
15404
|
-
this.
|
|
15404
|
+
this.ba(),
|
|
15405
15405
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
15406
|
-
this.
|
|
15406
|
+
this.Pa(t);
|
|
15407
15407
|
}, t.prototype.enterRestrictedMode = function(t) {
|
|
15408
15408
|
if (!this.ya) {
|
|
15409
15409
|
this.ya = !0, this.Ia = t || !1;
|
|
@@ -15412,14 +15412,14 @@ var bu = /** @class */ function() {
|
|
|
15412
15412
|
}
|
|
15413
15413
|
}, t.prototype.enqueue = function(t) {
|
|
15414
15414
|
var e = this;
|
|
15415
|
-
if (this.
|
|
15415
|
+
if (this.ba(), this.ya)
|
|
15416
15416
|
// Return a Promise which never resolves.
|
|
15417
15417
|
return new Promise((function() {}));
|
|
15418
15418
|
// Create a deferred Promise that we can return to the callee. This
|
|
15419
15419
|
// allows us to return a "hanging Promise" only to the callee and still
|
|
15420
15420
|
// advance the queue even when the operation is not run.
|
|
15421
15421
|
var n = new Y;
|
|
15422
|
-
return this.
|
|
15422
|
+
return this.Pa((function() {
|
|
15423
15423
|
return e.ya && e.Ia ? Promise.resolve() : (t().then(n.resolve, n.reject), n.promise);
|
|
15424
15424
|
})).then((function() {
|
|
15425
15425
|
return n.promise;
|
|
@@ -15476,7 +15476,7 @@ var bu = /** @class */ function() {
|
|
|
15476
15476
|
}
|
|
15477
15477
|
}));
|
|
15478
15478
|
}));
|
|
15479
|
-
}, t.prototype.
|
|
15479
|
+
}, t.prototype.Pa = function(t) {
|
|
15480
15480
|
var e = this, n = this.ma.then((function() {
|
|
15481
15481
|
return e.Ea = !0, t().catch((function(t) {
|
|
15482
15482
|
e.Ta = t, e.Ea = !1;
|
|
@@ -15502,14 +15502,14 @@ var bu = /** @class */ function() {
|
|
|
15502
15502
|
return this.ma = n, n;
|
|
15503
15503
|
}, t.prototype.enqueueAfterDelay = function(t, e, n) {
|
|
15504
15504
|
var r = this;
|
|
15505
|
-
this.
|
|
15505
|
+
this.ba(),
|
|
15506
15506
|
// Fast-forward delays for timerIds that have been overriden.
|
|
15507
15507
|
this.Aa.indexOf(t) > -1 && (e = 0);
|
|
15508
15508
|
var i = xs.createAndSchedule(this, t, e, n, (function(t) {
|
|
15509
15509
|
return r.Va(t);
|
|
15510
15510
|
}));
|
|
15511
15511
|
return this.pa.push(i), i;
|
|
15512
|
-
}, t.prototype.
|
|
15512
|
+
}, t.prototype.ba = function() {
|
|
15513
15513
|
this.Ta && K();
|
|
15514
15514
|
}, t.prototype.verifyOperationInProgress = function() {},
|
|
15515
15515
|
/**
|
|
@@ -15870,7 +15870,7 @@ function Ru(t) {
|
|
|
15870
15870
|
return r(this, (function(n) {
|
|
15871
15871
|
switch (n.label) {
|
|
15872
15872
|
case 0:
|
|
15873
|
-
return Qr.
|
|
15873
|
+
return Qr.Pt() ? (e = t + "main", [ 4 /*yield*/ , Qr.delete(e) ]) : [ 2 /*return*/ , Promise.resolve() ];
|
|
15874
15874
|
|
|
15875
15875
|
case 1:
|
|
15876
15876
|
return n.sent(), [ 2 /*return*/ ];
|
|
@@ -17936,7 +17936,7 @@ function nh(t) {
|
|
|
17936
17936
|
/* usePreviousResults= */ !0) ];
|
|
17937
17937
|
|
|
17938
17938
|
case 1:
|
|
17939
|
-
return n = r.sent(), o = new Js(e, n.zn), s = o.
|
|
17939
|
+
return n = r.sent(), o = new Js(e, n.zn), s = o.Po(n.documents), a = o.applyChanges(s,
|
|
17940
17940
|
/* updateLimboDocuments= */ !1), i.resolve(a.snapshot), [ 3 /*break*/ , 3 ];
|
|
17941
17941
|
|
|
17942
17942
|
case 2:
|
|
@@ -18432,9 +18432,9 @@ void 0 === lh && (lh = !0), P = i, o(new c("firestore", (function(t, e) {
|
|
|
18432
18432
|
return n = Object.assign({
|
|
18433
18433
|
useFetchStreams: lh
|
|
18434
18434
|
}, n), i._setSettings(n), i;
|
|
18435
|
-
}), "PUBLIC"
|
|
18435
|
+
}), "PUBLIC")), s(L, "3.4.1-canary.0db840a09", void 0),
|
|
18436
18436
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
18437
|
-
s(L, "3.4.
|
|
18437
|
+
s(L, "3.4.1-canary.0db840a09", "esm5");
|
|
18438
18438
|
|
|
18439
18439
|
export { Qc as AbstractUserDataWriter, ju as Bytes, Eu as CACHE_SIZE_UNLIMITED, pu as CollectionReference, lu as DocumentReference, Ic as DocumentSnapshot, Uu as FieldPath, Ku as FieldValue, Su as Firestore, H as FirestoreError, Gu as GeoPoint, Tu as LoadBundleTask, du as Query, Ac as QueryConstraint, Tc as QueryDocumentSnapshot, Ec as QuerySnapshot, bc as SnapshotMetadata, ft as Timestamp, dh as Transaction, Yc as WriteBatch, tu as _DatabaseId, Lt as _DocumentKey, it as _EmptyAppCheckTokenProvider, X as _EmptyAuthCredentialsProvider, wt as _FieldPath, au as _cast, z as _debugAssert, It as _isBase64Available, B as _logWarn, ru as _validateIsNotUsedTogether, ah as addDoc, gh as arrayRemove, mh as arrayUnion, Ru as clearIndexedDbPersistence, yu as collection, vu as collectionGroup, fu as connectFirestoreEmulator, sh as deleteDoc, yh as deleteField, Pu as disableNetwork, mu as doc, Bu as documentId, Nu as enableIndexedDbPersistence, Cu as enableMultiTabIndexedDbPersistence, Ou as enableNetwork, Bc as endAt, Uc as endBefore, Au as ensureFirestoreConfigured, hh as executeWrite, Xc as getDoc, $c as getDocFromCache, th as getDocFromServer, eh as getDocs, nh as getDocsFromCache, rh as getDocsFromServer, ku as getFirestore, wh as increment, _u as initializeFirestore, Oc as limit, Pc as limitToLast, Mu as loadBundle, Vu as namedQuery, uh as onSnapshot, ch as onSnapshotsInSync, Rc as orderBy, Dc as query, wu as queryEqual, gu as refEqual, ph as runTransaction, vh as serverTimestamp, ih as setDoc, V as setLogLevel, _c as snapshotEqual, Vc as startAfter, Mc as startAt, Fu as terminate, oh as updateDoc, Lu as waitForPendingWrites, Cc as where, bh as writeBatch };
|
|
18440
18440
|
//# sourceMappingURL=index.esm5.js.map
|