@firebase/firestore 3.4.8-canary.477815d4e → 3.4.8-canary.69baecadd
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.esm2017.js +133 -133
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +56 -56
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3 -3
- package/dist/lite/index.browser.esm2017.js +73 -73
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +8 -8
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +18 -18
- package/dist/packages/firestore/dist/index.esm2017.d.ts +11 -11
- package/package.json +9 -9
package/dist/index.esm5.js
CHANGED
|
@@ -70,7 +70,7 @@ V.MOCK_USER = new V("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.
|
|
73
|
+
var P = "9.7.0-canary.69baecadd", O = new l("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -5242,7 +5242,7 @@ function Ur(t) {
|
|
|
5242
5242
|
}), t.prototype.abort = function(t) {
|
|
5243
5243
|
t && this.At.reject(t), this.aborted || (U("SimpleDb", "Aborting transaction:", t ? t.message : "Client-initiated abort"),
|
|
5244
5244
|
this.aborted = !0, this.transaction.abort());
|
|
5245
|
-
}, t.prototype.
|
|
5245
|
+
}, t.prototype.bt = function() {
|
|
5246
5246
|
// If the browser supports V3 IndexedDB, we invoke commit() explicitly to
|
|
5247
5247
|
// speed up index DB processing if the event loop remains blocks.
|
|
5248
5248
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -5273,7 +5273,7 @@ function Ur(t) {
|
|
|
5273
5273
|
* objectstores.
|
|
5274
5274
|
*/
|
|
5275
5275
|
function t(e, n, r) {
|
|
5276
|
-
this.name = e, this.version = n, this.
|
|
5276
|
+
this.name = e, this.version = n, this.Pt = r,
|
|
5277
5277
|
// NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the
|
|
5278
5278
|
// bug we're checking for should exist in iOS >= 12.2 and < 13, but for
|
|
5279
5279
|
// whatever reason it's much harder to hit after 12.2 so we only proactively
|
|
@@ -5355,7 +5355,7 @@ function Ur(t) {
|
|
|
5355
5355
|
}, i.onupgradeneeded = function(t) {
|
|
5356
5356
|
U("SimpleDb", 'Database "' + n.name + '" requires upgrade from version:', t.oldVersion);
|
|
5357
5357
|
var e = t.target.result;
|
|
5358
|
-
n.
|
|
5358
|
+
n.Pt.kt(e, i.transaction, t.oldVersion, n.version).next((function() {
|
|
5359
5359
|
U("SimpleDb", "Database upgrade to version " + n.version + " complete");
|
|
5360
5360
|
}));
|
|
5361
5361
|
};
|
|
@@ -5396,7 +5396,7 @@ function Ur(t) {
|
|
|
5396
5396
|
// fire), but still return the original transactionFnResult back to the
|
|
5397
5397
|
// caller.
|
|
5398
5398
|
return a.db = r.sent(), e = yi.open(a.db, t, n ? "readonly" : "readwrite", i), s = o(e).next((function(t) {
|
|
5399
|
-
return e.
|
|
5399
|
+
return e.bt(), t;
|
|
5400
5400
|
})).catch((function(t) {
|
|
5401
5401
|
// Abort the transaction if there was an error.
|
|
5402
5402
|
return e.abort(t), vi.reject(t);
|
|
@@ -6378,8 +6378,8 @@ var Xi = /** @class */ function() {
|
|
|
6378
6378
|
* Writes the "infinity" byte sequence that sorts after all other byte
|
|
6379
6379
|
* sequences written in ascending order.
|
|
6380
6380
|
*/
|
|
6381
|
-
t.prototype.
|
|
6382
|
-
this.
|
|
6381
|
+
t.prototype.be = function() {
|
|
6382
|
+
this.Pe(255), this.Pe(255);
|
|
6383
6383
|
},
|
|
6384
6384
|
/**
|
|
6385
6385
|
* Writes the "infinity" byte sequence that sorts before all other byte
|
|
@@ -6423,16 +6423,16 @@ var Xi = /** @class */ function() {
|
|
|
6423
6423
|
},
|
|
6424
6424
|
/** Writes a single byte ascending to the buffer. */ t.prototype._e = function(t) {
|
|
6425
6425
|
var e = 255 & t;
|
|
6426
|
-
0 === e ? (this.
|
|
6426
|
+
0 === e ? (this.Pe(0), this.Pe(255)) : 255 === e ? (this.Pe(255), this.Pe(0)) : this.Pe(e);
|
|
6427
6427
|
},
|
|
6428
6428
|
/** Writes a single byte descending to the buffer. */ t.prototype.ge = function(t) {
|
|
6429
6429
|
var e = 255 & t;
|
|
6430
6430
|
0 === e ? (this.ve(0), this.ve(255)) : 255 === e ? (this.ve(255), this.ve(0)) : this.ve(t);
|
|
6431
6431
|
}, t.prototype.we = function() {
|
|
6432
|
-
this.
|
|
6432
|
+
this.Pe(0), this.Pe(1);
|
|
6433
6433
|
}, t.prototype.ye = function() {
|
|
6434
6434
|
this.ve(0), this.ve(1);
|
|
6435
|
-
}, t.prototype.
|
|
6435
|
+
}, t.prototype.Pe = function(t) {
|
|
6436
6436
|
this.Ae(1), this.buffer[this.position++] = t;
|
|
6437
6437
|
}, t.prototype.ve = function(t) {
|
|
6438
6438
|
this.Ae(1), this.buffer[this.position++] = ~t;
|
|
@@ -6460,7 +6460,7 @@ var Xi = /** @class */ function() {
|
|
|
6460
6460
|
}, t.prototype.se = function(t) {
|
|
6461
6461
|
this.De.Te(t);
|
|
6462
6462
|
}, t.prototype.ee = function() {
|
|
6463
|
-
this.De.
|
|
6463
|
+
this.De.be();
|
|
6464
6464
|
}, t;
|
|
6465
6465
|
}(), $i = /** @class */ function() {
|
|
6466
6466
|
function t(t) {
|
|
@@ -7939,10 +7939,10 @@ function So(t) {
|
|
|
7939
7939
|
function t(t) {
|
|
7940
7940
|
this.An = t, this.buffer = new we(Ao), this.Rn = 0;
|
|
7941
7941
|
}
|
|
7942
|
-
return t.prototype.
|
|
7942
|
+
return t.prototype.bn = function() {
|
|
7943
7943
|
return ++this.Rn;
|
|
7944
|
-
}, t.prototype.
|
|
7945
|
-
var e = [ t, this.
|
|
7944
|
+
}, t.prototype.Pn = function(t) {
|
|
7945
|
+
var e = [ t, this.bn() ];
|
|
7946
7946
|
if (this.buffer.size < this.An) this.buffer = this.buffer.add(e); else {
|
|
7947
7947
|
var n = this.buffer.last();
|
|
7948
7948
|
Ao(e, n) < 0 && (this.buffer = this.buffer.delete(n).add(e));
|
|
@@ -8026,10 +8026,10 @@ function So(t) {
|
|
|
8026
8026
|
if (0 === e) return vi.resolve(ut.A);
|
|
8027
8027
|
var r = new xo(e);
|
|
8028
8028
|
return this.Dn.forEachTarget(t, (function(t) {
|
|
8029
|
-
return r.
|
|
8029
|
+
return r.Pn(t.sequenceNumber);
|
|
8030
8030
|
})).next((function() {
|
|
8031
8031
|
return n.Dn.xn(t, (function(t) {
|
|
8032
|
-
return r.
|
|
8032
|
+
return r.Pn(t);
|
|
8033
8033
|
}));
|
|
8034
8034
|
})).next((function() {
|
|
8035
8035
|
return r.maxValue;
|
|
@@ -9072,7 +9072,7 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9072
9072
|
})).next((function(n) {
|
|
9073
9073
|
return t.isPrimary && !n ? t.Rs(e).next((function() {
|
|
9074
9074
|
return !1;
|
|
9075
|
-
})) : !!n && t.
|
|
9075
|
+
})) : !!n && t.bs(e).next((function() {
|
|
9076
9076
|
return !0;
|
|
9077
9077
|
}));
|
|
9078
9078
|
}));
|
|
@@ -9092,7 +9092,7 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9092
9092
|
}, t.prototype.Es = function(t) {
|
|
9093
9093
|
var e = this;
|
|
9094
9094
|
return Qo(t).get("owner").next((function(t) {
|
|
9095
|
-
return vi.resolve(e.
|
|
9095
|
+
return vi.resolve(e.Ps(t));
|
|
9096
9096
|
}));
|
|
9097
9097
|
}, t.prototype.Vs = function(t) {
|
|
9098
9098
|
return Wo(t).delete(this.clientId);
|
|
@@ -9155,7 +9155,7 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9155
9155
|
}));
|
|
9156
9156
|
}));
|
|
9157
9157
|
},
|
|
9158
|
-
/** Checks whether `client` is the local client. */ t.prototype.
|
|
9158
|
+
/** Checks whether `client` is the local client. */ t.prototype.Ps = function(t) {
|
|
9159
9159
|
return !!t && t.ownerId === this.clientId;
|
|
9160
9160
|
},
|
|
9161
9161
|
/**
|
|
@@ -9178,8 +9178,8 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9178
9178
|
// the foreground.
|
|
9179
9179
|
// - the `forceOwningTab` setting was passed in.
|
|
9180
9180
|
if (null !== n && e.Ss(n.leaseTimestampMs, 5e3) && !e.xs(n.ownerId)) {
|
|
9181
|
-
if (e.
|
|
9182
|
-
if (!e.
|
|
9181
|
+
if (e.Ps(n) && e.networkEnabled) return !0;
|
|
9182
|
+
if (!e.Ps(n)) {
|
|
9183
9183
|
if (!n.allowTabSynchronization)
|
|
9184
9184
|
// Fail the `canActAsPrimary` check if the current leaseholder has
|
|
9185
9185
|
// not opted into multi-tab synchronization. If this happens at
|
|
@@ -9301,7 +9301,7 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9301
9301
|
})), new Y(H.FAILED_PRECONDITION, di);
|
|
9302
9302
|
return n(o);
|
|
9303
9303
|
})).next((function(t) {
|
|
9304
|
-
return r.
|
|
9304
|
+
return r.bs(o).next((function() {
|
|
9305
9305
|
return t;
|
|
9306
9306
|
}));
|
|
9307
9307
|
})) : r.$s(o).next((function() {
|
|
@@ -9320,14 +9320,14 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9320
9320
|
t.prototype.$s = function(t) {
|
|
9321
9321
|
var e = this;
|
|
9322
9322
|
return Qo(t).get("owner").next((function(t) {
|
|
9323
|
-
if (null !== t && e.Ss(t.leaseTimestampMs, 5e3) && !e.xs(t.ownerId) && !e.
|
|
9323
|
+
if (null !== t && e.Ss(t.leaseTimestampMs, 5e3) && !e.xs(t.ownerId) && !e.Ps(t) && !(e.Zn || e.allowTabSynchronization && t.allowTabSynchronization)) throw new Y(H.FAILED_PRECONDITION, jo);
|
|
9324
9324
|
}));
|
|
9325
9325
|
},
|
|
9326
9326
|
/**
|
|
9327
9327
|
* Obtains or extends the new primary lease for the local client. This
|
|
9328
9328
|
* method does not verify that the client is eligible for this lease.
|
|
9329
9329
|
*/
|
|
9330
|
-
t.prototype.
|
|
9330
|
+
t.prototype.bs = function(t) {
|
|
9331
9331
|
var e = {
|
|
9332
9332
|
ownerId: this.clientId,
|
|
9333
9333
|
allowTabSynchronization: this.allowTabSynchronization,
|
|
@@ -9340,7 +9340,7 @@ var jo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9340
9340
|
/** Checks the primary lease and removes it if we are the current primary. */ t.prototype.Rs = function(t) {
|
|
9341
9341
|
var e = this, n = Qo(t);
|
|
9342
9342
|
return n.get("owner").next((function(t) {
|
|
9343
|
-
return e.
|
|
9343
|
+
return e.Ps(t) ? (U("IndexedDbPersistence", "Releasing primary lease."), n.delete("owner")) : vi.resolve();
|
|
9344
9344
|
}));
|
|
9345
9345
|
},
|
|
9346
9346
|
/** Verifies that `updateTimeMs` is within `maxAgeMs`. */ t.prototype.Ss = function(t, e) {
|
|
@@ -10414,7 +10414,7 @@ function hu(t, e, n) {
|
|
|
10414
10414
|
var n = new mu(t, e);
|
|
10415
10415
|
this.Ti = this.Ti.add(n), this.Ai = this.Ai.add(n);
|
|
10416
10416
|
},
|
|
10417
|
-
/** Add references to the given document keys for the given ID. */ t.prototype.
|
|
10417
|
+
/** Add references to the given document keys for the given ID. */ t.prototype.bi = function(t, e) {
|
|
10418
10418
|
var n = this;
|
|
10419
10419
|
t.forEach((function(t) {
|
|
10420
10420
|
return n.addReference(t, e);
|
|
@@ -10425,7 +10425,7 @@ function hu(t, e, n) {
|
|
|
10425
10425
|
* ID.
|
|
10426
10426
|
*/
|
|
10427
10427
|
t.prototype.removeReference = function(t, e) {
|
|
10428
|
-
this.
|
|
10428
|
+
this.Pi(new mu(t, e));
|
|
10429
10429
|
}, t.prototype.Vi = function(t, e) {
|
|
10430
10430
|
var n = this;
|
|
10431
10431
|
t.forEach((function(t) {
|
|
@@ -10439,14 +10439,14 @@ function hu(t, e, n) {
|
|
|
10439
10439
|
t.prototype.vi = function(t) {
|
|
10440
10440
|
var e = this, n = new Pt(new gt([])), r = new mu(n, t), i = new mu(n, t + 1), o = [];
|
|
10441
10441
|
return this.Ai.forEachInRange([ r, i ], (function(t) {
|
|
10442
|
-
e.
|
|
10442
|
+
e.Pi(t), o.push(t.key);
|
|
10443
10443
|
})), o;
|
|
10444
10444
|
}, t.prototype.Si = function() {
|
|
10445
10445
|
var t = this;
|
|
10446
10446
|
this.Ti.forEach((function(e) {
|
|
10447
|
-
return t.
|
|
10447
|
+
return t.Pi(e);
|
|
10448
10448
|
}));
|
|
10449
|
-
}, t.prototype.
|
|
10449
|
+
}, t.prototype.Pi = function(t) {
|
|
10450
10450
|
this.Ti = this.Ti.delete(t), this.Ai = this.Ai.delete(t);
|
|
10451
10451
|
}, t.prototype.Di = function(t) {
|
|
10452
10452
|
var e = new Pt(new gt([])), n = new mu(e, t), r = new mu(e, t + 1), i = $n();
|
|
@@ -10748,7 +10748,7 @@ function hu(t, e, n) {
|
|
|
10748
10748
|
var n = this.Li.get(e) || null;
|
|
10749
10749
|
return vi.resolve(n);
|
|
10750
10750
|
}, t.prototype.addMatchingKeys = function(t, e, n) {
|
|
10751
|
-
return this.qi.
|
|
10751
|
+
return this.qi.bi(e, n), vi.resolve();
|
|
10752
10752
|
}, t.prototype.removeMatchingKeys = function(t, e, n) {
|
|
10753
10753
|
this.qi.Vi(e, n);
|
|
10754
10754
|
var r = this.persistence.referenceDelegate, i = [];
|
|
@@ -11156,7 +11156,7 @@ var Au = /** @class */ function() {
|
|
|
11156
11156
|
}, t.prototype.clearQueryState = function(t) {
|
|
11157
11157
|
this.removeItem(Du(this.persistenceKey, t));
|
|
11158
11158
|
}, t.prototype.updateQueryState = function(t, e, n) {
|
|
11159
|
-
this.
|
|
11159
|
+
this.br(t, e, n);
|
|
11160
11160
|
}, t.prototype.handleUserChange = function(t, e, n) {
|
|
11161
11161
|
var r = this;
|
|
11162
11162
|
e.forEach((function(t) {
|
|
@@ -11165,7 +11165,7 @@ var Au = /** @class */ function() {
|
|
|
11165
11165
|
r.addPendingMutation(t);
|
|
11166
11166
|
}));
|
|
11167
11167
|
}, t.prototype.setOnlineState = function(t) {
|
|
11168
|
-
this.
|
|
11168
|
+
this.Pr(t);
|
|
11169
11169
|
}, t.prototype.notifyBundleLoaded = function(t) {
|
|
11170
11170
|
this.Vr(t);
|
|
11171
11171
|
}, t.prototype.shutdown = function() {
|
|
@@ -11249,13 +11249,13 @@ var Au = /** @class */ function() {
|
|
|
11249
11249
|
}, t.prototype.Ar = function(t) {
|
|
11250
11250
|
var e = Nu(this.persistenceKey, this.currentUser, t);
|
|
11251
11251
|
this.removeItem(e);
|
|
11252
|
-
}, t.prototype.
|
|
11252
|
+
}, t.prototype.Pr = function(t) {
|
|
11253
11253
|
var e = {
|
|
11254
11254
|
clientId: this.ir,
|
|
11255
11255
|
onlineState: t
|
|
11256
11256
|
};
|
|
11257
11257
|
this.storage.setItem(this.mr, JSON.stringify(e));
|
|
11258
|
-
}, t.prototype.
|
|
11258
|
+
}, t.prototype.br = function(t, e, n) {
|
|
11259
11259
|
var r = Du(this.persistenceKey, t), i = new xu(t, e, n);
|
|
11260
11260
|
this.setItem(r, i.er());
|
|
11261
11261
|
}, t.prototype.Vr = function(t) {
|
|
@@ -11786,7 +11786,7 @@ function Uu() {
|
|
|
11786
11786
|
this.cancel();
|
|
11787
11787
|
// First schedule using the current base (which may be 0 and should be
|
|
11788
11788
|
// honored as such).
|
|
11789
|
-
var n = Math.floor(this.Io + this.
|
|
11789
|
+
var n = Math.floor(this.Io + this.bo()), r = Math.max(0, Date.now() - this.Eo), i = Math.max(0, n - r);
|
|
11790
11790
|
// Guard against lastAttemptTime being in the future due to a clock change.
|
|
11791
11791
|
i > 0 && U("ExponentialBackoff", "Backing off for " + i + " ms (base delay: " + this.Io + " ms, delay with jitter: " + n + " ms, last attempt: " + r + " ms ago)"),
|
|
11792
11792
|
this.To = this.Yn.enqueueAfterDelay(this.timerId, i, (function() {
|
|
@@ -11795,12 +11795,12 @@ function Uu() {
|
|
|
11795
11795
|
// Apply backoff factor to determine next delay and ensure it is within
|
|
11796
11796
|
// bounds.
|
|
11797
11797
|
this.Io *= this.yo, this.Io < this.mo && (this.Io = this.mo), this.Io > this.po && (this.Io = this.po);
|
|
11798
|
-
}, t.prototype.
|
|
11798
|
+
}, t.prototype.Po = function() {
|
|
11799
11799
|
null !== this.To && (this.To.skipDelay(), this.To = null);
|
|
11800
11800
|
}, t.prototype.cancel = function() {
|
|
11801
11801
|
null !== this.To && (this.To.cancel(), this.To = null);
|
|
11802
11802
|
},
|
|
11803
|
-
/** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ t.prototype.
|
|
11803
|
+
/** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ t.prototype.bo = function() {
|
|
11804
11804
|
return (Math.random() - .5) * this.Io;
|
|
11805
11805
|
}, t;
|
|
11806
11806
|
}(), ju = /** @class */ function() {
|
|
@@ -13350,7 +13350,7 @@ var Es = /** @class */ function() {
|
|
|
13350
13350
|
}, As = function() {
|
|
13351
13351
|
this.queries = new jn((function(t) {
|
|
13352
13352
|
return tn(t);
|
|
13353
|
-
}), Ze), this.onlineState = "Unknown" /* Unknown */ , this.
|
|
13353
|
+
}), Ze), this.onlineState = "Unknown" /* Unknown */ , this.bu = new Set;
|
|
13354
13354
|
};
|
|
13355
13355
|
|
|
13356
13356
|
/**
|
|
@@ -13395,7 +13395,7 @@ var Es = /** @class */ function() {
|
|
|
13395
13395
|
case 4:
|
|
13396
13396
|
return n.queries.set(i, u), u.listeners.push(e),
|
|
13397
13397
|
// Run global snapshot listeners if a consistent snapshot has been emitted.
|
|
13398
|
-
e.
|
|
13398
|
+
e.Pu(n.onlineState), u.Ru && e.Vu(u.Ru) && Rs(n), [ 2 /*return*/ ];
|
|
13399
13399
|
}
|
|
13400
13400
|
}));
|
|
13401
13401
|
}));
|
|
@@ -13436,7 +13436,7 @@ function Ms(t, e, n) {
|
|
|
13436
13436
|
|
|
13437
13437
|
// Call all global snapshot listeners that have been set.
|
|
13438
13438
|
function Rs(t) {
|
|
13439
|
-
t.
|
|
13439
|
+
t.bu.forEach((function(t) {
|
|
13440
13440
|
t.next();
|
|
13441
13441
|
}));
|
|
13442
13442
|
}
|
|
@@ -13478,7 +13478,7 @@ function Rs(t) {
|
|
|
13478
13478
|
}, t.prototype.onError = function(t) {
|
|
13479
13479
|
this.vu.error(t);
|
|
13480
13480
|
},
|
|
13481
|
-
/** Returns whether a snapshot was raised. */ t.prototype.
|
|
13481
|
+
/** Returns whether a snapshot was raised. */ t.prototype.Pu = function(t) {
|
|
13482
13482
|
this.onlineState = t;
|
|
13483
13483
|
var e = !1;
|
|
13484
13484
|
return this.Du && !this.Su && this.xu(this.Du, t) && (this.Nu(this.Du), e = !0),
|
|
@@ -13809,7 +13809,7 @@ function Fs(t) {
|
|
|
13809
13809
|
* Applies an OnlineState change to the view, potentially generating a
|
|
13810
13810
|
* ViewChange if the view's syncState changes as a result.
|
|
13811
13811
|
*/
|
|
13812
|
-
t.prototype.
|
|
13812
|
+
t.prototype.Pu = function(t) {
|
|
13813
13813
|
return this.current && "Offline" /* Offline */ === t ? (
|
|
13814
13814
|
// If we're offline, set `current` to false and then call applyChanges()
|
|
13815
13815
|
// to refresh our syncState and generate a ViewChange as appropriate. We
|
|
@@ -14225,7 +14225,7 @@ function zs(t, e) {
|
|
|
14225
14225
|
if (r.isPrimaryClient && 0 /* RemoteStore */ === n || !r.isPrimaryClient && 1 /* SharedClientState */ === n) {
|
|
14226
14226
|
var i = [];
|
|
14227
14227
|
r.ia.forEach((function(t, n) {
|
|
14228
|
-
var r = n.view.
|
|
14228
|
+
var r = n.view.Pu(e);
|
|
14229
14229
|
r.snapshot && i.push(r.snapshot);
|
|
14230
14230
|
})), function(t, e) {
|
|
14231
14231
|
var n = W(t);
|
|
@@ -14234,7 +14234,7 @@ function zs(t, e) {
|
|
|
14234
14234
|
n.queries.forEach((function(t, n) {
|
|
14235
14235
|
for (var i = 0, o = n.listeners; i < o.length; i++) {
|
|
14236
14236
|
// Run global snapshot listeners if a consistent snapshot has been emitted.
|
|
14237
|
-
o[i].
|
|
14237
|
+
o[i].Pu(e) && (r = !0);
|
|
14238
14238
|
}
|
|
14239
14239
|
})), r && Rs(n);
|
|
14240
14240
|
}(r.eventManager, e), i.length && r.sa.zo(i), r.onlineState = e, r.isPrimaryClient && r.sharedClientState.setOnlineState(e);
|
|
@@ -15425,9 +15425,9 @@ function Da(t, e) {
|
|
|
15425
15425
|
* Internal buffer to hold bundle content, accumulating incomplete element
|
|
15426
15426
|
* content.
|
|
15427
15427
|
*/
|
|
15428
|
-
this.buffer = new Uint8Array, this.
|
|
15428
|
+
this.buffer = new Uint8Array, this.ba = new TextDecoder("utf-8"),
|
|
15429
15429
|
// Read the metadata (which is the first element).
|
|
15430
|
-
this.
|
|
15430
|
+
this.Pa().then((function(t) {
|
|
15431
15431
|
t && t.Mu() ? n.metadata.resolve(t.payload.metadata) : n.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n " + JSON.stringify(null == t ? void 0 : t.payload)));
|
|
15432
15432
|
}), (function(t) {
|
|
15433
15433
|
return n.metadata.reject(t);
|
|
@@ -15450,7 +15450,7 @@ function Da(t, e) {
|
|
|
15450
15450
|
|
|
15451
15451
|
case 1:
|
|
15452
15452
|
// Makes sure metadata is read before proceeding.
|
|
15453
|
-
return [ 2 /*return*/ , (t.sent(), this.
|
|
15453
|
+
return [ 2 /*return*/ , (t.sent(), this.Pa()) ];
|
|
15454
15454
|
}
|
|
15455
15455
|
}));
|
|
15456
15456
|
}));
|
|
@@ -15465,7 +15465,7 @@ function Da(t, e) {
|
|
|
15465
15465
|
* Returns either the bundled element, or null if we have reached the end of
|
|
15466
15466
|
* the stream.
|
|
15467
15467
|
*/
|
|
15468
|
-
t.prototype.
|
|
15468
|
+
t.prototype.Pa = function() {
|
|
15469
15469
|
return n(this, void 0, void 0, (function() {
|
|
15470
15470
|
var t, e, n, i;
|
|
15471
15471
|
return r(this, (function(r) {
|
|
@@ -15474,7 +15474,7 @@ function Da(t, e) {
|
|
|
15474
15474
|
return [ 4 /*yield*/ , this.Va() ];
|
|
15475
15475
|
|
|
15476
15476
|
case 1:
|
|
15477
|
-
return null === (t = r.sent()) ? [ 2 /*return*/ , null ] : (e = this.
|
|
15477
|
+
return null === (t = r.sent()) ? [ 2 /*return*/ , null ] : (e = this.ba.decode(t),
|
|
15478
15478
|
n = Number(e), isNaN(n) && this.va("length string (" + e + ") is not valid number"),
|
|
15479
15479
|
[ 4 /*yield*/ , this.Sa(n) ]);
|
|
15480
15480
|
|
|
@@ -15545,7 +15545,7 @@ function Da(t, e) {
|
|
|
15545
15545
|
|
|
15546
15546
|
case 3:
|
|
15547
15547
|
// Update the internal buffer to drop the read json string.
|
|
15548
|
-
return e = this.
|
|
15548
|
+
return e = this.ba.decode(this.buffer.slice(0, t)), [ 2 /*return*/ , (this.buffer = this.buffer.slice(t),
|
|
15549
15549
|
e) ];
|
|
15550
15550
|
}
|
|
15551
15551
|
}));
|
|
@@ -16648,7 +16648,7 @@ var cc = /** @class */ function() {
|
|
|
16648
16648
|
// after page comes into foreground.
|
|
16649
16649
|
this.Qa = function() {
|
|
16650
16650
|
var e = Bu();
|
|
16651
|
-
e && U("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.No.
|
|
16651
|
+
e && U("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.No.Po();
|
|
16652
16652
|
};
|
|
16653
16653
|
var e = Bu();
|
|
16654
16654
|
e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Qa);
|
|
@@ -19368,7 +19368,7 @@ function $l(t, e) {
|
|
|
19368
19368
|
switch (n.label) {
|
|
19369
19369
|
case 0:
|
|
19370
19370
|
return e = function(t, e) {
|
|
19371
|
-
W(t).
|
|
19371
|
+
W(t).bu.add(e),
|
|
19372
19372
|
// Immediately fire an initial event, indicating all existing listeners
|
|
19373
19373
|
// are in-sync.
|
|
19374
19374
|
e.next();
|
|
@@ -19387,7 +19387,7 @@ function $l(t, e) {
|
|
|
19387
19387
|
switch (n.label) {
|
|
19388
19388
|
case 0:
|
|
19389
19389
|
return e = function(t, e) {
|
|
19390
|
-
W(t).
|
|
19390
|
+
W(t).bu.delete(e);
|
|
19391
19391
|
}, [ 4 /*yield*/ , Ba(t) ];
|
|
19392
19392
|
|
|
19393
19393
|
case 1:
|
|
@@ -19748,9 +19748,9 @@ function hh(t, e) {
|
|
|
19748
19748
|
return n = Object.assign({
|
|
19749
19749
|
useFetchStreams: eh
|
|
19750
19750
|
}, n), i._setSettings(n), i;
|
|
19751
|
-
}), "PUBLIC")), u(L, "3.4.8-canary.
|
|
19751
|
+
}), "PUBLIC")), u(L, "3.4.8-canary.69baecadd", void 0),
|
|
19752
19752
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
19753
|
-
u(L, "3.4.8-canary.
|
|
19753
|
+
u(L, "3.4.8-canary.69baecadd", "esm5");
|
|
19754
19754
|
|
|
19755
19755
|
export { Vl as AbstractUserDataWriter, kc as Bytes, fc as CACHE_SIZE_UNLIMITED, rc as CollectionReference, ec as DocumentReference, ll as DocumentSnapshot, xc as FieldPath, Mc as FieldValue, dc as Firestore, Y as FirestoreError, Rc as GeoPoint, hc as LoadBundleTask, nc as Query, yl as QueryConstraint, hl as QueryDocumentSnapshot, fl as QuerySnapshot, cl as SnapshotMetadata, ft as Timestamp, nh as Transaction, Fl as WriteBatch, Mt as _DatabaseId, Pt as _DocumentKey, ot as _EmptyAppCheckTokenProvider, $ as _EmptyAuthCredentialsProvider, bt as _FieldPath, Xa as _cast, Q as _debugAssert, Et as _isBase64Available, K as _logWarn, lh as _setIndexConfiguration, Qa as _validateIsNotUsedTogether, Xl as addDoc, sh as arrayRemove, uh as arrayUnion, Ic as clearIndexedDbPersistence, ic as collection, oc as collectionGroup, tc as connectFirestoreEmulator, Yl as deleteDoc, ih as deleteField, Sc as disableNetwork, uc as doc, Cc as documentId, gc as enableIndexedDbPersistence, wc as enableMultiTabIndexedDbPersistence, Tc as enableNetwork, Cl as endAt, xl as endBefore, yc as ensureFirestoreConfigured, Zl as executeWrite, Ul as getDoc, Kl as getDocFromCache, Gl as getDocFromServer, jl as getDocs, zl as getDocsFromCache, Ql as getDocsFromServer, vc as getFirestore, ah as increment, pc as initializeFirestore, Tl as limit, Sl as limitToLast, Nc as loadBundle, Dc as namedQuery, Jl as onSnapshot, $l as onSnapshotsInSync, Il as orderBy, ml as query, ac as queryEqual, sc as refEqual, rh as runTransaction, oh as serverTimestamp, Wl as setDoc, q as setLogLevel, pl as snapshotEqual, Dl as startAfter, Nl as startAt, _c as terminate, Hl as updateDoc, Ec as waitForPendingWrites, wl as where, ch as writeBatch };
|
|
19756
19756
|
//# sourceMappingURL=index.esm5.js.map
|