@firebase/firestore 4.5.0-canary.9ca1a4e4f → 4.5.0-canary.c6ecac8ac

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 (36) hide show
  1. package/dist/firestore/src/local/indexeddb_schema.d.ts +2 -1
  2. package/dist/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
  3. package/dist/firestore/test/unit/index/firestore_index_value_writer.test.d.ts +1 -0
  4. package/dist/firestore/test/unit/index/ordered_code_writer.test.d.ts +1 -1
  5. package/dist/index.cjs.js +134 -126
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.esm2017.js +134 -126
  8. package/dist/index.esm2017.js.map +1 -1
  9. package/dist/index.esm5.js +2164 -2157
  10. package/dist/index.esm5.js.map +1 -1
  11. package/dist/index.node.cjs.js +25 -10
  12. package/dist/index.node.cjs.js.map +1 -1
  13. package/dist/index.node.mjs +25 -10
  14. package/dist/index.node.mjs.map +1 -1
  15. package/dist/index.rn.js +134 -126
  16. package/dist/index.rn.js.map +1 -1
  17. package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +2 -1
  18. package/dist/lite/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
  19. package/dist/lite/firestore/test/unit/index/firestore_index_value_writer.test.d.ts +1 -0
  20. package/dist/lite/firestore/test/unit/index/ordered_code_writer.test.d.ts +1 -1
  21. package/dist/lite/index.browser.esm2017.js +2 -2
  22. package/dist/lite/index.browser.esm5.js +2 -2
  23. package/dist/lite/index.cjs.js +2 -2
  24. package/dist/lite/index.node.cjs.js +2 -2
  25. package/dist/lite/index.node.mjs +2 -2
  26. package/dist/lite/index.rn.esm2017.js +2 -2
  27. package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +2 -1
  28. package/dist/lite/packages/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
  29. package/dist/lite/packages/firestore/test/unit/index/firestore_index_value_writer.test.d.ts +1 -0
  30. package/dist/lite/packages/firestore/test/unit/index/ordered_code_writer.test.d.ts +1 -1
  31. package/dist/packages/firestore/dist/index.esm2017.d.ts +2 -2
  32. package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +2 -1
  33. package/dist/packages/firestore/src/local/indexeddb_sentinels.d.ts +1 -0
  34. package/dist/packages/firestore/test/unit/index/firestore_index_value_writer.test.d.ts +1 -0
  35. package/dist/packages/firestore/test/unit/index/ordered_code_writer.test.d.ts +1 -1
  36. package/package.json +9 -9
@@ -66,7 +66,7 @@ User.MOCK_USER = new User("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let S = "10.9.0-canary.9ca1a4e4f";
69
+ let S = "10.9.0-canary.c6ecac8ac";
70
70
 
71
71
  /**
72
72
  * @license
@@ -2301,7 +2301,7 @@ function __PRIVATE_newDbDocumentMutationPrefixForPath(e, t) {
2301
2301
  * there is no useful information to store as the value. The raw (unencoded)
2302
2302
  * path cannot be stored because IndexedDb doesn't store prototype
2303
2303
  * information.
2304
- */ const x = {}, O = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], N = [ "prefixPath", "collectionGroup", "documentId" ], L = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], B = [ "canonicalId", "targetId" ], k = [ "targetId", "path" ], q = [ "path", "targetId" ], Q = [ "collectionId", "parent" ], K = [ "indexId", "uid" ], $ = [ "uid", "sequenceNumber" ], U = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], W = [ "indexId", "uid", "orderedDocumentKey" ], G = [ "userId", "collectionPath", "documentId" ], z = [ "userId", "collectionPath", "largestBatchId" ], j = [ "userId", "collectionGroup", "largestBatchId" ], H = [ ...[ ...[ ...[ ...[ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], "clientMetadata" ], "remoteDocumentGlobal" ], "collectionParents" ], "bundles", "namedQueries" ], J = [ ...H, "documentOverlays" ], Y = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Z = Y, X = [ ...Z, "indexConfiguration", "indexState", "indexEntries" ];
2304
+ */ const x = {}, O = [ "prefixPath", "collectionGroup", "readTime", "documentId" ], N = [ "prefixPath", "collectionGroup", "documentId" ], L = [ "collectionGroup", "readTime", "prefixPath", "documentId" ], B = [ "canonicalId", "targetId" ], k = [ "targetId", "path" ], q = [ "path", "targetId" ], Q = [ "collectionId", "parent" ], K = [ "indexId", "uid" ], $ = [ "uid", "sequenceNumber" ], U = [ "indexId", "uid", "arrayValue", "directionalValue", "orderedDocumentKey", "documentKey" ], W = [ "indexId", "uid", "orderedDocumentKey" ], G = [ "userId", "collectionPath", "documentId" ], z = [ "userId", "collectionPath", "largestBatchId" ], j = [ "userId", "collectionGroup", "largestBatchId" ], H = [ ...[ ...[ ...[ ...[ "mutationQueues", "mutations", "documentMutations", "remoteDocuments", "targets", "owner", "targetGlobal", "targetDocuments" ], "clientMetadata" ], "remoteDocumentGlobal" ], "collectionParents" ], "bundles", "namedQueries" ], J = [ ...H, "documentOverlays" ], Y = [ "mutationQueues", "mutations", "documentMutations", "remoteDocumentsV14", "targets", "owner", "targetGlobal", "targetDocuments", "clientMetadata", "remoteDocumentGlobal", "collectionParents", "bundles", "namedQueries", "documentOverlays" ], Z = Y, X = [ ...Z, "indexConfiguration", "indexState", "indexEntries" ], ee = X;
2305
2305
 
2306
2306
  /**
2307
2307
  * @license
@@ -3058,7 +3058,7 @@ function __PRIVATE_isBase64Available() {
3058
3058
 
3059
3059
  ByteString.EMPTY_BYTE_STRING = new ByteString("");
3060
3060
 
3061
- const ee = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
3061
+ const te = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
3062
3062
 
3063
3063
  /**
3064
3064
  * Converts the possible Proto values for a timestamp value into a "seconds and
@@ -3072,7 +3072,7 @@ const ee = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
3072
3072
  // (millis), so we do some custom parsing here.
3073
3073
  // Parse the nanos right out of the string.
3074
3074
  let t = 0;
3075
- const n = ee.exec(e);
3075
+ const n = te.exec(e);
3076
3076
  if (__PRIVATE_hardAssert(!!n), n[1]) {
3077
3077
  // Pad the fraction out to 9 digits (nanos).
3078
3078
  let e = n[1];
@@ -3239,7 +3239,7 @@ class DatabaseId {
3239
3239
  * See the License for the specific language governing permissions and
3240
3240
  * limitations under the License.
3241
3241
  */
3242
- const te = {
3242
+ const ne = {
3243
3243
  mapValue: {
3244
3244
  fields: {
3245
3245
  __type__: {
@@ -3247,7 +3247,7 @@ const te = {
3247
3247
  }
3248
3248
  }
3249
3249
  }
3250
- }, ne = {
3250
+ }, re = {
3251
3251
  nullValue: "NULL_VALUE"
3252
3252
  };
3253
3253
 
@@ -3391,9 +3391,9 @@ function __PRIVATE_valueCompare(e, t) {
3391
3391
 
3392
3392
  case 10 /* TypeOrder.ObjectValue */ :
3393
3393
  return function __PRIVATE_compareMaps(e, t) {
3394
- if (e === te.mapValue && t === te.mapValue) return 0;
3395
- if (e === te.mapValue) return 1;
3396
- if (t === te.mapValue) return -1;
3394
+ if (e === ne.mapValue && t === ne.mapValue) return 0;
3395
+ if (e === ne.mapValue) return 1;
3396
+ if (t === ne.mapValue) return -1;
3397
3397
  const n = e.fields || {}, r = Object.keys(n), i = t.fields || {}, s = Object.keys(i);
3398
3398
  // Even though MapValues are likely sorted correctly based on their insertion
3399
3399
  // order (e.g. when received from the backend), local modifications can bring
@@ -3569,7 +3569,7 @@ function isArray(e) {
3569
3569
  }
3570
3570
 
3571
3571
  /** Returns the lowest value for the given value type (inclusive). */ function __PRIVATE_valuesGetLowerBound(e) {
3572
- return "nullValue" in e ? ne : "booleanValue" in e ? {
3572
+ return "nullValue" in e ? re : "booleanValue" in e ? {
3573
3573
  booleanValue: !1
3574
3574
  } : "integerValue" in e || "doubleValue" in e ? {
3575
3575
  doubleValue: NaN
@@ -3615,7 +3615,7 @@ function isArray(e) {
3615
3615
  arrayValue: {}
3616
3616
  } : "arrayValue" in e ? {
3617
3617
  mapValue: {}
3618
- } : "mapValue" in e ? te : fail();
3618
+ } : "mapValue" in e ? ne : fail();
3619
3619
  }
3620
3620
 
3621
3621
  function __PRIVATE_lowerBoundCompare(e, t) {
@@ -4303,10 +4303,10 @@ function __PRIVATE_targetIsDocumentTarget(e) {
4303
4303
  * the provided `fieldPath` (or the upper bound for an descending segment).
4304
4304
  */
4305
4305
  function __PRIVATE_targetGetAscendingBound(e, t, n) {
4306
- let r = ne, i = !0;
4306
+ let r = re, i = !0;
4307
4307
  // Process all filters to find a value for the current field segment
4308
4308
  for (const n of __PRIVATE_targetGetFieldFiltersForPath(e, t)) {
4309
- let e = ne, t = !0;
4309
+ let e = re, t = !0;
4310
4310
  switch (n.op) {
4311
4311
  case "<" /* Operator.LESS_THAN */ :
4312
4312
  case "<=" /* Operator.LESS_THAN_OR_EQUAL */ :
@@ -4325,7 +4325,7 @@ function __PRIVATE_targetGetAscendingBound(e, t, n) {
4325
4325
 
4326
4326
  case "!=" /* Operator.NOT_EQUAL */ :
4327
4327
  case "not-in" /* Operator.NOT_IN */ :
4328
- e = ne;
4328
+ e = re;
4329
4329
  // Remaining filters cannot be used as lower bounds.
4330
4330
  }
4331
4331
  __PRIVATE_lowerBoundCompare({
@@ -4361,10 +4361,10 @@ function __PRIVATE_targetGetAscendingBound(e, t, n) {
4361
4361
  * Returns the value to use as the upper bound for ascending index segment at
4362
4362
  * the provided `fieldPath` (or the lower bound for a descending segment).
4363
4363
  */ function __PRIVATE_targetGetDescendingBound(e, t, n) {
4364
- let r = te, i = !0;
4364
+ let r = ne, i = !0;
4365
4365
  // Process all filters to find a value for the current field segment
4366
4366
  for (const n of __PRIVATE_targetGetFieldFiltersForPath(e, t)) {
4367
- let e = te, t = !0;
4367
+ let e = ne, t = !0;
4368
4368
  switch (n.op) {
4369
4369
  case ">=" /* Operator.GREATER_THAN_OR_EQUAL */ :
4370
4370
  case ">" /* Operator.GREATER_THAN */ :
@@ -4383,7 +4383,7 @@ function __PRIVATE_targetGetAscendingBound(e, t, n) {
4383
4383
 
4384
4384
  case "!=" /* Operator.NOT_EQUAL */ :
4385
4385
  case "not-in" /* Operator.NOT_IN */ :
4386
- e = te;
4386
+ e = ne;
4387
4387
  // Remaining filters cannot be used as upper bounds.
4388
4388
  }
4389
4389
  __PRIVATE_upperBoundCompare({
@@ -4760,22 +4760,22 @@ function __PRIVATE_compareDocs(e, t, n) {
4760
4760
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4761
4761
  * See the License for the specific language governing permissions and
4762
4762
  * limitations under the License.
4763
- */ const re = new SortedMap(DocumentKey.comparator);
4763
+ */ const ie = new SortedMap(DocumentKey.comparator);
4764
4764
 
4765
4765
  function __PRIVATE_mutableDocumentMap() {
4766
- return re;
4766
+ return ie;
4767
4767
  }
4768
4768
 
4769
- const ie = new SortedMap(DocumentKey.comparator);
4769
+ const se = new SortedMap(DocumentKey.comparator);
4770
4770
 
4771
4771
  function documentMap(...e) {
4772
- let t = ie;
4772
+ let t = se;
4773
4773
  for (const n of e) t = t.insert(n.key, n);
4774
4774
  return t;
4775
4775
  }
4776
4776
 
4777
4777
  function __PRIVATE_convertOverlayedDocumentMapToDocumentMap(e) {
4778
- let t = ie;
4778
+ let t = se;
4779
4779
  return e.forEach(((e, n) => t = t.insert(e, n.overlayedDocument))), t;
4780
4780
  }
4781
4781
 
@@ -4791,20 +4791,20 @@ function __PRIVATE_newDocumentKeyMap() {
4791
4791
  return new ObjectMap((e => e.toString()), ((e, t) => e.isEqual(t)));
4792
4792
  }
4793
4793
 
4794
- const se = new SortedMap(DocumentKey.comparator);
4794
+ const oe = new SortedMap(DocumentKey.comparator);
4795
4795
 
4796
- const oe = new SortedSet(DocumentKey.comparator);
4796
+ const _e = new SortedSet(DocumentKey.comparator);
4797
4797
 
4798
4798
  function __PRIVATE_documentKeySet(...e) {
4799
- let t = oe;
4799
+ let t = _e;
4800
4800
  for (const n of e) t = t.add(n);
4801
4801
  return t;
4802
4802
  }
4803
4803
 
4804
- const _e = new SortedSet(__PRIVATE_primitiveComparator);
4804
+ const ae = new SortedSet(__PRIVATE_primitiveComparator);
4805
4805
 
4806
4806
  function __PRIVATE_targetIdSet() {
4807
- return _e;
4807
+ return ae;
4808
4808
  }
4809
4809
 
4810
4810
  /**
@@ -5495,7 +5495,7 @@ class __PRIVATE_VerifyMutation extends Mutation {
5495
5495
  */ static from(e, t, n) {
5496
5496
  __PRIVATE_hardAssert(e.mutations.length === n.length);
5497
5497
  let r = function __PRIVATE_documentVersionMap() {
5498
- return se;
5498
+ return oe;
5499
5499
  }();
5500
5500
  const i = e.mutations;
5501
5501
  for (let e = 0; e < i.length; e++) r = r.insert(i[e].key, n[e].version);
@@ -5609,7 +5609,7 @@ class __PRIVATE_VerifyMutation extends Mutation {
5609
5609
  * Important! The names of these identifiers matter because the string forms
5610
5610
  * are used for reverse lookups from the webchannel stream. Do NOT change the
5611
5611
  * names of these identifiers or change this into a const enum.
5612
- */ var ae, ue;
5612
+ */ var ue, ce;
5613
5613
 
5614
5614
  /**
5615
5615
  * Determines whether an error code represents a permanent error when received
@@ -5674,55 +5674,55 @@ function __PRIVATE_mapCodeFromRpcCode(e) {
5674
5674
  // to send invalid proto messages) we may get an error with no GRPC code.
5675
5675
  return __PRIVATE_logError("GRPC error has no .code"), D.UNKNOWN;
5676
5676
  switch (e) {
5677
- case ae.OK:
5677
+ case ue.OK:
5678
5678
  return D.OK;
5679
5679
 
5680
- case ae.CANCELLED:
5680
+ case ue.CANCELLED:
5681
5681
  return D.CANCELLED;
5682
5682
 
5683
- case ae.UNKNOWN:
5683
+ case ue.UNKNOWN:
5684
5684
  return D.UNKNOWN;
5685
5685
 
5686
- case ae.DEADLINE_EXCEEDED:
5686
+ case ue.DEADLINE_EXCEEDED:
5687
5687
  return D.DEADLINE_EXCEEDED;
5688
5688
 
5689
- case ae.RESOURCE_EXHAUSTED:
5689
+ case ue.RESOURCE_EXHAUSTED:
5690
5690
  return D.RESOURCE_EXHAUSTED;
5691
5691
 
5692
- case ae.INTERNAL:
5692
+ case ue.INTERNAL:
5693
5693
  return D.INTERNAL;
5694
5694
 
5695
- case ae.UNAVAILABLE:
5695
+ case ue.UNAVAILABLE:
5696
5696
  return D.UNAVAILABLE;
5697
5697
 
5698
- case ae.UNAUTHENTICATED:
5698
+ case ue.UNAUTHENTICATED:
5699
5699
  return D.UNAUTHENTICATED;
5700
5700
 
5701
- case ae.INVALID_ARGUMENT:
5701
+ case ue.INVALID_ARGUMENT:
5702
5702
  return D.INVALID_ARGUMENT;
5703
5703
 
5704
- case ae.NOT_FOUND:
5704
+ case ue.NOT_FOUND:
5705
5705
  return D.NOT_FOUND;
5706
5706
 
5707
- case ae.ALREADY_EXISTS:
5707
+ case ue.ALREADY_EXISTS:
5708
5708
  return D.ALREADY_EXISTS;
5709
5709
 
5710
- case ae.PERMISSION_DENIED:
5710
+ case ue.PERMISSION_DENIED:
5711
5711
  return D.PERMISSION_DENIED;
5712
5712
 
5713
- case ae.FAILED_PRECONDITION:
5713
+ case ue.FAILED_PRECONDITION:
5714
5714
  return D.FAILED_PRECONDITION;
5715
5715
 
5716
- case ae.ABORTED:
5716
+ case ue.ABORTED:
5717
5717
  return D.ABORTED;
5718
5718
 
5719
- case ae.OUT_OF_RANGE:
5719
+ case ue.OUT_OF_RANGE:
5720
5720
  return D.OUT_OF_RANGE;
5721
5721
 
5722
- case ae.UNIMPLEMENTED:
5722
+ case ue.UNIMPLEMENTED:
5723
5723
  return D.UNIMPLEMENTED;
5724
5724
 
5725
- case ae.DATA_LOSS:
5725
+ case ue.DATA_LOSS:
5726
5726
  return D.DATA_LOSS;
5727
5727
 
5728
5728
  default:
@@ -5737,14 +5737,14 @@ function __PRIVATE_mapCodeFromRpcCode(e) {
5737
5737
  * "UNKNOWN", etc.)
5738
5738
  * @returns The equivalent Code. Non-matching responses are mapped to
5739
5739
  * Code.UNKNOWN.
5740
- */ (ue = ae || (ae = {}))[ue.OK = 0] = "OK", ue[ue.CANCELLED = 1] = "CANCELLED",
5741
- ue[ue.UNKNOWN = 2] = "UNKNOWN", ue[ue.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
5742
- ue[ue.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", ue[ue.NOT_FOUND = 5] = "NOT_FOUND",
5743
- ue[ue.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", ue[ue.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
5744
- ue[ue.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", ue[ue.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
5745
- ue[ue.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", ue[ue.ABORTED = 10] = "ABORTED",
5746
- ue[ue.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", ue[ue.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
5747
- ue[ue.INTERNAL = 13] = "INTERNAL", ue[ue.UNAVAILABLE = 14] = "UNAVAILABLE", ue[ue.DATA_LOSS = 15] = "DATA_LOSS";
5740
+ */ (ce = ue || (ue = {}))[ce.OK = 0] = "OK", ce[ce.CANCELLED = 1] = "CANCELLED",
5741
+ ce[ce.UNKNOWN = 2] = "UNKNOWN", ce[ce.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
5742
+ ce[ce.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", ce[ce.NOT_FOUND = 5] = "NOT_FOUND",
5743
+ ce[ce.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", ce[ce.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
5744
+ ce[ce.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", ce[ce.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED",
5745
+ ce[ce.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", ce[ce.ABORTED = 10] = "ABORTED",
5746
+ ce[ce.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", ce[ce.UNIMPLEMENTED = 12] = "UNIMPLEMENTED",
5747
+ ce[ce.INTERNAL = 13] = "INTERNAL", ce[ce.UNAVAILABLE = 14] = "UNAVAILABLE", ce[ce.DATA_LOSS = 15] = "DATA_LOSS";
5748
5748
 
5749
5749
  /**
5750
5750
  * @license
@@ -5769,7 +5769,7 @@ ue[ue.INTERNAL = 13] = "INTERNAL", ue[ue.UNAVAILABLE = 14] = "UNAVAILABLE", ue[u
5769
5769
  * integration tests that have registered callbacks to be notified of events
5770
5770
  * that happen during the test execution.
5771
5771
  */
5772
- let ce = null;
5772
+ let le = null;
5773
5773
 
5774
5774
  /**
5775
5775
  * Sets the value of the `testingHooksSpi` object.
@@ -5817,7 +5817,7 @@ function __PRIVATE_newTextEncoder() {
5817
5817
  * See the License for the specific language governing permissions and
5818
5818
  * limitations under the License.
5819
5819
  */
5820
- const le = new Integer([ 4294967295, 4294967295 ], 0);
5820
+ const he = new Integer([ 4294967295, 4294967295 ], 0);
5821
5821
 
5822
5822
  // Hash a string using md5 hashing algorithm.
5823
5823
  function __PRIVATE_getMd5HashValue(e) {
@@ -5852,7 +5852,7 @@ class BloomFilter {
5852
5852
  // Calculate hashed value h(i) = h1 + (i * h2).
5853
5853
  let r = e.add(t.multiply(Integer.fromNumber(n)));
5854
5854
  // Wrap if hash value overflow 64bit.
5855
- return 1 === r.compare(le) && (r = new Integer([ r.getBits(0), r.getBits(1) ], 0)),
5855
+ return 1 === r.compare(he) && (r = new Integer([ r.getBits(0), r.getBits(1) ], 0)),
5856
5856
  r.modulo(this.Ee).toNumber();
5857
5857
  }
5858
5858
  // Return whether the bit on the given index in the bitmap is set to 1.
@@ -6270,7 +6270,7 @@ class __PRIVATE_WatchChangeAggregator {
6270
6270
  const e = 2 /* BloomFilterApplicationStatus.FalsePositive */ === i ? "TargetPurposeExistenceFilterMismatchBloom" /* TargetPurpose.ExistenceFilterMismatchBloom */ : "TargetPurposeExistenceFilterMismatch" /* TargetPurpose.ExistenceFilterMismatch */;
6271
6271
  this.Ke = this.Ke.insert(t, e);
6272
6272
  }
6273
- null == ce || ce.tt(function __PRIVATE_createExistenceFilterMismatchInfoForTestingHooks(e, t, n, r, i) {
6273
+ null == le || le.tt(function __PRIVATE_createExistenceFilterMismatchInfoForTestingHooks(e, t, n, r, i) {
6274
6274
  var s, o, _, a, u, c;
6275
6275
  const l = {
6276
6276
  localCacheCount: e,
@@ -6486,13 +6486,13 @@ function __PRIVATE_snapshotChangesMap() {
6486
6486
  return new SortedMap(DocumentKey.comparator);
6487
6487
  }
6488
6488
 
6489
- const he = (() => {
6489
+ const Pe = (() => {
6490
6490
  const e = {
6491
6491
  asc: "ASCENDING",
6492
6492
  desc: "DESCENDING"
6493
6493
  };
6494
6494
  return e;
6495
- })(), Pe = (() => {
6495
+ })(), Ie = (() => {
6496
6496
  const e = {
6497
6497
  "<": "LESS_THAN",
6498
6498
  "<=": "LESS_THAN_OR_EQUAL",
@@ -6506,7 +6506,7 @@ const he = (() => {
6506
6506
  "array-contains-any": "ARRAY_CONTAINS_ANY"
6507
6507
  };
6508
6508
  return e;
6509
- })(), Ie = (() => {
6509
+ })(), Te = (() => {
6510
6510
  const e = {
6511
6511
  and: "AND",
6512
6512
  or: "OR"
@@ -7039,15 +7039,15 @@ function __PRIVATE_fromFilter(e) {
7039
7039
  }
7040
7040
 
7041
7041
  function __PRIVATE_toDirection(e) {
7042
- return he[e];
7042
+ return Pe[e];
7043
7043
  }
7044
7044
 
7045
7045
  function __PRIVATE_toOperatorName(e) {
7046
- return Pe[e];
7046
+ return Ie[e];
7047
7047
  }
7048
7048
 
7049
7049
  function __PRIVATE_toCompositeOperatorName(e) {
7050
- return Ie[e];
7050
+ return Te[e];
7051
7051
  }
7052
7052
 
7053
7053
  function __PRIVATE_toFieldPathReference(e) {
@@ -7605,8 +7605,9 @@ class __PRIVATE_FirestoreIndexValueWriter {
7605
7605
  // -0.0, 0 and 0.0 are all considered the same
7606
7606
  t.dt(0) : t.dt(n));
7607
7607
  } else if ("timestampValue" in e) {
7608
- const n = e.timestampValue;
7609
- this.Et(t, 20), "string" == typeof n ? t.At(n) : (t.At(`${n.seconds || ""}`), t.dt(n.nanos || 0));
7608
+ let n = e.timestampValue;
7609
+ this.Et(t, 20), "string" == typeof n && (n = __PRIVATE_normalizeTimestamp(n)), t.At(`${n.seconds || ""}`),
7610
+ t.dt(n.nanos || 0);
7610
7611
  } else if ("stringValue" in e) this.Rt(e.stringValue, t), this.Vt(t); else if ("bytesValue" in e) this.Et(t, 30),
7611
7612
  t.ft(__PRIVATE_normalizeByteString(e.bytesValue)), this.Vt(t); else if ("referenceValue" in e) this.gt(e.referenceValue, t); else if ("geoPointValue" in e) {
7612
7613
  const n = e.geoPointValue;
@@ -8368,7 +8369,7 @@ function __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) {
8368
8369
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8369
8370
  * See the License for the specific language governing permissions and
8370
8371
  * limitations under the License.
8371
- */ const Te = new Uint8Array(0);
8372
+ */ const Ee = new Uint8Array(0);
8372
8373
 
8373
8374
  /**
8374
8375
  * A persisted implementation of IndexManager.
@@ -8582,7 +8583,7 @@ class __PRIVATE_IndexedDbIndexManager {
8582
8583
  // combined with the values from the query bounds.
8583
8584
  const _ = (null != t ? t.length : 1) * Math.max(n.length, i.length), a = _ / (null != t ? t.length : 1), u = [];
8584
8585
  for (let c = 0; c < _; ++c) {
8585
- const _ = t ? this.Tn(t[c / a]) : Te, l = this.En(e, _, n[c % a], r), h = this.dn(e, _, i[c % a], s), P = o.map((t => this.En(e, _, t,
8586
+ const _ = t ? this.Tn(t[c / a]) : Ee, l = this.En(e, _, n[c % a], r), h = this.dn(e, _, i[c % a], s), P = o.map((t => this.En(e, _, t,
8586
8587
  /* inclusive= */ !0)));
8587
8588
  u.push(...this.createRange(l, h, P));
8588
8589
  }
@@ -8779,7 +8780,7 @@ class __PRIVATE_IndexedDbIndexManager {
8779
8780
  if (null != i) {
8780
8781
  const s = e.data.field(i.fieldPath);
8781
8782
  if (isArray(s)) for (const i of s.arrayValue.values || []) n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, this.Tn(i), r));
8782
- } else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, Te, r));
8783
+ } else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, Ee, r));
8783
8784
  return n;
8784
8785
  }
8785
8786
  /**
@@ -8854,7 +8855,7 @@ class __PRIVATE_IndexedDbIndexManager {
8854
8855
  // If we encounter two bounds that will create an unmatchable key range,
8855
8856
  // then we return an empty set of key ranges.
8856
8857
  if (this.Dn(r[e], r[e + 1])) return [];
8857
- const t = [ r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue, Te, [] ], n = [ r[e + 1].indexId, this.uid, r[e + 1].arrayValue, r[e + 1].directionalValue, Te, [] ];
8858
+ const t = [ r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue, Ee, [] ], n = [ r[e + 1].indexId, this.uid, r[e + 1].arrayValue, r[e + 1].directionalValue, Ee, [] ];
8858
8859
  i.push(IDBKeyRange.bound(t, n));
8859
8860
  }
8860
8861
  return i;
@@ -8922,7 +8923,7 @@ function __PRIVATE_getMinOffsetFromFieldIndexes(e) {
8922
8923
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8923
8924
  * See the License for the specific language governing permissions and
8924
8925
  * limitations under the License.
8925
- */ const Ee = {
8926
+ */ const de = {
8926
8927
  didRun: !1,
8927
8928
  sequenceNumbersCollected: 0,
8928
8929
  targetsRemoved: 0,
@@ -9655,8 +9656,8 @@ class __PRIVATE_TargetIdGenerator {
9655
9656
  }
9656
9657
  collect(e, t) {
9657
9658
  return -1 === this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug("LruGarbageCollector", "Garbage collection skipped; disabled"),
9658
- PersistencePromise.resolve(Ee)) : this.getCacheSize(e).next((n => n < this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug("LruGarbageCollector", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),
9659
- Ee) : this.Yn(e, t)));
9659
+ PersistencePromise.resolve(de)) : this.getCacheSize(e).next((n => n < this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug("LruGarbageCollector", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),
9660
+ de) : this.Yn(e, t)));
9660
9661
  }
9661
9662
  getCacheSize(e) {
9662
9663
  return this.jn.getCacheSize(e);
@@ -10251,6 +10252,7 @@ function __PRIVATE_dbCollectionGroupKey(e, t) {
10251
10252
  * document lookup via `getAll()`.
10252
10253
  * 14. Add overlays.
10253
10254
  * 15. Add indexing support.
10255
+ * 16. Parse timestamp strings before creating index entries.
10254
10256
  */
10255
10257
  /**
10256
10258
  * @license
@@ -11528,7 +11530,13 @@ class __PRIVATE_MemoryLruDelegate {
11528
11530
  }).createIndex("documentKeyIndex", W, {
11529
11531
  unique: !1
11530
11532
  });
11531
- }(e)))), s;
11533
+ }(e)))), n < 16 && r >= 16 && (
11534
+ // Clear the object stores to remove possibly corrupted index entries
11535
+ s = s.next((() => {
11536
+ t.objectStore("indexState").clear();
11537
+ })).next((() => {
11538
+ t.objectStore("indexEntries").clear();
11539
+ }))), s;
11532
11540
  }
11533
11541
  ei(e) {
11534
11542
  let t = 0;
@@ -11671,7 +11679,7 @@ function __PRIVATE_createQueryCache(e) {
11671
11679
  }), e.createObjectStore("targetGlobal");
11672
11680
  }
11673
11681
 
11674
- const de = "Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";
11682
+ const Ae = "Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";
11675
11683
 
11676
11684
  /**
11677
11685
  * Oldest acceptable age in milliseconds for client metadata before the client
@@ -11734,7 +11742,7 @@ class __PRIVATE_IndexedDbPersistence {
11734
11742
  * If set to true, forcefully obtains database access. Existing tabs will
11735
11743
  * no longer be able to access IndexedDB.
11736
11744
  */
11737
- u, c = 15) {
11745
+ u, c = 16) {
11738
11746
  if (this.allowTabSynchronization = e, this.persistenceKey = t, this.clientId = n,
11739
11747
  this.oi = i, this.window = s, this.document = o, this._i = a, this.ai = u, this.ui = c,
11740
11748
  this.kr = null, this.qr = !1, this.isPrimary = !1, this.networkEnabled = !0,
@@ -11767,7 +11775,7 @@ class __PRIVATE_IndexedDbPersistence {
11767
11775
  if (!this.isPrimary && !this.allowTabSynchronization)
11768
11776
  // Fail `start()` if `synchronizeTabs` is disabled and we cannot
11769
11777
  // obtain the primary lease.
11770
- throw new FirestoreError(D.FAILED_PRECONDITION, de);
11778
+ throw new FirestoreError(D.FAILED_PRECONDITION, Ae);
11771
11779
  return this.Ri(), this.Vi(), this.mi(), this.runTransaction("getHighestListenSequenceNumber", "readonly", (e => this.Qr.getHighestSequenceNumber(e)));
11772
11780
  })).then((e => {
11773
11781
  this.kr = new __PRIVATE_ListenSequence(e, this._i);
@@ -11909,7 +11917,7 @@ class __PRIVATE_IndexedDbPersistence {
11909
11917
  // settings is not supported.
11910
11918
  // TODO(b/114226234): Remove this check when `synchronizeTabs` can
11911
11919
  // no longer be turned off.
11912
- throw new FirestoreError(D.FAILED_PRECONDITION, de);
11920
+ throw new FirestoreError(D.FAILED_PRECONDITION, Ae);
11913
11921
  return !1;
11914
11922
  }
11915
11923
  }
@@ -11979,7 +11987,7 @@ class __PRIVATE_IndexedDbPersistence {
11979
11987
  const r = "readonly" === t ? "readonly" : "readwrite", i =
11980
11988
  /** Returns the object stores for the provided schema. */
11981
11989
  function __PRIVATE_getObjectStores(e) {
11982
- return 15 === e ? X : 14 === e ? Z : 13 === e ? Y : 12 === e ? J : 11 === e ? H : void fail();
11990
+ return 16 === e ? ee : 15 === e ? X : 14 === e ? Z : 13 === e ? Y : 12 === e ? J : 11 === e ? H : void fail();
11983
11991
  }(this.ui);
11984
11992
  let s;
11985
11993
  // Do all transactions as readwrite against all object stores, since we
@@ -12000,7 +12008,7 @@ class __PRIVATE_IndexedDbPersistence {
12000
12008
  // be turned off.
12001
12009
  ki(e) {
12002
12010
  return __PRIVATE_primaryClientStore(e).get("owner").next((e => {
12003
- if (null !== e && this.Ci(e.leaseTimestampMs, 5e3) && !this.Mi(e.ownerId) && !this.Si(e) && !(this.ai || this.allowTabSynchronization && e.allowTabSynchronization)) throw new FirestoreError(D.FAILED_PRECONDITION, de);
12011
+ if (null !== e && this.Ci(e.leaseTimestampMs, 5e3) && !this.Mi(e.ownerId) && !this.Si(e) && !(this.ai || this.allowTabSynchronization && e.allowTabSynchronization)) throw new FirestoreError(D.FAILED_PRECONDITION, Ae);
12004
12012
  }));
12005
12013
  }
12006
12014
  /**
@@ -13497,7 +13505,7 @@ class __PRIVATE_BrowserConnectivityMonitor {
13497
13505
  /**
13498
13506
  * The value returned from the most recent invocation of
13499
13507
  * `generateUniqueDebugId()`, or null if it has never been invoked.
13500
- */ let Ae = null;
13508
+ */ let Re = null;
13501
13509
 
13502
13510
  /**
13503
13511
  * Generates and returns an initial value for `lastUniqueDebugId`.
@@ -13522,9 +13530,9 @@ class __PRIVATE_BrowserConnectivityMonitor {
13522
13530
  * @return the 10-character generated ID (e.g. "0xa1b2c3d4").
13523
13531
  */
13524
13532
  function __PRIVATE_generateUniqueDebugId() {
13525
- return null === Ae ? Ae = function __PRIVATE_generateInitialUniqueDebugId() {
13533
+ return null === Re ? Re = function __PRIVATE_generateInitialUniqueDebugId() {
13526
13534
  return 268435456 + Math.round(2147483648 * Math.random());
13527
- }() : Ae++, "0x" + Ae.toString(16);
13535
+ }() : Re++, "0x" + Re.toString(16);
13528
13536
  }
13529
13537
 
13530
13538
  /**
@@ -13542,7 +13550,7 @@ function __PRIVATE_generateUniqueDebugId() {
13542
13550
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13543
13551
  * See the License for the specific language governing permissions and
13544
13552
  * limitations under the License.
13545
- */ const Re = {
13553
+ */ const Ve = {
13546
13554
  BatchGetDocuments: "batchGet",
13547
13555
  Commit: "commit",
13548
13556
  RunQuery: "runQuery",
@@ -13620,7 +13628,7 @@ class __PRIVATE_StreamBridge {
13620
13628
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13621
13629
  * See the License for the specific language governing permissions and
13622
13630
  * limitations under the License.
13623
- */ const Ve = "WebChannelConnection";
13631
+ */ const me = "WebChannelConnection";
13624
13632
 
13625
13633
  class __PRIVATE_WebChannelConnection extends
13626
13634
  /**
@@ -13674,7 +13682,7 @@ class __PRIVATE_RestConnection {
13674
13682
  t && t.headers.forEach(((t, n) => e[n] = t)), n && n.headers.forEach(((t, n) => e[n] = t));
13675
13683
  }
13676
13684
  bo(e, t) {
13677
- const n = Re[e];
13685
+ const n = Ve[e];
13678
13686
  return `${this.fo}/v1/${t}:${n}`;
13679
13687
  }
13680
13688
  /**
@@ -13698,17 +13706,17 @@ class __PRIVATE_RestConnection {
13698
13706
  switch (_.getLastErrorCode()) {
13699
13707
  case ErrorCode.NO_ERROR:
13700
13708
  const t = _.getResponseJson();
13701
- __PRIVATE_logDebug(Ve, `XHR for RPC '${e}' ${i} received:`, JSON.stringify(t)),
13709
+ __PRIVATE_logDebug(me, `XHR for RPC '${e}' ${i} received:`, JSON.stringify(t)),
13702
13710
  s(t);
13703
13711
  break;
13704
13712
 
13705
13713
  case ErrorCode.TIMEOUT:
13706
- __PRIVATE_logDebug(Ve, `RPC '${e}' ${i} timed out`), o(new FirestoreError(D.DEADLINE_EXCEEDED, "Request time out"));
13714
+ __PRIVATE_logDebug(me, `RPC '${e}' ${i} timed out`), o(new FirestoreError(D.DEADLINE_EXCEEDED, "Request time out"));
13707
13715
  break;
13708
13716
 
13709
13717
  case ErrorCode.HTTP_ERROR:
13710
13718
  const n = _.getStatus();
13711
- if (__PRIVATE_logDebug(Ve, `RPC '${e}' ${i} failed with status:`, n, "response text:", _.getResponseText()),
13719
+ if (__PRIVATE_logDebug(me, `RPC '${e}' ${i} failed with status:`, n, "response text:", _.getResponseText()),
13712
13720
  n > 0) {
13713
13721
  let e = _.getResponseJson();
13714
13722
  Array.isArray(e) && (e = e[0]);
@@ -13730,11 +13738,11 @@ class __PRIVATE_RestConnection {
13730
13738
  fail();
13731
13739
  }
13732
13740
  } finally {
13733
- __PRIVATE_logDebug(Ve, `RPC '${e}' ${i} completed.`);
13741
+ __PRIVATE_logDebug(me, `RPC '${e}' ${i} completed.`);
13734
13742
  }
13735
13743
  }));
13736
13744
  const a = JSON.stringify(r);
13737
- __PRIVATE_logDebug(Ve, `RPC '${e}' ${i} sending request:`, r), _.send(t, "POST", a, n, 15);
13745
+ __PRIVATE_logDebug(me, `RPC '${e}' ${i} sending request:`, r), _.send(t, "POST", a, n, 15);
13738
13746
  }));
13739
13747
  }
13740
13748
  Fo(e, t, n) {
@@ -13775,7 +13783,7 @@ class __PRIVATE_RestConnection {
13775
13783
  // which is recognized by the webchannel backend.
13776
13784
  _.encodeInitMessageHeaders = !0;
13777
13785
  const u = i.join("");
13778
- __PRIVATE_logDebug(Ve, `Creating RPC '${e}' stream ${r}: ${u}`, _);
13786
+ __PRIVATE_logDebug(me, `Creating RPC '${e}' stream ${r}: ${u}`, _);
13779
13787
  const c = s.createWebChannel(u, _);
13780
13788
  // WebChannel supports sending the first message with the handshake - saving
13781
13789
  // a network round trip. However, it will have to call send in the same
@@ -13788,8 +13796,8 @@ class __PRIVATE_RestConnection {
13788
13796
  // on a closed stream
13789
13797
  const P = new __PRIVATE_StreamBridge({
13790
13798
  lo: t => {
13791
- h ? __PRIVATE_logDebug(Ve, `Not sending because RPC '${e}' stream ${r} is closed:`, t) : (l || (__PRIVATE_logDebug(Ve, `Opening RPC '${e}' stream ${r} transport.`),
13792
- c.open(), l = !0), __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} sending:`, t),
13799
+ h ? __PRIVATE_logDebug(me, `Not sending because RPC '${e}' stream ${r} is closed:`, t) : (l || (__PRIVATE_logDebug(me, `Opening RPC '${e}' stream ${r} transport.`),
13800
+ c.open(), l = !0), __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} sending:`, t),
13793
13801
  c.send(t));
13794
13802
  },
13795
13803
  ho: () => c.close()
@@ -13811,12 +13819,12 @@ class __PRIVATE_RestConnection {
13811
13819
  // Note that eventually this function could go away if we are confident
13812
13820
  // enough the code is exception free.
13813
13821
  return __PRIVATE_unguardedEventListen(c, WebChannel.EventType.OPEN, (() => {
13814
- h || __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} transport opened.`);
13822
+ h || __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} transport opened.`);
13815
13823
  })), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.CLOSE, (() => {
13816
- h || (h = !0, __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} transport closed`),
13824
+ h || (h = !0, __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} transport closed`),
13817
13825
  P.Vo());
13818
13826
  })), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.ERROR, (t => {
13819
- h || (h = !0, __PRIVATE_logWarn(Ve, `RPC '${e}' stream ${r} transport errored:`, t),
13827
+ h || (h = !0, __PRIVATE_logWarn(me, `RPC '${e}' stream ${r} transport errored:`, t),
13820
13828
  P.Vo(new FirestoreError(D.UNAVAILABLE, "The operation could not be completed")));
13821
13829
  })), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.MESSAGE, (t => {
13822
13830
  var n;
@@ -13830,7 +13838,7 @@ class __PRIVATE_RestConnection {
13830
13838
  // Use any because msgData.error is not typed.
13831
13839
  const s = i, o = s.error || (null === (n = s[0]) || void 0 === n ? void 0 : n.error);
13832
13840
  if (o) {
13833
- __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} received error:`, o);
13841
+ __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} received error:`, o);
13834
13842
  // error.status will be a string like 'OK' or 'NOT_FOUND'.
13835
13843
  const t = o.status;
13836
13844
  let n =
@@ -13843,16 +13851,16 @@ class __PRIVATE_RestConnection {
13843
13851
  function __PRIVATE_mapCodeFromRpcStatus(e) {
13844
13852
  // lookup by string
13845
13853
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13846
- const t = ae[e];
13854
+ const t = ue[e];
13847
13855
  if (void 0 !== t) return __PRIVATE_mapCodeFromRpcCode(t);
13848
13856
  }(t), i = o.message;
13849
13857
  void 0 === n && (n = D.INTERNAL, i = "Unknown error status: " + t + " with message " + o.message),
13850
13858
  // Mark closed so no further events are propagated
13851
13859
  h = !0, P.Vo(new FirestoreError(n, i)), c.close();
13852
- } else __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} received:`, i), P.mo(i);
13860
+ } else __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} received:`, i), P.mo(i);
13853
13861
  }
13854
13862
  })), __PRIVATE_unguardedEventListen(o, Event.STAT_EVENT, (t => {
13855
- t.stat === Stat.PROXY ? __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === Stat.NOPROXY && __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} detected no buffering proxy`);
13863
+ t.stat === Stat.PROXY ? __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === Stat.NOPROXY && __PRIVATE_logDebug(me, `RPC '${e}' stream ${r} detected no buffering proxy`);
13856
13864
  })), setTimeout((() => {
13857
13865
  // Technically we could/should wait for the WebChannel opened event,
13858
13866
  // but because we want to send the first message with the WebChannel
@@ -15441,12 +15449,12 @@ function __PRIVATE_raiseSnapshotsInSyncEvent(e) {
15441
15449
  }));
15442
15450
  }
15443
15451
 
15444
- var me, fe;
15452
+ var fe, ge;
15445
15453
 
15446
15454
  /** Listen to both cache and server changes */
15447
- (fe = me || (me = {})).j_ = "default",
15455
+ (ge = fe || (fe = {})).j_ = "default",
15448
15456
  /** Listen to changes in cache only */
15449
- fe.Cache = "cache";
15457
+ ge.Cache = "cache";
15450
15458
 
15451
15459
  /**
15452
15460
  * QueryListener takes a series of internal view snapshots and determines
@@ -15521,7 +15529,7 @@ class __PRIVATE_QueryListener {
15521
15529
  this.J_ = !0, this.H_.next(e);
15522
15530
  }
15523
15531
  U_() {
15524
- return this.options.source !== me.Cache;
15532
+ return this.options.source !== fe.Cache;
15525
15533
  }
15526
15534
  }
15527
15535
 
@@ -17888,7 +17896,7 @@ function __PRIVATE_cloneLongPollingOptions(e) {
17888
17896
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17889
17897
  * See the License for the specific language governing permissions and
17890
17898
  * limitations under the License.
17891
- */ const ge = new Map;
17899
+ */ const pe = new Map;
17892
17900
 
17893
17901
  /**
17894
17902
  * An instance map that ensures only one Datastore exists per Firestore
@@ -18134,8 +18142,8 @@ class Firestore$1 {
18134
18142
  * when the `Firestore` instance is terminated.
18135
18143
  */
18136
18144
  return function __PRIVATE_removeComponents(e) {
18137
- const t = ge.get(e);
18138
- t && (__PRIVATE_logDebug("ComponentProvider", "Removing Datastore"), ge.delete(e),
18145
+ const t = pe.get(e);
18146
+ t && (__PRIVATE_logDebug("ComponentProvider", "Removing Datastore"), pe.delete(e),
18139
18147
  t.terminate());
18140
18148
  }(this), Promise.resolve();
18141
18149
  }
@@ -18686,7 +18694,7 @@ class LoadBundleTask {
18686
18694
  * Constant used to indicate the LRU garbage collection should be disabled.
18687
18695
  * Set this value as the `cacheSizeBytes` on the settings passed to the
18688
18696
  * {@link Firestore} instance.
18689
- */ const pe = -1;
18697
+ */ const ye = -1;
18690
18698
 
18691
18699
  /**
18692
18700
  * The Cloud Firestore service interface.
@@ -19309,7 +19317,7 @@ class AggregateField {
19309
19317
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19310
19318
  * See the License for the specific language governing permissions and
19311
19319
  * limitations under the License.
19312
- */ const ye = /^__.*__$/;
19320
+ */ const we = /^__.*__$/;
19313
19321
 
19314
19322
  /** The result of parsing document data (e.g. for a setData call). */ class ParsedSetData {
19315
19323
  constructor(e, t, n) {
@@ -19420,7 +19428,7 @@ function __PRIVATE_isWrite(e) {
19420
19428
  }
19421
19429
  pu(e) {
19422
19430
  if (0 === e.length) throw this.Su("Document fields must not be empty");
19423
- if (__PRIVATE_isWrite(this.Vu) && ye.test(e)) throw this.Su('Document fields cannot begin and end with "__"');
19431
+ if (__PRIVATE_isWrite(this.Vu) && we.test(e)) throw this.Su('Document fields cannot begin and end with "__"');
19424
19432
  }
19425
19433
  }
19426
19434
 
@@ -19775,7 +19783,7 @@ function __PRIVATE_validatePlainObject(e, t, n) {
19775
19783
 
19776
19784
  /**
19777
19785
  * Matches any characters in a field path string that are reserved.
19778
- */ const we = new RegExp("[~\\*/\\[\\]]");
19786
+ */ const Se = new RegExp("[~\\*/\\[\\]]");
19779
19787
 
19780
19788
  /**
19781
19789
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -19786,7 +19794,7 @@ function __PRIVATE_validatePlainObject(e, t, n) {
19786
19794
  * @param targetDoc - The document against which the field path will be
19787
19795
  * evaluated.
19788
19796
  */ function __PRIVATE_fieldPathFromDotSeparatedString(e, t, n) {
19789
- if (t.search(we) >= 0) throw __PRIVATE_createError(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`, e,
19797
+ if (t.search(Se) >= 0) throw __PRIVATE_createError(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`, e,
19790
19798
  /* hasConverter= */ !1,
19791
19799
  /* path= */ void 0, n);
19792
19800
  try {
@@ -21340,7 +21348,7 @@ class __PRIVATE_MultiTabManagerImpl {
21340
21348
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21341
21349
  * See the License for the specific language governing permissions and
21342
21350
  * limitations under the License.
21343
- */ const Se = {
21351
+ */ const be = {
21344
21352
  maxAttempts: 5
21345
21353
  };
21346
21354
 
@@ -21552,7 +21560,7 @@ class Transaction extends class Transaction$1 {
21552
21560
  * rejected promise with the corresponding failure error is returned.
21553
21561
  */ function runTransaction(e, t, n) {
21554
21562
  e = __PRIVATE_cast(e, Firestore);
21555
- const r = Object.assign(Object.assign({}, Se), n);
21563
+ const r = Object.assign(Object.assign({}, be), n);
21556
21564
  !function __PRIVATE_validateTransactionOptions(e) {
21557
21565
  if (e.maxAttempts < 1) throw new FirestoreError(D.INVALID_ARGUMENT, "Max attempts must be at least 1");
21558
21566
  }(r);
@@ -21768,12 +21776,12 @@ function __PRIVATE_tryGetString(e, t) {
21768
21776
  */ function getPersistentCacheIndexManager(e) {
21769
21777
  var t;
21770
21778
  e = __PRIVATE_cast(e, Firestore);
21771
- const n = be.get(e);
21779
+ const n = De.get(e);
21772
21780
  if (n) return n;
21773
21781
  const r = ensureFirestoreConfigured(e);
21774
21782
  if ("persistent" !== (null === (t = r._uninitializedComponentsProvider) || void 0 === t ? void 0 : t._offlineKind)) return null;
21775
21783
  const i = new PersistentCacheIndexManager(r);
21776
- return be.set(e, i), i;
21784
+ return De.set(e, i), i;
21777
21785
  }
21778
21786
 
21779
21787
  /**
@@ -21816,7 +21824,7 @@ function __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {
21816
21824
  * Use a `WeakMap` so that the mapping will be automatically dropped when the
21817
21825
  * `Firestore` instance is garbage collected. This emulates a private member
21818
21826
  * as described in https://goo.gle/454yvug.
21819
- */ const be = new WeakMap;
21827
+ */ const De = new WeakMap;
21820
21828
 
21821
21829
  /**
21822
21830
  * @license
@@ -21869,10 +21877,10 @@ function __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {
21869
21877
  this.Mu = new Map;
21870
21878
  }
21871
21879
  static get instance() {
21872
- return De || (De = new __PRIVATE_TestingHooksSpiImpl, function __PRIVATE_setTestingHooksSpi(e) {
21873
- if (ce) throw new Error("a TestingHooksSpi instance is already set");
21874
- ce = e;
21875
- }(De)), De;
21880
+ return Ce || (Ce = new __PRIVATE_TestingHooksSpiImpl, function __PRIVATE_setTestingHooksSpi(e) {
21881
+ if (le) throw new Error("a TestingHooksSpi instance is already set");
21882
+ le = e;
21883
+ }(Ce)), Ce;
21876
21884
  }
21877
21885
  tt(e) {
21878
21886
  this.Mu.forEach((t => t(e)));
@@ -21883,7 +21891,7 @@ function __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {
21883
21891
  }
21884
21892
  }
21885
21893
 
21886
- let De = null;
21894
+ let Ce = null;
21887
21895
 
21888
21896
  /**
21889
21897
  * Cloud Firestore
@@ -21900,10 +21908,10 @@ let De = null;
21900
21908
  return r = Object.assign({
21901
21909
  useFetchStreams: t
21902
21910
  }, r), s._setSettings(r), s;
21903
- }), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.5.0-canary.9ca1a4e4f", e),
21911
+ }), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.5.0-canary.c6ecac8ac", e),
21904
21912
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21905
- registerVersion(w, "4.5.0-canary.9ca1a4e4f", "esm2017");
21913
+ registerVersion(w, "4.5.0-canary.c6ecac8ac", "esm2017");
21906
21914
  }();
21907
21915
 
21908
- export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, pe as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, __PRIVATE_AutoId as _AutoId, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
21916
+ export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, ye as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, __PRIVATE_AutoId as _AutoId, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
21909
21917
  //# sourceMappingURL=index.esm2017.js.map