@firebase/firestore 3.8.0 → 3.8.1-canary.0bab0b7a7

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/firestore/src/api/reference_impl.d.ts +2 -1
  3. package/dist/firestore/src/lite-api/query.d.ts +14 -12
  4. package/dist/firestore/src/local/overlayed_document.d.ts +8 -4
  5. package/dist/firestore/src/local/remote_document_cache.d.ts +5 -5
  6. package/dist/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  7. package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  8. package/dist/index.cjs.js +20635 -0
  9. package/dist/index.cjs.js.map +1 -0
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.esm2017.js +62 -44
  12. package/dist/index.esm2017.js.map +1 -1
  13. package/dist/index.esm5.js +175 -155
  14. package/dist/index.esm5.js.map +1 -1
  15. package/dist/index.node.cjs.js +56 -27
  16. package/dist/index.node.cjs.js.map +1 -1
  17. package/dist/index.node.mjs +56 -27
  18. package/dist/index.node.mjs.map +1 -1
  19. package/dist/index.rn.js +62 -44
  20. package/dist/index.rn.js.map +1 -1
  21. package/dist/internal.d.ts +28 -21
  22. package/dist/lite/firestore/src/api/reference_impl.d.ts +2 -1
  23. package/dist/lite/firestore/src/lite-api/query.d.ts +14 -12
  24. package/dist/lite/firestore/src/local/overlayed_document.d.ts +8 -4
  25. package/dist/lite/firestore/src/local/remote_document_cache.d.ts +5 -5
  26. package/dist/lite/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  27. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  28. package/dist/lite/index.browser.esm2017.js +16 -14
  29. package/dist/lite/index.browser.esm2017.js.map +1 -1
  30. package/dist/lite/index.browser.esm5.js +62 -60
  31. package/dist/lite/index.browser.esm5.js.map +1 -1
  32. package/dist/lite/index.cjs.js +6954 -0
  33. package/dist/lite/index.cjs.js.map +1 -0
  34. package/dist/lite/index.node.cjs.js +16 -14
  35. package/dist/lite/index.node.cjs.js.map +1 -1
  36. package/dist/lite/index.node.mjs +16 -14
  37. package/dist/lite/index.node.mjs.map +1 -1
  38. package/dist/lite/index.rn.esm2017.js +16 -14
  39. package/dist/lite/index.rn.esm2017.js.map +1 -1
  40. package/dist/lite/internal.d.ts +15 -13
  41. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +15 -13
  42. package/dist/lite/packages/firestore/src/api/reference_impl.d.ts +2 -1
  43. package/dist/lite/packages/firestore/src/lite-api/query.d.ts +14 -12
  44. package/dist/lite/packages/firestore/src/local/overlayed_document.d.ts +8 -4
  45. package/dist/lite/packages/firestore/src/local/remote_document_cache.d.ts +5 -5
  46. package/dist/lite/packages/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  47. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  48. package/dist/packages/firestore/dist/index.esm2017.d.ts +17 -14
  49. package/dist/packages/firestore/src/api/reference_impl.d.ts +2 -1
  50. package/dist/packages/firestore/src/lite-api/query.d.ts +14 -12
  51. package/dist/packages/firestore/src/local/overlayed_document.d.ts +8 -4
  52. package/dist/packages/firestore/src/local/remote_document_cache.d.ts +5 -5
  53. package/dist/packages/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  54. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  55. package/dist/private.d.ts +13 -8
  56. package/package.json +19 -11
@@ -10,7 +10,7 @@ import { FirebaseError as f, getUA as d, isSafari as p, getModularInstance as y,
10
10
 
11
11
  import { XhrIo as b, EventType as I, ErrorCode as T, createWebChannelTransport as E, getStatEventTarget as S, FetchXmlHttpFactory as _, WebChannel as D, Event as x, Stat as A } from "@firebase/webchannel-wrapper";
12
12
 
13
- var C = "@firebase/firestore", N = /** @class */ function() {
13
+ var N = "@firebase/firestore", C = /** @class */ function() {
14
14
  function t(t) {
15
15
  this.uid = t;
16
16
  }
@@ -48,11 +48,11 @@ var C = "@firebase/firestore", N = /** @class */ function() {
48
48
  * Simple wrapper around a nullable UID. Mostly exists to make code more
49
49
  * readable.
50
50
  */
51
- /** A user with a null UID. */ N.UNAUTHENTICATED = new N(null),
51
+ /** A user with a null UID. */ C.UNAUTHENTICATED = new C(null),
52
52
  // TODO(mikelehen): Look into getting a proper uid-equivalent for
53
53
  // non-FirebaseAuth providers.
54
- N.GOOGLE_CREDENTIALS = new N("google-credentials-uid"), N.FIRST_PARTY = new N("first-party-uid"),
55
- N.MOCK_USER = new N("mock-user");
54
+ C.GOOGLE_CREDENTIALS = new C("google-credentials-uid"), C.FIRST_PARTY = new C("first-party-uid"),
55
+ C.MOCK_USER = new C("mock-user");
56
56
 
57
57
  /**
58
58
  * @license
@@ -70,7 +70,7 @@ N.MOCK_USER = new N("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- var k = "9.15.0", F = new l("@firebase/firestore");
73
+ var k = "9.16.0-canary.0bab0b7a7", F = new l("@firebase/firestore");
74
74
 
75
75
  /**
76
76
  * @license
@@ -391,7 +391,7 @@ e) {
391
391
  }, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {
392
392
  // Fire with initial user.
393
393
  t.enqueueRetryable((function() {
394
- return e(N.UNAUTHENTICATED);
394
+ return e(C.UNAUTHENTICATED);
395
395
  }));
396
396
  }, t.prototype.shutdown = function() {}, t;
397
397
  }(), H = /** @class */ function() {
@@ -420,7 +420,7 @@ e) {
420
420
  function t(t) {
421
421
  this.t = t,
422
422
  /** Tracks the current User. */
423
- this.currentUser = N.UNAUTHENTICATED,
423
+ this.currentUser = C.UNAUTHENTICATED,
424
424
  /**
425
425
  * Counter used to detect if the token changed while a getToken request was
426
426
  * outstanding.
@@ -497,11 +497,11 @@ e) {
497
497
  // to guarantee to get the actual user.
498
498
  t.prototype.u = function() {
499
499
  var t = this.auth && this.auth.getUid();
500
- return U(null === t || "string" == typeof t), new N(t);
500
+ return U(null === t || "string" == typeof t), new C(t);
501
501
  }, t;
502
502
  }(), X = /** @class */ function() {
503
503
  function t(t, e, n, r) {
504
- this.h = t, this.l = e, this.m = n, this.g = r, this.type = "FirstParty", this.user = N.FIRST_PARTY,
504
+ this.h = t, this.l = e, this.m = n, this.g = r, this.type = "FirstParty", this.user = C.FIRST_PARTY,
505
505
  this.p = new Map
506
506
  /** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */;
507
507
  }
@@ -530,7 +530,7 @@ e) {
530
530
  }, t.prototype.start = function(t, e) {
531
531
  // Fire with initial uid.
532
532
  t.enqueueRetryable((function() {
533
- return e(N.FIRST_PARTY);
533
+ return e(C.FIRST_PARTY);
534
534
  }));
535
535
  }, t.prototype.shutdown = function() {}, t.prototype.invalidateToken = function() {},
536
536
  t;
@@ -1460,7 +1460,7 @@ function Dt(t) {
1460
1460
  var e = this.transaction.objectStore(t);
1461
1461
  return new Ot(e);
1462
1462
  }, t;
1463
- }(), Ct = /** @class */ function() {
1463
+ }(), Nt = /** @class */ function() {
1464
1464
  /*
1465
1465
  * Creates a new SimpleDb wrapper for IndexedDb database `name`.
1466
1466
  *
@@ -1642,7 +1642,7 @@ function Dt(t) {
1642
1642
  }, t.prototype.close = function() {
1643
1643
  this.db && this.db.close(), this.db = void 0;
1644
1644
  }, t;
1645
- }(), Nt = /** @class */ function() {
1645
+ }(), Ct = /** @class */ function() {
1646
1646
  function t(t) {
1647
1647
  this.q = t, this.U = !1, this.K = null;
1648
1648
  }
@@ -1854,7 +1854,7 @@ function Dt(t) {
1854
1854
  }, t.onsuccess = function(t) {
1855
1855
  var i = t.target.result;
1856
1856
  if (i) {
1857
- var o = new Nt(i), u = e(i.primaryKey, i.value, o);
1857
+ var o = new Ct(i), u = e(i.primaryKey, i.value, o);
1858
1858
  if (u instanceof xt) {
1859
1859
  var a = u.catch((function(t) {
1860
1860
  return o.done(), xt.reject(t);
@@ -1902,7 +1902,7 @@ function Dt(t) {
1902
1902
  var Vt = !1;
1903
1903
 
1904
1904
  function Mt(t) {
1905
- var e = Ct.D(d());
1905
+ var e = Nt.D(d());
1906
1906
  if (e >= 12.2 && e < 13) {
1907
1907
  var n = "An internal error was encountered in the Indexed Database server";
1908
1908
  if (t.message.indexOf(n) >= 0) {
@@ -2835,7 +2835,7 @@ function _e(t, e, n) {
2835
2835
  }, n.prototype.getFirstInequalityField = function() {
2836
2836
  return this.isInequality() ? this.field : null;
2837
2837
  }, n;
2838
- }(xe), Ce = /** @class */ function(e) {
2838
+ }(xe), Ne = /** @class */ function(e) {
2839
2839
  function n(t, n) {
2840
2840
  var r = this;
2841
2841
  return (r = e.call(this) || this).filters = t, r.op = n, r.ht = null, r;
@@ -2845,7 +2845,7 @@ function _e(t, e, n) {
2845
2845
  */ return t(n, e), n.create = function(t, e) {
2846
2846
  return new n(t, e);
2847
2847
  }, n.prototype.matches = function(t) {
2848
- return Ne(this) ? void 0 === this.filters.find((function(e) {
2848
+ return Ce(this) ? void 0 === this.filters.find((function(e) {
2849
2849
  return !e.matches(t);
2850
2850
  })) : void 0 !== this.filters.find((function(e) {
2851
2851
  return e.matches(t);
@@ -2876,7 +2876,7 @@ function _e(t, e, n) {
2876
2876
  }, n;
2877
2877
  }(xe);
2878
2878
 
2879
- function Ne(t) {
2879
+ function Ce(t) {
2880
2880
  return "and" /* CompositeOperator.AND */ === t.op;
2881
2881
  }
2882
2882
 
@@ -2887,14 +2887,14 @@ function ke(t) {
2887
2887
  /**
2888
2888
  * Returns true if this filter is a conjunction of field filters only. Returns false otherwise.
2889
2889
  */ function Fe(t) {
2890
- return Oe(t) && Ne(t);
2890
+ return Oe(t) && Ce(t);
2891
2891
  }
2892
2892
 
2893
2893
  /**
2894
2894
  * Returns true if this filter does not contain any composite filters. Returns false otherwise.
2895
2895
  */ function Oe(t) {
2896
2896
  for (var e = 0, n = t.filters; e < n.length; e++) {
2897
- if (n[e] instanceof Ce) return !1;
2897
+ if (n[e] instanceof Ne) return !1;
2898
2898
  }
2899
2899
  return !0;
2900
2900
  }
@@ -2905,6 +2905,16 @@ function Re(t) {
2905
2905
  // the same description, such as the int 3 and the string "3". So we should
2906
2906
  // add the types in here somehow, too.
2907
2907
  return t.field.canonicalString() + t.op.toString() + le(t.value);
2908
+ if (Fe(t))
2909
+ // Older SDK versions use an implicit AND operation between their filters.
2910
+ // In the new SDK versions, the developer may use an explicit AND filter.
2911
+ // To stay consistent with the old usages, we add a special case to ensure
2912
+ // the canonical ID for these two are the same. For example:
2913
+ // `col.whereEquals("a", 1).whereEquals("b", 2)` should have the same
2914
+ // canonical ID as `col.where(and(equals("a",1), equals("b",2)))`.
2915
+ return t.filters.map((function(t) {
2916
+ return Re(t);
2917
+ })).join(",");
2908
2918
  // filter instanceof CompositeFilter
2909
2919
  var e = t.filters.map((function(t) {
2910
2920
  return Re(t);
@@ -2915,8 +2925,8 @@ function Re(t) {
2915
2925
  function Ve(t, e) {
2916
2926
  return t instanceof Ae ? function(t, e) {
2917
2927
  return e instanceof Ae && t.op === e.op && t.field.isEqual(e.field) && ue(t.value, e.value);
2918
- }(t, e) : t instanceof Ce ? function(t, e) {
2919
- return e instanceof Ce && t.op === e.op && t.filters.length === e.filters.length && t.filters.reduce((function(t, n, r) {
2928
+ }(t, e) : t instanceof Ne ? function(t, e) {
2929
+ return e instanceof Ne && t.op === e.op && t.filters.length === e.filters.length && t.filters.reduce((function(t, n, r) {
2920
2930
  return t && Ve(n, e.filters[r]);
2921
2931
  }), !0);
2922
2932
  }(t, e) : void q();
@@ -2924,13 +2934,13 @@ function Ve(t, e) {
2924
2934
 
2925
2935
  function Me(t, e) {
2926
2936
  var n = t.filters.concat(e);
2927
- return Ce.create(n, t.op);
2937
+ return Ne.create(n, t.op);
2928
2938
  }
2929
2939
 
2930
2940
  /** Returns a debug description for `filter`. */ function Le(t) {
2931
2941
  return t instanceof Ae ? function(t) {
2932
2942
  return "".concat(t.field.canonicalString(), " ").concat(t.op, " ").concat(le(t.value));
2933
- }(t) : t instanceof Ce ? function(t) {
2943
+ }(t) : t instanceof Ne ? function(t) {
2934
2944
  return t.op.toString() + " {" + t.getFilters().map(Le).join(" ,") + "}";
2935
2945
  }(t) : "Filter";
2936
2946
  }
@@ -4233,10 +4243,10 @@ function An(t) {
4233
4243
  /**
4234
4244
  * Returns a new comparator function that can be used to compare two documents
4235
4245
  * based on the Query's ordering constraint.
4236
- */ function Cn(t) {
4246
+ */ function Nn(t) {
4237
4247
  return function(e, n) {
4238
4248
  for (var r = !1, i = 0, o = bn(t); i < o.length; i++) {
4239
- var u = o[i], a = Nn(u, e, n);
4249
+ var u = o[i], a = Cn(u, e, n);
4240
4250
  if (0 !== a) return a;
4241
4251
  r = r || u.field.isKeyField();
4242
4252
  }
@@ -4244,7 +4254,7 @@ function An(t) {
4244
4254
  };
4245
4255
  }
4246
4256
 
4247
- function Nn(t, e, n) {
4257
+ function Cn(t, e, n) {
4248
4258
  var r = t.field.isKeyField() ? ft.comparator(e.key, n.key) : function(t, e, n) {
4249
4259
  var r = e.data.field(t), i = n.data.field(t);
4250
4260
  return null !== r && null !== i ? se(r, i) : q();
@@ -5154,9 +5164,9 @@ function xr() {
5154
5164
  // PORTING NOTE: Multi-tab only
5155
5165
  return t.createSynthesizedRemoteEventForCurrentChange = function(e, n, r) {
5156
5166
  var i = new Map;
5157
- return i.set(e, Cr.createSynthesizedTargetChangeForCurrentChange(e, n, r)), new t(at.min(), i, xr(), vr(), _r());
5167
+ return i.set(e, Nr.createSynthesizedTargetChangeForCurrentChange(e, n, r)), new t(at.min(), i, xr(), vr(), _r());
5158
5168
  }, t;
5159
- }(), Cr = /** @class */ function() {
5169
+ }(), Nr = /** @class */ function() {
5160
5170
  function t(
5161
5171
  /**
5162
5172
  * An opaque, server-assigned token that allows watching a query to be resumed
@@ -5197,7 +5207,7 @@ function xr() {
5197
5207
  return t.createSynthesizedTargetChangeForCurrentChange = function(e, n, r) {
5198
5208
  return new t(r, n, _r(), _r(), _r());
5199
5209
  }, t;
5200
- }(), Nr = function(
5210
+ }(), Cr = function(
5201
5211
  /** The new document applies to all of these targets. */
5202
5212
  t,
5203
5213
  /** The new document is removed from all of these targets. */
@@ -5315,7 +5325,7 @@ n
5315
5325
  default:
5316
5326
  q();
5317
5327
  }
5318
- })), new Cr(this.bt, this.Pt, t, e, n);
5328
+ })), new Nr(this.bt, this.Pt, t, e, n);
5319
5329
  },
5320
5330
  /**
5321
5331
  * Resets the document changes and sets `hasPendingChanges` to false.
@@ -5840,7 +5850,7 @@ function ii(t, e) {
5840
5850
  collectionId: r.lastSegment()
5841
5851
  } ]);
5842
5852
  var i = function(t) {
5843
- if (0 !== t.length) return fi(Ce.create(t, "and" /* CompositeOperator.AND */));
5853
+ if (0 !== t.length) return fi(Ne.create(t, "and" /* CompositeOperator.AND */));
5844
5854
  }(e.filters);
5845
5855
  i && (n.structuredQuery.where = i);
5846
5856
  var o = function(t) {
@@ -5881,7 +5891,7 @@ function oi(t) {
5881
5891
  var u = [];
5882
5892
  n.where && (u = function(t) {
5883
5893
  var e = ui(t);
5884
- return e instanceof Ce && Fe(e) ? e.getFilters() : [ e ];
5894
+ return e instanceof Ne && Fe(e) ? e.getFilters() : [ e ];
5885
5895
  }(n.where));
5886
5896
  var a = [];
5887
5897
  n.orderBy && (a = n.orderBy.map((function(t) {
@@ -5987,7 +5997,7 @@ function ui(t) {
5987
5997
  }
5988
5998
  }(t.fieldFilter.op), t.fieldFilter.value);
5989
5999
  }(t) : void 0 !== t.compositeFilter ? function(t) {
5990
- return Ce.create(t.compositeFilter.filters.map((function(t) {
6000
+ return Ne.create(t.compositeFilter.filters.map((function(t) {
5991
6001
  return ui(t);
5992
6002
  })), function(t) {
5993
6003
  switch (t) {
@@ -6062,7 +6072,7 @@ function fi(t) {
6062
6072
  value: t.value
6063
6073
  }
6064
6074
  };
6065
- }(t) : t instanceof Ce ? function(t) {
6075
+ }(t) : t instanceof Ne ? function(t) {
6066
6076
  var e = t.getFilters().map((function(t) {
6067
6077
  return fi(t);
6068
6078
  }));
@@ -6236,7 +6246,7 @@ function pi(t) {
6236
6246
  * there is no useful information to store as the value. The raw (unencoded)
6237
6247
  * path cannot be stored because IndexedDb doesn't store prototype
6238
6248
  * information.
6239
- */ var Ti = {}, Ei = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], Si = [ "prefixPath", "collectionGroup", "documentId" ], _i = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], Di = [ "canonicalId", "targetId" ], xi = [ "targetId", "path" ], Ai = [ "path", "targetId" ], Ci = [ "collectionId", "parent" ], Ni = [ "indexId", "uid" ], ki = [ "uid", "sequenceNumber" ], Fi = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], Oi = [ "indexId", "uid", "orderedDocumentKey" ], Ri = [ "userId", "collectionPath", "documentId" ], Vi = [ "userId", "collectionPath", "largestBatchId" ], Mi = [ "userId", "collectionGroup", "largestBatchId" ], Li = r(r([], r(r([], r(r([], r(r([], [ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], !1), [ "clientMetadata" ], !1), !0), [ "remoteDocumentGlobal" ], !1), !0), [ "collectionParents" ], !1), !0), [ "bundles", "namedQueries" ], !1), Pi = r(r([], Li, !0), [ "documentOverlays" ], !1), qi = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Ui = qi, Bi = r(r([], Ui, !0), [ "indexConfiguration", "indexState", "indexEntries" ], !1), Gi = /** @class */ function(e) {
6249
+ */ var Ti = {}, Ei = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], Si = [ "prefixPath", "collectionGroup", "documentId" ], _i = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], Di = [ "canonicalId", "targetId" ], xi = [ "targetId", "path" ], Ai = [ "path", "targetId" ], Ni = [ "collectionId", "parent" ], Ci = [ "indexId", "uid" ], ki = [ "uid", "sequenceNumber" ], Fi = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], Oi = [ "indexId", "uid", "orderedDocumentKey" ], Ri = [ "userId", "collectionPath", "documentId" ], Vi = [ "userId", "collectionPath", "largestBatchId" ], Mi = [ "userId", "collectionGroup", "largestBatchId" ], Li = r(r([], r(r([], r(r([], r(r([], [ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], !1), [ "clientMetadata" ], !1), !0), [ "remoteDocumentGlobal" ], !1), !0), [ "collectionParents" ], !1), !0), [ "bundles", "namedQueries" ], !1), Pi = r(r([], Li, !0), [ "documentOverlays" ], !1), qi = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Ui = qi, Bi = r(r([], Ui, !0), [ "indexConfiguration", "indexState", "indexEntries" ], !1), Gi = /** @class */ function(e) {
6240
6250
  function n(t, n) {
6241
6251
  var r = this;
6242
6252
  return (r = e.call(this) || this).se = t, r.currentSequenceNumber = n, r;
@@ -6261,7 +6271,7 @@ function pi(t) {
6261
6271
  * limitations under the License.
6262
6272
  */ function Ki(t, e) {
6263
6273
  var n = G(t);
6264
- return Ct.M(n.se, e);
6274
+ return Nt.M(n.se, e);
6265
6275
  }
6266
6276
 
6267
6277
  /**
@@ -7201,12 +7211,12 @@ function Io(t, e) {
7201
7211
  * input into a disjunction of equality filters and returns the expanded filter.
7202
7212
  */ function Eo(t) {
7203
7213
  var e, n;
7204
- if (U(t instanceof Ae || t instanceof Ce), t instanceof Ae) {
7214
+ if (U(t instanceof Ae || t instanceof Ne), t instanceof Ae) {
7205
7215
  if (t instanceof Ke) {
7206
7216
  var r = (null === (n = null === (e = t.value.arrayValue) || void 0 === e ? void 0 : e.values) || void 0 === n ? void 0 : n.map((function(e) {
7207
7217
  return Ae.create(t.field, "==" /* Operator.EQUAL */ , e);
7208
7218
  }))) || [];
7209
- return Ce.create(r, "or" /* CompositeOperator.OR */);
7219
+ return Ne.create(r, "or" /* CompositeOperator.OR */);
7210
7220
  }
7211
7221
  // We have reached other kinds of field filters.
7212
7222
  return t;
@@ -7215,7 +7225,7 @@ function Io(t, e) {
7215
7225
  var i = t.filters.map((function(t) {
7216
7226
  return Eo(t);
7217
7227
  }));
7218
- return Ce.create(i, t.op);
7228
+ return Ne.create(i, t.op);
7219
7229
  }
7220
7230
 
7221
7231
  /**
@@ -7243,7 +7253,7 @@ function _o(t) {
7243
7253
  * Returns true if the given filter is the conjunction of one or more field filters. e.g. (a == 10
7244
7254
  * && b == 20)
7245
7255
  */ function Do(t) {
7246
- return t instanceof Ce && Fe(t);
7256
+ return t instanceof Ne && Fe(t);
7247
7257
  }
7248
7258
 
7249
7259
  /**
@@ -7260,7 +7270,7 @@ function _o(t) {
7260
7270
  * field filters. e.g. (a == 10) || (b==20 && c==30)
7261
7271
  */
7262
7272
  function(t) {
7263
- if (t instanceof Ce && ke(t)) {
7273
+ if (t instanceof Ne && ke(t)) {
7264
7274
  for (var e = 0, n = t.getFilters(); e < n.length; e++) {
7265
7275
  var r = n[e];
7266
7276
  if (!_o(r) && !Do(r)) return !1;
@@ -7272,55 +7282,55 @@ function _o(t) {
7272
7282
  }
7273
7283
 
7274
7284
  function Ao(t) {
7275
- if (U(t instanceof Ae || t instanceof Ce), t instanceof Ae) return t;
7285
+ if (U(t instanceof Ae || t instanceof Ne), t instanceof Ae) return t;
7276
7286
  if (1 === t.filters.length) return Ao(t.filters[0]);
7277
7287
  // Compute DNF for each of the subfilters first
7278
7288
  var e = t.filters.map((function(t) {
7279
7289
  return Ao(t);
7280
- })), n = Ce.create(e, t.op);
7281
- return xo(n = ko(n)) ? n : (U(n instanceof Ce), U(Ne(n)), U(n.filters.length > 1),
7290
+ })), n = Ne.create(e, t.op);
7291
+ return xo(n = ko(n)) ? n : (U(n instanceof Ne), U(Ce(n)), U(n.filters.length > 1),
7282
7292
  n.filters.reduce((function(t, e) {
7283
- return Co(t, e);
7293
+ return No(t, e);
7284
7294
  })));
7285
7295
  }
7286
7296
 
7287
- function Co(t, e) {
7297
+ function No(t, e) {
7288
7298
  var n;
7289
- return U(t instanceof Ae || t instanceof Ce), U(e instanceof Ae || e instanceof Ce),
7299
+ return U(t instanceof Ae || t instanceof Ne), U(e instanceof Ae || e instanceof Ne),
7290
7300
  // FieldFilter FieldFilter
7291
7301
  n = t instanceof Ae ? e instanceof Ae ? function(t, e) {
7292
7302
  // Conjunction distribution for two field filters is the conjunction of them.
7293
- return Ce.create([ t, e ], "and" /* CompositeOperator.AND */);
7294
- }(t, e) : No(t, e) : e instanceof Ae ? No(e, t) : function(t, e) {
7303
+ return Ne.create([ t, e ], "and" /* CompositeOperator.AND */);
7304
+ }(t, e) : Co(t, e) : e instanceof Ae ? Co(e, t) : function(t, e) {
7295
7305
  // There are four cases:
7296
7306
  // (A & B) & (C & D) --> (A & B & C & D)
7297
7307
  // (A & B) & (C | D) --> (A & B & C) | (A & B & D)
7298
7308
  // (A | B) & (C & D) --> (C & D & A) | (C & D & B)
7299
7309
  // (A | B) & (C | D) --> (A & C) | (A & D) | (B & C) | (B & D)
7300
7310
  // Case 1 is a merge.
7301
- if (U(t.filters.length > 0 && e.filters.length > 0), Ne(t) && Ne(e)) return Me(t, e.getFilters());
7311
+ if (U(t.filters.length > 0 && e.filters.length > 0), Ce(t) && Ce(e)) return Me(t, e.getFilters());
7302
7312
  // Case 2,3,4 all have at least one side (lhs or rhs) that is a disjunction. In all three cases
7303
7313
  // we should take each element of the disjunction and distribute it over the other side, and
7304
7314
  // return the disjunction of the distribution results.
7305
7315
  var n = ke(t) ? t : e, r = ke(t) ? e : t, i = n.filters.map((function(t) {
7306
- return Co(t, r);
7316
+ return No(t, r);
7307
7317
  }));
7308
- return Ce.create(i, "or" /* CompositeOperator.OR */);
7318
+ return Ne.create(i, "or" /* CompositeOperator.OR */);
7309
7319
  }(t, e), ko(n);
7310
7320
  }
7311
7321
 
7312
- function No(t, e) {
7322
+ function Co(t, e) {
7313
7323
  // There are two cases:
7314
7324
  // A & (B & C) --> (A & B & C)
7315
7325
  // A & (B | C) --> (A & B) | (A & C)
7316
- if (Ne(e))
7326
+ if (Ce(e))
7317
7327
  // Case 1
7318
7328
  return Me(e, t.getFilters());
7319
7329
  // Case 2
7320
7330
  var n = e.filters.map((function(e) {
7321
- return Co(t, e);
7331
+ return No(t, e);
7322
7332
  }));
7323
- return Ce.create(n, "or" /* CompositeOperator.OR */);
7333
+ return Ne.create(n, "or" /* CompositeOperator.OR */);
7324
7334
  }
7325
7335
 
7326
7336
  /**
@@ -7333,7 +7343,7 @@ function No(t, e) {
7333
7343
  *
7334
7344
  * <p>For more info, visit: https://en.wikipedia.org/wiki/Associative_property#Propositional_logic
7335
7345
  */ function ko(t) {
7336
- if (U(t instanceof Ae || t instanceof Ce), t instanceof Ae) return t;
7346
+ if (U(t instanceof Ae || t instanceof Ne), t instanceof Ae) return t;
7337
7347
  var e = t.getFilters();
7338
7348
  // If the composite filter only contains 1 filter, apply associativity to it.
7339
7349
  if (1 === e.length) return ko(e[0]);
@@ -7352,7 +7362,7 @@ function No(t, e) {
7352
7362
  // Note that the `compositeSubfilter` has been eliminated, and its filters (B, C, D) have been
7353
7363
  // added to the top-level "compositeFilter".
7354
7364
  return n.forEach((function(e) {
7355
- e instanceof Ae ? r.push(e) : e instanceof Ce && (e.op === t.op ?
7365
+ e instanceof Ae ? r.push(e) : e instanceof Ne && (e.op === t.op ?
7356
7366
  // compositeFilter: (A | (B | C))
7357
7367
  // compositeSubfilter: (B | C)
7358
7368
  // Result: (A | B | C)
@@ -7365,7 +7375,7 @@ function No(t, e) {
7365
7375
  // compositeSubfilter: (B & C)
7366
7376
  // Result: (A | (B & C))
7367
7377
  r.push(e));
7368
- })), 1 === r.length ? r[0] : Ce.create(r, t.op)
7378
+ })), 1 === r.length ? r[0] : Ne.create(r, t.op)
7369
7379
  /**
7370
7380
  * @license
7371
7381
  * Copyright 2019 Google LLC
@@ -7614,7 +7624,7 @@ var Fo = /** @class */ function() {
7614
7624
  }));
7615
7625
  }, t.prototype.Ze = function(t) {
7616
7626
  var e = this.Xe.get(t);
7617
- return e || (e = 0 === t.filters.length ? [ t ] : So(Ce.create(t.filters, "and" /* CompositeOperator.AND */)).map((function(e) {
7627
+ return e || (e = 0 === t.filters.length ? [ t ] : So(Ne.create(t.filters, "and" /* CompositeOperator.AND */)).map((function(e) {
7618
7628
  return un(t.path, t.collectionGroup, t.orderBy, e.getFilters(), t.limit, t.startAt, t.endAt);
7619
7629
  })), this.Xe.set(t, e), e);
7620
7630
  },
@@ -9171,14 +9181,16 @@ function Jo(t) {
9171
9181
  // above won't go through them is when the cache is empty.
9172
9182
  for (;a; ) n(a, null), a = u.hasNext() ? u.getNext() : null;
9173
9183
  }));
9174
- }, t.prototype.getAllFromCollection = function(t, e, n) {
9175
- var r = this, i = [ e.popLast().toArray(), e.lastSegment(), Xi(n.readTime), n.documentKey.path.isEmpty() ? "" : n.documentKey.path.lastSegment() ], o = [ e.popLast().toArray(), e.lastSegment(), [ Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER ], "" ];
9176
- return fu(t).W(IDBKeyRange.bound(i, o, !0)).next((function(t) {
9177
- for (var e = vr(), n = 0, i = t; n < i.length; n++) {
9178
- var o = i[n], u = r.jn(ft.fromSegments(o.prefixPath.concat(o.collectionGroup, o.documentId)), o);
9179
- e = e.insert(u.key, u);
9184
+ }, t.prototype.getDocumentsMatchingQuery = function(t, e, n, r) {
9185
+ var i = this, o = e.path, u = [ o.popLast().toArray(), o.lastSegment(), Xi(n.readTime), n.documentKey.path.isEmpty() ? "" : n.documentKey.path.lastSegment() ], a = [ o.popLast().toArray(), o.lastSegment(), [ Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER ], "" ];
9186
+ return fu(t).W(IDBKeyRange.bound(u, a, !0)).next((function(t) {
9187
+ for (var n = vr(), o = 0, u = t; o < u.length; o++) {
9188
+ var a = u[o], s = i.jn(ft.fromSegments(a.prefixPath.concat(a.collectionGroup, a.documentId)), a);
9189
+ s.isFoundDocument() && (xn(e, s) || r.has(s.key)) && (
9190
+ // Either the document matches the given query, or it is mutated.
9191
+ n = n.insert(s.key, s));
9180
9192
  }
9181
- return e;
9193
+ return n;
9182
9194
  }));
9183
9195
  }, t.prototype.getAllFromCollectionGroup = function(t, e, n, r) {
9184
9196
  var i = this, o = vr(), u = pu(e, n), a = pu(e, Tt.max());
@@ -9434,8 +9446,10 @@ function pu(t, e) {
9434
9446
  * locally mutated.
9435
9447
  */ var vu = function(t,
9436
9448
  /**
9437
- * The fields that are locally mutated by patch mutations. If the overlayed
9438
- * document is from set or delete mutations, this returns null.
9449
+ * The fields that are locally mutated by patch mutations.
9450
+ *
9451
+ * If the overlayed document is from set or delete mutations, this is `null`.
9452
+ * If there is no overlay (mutation) for the document, this is an empty `FieldMask`.
9439
9453
  */
9440
9454
  e) {
9441
9455
  this.overlayedDocument = t, this.mutatedFields = e;
@@ -9543,8 +9557,11 @@ e) {
9543
9557
  // NOTE: we recalculate when `overlay` is undefined as well, because there
9544
9558
  // might be a patch mutation whose precondition does not match before the
9545
9559
  // change (hence overlay is undefined), but would now match.
9546
- r.has(e.key) && (void 0 === u || u.mutation instanceof rr) ? i = i.insert(e.key, e) : void 0 !== u && (o.set(e.key, u.mutation.getFieldMask()),
9547
- $n(u.mutation, e, u.mutation.getFieldMask(), ut.now()));
9560
+ r.has(e.key) && (void 0 === u || u.mutation instanceof rr) ? i = i.insert(e.key, e) : void 0 !== u ? (o.set(e.key, u.mutation.getFieldMask()),
9561
+ $n(u.mutation, e, u.mutation.getFieldMask(), ut.now())) :
9562
+ // no overlay exists
9563
+ // Using EMPTY to indicate there is no overlay for the document.
9564
+ o.set(e.key, tn.empty());
9548
9565
  })), this.recalculateAndSaveOverlays(t, i).next((function(t) {
9549
9566
  return t.forEach((function(t, e) {
9550
9567
  return o.set(t, e);
@@ -9680,22 +9697,22 @@ e) {
9680
9697
  }, t.prototype.getDocumentsMatchingCollectionQuery = function(t, e, n) {
9681
9698
  var r, i = this;
9682
9699
  // Query the remote documents and overlay mutations.
9683
- return this.remoteDocumentCache.getAllFromCollection(t, e.path, n).next((function(o) {
9684
- return r = o, i.documentOverlayCache.getOverlaysForCollection(t, e.path, n.largestBatchId);
9700
+ return this.documentOverlayCache.getOverlaysForCollection(t, e.path, n.largestBatchId).next((function(o) {
9701
+ return r = o, i.remoteDocumentCache.getDocumentsMatchingQuery(t, e, n, r);
9685
9702
  })).next((function(t) {
9686
9703
  // As documents might match the query because of their overlay we need to
9687
9704
  // include documents for all overlays in the initial document set.
9688
- t.forEach((function(t, e) {
9689
- var n = e.getKey();
9690
- null === r.get(n) && (r = r.insert(n, rn.newInvalidDocument(n)));
9705
+ r.forEach((function(e, n) {
9706
+ var r = n.getKey();
9707
+ null === t.get(r) && (t = t.insert(r, rn.newInvalidDocument(r)));
9691
9708
  }));
9692
9709
  // Apply the overlays and match against the query.
9693
9710
  var n = gr();
9694
- return r.forEach((function(r, i) {
9695
- var o = t.get(r);
9711
+ return t.forEach((function(t, i) {
9712
+ var o = r.get(t);
9696
9713
  void 0 !== o && $n(o.mutation, i, tn.empty(), ut.now()),
9697
9714
  // Finally, insert the documents that still match the query
9698
- xn(e, i) && (n = n.insert(r, i));
9715
+ xn(e, i) && (n = n.insert(t, i));
9699
9716
  })), n;
9700
9717
  }));
9701
9718
  }, t;
@@ -10035,16 +10052,16 @@ e) {
10035
10052
  var e = n.docs.get(t);
10036
10053
  r = r.insert(t, e ? e.document.mutableCopy() : rn.newInvalidDocument(t));
10037
10054
  })), xt.resolve(r);
10038
- }, t.prototype.getAllFromCollection = function(t, e, n) {
10039
- for (var r = vr(), i = new ft(e.child("")), o = this.docs.getIteratorFrom(i)
10055
+ }, t.prototype.getDocumentsMatchingQuery = function(t, e, n, r) {
10056
+ for (var i = vr(), o = e.path, u = new ft(o.child("")), a = this.docs.getIteratorFrom(u)
10040
10057
  // Documents are ordered by key, so we can use a prefix scan to narrow down
10041
10058
  // the documents we need to match the query against.
10042
- ; o.hasNext(); ) {
10043
- var u = o.getNext(), a = u.key, s = u.value.document;
10044
- if (!e.isPrefixOf(a.path)) break;
10045
- a.path.length > e.length + 1 || Et(It(s), n) <= 0 || (r = r.insert(s.key, s.mutableCopy()));
10059
+ ; a.hasNext(); ) {
10060
+ var s = a.getNext(), c = s.key, l = s.value.document;
10061
+ if (!o.isPrefixOf(c.path)) break;
10062
+ c.path.length > o.length + 1 || Et(It(l), n) <= 0 || (r.has(l.key) || xn(e, l)) && (i = i.insert(l.key, l.mutableCopy()));
10046
10063
  }
10047
- return xt.resolve(r);
10064
+ return xt.resolve(i);
10048
10065
  }, t.prototype.getAllFromCollectionGroup = function(t, e, n, r) {
10049
10066
  // This method should only be called from the IndexBackfiller if persistence
10050
10067
  // is enabled.
@@ -10286,7 +10303,7 @@ e) {
10286
10303
  return n.persistence.Ms(t, e);
10287
10304
  } ]);
10288
10305
  }, t;
10289
- }(), Cu = /** @class */ function() {
10306
+ }(), Nu = /** @class */ function() {
10290
10307
  function t(t) {
10291
10308
  this.yt = t;
10292
10309
  }
@@ -10309,7 +10326,7 @@ e) {
10309
10326
  }).createIndex("userMutationsIndex", wi, {
10310
10327
  unique: !0
10311
10328
  }), t.createObjectStore("documentMutations");
10312
- }(t), Nu(t), function(t) {
10329
+ }(t), Cu(t), function(t) {
10313
10330
  t.createObjectStore("remoteDocuments");
10314
10331
  }(t));
10315
10332
  // Migration 2 to populate the targetGlobal object no longer needed since
@@ -10320,7 +10337,7 @@ e) {
10320
10337
  // potentially have corrupt data.
10321
10338
  0 !== n && (function(t) {
10322
10339
  t.deleteObjectStore("targetDocuments"), t.deleteObjectStore("targets"), t.deleteObjectStore("targetGlobal");
10323
- }(t), Nu(t)), u = u.next((function() {
10340
+ }(t), Cu(t)), u = u.next((function() {
10324
10341
  /**
10325
10342
  * Creates the target global singleton row.
10326
10343
  *
@@ -10426,7 +10443,7 @@ e) {
10426
10443
  }).createIndex("collectionGroupIndex", "collectionGroup", {
10427
10444
  unique: !1
10428
10445
  }), t.createObjectStore("indexState", {
10429
- keyPath: Ni
10446
+ keyPath: Ci
10430
10447
  }).createIndex("sequenceNumberIndex", ki, {
10431
10448
  unique: !1
10432
10449
  }), t.createObjectStore("indexEntries", {
@@ -10489,7 +10506,7 @@ e) {
10489
10506
  }, t.prototype.Qs = function(t, e) {
10490
10507
  // Create the index.
10491
10508
  t.createObjectStore("collectionParents", {
10492
- keyPath: Ci
10509
+ keyPath: Ni
10493
10510
  });
10494
10511
  var n = e.store("collectionParents"), r = new Oo, i = function(t) {
10495
10512
  if (r.add(t)) {
@@ -10551,7 +10568,7 @@ e) {
10551
10568
  return i = i.add(t);
10552
10569
  })), r.set(t.userId, i);
10553
10570
  })), xt.forEach(r, (function(t, r) {
10554
- var u = new N(r), a = co.re(n.yt, u), s = o.getIndexManager(u), c = Qo.re(u, n.yt, s, o.referenceDelegate);
10571
+ var u = new C(r), a = co.re(n.yt, u), s = o.getIndexManager(u), c = Qo.re(u, n.yt, s, o.referenceDelegate);
10555
10572
  return new mu(i, c, a, s).recalculateAndSaveOverlaysForDocumentKeys(new Gi(e, qt.at), t).next();
10556
10573
  }));
10557
10574
  }));
@@ -10579,7 +10596,7 @@ e) {
10579
10596
  * have a cached version in remoteDocumentCache or local mutations for the
10580
10597
  * document). The view is computed by applying the mutations in the
10581
10598
  * MutationQueue to the RemoteDocumentCache.
10582
- */ function Nu(t) {
10599
+ */ function Cu(t) {
10583
10600
  t.createObjectStore("targetDocuments", {
10584
10601
  keyPath: xi
10585
10602
  }).createIndex("documentTargetsIndex", Ai, {
@@ -10621,7 +10638,7 @@ var ku = "Failed to obtain exclusive access to the persistence layer. To allow s
10621
10638
  return Promise.resolve();
10622
10639
  }, !t.C()) throw new j(K.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
10623
10640
  this.referenceDelegate = new ou(this, i), this.ii = n + "main", this.yt = new Hi(s),
10624
- this.ri = new Ct(this.ii, this.Xs, new Cu(this.yt)), this.Cs = new Zo(this.referenceDelegate, this.yt),
10641
+ this.ri = new Nt(this.ii, this.Xs, new Nu(this.yt)), this.Cs = new Zo(this.referenceDelegate, this.yt),
10625
10642
  this.remoteDocumentCache = cu(this.yt), this.Ns = new uo, this.window && this.window.localStorage ? this.oi = this.window.localStorage : (this.oi = null,
10626
10643
  !1 === l && M("IndexedDbPersistence", "LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."));
10627
10644
  }
@@ -11008,7 +11025,7 @@ var ku = "Failed to obtain exclusive access to the persistence layer. To allow s
11008
11025
  };
11009
11026
  return Ou(t).put("owner", e);
11010
11027
  }, t.C = function() {
11011
- return Ct.C();
11028
+ return Nt.C();
11012
11029
  },
11013
11030
  /** Checks the primary lease and removes it if we are the current primary. */ t.prototype._i = function(t) {
11014
11031
  var e = this, n = Ou(t);
@@ -11277,7 +11294,7 @@ var Mu = /** @class */ function() {
11277
11294
  /** Applies the query filter and sorting to the provided documents. */ t.prototype.Fi = function(t, e) {
11278
11295
  // Sort the documents and re-apply the query filter since previously
11279
11296
  // matching documents do not necessarily still match the query.
11280
- var n = new Ze(Cn(t));
11297
+ var n = new Ze(Nn(t));
11281
11298
  return e.forEach((function(e, r) {
11282
11299
  xn(t, r) && (n = n.add(r));
11283
11300
  })), n;
@@ -12263,7 +12280,7 @@ var ra = /** @class */ function() {
12263
12280
  */
12264
12281
  t.prototype.Dr = function(t, e) {
12265
12282
  var n = this.dr.exec(t), r = Number(n[1]), i = void 0 !== n[2] ? n[2] : null;
12266
- return ra.Zi(new N(i), r, e);
12283
+ return ra.Zi(new C(i), r, e);
12267
12284
  },
12268
12285
  /**
12269
12286
  * Parses a query target state from WebStorage. Returns 'null' if the value
@@ -13055,19 +13072,19 @@ function ya() {
13055
13072
  fields: s.document.fields
13056
13073
  }
13057
13074
  }), d = rn.newFoundDocument(c, l, h, f), p = s.targetIds || [], y = s.removedTargetIds || [];
13058
- n = new Nr(p, y, d.key, d);
13075
+ n = new Cr(p, y, d.key, d);
13059
13076
  } else if ("documentDelete" in e) {
13060
13077
  e.documentDelete;
13061
13078
  var v = e.documentDelete;
13062
13079
  v.document;
13063
13080
  var m = Hr(t, v.document), g = v.readTime ? jr(v.readTime) : at.min(), w = rn.newNoDocument(m, g), b = v.removedTargetIds || [];
13064
- n = new Nr([], b, w.key, w);
13081
+ n = new Cr([], b, w.key, w);
13065
13082
  } else if ("documentRemove" in e) {
13066
13083
  e.documentRemove;
13067
13084
  var I = e.documentRemove;
13068
13085
  I.document;
13069
13086
  var T = Hr(t, I.document), E = I.removedTargetIds || [];
13070
- n = new Nr([], E, T, null);
13087
+ n = new Cr([], E, T, null);
13071
13088
  } else {
13072
13089
  if (!("filter" in e)) return q();
13073
13090
  e.filter;
@@ -13534,7 +13551,7 @@ r, i, o, u) {
13534
13551
  // Mark this as something the client is currently listening for.
13535
13552
  n.du.set(e.targetId, e), Fa(n) ?
13536
13553
  // The listen will be sent in onWatchStreamOpen
13537
- ka(n) : Ya(n).ko() && Ca(n, e));
13554
+ ka(n) : Ya(n).ko() && Na(n, e));
13538
13555
  }
13539
13556
 
13540
13557
  /**
@@ -13542,7 +13559,7 @@ r, i, o, u) {
13542
13559
  * not being listened to.
13543
13560
  */ function Aa(t, e) {
13544
13561
  var n = G(t), r = Ya(n);
13545
- n.du.delete(e), r.ko() && Na(n, e), 0 === n.du.size && (r.ko() ? r.Fo() : Oa(n) &&
13562
+ n.du.delete(e), r.ko() && Ca(n, e), 0 === n.du.size && (r.ko() ? r.Fo() : Oa(n) &&
13546
13563
  // Revert to OnlineState.Unknown if the watch stream is not open and we
13547
13564
  // have no listeners, since without any listens to send we cannot
13548
13565
  // confirm if the stream is healthy and upgrade to OnlineState.Online.
@@ -13552,7 +13569,7 @@ r, i, o, u) {
13552
13569
  /**
13553
13570
  * We need to increment the the expected number of pending responses we're due
13554
13571
  * from watch so we wait for the ack to process any messages from this target.
13555
- */ function Ca(t, e) {
13572
+ */ function Na(t, e) {
13556
13573
  t.yu.Ot(e.targetId), Ya(t).zo(e)
13557
13574
  /**
13558
13575
  * We need to increment the expected number of pending responses we're due
@@ -13561,7 +13578,7 @@ r, i, o, u) {
13561
13578
  */;
13562
13579
  }
13563
13580
 
13564
- function Na(t, e) {
13581
+ function Ca(t, e) {
13565
13582
  t.yu.Ot(e), Ya(t).Ho(e);
13566
13583
  }
13567
13584
 
@@ -13596,7 +13613,7 @@ function Va(t) {
13596
13613
  return e(this, void 0, void 0, (function() {
13597
13614
  return n(this, (function(e) {
13598
13615
  return t.du.forEach((function(e, n) {
13599
- Ca(t, e);
13616
+ Na(t, e);
13600
13617
  })), [ 2 /*return*/ ];
13601
13618
  }));
13602
13619
  }));
@@ -13671,7 +13688,7 @@ function La(t, r, i) {
13671
13688
  return [ 3 /*break*/ , 13 ];
13672
13689
 
13673
13690
  case 6:
13674
- if (r instanceof Nr ? t.yu.Kt(r) : r instanceof kr ? t.yu.Jt(r) : t.yu.jt(r), i.isEqual(at.min())) return [ 3 /*break*/ , 13 ];
13691
+ if (r instanceof Cr ? t.yu.Kt(r) : r instanceof kr ? t.yu.Jt(r) : t.yu.jt(r), i.isEqual(at.min())) return [ 3 /*break*/ , 13 ];
13675
13692
  s.label = 7;
13676
13693
 
13677
13694
  case 7:
@@ -13705,13 +13722,13 @@ function La(t, r, i) {
13705
13722
  t.du.set(e, n.withResumeToken(Yt.EMPTY_BYTE_STRING, n.snapshotVersion)),
13706
13723
  // Cause a hard reset by unwatching and rewatching immediately, but
13707
13724
  // deliberately don't send a resume token so that we get a full update.
13708
- Na(t, e);
13725
+ Ca(t, e);
13709
13726
  // Mark the target we send as being on behalf of an existence filter
13710
13727
  // mismatch, but don't actually retain that in listenTargets. This ensures
13711
13728
  // that we flag the first re-listen this way without impacting future
13712
13729
  // listens of this target (that might happen e.g. on reconnect).
13713
13730
  var r = new Wi(n.target, e, 1 /* TargetPurpose.ExistenceFilterMismatch */ , n.sequenceNumber);
13714
- Ca(t, r);
13731
+ Na(t, r);
13715
13732
  }
13716
13733
  })), t.remoteSyncer.applyRemoteEvent(n);
13717
13734
  }(t, i) ] : [ 3 /*break*/ , 10 ];
@@ -14696,7 +14713,7 @@ function ds(t) {
14696
14713
  /** Documents in the view but not in the remote target */
14697
14714
  this.Ku = _r(),
14698
14715
  /** Document Keys that have local changes */
14699
- this.mutatedKeys = _r(), this.Gu = Cn(t), this.Qu = new $a(this.Gu);
14716
+ this.mutatedKeys = _r(), this.Gu = Nn(t), this.Qu = new $a(this.Gu);
14700
14717
  }
14701
14718
  return Object.defineProperty(t.prototype, "ju", {
14702
14719
  /**
@@ -15068,7 +15085,7 @@ function bs(t, r) {
15068
15085
  /* usePreviousResults= */ !0) ];
15069
15086
 
15070
15087
  case 1:
15071
- return a = d.sent(), s = new vs(r, a.Hi), c = s.Wu(a.documents), l = Cr.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* OnlineState.Offline */ !== t.onlineState, u),
15088
+ return a = d.sent(), s = new vs(r, a.Hi), c = s.Wu(a.documents), l = Nr.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline" /* OnlineState.Offline */ !== t.onlineState, u),
15072
15089
  h = s.applyChanges(c,
15073
15090
  /* updateLimboDocuments= */ t.isPrimaryClient, l), Rs(t, i, h.Xu), f = new ms(r, i, s),
15074
15091
  [ 2 /*return*/ , (t.ic.set(r, f), t.rc.has(i) ? t.rc.get(i).push(r) : t.rc.set(i, [ r ]),
@@ -15345,7 +15362,7 @@ function xs(t, r) {
15345
15362
  // raise events immediately (depending on whether the watcher is caught
15346
15363
  // up), so we raise user callbacks first so that they consistently happen
15347
15364
  // before listen events.
15348
- ks(e, i, /*error=*/ null), Ns(e, i), e.sharedClientState.updateMutationState(i, "acknowledged"),
15365
+ ks(e, i, /*error=*/ null), Cs(e, i), e.sharedClientState.updateMutationState(i, "acknowledged"),
15349
15366
  [ 4 /*yield*/ , Ls(e, o) ];
15350
15367
 
15351
15368
  case 3:
@@ -15401,7 +15418,7 @@ function As(t, r, i) {
15401
15418
  // raise events immediately (depending on whether the watcher is caught up),
15402
15419
  // so we raise user callbacks first so that they consistently happen before
15403
15420
  // listen events.
15404
- ks(e, r, i), Ns(e, r), e.sharedClientState.updateMutationState(r, "rejected", i),
15421
+ ks(e, r, i), Cs(e, r), e.sharedClientState.updateMutationState(r, "rejected", i),
15405
15422
  [ 4 /*yield*/ , Ls(e, o) ];
15406
15423
 
15407
15424
  case 3:
@@ -15427,7 +15444,7 @@ function As(t, r, i) {
15427
15444
  /**
15428
15445
  * Registers a user callback that resolves when all pending mutations at the moment of calling
15429
15446
  * are acknowledged .
15430
- */ function Cs(t, r) {
15447
+ */ function Ns(t, r) {
15431
15448
  return e(this, void 0, void 0, (function() {
15432
15449
  var e, i, o, u, a;
15433
15450
  return n(this, (function(n) {
@@ -15462,7 +15479,7 @@ function As(t, r, i) {
15462
15479
  /**
15463
15480
  * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,
15464
15481
  * if there are any.
15465
- */ function Ns(t, e) {
15482
+ */ function Cs(t, e) {
15466
15483
  (t.lc.get(e) || []).forEach((function(t) {
15467
15484
  t.resolve();
15468
15485
  })), t.lc.delete(e)
@@ -15718,7 +15735,7 @@ function Gs(t, r, i, o) {
15718
15735
  "acknowledged" === i || "rejected" === i ? (
15719
15736
  // NOTE: Both these methods are no-ops for batches that originated from
15720
15737
  // other clients.
15721
- ks(e, r, o || null), Ns(e, r), function(t, e) {
15738
+ ks(e, r, o || null), Cs(e, r), function(t, e) {
15722
15739
  G(G(t).mutationQueue).An(e);
15723
15740
  }(e.localStore, r)) : q(), n.label = 4;
15724
15741
 
@@ -16570,13 +16587,13 @@ function fc(t, e, n, r) {
16570
16587
  ssl: !1
16571
16588
  })), r.mockUserToken) {
16572
16589
  var u, a;
16573
- if ("string" == typeof r.mockUserToken) u = r.mockUserToken, a = N.MOCK_USER; else {
16590
+ if ("string" == typeof r.mockUserToken) u = r.mockUserToken, a = C.MOCK_USER; else {
16574
16591
  // Let createMockUserToken validate first (catches common mistakes like
16575
16592
  // invalid field "uid" and missing field "sub" / "user_id".)
16576
16593
  u = m(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
16577
16594
  var s = r.mockUserToken.sub || r.mockUserToken.user_id;
16578
16595
  if (!s) throw new j(K.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
16579
- a = new N(s);
16596
+ a = new C(s);
16580
16597
  }
16581
16598
  t._authCredentials = new H(new z(u, a));
16582
16599
  }
@@ -17362,7 +17379,7 @@ function Ic(t, r) {
17362
17379
  }
17363
17380
  return !1;
17364
17381
  }, t;
17365
- }(), Cc = /** @class */ function() {
17382
+ }(), Nc = /** @class */ function() {
17366
17383
  function t(t, r,
17367
17384
  /**
17368
17385
  * Asynchronous queue responsible for all of our internal processing. When
@@ -17375,7 +17392,7 @@ function Ic(t, r) {
17375
17392
  i, o) {
17376
17393
  var u = this;
17377
17394
  this.authCredentials = t, this.appCheckCredentials = r, this.asyncQueue = i, this.databaseInfo = o,
17378
- this.user = N.UNAUTHENTICATED, this.clientId = nt.R(), this.authCredentialListener = function() {
17395
+ this.user = C.UNAUTHENTICATED, this.clientId = nt.R(), this.authCredentialListener = function() {
17379
17396
  return Promise.resolve();
17380
17397
  }, this.appCheckCredentialListener = function() {
17381
17398
  return Promise.resolve();
@@ -17481,7 +17498,7 @@ function Ic(t, r) {
17481
17498
  *
17482
17499
  * Takes a bundle stream or buffer, and presents abstractions to read bundled
17483
17500
  * elements out of the underlying content.
17484
- */ function Nc(t, r) {
17501
+ */ function Cc(t, r) {
17485
17502
  return e(this, void 0, void 0, (function() {
17486
17503
  var i, o, u = this;
17487
17504
  return n(this, (function(a) {
@@ -17555,7 +17572,7 @@ function Fc(t) {
17555
17572
  switch (e.label) {
17556
17573
  case 0:
17557
17574
  return t.offlineComponents ? [ 3 /*break*/ , 2 ] : (V("FirestoreClient", "Using default OfflineComponentProvider"),
17558
- [ 4 /*yield*/ , Nc(t, new Js) ]);
17575
+ [ 4 /*yield*/ , Cc(t, new Js) ]);
17559
17576
 
17560
17577
  case 1:
17561
17578
  e.sent(), e.label = 2;
@@ -18118,7 +18135,7 @@ function Xc(t) {
18118
18135
  var e, n = t._freezeSettings(), r = function(t, e, n, r) {
18119
18136
  return new Ut(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, r.useFetchStreams);
18120
18137
  }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", t._persistenceKey, n);
18121
- t._firestoreClient = new Cc(t._authCredentials, t._appCheckCredentials, t._queue, r);
18138
+ t._firestoreClient = new Nc(t._authCredentials, t._appCheckCredentials, t._queue, r);
18122
18139
  }
18123
18140
 
18124
18141
  /**
@@ -18189,7 +18206,7 @@ function Xc(t) {
18189
18206
  return n(this, (function(n) {
18190
18207
  switch (n.label) {
18191
18208
  case 0:
18192
- return n.trys.push([ 0, 3, , 4 ]), [ 4 /*yield*/ , Nc(t, i) ];
18209
+ return n.trys.push([ 0, 3, , 4 ]), [ 4 /*yield*/ , Cc(t, i) ];
18193
18210
 
18194
18211
  case 1:
18195
18212
  return n.sent(), [ 4 /*yield*/ , kc(t, r) ];
@@ -18238,7 +18255,7 @@ function tl(t) {
18238
18255
  return n(this, (function(n) {
18239
18256
  switch (n.label) {
18240
18257
  case 0:
18241
- return Ct.C() ? (e = t + "main", [ 4 /*yield*/ , Ct.delete(e) ]) : [ 2 /*return*/ , Promise.resolve() ];
18258
+ return Nt.C() ? (e = t + "main", [ 4 /*yield*/ , Nt.delete(e) ]) : [ 2 /*return*/ , Promise.resolve() ];
18242
18259
 
18243
18260
  case 1:
18244
18261
  return n.sent(), [ 2 /*return*/ ];
@@ -18286,7 +18303,7 @@ function el(t) {
18286
18303
  return n(this, (function(n) {
18287
18304
  switch (n.label) {
18288
18305
  case 0:
18289
- return e = Cs, [ 4 /*yield*/ , Lc(t) ];
18306
+ return e = Ns, [ 4 /*yield*/ , Lc(t) ];
18290
18307
 
18291
18308
  case 1:
18292
18309
  return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), i ]) ];
@@ -18960,7 +18977,7 @@ var El = /** @class */ function(e) {
18960
18977
  return t(n, e), n.prototype._toFieldTransform = function(t) {
18961
18978
  var e = Tl(this, t,
18962
18979
  /*array=*/ !0), n = this._a.map((function(t) {
18963
- return Nl(t, e);
18980
+ return Cl(t, e);
18964
18981
  })), r = new qn(n);
18965
18982
  return new zn(t.path, r);
18966
18983
  }, n.prototype.isEqual = function(t) {
@@ -18975,7 +18992,7 @@ var El = /** @class */ function(e) {
18975
18992
  return t(n, e), n.prototype._toFieldTransform = function(t) {
18976
18993
  var e = Tl(this, t,
18977
18994
  /*array=*/ !0), n = this._a.map((function(t) {
18978
- return Nl(t, e);
18995
+ return Cl(t, e);
18979
18996
  })), r = new Bn(n);
18980
18997
  return new zn(t.path, r);
18981
18998
  }, n.prototype.isEqual = function(t) {
@@ -19009,7 +19026,7 @@ var El = /** @class */ function(e) {
19009
19026
  if (r instanceof Il)
19010
19027
  // Add it to the field mask, but don't add anything to updateData.
19011
19028
  o.push(a); else {
19012
- var c = Nl(r, s);
19029
+ var c = Cl(r, s);
19013
19030
  null != c && (o.push(a), u.set(a, c));
19014
19031
  }
19015
19032
  }));
@@ -19032,7 +19049,7 @@ var El = /** @class */ function(e) {
19032
19049
  if (p instanceof Il)
19033
19050
  // Add it to the field mask, but don't add anything to updateData.
19034
19051
  l.push(d); else {
19035
- var m = Nl(p, v);
19052
+ var m = Cl(p, v);
19036
19053
  null != m && (l.push(d), h.set(d, m));
19037
19054
  }
19038
19055
  }
@@ -19046,8 +19063,8 @@ var El = /** @class */ function(e) {
19046
19063
  *
19047
19064
  * @param allowArrays - Whether the query value is an array that may directly
19048
19065
  * contain additional arrays (e.g. the operand of an `in` query).
19049
- */ function Cl(t, e, n, r) {
19050
- return void 0 === r && (r = !1), Nl(n, t.da(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
19066
+ */ function Nl(t, e, n, r) {
19067
+ return void 0 === r && (r = !1), Cl(n, t.da(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));
19051
19068
  }
19052
19069
 
19053
19070
  /**
@@ -19058,7 +19075,7 @@ var El = /** @class */ function(e) {
19058
19075
  * the source of the data being parsed, etc.
19059
19076
  * @returns The parsed value, or null if the value was a FieldValue sentinel
19060
19077
  * that should not be included in the resulting parsed data.
19061
- */ function Nl(t, e) {
19078
+ */ function Cl(t, e) {
19062
19079
  if (Fl(
19063
19080
  // Unwrap the API type from the Compat SDK. This will return the API type
19064
19081
  // from firestore-exp.
@@ -19098,7 +19115,7 @@ var El = /** @class */ function(e) {
19098
19115
  if (e.settings.oa && 4 /* UserDataSource.ArrayArgument */ !== e.sa) throw e.ha("Nested arrays are not supported");
19099
19116
  return function(t, e) {
19100
19117
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
19101
- var u = Nl(o[i], e.aa(r));
19118
+ var u = Cl(o[i], e.aa(r));
19102
19119
  null == u && (
19103
19120
  // Just include nulls in the array for fields being replaced with a
19104
19121
  // sentinel.
@@ -19165,7 +19182,7 @@ function kl(t, e) {
19165
19182
  // If we encounter an empty object, we explicitly add it to the update
19166
19183
  // mask to ensure that the server creates a map entry.
19167
19184
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : Kt(t, (function(t, r) {
19168
- var i = Nl(r, e.ra(t));
19185
+ var i = Cl(r, e.ra(t));
19169
19186
  null != i && (n[t] = i);
19170
19187
  })), {
19171
19188
  mapValue: {
@@ -19459,7 +19476,7 @@ function Bl(t, e) {
19459
19476
  };
19460
19477
  } else a = ch(r, t, u);
19461
19478
  } else "in" /* Operator.IN */ !== o && "not-in" /* Operator.NOT_IN */ !== o && "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */ !== o || lh(u, o),
19462
- a = Cl(n, "where", u,
19479
+ a = Nl(n, "where", u,
19463
19480
  /* allowArrays= */ "in" /* Operator.IN */ === o || "not-in" /* Operator.NOT_IN */ === o);
19464
19481
  return Ae.create(i, o, a);
19465
19482
  }(t._query, 0, e, t.firestore._databaseId, this._field, this._op, this._value);
@@ -19508,7 +19525,7 @@ function Bl(t, e) {
19508
19525
  })).filter((function(t) {
19509
19526
  return t.getFilters().length > 0;
19510
19527
  }));
19511
- return 1 === e.length ? e[0] : Ce.create(e, this._getOperator());
19528
+ return 1 === e.length ? e[0] : Ne.create(e, this._getOperator());
19512
19529
  }, n.prototype._apply = function(t) {
19513
19530
  var e = this._parse(t);
19514
19531
  return 0 === e.getFilters().length ? t : (function(t, e) {
@@ -19525,13 +19542,14 @@ function Bl(t, e) {
19525
19542
  }(Kl);
19526
19543
 
19527
19544
  /**
19528
- * Creates a {@link QueryCompositeFilterConstraint} that performs a logical OR
19529
- * of all the provided {@link QueryFilterConstraint}s.
19545
+ * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of
19546
+ * the given filter constraints. A disjunction filter includes a document if it
19547
+ * satisfies any of the given filters.
19530
19548
  *
19531
- * @param queryConstraints - Optional. The {@link QueryFilterConstraint}s
19532
- * for OR operation. These must be created with calls to {@link where},
19533
- * {@link or}, or {@link and}.
19534
- * @returns The created {@link QueryCompositeFilterConstraint}.
19549
+ * @param queryConstraints - Optional. The list of
19550
+ * {@link QueryFilterConstraint}s to perform a disjunction for. These must be
19551
+ * created with calls to {@link where}, {@link or}, or {@link and}.
19552
+ * @returns The newly created {@link QueryCompositeFilterConstraint}.
19535
19553
  * @internal TODO remove this internal tag with OR Query support in the server
19536
19554
  */ function Yl() {
19537
19555
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
@@ -19540,13 +19558,14 @@ function Bl(t, e) {
19540
19558
  return dh("or", t);
19541
19559
  })), Hl._create("or" /* CompositeOperator.OR */ , t)
19542
19560
  /**
19543
- * Creates a {@link QueryCompositeFilterConstraint} that performs a logical AND
19544
- * of all the provided {@link QueryFilterConstraint}s.
19561
+ * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of
19562
+ * the given filter constraints. A conjunction filter includes a document if it
19563
+ * satisfies all of the given filters.
19545
19564
  *
19546
- * @param queryConstraints - Optional. The {@link QueryFilterConstraint}s
19547
- * for AND operation. These must be created with calls to {@link where},
19548
- * {@link or}, or {@link and}.
19549
- * @returns The created {@link QueryCompositeFilterConstraint}.
19565
+ * @param queryConstraints - Optional. The list of
19566
+ * {@link QueryFilterConstraint}s to perform a conjunction for. These must be
19567
+ * created with calls to {@link where}, {@link or}, or {@link and}.
19568
+ * @returns The newly created {@link QueryCompositeFilterConstraint}.
19550
19569
  * @internal TODO remove this internal tag with OR Query support in the server
19551
19570
  */;
19552
19571
  }
@@ -19783,7 +19802,7 @@ function ah() {
19783
19802
  var h = new ft(l);
19784
19803
  a.push(fe(e, h));
19785
19804
  } else {
19786
- var f = Cl(n, r, c);
19805
+ var f = Nl(n, r, c);
19787
19806
  a.push(f);
19788
19807
  }
19789
19808
  }
@@ -20358,7 +20377,8 @@ var Sh = /** @class */ function(e) {
20358
20377
  }))
20359
20378
  /**
20360
20379
  * Executes the query and returns the results as a `QuerySnapshot` from cache.
20361
- * Returns an error if the document is not currently cached.
20380
+ * Returns an empty result set if no documents matching the query are currently
20381
+ * cached.
20362
20382
  *
20363
20383
  * @returns A `Promise` that will be resolved with the results of the query.
20364
20384
  */;
@@ -20415,7 +20435,7 @@ function Ah(t) {
20415
20435
  * server. Returns an error if the network is not available.
20416
20436
  *
20417
20437
  * @returns A `Promise` that will be resolved with the results of the query.
20418
- */ function Ch(t) {
20438
+ */ function Nh(t) {
20419
20439
  t = ac(t, pc);
20420
20440
  var e = ac(t.firestore, zc), n = Yc(e), r = new Sh(e);
20421
20441
  return Bc(n, t._query, {
@@ -20425,7 +20445,7 @@ function Ah(t) {
20425
20445
  }));
20426
20446
  }
20427
20447
 
20428
- function Nh(t, e, n) {
20448
+ function Ch(t, e, n) {
20429
20449
  t = ac(t, dc);
20430
20450
  var r = ac(t.firestore, zc), i = yh(t.converter, e, n);
20431
20451
  return Mh(r, [ bl(wl(r), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, Hn.none()) ]);
@@ -21174,9 +21194,9 @@ function $h(t, e) {
21174
21194
  return r = Object.assign({
21175
21195
  useFetchStreams: Kh
21176
21196
  }, r), o._setSettings(r), o;
21177
- }), "PUBLIC").setMultipleInstances(!0)), u(C, "3.8.0", void 0),
21197
+ }), "PUBLIC").setMultipleInstances(!0)), u(N, "3.8.1-canary.0bab0b7a7", void 0),
21178
21198
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21179
- u(C, "3.8.0", "esm5");
21199
+ u(N, "3.8.1-canary.0bab0b7a7", "esm5");
21180
21200
 
21181
- export { ph as AbstractUserDataWriter, Sc as AggregateField, _c as AggregateQuerySnapshot, sl as Bytes, Qc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, dc as DocumentReference, gh as DocumentSnapshot, cl as FieldPath, hl as FieldValue, zc as Firestore, j as FirestoreError, fl as GeoPoint, jc as LoadBundleTask, pc as Query, Hl as QueryCompositeFilterConstraint, jl as QueryConstraint, wh as QueryDocumentSnapshot, oh as QueryEndAtConstraint, zl as QueryFieldFilterConstraint, $l as QueryLimitConstraint, Zl as QueryOrderByConstraint, bh as QuerySnapshot, nh as QueryStartAtConstraint, mh as SnapshotMetadata, ut as Timestamp, jh as Transaction, Bh as WriteBatch, Bt as _DatabaseId, ft as _DocumentKey, tt as _EmptyAppCheckTokenProvider, W as _EmptyAuthCredentialsProvider, ht as _FieldPath, ac as _cast, B as _debugAssert, Ht as _isBase64Available, L as _logWarn, rc as _validateIsNotUsedTogether, Oh as addDoc, Ph as aggregateQuerySnapshotEqual, Xl as and, Yh as arrayRemove, Hh as arrayUnion, tl as clearIndexedDbPersistence, vc as collection, mc as collectionGroup, fc as connectFirestoreEmulator, Fh as deleteDoc, zh as deleteField, rl as disableNetwork, gc as doc, ll as documentId, Zc as enableIndexedDbPersistence, Jc as enableMultiTabIndexedDbPersistence, nl as enableNetwork, ah as endAt, uh as endBefore, Yc as ensureFirestoreConfigured, Mh as executeWrite, qh as getCountFromServer, Eh as getDoc, _h as getDocFromCache, Dh as getDocFromServer, xh as getDocs, Ah as getDocsFromCache, Ch as getDocsFromServer, Hc as getFirestore, Xh as increment, Wc as initializeFirestore, th as limit, eh as limitToLast, ol as loadBundle, ul as namedQuery, Rh as onSnapshot, Vh as onSnapshotsInSync, Yl as or, Jl as orderBy, Ql as query, bc as queryEqual, wc as refEqual, Qh as runTransaction, Wh as serverTimestamp, Nh as setDoc, Jh as setIndexConfiguration, R as setLogLevel, Th as snapshotEqual, ih as startAfter, rh as startAt, il as terminate, kh as updateDoc, el as waitForPendingWrites, Wl as where, Zh as writeBatch };
21201
+ export { ph as AbstractUserDataWriter, Sc as AggregateField, _c as AggregateQuerySnapshot, sl as Bytes, Qc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, dc as DocumentReference, gh as DocumentSnapshot, cl as FieldPath, hl as FieldValue, zc as Firestore, j as FirestoreError, fl as GeoPoint, jc as LoadBundleTask, pc as Query, Hl as QueryCompositeFilterConstraint, jl as QueryConstraint, wh as QueryDocumentSnapshot, oh as QueryEndAtConstraint, zl as QueryFieldFilterConstraint, $l as QueryLimitConstraint, Zl as QueryOrderByConstraint, bh as QuerySnapshot, nh as QueryStartAtConstraint, mh as SnapshotMetadata, ut as Timestamp, jh as Transaction, Bh as WriteBatch, Bt as _DatabaseId, ft as _DocumentKey, tt as _EmptyAppCheckTokenProvider, W as _EmptyAuthCredentialsProvider, ht as _FieldPath, ac as _cast, B as _debugAssert, Ht as _isBase64Available, L as _logWarn, rc as _validateIsNotUsedTogether, Oh as addDoc, Ph as aggregateQuerySnapshotEqual, Xl as and, Yh as arrayRemove, Hh as arrayUnion, tl as clearIndexedDbPersistence, vc as collection, mc as collectionGroup, fc as connectFirestoreEmulator, Fh as deleteDoc, zh as deleteField, rl as disableNetwork, gc as doc, ll as documentId, Zc as enableIndexedDbPersistence, Jc as enableMultiTabIndexedDbPersistence, nl as enableNetwork, ah as endAt, uh as endBefore, Yc as ensureFirestoreConfigured, Mh as executeWrite, qh as getCountFromServer, Eh as getDoc, _h as getDocFromCache, Dh as getDocFromServer, xh as getDocs, Ah as getDocsFromCache, Nh as getDocsFromServer, Hc as getFirestore, Xh as increment, Wc as initializeFirestore, th as limit, eh as limitToLast, ol as loadBundle, ul as namedQuery, Rh as onSnapshot, Vh as onSnapshotsInSync, Yl as or, Jl as orderBy, Ql as query, bc as queryEqual, wc as refEqual, Qh as runTransaction, Wh as serverTimestamp, Ch as setDoc, Jh as setIndexConfiguration, R as setLogLevel, Th as snapshotEqual, ih as startAfter, rh as startAt, il as terminate, kh as updateDoc, el as waitForPendingWrites, Wl as where, Zh as writeBatch };
21182
21202
  //# sourceMappingURL=index.esm5.js.map