@firebase/firestore 3.4.4-canary.dd86989b3 → 3.4.4-canary.e8972ef49

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 (79) hide show
  1. package/dist/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  2. package/dist/firestore/src/api.d.ts +1 -1
  3. package/dist/firestore/src/core/database_info.d.ts +1 -0
  4. package/dist/firestore/src/core/target.d.ts +34 -5
  5. package/dist/firestore/src/lite-api/query.d.ts +2 -2
  6. package/dist/firestore/src/local/index_manager.d.ts +52 -0
  7. package/dist/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  8. package/dist/firestore/src/local/indexeddb_schema.d.ts +121 -7
  9. package/dist/firestore/src/local/memory_index_manager.d.ts +11 -0
  10. package/dist/firestore/src/model/field_index.d.ts +4 -0
  11. package/dist/firestore/src/model/values.d.ts +7 -0
  12. package/dist/firestore/test/unit/model/target.test.d.ts +17 -0
  13. package/dist/firestore/test/util/helpers.d.ts +2 -2
  14. package/dist/index.esm2017.js +2626 -2469
  15. package/dist/index.esm2017.js.map +1 -1
  16. package/dist/index.esm5.js +2627 -2547
  17. package/dist/index.esm5.js.map +1 -1
  18. package/dist/index.node.cjs.js +456 -279
  19. package/dist/index.node.cjs.js.map +1 -1
  20. package/dist/index.node.mjs +456 -279
  21. package/dist/index.node.mjs.map +1 -1
  22. package/dist/index.rn.js +2652 -2491
  23. package/dist/index.rn.js.map +1 -1
  24. package/dist/internal.d.ts +171 -2
  25. package/dist/lite/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  26. package/dist/lite/firestore/src/api.d.ts +1 -1
  27. package/dist/lite/firestore/src/core/database_info.d.ts +1 -0
  28. package/dist/lite/firestore/src/core/target.d.ts +34 -5
  29. package/dist/lite/firestore/src/lite-api/query.d.ts +2 -2
  30. package/dist/lite/firestore/src/local/index_manager.d.ts +52 -0
  31. package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  32. package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +121 -7
  33. package/dist/lite/firestore/src/local/memory_index_manager.d.ts +11 -0
  34. package/dist/lite/firestore/src/model/field_index.d.ts +4 -0
  35. package/dist/lite/firestore/src/model/values.d.ts +7 -0
  36. package/dist/lite/firestore/test/unit/model/target.test.d.ts +17 -0
  37. package/dist/lite/firestore/test/util/helpers.d.ts +2 -2
  38. package/dist/lite/index.browser.esm2017.js +1159 -1152
  39. package/dist/lite/index.browser.esm2017.js.map +1 -1
  40. package/dist/lite/index.browser.esm5.js +311 -308
  41. package/dist/lite/index.browser.esm5.js.map +1 -1
  42. package/dist/lite/index.node.cjs.js +39 -28
  43. package/dist/lite/index.node.cjs.js.map +1 -1
  44. package/dist/lite/index.node.mjs +39 -28
  45. package/dist/lite/index.node.mjs.map +1 -1
  46. package/dist/lite/index.rn.esm2017.js +360 -353
  47. package/dist/lite/index.rn.esm2017.js.map +1 -1
  48. package/dist/lite/internal.d.ts +3 -2
  49. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +125 -124
  50. package/dist/lite/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  51. package/dist/lite/packages/firestore/src/api.d.ts +1 -1
  52. package/dist/lite/packages/firestore/src/core/database_info.d.ts +1 -0
  53. package/dist/lite/packages/firestore/src/core/target.d.ts +34 -5
  54. package/dist/lite/packages/firestore/src/lite-api/query.d.ts +2 -2
  55. package/dist/lite/packages/firestore/src/local/index_manager.d.ts +52 -0
  56. package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  57. package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
  58. package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
  59. package/dist/lite/packages/firestore/src/model/field_index.d.ts +4 -0
  60. package/dist/lite/packages/firestore/src/model/values.d.ts +7 -0
  61. package/dist/lite/packages/firestore/test/unit/model/target.test.d.ts +17 -0
  62. package/dist/lite/packages/firestore/test/util/helpers.d.ts +2 -2
  63. package/dist/lite/private.d.ts +2 -2
  64. package/dist/packages/firestore/dist/index.esm2017.d.ts +148 -147
  65. package/dist/packages/firestore/src/api/{query.d.ts → filter.d.ts} +0 -0
  66. package/dist/packages/firestore/src/api.d.ts +1 -1
  67. package/dist/packages/firestore/src/core/database_info.d.ts +1 -0
  68. package/dist/packages/firestore/src/core/target.d.ts +34 -5
  69. package/dist/packages/firestore/src/lite-api/query.d.ts +2 -2
  70. package/dist/packages/firestore/src/local/index_manager.d.ts +52 -0
  71. package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
  72. package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
  73. package/dist/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
  74. package/dist/packages/firestore/src/model/field_index.d.ts +4 -0
  75. package/dist/packages/firestore/src/model/values.d.ts +7 -0
  76. package/dist/packages/firestore/test/unit/model/target.test.d.ts +17 -0
  77. package/dist/packages/firestore/test/util/helpers.d.ts +2 -2
  78. package/dist/private.d.ts +170 -2
  79. package/package.json +9 -9
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- var y = "9.6.5-canary.dd86989b3", v = new l("@firebase/firestore");
70
+ var y = "9.6.5-canary.e8972ef49", v = new l("@firebase/firestore");
71
71
 
72
72
  /**
73
73
  * @license
@@ -356,7 +356,9 @@ function(t, e, n, r, i, o, a, s) {
356
356
  function t(t, e) {
357
357
  this.projectId = t, this.database = e || "(default)";
358
358
  }
359
- return Object.defineProperty(t.prototype, "isDefaultDatabase", {
359
+ return t.empty = function() {
360
+ return new t("", "");
361
+ }, Object.defineProperty(t.prototype, "isDefaultDatabase", {
360
362
  get: function() {
361
363
  return "(default)" === this.database;
362
364
  },
@@ -2042,7 +2044,7 @@ var Wt = /** @class */ function(e) {
2042
2044
  }));
2043
2045
  }, n;
2044
2046
  }(Wt), re = function(t, e) {
2045
- this.position = t, this.before = e;
2047
+ this.position = t, this.inclusive = e;
2046
2048
  }, ie = function(t, e /* ASCENDING */) {
2047
2049
  void 0 === e && (e = "asc"), this.field = t, this.dir = e;
2048
2050
  };
@@ -2054,7 +2056,7 @@ var Wt = /** @class */ function(e) {
2054
2056
  function ae(t, e) {
2055
2057
  if (null === t) return null === e;
2056
2058
  if (null === e) return !1;
2057
- if (t.before !== e.before || t.position.length !== e.position.length) return !1;
2059
+ if (t.inclusive !== e.inclusive || t.position.length !== e.position.length) return !1;
2058
2060
  for (var n = 0; n < t.position.length; n++) if (!Ot(t.position[n], e.position[n])) return !1;
2059
2061
  return !0;
2060
2062
  }
@@ -2164,7 +2166,7 @@ function le(t) {
2164
2166
  n.push(new ie(o.field, a));
2165
2167
  }
2166
2168
  // We need to swap the cursors to match the now-flipped query ordering.
2167
- var s = e.endAt ? new re(e.endAt.position, !e.endAt.before) : null, u = e.startAt ? new re(e.startAt.position, !e.startAt.before) : null;
2169
+ var s = e.endAt ? new re(e.endAt.position, !e.endAt.inclusive) : null, u = e.startAt ? new re(e.startAt.position, !e.startAt.inclusive) : null;
2168
2170
  // Now return as a LimitType.First query.
2169
2171
  e.S = Ht(e.path, e.collectionGroup, n, e.filters, e.limit, s, u);
2170
2172
  }
@@ -2391,7 +2393,7 @@ function Ce(t, e) {
2391
2393
  function je(t, e) {
2392
2394
  var n, r = function(t) {
2393
2395
  var e = Z.fromString(t);
2394
- return E(Qe(e)), e;
2396
+ return E(ze(e)), e;
2395
2397
  }(e);
2396
2398
  if (r.get(1) !== t.databaseId.projectId) throw new U(V, "Tried to deserialize key from different project: " + r.get(1) + " vs " + t.databaseId.projectId);
2397
2399
  if (r.get(3) !== t.databaseId.database) throw new U(V, "Tried to deserialize key from different database: " + r.get(3) + " vs " + t.databaseId.database);
@@ -2414,29 +2416,21 @@ function Me(t, e, n) {
2414
2416
  }
2415
2417
 
2416
2418
  function Ue(t) {
2417
- return {
2418
- before: t.before,
2419
- values: t.position
2420
- };
2421
- }
2422
-
2423
- // visible for testing
2424
- function xe(t) {
2425
2419
  return ke[t];
2426
2420
  }
2427
2421
 
2428
2422
  // visible for testing
2429
- function Be(t) {
2423
+ function xe(t) {
2430
2424
  return Ve[t];
2431
2425
  }
2432
2426
 
2433
- function Ge(t) {
2427
+ function Be(t) {
2434
2428
  return {
2435
2429
  fieldPath: t.canonicalString()
2436
2430
  };
2437
2431
  }
2438
2432
 
2439
- function ze(t) {
2433
+ function Ge(t) {
2440
2434
  var e = [];
2441
2435
  return t.fields.forEach((function(t) {
2442
2436
  return e.push(t.canonicalString());
@@ -2445,7 +2439,7 @@ function ze(t) {
2445
2439
  };
2446
2440
  }
2447
2441
 
2448
- function Qe(t) {
2442
+ function ze(t) {
2449
2443
  // Resource names have at least 4 components (project ID, database ID)
2450
2444
  return t.length >= 4 && "projects" === t.get(0) && "databases" === t.get(2);
2451
2445
  }
@@ -2465,7 +2459,7 @@ function Qe(t) {
2465
2459
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2466
2460
  * See the License for the specific language governing permissions and
2467
2461
  * limitations under the License.
2468
- */ function Ke(t) {
2462
+ */ function Qe(t) {
2469
2463
  return new De(t, /* useProto3Json= */ !0);
2470
2464
  }
2471
2465
 
@@ -2493,7 +2487,7 @@ function Qe(t) {
2493
2487
  * backoff curve, and a +/- 50% "jitter" that is calculated and added to the
2494
2488
  * base delay. This prevents clients from accidentally synchronizing their
2495
2489
  * delays causing spikes of load to the backend.
2496
- */ var He = /** @class */ function() {
2490
+ */ var Ke = /** @class */ function() {
2497
2491
  function t(
2498
2492
  /**
2499
2493
  * The AsyncQueue to run backoff operations on.
@@ -2567,7 +2561,7 @@ function Qe(t) {
2567
2561
  /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ t.prototype.Y = function() {
2568
2562
  return (Math.random() - .5) * this.j;
2569
2563
  }, t;
2570
- }(), We = /** @class */ function(e) {
2564
+ }(), He = /** @class */ function(e) {
2571
2565
  function n(t, n, r, i) {
2572
2566
  var o = this;
2573
2567
  return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
@@ -2627,7 +2621,7 @@ function Qe(t) {
2627
2621
  */
2628
2622
  // TODO(firestorexp): Make sure there is only one Datastore instance per
2629
2623
  // firestore-exp client.
2630
- function Ye(t, r) {
2624
+ function We(t, r) {
2631
2625
  return e(this, void 0, void 0, (function() {
2632
2626
  var e, i, o;
2633
2627
  return n(this, (function(n) {
@@ -2643,7 +2637,7 @@ function Ye(t, r) {
2643
2637
  delete: Ce(t, e.key)
2644
2638
  }; else if (e instanceof Ee) n = {
2645
2639
  update: Me(t, e.key, e.data),
2646
- updateMask: ze(e.fieldMask)
2640
+ updateMask: Ge(e.fieldMask)
2647
2641
  }; else {
2648
2642
  if (!(e instanceof Ae)) return S();
2649
2643
  n = {
@@ -2693,7 +2687,7 @@ function Ye(t, r) {
2693
2687
  }));
2694
2688
  }
2695
2689
 
2696
- function $e(t, r) {
2690
+ function Ye(t, r) {
2697
2691
  return e(this, void 0, void 0, (function() {
2698
2692
  var e, i, o, a, s, u;
2699
2693
  return n(this, (function(n) {
@@ -2732,7 +2726,7 @@ function $e(t, r) {
2732
2726
  }));
2733
2727
  }
2734
2728
 
2735
- function Xe(t, r) {
2729
+ function $e(t, r) {
2736
2730
  return e(this, void 0, void 0, (function() {
2737
2731
  var e, i;
2738
2732
  return n(this, (function(n) {
@@ -2757,34 +2751,34 @@ function Xe(t, r) {
2757
2751
  if ("==" /* EQUAL */ === t.op) {
2758
2752
  if (xt(t.value)) return {
2759
2753
  unaryFilter: {
2760
- field: Ge(t.field),
2754
+ field: Be(t.field),
2761
2755
  op: "IS_NAN"
2762
2756
  }
2763
2757
  };
2764
2758
  if (Ut(t.value)) return {
2765
2759
  unaryFilter: {
2766
- field: Ge(t.field),
2760
+ field: Be(t.field),
2767
2761
  op: "IS_NULL"
2768
2762
  }
2769
2763
  };
2770
2764
  } else if ("!=" /* NOT_EQUAL */ === t.op) {
2771
2765
  if (xt(t.value)) return {
2772
2766
  unaryFilter: {
2773
- field: Ge(t.field),
2767
+ field: Be(t.field),
2774
2768
  op: "IS_NOT_NAN"
2775
2769
  }
2776
2770
  };
2777
2771
  if (Ut(t.value)) return {
2778
2772
  unaryFilter: {
2779
- field: Ge(t.field),
2773
+ field: Be(t.field),
2780
2774
  op: "IS_NOT_NULL"
2781
2775
  }
2782
2776
  };
2783
2777
  }
2784
2778
  return {
2785
2779
  fieldFilter: {
2786
- field: Ge(t.field),
2787
- op: Be(t.op),
2780
+ field: Be(t.field),
2781
+ op: xe(t.op),
2788
2782
  value: t.value
2789
2783
  }
2790
2784
  };
@@ -2804,20 +2798,27 @@ function Xe(t, r) {
2804
2798
  // visible for testing
2805
2799
  return function(t) {
2806
2800
  return {
2807
- field: Ge(t.field),
2808
- direction: xe(t.dir)
2801
+ field: Be(t.field),
2802
+ direction: Ue(t.dir)
2809
2803
  };
2810
2804
  }(t);
2811
2805
  }));
2812
2806
  }(e.orderBy);
2813
2807
  o && (n.structuredQuery.orderBy = o);
2814
- var a = function(t, e) {
2808
+ var a, s = function(t, e) {
2815
2809
  return t.F || ct(e) ? e : {
2816
2810
  value: e
2817
2811
  };
2818
2812
  }(t, e.limit);
2819
- return null !== a && (n.structuredQuery.limit = a), e.startAt && (n.structuredQuery.startAt = Ue(e.startAt)),
2820
- e.endAt && (n.structuredQuery.endAt = Ue(e.endAt)), n;
2813
+ return null !== s && (n.structuredQuery.limit = s), e.startAt && (n.structuredQuery.startAt = {
2814
+ before: (a = e.startAt).inclusive,
2815
+ values: a.position
2816
+ }), e.endAt && (n.structuredQuery.endAt = function(t) {
2817
+ return {
2818
+ before: !t.inclusive,
2819
+ values: t.position
2820
+ };
2821
+ }(e.endAt)), n;
2821
2822
  }(e.q, pe(r)), [ 4 /*yield*/ , e.T("RunQuery", i.parent, {
2822
2823
  structuredQuery: i.structuredQuery
2823
2824
  }) ];
@@ -2855,7 +2856,7 @@ function Xe(t, r) {
2855
2856
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2856
2857
  * See the License for the specific language governing permissions and
2857
2858
  * limitations under the License.
2858
- */ var Je = new Map;
2859
+ */ var Xe = new Map;
2859
2860
 
2860
2861
  /**
2861
2862
  * An instance map that ensures only one Datastore exists per Firestore
@@ -2865,17 +2866,17 @@ function Xe(t, r) {
2865
2866
  * Returns an initialized and started Datastore for the given Firestore
2866
2867
  * instance. Callers must invoke removeComponents() when the Firestore
2867
2868
  * instance is terminated.
2868
- */ function Ze(t) {
2869
+ */ function Je(t) {
2869
2870
  if (t._terminated) throw new U(O, "The client has already been terminated.");
2870
- if (!Je.has(t)) {
2871
+ if (!Xe.has(t)) {
2871
2872
  w("ComponentProvider", "Initializing Datastore");
2872
2873
  var e = function(t) {
2873
2874
  return new mt(t, fetch.bind(null));
2874
2875
  }((i = t._databaseId, o = t.app.options.appId || "", a = t._persistenceKey, s = t._freezeSettings(),
2875
- new $(i, o, a, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams))), n = Ke(t._databaseId), r = function(t, e, n, r) {
2876
- return new We(t, e, n, r);
2876
+ new $(i, o, a, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams))), n = Qe(t._databaseId), r = function(t, e, n, r) {
2877
+ return new He(t, e, n, r);
2877
2878
  }(t._authCredentials, t._appCheckCredentials, e, n);
2878
- Je.set(t, r);
2879
+ Xe.set(t, r);
2879
2880
  }
2880
2881
  var i, o, a, s;
2881
2882
  /**
@@ -2893,7 +2894,7 @@ function Xe(t, r) {
2893
2894
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2894
2895
  * See the License for the specific language governing permissions and
2895
2896
  * limitations under the License.
2896
- */ return Je.get(t);
2897
+ */ return Xe.get(t);
2897
2898
  }
2898
2899
 
2899
2900
  /**
@@ -2904,7 +2905,7 @@ function Xe(t, r) {
2904
2905
  * A concrete type describing all the values that can be applied via a
2905
2906
  * user-supplied `FirestoreSettings` object. This is a separate type so that
2906
2907
  * defaults can be supplied and the value can be checked for equality.
2907
- */ var tn = /** @class */ function() {
2908
+ */ var Ze = /** @class */ function() {
2908
2909
  function t(t) {
2909
2910
  var e;
2910
2911
  if (void 0 === t.host) {
@@ -2924,14 +2925,14 @@ function Xe(t, r) {
2924
2925
  return t.prototype.isEqual = function(t) {
2925
2926
  return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;
2926
2927
  }, t;
2927
- }(), en = /** @class */ function() {
2928
+ }(), tn = /** @class */ function() {
2928
2929
  /** @hideconstructor */
2929
2930
  function t(t, e, n) {
2930
2931
  this._authCredentials = e, this._appCheckCredentials = n,
2931
2932
  /**
2932
2933
  * Whether it's a Firestore or Firestore Lite instance.
2933
2934
  */
2934
- this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new tn({}),
2935
+ this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Ze({}),
2935
2936
  this._settingsFrozen = !1, t instanceof X ? this._databaseId = t : (this._app = t,
2936
2937
  this._databaseId = function(t) {
2937
2938
  if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new U(V, '"projectId" not provided in firebase.initializeApp.');
@@ -2963,7 +2964,7 @@ function Xe(t, r) {
2963
2964
  configurable: !0
2964
2965
  }), t.prototype._setSettings = function(t) {
2965
2966
  if (this._settingsFrozen) throw new U(O, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
2966
- this._settings = new tn(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
2967
+ this._settings = new Ze(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
2967
2968
  if (!t) return new G;
2968
2969
  switch (t.type) {
2969
2970
  case "gapi":
@@ -3001,8 +3002,8 @@ function Xe(t, r) {
3001
3002
  * Only ever called once.
3002
3003
  */
3003
3004
  t.prototype._terminate = function() {
3004
- return t = this, (e = Je.get(t)) && (w("ComponentProvider", "Removing Datastore"),
3005
- Je.delete(t), e.terminate()), Promise.resolve();
3005
+ return t = this, (e = Xe.get(t)) && (w("ComponentProvider", "Removing Datastore"),
3006
+ Xe.delete(t), e.terminate()), Promise.resolve();
3006
3007
  var t, e;
3007
3008
  }, t;
3008
3009
  }();
@@ -3027,7 +3028,7 @@ function Xe(t, r) {
3027
3028
  * The Cloud Firestore service interface.
3028
3029
  *
3029
3030
  * Do not call this constructor directly. Instead, use {@link getFirestore}.
3030
- */ function nn(t, e) {
3031
+ */ function en(t, e) {
3031
3032
  var n = _getProvider(t, "firestore/lite");
3032
3033
  if (n.isInitialized()) throw new U(O, "Firestore can only be initialized once per app.");
3033
3034
  return n.initialize({
@@ -3043,7 +3044,7 @@ function Xe(t, r) {
3043
3044
  * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned `Firestore`
3044
3045
  * instance is associated with.
3045
3046
  * @returns The `Firestore` instance of the provided app.
3046
- */ function rn(t) {
3047
+ */ function nn(t) {
3047
3048
  return void 0 === t && (t = s()), _getProvider(t, "firestore/lite").getImmediate();
3048
3049
  }
3049
3050
 
@@ -3059,10 +3060,10 @@ function Xe(t, r) {
3059
3060
  * @param port - the emulator port (ex: 9000).
3060
3061
  * @param options.mockUserToken - the mock auth token to use for unit testing
3061
3062
  * Security Rules.
3062
- */ function on(t, e, n, r) {
3063
+ */ function rn(t, e, n, r) {
3063
3064
  var i;
3064
3065
  void 0 === r && (r = {});
3065
- var o = (t = st(t, en))._getSettings();
3066
+ var o = (t = st(t, tn))._getSettings();
3066
3067
  if ("firestore.googleapis.com" !== o.host && o.host !== e && _("Host has been set in both settings() and useEmulator(), emulator host will be used"),
3067
3068
  t._setSettings(Object.assign(Object.assign({}, o), {
3068
3069
  host: e + ":" + n,
@@ -3100,8 +3101,8 @@ function Xe(t, r) {
3100
3101
  * @param firestore - The `Firestore` instance to terminate.
3101
3102
  * @returns A `Promise` that is resolved when the instance has been successfully
3102
3103
  * terminated.
3103
- */ function an(t) {
3104
- return t = st(t, en), u(t.app, "firestore/lite"), t._delete()
3104
+ */ function on(t) {
3105
+ return t = st(t, tn), u(t.app, "firestore/lite"), t._delete()
3105
3106
  /**
3106
3107
  * @license
3107
3108
  * Copyright 2020 Google LLC
@@ -3141,7 +3142,7 @@ function Xe(t, r) {
3141
3142
  */;
3142
3143
  }
3143
3144
 
3144
- var sn = /** @class */ function() {
3145
+ var an = /** @class */ function() {
3145
3146
  /** @hideconstructor */
3146
3147
  function t(t,
3147
3148
  /**
@@ -3182,14 +3183,14 @@ var sn = /** @class */ function() {
3182
3183
  * The collection this `DocumentReference` belongs to.
3183
3184
  */
3184
3185
  get: function() {
3185
- return new cn(this.firestore, this.converter, this._key.path.popLast());
3186
+ return new un(this.firestore, this.converter, this._key.path.popLast());
3186
3187
  },
3187
3188
  enumerable: !1,
3188
3189
  configurable: !0
3189
3190
  }), t.prototype.withConverter = function(e) {
3190
3191
  return new t(this.firestore, e, this._key);
3191
3192
  }, t;
3192
- }(), un = /** @class */ function() {
3193
+ }(), sn = /** @class */ function() {
3193
3194
  // This is the lite version of the Query class in the main SDK.
3194
3195
  /** @hideconstructor protected */
3195
3196
  function t(t,
@@ -3204,7 +3205,7 @@ var sn = /** @class */ function() {
3204
3205
  return t.prototype.withConverter = function(e) {
3205
3206
  return new t(this.firestore, e, this._query);
3206
3207
  }, t;
3207
- }(), cn = /** @class */ function(e) {
3208
+ }(), un = /** @class */ function(e) {
3208
3209
  /** @hideconstructor */
3209
3210
  function n(t, n, r) {
3210
3211
  var i = this;
@@ -3235,7 +3236,7 @@ var sn = /** @class */ function() {
3235
3236
  */
3236
3237
  get: function() {
3237
3238
  var t = this._path.popLast();
3238
- return t.isEmpty() ? null : new sn(this.firestore,
3239
+ return t.isEmpty() ? null : new an(this.firestore,
3239
3240
  /* converter= */ null, new nt(t));
3240
3241
  },
3241
3242
  enumerable: !1,
@@ -3243,20 +3244,20 @@ var sn = /** @class */ function() {
3243
3244
  }), n.prototype.withConverter = function(t) {
3244
3245
  return new n(this.firestore, t, this._path);
3245
3246
  }, n;
3246
- }(un);
3247
+ }(sn);
3247
3248
 
3248
3249
  /**
3249
3250
  * A `Query` refers to a query which you can read or listen to. You can also
3250
3251
  * construct refined `Query` objects by adding filters and ordering.
3251
- */ function ln(t, e) {
3252
+ */ function cn(t, e) {
3252
3253
  for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
3253
- if (t = p(t), rt("collection", "path", e), t instanceof en) {
3254
+ if (t = p(t), rt("collection", "path", e), t instanceof tn) {
3254
3255
  var o = Z.fromString.apply(Z, r([ e ], n));
3255
- return ot(o), new cn(t, /* converter= */ null, o);
3256
+ return ot(o), new un(t, /* converter= */ null, o);
3256
3257
  }
3257
- if (!(t instanceof sn || t instanceof cn)) throw new U(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3258
+ if (!(t instanceof an || t instanceof un)) throw new U(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3258
3259
  var a = t._path.child(Z.fromString.apply(Z, r([ e ], n)));
3259
- return ot(a), new cn(t.firestore,
3260
+ return ot(a), new un(t.firestore,
3260
3261
  /* converter= */ null, a);
3261
3262
  }
3262
3263
 
@@ -3272,9 +3273,9 @@ var sn = /** @class */ function() {
3272
3273
  * collection or subcollection with this ID as the last segment of its path
3273
3274
  * will be included. Cannot contain a slash.
3274
3275
  * @returns The created `Query`.
3275
- */ function fn(t, e) {
3276
- if (t = st(t, en), rt("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new U(V, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
3277
- return new un(t,
3276
+ */ function ln(t, e) {
3277
+ if (t = st(t, tn), rt("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new U(V, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
3278
+ return new sn(t,
3278
3279
  /* converter= */ null,
3279
3280
  /**
3280
3281
  * Creates a new Query for a collection group query that matches all documents
@@ -3285,19 +3286,19 @@ var sn = /** @class */ function() {
3285
3286
  }(e));
3286
3287
  }
3287
3288
 
3288
- function hn(t, e) {
3289
+ function fn(t, e) {
3289
3290
  for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
3290
3291
  if (t = p(t),
3291
3292
  // We allow omission of 'pathString' but explicitly prohibit passing in both
3292
3293
  // 'undefined' and 'null'.
3293
- 1 === arguments.length && (e = vt.R()), rt("doc", "path", e), t instanceof en) {
3294
+ 1 === arguments.length && (e = vt.R()), rt("doc", "path", e), t instanceof tn) {
3294
3295
  var o = Z.fromString.apply(Z, r([ e ], n));
3295
- return it(o), new sn(t,
3296
+ return it(o), new an(t,
3296
3297
  /* converter= */ null, new nt(o));
3297
3298
  }
3298
- if (!(t instanceof sn || t instanceof cn)) throw new U(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3299
+ if (!(t instanceof an || t instanceof un)) throw new U(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
3299
3300
  var a = t._path.child(Z.fromString.apply(Z, r([ e ], n)));
3300
- return it(a), new sn(t.firestore, t instanceof cn ? t.converter : null, new nt(a));
3301
+ return it(a), new an(t.firestore, t instanceof un ? t.converter : null, new nt(a));
3301
3302
  }
3302
3303
 
3303
3304
  /**
@@ -3307,8 +3308,8 @@ function hn(t, e) {
3307
3308
  * @param right - A reference to compare.
3308
3309
  * @returns true if the references point to the same location in the same
3309
3310
  * Firestore database.
3310
- */ function pn(t, e) {
3311
- return t = p(t), e = p(e), (t instanceof sn || t instanceof cn) && (e instanceof sn || e instanceof cn) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
3311
+ */ function hn(t, e) {
3312
+ return t = p(t), e = p(e), (t instanceof an || t instanceof un) && (e instanceof an || e instanceof un) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
3312
3313
  /**
3313
3314
  * Returns true if the provided queries point to the same collection and apply
3314
3315
  * the same constraints.
@@ -3320,8 +3321,8 @@ function hn(t, e) {
3320
3321
  */;
3321
3322
  }
3322
3323
 
3323
- function dn(t, e) {
3324
- return t = p(t), e = p(e), t instanceof un && e instanceof un && t.firestore === e.firestore && function(t, e) {
3324
+ function pn(t, e) {
3325
+ return t = p(t), e = p(e), t instanceof sn && e instanceof sn && t.firestore === e.firestore && function(t, e) {
3325
3326
  return function(t, e) {
3326
3327
  if (t.limit !== e.limit) return !1;
3327
3328
  if (t.orderBy.length !== e.orderBy.length) return !1;
@@ -3359,7 +3360,7 @@ function dn(t, e) {
3359
3360
  */;
3360
3361
  }
3361
3362
 
3362
- var mn = /** @class */ function() {
3363
+ var dn = /** @class */ function() {
3363
3364
  /**
3364
3365
  * Creates a `FieldPath` from the provided field names. If more than one field
3365
3366
  * name is provided, the path will point to a nested field in a document.
@@ -3384,8 +3385,8 @@ var mn = /** @class */ function() {
3384
3385
  /**
3385
3386
  * Returns a special sentinel `FieldPath` to refer to the ID of a document.
3386
3387
  * It can be used in queries to sort or filter by the document ID.
3387
- */ function yn() {
3388
- return new mn("__name__");
3388
+ */ function mn() {
3389
+ return new dn("__name__");
3389
3390
  }
3390
3391
 
3391
3392
  /**
@@ -3406,7 +3407,7 @@ var mn = /** @class */ function() {
3406
3407
  */
3407
3408
  /**
3408
3409
  * An immutable object representing an array of bytes.
3409
- */ var vn = /** @class */ function() {
3410
+ */ var yn = /** @class */ function() {
3410
3411
  /** @hideconstructor */
3411
3412
  function t(t) {
3412
3413
  this._byteString = t;
@@ -3464,14 +3465,14 @@ var mn = /** @class */ function() {
3464
3465
  t.prototype.isEqual = function(t) {
3465
3466
  return this._byteString.isEqual(t._byteString);
3466
3467
  }, t;
3467
- }(), gn =
3468
+ }(), vn =
3468
3469
  /**
3469
3470
  * @param _methodName - The public API endpoint that returns this class.
3470
3471
  * @hideconstructor
3471
3472
  */
3472
3473
  function(t) {
3473
3474
  this._methodName = t;
3474
- }, wn = /** @class */ function() {
3475
+ }, gn = /** @class */ function() {
3475
3476
  /**
3476
3477
  * Creates a new immutable `GeoPoint` object with the provided latitude and
3477
3478
  * longitude values.
@@ -3524,14 +3525,14 @@ function(t) {
3524
3525
  t.prototype._compareTo = function(t) {
3525
3526
  return gt(this._lat, t._lat) || gt(this._long, t._long);
3526
3527
  }, t;
3527
- }(), bn = /^__.*__$/, _n = /** @class */ function() {
3528
+ }(), wn = /^__.*__$/, bn = /** @class */ function() {
3528
3529
  function t(t, e, n) {
3529
3530
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
3530
3531
  }
3531
3532
  return t.prototype.toMutation = function(t, e) {
3532
3533
  return null !== this.fieldMask ? new Ee(t, this.data, this.fieldMask, e, this.fieldTransforms) : new Se(t, this.data, e, this.fieldTransforms);
3533
3534
  }, t;
3534
- }(), Tn = /** @class */ function() {
3535
+ }(), _n = /** @class */ function() {
3535
3536
  function t(t,
3536
3537
  // The fieldMask does not include document transforms.
3537
3538
  e, n) {
@@ -3561,7 +3562,7 @@ function(t) {
3561
3562
  /**
3562
3563
  * Sentinel values that can be used when writing document fields with `set()`
3563
3564
  * or `update()`.
3564
- */ function Sn(t) {
3565
+ */ function Tn(t) {
3565
3566
  switch (t) {
3566
3567
  case 0 /* Set */ :
3567
3568
  // fall through
@@ -3579,7 +3580,7 @@ function(t) {
3579
3580
  }
3580
3581
  }
3581
3582
 
3582
- /** A "context" object passed around while parsing user data. */ var En = /** @class */ function() {
3583
+ /** A "context" object passed around while parsing user data. */ var Sn = /** @class */ function() {
3583
3584
  /**
3584
3585
  * Initializes a ParseContext with the given source and path.
3585
3586
  *
@@ -3617,16 +3618,16 @@ function(t) {
3617
3618
  enumerable: !1,
3618
3619
  configurable: !0
3619
3620
  }),
3620
- /** Returns a new context with the specified settings overwritten. */ t.prototype.nt = function(e) {
3621
+ /** Returns a new context with the specified settings overwritten. */ t.prototype.et = function(e) {
3621
3622
  return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.q, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
3622
- }, t.prototype.et = function(t) {
3623
- var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.nt({
3623
+ }, t.prototype.nt = function(t) {
3624
+ var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.et({
3624
3625
  path: n,
3625
3626
  rt: !1
3626
3627
  });
3627
3628
  return r.st(t), r;
3628
3629
  }, t.prototype.it = function(t) {
3629
- var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.nt({
3630
+ var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.et({
3630
3631
  path: n,
3631
3632
  rt: !1
3632
3633
  });
@@ -3634,12 +3635,12 @@ function(t) {
3634
3635
  }, t.prototype.ot = function(t) {
3635
3636
  // TODO(b/34871131): We don't support array paths right now; so make path
3636
3637
  // undefined.
3637
- return this.nt({
3638
+ return this.et({
3638
3639
  path: void 0,
3639
3640
  rt: !0
3640
3641
  });
3641
3642
  }, t.prototype.ut = function(t) {
3642
- return zn(t, this.settings.methodName, this.settings.ct || !1, this.path, this.settings.at);
3643
+ return Gn(t, this.settings.methodName, this.settings.ct || !1, this.path, this.settings.at);
3643
3644
  },
3644
3645
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ t.prototype.contains = function(t) {
3645
3646
  return void 0 !== this.fieldMask.find((function(e) {
@@ -3653,15 +3654,15 @@ function(t) {
3653
3654
  if (this.path) for (var t = 0; t < this.path.length; t++) this.st(this.path.get(t));
3654
3655
  }, t.prototype.st = function(t) {
3655
3656
  if (0 === t.length) throw this.ut("Document fields must not be empty");
3656
- if (Sn(this.tt) && bn.test(t)) throw this.ut('Document fields cannot begin and end with "__"');
3657
+ if (Tn(this.tt) && wn.test(t)) throw this.ut('Document fields cannot begin and end with "__"');
3657
3658
  }, t;
3658
- }(), In = /** @class */ function() {
3659
+ }(), En = /** @class */ function() {
3659
3660
  function t(t, e, n) {
3660
- this.databaseId = t, this.ignoreUndefinedProperties = e, this.q = n || Ke(t)
3661
+ this.databaseId = t, this.ignoreUndefinedProperties = e, this.q = n || Qe(t)
3661
3662
  /** Creates a new top-level parse context. */;
3662
3663
  }
3663
3664
  return t.prototype.ht = function(t, e, n, r) {
3664
- return void 0 === r && (r = !1), new En({
3665
+ return void 0 === r && (r = !1), new Sn({
3665
3666
  tt: t,
3666
3667
  methodName: e,
3667
3668
  at: n,
@@ -3675,30 +3676,30 @@ function(t) {
3675
3676
  /**
3676
3677
  * Helper for parsing raw user input (provided via the API) into internal model
3677
3678
  * classes.
3678
- */ function An(t) {
3679
- var e = t._freezeSettings(), n = Ke(t._databaseId);
3680
- return new In(t._databaseId, !!e.ignoreUndefinedProperties, n);
3679
+ */ function In(t) {
3680
+ var e = t._freezeSettings(), n = Qe(t._databaseId);
3681
+ return new En(t._databaseId, !!e.ignoreUndefinedProperties, n);
3681
3682
  }
3682
3683
 
3683
- /** Parse document data from a set() call. */ function kn(t, e, n, r, i, o) {
3684
+ /** Parse document data from a set() call. */ function An(t, e, n, r, i, o) {
3684
3685
  void 0 === o && (o = {});
3685
3686
  var a = t.ht(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
3686
- Un("Data must be an object, but it was:", a, r);
3687
- var s, u, c = Rn(r, a);
3687
+ Mn("Data must be an object, but it was:", a, r);
3688
+ var s, u, c = Ln(r, a);
3688
3689
  if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
3689
3690
  for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
3690
- var p = xn(e, h[f], n);
3691
+ var p = Un(e, h[f], n);
3691
3692
  if (!a.contains(p)) throw new U(V, "Field '" + p + "' is specified in your field mask but missing from your input data.");
3692
- Qn(l, p) || l.push(p);
3693
+ zn(l, p) || l.push(p);
3693
3694
  }
3694
3695
  s = new Et(l), u = a.fieldTransforms.filter((function(t) {
3695
3696
  return s.covers(t.field);
3696
3697
  }));
3697
3698
  } else s = null, u = a.fieldTransforms;
3698
- return new _n(new zt(c), s, u);
3699
+ return new bn(new zt(c), s, u);
3699
3700
  }
3700
3701
 
3701
- var Vn = /** @class */ function(e) {
3702
+ var kn = /** @class */ function(e) {
3702
3703
  function n() {
3703
3704
  return null !== e && e.apply(this, arguments) || this;
3704
3705
  }
@@ -3710,7 +3711,7 @@ var Vn = /** @class */ function(e) {
3710
3711
  }, n.prototype.isEqual = function(t) {
3711
3712
  return t instanceof n;
3712
3713
  }, n;
3713
- }(gn);
3714
+ }(vn);
3714
3715
 
3715
3716
  /**
3716
3717
  * Creates a child context for parsing SerializableFieldValues.
@@ -3727,8 +3728,8 @@ var Vn = /** @class */ function(e) {
3727
3728
  * context.
3728
3729
  * @param context - The parent context.
3729
3730
  * @param arrayElement - Whether or not the FieldValue has an array.
3730
- */ function Dn(t, e, n) {
3731
- return new En({
3731
+ */ function Vn(t, e, n) {
3732
+ return new Sn({
3732
3733
  tt: 3 /* Argument */ ,
3733
3734
  at: e.settings.at,
3734
3735
  methodName: t._methodName,
@@ -3736,7 +3737,7 @@ var Vn = /** @class */ function(e) {
3736
3737
  }, e.databaseId, e.q, e.ignoreUndefinedProperties);
3737
3738
  }
3738
3739
 
3739
- var Pn = /** @class */ function(e) {
3740
+ var Dn = /** @class */ function(e) {
3740
3741
  function n() {
3741
3742
  return null !== e && e.apply(this, arguments) || this;
3742
3743
  }
@@ -3745,37 +3746,37 @@ var Pn = /** @class */ function(e) {
3745
3746
  }, n.prototype.isEqual = function(t) {
3746
3747
  return t instanceof n;
3747
3748
  }, n;
3748
- }(gn), Nn = /** @class */ function(e) {
3749
+ }(vn), Pn = /** @class */ function(e) {
3749
3750
  function n(t, n) {
3750
3751
  var r = this;
3751
3752
  return (r = e.call(this, t) || this).lt = n, r;
3752
3753
  }
3753
3754
  return t(n, e), n.prototype._toFieldTransform = function(t) {
3754
- var e = Dn(this, t,
3755
+ var e = Vn(this, t,
3755
3756
  /*array=*/ !0), n = this.lt.map((function(t) {
3756
- return Ln(t, e);
3757
+ return jn(t, e);
3757
3758
  })), r = new ve(n);
3758
3759
  return new be(t.path, r);
3759
3760
  }, n.prototype.isEqual = function(t) {
3760
3761
  // TODO(mrschmidt): Implement isEquals
3761
3762
  return this === t;
3762
3763
  }, n;
3763
- }(gn), qn = /** @class */ function(e) {
3764
+ }(vn), Nn = /** @class */ function(e) {
3764
3765
  function n(t, n) {
3765
3766
  var r = this;
3766
3767
  return (r = e.call(this, t) || this).lt = n, r;
3767
3768
  }
3768
3769
  return t(n, e), n.prototype._toFieldTransform = function(t) {
3769
- var e = Dn(this, t,
3770
+ var e = Vn(this, t,
3770
3771
  /*array=*/ !0), n = this.lt.map((function(t) {
3771
- return Ln(t, e);
3772
+ return jn(t, e);
3772
3773
  })), r = new ge(n);
3773
3774
  return new be(t.path, r);
3774
3775
  }, n.prototype.isEqual = function(t) {
3775
3776
  // TODO(mrschmidt): Implement isEquals
3776
3777
  return this === t;
3777
3778
  }, n;
3778
- }(gn), Fn = /** @class */ function(e) {
3779
+ }(vn), qn = /** @class */ function(e) {
3779
3780
  function n(t, n) {
3780
3781
  var r = this;
3781
3782
  return (r = e.call(this, t) || this).ft = n, r;
@@ -3787,50 +3788,50 @@ var Pn = /** @class */ function(e) {
3787
3788
  // TODO(mrschmidt): Implement isEquals
3788
3789
  return this === t;
3789
3790
  }, n;
3790
- }(gn);
3791
+ }(vn);
3791
3792
 
3792
- /** Parse update data from an update() call. */ function On(t, e, n, r) {
3793
+ /** Parse update data from an update() call. */ function Fn(t, e, n, r) {
3793
3794
  var i = t.ht(1 /* Update */ , e, n);
3794
- Un("Data must be an object, but it was:", i, r);
3795
+ Mn("Data must be an object, but it was:", i, r);
3795
3796
  var o = [], a = zt.empty();
3796
3797
  St(r, (function(t, r) {
3797
- var s = Gn(e, t, n);
3798
+ var s = Bn(e, t, n);
3798
3799
  // For Compat types, we have to "extract" the underlying types before
3799
3800
  // performing validation.
3800
3801
  r = p(r);
3801
3802
  var u = i.it(s);
3802
- if (r instanceof Vn)
3803
+ if (r instanceof kn)
3803
3804
  // Add it to the field mask, but don't add anything to updateData.
3804
3805
  o.push(s); else {
3805
- var c = Ln(r, u);
3806
+ var c = jn(r, u);
3806
3807
  null != c && (o.push(s), a.set(s, c));
3807
3808
  }
3808
3809
  }));
3809
3810
  var s = new Et(o);
3810
- return new Tn(a, s, i.fieldTransforms);
3811
+ return new _n(a, s, i.fieldTransforms);
3811
3812
  }
3812
3813
 
3813
- /** Parse update data from a list of field/value arguments. */ function Cn(t, e, n, r, i, o) {
3814
- var a = t.ht(1 /* Update */ , e, n), s = [ xn(e, r, n) ], u = [ i ];
3814
+ /** Parse update data from a list of field/value arguments. */ function On(t, e, n, r, i, o) {
3815
+ var a = t.ht(1 /* Update */ , e, n), s = [ Un(e, r, n) ], u = [ i ];
3815
3816
  if (o.length % 2 != 0) throw new U(V, "Function " + e + "() needs to be called with an even number of arguments that alternate between field names and values.");
3816
- for (var c = 0; c < o.length; c += 2) s.push(xn(e, o[c])), u.push(o[c + 1]);
3817
+ for (var c = 0; c < o.length; c += 2) s.push(Un(e, o[c])), u.push(o[c + 1]);
3817
3818
  // We iterate in reverse order to pick the last value for a field if the
3818
3819
  // user specified the field multiple times.
3819
- for (var l = [], f = zt.empty(), h = s.length - 1; h >= 0; --h) if (!Qn(l, s[h])) {
3820
+ for (var l = [], f = zt.empty(), h = s.length - 1; h >= 0; --h) if (!zn(l, s[h])) {
3820
3821
  var d = s[h], m = u[h];
3821
3822
  // For Compat types, we have to "extract" the underlying types before
3822
3823
  // performing validation.
3823
3824
  m = p(m);
3824
3825
  var y = a.it(d);
3825
- if (m instanceof Vn)
3826
+ if (m instanceof kn)
3826
3827
  // Add it to the field mask, but don't add anything to updateData.
3827
3828
  l.push(d); else {
3828
- var v = Ln(m, y);
3829
+ var v = jn(m, y);
3829
3830
  null != v && (l.push(d), f.set(d, v));
3830
3831
  }
3831
3832
  }
3832
3833
  var g = new Et(l);
3833
- return new Tn(f, g, a.fieldTransforms);
3834
+ return new _n(f, g, a.fieldTransforms);
3834
3835
  }
3835
3836
 
3836
3837
  /**
@@ -3839,8 +3840,8 @@ var Pn = /** @class */ function(e) {
3839
3840
  *
3840
3841
  * @param allowArrays - Whether the query value is an array that may directly
3841
3842
  * contain additional arrays (e.g. the operand of an `in` query).
3842
- */ function jn(t, e, n, r) {
3843
- return void 0 === r && (r = !1), Ln(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
3843
+ */ function Cn(t, e, n, r) {
3844
+ return void 0 === r && (r = !1), jn(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
3844
3845
  }
3845
3846
 
3846
3847
  /**
@@ -3851,12 +3852,12 @@ var Pn = /** @class */ function(e) {
3851
3852
  * the source of the data being parsed, etc.
3852
3853
  * @returns The parsed value, or null if the value was a FieldValue sentinel
3853
3854
  * that should not be included in the resulting parsed data.
3854
- */ function Ln(t, e) {
3855
- if (Mn(
3855
+ */ function jn(t, e) {
3856
+ if (Rn(
3856
3857
  // Unwrap the API type from the Compat SDK. This will return the API type
3857
3858
  // from firestore-exp.
3858
- t = p(t))) return Un("Unsupported field value:", e, t), Rn(t, e);
3859
- if (t instanceof gn)
3859
+ t = p(t))) return Mn("Unsupported field value:", e, t), Ln(t, e);
3860
+ if (t instanceof vn)
3860
3861
  // FieldValues usually parse into transforms (except deleteField())
3861
3862
  // in which case we do not want to include this field in our parsed data
3862
3863
  // (as doing so will overwrite the field directly prior to the transform
@@ -3868,7 +3869,7 @@ var Pn = /** @class */ function(e) {
3868
3869
  */
3869
3870
  return function(t, e) {
3870
3871
  // Sentinels are only supported with writes, and not within arrays.
3871
- if (!Sn(e.tt)) throw e.ut(t._methodName + "() can only be used with update() and set()");
3872
+ if (!Tn(e.tt)) throw e.ut(t._methodName + "() can only be used with update() and set()");
3872
3873
  if (!e.path) throw e.ut(t._methodName + "() is not currently supported inside arrays");
3873
3874
  var n = t._toFieldTransform(e);
3874
3875
  n && e.fieldTransforms.push(n);
@@ -3891,7 +3892,7 @@ var Pn = /** @class */ function(e) {
3891
3892
  if (e.settings.rt && 4 /* ArrayArgument */ !== e.tt) throw e.ut("Nested arrays are not supported");
3892
3893
  return function(t, e) {
3893
3894
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
3894
- var a = Ln(o[i], e.ot(r));
3895
+ var a = jn(o[i], e.ot(r));
3895
3896
  null == a && (
3896
3897
  // Just include nulls in the array for fields being replaced with a
3897
3898
  // sentinel.
@@ -3932,16 +3933,16 @@ var Pn = /** @class */ function(e) {
3932
3933
  timestampValue: Pe(e.q, r)
3933
3934
  };
3934
3935
  }
3935
- if (t instanceof wn) return {
3936
+ if (t instanceof gn) return {
3936
3937
  geoPointValue: {
3937
3938
  latitude: t.latitude,
3938
3939
  longitude: t.longitude
3939
3940
  }
3940
3941
  };
3941
- if (t instanceof vn) return {
3942
+ if (t instanceof yn) return {
3942
3943
  bytesValue: Ne(e.q, t._byteString)
3943
3944
  };
3944
- if (t instanceof sn) {
3945
+ if (t instanceof an) {
3945
3946
  var i = e.databaseId, o = t.firestore._databaseId;
3946
3947
  if (!o.isEqual(i)) throw e.ut("Document reference is for database " + o.projectId + "/" + o.database + " but should be for database " + i.projectId + "/" + i.database);
3947
3948
  return {
@@ -3952,7 +3953,7 @@ var Pn = /** @class */ function(e) {
3952
3953
  }(t, e);
3953
3954
  }
3954
3955
 
3955
- function Rn(t, e) {
3956
+ function Ln(t, e) {
3956
3957
  var n = {};
3957
3958
  return function(t) {
3958
3959
  for (var e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
@@ -3961,7 +3962,7 @@ function Rn(t, e) {
3961
3962
  // If we encounter an empty object, we explicitly add it to the update
3962
3963
  // mask to ensure that the server creates a map entry.
3963
3964
  e.path && e.path.length > 0 && e.fieldMask.push(e.path) : St(t, (function(t, r) {
3964
- var i = Ln(r, e.et(t));
3965
+ var i = jn(r, e.nt(t));
3965
3966
  null != i && (n[t] = i);
3966
3967
  })), {
3967
3968
  mapValue: {
@@ -3970,12 +3971,12 @@ function Rn(t, e) {
3970
3971
  };
3971
3972
  }
3972
3973
 
3973
- function Mn(t) {
3974
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof bt || t instanceof wn || t instanceof vn || t instanceof sn || t instanceof gn);
3974
+ function Rn(t) {
3975
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof bt || t instanceof gn || t instanceof yn || t instanceof an || t instanceof vn);
3975
3976
  }
3976
3977
 
3977
- function Un(t, e, n) {
3978
- if (!Mn(n) || !function(t) {
3978
+ function Mn(t, e, n) {
3979
+ if (!Rn(n) || !function(t) {
3979
3980
  return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
3980
3981
  }(n)) {
3981
3982
  var r = at(n);
@@ -3985,20 +3986,20 @@ function Un(t, e, n) {
3985
3986
 
3986
3987
  /**
3987
3988
  * Helper that calls fromDotSeparatedString() but wraps any error thrown.
3988
- */ function xn(t, e, n) {
3989
+ */ function Un(t, e, n) {
3989
3990
  if (
3990
3991
  // If required, replace the FieldPath Compat class with with the firestore-exp
3991
3992
  // FieldPath.
3992
- (e = p(e)) instanceof mn) return e._internalPath;
3993
- if ("string" == typeof e) return Gn(t, e);
3994
- throw zn("Field path arguments must be of type string or ", t,
3993
+ (e = p(e)) instanceof dn) return e._internalPath;
3994
+ if ("string" == typeof e) return Bn(t, e);
3995
+ throw Gn("Field path arguments must be of type string or ", t,
3995
3996
  /* hasConverter= */ !1,
3996
3997
  /* path= */ void 0, n);
3997
3998
  }
3998
3999
 
3999
4000
  /**
4000
4001
  * Matches any characters in a field path string that are reserved.
4001
- */ var Bn = new RegExp("[~\\*/\\[\\]]");
4002
+ */ var xn = new RegExp("[~\\*/\\[\\]]");
4002
4003
 
4003
4004
  /**
4004
4005
  * Wraps fromDotSeparatedString with an error message about the method that
@@ -4008,20 +4009,20 @@ function Un(t, e, n) {
4008
4009
  * split on dots.
4009
4010
  * @param targetDoc - The document against which the field path will be
4010
4011
  * evaluated.
4011
- */ function Gn(t, e, n) {
4012
- if (e.search(Bn) >= 0) throw zn("Invalid field path (" + e + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
4012
+ */ function Bn(t, e, n) {
4013
+ if (e.search(xn) >= 0) throw Gn("Invalid field path (" + e + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
4013
4014
  /* hasConverter= */ !1,
4014
4015
  /* path= */ void 0, n);
4015
4016
  try {
4016
- return (new (mn.bind.apply(mn, r([ void 0 ], e.split(".")))))._internalPath;
4017
+ return (new (dn.bind.apply(dn, r([ void 0 ], e.split(".")))))._internalPath;
4017
4018
  } catch (r) {
4018
- throw zn("Invalid field path (" + e + "). Paths must not be empty, begin with '.', end with '.', or contain '..'", t,
4019
+ throw Gn("Invalid field path (" + e + "). Paths must not be empty, begin with '.', end with '.', or contain '..'", t,
4019
4020
  /* hasConverter= */ !1,
4020
4021
  /* path= */ void 0, n);
4021
4022
  }
4022
4023
  }
4023
4024
 
4024
- function zn(t, e, n, r, i) {
4025
+ function Gn(t, e, n, r, i) {
4025
4026
  var o = r && !r.isEmpty(), a = void 0 !== i, s = "Function " + e + "() called with invalid data";
4026
4027
  n && (s += " (via `toFirestore()`)");
4027
4028
  var u = "";
@@ -4030,7 +4031,7 @@ function zn(t, e, n, r, i) {
4030
4031
  /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */;
4031
4032
  }
4032
4033
 
4033
- function Qn(t, e) {
4034
+ function zn(t, e) {
4034
4035
  return t.some((function(t) {
4035
4036
  return t.isEqual(e);
4036
4037
  }));
@@ -4060,7 +4061,7 @@ function Qn(t, e) {
4060
4061
  * For a `DocumentSnapshot` that points to a non-existing document, any data
4061
4062
  * access will return 'undefined'. You can use the `exists()` method to
4062
4063
  * explicitly verify a document's existence.
4063
- */ var Kn = /** @class */ function() {
4064
+ */ var Qn = /** @class */ function() {
4064
4065
  // Note: This class is stripped down version of the DocumentSnapshot in
4065
4066
  // the legacy SDK. The changes are:
4066
4067
  // - No support for SnapshotMetadata.
@@ -4081,7 +4082,7 @@ function Qn(t, e) {
4081
4082
  * The `DocumentReference` for the document included in the `DocumentSnapshot`.
4082
4083
  */
4083
4084
  get: function() {
4084
- return new sn(this._firestore, this._converter, this._key);
4085
+ return new an(this._firestore, this._converter, this._key);
4085
4086
  },
4086
4087
  enumerable: !1,
4087
4088
  configurable: !0
@@ -4106,7 +4107,7 @@ function Qn(t, e) {
4106
4107
  if (this._converter) {
4107
4108
  // We only want to use the converter and create a new DocumentSnapshot
4108
4109
  // if a converter has been provided.
4109
- var t = new Hn(this._firestore, this._userDataWriter, this._key, this._document,
4110
+ var t = new Kn(this._firestore, this._userDataWriter, this._key, this._document,
4110
4111
  /* converter= */ null);
4111
4112
  return this._converter.fromFirestore(t);
4112
4113
  }
@@ -4126,11 +4127,11 @@ function Qn(t, e) {
4126
4127
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4127
4128
  t.prototype.get = function(t) {
4128
4129
  if (this._document) {
4129
- var e = this._document.data.field($n("DocumentSnapshot.get", t));
4130
+ var e = this._document.data.field(Yn("DocumentSnapshot.get", t));
4130
4131
  if (null !== e) return this._userDataWriter.convertValue(e);
4131
4132
  }
4132
4133
  }, t;
4133
- }(), Hn = /** @class */ function(e) {
4134
+ }(), Kn = /** @class */ function(e) {
4134
4135
  function n() {
4135
4136
  return null !== e && e.apply(this, arguments) || this;
4136
4137
  }
@@ -4142,7 +4143,7 @@ function Qn(t, e) {
4142
4143
  */ return t(n, e), n.prototype.data = function() {
4143
4144
  return e.prototype.data.call(this);
4144
4145
  }, n;
4145
- }(Kn), Wn = /** @class */ function() {
4146
+ }(Qn), Hn = /** @class */ function() {
4146
4147
  /** @hideconstructor */
4147
4148
  function t(t, e) {
4148
4149
  this._docs = e, this.query = t;
@@ -4196,15 +4197,15 @@ function Qn(t, e) {
4196
4197
  * @param right - A snapshot to compare.
4197
4198
  * @returns true if the snapshots are equal.
4198
4199
  */
4199
- function Yn(t, e) {
4200
- return t = p(t), e = p(e), t instanceof Kn && e instanceof Kn ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Wn && e instanceof Wn && dn(t.query, e.query) && wt(t.docs, e.docs, Yn)
4200
+ function Wn(t, e) {
4201
+ return t = p(t), e = p(e), t instanceof Qn && e instanceof Qn ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Hn && e instanceof Hn && pn(t.query, e.query) && wt(t.docs, e.docs, Wn)
4201
4202
  /**
4202
4203
  * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.
4203
4204
  */;
4204
4205
  }
4205
4206
 
4206
- function $n(t, e) {
4207
- return "string" == typeof e ? Gn(t, e) : e instanceof mn ? e._internalPath : e._delegate._internalPath;
4207
+ function Yn(t, e) {
4208
+ return "string" == typeof e ? Bn(t, e) : e instanceof dn ? e._internalPath : e._delegate._internalPath;
4208
4209
  }
4209
4210
 
4210
4211
  /**
@@ -4230,7 +4231,7 @@ function $n(t, e) {
4230
4231
  * endBefore:1}, {@link (endAt:1)}, {@link limit} or {@link limitToLast} and
4231
4232
  * can then be passed to {@link query} to create a new query instance that
4232
4233
  * also contains this `QueryConstraint`.
4233
- */ var Xn = function() {};
4234
+ */ var $n = function() {};
4234
4235
 
4235
4236
  /**
4236
4237
  * Creates a new immutable instance of {@link Query} that is extended to also include
@@ -4240,7 +4241,7 @@ function $n(t, e) {
4240
4241
  * @param queryConstraints - The list of {@link QueryConstraint}s to apply.
4241
4242
  * @throws if any of the provided query constraints cannot be combined with the
4242
4243
  * existing or new constraints.
4243
- */ function Jn(t) {
4244
+ */ function Xn(t) {
4244
4245
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
4245
4246
  for (var r = 0, i = e; r < i.length; r++) {
4246
4247
  var o = i[r];
@@ -4249,31 +4250,31 @@ function $n(t, e) {
4249
4250
  return t;
4250
4251
  }
4251
4252
 
4252
- var Zn = /** @class */ function(e) {
4253
+ var Jn = /** @class */ function(e) {
4253
4254
  function n(t, n, r) {
4254
4255
  var i = this;
4255
4256
  return (i = e.call(this) || this).dt = t, i.wt = n, i.yt = r, i.type = "where",
4256
4257
  i;
4257
4258
  }
4258
4259
  return t(n, e), n.prototype._apply = function(t) {
4259
- var e = An(t.firestore), n = function(t, e, n, r, i, o, a) {
4260
+ var e = In(t.firestore), n = function(t, e, n, r, i, o, a) {
4260
4261
  var s;
4261
4262
  if (i.isKeyField()) {
4262
4263
  if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new U(V, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
4263
4264
  if ("in" /* IN */ === o || "not-in" /* NOT_IN */ === o) {
4264
- dr(a, o);
4265
+ pr(a, o);
4265
4266
  for (var u = [], c = 0, l = a; c < l.length; c++) {
4266
4267
  var f = l[c];
4267
- u.push(pr(r, t, f));
4268
+ u.push(hr(r, t, f));
4268
4269
  }
4269
4270
  s = {
4270
4271
  arrayValue: {
4271
4272
  values: u
4272
4273
  }
4273
4274
  };
4274
- } else s = pr(r, t, a);
4275
- } else "in" /* IN */ !== o && "not-in" /* NOT_IN */ !== o && "array-contains-any" /* ARRAY_CONTAINS_ANY */ !== o || dr(a, o),
4276
- s = jn(n, "where", a,
4275
+ } else s = hr(r, t, a);
4276
+ } else "in" /* IN */ !== o && "not-in" /* NOT_IN */ !== o && "array-contains-any" /* ARRAY_CONTAINS_ANY */ !== o || pr(a, o),
4277
+ s = Cn(n, "where", a,
4277
4278
  /* allowArrays= */ "in" /* IN */ === o || "not-in" /* NOT_IN */ === o);
4278
4279
  var h = Wt.create(i, o, s);
4279
4280
  return function(t, e) {
@@ -4281,7 +4282,7 @@ var Zn = /** @class */ function(e) {
4281
4282
  var n = le(t);
4282
4283
  if (null !== n && !n.isEqual(e.field)) throw new U(V, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
4283
4284
  var r = ce(t);
4284
- null !== r && mr(t, e.field, r);
4285
+ null !== r && dr(t, e.field, r);
4285
4286
  }
4286
4287
  var i = function(t, e) {
4287
4288
  for (var n = 0, r = t.filters; n < r.length; n++) {
@@ -4328,12 +4329,12 @@ var Zn = /** @class */ function(e) {
4328
4329
  throw i === e.op ? new U(V, "Invalid query. You cannot use more than one '" + e.op.toString() + "' filter.") : new U(V, "Invalid query. You cannot use '" + e.op.toString() + "' filters with '" + i.toString() + "' filters.");
4329
4330
  }(t, h), h;
4330
4331
  }(t._query, 0, e, t.firestore._databaseId, this.dt, this.wt, this.yt);
4331
- return new un(t.firestore, t.converter, function(t, e) {
4332
+ return new sn(t.firestore, t.converter, function(t, e) {
4332
4333
  var n = t.filters.concat([ e ]);
4333
4334
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
4334
4335
  }(t._query, n));
4335
4336
  }, n;
4336
- }(Xn);
4337
+ }($n);
4337
4338
 
4338
4339
  /**
4339
4340
  * Creates a {@link QueryConstraint} that enforces that documents must contain the
@@ -4345,12 +4346,12 @@ var Zn = /** @class */ function(e) {
4345
4346
  * "&lt;=", "!=").
4346
4347
  * @param value - The value for comparison
4347
4348
  * @returns The created {@link Query}.
4348
- */ function tr(t, e, n) {
4349
- var r = e, i = $n("where", t);
4350
- return new Zn(i, r, n);
4349
+ */ function Zn(t, e, n) {
4350
+ var r = e, i = Yn("where", t);
4351
+ return new Jn(i, r, n);
4351
4352
  }
4352
4353
 
4353
- var er = /** @class */ function(e) {
4354
+ var tr = /** @class */ function(e) {
4354
4355
  function n(t, n) {
4355
4356
  var r = this;
4356
4357
  return (r = e.call(this) || this).dt = t, r._t = n, r.type = "orderBy", r;
@@ -4364,17 +4365,17 @@ var er = /** @class */ function(e) {
4364
4365
  if (null === ce(t)) {
4365
4366
  // This is the first order by. It must match any inequality.
4366
4367
  var n = le(t);
4367
- null !== n && mr(t, n, e.field);
4368
+ null !== n && dr(t, n, e.field);
4368
4369
  }
4369
4370
  }(t, r), r;
4370
4371
  }(t._query, this.dt, this._t);
4371
- return new un(t.firestore, t.converter, function(t, e) {
4372
+ return new sn(t.firestore, t.converter, function(t, e) {
4372
4373
  // TODO(dimond): validate that orderBy does not list the same key twice.
4373
4374
  var n = t.explicitOrderBy.concat([ e ]);
4374
4375
  return new se(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
4375
4376
  }(t._query, e));
4376
4377
  }, n;
4377
- }(Xn);
4378
+ }($n);
4378
4379
 
4379
4380
  /**
4380
4381
  * Creates a {@link QueryConstraint} that sorts the query result by the
@@ -4384,31 +4385,31 @@ var er = /** @class */ function(e) {
4384
4385
  * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If
4385
4386
  * not specified, order will be ascending.
4386
4387
  * @returns The created {@link Query}.
4387
- */ function nr(t, e) {
4388
+ */ function er(t, e) {
4388
4389
  void 0 === e && (e = "asc");
4389
- var n = e, r = $n("orderBy", t);
4390
- return new er(r, n);
4390
+ var n = e, r = Yn("orderBy", t);
4391
+ return new tr(r, n);
4391
4392
  }
4392
4393
 
4393
- var rr = /** @class */ function(e) {
4394
+ var nr = /** @class */ function(e) {
4394
4395
  function n(t, n, r) {
4395
4396
  var i = this;
4396
- return (i = e.call(this) || this).type = t, i.gt = n, i.bt = r, i;
4397
+ return (i = e.call(this) || this).type = t, i.gt = n, i.vt = r, i;
4397
4398
  }
4398
4399
  return t(n, e), n.prototype._apply = function(t) {
4399
- return new un(t.firestore, t.converter, function(t, e, n) {
4400
+ return new sn(t.firestore, t.converter, function(t, e, n) {
4400
4401
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
4401
- }(t._query, this.gt, this.bt));
4402
+ }(t._query, this.gt, this.vt));
4402
4403
  }, n;
4403
- }(Xn);
4404
+ }($n);
4404
4405
 
4405
4406
  /**
4406
4407
  * Creates a {@link QueryConstraint} that only returns the first matching documents.
4407
4408
  *
4408
4409
  * @param limit - The maximum number of items to return.
4409
4410
  * @returns The created {@link Query}.
4410
- */ function ir(t) {
4411
- return ut("limit", t), new rr("limit", t, "F" /* First */)
4411
+ */ function rr(t) {
4412
+ return ut("limit", t), new nr("limit", t, "F" /* First */)
4412
4413
  /**
4413
4414
  * Creates a {@link QueryConstraint} that only returns the last matching documents.
4414
4415
  *
@@ -4420,59 +4421,61 @@ var rr = /** @class */ function(e) {
4420
4421
  */;
4421
4422
  }
4422
4423
 
4423
- function or(t) {
4424
- return ut("limitToLast", t), new rr("limitToLast", t, "L" /* Last */);
4424
+ function ir(t) {
4425
+ return ut("limitToLast", t), new nr("limitToLast", t, "L" /* Last */);
4425
4426
  }
4426
4427
 
4427
- var ar = /** @class */ function(e) {
4428
+ var or = /** @class */ function(e) {
4428
4429
  function n(t, n, r) {
4429
4430
  var i = this;
4430
- return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
4431
+ return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
4431
4432
  }
4432
4433
  return t(n, e), n.prototype._apply = function(t) {
4433
- var e = hr(t, this.type, this.vt, this.Et);
4434
- return new un(t.firestore, t.converter, function(t, e) {
4434
+ var e = fr(t, this.type, this.bt, this.Et);
4435
+ return new sn(t.firestore, t.converter, function(t, e) {
4435
4436
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
4436
4437
  }(t._query, e));
4437
4438
  }, n;
4438
- }(Xn);
4439
+ }($n);
4439
4440
 
4440
- function sr() {
4441
+ function ar() {
4441
4442
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4442
- return new ar("startAt", t, /*before=*/ !0);
4443
+ return new or("startAt", t,
4444
+ /*inclusive=*/ !0);
4443
4445
  }
4444
4446
 
4445
- function ur() {
4447
+ function sr() {
4446
4448
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4447
- return new ar("startAfter", t,
4448
- /*before=*/ !1);
4449
+ return new or("startAfter", t,
4450
+ /*inclusive=*/ !1);
4449
4451
  }
4450
4452
 
4451
- var cr = /** @class */ function(e) {
4453
+ var ur = /** @class */ function(e) {
4452
4454
  function n(t, n, r) {
4453
4455
  var i = this;
4454
- return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
4456
+ return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
4455
4457
  }
4456
4458
  return t(n, e), n.prototype._apply = function(t) {
4457
- var e = hr(t, this.type, this.vt, this.Et);
4458
- return new un(t.firestore, t.converter, function(t, e) {
4459
+ var e = fr(t, this.type, this.bt, this.Et);
4460
+ return new sn(t.firestore, t.converter, function(t, e) {
4459
4461
  return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
4460
4462
  }(t._query, e));
4461
4463
  }, n;
4462
- }(Xn);
4464
+ }($n);
4463
4465
 
4464
- function lr() {
4466
+ function cr() {
4465
4467
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4466
- return new cr("endBefore", t, /*before=*/ !0);
4468
+ return new ur("endBefore", t,
4469
+ /*inclusive=*/ !1);
4467
4470
  }
4468
4471
 
4469
- function fr() {
4472
+ function lr() {
4470
4473
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4471
- return new cr("endAt", t, /*before=*/ !1);
4474
+ return new ur("endAt", t, /*inclusive=*/ !0);
4472
4475
  }
4473
4476
 
4474
- /** Helper function to create a bound from a document or fields */ function hr(t, e, n, r) {
4475
- if (n[0] = p(n[0]), n[0] instanceof Kn) return function(t, e, n, r, i) {
4477
+ /** Helper function to create a bound from a document or fields */ function fr(t, e, n, r) {
4478
+ if (n[0] = p(n[0]), n[0] instanceof Qn) return function(t, e, n, r, i) {
4476
4479
  if (!r) throw new U(P, "Can't use a DocumentSnapshot that doesn't exist for " + n + "().");
4477
4480
  // Because people expect to continue/end a query at the exact document
4478
4481
  // provided, we need to use the implicit sort order rather than the explicit
@@ -4495,7 +4498,7 @@ function fr() {
4495
4498
  }
4496
4499
  return new re(o, i);
4497
4500
  }(t._query, t.firestore._databaseId, e, n[0]._document, r);
4498
- var i = An(t.firestore);
4501
+ var i = In(t.firestore);
4499
4502
  return function(t, e, n, r, i, o) {
4500
4503
  // Use explicit order by's because it has to match the query the user made
4501
4504
  var a = t.explicitOrderBy;
@@ -4510,7 +4513,7 @@ function fr() {
4510
4513
  var f = new nt(l);
4511
4514
  s.push(Rt(e, f));
4512
4515
  } else {
4513
- var h = jn(n, r, c);
4516
+ var h = Cn(n, r, c);
4514
4517
  s.push(h);
4515
4518
  }
4516
4519
  }
@@ -4518,7 +4521,7 @@ function fr() {
4518
4521
  }(t._query, t.firestore._databaseId, i, e, n, r);
4519
4522
  }
4520
4523
 
4521
- function pr(t, e, n) {
4524
+ function hr(t, e, n) {
4522
4525
  if ("string" == typeof (n = p(n))) {
4523
4526
  if ("" === n) throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
4524
4527
  if (!fe(e) && -1 !== n.indexOf("/")) throw new U(V, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
@@ -4526,19 +4529,19 @@ function pr(t, e, n) {
4526
4529
  if (!nt.isDocumentKey(r)) throw new U(V, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
4527
4530
  return Rt(t, new nt(r));
4528
4531
  }
4529
- if (n instanceof sn) return Rt(t, n._key);
4532
+ if (n instanceof an) return Rt(t, n._key);
4530
4533
  throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: " + at(n) + ".");
4531
4534
  }
4532
4535
 
4533
4536
  /**
4534
4537
  * Validates that the value passed into a disjunctive filter satisfies all
4535
4538
  * array requirements.
4536
- */ function dr(t, e) {
4539
+ */ function pr(t, e) {
4537
4540
  if (!Array.isArray(t) || 0 === t.length) throw new U(V, "Invalid Query. A non-empty array is required for '" + e.toString() + "' filters.");
4538
4541
  if (t.length > 10) throw new U(V, "Invalid Query. '" + e.toString() + "' filters support a maximum of 10 elements in the value array.");
4539
4542
  }
4540
4543
 
4541
- function mr(t, e, n) {
4544
+ function dr(t, e, n) {
4542
4545
  if (!n.isEqual(e)) throw new U(V, "Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '" + e.toString() + "' and so you must also use '" + e.toString() + "' as your first argument to orderBy(), but your first orderBy() is on field '" + n.toString() + "' instead.");
4543
4546
  }
4544
4547
 
@@ -4588,23 +4591,23 @@ function mr(t, e, n) {
4588
4591
  * because we want to provide the user with a more specific error message if
4589
4592
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
4590
4593
  * call.
4591
- */ function yr(t, e, n) {
4594
+ */ function mr(t, e, n) {
4592
4595
  // Cast to `any` in order to satisfy the union type constraint on
4593
4596
  // toFirestore().
4594
4597
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4595
4598
  return t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e;
4596
4599
  }
4597
4600
 
4598
- var vr = /** @class */ function(e) {
4601
+ var yr = /** @class */ function(e) {
4599
4602
  function n(t) {
4600
4603
  var n = this;
4601
4604
  return (n = e.call(this) || this).firestore = t, n;
4602
4605
  }
4603
4606
  return t(n, e), n.prototype.convertBytes = function(t) {
4604
- return new vn(t);
4607
+ return new yn(t);
4605
4608
  }, n.prototype.convertReference = function(t) {
4606
4609
  var e = this.convertDocumentKey(t, this.firestore._databaseId);
4607
- return new sn(this.firestore, /* converter= */ null, e);
4610
+ return new an(this.firestore, /* converter= */ null, e);
4608
4611
  }, n;
4609
4612
  }(/** @class */ function() {
4610
4613
  function t() {}
@@ -4652,7 +4655,7 @@ var vr = /** @class */ function(e) {
4652
4655
  r[t] = n.convertValue(i, e);
4653
4656
  })), r;
4654
4657
  }, t.prototype.convertGeoPoint = function(t) {
4655
- return new wn(Vt(t.latitude), Vt(t.longitude));
4658
+ return new gn(Vt(t.latitude), Vt(t.longitude));
4656
4659
  }, t.prototype.convertArray = function(t, e) {
4657
4660
  var n = this;
4658
4661
  return (t.values || []).map((function(t) {
@@ -4675,7 +4678,7 @@ var vr = /** @class */ function(e) {
4675
4678
  return new bt(e.seconds, e.nanos);
4676
4679
  }, t.prototype.convertDocumentKey = function(t, e) {
4677
4680
  var n = Z.fromString(t);
4678
- E(Qe(n));
4681
+ E(ze(n));
4679
4682
  var r = new X(n.get(1), n.get(3)), i = new nt(n.popFirst(5));
4680
4683
  return r.isEqual(e) ||
4681
4684
  // TODO(b/64130202): Somehow support foreign references.
@@ -4696,12 +4699,12 @@ var vr = /** @class */ function(e) {
4696
4699
  * @param reference - The reference of the document to fetch.
4697
4700
  * @returns A Promise resolved with a `DocumentSnapshot` containing the current
4698
4701
  * document contents.
4699
- */ function gr(t) {
4700
- var e = Ze((t = st(t, sn)).firestore), n = new vr(t.firestore);
4701
- return $e(e, [ t._key ]).then((function(e) {
4702
+ */ function vr(t) {
4703
+ var e = Je((t = st(t, an)).firestore), n = new yr(t.firestore);
4704
+ return Ye(e, [ t._key ]).then((function(e) {
4702
4705
  E(1 === e.length);
4703
4706
  var r = e[0];
4704
- return new Kn(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
4707
+ return new Qn(t.firestore, n, t._key, r.isFoundDocument() ? r : null, t.converter);
4705
4708
  }));
4706
4709
  }
4707
4710
 
@@ -4716,35 +4719,35 @@ var vr = /** @class */ function(e) {
4716
4719
  *
4717
4720
  * @param query - The `Query` to execute.
4718
4721
  * @returns A Promise that will be resolved with the results of the query.
4719
- */ function wr(t) {
4722
+ */ function gr(t) {
4720
4723
  !function(t) {
4721
4724
  if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(L, "limitToLast() queries require specifying at least one orderBy() clause");
4722
- }((t = st(t, un))._query);
4723
- var e = Ze(t.firestore), n = new vr(t.firestore);
4724
- return Xe(e, t._query).then((function(e) {
4725
+ }((t = st(t, sn))._query);
4726
+ var e = Je(t.firestore), n = new yr(t.firestore);
4727
+ return $e(e, t._query).then((function(e) {
4725
4728
  var r = e.map((function(e) {
4726
- return new Hn(t.firestore, n, e.key, e, t.converter);
4729
+ return new Kn(t.firestore, n, e.key, e, t.converter);
4727
4730
  }));
4728
4731
  return ue(t._query) &&
4729
4732
  // Limit to last queries reverse the orderBy constraint that was
4730
4733
  // specified by the user. As such, we need to reverse the order of the
4731
4734
  // results to return the documents in the expected order.
4732
- r.reverse(), new Wn(t, r);
4735
+ r.reverse(), new Hn(t, r);
4733
4736
  }));
4734
4737
  }
4735
4738
 
4736
- function br(t, e, n) {
4737
- var r = yr((t = st(t, sn)).converter, e, n), i = kn(An(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
4738
- return Ye(Ze(t.firestore), [ i.toMutation(t._key, _e.none()) ]);
4739
+ function wr(t, e, n) {
4740
+ var r = mr((t = st(t, an)).converter, e, n), i = An(In(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
4741
+ return We(Je(t.firestore), [ i.toMutation(t._key, _e.none()) ]);
4739
4742
  }
4740
4743
 
4741
- function _r(t, e, n) {
4744
+ function br(t, e, n) {
4742
4745
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
4743
- var o, a = An((t = st(t, sn)).firestore);
4746
+ var o, a = In((t = st(t, an)).firestore);
4744
4747
  // For Compat types, we have to "extract" the underlying types before
4745
4748
  // performing validation.
4746
- return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(a, "updateDoc", t._key, e, n, r) : On(a, "updateDoc", t._key, e),
4747
- Ye(Ze(t.firestore), [ o.toMutation(t._key, _e.exists(!0)) ]);
4749
+ return o = "string" == typeof (e = p(e)) || e instanceof dn ? On(a, "updateDoc", t._key, e, n, r) : Fn(a, "updateDoc", t._key, e),
4750
+ We(Je(t.firestore), [ o.toMutation(t._key, _e.exists(!0)) ]);
4748
4751
  }
4749
4752
 
4750
4753
  /**
@@ -4758,8 +4761,8 @@ function _r(t, e, n) {
4758
4761
  * @param reference - A reference to the document to delete.
4759
4762
  * @returns A `Promise` resolved once the document has been successfully
4760
4763
  * deleted from the backend.
4761
- */ function Tr(t) {
4762
- return Ye(Ze((t = st(t, sn)).firestore), [ new Ie(t._key, _e.none()) ]);
4764
+ */ function _r(t) {
4765
+ return We(Je((t = st(t, an)).firestore), [ new Ie(t._key, _e.none()) ]);
4763
4766
  }
4764
4767
 
4765
4768
  /**
@@ -4776,9 +4779,9 @@ function _r(t, e, n) {
4776
4779
  * @throws Error - If the provided input is not a valid Firestore document.
4777
4780
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
4778
4781
  * newly created document after it has been written to the backend.
4779
- */ function Sr(t, e) {
4780
- var n = hn(t = st(t, cn)), r = yr(t.converter, e), i = kn(An(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
4781
- return Ye(Ze(t.firestore), [ i.toMutation(n._key, _e.exists(!1)) ]).then((function() {
4782
+ */ function Tr(t, e) {
4783
+ var n = fn(t = st(t, un)), r = mr(t.converter, e), i = An(In(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
4784
+ return We(Je(t.firestore), [ i.toMutation(n._key, _e.exists(!1)) ]).then((function() {
4782
4785
  return n;
4783
4786
  }));
4784
4787
  }
@@ -4802,15 +4805,15 @@ function _r(t, e, n) {
4802
4805
  /**
4803
4806
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
4804
4807
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
4805
- */ function Er() {
4806
- return new Vn("deleteField");
4808
+ */ function Sr() {
4809
+ return new kn("deleteField");
4807
4810
  }
4808
4811
 
4809
4812
  /**
4810
4813
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
4811
4814
  * include a server-generated timestamp in the written data.
4812
- */ function Ir() {
4813
- return new Pn("serverTimestamp");
4815
+ */ function Er() {
4816
+ return new Dn("serverTimestamp");
4814
4817
  }
4815
4818
 
4816
4819
  /**
@@ -4824,11 +4827,11 @@ function _r(t, e, n) {
4824
4827
  * @param elements - The elements to union into the array.
4825
4828
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
4826
4829
  * `updateDoc()`.
4827
- */ function Ar() {
4830
+ */ function Ir() {
4828
4831
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4829
4832
  // NOTE: We don't actually parse the data until it's used in set() or
4830
4833
  // update() since we'd need the Firestore instance to do this.
4831
- return new Nn("arrayUnion", t);
4834
+ return new Pn("arrayUnion", t);
4832
4835
  }
4833
4836
 
4834
4837
  /**
@@ -4841,11 +4844,11 @@ function _r(t, e, n) {
4841
4844
  * @param elements - The elements to remove from the array.
4842
4845
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
4843
4846
  * `updateDoc()`
4844
- */ function kr() {
4847
+ */ function Ar() {
4845
4848
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
4846
4849
  // NOTE: We don't actually parse the data until it's used in set() or
4847
4850
  // update() since we'd need the Firestore instance to do this.
4848
- return new qn("arrayRemove", t);
4851
+ return new Nn("arrayRemove", t);
4849
4852
  }
4850
4853
 
4851
4854
  /**
@@ -4866,8 +4869,8 @@ function _r(t, e, n) {
4866
4869
  * @param n - The value to increment by.
4867
4870
  * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
4868
4871
  * `updateDoc()`
4869
- */ function Vr(t) {
4870
- return new Fn("increment", t);
4872
+ */ function kr(t) {
4873
+ return new qn("increment", t);
4871
4874
  }
4872
4875
 
4873
4876
  /**
@@ -4893,23 +4896,23 @@ function _r(t, e, n) {
4893
4896
  * provides methods for adding writes to the write batch. None of the writes
4894
4897
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
4895
4898
  * called.
4896
- */ var Dr = /** @class */ function() {
4899
+ */ var Vr = /** @class */ function() {
4897
4900
  /** @hideconstructor */
4898
4901
  function t(t, e) {
4899
4902
  this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
4900
- this._dataReader = An(t);
4903
+ this._dataReader = In(t);
4901
4904
  }
4902
4905
  return t.prototype.set = function(t, e, n) {
4903
4906
  this._verifyNotCommitted();
4904
- var r = Pr(t, this._firestore), i = yr(r.converter, e, n), o = kn(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
4907
+ var r = Dr(t, this._firestore), i = mr(r.converter, e, n), o = An(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
4905
4908
  return this._mutations.push(o.toMutation(r._key, _e.none())), this;
4906
4909
  }, t.prototype.update = function(t, e, n) {
4907
4910
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
4908
4911
  this._verifyNotCommitted();
4909
- var o, a = Pr(t, this._firestore);
4912
+ var o, a = Dr(t, this._firestore);
4910
4913
  // For Compat types, we have to "extract" the underlying types before
4911
4914
  // performing validation.
4912
- return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(this._dataReader, "WriteBatch.update", a._key, e, n, r) : On(this._dataReader, "WriteBatch.update", a._key, e),
4915
+ return o = "string" == typeof (e = p(e)) || e instanceof dn ? On(this._dataReader, "WriteBatch.update", a._key, e, n, r) : Fn(this._dataReader, "WriteBatch.update", a._key, e),
4913
4916
  this._mutations.push(o.toMutation(a._key, _e.exists(!0))), this;
4914
4917
  },
4915
4918
  /**
@@ -4920,7 +4923,7 @@ function _r(t, e, n) {
4920
4923
  */
4921
4924
  t.prototype.delete = function(t) {
4922
4925
  this._verifyNotCommitted();
4923
- var e = Pr(t, this._firestore);
4926
+ var e = Dr(t, this._firestore);
4924
4927
  return this._mutations = this._mutations.concat(new Ie(e._key, _e.none())), this;
4925
4928
  },
4926
4929
  /**
@@ -4942,7 +4945,7 @@ function _r(t, e, n) {
4942
4945
  }, t;
4943
4946
  }();
4944
4947
 
4945
- function Pr(t, e) {
4948
+ function Dr(t, e) {
4946
4949
  if ((t = p(t)).firestore !== e) throw new U(V, "Provided document reference is from a different Firestore instance.");
4947
4950
  return t;
4948
4951
  }
@@ -4959,10 +4962,10 @@ function Pr(t, e) {
4959
4962
  *
4960
4963
  * @returns A `WriteBatch` that can be used to atomically execute multiple
4961
4964
  * writes.
4962
- */ function Nr(t) {
4963
- var e = Ze(t = st(t, en));
4964
- return new Dr(t, (function(t) {
4965
- return Ye(e, t);
4965
+ */ function Pr(t) {
4966
+ var e = Je(t = st(t, tn));
4967
+ return new Vr(t, (function(t) {
4968
+ return We(e, t);
4966
4969
  }));
4967
4970
  }
4968
4971
 
@@ -4985,7 +4988,7 @@ function Pr(t, e) {
4985
4988
  /**
4986
4989
  * Internal transaction object responsible for accumulating the mutations to
4987
4990
  * perform and the base versions for any documents read.
4988
- */ var qr = /** @class */ function() {
4991
+ */ var Nr = /** @class */ function() {
4989
4992
  function t(t) {
4990
4993
  this.datastore = t,
4991
4994
  // The version of each document that was read during this transaction.
@@ -5010,7 +5013,7 @@ function Pr(t, e) {
5010
5013
  switch (n.label) {
5011
5014
  case 0:
5012
5015
  if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new U(V, "Firestore transactions require all reads to be executed before all writes.");
5013
- return [ 4 /*yield*/ , $e(this.datastore, t) ];
5016
+ return [ 4 /*yield*/ , Ye(this.datastore, t) ];
5014
5017
 
5015
5018
  case 1:
5016
5019
  return [ 2 /*return*/ , ((e = n.sent()).forEach((function(t) {
@@ -5047,7 +5050,7 @@ function Pr(t, e) {
5047
5050
  t.forEach((function(t, n) {
5048
5051
  var r = nt.fromPath(n);
5049
5052
  e.mutations.push(new Ae(r, e.precondition(r)));
5050
- })), [ 4 /*yield*/ , Ye(this.datastore, this.mutations) ];
5053
+ })), [ 4 /*yield*/ , We(this.datastore, this.mutations) ];
5051
5054
 
5052
5055
  case 1:
5053
5056
  // For each mutation, note that the doc was written.
@@ -5105,10 +5108,10 @@ function Pr(t, e) {
5105
5108
  }, t.prototype.write = function(t) {
5106
5109
  this.ensureCommitNotCalled(), this.mutations.push(t);
5107
5110
  }, t.prototype.ensureCommitNotCalled = function() {}, t;
5108
- }(), Fr = /** @class */ function() {
5111
+ }(), qr = /** @class */ function() {
5109
5112
  function t(t, e, n, r) {
5110
5113
  this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = r,
5111
- this.Tt = 5, this.It = new He(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
5114
+ this.Tt = 5, this.It = new Ke(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
5112
5115
  /** Runs the transaction and sets the result on deferred. */;
5113
5116
  }
5114
5117
  return t.prototype.run = function() {
@@ -5119,7 +5122,7 @@ function Pr(t, e) {
5119
5122
  return e(t, void 0, void 0, (function() {
5120
5123
  var t, e, r = this;
5121
5124
  return n(this, (function(n) {
5122
- return t = new qr(this.datastore), (e = this.Rt(t)) && e.then((function(e) {
5125
+ return t = new Nr(this.datastore), (e = this.Rt(t)) && e.then((function(e) {
5123
5126
  r.asyncQueue.enqueueAndForget((function() {
5124
5127
  return t.commit().then((function() {
5125
5128
  r.deferred.resolve(e);
@@ -5231,7 +5234,7 @@ function Pr(t, e) {
5231
5234
  * See the License for the specific language governing permissions and
5232
5235
  * limitations under the License.
5233
5236
  */
5234
- /** The Platform's 'document' implementation or null if not available. */ function Or() {
5237
+ /** The Platform's 'document' implementation or null if not available. */ function Fr() {
5235
5238
  // `document` is not always available, e.g. in ReactNative and WebWorkers.
5236
5239
  // eslint-disable-next-line no-restricted-globals
5237
5240
  return "undefined" != typeof document ? document : null;
@@ -5263,7 +5266,7 @@ function Pr(t, e) {
5263
5266
  * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type
5264
5267
  * in newer versions of TypeScript defines `finally`, which is not available in
5265
5268
  * IE.
5266
- */ var Cr = /** @class */ function() {
5269
+ */ var Or = /** @class */ function() {
5267
5270
  function t(t, e, n, r, i) {
5268
5271
  this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = i,
5269
5272
  this.deferred = new x, this.then = this.deferred.promise.then.bind(this.deferred.promise),
@@ -5327,7 +5330,7 @@ function Pr(t, e) {
5327
5330
  null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle),
5328
5331
  this.timerHandle = null);
5329
5332
  }, t;
5330
- }(), jr = /** @class */ function() {
5333
+ }(), Cr = /** @class */ function() {
5331
5334
  function t() {
5332
5335
  var t = this;
5333
5336
  // The last promise in the queue.
@@ -5351,15 +5354,15 @@ function Pr(t, e) {
5351
5354
  // List of TimerIds to fast-forward delays for.
5352
5355
  this.Ot = [],
5353
5356
  // Backoff timer used to schedule retries for retryable operations
5354
- this.It = new He(this, "async_queue_retry" /* AsyncQueueRetry */),
5357
+ this.It = new Ke(this, "async_queue_retry" /* AsyncQueueRetry */),
5355
5358
  // Visibility handler that triggers an immediate retry of all retryable
5356
5359
  // operations. Meant to speed up recovery when we regain file system access
5357
5360
  // after page comes into foreground.
5358
5361
  this.Ct = function() {
5359
- var e = Or();
5362
+ var e = Fr();
5360
5363
  e && w("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.It.H();
5361
5364
  };
5362
- var e = Or();
5365
+ var e = Fr();
5363
5366
  e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Ct);
5364
5367
  }
5365
5368
  return Object.defineProperty(t.prototype, "isShuttingDown", {
@@ -5383,7 +5386,7 @@ function Pr(t, e) {
5383
5386
  }, t.prototype.enterRestrictedMode = function(t) {
5384
5387
  if (!this.$t) {
5385
5388
  this.$t = !0, this.qt = t || !1;
5386
- var e = Or();
5389
+ var e = Fr();
5387
5390
  e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Ct);
5388
5391
  }
5389
5392
  }, t.prototype.enqueue = function(t) {
@@ -5481,7 +5484,7 @@ function Pr(t, e) {
5481
5484
  this.Lt(),
5482
5485
  // Fast-forward delays for timerIds that have been overriden.
5483
5486
  this.Ot.indexOf(t) > -1 && (e = 0);
5484
- var i = Cr.createAndSchedule(this, t, e, n, (function(t) {
5487
+ var i = Or.createAndSchedule(this, t, e, n, (function(t) {
5485
5488
  return r.jt(t);
5486
5489
  }));
5487
5490
  return this.St.push(i), i;
@@ -5556,10 +5559,10 @@ function Pr(t, e) {
5556
5559
  var e = this.St.indexOf(t);
5557
5560
  this.St.splice(e, 1);
5558
5561
  }, t;
5559
- }(), Lr = /** @class */ function() {
5562
+ }(), jr = /** @class */ function() {
5560
5563
  /** @hideconstructor */
5561
5564
  function t(t, e) {
5562
- this._firestore = t, this._transaction = e, this._dataReader = An(t)
5565
+ this._firestore = t, this._transaction = e, this._dataReader = In(t)
5563
5566
  /**
5564
5567
  * Reads the document referenced by the provided {@link DocumentReference}.
5565
5568
  *
@@ -5568,23 +5571,23 @@ function Pr(t, e) {
5568
5571
  */;
5569
5572
  }
5570
5573
  return t.prototype.get = function(t) {
5571
- var e = this, n = Pr(t, this._firestore), r = new vr(this._firestore);
5574
+ var e = this, n = Dr(t, this._firestore), r = new yr(this._firestore);
5572
5575
  return this._transaction.lookup([ n._key ]).then((function(t) {
5573
5576
  if (!t || 1 !== t.length) return S();
5574
5577
  var i = t[0];
5575
- if (i.isFoundDocument()) return new Kn(e._firestore, r, i.key, i, n.converter);
5576
- if (i.isNoDocument()) return new Kn(e._firestore, r, n._key, null, n.converter);
5578
+ if (i.isFoundDocument()) return new Qn(e._firestore, r, i.key, i, n.converter);
5579
+ if (i.isNoDocument()) return new Qn(e._firestore, r, n._key, null, n.converter);
5577
5580
  throw S();
5578
5581
  }));
5579
5582
  }, t.prototype.set = function(t, e, n) {
5580
- var r = Pr(t, this._firestore), i = yr(r.converter, e, n), o = kn(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
5583
+ var r = Dr(t, this._firestore), i = mr(r.converter, e, n), o = An(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
5581
5584
  return this._transaction.set(r._key, o), this;
5582
5585
  }, t.prototype.update = function(t, e, n) {
5583
5586
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
5584
- var o, a = Pr(t, this._firestore);
5587
+ var o, a = Dr(t, this._firestore);
5585
5588
  // For Compat types, we have to "extract" the underlying types before
5586
5589
  // performing validation.
5587
- return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(this._dataReader, "Transaction.update", a._key, e, n, r) : On(this._dataReader, "Transaction.update", a._key, e),
5590
+ return o = "string" == typeof (e = p(e)) || e instanceof dn ? On(this._dataReader, "Transaction.update", a._key, e, n, r) : Fn(this._dataReader, "Transaction.update", a._key, e),
5588
5591
  this._transaction.update(a._key, o), this;
5589
5592
  },
5590
5593
  /**
@@ -5594,7 +5597,7 @@ function Pr(t, e) {
5594
5597
  * @returns This `Transaction` instance. Used for chaining method calls.
5595
5598
  */
5596
5599
  t.prototype.delete = function(t) {
5597
- var e = Pr(t, this._firestore);
5600
+ var e = Dr(t, this._firestore);
5598
5601
  return this._transaction.delete(e._key), this;
5599
5602
  }, t;
5600
5603
  }();
@@ -5632,10 +5635,10 @@ function Pr(t, e) {
5632
5635
  * `updateFunction `is returned here. Otherwise, if the transaction failed, a
5633
5636
  * rejected promise with the corresponding failure error is returned.
5634
5637
  */
5635
- function Rr(t, e) {
5636
- var n = Ze(t = st(t, en)), r = new x;
5637
- return new Fr(new jr, n, (function(n) {
5638
- return e(new Lr(t, n));
5638
+ function Lr(t, e) {
5639
+ var n = Je(t = st(t, tn)), r = new x;
5640
+ return new qr(new Cr, n, (function(n) {
5641
+ return e(new jr(t, n));
5639
5642
  }), r).run(), r.promise
5640
5643
  /**
5641
5644
  * Firestore Lite
@@ -5648,11 +5651,11 @@ function Rr(t, e) {
5648
5651
  }
5649
5652
 
5650
5653
  y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
5651
- var n = e.options, r = t.getProvider("app").getImmediate(), i = new en(r, new Q(t.getProvider("auth-internal")), new Y(t.getProvider("app-check-internal")));
5654
+ var n = e.options, r = t.getProvider("app").getImmediate(), i = new tn(r, new Q(t.getProvider("auth-internal")), new Y(t.getProvider("app-check-internal")));
5652
5655
  return n && i._setSettings(n), i;
5653
5656
  }), "PUBLIC")),
5654
5657
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
5655
- a("firestore-lite", "3.4.4-canary.dd86989b3", ""), a("firestore-lite", "3.4.4-canary.dd86989b3", "esm5");
5658
+ a("firestore-lite", "3.4.4-canary.e8972ef49", ""), a("firestore-lite", "3.4.4-canary.e8972ef49", "esm5");
5656
5659
 
5657
- export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion, ln as collection, fn as collectionGroup, on as connectFirestoreEmulator, Tr as deleteDoc, Er as deleteField, hn as doc, yn as documentId, fr as endAt, lr as endBefore, gr as getDoc, wr as getDocs, rn as getFirestore, Vr as increment, nn as initializeFirestore, ir as limit, or as limitToLast, nr as orderBy, Jn as query, dn as queryEqual, pn as refEqual, Rr as runTransaction, Ir as serverTimestamp, br as setDoc, g as setLogLevel, Yn as snapshotEqual, ur as startAfter, sr as startAt, an as terminate, _r as updateDoc, tr as where, Nr as writeBatch };
5660
+ export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, U as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, jr as Transaction, Vr as WriteBatch, Tr as addDoc, Ar as arrayRemove, Ir as arrayUnion, cn as collection, ln as collectionGroup, rn as connectFirestoreEmulator, _r as deleteDoc, Sr as deleteField, fn as doc, mn as documentId, lr as endAt, cr as endBefore, vr as getDoc, gr as getDocs, nn as getFirestore, kr as increment, en as initializeFirestore, rr as limit, ir as limitToLast, er as orderBy, Xn as query, pn as queryEqual, hn as refEqual, Lr as runTransaction, Er as serverTimestamp, wr as setDoc, g as setLogLevel, Wn as snapshotEqual, sr as startAfter, ar as startAt, on as terminate, br as updateDoc, Zn as where, Pr as writeBatch };
5658
5661
  //# sourceMappingURL=index.browser.esm5.js.map