@firebase/firestore 3.7.1 → 3.7.2

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.
@@ -67,7 +67,7 @@ v.MOCK_USER = new v("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- var g = "9.12.1", w = new l("@firebase/firestore");
70
+ var g = "9.13.0", w = new l("@firebase/firestore");
71
71
 
72
72
  /**
73
73
  * @license
@@ -105,7 +105,7 @@ function b(t) {
105
105
  function _(t) {
106
106
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
107
107
  if (w.logLevel <= f.DEBUG) {
108
- var i = e.map(S);
108
+ var i = e.map(k);
109
109
  w.debug.apply(w, r([ "Firestore (" + g + "): " + t ], i));
110
110
  }
111
111
  }
@@ -113,7 +113,7 @@ function _(t) {
113
113
  function T(t) {
114
114
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
115
115
  if (w.logLevel <= f.ERROR) {
116
- var i = e.map(S);
116
+ var i = e.map(k);
117
117
  w.error.apply(w, r([ "Firestore (" + g + "): " + t ], i));
118
118
  }
119
119
  }
@@ -123,14 +123,14 @@ function T(t) {
123
123
  */ function E(t) {
124
124
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
125
125
  if (w.logLevel <= f.WARN) {
126
- var i = e.map(S);
126
+ var i = e.map(k);
127
127
  w.warn.apply(w, r([ "Firestore (" + g + "): " + t ], i));
128
128
  }
129
129
  }
130
130
 
131
131
  /**
132
132
  * Converts an additional log parameter to a string representation.
133
- */ function S(t) {
133
+ */ function k(t) {
134
134
  if ("string" == typeof t) return t;
135
135
  try {
136
136
  return e = t, JSON.stringify(e);
@@ -180,7 +180,7 @@ function T(t) {
180
180
  * Returns `never` and can be used in expressions:
181
181
  * @example
182
182
  * let futureVar = fail('not implemented yet');
183
- */ function k(t) {
183
+ */ function S(t) {
184
184
  void 0 === t && (t = "Unexpected state");
185
185
  // Log the failure in addition to throw an exception, just in case the
186
186
  // exception is swallowed.
@@ -198,7 +198,7 @@ function T(t) {
198
198
  }
199
199
 
200
200
  function I(t, e) {
201
- t || k();
201
+ t || S();
202
202
  }
203
203
 
204
204
  /**
@@ -225,7 +225,7 @@ e) {
225
225
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
226
226
  * See the License for the specific language governing permissions and
227
227
  * limitations under the License.
228
- */ var V = "cancelled", P = "unknown", D = "invalid-argument", O = "deadline-exceeded", N = "not-found", F = "permission-denied", R = "unauthenticated", q = "resource-exhausted", L = "failed-precondition", x = "aborted", C = "out-of-range", j = "unimplemented", M = "internal", U = "unavailable", B = /** @class */ function(e) {
228
+ */ var V = "cancelled", P = "unknown", D = "invalid-argument", F = "deadline-exceeded", N = "not-found", O = "permission-denied", R = "unauthenticated", q = "resource-exhausted", L = "failed-precondition", x = "aborted", C = "out-of-range", j = "unimplemented", M = "internal", U = "unavailable", B = /** @class */ function(e) {
229
229
  /** @hideconstructor */
230
230
  function n(
231
231
  /**
@@ -251,9 +251,9 @@ e) {
251
251
  this.promise = new Promise((function(e, n) {
252
252
  t.resolve = e, t.reject = n;
253
253
  }));
254
- }, G = function(t, e) {
254
+ }, K = function(t, e) {
255
255
  this.user = e, this.type = "OAuth", this.headers = new Map, this.headers.set("Authorization", "Bearer " + t);
256
- }, K = /** @class */ function() {
256
+ }, G = /** @class */ function() {
257
257
  function t() {}
258
258
  return t.prototype.getToken = function() {
259
259
  return Promise.resolve(null);
@@ -295,7 +295,7 @@ e) {
295
295
  return t.prototype.getToken = function() {
296
296
  var t = this;
297
297
  return this.auth ? this.auth.getToken().then((function(e) {
298
- return e ? (I("string" == typeof e.accessToken), new G(e.accessToken, new v(t.auth.getUid()))) : null;
298
+ return e ? (I("string" == typeof e.accessToken), new K(e.accessToken, new v(t.auth.getUid()))) : null;
299
299
  })) : Promise.resolve(null);
300
300
  }, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {},
301
301
  t.prototype.shutdown = function() {}, t;
@@ -387,7 +387,7 @@ function(t, e, n, r, i, o, a, u) {
387
387
  }, t;
388
388
  }(), tt = /** @class */ function() {
389
389
  function t(t, e, n) {
390
- void 0 === e ? e = 0 : e > t.length && k(), void 0 === n ? n = t.length - e : n > t.length - e && k(),
390
+ void 0 === e ? e = 0 : e > t.length && S(), void 0 === n ? n = t.length - e : n > t.length - e && S(),
391
391
  this.segments = t, this.offset = e, this.len = n;
392
392
  }
393
393
  return Object.defineProperty(t.prototype, "length", {
@@ -638,7 +638,7 @@ function ot(t, e, n) {
638
638
  }(t);
639
639
  return e ? "a custom " + e + " object" : "an object";
640
640
  }
641
- return "function" == typeof t ? "a function" : k();
641
+ return "function" == typeof t ? "a function" : S();
642
642
  }
643
643
 
644
644
  function ct(t,
@@ -776,7 +776,7 @@ function mt(t) {
776
776
 
777
777
  case 403:
778
778
  // Forbidden
779
- return F;
779
+ return O;
780
780
 
781
781
  case 404:
782
782
  // Not Found
@@ -817,7 +817,7 @@ function mt(t) {
817
817
 
818
818
  case 504:
819
819
  // Gateway Timeout
820
- return O;
820
+ return F;
821
821
 
822
822
  default:
823
823
  return t >= 200 && t < 300 ? "ok" : t >= 400 && t < 500 ? L : t >= 500 && t < 600 ? M : P;
@@ -1239,13 +1239,13 @@ function bt(t, e) {
1239
1239
  * See the License for the specific language governing permissions and
1240
1240
  * limitations under the License.
1241
1241
  */
1242
- function St(t) {
1242
+ function kt(t) {
1243
1243
  var e = 0;
1244
1244
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;
1245
1245
  return e;
1246
1246
  }
1247
1247
 
1248
- function kt(t, e) {
1248
+ function St(t, e) {
1249
1249
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);
1250
1250
  }
1251
1251
 
@@ -1483,10 +1483,10 @@ var It = /** @class */ function() {
1483
1483
  // In a balanced RB tree, the black-depth (number of black nodes) from root to
1484
1484
  // leaves is equal on both sides. This function verifies that or asserts.
1485
1485
  t.prototype.check = function() {
1486
- if (this.isRed() && this.left.isRed()) throw k();
1487
- if (this.right.isRed()) throw k();
1486
+ if (this.isRed() && this.left.isRed()) throw S();
1487
+ if (this.right.isRed()) throw S();
1488
1488
  var t = this.left.check();
1489
- if (t !== this.right.check()) throw k();
1489
+ if (t !== this.right.check()) throw S();
1490
1490
  return t + (this.isRed() ? 0 : 1);
1491
1491
  }, t;
1492
1492
  }();
@@ -1504,31 +1504,31 @@ Vt.EMPTY = new (/** @class */ function() {
1504
1504
  }
1505
1505
  return Object.defineProperty(t.prototype, "key", {
1506
1506
  get: function() {
1507
- throw k();
1507
+ throw S();
1508
1508
  },
1509
1509
  enumerable: !1,
1510
1510
  configurable: !0
1511
1511
  }), Object.defineProperty(t.prototype, "value", {
1512
1512
  get: function() {
1513
- throw k();
1513
+ throw S();
1514
1514
  },
1515
1515
  enumerable: !1,
1516
1516
  configurable: !0
1517
1517
  }), Object.defineProperty(t.prototype, "color", {
1518
1518
  get: function() {
1519
- throw k();
1519
+ throw S();
1520
1520
  },
1521
1521
  enumerable: !1,
1522
1522
  configurable: !0
1523
1523
  }), Object.defineProperty(t.prototype, "left", {
1524
1524
  get: function() {
1525
- throw k();
1525
+ throw S();
1526
1526
  },
1527
1527
  enumerable: !1,
1528
1528
  configurable: !0
1529
1529
  }), Object.defineProperty(t.prototype, "right", {
1530
1530
  get: function() {
1531
- throw k();
1531
+ throw S();
1532
1532
  },
1533
1533
  enumerable: !1,
1534
1534
  configurable: !0
@@ -1678,7 +1678,7 @@ var Pt = /** @class */ function() {
1678
1678
  }, t.prototype.hasNext = function() {
1679
1679
  return this.iter.hasNext();
1680
1680
  }, t;
1681
- }(), Ot = /** @class */ function() {
1681
+ }(), Ft = /** @class */ function() {
1682
1682
  function t(t) {
1683
1683
  this.fields = t,
1684
1684
  // TODO(dimond): validation of FieldMask
@@ -1769,7 +1769,7 @@ var Pt = /** @class */ function() {
1769
1769
 
1770
1770
  Nt.EMPTY_BYTE_STRING = new Nt("");
1771
1771
 
1772
- var Ft = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1772
+ var Ot = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1773
1773
 
1774
1774
  /**
1775
1775
  * Converts the possible Proto values for a timestamp value into a "seconds and
@@ -1782,7 +1782,7 @@ var Ft = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1782
1782
  // The date string can have higher precision (nanos) than the Date class
1783
1783
  // (millis), so we do some custom parsing here.
1784
1784
  // Parse the nanos right out of the string.
1785
- var e = 0, n = Ft.exec(t);
1785
+ var e = 0, n = Ot.exec(t);
1786
1786
  if (I(!!n), n[1]) {
1787
1787
  // Pad the fraction out to 9 digits (nanos).
1788
1788
  var r = n[1];
@@ -1896,7 +1896,7 @@ var Ft = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1896
1896
  /** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */
1897
1897
  function(t) {
1898
1898
  return "__max__" === (((t.mapValue || {}).fields || {}).__type__ || {}).stringValue;
1899
- }(t) ? 9007199254740991 /* MaxValue */ : 10 /* ObjectValue */ : k();
1899
+ }(t) ? 9007199254740991 /* MaxValue */ : 10 /* ObjectValue */ : S();
1900
1900
  }
1901
1901
 
1902
1902
  /** Tests `left` and `right` for equality based on the backend semantics. */ function Bt(t, e) {
@@ -1955,13 +1955,13 @@ var Ft = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1955
1955
  case 10 /* ObjectValue */ :
1956
1956
  return function(t, e) {
1957
1957
  var n = t.mapValue.fields || {}, r = e.mapValue.fields || {};
1958
- if (St(n) !== St(r)) return !1;
1958
+ if (kt(n) !== kt(r)) return !1;
1959
1959
  for (var i in n) if (n.hasOwnProperty(i) && (void 0 === r[i] || !Bt(n[i], r[i]))) return !1;
1960
1960
  return !0;
1961
1961
  }(t, e);
1962
1962
 
1963
1963
  default:
1964
- return k();
1964
+ return S();
1965
1965
  }
1966
1966
  }
1967
1967
 
@@ -1971,7 +1971,7 @@ function zt(t, e) {
1971
1971
  }));
1972
1972
  }
1973
1973
 
1974
- function Gt(t, e) {
1974
+ function Kt(t, e) {
1975
1975
  if (t === e) return 0;
1976
1976
  var n = Ut(t), r = Ut(e);
1977
1977
  if (n !== r) return bt(n, r);
@@ -1992,10 +1992,10 @@ function Gt(t, e) {
1992
1992
  }(t, e);
1993
1993
 
1994
1994
  case 3 /* TimestampValue */ :
1995
- return Kt(t.timestampValue, e.timestampValue);
1995
+ return Gt(t.timestampValue, e.timestampValue);
1996
1996
 
1997
1997
  case 4 /* ServerTimestampValue */ :
1998
- return Kt(jt(t), jt(e));
1998
+ return Gt(jt(t), jt(e));
1999
1999
 
2000
2000
  case 5 /* StringValue */ :
2001
2001
  return bt(t.stringValue, e.stringValue);
@@ -2024,7 +2024,7 @@ function Gt(t, e) {
2024
2024
  case 9 /* ArrayValue */ :
2025
2025
  return function(t, e) {
2026
2026
  for (var n = t.values || [], r = e.values || [], i = 0; i < n.length && i < r.length; ++i) {
2027
- var o = Gt(n[i], r[i]);
2027
+ var o = Kt(n[i], r[i]);
2028
2028
  if (o) return o;
2029
2029
  }
2030
2030
  return bt(n.length, r.length);
@@ -2044,18 +2044,18 @@ function Gt(t, e) {
2044
2044
  for (var a = 0; a < r.length && a < o.length; ++a) {
2045
2045
  var u = bt(r[a], o[a]);
2046
2046
  if (0 !== u) return u;
2047
- var s = Gt(n[r[a]], i[o[a]]);
2047
+ var s = Kt(n[r[a]], i[o[a]]);
2048
2048
  if (0 !== s) return s;
2049
2049
  }
2050
2050
  return bt(r.length, o.length);
2051
2051
  }(t.mapValue, e.mapValue);
2052
2052
 
2053
2053
  default:
2054
- throw k();
2054
+ throw S();
2055
2055
  }
2056
2056
  }
2057
2057
 
2058
- function Kt(t, e) {
2058
+ function Gt(t, e) {
2059
2059
  if ("string" == typeof t && "string" == typeof e && t.length === e.length) return bt(t, e);
2060
2060
  var n = Rt(t), r = Rt(e), i = bt(n.seconds, r.seconds);
2061
2061
  return 0 !== i ? i : bt(n.nanos, r.nanos);
@@ -2096,7 +2096,7 @@ function Qt(t, e) {
2096
2096
  fields: {}
2097
2097
  }
2098
2098
  };
2099
- return kt(t.mapValue.fields, (function(t, n) {
2099
+ return St(t.mapValue.fields, (function(t, n) {
2100
2100
  return e.mapValue.fields[t] = Jt(n);
2101
2101
  })), e;
2102
2102
  }
@@ -2194,7 +2194,7 @@ var Zt = /** @class */ function() {
2194
2194
  * entries.
2195
2195
  */
2196
2196
  t.prototype.applyChanges = function(t, e, n) {
2197
- kt(e, (function(e, n) {
2197
+ St(e, (function(e, n) {
2198
2198
  return t[e] = n;
2199
2199
  }));
2200
2200
  for (var r = 0, i = n; r < i.length; r++) {
@@ -2359,7 +2359,7 @@ var ne = /** @class */ function(e) {
2359
2359
  }, n.prototype.matches = function(t) {
2360
2360
  var e = t.data.field(this.field);
2361
2361
  // Types do not have to match in NOT_EQUAL filters.
2362
- return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.S(Gt(e, this.value)) : null !== e && Ut(this.value) === Ut(e) && this.S(Gt(e, this.value));
2362
+ return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.S(Kt(e, this.value)) : null !== e && Ut(this.value) === Ut(e) && this.S(Kt(e, this.value));
2363
2363
  // Only compare types with matching backend order (such as double and int).
2364
2364
  }, n.prototype.S = function(t) {
2365
2365
  switch (this.op) {
@@ -2382,7 +2382,7 @@ var ne = /** @class */ function(e) {
2382
2382
  return t >= 0;
2383
2383
 
2384
2384
  default:
2385
- return k();
2385
+ return S();
2386
2386
  }
2387
2387
  }, n.prototype.q = function() {
2388
2388
  return [ "<" /* LESS_THAN */ , "<=" /* LESS_THAN_OR_EQUAL */ , ">" /* GREATER_THAN */ , ">=" /* GREATER_THAN_OR_EQUAL */ , "!=" /* NOT_EQUAL */ , "not-in" /* NOT_IN */ ].indexOf(this.op) >= 0;
@@ -2670,13 +2670,13 @@ function _e(t, e) {
2670
2670
  return null !== e && e.apply(this, arguments) || this;
2671
2671
  }
2672
2672
  return t(n, e), n;
2673
- }(Te), Se = /** @class */ function(e) {
2673
+ }(Te), ke = /** @class */ function(e) {
2674
2674
  function n(t) {
2675
2675
  var n = this;
2676
2676
  return (n = e.call(this) || this).elements = t, n;
2677
2677
  }
2678
2678
  return t(n, e), n;
2679
- }(Te), ke = /** @class */ function(e) {
2679
+ }(Te), Se = /** @class */ function(e) {
2680
2680
  function n(t) {
2681
2681
  var n = this;
2682
2682
  return (n = e.call(this) || this).elements = t, n;
@@ -2722,7 +2722,7 @@ function _e(t, e) {
2722
2722
  return t(n, e), n.prototype.getFieldMask = function() {
2723
2723
  return null;
2724
2724
  }, n;
2725
- }(Pe), Oe = /** @class */ function(e) {
2725
+ }(Pe), Fe = /** @class */ function(e) {
2726
2726
  function n(t, n, r, i, o) {
2727
2727
  void 0 === o && (o = []);
2728
2728
  var a = this;
@@ -2741,7 +2741,7 @@ function _e(t, e) {
2741
2741
  return t(n, e), n.prototype.getFieldMask = function() {
2742
2742
  return null;
2743
2743
  }, n;
2744
- }(Pe), Fe = /** @class */ function(e) {
2744
+ }(Pe), Oe = /** @class */ function(e) {
2745
2745
  function n(t, n) {
2746
2746
  var r = this;
2747
2747
  return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 3 /* Verify */ ,
@@ -2826,11 +2826,11 @@ function ze(t, e) {
2826
2826
  return new it((I((n = r).length > 4 && "documents" === n.get(4)), n.popFirst(5)));
2827
2827
  }
2828
2828
 
2829
- function Ge(t, e) {
2829
+ function Ke(t, e) {
2830
2830
  return Ue(t.databaseId, e);
2831
2831
  }
2832
2832
 
2833
- function Ke(t) {
2833
+ function Ge(t) {
2834
2834
  return new et([ "projects", t.databaseId.projectId, "databases", t.databaseId.database ]).canonicalString();
2835
2835
  }
2836
2836
 
@@ -2846,10 +2846,10 @@ function We(t, e) {
2846
2846
  var n = {
2847
2847
  structuredQuery: {}
2848
2848
  }, r = e.path;
2849
- null !== e.collectionGroup ? (n.parent = Ge(t, r), n.structuredQuery.from = [ {
2849
+ null !== e.collectionGroup ? (n.parent = Ke(t, r), n.structuredQuery.from = [ {
2850
2850
  collectionId: e.collectionGroup,
2851
2851
  allDescendants: !0
2852
- } ]) : (n.parent = Ge(t, r.popLast()), n.structuredQuery.from = [ {
2852
+ } ]) : (n.parent = Ke(t, r.popLast()), n.structuredQuery.from = [ {
2853
2853
  collectionId: r.lastSegment()
2854
2854
  } ]);
2855
2855
  var i = function(t) {
@@ -3080,16 +3080,16 @@ function Ze(t) {
3080
3080
  function n(t, n, r, i) {
3081
3081
  var o = this;
3082
3082
  return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
3083
- o.tt = r, o.L = i, o.et = !1, o;
3083
+ o.connection = r, o.L = i, o.tt = !1, o;
3084
3084
  }
3085
- return t(n, e), n.prototype.nt = function() {
3086
- if (this.et) throw new B(L, "The client has already been terminated.");
3085
+ return t(n, e), n.prototype.et = function() {
3086
+ if (this.tt) throw new B(L, "The client has already been terminated.");
3087
3087
  },
3088
3088
  /** Invokes the provided RPC with auth and AppCheck tokens. */ n.prototype.I = function(t, e, n) {
3089
3089
  var r = this;
3090
- return this.nt(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(i) {
3090
+ return this.et(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(i) {
3091
3091
  var o = i[0], a = i[1];
3092
- return r.tt.I(t, e, n, o, a);
3092
+ return r.connection.I(t, e, n, o, a);
3093
3093
  })).catch((function(t) {
3094
3094
  throw "FirebaseError" === t.name ? (t.code === R && (r.authCredentials.invalidateToken(),
3095
3095
  r.appCheckCredentials.invalidateToken()), t) : new B(P, t.toString());
@@ -3097,15 +3097,15 @@ function Ze(t) {
3097
3097
  },
3098
3098
  /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ n.prototype.P = function(t, e, n, r) {
3099
3099
  var i = this;
3100
- return this.nt(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(o) {
3100
+ return this.et(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(o) {
3101
3101
  var a = o[0], u = o[1];
3102
- return i.tt.P(t, e, n, a, u, r);
3102
+ return i.connection.P(t, e, n, a, u, r);
3103
3103
  })).catch((function(t) {
3104
3104
  throw "FirebaseError" === t.name ? (t.code === R && (i.authCredentials.invalidateToken(),
3105
3105
  i.appCheckCredentials.invalidateToken()), t) : new B(P, t.toString());
3106
3106
  }));
3107
3107
  }, n.prototype.terminate = function() {
3108
- this.et = !0;
3108
+ this.tt = !0;
3109
3109
  }, n;
3110
3110
  }((function() {}));
3111
3111
 
@@ -3142,7 +3142,7 @@ function nn(t, r) {
3142
3142
  return n(this, (function(n) {
3143
3143
  switch (n.label) {
3144
3144
  case 0:
3145
- return e = A(t), i = Ke(e.L) + "/documents", o = {
3145
+ return e = A(t), i = Ge(e.L) + "/documents", o = {
3146
3146
  writes: r.map((function(t) {
3147
3147
  return function(t, e) {
3148
3148
  var n;
@@ -3150,11 +3150,11 @@ function nn(t, r) {
3150
3150
  update: Qe(t, e.key, e.value)
3151
3151
  }; else if (e instanceof Ne) n = {
3152
3152
  delete: Be(t, e.key)
3153
- }; else if (e instanceof Oe) n = {
3153
+ }; else if (e instanceof Fe) n = {
3154
3154
  update: Qe(t, e.key, e.data),
3155
3155
  updateMask: Je(e.fieldMask)
3156
3156
  }; else {
3157
- if (!(e instanceof Fe)) return k();
3157
+ if (!(e instanceof Oe)) return S();
3158
3158
  n = {
3159
3159
  verify: Be(t, e.key)
3160
3160
  };
@@ -3166,13 +3166,13 @@ function nn(t, r) {
3166
3166
  fieldPath: e.field.canonicalString(),
3167
3167
  setToServerValue: "REQUEST_TIME"
3168
3168
  };
3169
- if (n instanceof Se) return {
3169
+ if (n instanceof ke) return {
3170
3170
  fieldPath: e.field.canonicalString(),
3171
3171
  appendMissingElements: {
3172
3172
  values: n.elements
3173
3173
  }
3174
3174
  };
3175
- if (n instanceof ke) return {
3175
+ if (n instanceof Se) return {
3176
3176
  fieldPath: e.field.canonicalString(),
3177
3177
  removeAllFromArray: {
3178
3178
  values: n.elements
@@ -3182,14 +3182,14 @@ function nn(t, r) {
3182
3182
  fieldPath: e.field.canonicalString(),
3183
3183
  increment: n.M
3184
3184
  };
3185
- throw k();
3185
+ throw S();
3186
3186
  }(0, t);
3187
3187
  }))), e.precondition.isNone || (n.currentDocument = function(t, e) {
3188
3188
  return void 0 !== e.updateTime ? {
3189
3189
  updateTime: je(t, e.updateTime)
3190
3190
  } : void 0 !== e.exists ? {
3191
3191
  exists: e.exists
3192
- } : k();
3192
+ } : S();
3193
3193
  }(t, e.precondition)), n;
3194
3194
  }(e.L, t);
3195
3195
  }))
@@ -3208,7 +3208,7 @@ function rn(t, r) {
3208
3208
  return n(this, (function(n) {
3209
3209
  switch (n.label) {
3210
3210
  case 0:
3211
- return e = A(t), i = Ke(e.L) + "/documents", o = {
3211
+ return e = A(t), i = Ge(e.L) + "/documents", o = {
3212
3212
  documents: r.map((function(t) {
3213
3213
  return Be(e.L, t);
3214
3214
  }))
@@ -3229,7 +3229,7 @@ function rn(t, r) {
3229
3229
  I(!!e.missing), I(!!e.readTime);
3230
3230
  var n = ze(t, e.missing), r = Me(e.readTime);
3231
3231
  return $t.newNoDocument(n, r);
3232
- }(t, e) : k();
3232
+ }(t, e) : S();
3233
3233
  }(e.L, t);
3234
3234
  u.set(n.key.toString(), n);
3235
3235
  })), s = [], [ 2 /*return*/ , (r.forEach((function(t) {
@@ -3363,7 +3363,7 @@ var on = new Map;
3363
3363
  }), t.prototype._setSettings = function(t) {
3364
3364
  if (this._settingsFrozen) throw new B(L, "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.");
3365
3365
  this._settings = new un(t), void 0 !== t.credentials && (this._authCredentials = function(t) {
3366
- if (!t) return new K;
3366
+ if (!t) return new G;
3367
3367
  switch (t.type) {
3368
3368
  case "gapi":
3369
3369
  var e = t.client;
@@ -3475,7 +3475,7 @@ function ln(t, e) {
3475
3475
  if (!s) throw new B(D, "mockUserToken must contain 'sub' or 'user_id' field!");
3476
3476
  u = new v(s);
3477
3477
  }
3478
- t._authCredentials = new Q(new G(a, u));
3478
+ t._authCredentials = new Q(new K(a, u));
3479
3479
  }
3480
3480
  }
3481
3481
 
@@ -3586,7 +3586,7 @@ var pn = function() {
3586
3586
  },
3587
3587
  parent: n.parent
3588
3588
  };
3589
- }(e.L, be(r)), o = i.parent, e.tt.v || delete i.parent, [ 4 /*yield*/ , e.P("RunAggregationQuery", o, i, /*expectedResponseCount=*/ 1) ];
3589
+ }(e.L, be(r)), o = i.parent, e.connection.v || delete i.parent, [ 4 /*yield*/ , e.P("RunAggregationQuery", o, i, /*expectedResponseCount=*/ 1) ];
3590
3590
 
3591
3591
  case 1:
3592
3592
  return [ 2 /*return*/ , n.sent().filter((function(t) {
@@ -3824,7 +3824,7 @@ function En(t, e) {
3824
3824
  */;
3825
3825
  }
3826
3826
 
3827
- var Sn = /** @class */ function() {
3827
+ var kn = /** @class */ function() {
3828
3828
  /** @hideconstructor */
3829
3829
  function t(t) {
3830
3830
  this._byteString = t;
@@ -3882,7 +3882,7 @@ var Sn = /** @class */ function() {
3882
3882
  t.prototype.isEqual = function(t) {
3883
3883
  return this._byteString.isEqual(t._byteString);
3884
3884
  }, t;
3885
- }(), kn = /** @class */ function() {
3885
+ }(), Sn = /** @class */ function() {
3886
3886
  /**
3887
3887
  * Creates a `FieldPath` from the provided field names. If more than one field
3888
3888
  * name is provided, the path will point to a nested field in a document.
@@ -3933,7 +3933,7 @@ var Sn = /** @class */ function() {
3933
3933
  * It can be used in queries to sort or filter by the document ID.
3934
3934
  */
3935
3935
  function In() {
3936
- return new kn("__name__");
3936
+ return new Sn("__name__");
3937
3937
  }
3938
3938
 
3939
3939
  /**
@@ -4020,16 +4020,16 @@ function(t) {
4020
4020
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
4021
4021
  }
4022
4022
  return t.prototype.toMutation = function(t, e) {
4023
- return null !== this.fieldMask ? new Oe(t, this.data, this.fieldMask, e, this.fieldTransforms) : new De(t, this.data, e, this.fieldTransforms);
4023
+ return null !== this.fieldMask ? new Fe(t, this.data, this.fieldMask, e, this.fieldTransforms) : new De(t, this.data, e, this.fieldTransforms);
4024
4024
  }, t;
4025
- }(), On = /** @class */ function() {
4025
+ }(), Fn = /** @class */ function() {
4026
4026
  function t(t,
4027
4027
  // The fieldMask does not include document transforms.
4028
4028
  e, n) {
4029
4029
  this.data = t, this.fieldMask = e, this.fieldTransforms = n;
4030
4030
  }
4031
4031
  return t.prototype.toMutation = function(t, e) {
4032
- return new Oe(t, this.data, this.fieldMask, e, this.fieldTransforms);
4032
+ return new Fe(t, this.data, this.fieldMask, e, this.fieldTransforms);
4033
4033
  }, t;
4034
4034
  }();
4035
4035
 
@@ -4069,11 +4069,11 @@ function(t) {
4069
4069
  return !1;
4070
4070
 
4071
4071
  default:
4072
- throw k();
4072
+ throw S();
4073
4073
  }
4074
4074
  }
4075
4075
 
4076
- /** A "context" object passed around while parsing user data. */ var Fn = /** @class */ function() {
4076
+ /** A "context" object passed around while parsing user data. */ var On = /** @class */ function() {
4077
4077
  /**
4078
4078
  * Initializes a ParseContext with the given source and path.
4079
4079
  *
@@ -4096,7 +4096,7 @@ function(t) {
4096
4096
  this.settings = t, this.databaseId = e, this.L = n, this.ignoreUndefinedProperties = r,
4097
4097
  // Minor hack: If fieldTransforms is undefined, we assume this is an
4098
4098
  // external call and we need to validate the entire path.
4099
- void 0 === i && this.rt(), this.fieldTransforms = i || [], this.fieldMask = o || [];
4099
+ void 0 === i && this.nt(), this.fieldTransforms = i || [], this.fieldMask = o || [];
4100
4100
  }
4101
4101
  return Object.defineProperty(t.prototype, "path", {
4102
4102
  get: function() {
@@ -4104,36 +4104,36 @@ function(t) {
4104
4104
  },
4105
4105
  enumerable: !1,
4106
4106
  configurable: !0
4107
- }), Object.defineProperty(t.prototype, "st", {
4107
+ }), Object.defineProperty(t.prototype, "rt", {
4108
4108
  get: function() {
4109
- return this.settings.st;
4109
+ return this.settings.rt;
4110
4110
  },
4111
4111
  enumerable: !1,
4112
4112
  configurable: !0
4113
4113
  }),
4114
- /** Returns a new context with the specified settings overwritten. */ t.prototype.it = function(e) {
4114
+ /** Returns a new context with the specified settings overwritten. */ t.prototype.st = function(e) {
4115
4115
  return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.L, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
4116
- }, t.prototype.ot = function(t) {
4117
- var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.it({
4116
+ }, t.prototype.it = function(t) {
4117
+ var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.st({
4118
4118
  path: n,
4119
- ut: !1
4119
+ ot: !1
4120
4120
  });
4121
- return r.ct(t), r;
4122
- }, t.prototype.at = function(t) {
4123
- var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.it({
4121
+ return r.ut(t), r;
4122
+ }, t.prototype.ct = function(t) {
4123
+ var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.st({
4124
4124
  path: n,
4125
- ut: !1
4125
+ ot: !1
4126
4126
  });
4127
- return r.rt(), r;
4128
- }, t.prototype.ht = function(t) {
4127
+ return r.nt(), r;
4128
+ }, t.prototype.at = function(t) {
4129
4129
  // TODO(b/34871131): We don't support array paths right now; so make path
4130
4130
  // undefined.
4131
- return this.it({
4131
+ return this.st({
4132
4132
  path: void 0,
4133
- ut: !0
4133
+ ot: !0
4134
4134
  });
4135
- }, t.prototype.lt = function(t) {
4136
- return $n(t, this.settings.methodName, this.settings.ft || !1, this.path, this.settings.dt);
4135
+ }, t.prototype.ht = function(t) {
4136
+ return $n(t, this.settings.methodName, this.settings.lt || !1, this.path, this.settings.ft);
4137
4137
  },
4138
4138
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ t.prototype.contains = function(t) {
4139
4139
  return void 0 !== this.fieldMask.find((function(e) {
@@ -4141,27 +4141,27 @@ function(t) {
4141
4141
  })) || void 0 !== this.fieldTransforms.find((function(e) {
4142
4142
  return t.isPrefixOf(e.field);
4143
4143
  }));
4144
- }, t.prototype.rt = function() {
4144
+ }, t.prototype.nt = function() {
4145
4145
  // TODO(b/34871131): Remove null check once we have proper paths for fields
4146
4146
  // within arrays.
4147
- if (this.path) for (var t = 0; t < this.path.length; t++) this.ct(this.path.get(t));
4148
- }, t.prototype.ct = function(t) {
4149
- if (0 === t.length) throw this.lt("Document fields must not be empty");
4150
- if (Nn(this.st) && Pn.test(t)) throw this.lt('Document fields cannot begin and end with "__"');
4147
+ if (this.path) for (var t = 0; t < this.path.length; t++) this.ut(this.path.get(t));
4148
+ }, t.prototype.ut = function(t) {
4149
+ if (0 === t.length) throw this.ht("Document fields must not be empty");
4150
+ if (Nn(this.rt) && Pn.test(t)) throw this.ht('Document fields cannot begin and end with "__"');
4151
4151
  }, t;
4152
4152
  }(), Rn = /** @class */ function() {
4153
4153
  function t(t, e, n) {
4154
4154
  this.databaseId = t, this.ignoreUndefinedProperties = e, this.L = n || $e(t)
4155
4155
  /** Creates a new top-level parse context. */;
4156
4156
  }
4157
- return t.prototype.wt = function(t, e, n, r) {
4158
- return void 0 === r && (r = !1), new Fn({
4159
- st: t,
4157
+ return t.prototype.dt = function(t, e, n, r) {
4158
+ return void 0 === r && (r = !1), new On({
4159
+ rt: t,
4160
4160
  methodName: e,
4161
- dt: n,
4161
+ ft: n,
4162
4162
  path: rt.emptyPath(),
4163
- ut: !1,
4164
- ft: r
4163
+ ot: !1,
4164
+ lt: r
4165
4165
  }, this.databaseId, this.L, this.ignoreUndefinedProperties);
4166
4166
  }, t;
4167
4167
  }();
@@ -4176,16 +4176,16 @@ function(t) {
4176
4176
 
4177
4177
  /** Parse document data from a set() call. */ function Ln(t, e, n, r, i, o) {
4178
4178
  void 0 === o && (o = {});
4179
- var a = t.wt(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
4179
+ var a = t.dt(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
4180
4180
  Hn("Data must be an object, but it was:", a, r);
4181
4181
  var u, s, c = Wn(r, a);
4182
- if (o.merge) u = new Ot(a.fieldMask), s = a.fieldTransforms; else if (o.mergeFields) {
4182
+ if (o.merge) u = new Ft(a.fieldMask), s = a.fieldTransforms; else if (o.mergeFields) {
4183
4183
  for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
4184
4184
  var p = Xn(e, h[f], n);
4185
4185
  if (!a.contains(p)) throw new B(D, "Field '" + p + "' is specified in your field mask but missing from your input data.");
4186
4186
  tr(l, p) || l.push(p);
4187
4187
  }
4188
- u = new Ot(l), s = a.fieldTransforms.filter((function(t) {
4188
+ u = new Ft(l), s = a.fieldTransforms.filter((function(t) {
4189
4189
  return u.covers(t.field);
4190
4190
  }));
4191
4191
  } else u = null, s = a.fieldTransforms;
@@ -4197,7 +4197,7 @@ var xn = /** @class */ function(e) {
4197
4197
  return null !== e && e.apply(this, arguments) || this;
4198
4198
  }
4199
4199
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4200
- if (2 /* MergeSet */ !== t.st) throw 1 /* Update */ === t.st ? t.lt(this._methodName + "() can only appear at the top level of your update data") : t.lt(this._methodName + "() cannot be used with set() unless you pass {merge:true}");
4200
+ if (2 /* MergeSet */ !== t.rt) throw 1 /* Update */ === t.rt ? t.ht(this._methodName + "() can only appear at the top level of your update data") : t.ht(this._methodName + "() cannot be used with set() unless you pass {merge:true}");
4201
4201
  // No transform to add for a delete, but we need to add it to our
4202
4202
  // fieldMask so it gets deleted.
4203
4203
  return t.fieldMask.push(t.path), null;
@@ -4222,11 +4222,11 @@ var xn = /** @class */ function(e) {
4222
4222
  * @param context - The parent context.
4223
4223
  * @param arrayElement - Whether or not the FieldValue has an array.
4224
4224
  */ function Cn(t, e, n) {
4225
- return new Fn({
4226
- st: 3 /* Argument */ ,
4227
- dt: e.settings.dt,
4225
+ return new On({
4226
+ rt: 3 /* Argument */ ,
4227
+ ft: e.settings.ft,
4228
4228
  methodName: t._methodName,
4229
- ut: n
4229
+ ot: n
4230
4230
  }, e.databaseId, e.L, e.ignoreUndefinedProperties);
4231
4231
  }
4232
4232
 
@@ -4242,13 +4242,13 @@ var jn = /** @class */ function(e) {
4242
4242
  }(An), Mn = /** @class */ function(e) {
4243
4243
  function n(t, n) {
4244
4244
  var r = this;
4245
- return (r = e.call(this, t) || this).yt = n, r;
4245
+ return (r = e.call(this, t) || this).wt = n, r;
4246
4246
  }
4247
4247
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4248
4248
  var e = Cn(this, t,
4249
- /*array=*/ !0), n = this.yt.map((function(t) {
4249
+ /*array=*/ !0), n = this.wt.map((function(t) {
4250
4250
  return Qn(t, e);
4251
- })), r = new Se(n);
4251
+ })), r = new ke(n);
4252
4252
  return new Ae(t.path, r);
4253
4253
  }, n.prototype.isEqual = function(t) {
4254
4254
  // TODO(mrschmidt): Implement isEquals
@@ -4257,13 +4257,13 @@ var jn = /** @class */ function(e) {
4257
4257
  }(An), Un = /** @class */ function(e) {
4258
4258
  function n(t, n) {
4259
4259
  var r = this;
4260
- return (r = e.call(this, t) || this).yt = n, r;
4260
+ return (r = e.call(this, t) || this).wt = n, r;
4261
4261
  }
4262
4262
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4263
4263
  var e = Cn(this, t,
4264
- /*array=*/ !0), n = this.yt.map((function(t) {
4264
+ /*array=*/ !0), n = this.wt.map((function(t) {
4265
4265
  return Qn(t, e);
4266
- })), r = new ke(n);
4266
+ })), r = new Se(n);
4267
4267
  return new Ae(t.path, r);
4268
4268
  }, n.prototype.isEqual = function(t) {
4269
4269
  // TODO(mrschmidt): Implement isEquals
@@ -4272,10 +4272,10 @@ var jn = /** @class */ function(e) {
4272
4272
  }(An), Bn = /** @class */ function(e) {
4273
4273
  function n(t, n) {
4274
4274
  var r = this;
4275
- return (r = e.call(this, t) || this)._t = n, r;
4275
+ return (r = e.call(this, t) || this).yt = n, r;
4276
4276
  }
4277
4277
  return t(n, e), n.prototype._toFieldTransform = function(t) {
4278
- var e = new Ie(t.L, _e(t.L, this._t));
4278
+ var e = new Ie(t.L, _e(t.L, this.yt));
4279
4279
  return new Ae(t.path, e);
4280
4280
  }, n.prototype.isEqual = function(t) {
4281
4281
  // TODO(mrschmidt): Implement isEquals
@@ -4284,15 +4284,15 @@ var jn = /** @class */ function(e) {
4284
4284
  }(An);
4285
4285
 
4286
4286
  /** Parse update data from an update() call. */ function zn(t, e, n, r) {
4287
- var i = t.wt(1 /* Update */ , e, n);
4287
+ var i = t.dt(1 /* Update */ , e, n);
4288
4288
  Hn("Data must be an object, but it was:", i, r);
4289
4289
  var o = [], a = Zt.empty();
4290
- kt(r, (function(t, r) {
4290
+ St(r, (function(t, r) {
4291
4291
  var u = Zn(e, t, n);
4292
4292
  // For Compat types, we have to "extract" the underlying types before
4293
4293
  // performing validation.
4294
4294
  r = p(r);
4295
- var s = i.at(u);
4295
+ var s = i.ct(u);
4296
4296
  if (r instanceof xn)
4297
4297
  // Add it to the field mask, but don't add anything to updateData.
4298
4298
  o.push(u); else {
@@ -4300,12 +4300,12 @@ var jn = /** @class */ function(e) {
4300
4300
  null != c && (o.push(u), a.set(u, c));
4301
4301
  }
4302
4302
  }));
4303
- var u = new Ot(o);
4304
- return new On(a, u, i.fieldTransforms);
4303
+ var u = new Ft(o);
4304
+ return new Fn(a, u, i.fieldTransforms);
4305
4305
  }
4306
4306
 
4307
- /** Parse update data from a list of field/value arguments. */ function Gn(t, e, n, r, i, o) {
4308
- var a = t.wt(1 /* Update */ , e, n), u = [ Xn(e, r, n) ], s = [ i ];
4307
+ /** Parse update data from a list of field/value arguments. */ function Kn(t, e, n, r, i, o) {
4308
+ var a = t.dt(1 /* Update */ , e, n), u = [ Xn(e, r, n) ], s = [ i ];
4309
4309
  if (o.length % 2 != 0) throw new B(D, "Function " + e + "() needs to be called with an even number of arguments that alternate between field names and values.");
4310
4310
  for (var c = 0; c < o.length; c += 2) u.push(Xn(e, o[c])), s.push(o[c + 1]);
4311
4311
  // We iterate in reverse order to pick the last value for a field if the
@@ -4315,7 +4315,7 @@ var jn = /** @class */ function(e) {
4315
4315
  // For Compat types, we have to "extract" the underlying types before
4316
4316
  // performing validation.
4317
4317
  y = p(y);
4318
- var m = a.at(d);
4318
+ var m = a.ct(d);
4319
4319
  if (y instanceof xn)
4320
4320
  // Add it to the field mask, but don't add anything to updateData.
4321
4321
  l.push(d); else {
@@ -4323,8 +4323,8 @@ var jn = /** @class */ function(e) {
4323
4323
  null != v && (l.push(d), f.set(d, v));
4324
4324
  }
4325
4325
  }
4326
- var g = new Ot(l);
4327
- return new On(f, g, a.fieldTransforms);
4326
+ var g = new Ft(l);
4327
+ return new Fn(f, g, a.fieldTransforms);
4328
4328
  }
4329
4329
 
4330
4330
  /**
@@ -4333,8 +4333,8 @@ var jn = /** @class */ function(e) {
4333
4333
  *
4334
4334
  * @param allowArrays - Whether the query value is an array that may directly
4335
4335
  * contain additional arrays (e.g. the operand of an `in` query).
4336
- */ function Kn(t, e, n, r) {
4337
- return void 0 === r && (r = !1), Qn(n, t.wt(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
4336
+ */ function Gn(t, e, n, r) {
4337
+ return void 0 === r && (r = !1), Qn(n, t.dt(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
4338
4338
  }
4339
4339
 
4340
4340
  /**
@@ -4362,8 +4362,8 @@ var jn = /** @class */ function(e) {
4362
4362
  */
4363
4363
  return function(t, e) {
4364
4364
  // Sentinels are only supported with writes, and not within arrays.
4365
- if (!Nn(e.st)) throw e.lt(t._methodName + "() can only be used with update() and set()");
4366
- if (!e.path) throw e.lt(t._methodName + "() is not currently supported inside arrays");
4365
+ if (!Nn(e.rt)) throw e.ht(t._methodName + "() can only be used with update() and set()");
4366
+ if (!e.path) throw e.ht(t._methodName + "() is not currently supported inside arrays");
4367
4367
  var n = t._toFieldTransform(e);
4368
4368
  n && e.fieldTransforms.push(n);
4369
4369
  }(t, e), null;
@@ -4382,10 +4382,10 @@ var jn = /** @class */ function(e) {
4382
4382
  // the set of values to be included for the IN query) that may directly
4383
4383
  // contain additional arrays (each representing an individual field
4384
4384
  // value), so we disable this validation.
4385
- if (e.settings.ut && 4 /* ArrayArgument */ !== e.st) throw e.lt("Nested arrays are not supported");
4385
+ if (e.settings.ot && 4 /* ArrayArgument */ !== e.rt) throw e.ht("Nested arrays are not supported");
4386
4386
  return function(t, e) {
4387
4387
  for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
4388
- var a = Qn(o[i], e.ht(r));
4388
+ var a = Qn(o[i], e.at(r));
4389
4389
  null == a && (
4390
4390
  // Just include nulls in the array for fields being replaced with a
4391
4391
  // sentinel.
@@ -4432,17 +4432,17 @@ var jn = /** @class */ function(e) {
4432
4432
  longitude: t.longitude
4433
4433
  }
4434
4434
  };
4435
- if (t instanceof Sn) return {
4435
+ if (t instanceof kn) return {
4436
4436
  bytesValue: Ce(e.L, t._byteString)
4437
4437
  };
4438
4438
  if (t instanceof mn) {
4439
4439
  var i = e.databaseId, o = t.firestore._databaseId;
4440
- if (!o.isEqual(i)) throw e.lt("Document reference is for database " + o.projectId + "/" + o.database + " but should be for database " + i.projectId + "/" + i.database);
4440
+ if (!o.isEqual(i)) throw e.ht("Document reference is for database " + o.projectId + "/" + o.database + " but should be for database " + i.projectId + "/" + i.database);
4441
4441
  return {
4442
4442
  referenceValue: Ue(t.firestore._databaseId || e.databaseId, t._key.path)
4443
4443
  };
4444
4444
  }
4445
- throw e.lt("Unsupported field value: " + st(t));
4445
+ throw e.ht("Unsupported field value: " + st(t));
4446
4446
  }(t, e);
4447
4447
  }
4448
4448
 
@@ -4454,8 +4454,8 @@ function Wn(t, e) {
4454
4454
  }(t) ?
4455
4455
  // If we encounter an empty object, we explicitly add it to the update
4456
4456
  // mask to ensure that the server creates a map entry.
4457
- e.path && e.path.length > 0 && e.fieldMask.push(e.path) : kt(t, (function(t, r) {
4458
- var i = Qn(r, e.ot(t));
4457
+ e.path && e.path.length > 0 && e.fieldMask.push(e.path) : St(t, (function(t, r) {
4458
+ var i = Qn(r, e.it(t));
4459
4459
  null != i && (n[t] = i);
4460
4460
  })), {
4461
4461
  mapValue: {
@@ -4465,7 +4465,7 @@ function Wn(t, e) {
4465
4465
  }
4466
4466
 
4467
4467
  function Yn(t) {
4468
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof Tt || t instanceof Vn || t instanceof Sn || t instanceof mn || t instanceof An);
4468
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof Tt || t instanceof Vn || t instanceof kn || t instanceof mn || t instanceof An);
4469
4469
  }
4470
4470
 
4471
4471
  function Hn(t, e, n) {
@@ -4473,7 +4473,7 @@ function Hn(t, e, n) {
4473
4473
  return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
4474
4474
  }(n)) {
4475
4475
  var r = st(n);
4476
- throw "an object" === r ? e.lt(t + " a custom object") : e.lt(t + " " + r);
4476
+ throw "an object" === r ? e.ht(t + " a custom object") : e.ht(t + " " + r);
4477
4477
  }
4478
4478
  }
4479
4479
 
@@ -4483,7 +4483,7 @@ function Hn(t, e, n) {
4483
4483
  if (
4484
4484
  // If required, replace the FieldPath Compat class with with the firestore-exp
4485
4485
  // FieldPath.
4486
- (e = p(e)) instanceof kn) return e._internalPath;
4486
+ (e = p(e)) instanceof Sn) return e._internalPath;
4487
4487
  if ("string" == typeof e) return Zn(t, e);
4488
4488
  throw $n("Field path arguments must be of type string or ", t,
4489
4489
  /* hasConverter= */ !1,
@@ -4507,7 +4507,7 @@ function Hn(t, e, n) {
4507
4507
  /* hasConverter= */ !1,
4508
4508
  /* path= */ void 0, n);
4509
4509
  try {
4510
- return (new (kn.bind.apply(kn, r([ void 0 ], e.split(".")))))._internalPath;
4510
+ return (new (Sn.bind.apply(Sn, r([ void 0 ], e.split(".")))))._internalPath;
4511
4511
  } catch (r) {
4512
4512
  throw $n("Invalid field path (" + e + "). Paths must not be empty, begin with '.', end with '.', or contain '..'", t,
4513
4513
  /* hasConverter= */ !1,
@@ -4698,7 +4698,7 @@ function ir(t, e) {
4698
4698
  }
4699
4699
 
4700
4700
  function or(t, e) {
4701
- return "string" == typeof e ? Zn(t, e) : e instanceof kn ? e._internalPath : e._delegate._internalPath;
4701
+ return "string" == typeof e ? Zn(t, e) : e instanceof Sn ? e._internalPath : e._delegate._internalPath;
4702
4702
  }
4703
4703
 
4704
4704
  /**
@@ -4746,7 +4746,7 @@ function or(t, e) {
4746
4746
  var sr = /** @class */ function(e) {
4747
4747
  function n(t, n, r) {
4748
4748
  var i = this;
4749
- return (i = e.call(this) || this).gt = t, i.vt = n, i.bt = r, i.type = "where",
4749
+ return (i = e.call(this) || this)._t = t, i.gt = n, i.vt = r, i.type = "where",
4750
4750
  i;
4751
4751
  }
4752
4752
  return t(n, e), n.prototype._apply = function(t) {
@@ -4767,7 +4767,7 @@ var sr = /** @class */ function(e) {
4767
4767
  };
4768
4768
  } else u = Tr(r, t, a);
4769
4769
  } else "in" /* IN */ !== o && "not-in" /* NOT_IN */ !== o && "array-contains-any" /* ARRAY_CONTAINS_ANY */ !== o || Er(a, o),
4770
- u = Kn(n, "where", a,
4770
+ u = Gn(n, "where", a,
4771
4771
  /* allowArrays= */ "in" /* IN */ === o || "not-in" /* NOT_IN */ === o);
4772
4772
  var h = ne.create(i, o, u);
4773
4773
  return function(t, e) {
@@ -4775,7 +4775,7 @@ var sr = /** @class */ function(e) {
4775
4775
  var n = ve(t);
4776
4776
  if (null !== n && !n.isEqual(e.field)) throw new B(D, "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() + "'");
4777
4777
  var r = me(t);
4778
- null !== r && Sr(t, e.field, r);
4778
+ null !== r && kr(t, e.field, r);
4779
4779
  }
4780
4780
  var i = function(t, e) {
4781
4781
  for (var n = 0, r = t.filters; n < r.length; n++) {
@@ -4821,7 +4821,7 @@ var sr = /** @class */ function(e) {
4821
4821
  // Special case when it's a duplicate op to give a slightly clearer error message.
4822
4822
  throw i === e.op ? new B(D, "Invalid query. You cannot use more than one '" + e.op.toString() + "' filter.") : new B(D, "Invalid query. You cannot use '" + e.op.toString() + "' filters with '" + i.toString() + "' filters.");
4823
4823
  }(t, h), h;
4824
- }(t._query, 0, e, t.firestore._databaseId, this.gt, this.vt, this.bt);
4824
+ }(t._query, 0, e, t.firestore._databaseId, this._t, this.gt, this.vt);
4825
4825
  return new vn(t.firestore, t.converter, function(t, e) {
4826
4826
  var n = t.filters.concat([ e ]);
4827
4827
  return new ye(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
@@ -4847,7 +4847,7 @@ var sr = /** @class */ function(e) {
4847
4847
  var lr = /** @class */ function(e) {
4848
4848
  function n(t, n) {
4849
4849
  var r = this;
4850
- return (r = e.call(this) || this).gt = t, r.Et = n, r.type = "orderBy", r;
4850
+ return (r = e.call(this) || this)._t = t, r.bt = n, r.type = "orderBy", r;
4851
4851
  }
4852
4852
  return t(n, e), n.prototype._apply = function(t) {
4853
4853
  var e = function(t, e, n) {
@@ -4858,10 +4858,10 @@ var lr = /** @class */ function(e) {
4858
4858
  if (null === me(t)) {
4859
4859
  // This is the first order by. It must match any inequality.
4860
4860
  var n = ve(t);
4861
- null !== n && Sr(t, n, e.field);
4861
+ null !== n && kr(t, n, e.field);
4862
4862
  }
4863
4863
  }(t, r), r;
4864
- }(t._query, this.gt, this.Et);
4864
+ }(t._query, this._t, this.bt);
4865
4865
  return new vn(t.firestore, t.converter, function(t, e) {
4866
4866
  // TODO(dimond): validate that orderBy does not list the same key twice.
4867
4867
  var n = t.explicitOrderBy.concat([ e ]);
@@ -4887,12 +4887,12 @@ var lr = /** @class */ function(e) {
4887
4887
  var hr = /** @class */ function(e) {
4888
4888
  function n(t, n, r) {
4889
4889
  var i = this;
4890
- return (i = e.call(this) || this).type = t, i.It = n, i.Tt = r, i;
4890
+ return (i = e.call(this) || this).type = t, i.Et = n, i.It = r, i;
4891
4891
  }
4892
4892
  return t(n, e), n.prototype._apply = function(t) {
4893
4893
  return new vn(t.firestore, t.converter, function(t, e, n) {
4894
4894
  return new ye(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
4895
- }(t._query, this.It, this.Tt));
4895
+ }(t._query, this.Et, this.It));
4896
4896
  }, n;
4897
4897
  }(ar);
4898
4898
 
@@ -4921,10 +4921,10 @@ function dr(t) {
4921
4921
  var yr = /** @class */ function(e) {
4922
4922
  function n(t, n, r) {
4923
4923
  var i = this;
4924
- return (i = e.call(this) || this).type = t, i.At = n, i.Rt = r, i;
4924
+ return (i = e.call(this) || this).type = t, i.Tt = n, i.At = r, i;
4925
4925
  }
4926
4926
  return t(n, e), n.prototype._apply = function(t) {
4927
- var e = _r(t, this.type, this.At, this.Rt);
4927
+ var e = _r(t, this.type, this.Tt, this.At);
4928
4928
  return new vn(t.firestore, t.converter, function(t, e) {
4929
4929
  return new ye(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
4930
4930
  }(t._query, e));
@@ -4946,10 +4946,10 @@ function vr() {
4946
4946
  var gr = /** @class */ function(e) {
4947
4947
  function n(t, n, r) {
4948
4948
  var i = this;
4949
- return (i = e.call(this) || this).type = t, i.At = n, i.Rt = r, i;
4949
+ return (i = e.call(this) || this).type = t, i.Tt = n, i.At = r, i;
4950
4950
  }
4951
4951
  return t(n, e), n.prototype._apply = function(t) {
4952
- var e = _r(t, this.type, this.At, this.Rt);
4952
+ var e = _r(t, this.type, this.Tt, this.At);
4953
4953
  return new vn(t.firestore, t.converter, function(t, e) {
4954
4954
  return new ye(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
4955
4955
  }(t._query, e));
@@ -5006,7 +5006,7 @@ function br() {
5006
5006
  var f = new it(l);
5007
5007
  u.push(Qt(e, f));
5008
5008
  } else {
5009
- var h = Kn(n, r, c);
5009
+ var h = Gn(n, r, c);
5010
5010
  u.push(h);
5011
5011
  }
5012
5012
  }
@@ -5034,7 +5034,7 @@ function Tr(t, e, n) {
5034
5034
  if (t.length > 10) throw new B(D, "Invalid Query. '" + e.toString() + "' filters support a maximum of 10 elements in the value array.");
5035
5035
  }
5036
5036
 
5037
- function Sr(t, e, n) {
5037
+ function kr(t, e, n) {
5038
5038
  if (!n.isEqual(e)) throw new B(D, "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.");
5039
5039
  }
5040
5040
 
@@ -5084,7 +5084,7 @@ function Sr(t, e, n) {
5084
5084
  * because we want to provide the user with a more specific error message if
5085
5085
  * their `set()` or fails due to invalid data originating from a `toFirestore()`
5086
5086
  * call.
5087
- */ function kr(t, e, n) {
5087
+ */ function Sr(t, e, n) {
5088
5088
  // Cast to `any` in order to satisfy the union type constraint on
5089
5089
  // toFirestore().
5090
5090
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -5097,7 +5097,7 @@ var Ir = /** @class */ function(e) {
5097
5097
  return (n = e.call(this) || this).firestore = t, n;
5098
5098
  }
5099
5099
  return t(n, e), n.prototype.convertBytes = function(t) {
5100
- return new Sn(t);
5100
+ return new kn(t);
5101
5101
  }, n.prototype.convertReference = function(t) {
5102
5102
  var e = this.convertDocumentKey(t, this.firestore._databaseId);
5103
5103
  return new mn(this.firestore, /* converter= */ null, e);
@@ -5140,11 +5140,11 @@ var Ir = /** @class */ function(e) {
5140
5140
  return this.convertObject(t.mapValue, e);
5141
5141
 
5142
5142
  default:
5143
- throw k();
5143
+ throw S();
5144
5144
  }
5145
5145
  }, t.prototype.convertObject = function(t, e) {
5146
5146
  var n = this, r = {};
5147
- return kt(t.fields, (function(t, i) {
5147
+ return St(t.fields, (function(t, i) {
5148
5148
  r[t] = n.convertValue(i, e);
5149
5149
  })), r;
5150
5150
  }, t.prototype.convertGeoPoint = function(t) {
@@ -5256,7 +5256,7 @@ var Ir = /** @class */ function(e) {
5256
5256
  }
5257
5257
 
5258
5258
  function Pr(t, e, n) {
5259
- var r = kr((t = ct(t, mn)).converter, e, n), i = Ln(qn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
5259
+ var r = Sr((t = ct(t, mn)).converter, e, n), i = Ln(qn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
5260
5260
  return nn(an(t.firestore), [ i.toMutation(t._key, Ve.none()) ]);
5261
5261
  }
5262
5262
 
@@ -5265,7 +5265,7 @@ function Dr(t, e, n) {
5265
5265
  var o, a = qn((t = ct(t, mn)).firestore);
5266
5266
  // For Compat types, we have to "extract" the underlying types before
5267
5267
  // performing validation.
5268
- return o = "string" == typeof (e = p(e)) || e instanceof kn ? Gn(a, "updateDoc", t._key, e, n, r) : zn(a, "updateDoc", t._key, e),
5268
+ return o = "string" == typeof (e = p(e)) || e instanceof Sn ? Kn(a, "updateDoc", t._key, e, n, r) : zn(a, "updateDoc", t._key, e),
5269
5269
  nn(an(t.firestore), [ o.toMutation(t._key, Ve.exists(!0)) ]);
5270
5270
  }
5271
5271
 
@@ -5280,7 +5280,7 @@ function Dr(t, e, n) {
5280
5280
  * @param reference - A reference to the document to delete.
5281
5281
  * @returns A `Promise` resolved once the document has been successfully
5282
5282
  * deleted from the backend.
5283
- */ function Or(t) {
5283
+ */ function Fr(t) {
5284
5284
  return nn(an((t = ct(t, mn)).firestore), [ new Ne(t._key, Ve.none()) ]);
5285
5285
  }
5286
5286
 
@@ -5299,7 +5299,7 @@ function Dr(t, e, n) {
5299
5299
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
5300
5300
  * newly created document after it has been written to the backend.
5301
5301
  */ function Nr(t, e) {
5302
- var n = _n(t = ct(t, gn)), r = kr(t.converter, e), i = Ln(qn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5302
+ var n = _n(t = ct(t, gn)), r = Sr(t.converter, e), i = Ln(qn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
5303
5303
  return nn(an(t.firestore), [ i.toMutation(n._key, Ve.exists(!1)) ]).then((function() {
5304
5304
  return n;
5305
5305
  }));
@@ -5334,7 +5334,7 @@ function Dr(t, e, n) {
5334
5334
  * @returns A Promise that will be resolved with the count; the count can be
5335
5335
  * retrieved from `snapshot.data().count`, where `snapshot` is the
5336
5336
  * `AggregateQuerySnapshot` to which the returned Promise resolves.
5337
- */ function Fr(t) {
5337
+ */ function Or(t) {
5338
5338
  var e = ct(t.firestore, sn), n = an(e), r = new Ir(e);
5339
5339
  return new yn(t, n, r).run();
5340
5340
  }
@@ -5472,7 +5472,7 @@ function Dr(t, e, n) {
5472
5472
  }
5473
5473
  return t.prototype.set = function(t, e, n) {
5474
5474
  this._verifyNotCommitted();
5475
- var r = Ur(t, this._firestore), i = kr(r.converter, e, n), o = Ln(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
5475
+ var r = Ur(t, this._firestore), i = Sr(r.converter, e, n), o = Ln(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
5476
5476
  return this._mutations.push(o.toMutation(r._key, Ve.none())), this;
5477
5477
  }, t.prototype.update = function(t, e, n) {
5478
5478
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
@@ -5480,7 +5480,7 @@ function Dr(t, e, n) {
5480
5480
  var o, a = Ur(t, this._firestore);
5481
5481
  // For Compat types, we have to "extract" the underlying types before
5482
5482
  // performing validation.
5483
- return o = "string" == typeof (e = p(e)) || e instanceof kn ? Gn(this._dataReader, "WriteBatch.update", a._key, e, n, r) : zn(this._dataReader, "WriteBatch.update", a._key, e),
5483
+ return o = "string" == typeof (e = p(e)) || e instanceof Sn ? Kn(this._dataReader, "WriteBatch.update", a._key, e, n, r) : zn(this._dataReader, "WriteBatch.update", a._key, e),
5484
5484
  this._mutations.push(o.toMutation(a._key, Ve.exists(!0))), this;
5485
5485
  },
5486
5486
  /**
@@ -5617,7 +5617,7 @@ function Ur(t, e) {
5617
5617
  // a `verify` operation.
5618
5618
  t.forEach((function(t, n) {
5619
5619
  var r = it.fromPath(n);
5620
- e.mutations.push(new Fe(r, e.precondition(r)));
5620
+ e.mutations.push(new Oe(r, e.precondition(r)));
5621
5621
  })), [ 4 /*yield*/ , nn(this.datastore, this.mutations) ];
5622
5622
 
5623
5623
  case 1:
@@ -5629,7 +5629,7 @@ function Ur(t, e) {
5629
5629
  }, t.prototype.recordVersion = function(t) {
5630
5630
  var e;
5631
5631
  if (t.isFoundDocument()) e = t.version; else {
5632
- if (!t.isNoDocument()) throw k();
5632
+ if (!t.isNoDocument()) throw S();
5633
5633
  // Represent a deleted doc using SnapshotVersion.min().
5634
5634
  e = Et.min();
5635
5635
  }
@@ -5676,37 +5676,37 @@ function Ur(t, e) {
5676
5676
  }, t.prototype.write = function(t) {
5677
5677
  this.ensureCommitNotCalled(), this.mutations.push(t);
5678
5678
  }, t.prototype.ensureCommitNotCalled = function() {}, t;
5679
- }(), Gr = {
5679
+ }(), Kr = {
5680
5680
  maxAttempts: 5
5681
- }, Kr = /** @class */ function() {
5681
+ }, Gr = /** @class */ function() {
5682
5682
  function t(t, e, n, r, i) {
5683
5683
  this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = r,
5684
- this.deferred = i, this.Pt = n.maxAttempts, this.Vt = new tn(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
5684
+ this.deferred = i, this.Rt = n.maxAttempts, this.Pt = new tn(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
5685
5685
  /** Runs the transaction and sets the result on deferred. */;
5686
5686
  }
5687
5687
  return t.prototype.run = function() {
5688
- this.Pt -= 1, this.Nt();
5689
- }, t.prototype.Nt = function() {
5688
+ this.Rt -= 1, this.Vt();
5689
+ }, t.prototype.Vt = function() {
5690
5690
  var t = this;
5691
- this.Vt.J((function() {
5691
+ this.Pt.J((function() {
5692
5692
  return e(t, void 0, void 0, (function() {
5693
5693
  var t, e, r = this;
5694
5694
  return n(this, (function(n) {
5695
- return t = new zr(this.datastore), (e = this.Dt(t)) && e.then((function(e) {
5695
+ return t = new zr(this.datastore), (e = this.Nt(t)) && e.then((function(e) {
5696
5696
  r.asyncQueue.enqueueAndForget((function() {
5697
5697
  return t.commit().then((function() {
5698
5698
  r.deferred.resolve(e);
5699
5699
  })).catch((function(t) {
5700
- r.$t(t);
5700
+ r.Dt(t);
5701
5701
  }));
5702
5702
  }));
5703
5703
  })).catch((function(t) {
5704
- r.$t(t);
5704
+ r.Dt(t);
5705
5705
  })), [ 2 /*return*/ ];
5706
5706
  }));
5707
5707
  }));
5708
5708
  }));
5709
- }, t.prototype.Dt = function(t) {
5709
+ }, t.prototype.Nt = function(t) {
5710
5710
  try {
5711
5711
  var e = this.updateFunction(t);
5712
5712
  return !ft(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
@@ -5715,12 +5715,12 @@ function Ur(t, e) {
5715
5715
  // Do not retry errors thrown by user provided updateFunction.
5716
5716
  return this.deferred.reject(t), null;
5717
5717
  }
5718
- }, t.prototype.$t = function(t) {
5718
+ }, t.prototype.Dt = function(t) {
5719
5719
  var e = this;
5720
- this.Pt > 0 && this.xt(t) ? (this.Pt -= 1, this.asyncQueue.enqueueAndForget((function() {
5721
- return e.Nt(), Promise.resolve();
5720
+ this.Rt > 0 && this.$t(t) ? (this.Rt -= 1, this.asyncQueue.enqueueAndForget((function() {
5721
+ return e.Vt(), Promise.resolve();
5722
5722
  }))) : this.deferred.reject(t);
5723
- }, t.prototype.xt = function(t) {
5723
+ }, t.prototype.$t = function(t) {
5724
5724
  if ("FirebaseError" === t.name) {
5725
5725
  // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
5726
5726
  // non-matching document versions with ABORTED. These errors should be retried.
@@ -5735,11 +5735,11 @@ function Ur(t, e) {
5735
5735
  function(t) {
5736
5736
  switch (t) {
5737
5737
  default:
5738
- return k();
5738
+ return S();
5739
5739
 
5740
5740
  case V:
5741
5741
  case P:
5742
- case O:
5742
+ case F:
5743
5743
  case q:
5744
5744
  case M:
5745
5745
  case U:
@@ -5751,7 +5751,7 @@ function Ur(t, e) {
5751
5751
  case D:
5752
5752
  case N:
5753
5753
  case "already-exists":
5754
- case F:
5754
+ case O:
5755
5755
  case L:
5756
5756
  // Aborted might be retried in some scenarios, but that is dependant on
5757
5757
  // the context and should handled individually by the calling code.
@@ -5900,40 +5900,40 @@ function Ur(t, e) {
5900
5900
  function t() {
5901
5901
  var t = this;
5902
5902
  // The last promise in the queue.
5903
- this.Ft = Promise.resolve(),
5903
+ this.xt = Promise.resolve(),
5904
5904
  // A list of retryable operations. Retryable operations are run in order and
5905
5905
  // retried with backoff.
5906
- this.St = [],
5906
+ this.Ft = [],
5907
5907
  // Is this AsyncQueue being shut down? Once it is set to true, it will not
5908
5908
  // be changed again.
5909
- this.qt = !1,
5909
+ this.St = !1,
5910
5910
  // Operations scheduled to be queued in the future. Operations are
5911
5911
  // automatically removed after they are run or canceled.
5912
- this.Ot = [],
5912
+ this.qt = [],
5913
5913
  // visible for testing
5914
- this.kt = null,
5914
+ this.Ot = null,
5915
5915
  // Flag set while there's an outstanding AsyncQueue operation, used for
5916
5916
  // assertion sanity-checks.
5917
- this.Ct = !1,
5917
+ this.kt = !1,
5918
5918
  // Enabled during shutdown on Safari to prevent future access to IndexedDB.
5919
- this.Lt = !1,
5919
+ this.Ct = !1,
5920
5920
  // List of TimerIds to fast-forward delays for.
5921
- this.Mt = [],
5921
+ this.Lt = [],
5922
5922
  // Backoff timer used to schedule retries for retryable operations
5923
- this.Vt = new tn(this, "async_queue_retry" /* AsyncQueueRetry */),
5923
+ this.Pt = new tn(this, "async_queue_retry" /* AsyncQueueRetry */),
5924
5924
  // Visibility handler that triggers an immediate retry of all retryable
5925
5925
  // operations. Meant to speed up recovery when we regain file system access
5926
5926
  // after page comes into foreground.
5927
- this.Ut = function() {
5927
+ this.Mt = function() {
5928
5928
  var e = Qr();
5929
- e && _("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.Vt.Z();
5929
+ e && _("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.Pt.Z();
5930
5930
  };
5931
5931
  var e = Qr();
5932
- e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Ut);
5932
+ e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Mt);
5933
5933
  }
5934
5934
  return Object.defineProperty(t.prototype, "isShuttingDown", {
5935
5935
  get: function() {
5936
- return this.qt;
5936
+ return this.St;
5937
5937
  },
5938
5938
  enumerable: !1,
5939
5939
  configurable: !0
@@ -5946,53 +5946,53 @@ function Ur(t, e) {
5946
5946
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
5947
5947
  this.enqueue(t);
5948
5948
  }, t.prototype.enqueueAndForgetEvenWhileRestricted = function(t) {
5949
- this.jt(),
5949
+ this.Ut(),
5950
5950
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
5951
- this.Bt(t);
5951
+ this.jt(t);
5952
5952
  }, t.prototype.enterRestrictedMode = function(t) {
5953
- if (!this.qt) {
5954
- this.qt = !0, this.Lt = t || !1;
5953
+ if (!this.St) {
5954
+ this.St = !0, this.Ct = t || !1;
5955
5955
  var e = Qr();
5956
- e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Ut);
5956
+ e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Mt);
5957
5957
  }
5958
5958
  }, t.prototype.enqueue = function(t) {
5959
5959
  var e = this;
5960
- if (this.jt(), this.qt)
5960
+ if (this.Ut(), this.St)
5961
5961
  // Return a Promise which never resolves.
5962
5962
  return new Promise((function() {}));
5963
5963
  // Create a deferred Promise that we can return to the callee. This
5964
5964
  // allows us to return a "hanging Promise" only to the callee and still
5965
5965
  // advance the queue even when the operation is not run.
5966
5966
  var n = new z;
5967
- return this.Bt((function() {
5968
- return e.qt && e.Lt ? Promise.resolve() : (t().then(n.resolve, n.reject), n.promise);
5967
+ return this.jt((function() {
5968
+ return e.St && e.Ct ? Promise.resolve() : (t().then(n.resolve, n.reject), n.promise);
5969
5969
  })).then((function() {
5970
5970
  return n.promise;
5971
5971
  }));
5972
5972
  }, t.prototype.enqueueRetryable = function(t) {
5973
5973
  var e = this;
5974
5974
  this.enqueueAndForget((function() {
5975
- return e.St.push(t), e.Qt();
5975
+ return e.Ft.push(t), e.Bt();
5976
5976
  }));
5977
5977
  },
5978
5978
  /**
5979
5979
  * Runs the next operation from the retryable queue. If the operation fails,
5980
5980
  * reschedules with backoff.
5981
5981
  */
5982
- t.prototype.Qt = function() {
5982
+ t.prototype.Bt = function() {
5983
5983
  return e(this, void 0, void 0, (function() {
5984
5984
  var t, e = this;
5985
5985
  return n(this, (function(n) {
5986
5986
  switch (n.label) {
5987
5987
  case 0:
5988
- if (0 === this.St.length) return [ 3 /*break*/ , 5 ];
5988
+ if (0 === this.Ft.length) return [ 3 /*break*/ , 5 ];
5989
5989
  n.label = 1;
5990
5990
 
5991
5991
  case 1:
5992
- return n.trys.push([ 1, 3, , 4 ]), [ 4 /*yield*/ , this.St[0]() ];
5992
+ return n.trys.push([ 1, 3, , 4 ]), [ 4 /*yield*/ , this.Ft[0]() ];
5993
5993
 
5994
5994
  case 2:
5995
- return n.sent(), this.St.shift(), this.Vt.reset(), [ 3 /*break*/ , 4 ];
5995
+ return n.sent(), this.Ft.shift(), this.Pt.reset(), [ 3 /*break*/ , 4 ];
5996
5996
 
5997
5997
  case 3:
5998
5998
  if (t = n.sent(), "IndexedDbTransactionError" !== t.name) throw t;
@@ -6001,7 +6001,7 @@ function Ur(t, e) {
6001
6001
  [ 3 /*break*/ , 4 ];
6002
6002
 
6003
6003
  case 4:
6004
- this.St.length > 0 &&
6004
+ this.Ft.length > 0 &&
6005
6005
  // If there are additional operations, we re-schedule `retryNextOp()`.
6006
6006
  // This is necessary to run retryable operations that failed during
6007
6007
  // their initial attempt since we don't know whether they are already
@@ -6012,8 +6012,8 @@ function Ur(t, e) {
6012
6012
  // Since `backoffAndRun()` cancels an existing backoff and schedules a
6013
6013
  // new backoff on every call, there is only ever a single additional
6014
6014
  // operation in the queue.
6015
- this.Vt.J((function() {
6016
- return e.Qt();
6015
+ this.Pt.J((function() {
6016
+ return e.Bt();
6017
6017
  })), n.label = 5;
6018
6018
 
6019
6019
  case 5:
@@ -6021,10 +6021,10 @@ function Ur(t, e) {
6021
6021
  }
6022
6022
  }));
6023
6023
  }));
6024
- }, t.prototype.Bt = function(t) {
6025
- var e = this, n = this.Ft.then((function() {
6026
- return e.Ct = !0, t().catch((function(t) {
6027
- e.kt = t, e.Ct = !1;
6024
+ }, t.prototype.jt = function(t) {
6025
+ var e = this, n = this.xt.then((function() {
6026
+ return e.kt = !0, t().catch((function(t) {
6027
+ e.Ot = t, e.kt = !1;
6028
6028
  var n =
6029
6029
  /**
6030
6030
  * Chrome includes Error.message in Error.stack. Other browsers do not.
@@ -6041,39 +6041,39 @@ function Ur(t, e) {
6041
6041
  // and return the rejected Promise.
6042
6042
  throw T("INTERNAL UNHANDLED ERROR: ", n), t;
6043
6043
  })).then((function(t) {
6044
- return e.Ct = !1, t;
6044
+ return e.kt = !1, t;
6045
6045
  }));
6046
6046
  }));
6047
- return this.Ft = n, n;
6047
+ return this.xt = n, n;
6048
6048
  }, t.prototype.enqueueAfterDelay = function(t, e, n) {
6049
6049
  var r = this;
6050
- this.jt(),
6050
+ this.Ut(),
6051
6051
  // Fast-forward delays for timerIds that have been overriden.
6052
- this.Mt.indexOf(t) > -1 && (e = 0);
6052
+ this.Lt.indexOf(t) > -1 && (e = 0);
6053
6053
  var i = Wr.createAndSchedule(this, t, e, n, (function(t) {
6054
- return r.zt(t);
6054
+ return r.Qt(t);
6055
6055
  }));
6056
- return this.Ot.push(i), i;
6057
- }, t.prototype.jt = function() {
6058
- this.kt && k();
6056
+ return this.qt.push(i), i;
6057
+ }, t.prototype.Ut = function() {
6058
+ this.Ot && S();
6059
6059
  }, t.prototype.verifyOperationInProgress = function() {},
6060
6060
  /**
6061
6061
  * Waits until all currently queued tasks are finished executing. Delayed
6062
6062
  * operations are not run.
6063
6063
  */
6064
- t.prototype.Gt = function() {
6064
+ t.prototype.zt = function() {
6065
6065
  return e(this, void 0, void 0, (function() {
6066
6066
  var t;
6067
6067
  return n(this, (function(e) {
6068
6068
  switch (e.label) {
6069
6069
  case 0:
6070
- return [ 4 /*yield*/ , t = this.Ft ];
6070
+ return [ 4 /*yield*/ , t = this.xt ];
6071
6071
 
6072
6072
  case 1:
6073
6073
  e.sent(), e.label = 2;
6074
6074
 
6075
6075
  case 2:
6076
- if (t !== this.Ft) return [ 3 /*break*/ , 0 ];
6076
+ if (t !== this.xt) return [ 3 /*break*/ , 0 ];
6077
6077
  e.label = 3;
6078
6078
 
6079
6079
  case 3:
@@ -6086,8 +6086,8 @@ function Ur(t, e) {
6086
6086
  * For Tests: Determine if a delayed operation with a particular TimerId
6087
6087
  * exists.
6088
6088
  */
6089
- t.prototype.Wt = function(t) {
6090
- for (var e = 0, n = this.Ot; e < n.length; e++) {
6089
+ t.prototype.Gt = function(t) {
6090
+ for (var e = 0, n = this.qt; e < n.length; e++) {
6091
6091
  if (n[e].timerId === t) return !0;
6092
6092
  }
6093
6093
  return !1;
@@ -6099,31 +6099,31 @@ function Ur(t, e) {
6099
6099
  * will be drained. Pass TimerId.All to run all delayed operations.
6100
6100
  * @returns a Promise that resolves once all operations have been run.
6101
6101
  */
6102
- t.prototype.Kt = function(t) {
6102
+ t.prototype.Wt = function(t) {
6103
6103
  var e = this;
6104
6104
  // Note that draining may generate more delayed ops, so we do that first.
6105
- return this.Gt().then((function() {
6105
+ return this.zt().then((function() {
6106
6106
  // Run ops in the same order they'd run if they ran naturally.
6107
- e.Ot.sort((function(t, e) {
6107
+ e.qt.sort((function(t, e) {
6108
6108
  return t.targetTimeMs - e.targetTimeMs;
6109
6109
  }));
6110
- for (var n = 0, r = e.Ot; n < r.length; n++) {
6110
+ for (var n = 0, r = e.qt; n < r.length; n++) {
6111
6111
  var i = r[n];
6112
6112
  if (i.skipDelay(), "all" /* All */ !== t && i.timerId === t) break;
6113
6113
  }
6114
- return e.Gt();
6114
+ return e.zt();
6115
6115
  }));
6116
6116
  },
6117
6117
  /**
6118
6118
  * For Tests: Skip all subsequent delays for a timer id.
6119
6119
  */
6120
- t.prototype.Yt = function(t) {
6121
- this.Mt.push(t);
6120
+ t.prototype.Kt = function(t) {
6121
+ this.Lt.push(t);
6122
6122
  },
6123
- /** Called once a DelayedOperation is run or canceled. */ t.prototype.zt = function(t) {
6123
+ /** Called once a DelayedOperation is run or canceled. */ t.prototype.Qt = function(t) {
6124
6124
  // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.
6125
- var e = this.Ot.indexOf(t);
6126
- this.Ot.splice(e, 1);
6125
+ var e = this.qt.indexOf(t);
6126
+ this.qt.splice(e, 1);
6127
6127
  }, t;
6128
6128
  }(), Hr = /** @class */ function() {
6129
6129
  /** @hideconstructor */
@@ -6139,21 +6139,21 @@ function Ur(t, e) {
6139
6139
  return t.prototype.get = function(t) {
6140
6140
  var e = this, n = Ur(t, this._firestore), r = new Ir(this._firestore);
6141
6141
  return this._transaction.lookup([ n._key ]).then((function(t) {
6142
- if (!t || 1 !== t.length) return k();
6142
+ if (!t || 1 !== t.length) return S();
6143
6143
  var i = t[0];
6144
6144
  if (i.isFoundDocument()) return new er(e._firestore, r, i.key, i, n.converter);
6145
6145
  if (i.isNoDocument()) return new er(e._firestore, r, n._key, null, n.converter);
6146
- throw k();
6146
+ throw S();
6147
6147
  }));
6148
6148
  }, t.prototype.set = function(t, e, n) {
6149
- var r = Ur(t, this._firestore), i = kr(r.converter, e, n), o = Ln(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
6149
+ var r = Ur(t, this._firestore), i = Sr(r.converter, e, n), o = Ln(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
6150
6150
  return this._transaction.set(r._key, o), this;
6151
6151
  }, t.prototype.update = function(t, e, n) {
6152
6152
  for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
6153
6153
  var o, a = Ur(t, this._firestore);
6154
6154
  // For Compat types, we have to "extract" the underlying types before
6155
6155
  // performing validation.
6156
- return o = "string" == typeof (e = p(e)) || e instanceof kn ? Gn(this._dataReader, "Transaction.update", a._key, e, n, r) : zn(this._dataReader, "Transaction.update", a._key, e),
6156
+ return o = "string" == typeof (e = p(e)) || e instanceof Sn ? Kn(this._dataReader, "Transaction.update", a._key, e, n, r) : zn(this._dataReader, "Transaction.update", a._key, e),
6157
6157
  this._transaction.update(a._key, o), this;
6158
6158
  },
6159
6159
  /**
@@ -6204,12 +6204,12 @@ function Ur(t, e) {
6204
6204
  * rejected promise with the corresponding failure error is returned.
6205
6205
  */
6206
6206
  function Xr(t, e, n) {
6207
- var r = an(t = ct(t, sn)), i = Object.assign(Object.assign({}, Gr), n);
6207
+ var r = an(t = ct(t, sn)), i = Object.assign(Object.assign({}, Kr), n);
6208
6208
  !function(t) {
6209
6209
  if (t.maxAttempts < 1) throw new B(D, "Max attempts must be at least 1");
6210
6210
  }(i);
6211
6211
  var o = new z;
6212
- return new Kr(new Yr, r, i, (function(n) {
6212
+ return new Gr(new Yr, r, i, (function(n) {
6213
6213
  return e(new Hr(t, n));
6214
6214
  }), o).run(), o.promise
6215
6215
  /**
@@ -6230,7 +6230,7 @@ g = i + "_lite", o(new c("firestore/lite", (function(t, e) {
6230
6230
  return r && o._setSettings(r), o;
6231
6231
  }), "PUBLIC").setMultipleInstances(!0)),
6232
6232
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
6233
- a("firestore-lite", "3.7.1", ""), a("firestore-lite", "3.7.1", "esm5");
6233
+ a("firestore-lite", "3.7.2", ""), a("firestore-lite", "3.7.2", "esm5");
6234
6234
 
6235
- export { pn as AggregateField, dn as AggregateQuerySnapshot, Sn as Bytes, gn as CollectionReference, mn as DocumentReference, er as DocumentSnapshot, kn as FieldPath, An as FieldValue, sn as Firestore, B as FirestoreError, Vn as GeoPoint, vn as Query, ar as QueryConstraint, nr as QueryDocumentSnapshot, rr as QuerySnapshot, Tt as Timestamp, Hr as Transaction, Mr as WriteBatch, Nr as addDoc, Rr as aggregateQuerySnapshotEqual, Cr as arrayRemove, xr as arrayUnion, wn as collection, bn as collectionGroup, fn as connectFirestoreEmulator, Or as deleteDoc, qr as deleteField, _n as doc, In as documentId, br as endAt, wr as endBefore, Fr as getCount, Ar as getDoc, Vr as getDocs, ln as getFirestore, jr as increment, cn as initializeFirestore, pr as limit, dr as limitToLast, fr as orderBy, ur as query, En as queryEqual, Tn as refEqual, Xr as runTransaction, Lr as serverTimestamp, Pr as setDoc, b as setLogLevel, ir as snapshotEqual, vr as startAfter, mr as startAt, hn as terminate, Dr as updateDoc, cr as where, Br as writeBatch };
6235
+ export { pn as AggregateField, dn as AggregateQuerySnapshot, kn as Bytes, gn as CollectionReference, mn as DocumentReference, er as DocumentSnapshot, Sn as FieldPath, An as FieldValue, sn as Firestore, B as FirestoreError, Vn as GeoPoint, vn as Query, ar as QueryConstraint, nr as QueryDocumentSnapshot, rr as QuerySnapshot, Tt as Timestamp, Hr as Transaction, Mr as WriteBatch, Nr as addDoc, Rr as aggregateQuerySnapshotEqual, Cr as arrayRemove, xr as arrayUnion, wn as collection, bn as collectionGroup, fn as connectFirestoreEmulator, Fr as deleteDoc, qr as deleteField, _n as doc, In as documentId, br as endAt, wr as endBefore, Or as getCount, Ar as getDoc, Vr as getDocs, ln as getFirestore, jr as increment, cn as initializeFirestore, pr as limit, dr as limitToLast, fr as orderBy, ur as query, En as queryEqual, Tn as refEqual, Xr as runTransaction, Lr as serverTimestamp, Pr as setDoc, b as setLogLevel, ir as snapshotEqual, vr as startAfter, mr as startAt, hn as terminate, Dr as updateDoc, cr as where, Br as writeBatch };
6236
6236
  //# sourceMappingURL=index.browser.esm5.js.map