@firebase/firestore 3.1.1 → 3.2.0-canary.477bdef13

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 (44) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/firestore/src/register.d.ts +1 -1
  3. package/dist/firestore/src/remote/persistent_stream.d.ts +5 -1
  4. package/dist/firestore/src/util/async_queue.d.ts +4 -2
  5. package/dist/index.esm2017.js +534 -526
  6. package/dist/index.esm2017.js.map +1 -1
  7. package/dist/index.esm5.js +757 -748
  8. package/dist/index.esm5.js.map +1 -1
  9. package/dist/index.node.cjs.js +7049 -9102
  10. package/dist/index.node.cjs.js.map +1 -1
  11. package/dist/{index.node.cjs.esm2017.js → index.node.mjs} +51 -20
  12. package/dist/index.node.mjs.map +1 -0
  13. package/dist/index.rn.js +534 -526
  14. package/dist/index.rn.js.map +1 -1
  15. package/dist/internal.d.ts +4 -2
  16. package/dist/lite/firestore/src/register.d.ts +1 -1
  17. package/dist/lite/firestore/src/remote/persistent_stream.d.ts +5 -1
  18. package/dist/lite/firestore/src/util/async_queue.d.ts +4 -2
  19. package/dist/lite/index.browser.esm2017.js +2 -2
  20. package/dist/lite/index.browser.esm2017.js.map +1 -1
  21. package/dist/lite/index.browser.esm5.js +2 -2
  22. package/dist/lite/index.browser.esm5.js.map +1 -1
  23. package/dist/lite/index.node.cjs.js +1804 -2261
  24. package/dist/lite/index.node.cjs.js.map +1 -1
  25. package/dist/lite/{index.node.esm2017.js → index.node.mjs} +3 -3
  26. package/dist/lite/index.node.mjs.map +1 -0
  27. package/dist/lite/index.rn.esm2017.js +69 -69
  28. package/dist/lite/index.rn.esm2017.js.map +1 -1
  29. package/dist/lite/internal.d.ts +4 -2
  30. package/dist/lite/packages/firestore/src/register.d.ts +1 -1
  31. package/dist/lite/packages/firestore/src/remote/persistent_stream.d.ts +5 -1
  32. package/dist/lite/packages/firestore/src/util/async_queue.d.ts +4 -2
  33. package/dist/lite/private.d.ts +4 -2
  34. package/dist/packages/firestore/dist/index.esm2017.d.ts +38 -38
  35. package/dist/packages/firestore/src/register.d.ts +1 -1
  36. package/dist/packages/firestore/src/remote/persistent_stream.d.ts +5 -1
  37. package/dist/packages/firestore/src/util/async_queue.d.ts +4 -2
  38. package/dist/private.d.ts +4 -2
  39. package/lite/package.json +1 -1
  40. package/package.json +20 -14
  41. package/dist/index.node.cjs.esm2017.js.map +0 -1
  42. package/dist/lite/firestore/dist/lite/index.node.esm2017.d.ts +0 -1195
  43. package/dist/lite/index.node.esm2017.js.map +0 -1
  44. package/dist/packages/firestore/dist/index.node.cjs.esm2017.d.ts +0 -1844
@@ -66,7 +66,7 @@ l.MOCK_USER = new l("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let f = "9.1.3";
69
+ let f = "9.2.0-canary.477bdef13";
70
70
 
71
71
  /**
72
72
  * @license
@@ -193,14 +193,14 @@ function p(t, ...n) {
193
193
  * given message if it did.
194
194
  *
195
195
  * Messages are stripped in production builds.
196
- */ function v(t, n) {
196
+ */ function b(t, n) {
197
197
  t || g();
198
198
  }
199
199
 
200
200
  /**
201
201
  * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an
202
202
  * instance of `T` before casting.
203
- */ function b(t,
203
+ */ function v(t,
204
204
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
205
205
  n) {
206
206
  return t;
@@ -339,7 +339,7 @@ n) {
339
339
  }));
340
340
  }
341
341
  getToken() {
342
- return this.auth ? this.auth.getToken().then((t => t ? (v("string" == typeof t.accessToken),
342
+ return this.auth ? this.auth.getToken().then((t => t ? (b("string" == typeof t.accessToken),
343
343
  new k(t.accessToken, new l(this.auth.getUid()))) : null)) : Promise.resolve(null);
344
344
  }
345
345
  invalidateToken() {}
@@ -1346,7 +1346,7 @@ class yt {
1346
1346
  return n;
1347
1347
  }
1348
1348
 
1349
- function vt(t, n) {
1349
+ function bt(t, n) {
1350
1350
  for (const e in t) Object.prototype.hasOwnProperty.call(t, e) && n(e, t[e]);
1351
1351
  }
1352
1352
 
@@ -1376,7 +1376,7 @@ function vt(t, n) {
1376
1376
  * If foo is not an object, foo is replaced with an object
1377
1377
  * containing foo
1378
1378
  */
1379
- class bt {
1379
+ class vt {
1380
1380
  constructor(t) {
1381
1381
  this.fields = t,
1382
1382
  // TODO(dimond): validation of FieldMask
@@ -1527,13 +1527,13 @@ const Tt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
1527
1527
  // The json interface (for the browser) will return an iso timestamp string,
1528
1528
  // while the proto js library (for node) will return a
1529
1529
  // google.protobuf.Timestamp instance.
1530
- if (v(!!t), "string" == typeof t) {
1530
+ if (b(!!t), "string" == typeof t) {
1531
1531
  // The date string can have higher precision (nanos) than the Date class
1532
1532
  // (millis), so we do some custom parsing here.
1533
1533
  // Parse the nanos right out of the string.
1534
1534
  let n = 0;
1535
1535
  const e = Tt.exec(t);
1536
- if (v(!!e), e[1]) {
1536
+ if (b(!!e), e[1]) {
1537
1537
  // Pad the fraction out to 9 digits (nanos).
1538
1538
  let t = e[1];
1539
1539
  t = (t + "000000000").substr(0, 9), n = Number(t);
@@ -1831,7 +1831,7 @@ function Ot(t, n) {
1831
1831
  fields: {}
1832
1832
  }
1833
1833
  };
1834
- return vt(t.mapValue.fields, ((t, e) => n.mapValue.fields[t] = kt(e))), n;
1834
+ return bt(t.mapValue.fields, ((t, e) => n.mapValue.fields[t] = kt(e))), n;
1835
1835
  }
1836
1836
  if (t.arrayValue) {
1837
1837
  const n = {
@@ -1946,7 +1946,7 @@ function Ot(t, n) {
1946
1946
  * Modifies `fieldsMap` by adding, replacing or deleting the specified
1947
1947
  * entries.
1948
1948
  */ applyChanges(t, n, e) {
1949
- vt(n, ((n, e) => t[n] = e));
1949
+ bt(n, ((n, e) => t[n] = e));
1950
1950
  for (const n of e) delete t[n];
1951
1951
  }
1952
1952
  clone() {
@@ -2330,7 +2330,7 @@ function hn(t) {
2330
2330
  * which can be different from the order by constraints the user provided (e.g.
2331
2331
  * the SDK and backend always orders by `__name__`).
2332
2332
  */ function ln(t) {
2333
- const n = b(t);
2333
+ const n = v(t);
2334
2334
  if (null === n.D) {
2335
2335
  n.D = [];
2336
2336
  const t = an(n), e = cn(n);
@@ -2355,7 +2355,7 @@ function hn(t) {
2355
2355
  /**
2356
2356
  * Converts this `Query` instance to it's corresponding `Target` representation.
2357
2357
  */ function fn(t) {
2358
- const n = b(t);
2358
+ const n = v(t);
2359
2359
  if (!n.$) if ("F" /* First */ === n.limitType) n.$ = zt(n.path, n.collectionGroup, ln(n), n.filters, n.limit, n.startAt, n.endAt); else {
2360
2360
  // Flip the orderBy directions since we want the last results
2361
2361
  const t = [];
@@ -2503,7 +2503,7 @@ function wn(t, n) {
2503
2503
  * See the License for the specific language governing permissions and
2504
2504
  * limitations under the License.
2505
2505
  */
2506
- /** A field path and the TransformOperation to perform upon it. */ class vn {
2506
+ /** A field path and the TransformOperation to perform upon it. */ class bn {
2507
2507
  constructor(t, n) {
2508
2508
  this.field = t, this.transform = n;
2509
2509
  }
@@ -2513,18 +2513,18 @@ function wn(t, n) {
2513
2513
  * Encodes a precondition for a mutation. This follows the model that the
2514
2514
  * backend accepts with the special case of an explicit "empty" precondition
2515
2515
  * (meaning no precondition).
2516
- */ class bn {
2516
+ */ class vn {
2517
2517
  constructor(t, n) {
2518
2518
  this.updateTime = t, this.exists = n;
2519
2519
  }
2520
2520
  /** Creates a new empty Precondition. */ static none() {
2521
- return new bn;
2521
+ return new vn;
2522
2522
  }
2523
2523
  /** Creates a new Precondition with an exists flag. */ static exists(t) {
2524
- return new bn(void 0, t);
2524
+ return new vn(void 0, t);
2525
2525
  }
2526
2526
  /** Creates a new Precondition based on a version a document exists at. */ static updateTime(t) {
2527
- return new bn(t);
2527
+ return new vn(t);
2528
2528
  }
2529
2529
  /** Returns whether this Precondition is empty. */ get isNone() {
2530
2530
  return void 0 === this.updateTime && void 0 === this.exists;
@@ -2718,7 +2718,7 @@ function Fn(t, n) {
2718
2718
  }
2719
2719
 
2720
2720
  function Sn(t) {
2721
- return v(!!t), _t.fromTimestamp(function(t) {
2721
+ return b(!!t), _t.fromTimestamp(function(t) {
2722
2722
  const n = At(t);
2723
2723
  return new yt(n.seconds, n.nanos);
2724
2724
  }(t));
@@ -2737,11 +2737,11 @@ function xn(t, n) {
2737
2737
  function On(t, n) {
2738
2738
  const e = function(t) {
2739
2739
  const n = K.fromString(t);
2740
- return v(Hn(n)), n;
2740
+ return b(Hn(n)), n;
2741
2741
  }(n);
2742
2742
  if (e.get(1) !== t.databaseId.projectId) throw new U(A, "Tried to deserialize key from different project: " + e.get(1) + " vs " + t.databaseId.projectId);
2743
2743
  if (e.get(3) !== t.databaseId.database) throw new U(A, "Tried to deserialize key from different database: " + e.get(3) + " vs " + t.databaseId.database);
2744
- return new X((v((r = e).length > 4 && "documents" === r.get(4)), r.popFirst(5)));
2744
+ return new X((b((r = e).length > 4 && "documents" === r.get(4)), r.popFirst(5)));
2745
2745
  var r;
2746
2746
  /** Creates a Document proto from key and fields (but no create/update time) */}
2747
2747
 
@@ -2762,7 +2762,7 @@ function Un(t, n, e) {
2762
2762
 
2763
2763
  function jn(t, n) {
2764
2764
  return "found" in n ? function(t, n) {
2765
- v(!!n.found), n.found.name, n.found.updateTime;
2765
+ b(!!n.found), n.found.name, n.found.updateTime;
2766
2766
  const e = On(t, n.found.name), r = Sn(n.found.updateTime), s = new Mt({
2767
2767
  mapValue: {
2768
2768
  fields: n.found.fields
@@ -2770,7 +2770,7 @@ function jn(t, n) {
2770
2770
  });
2771
2771
  return Bt.newFoundDocument(e, r, s);
2772
2772
  }(t, n) : "missing" in n ? function(t, n) {
2773
- v(!!n.missing), v(!!n.readTime);
2773
+ b(!!n.missing), b(!!n.readTime);
2774
2774
  const e = On(t, n.missing), r = Sn(n.readTime);
2775
2775
  return Bt.newNoDocument(e, r);
2776
2776
  }(t, n) : g();
@@ -3108,14 +3108,14 @@ class Jn extends class {} {
3108
3108
  // TODO(firestorexp): Make sure there is only one Datastore instance per
3109
3109
  // firestore-exp client.
3110
3110
  async function Zn(t, n) {
3111
- const e = b(t), r = Ln(e.S) + "/documents", s = {
3111
+ const e = v(t), r = Ln(e.S) + "/documents", s = {
3112
3112
  writes: n.map((t => kn(e.S, t)))
3113
3113
  };
3114
3114
  await e.l("Commit", r, s);
3115
3115
  }
3116
3116
 
3117
3117
  async function Xn(t, n) {
3118
- const e = b(t), r = Ln(e.S) + "/documents", s = {
3118
+ const e = v(t), r = Ln(e.S) + "/documents", s = {
3119
3119
  documents: n.map((t => xn(e.S, t)))
3120
3120
  }, i = await e.v("BatchGetDocuments", r, s), o = new Map;
3121
3121
  i.forEach((t => {
@@ -3125,12 +3125,12 @@ async function Xn(t, n) {
3125
3125
  const u = [];
3126
3126
  return n.forEach((t => {
3127
3127
  const n = o.get(t.toString());
3128
- v(!!n), u.push(n);
3128
+ b(!!n), u.push(n);
3129
3129
  })), u;
3130
3130
  }
3131
3131
 
3132
3132
  async function te(t, n) {
3133
- const e = b(t), r = Mn(e.S, fn(n));
3133
+ const e = v(t), r = Mn(e.S, fn(n));
3134
3134
  return (await e.v("RunQuery", r.parent, {
3135
3135
  structuredQuery: r.structuredQuery
3136
3136
  })).filter((t => !!t.document)).map((t => function(t, n, e) {
@@ -3297,7 +3297,7 @@ class re {
3297
3297
  case "gapi":
3298
3298
  const n = t.client;
3299
3299
  // Make sure this really is a Gapi client.
3300
- return v(!("object" != typeof n || null === n || !n.auth || !n.auth.getAuthHeaderValueForFirstParty)),
3300
+ return b(!("object" != typeof n || null === n || !n.auth || !n.auth.getAuthHeaderValueForFirstParty)),
3301
3301
  new W(n, t.sessionIndex || "0", t.iamToken || null);
3302
3302
 
3303
3303
  case "provider":
@@ -3758,7 +3758,7 @@ function we(t, n, ...e) {
3758
3758
  /**
3759
3759
  * Sentinel values that can be used when writing document fields with `set()`
3760
3760
  * or `update()`.
3761
- */ class ve {
3761
+ */ class be {
3762
3762
  /**
3763
3763
  * @param _methodName - The public API endpoint that returns this class.
3764
3764
  * @hideconstructor
@@ -3790,7 +3790,7 @@ function we(t, n, ...e) {
3790
3790
  *
3791
3791
  * Latitude values are in the range of [-90, 90].
3792
3792
  * Longitude values are in the range of [-180, 180].
3793
- */ class be {
3793
+ */ class ve {
3794
3794
  /**
3795
3795
  * Creates a new immutable `GeoPoint` object with the provided latitude and
3796
3796
  * longitude values.
@@ -3993,19 +3993,19 @@ function Ve(t) {
3993
3993
  Me("Data must be an object, but it was:", o, r);
3994
3994
  const u = je(r, o);
3995
3995
  let c, a;
3996
- if (i.merge) c = new bt(o.fieldMask), a = o.fieldTransforms; else if (i.mergeFields) {
3996
+ if (i.merge) c = new vt(o.fieldMask), a = o.fieldTransforms; else if (i.mergeFields) {
3997
3997
  const t = [];
3998
3998
  for (const r of i.mergeFields) {
3999
3999
  const s = Be(n, r, e);
4000
4000
  if (!o.contains(s)) throw new U(A, `Field '${s}' is specified in your field mask but missing from your input data.`);
4001
4001
  Ge(t, s) || t.push(s);
4002
4002
  }
4003
- c = new bt(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));
4003
+ c = new vt(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));
4004
4004
  } else c = null, a = o.fieldTransforms;
4005
4005
  return new Ie(new Mt(u), c, a);
4006
4006
  }
4007
4007
 
4008
- class De extends ve {
4008
+ class De extends be {
4009
4009
  _toFieldTransform(t) {
4010
4010
  if (2 /* MergeSet */ !== t.X) throw 1 /* Update */ === t.X ? t.ot(`${this._methodName}() can only appear at the top level of your update data`) : t.ot(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
4011
4011
  // No transform to add for a delete, but we need to add it to our
@@ -4041,23 +4041,23 @@ class De extends ve {
4041
4041
  }, n.databaseId, n.S, n.ignoreUndefinedProperties);
4042
4042
  }
4043
4043
 
4044
- class Fe extends ve {
4044
+ class Fe extends be {
4045
4045
  _toFieldTransform(t) {
4046
- return new vn(t.path, new pn);
4046
+ return new bn(t.path, new pn);
4047
4047
  }
4048
4048
  isEqual(t) {
4049
4049
  return t instanceof Fe;
4050
4050
  }
4051
4051
  }
4052
4052
 
4053
- class Se extends ve {
4053
+ class Se extends be {
4054
4054
  constructor(t, n) {
4055
4055
  super(t), this.ht = n;
4056
4056
  }
4057
4057
  _toFieldTransform(t) {
4058
4058
  const n = $e(this, t,
4059
4059
  /*array=*/ !0), e = this.ht.map((t => Ue(t, n))), r = new yn(e);
4060
- return new vn(t.path, r);
4060
+ return new bn(t.path, r);
4061
4061
  }
4062
4062
  isEqual(t) {
4063
4063
  // TODO(mrschmidt): Implement isEquals
@@ -4065,14 +4065,14 @@ class Se extends ve {
4065
4065
  }
4066
4066
  }
4067
4067
 
4068
- class qe extends ve {
4068
+ class qe extends be {
4069
4069
  constructor(t, n) {
4070
4070
  super(t), this.ht = n;
4071
4071
  }
4072
4072
  _toFieldTransform(t) {
4073
4073
  const n = $e(this, t,
4074
4074
  /*array=*/ !0), e = this.ht.map((t => Ue(t, n))), r = new _n(e);
4075
- return new vn(t.path, r);
4075
+ return new bn(t.path, r);
4076
4076
  }
4077
4077
  isEqual(t) {
4078
4078
  // TODO(mrschmidt): Implement isEquals
@@ -4080,13 +4080,13 @@ class qe extends ve {
4080
4080
  }
4081
4081
  }
4082
4082
 
4083
- class xe extends ve {
4083
+ class xe extends be {
4084
4084
  constructor(t, n) {
4085
4085
  super(t), this.lt = n;
4086
4086
  }
4087
4087
  _toFieldTransform(t) {
4088
4088
  const n = new gn(t.S, wn(t.S, this.lt));
4089
- return new vn(t.path, n);
4089
+ return new bn(t.path, n);
4090
4090
  }
4091
4091
  isEqual(t) {
4092
4092
  // TODO(mrschmidt): Implement isEquals
@@ -4098,7 +4098,7 @@ class xe extends ve {
4098
4098
  const s = t.at(1 /* Update */ , n, e);
4099
4099
  Me("Data must be an object, but it was:", s, r);
4100
4100
  const i = [], o = Mt.empty();
4101
- vt(r, ((t, r) => {
4101
+ bt(r, ((t, r) => {
4102
4102
  const u = ze(n, t, e);
4103
4103
  // For Compat types, we have to "extract" the underlying types before
4104
4104
  // performing validation.
@@ -4111,7 +4111,7 @@ class xe extends ve {
4111
4111
  null != t && (i.push(u), o.set(u, t));
4112
4112
  }
4113
4113
  }));
4114
- const u = new bt(i);
4114
+ const u = new vt(i);
4115
4115
  return new Te(o, u, s.fieldTransforms);
4116
4116
  }
4117
4117
 
@@ -4136,7 +4136,7 @@ class xe extends ve {
4136
4136
  null != t && (a.push(n), l.set(n, t));
4137
4137
  }
4138
4138
  }
4139
- const f = new bt(a);
4139
+ const f = new vt(a);
4140
4140
  return new Te(l, f, o.fieldTransforms);
4141
4141
  }
4142
4142
 
@@ -4163,7 +4163,7 @@ class xe extends ve {
4163
4163
  // Unwrap the API type from the Compat SDK. This will return the API type
4164
4164
  // from firestore-exp.
4165
4165
  t = h(t))) return Me("Unsupported field value:", n, t), je(t, n);
4166
- if (t instanceof ve)
4166
+ if (t instanceof be)
4167
4167
  // FieldValues usually parse into transforms (except FieldValue.delete())
4168
4168
  // in which case we do not want to include this field in our parsed data
4169
4169
  // (as doing so will overwrite the field directly prior to the transform
@@ -4246,7 +4246,7 @@ class xe extends ve {
4246
4246
  timestampValue: Dn(n.S, e)
4247
4247
  };
4248
4248
  }
4249
- if (t instanceof be) return {
4249
+ if (t instanceof ve) return {
4250
4250
  geoPointValue: {
4251
4251
  latitude: t.latitude,
4252
4252
  longitude: t.longitude
@@ -4278,7 +4278,7 @@ function je(t, n) {
4278
4278
  return !function(t) {
4279
4279
  for (const n in t) if (Object.prototype.hasOwnProperty.call(t, n)) return !1;
4280
4280
  return !0;
4281
- }(t) ? vt(t, ((t, r) => {
4281
+ }(t) ? bt(t, ((t, r) => {
4282
4282
  const s = Ue(r, n.nt(t));
4283
4283
  null != s && (e[t] = s);
4284
4284
  })) :
@@ -4292,7 +4292,7 @@ function je(t, n) {
4292
4292
  }
4293
4293
 
4294
4294
  function ke(t) {
4295
- return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof yt || t instanceof be || t instanceof ge || t instanceof ae || t instanceof ve);
4295
+ return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof yt || t instanceof ve || t instanceof ge || t instanceof ae || t instanceof be);
4296
4296
  }
4297
4297
 
4298
4298
  function Me(t, n, e) {
@@ -4726,10 +4726,10 @@ class ir extends Xe {
4726
4726
 
4727
4727
  class cr extends Xe {
4728
4728
  constructor(t, n, e) {
4729
- super(), this.type = t, this.vt = n, this.bt = e;
4729
+ super(), this.type = t, this.bt = n, this.vt = e;
4730
4730
  }
4731
4731
  _apply(t) {
4732
- const n = wr(t, this.type, this.vt, this.bt);
4732
+ const n = wr(t, this.type, this.bt, this.vt);
4733
4733
  return new he(t.firestore, t.converter, function(t, n) {
4734
4734
  return new on(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, n, t.endAt);
4735
4735
  }(t._query, n));
@@ -4747,10 +4747,10 @@ function hr(...t) {
4747
4747
 
4748
4748
  class lr extends Xe {
4749
4749
  constructor(t, n, e) {
4750
- super(), this.type = t, this.vt = n, this.bt = e;
4750
+ super(), this.type = t, this.bt = n, this.vt = e;
4751
4751
  }
4752
4752
  _apply(t) {
4753
- const n = wr(t, this.type, this.vt, this.bt);
4753
+ const n = wr(t, this.type, this.bt, this.vt);
4754
4754
  return new he(t.firestore, t.converter, function(t, n) {
4755
4755
  return new on(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, n);
4756
4756
  }(t._query, n));
@@ -4943,12 +4943,12 @@ class gr extends class {
4943
4943
  }
4944
4944
  convertObject(t, n) {
4945
4945
  const e = {};
4946
- return vt(t.fields, ((t, r) => {
4946
+ return bt(t.fields, ((t, r) => {
4947
4947
  e[t] = this.convertValue(r, n);
4948
4948
  })), e;
4949
4949
  }
4950
4950
  convertGeoPoint(t) {
4951
- return new be(Pt(t.latitude), Pt(t.longitude));
4951
+ return new ve(Pt(t.latitude), Pt(t.longitude));
4952
4952
  }
4953
4953
  convertArray(t, n) {
4954
4954
  return (t.values || []).map((t => this.convertValue(t, n)));
@@ -4972,7 +4972,7 @@ class gr extends class {
4972
4972
  }
4973
4973
  convertDocumentKey(t, n) {
4974
4974
  const e = K.fromString(t);
4975
- v(Hn(e));
4975
+ b(Hn(e));
4976
4976
  const r = new H(e.get(1), e.get(3)), s = new X(e.popFirst(5));
4977
4977
  return r.isEqual(n) ||
4978
4978
  // TODO(b/64130202): Somehow support foreign references.
@@ -5004,10 +5004,10 @@ class gr extends class {
5004
5004
  * @param reference - The reference of the document to fetch.
5005
5005
  * @returns A Promise resolved with a `DocumentSnapshot` containing the current
5006
5006
  * document contents.
5007
- */ function vr(t) {
5007
+ */ function br(t) {
5008
5008
  const n = ee((t = st(t, ae)).firestore), e = new gr(t.firestore);
5009
5009
  return Xn(n, [ t._key ]).then((n => {
5010
- v(1 === n.length);
5010
+ b(1 === n.length);
5011
5011
  const r = n[0];
5012
5012
  return new He(t.firestore, e, t._key, r.isFoundDocument() ? r : null, t.converter);
5013
5013
  }));
@@ -5024,7 +5024,7 @@ class gr extends class {
5024
5024
  *
5025
5025
  * @param query - The `Query` to execute.
5026
5026
  * @returns A Promise that will be resolved with the results of the query.
5027
- */ function br(t) {
5027
+ */ function vr(t) {
5028
5028
  !function(t) {
5029
5029
  if (un(t) && 0 === t.explicitOrderBy.length) throw new U(x, "limitToLast() queries require specifying at least one orderBy() clause");
5030
5030
  }((t = st(t, he))._query);
@@ -5041,7 +5041,7 @@ class gr extends class {
5041
5041
 
5042
5042
  function Er(t, n, e) {
5043
5043
  const r = _r((t = st(t, ae)).converter, n, e), s = Ne(Ve(t.firestore), "setDoc", t._key, r, null !== t.converter, e);
5044
- return Zn(ee(t.firestore), [ s.toMutation(t._key, bn.none()) ]);
5044
+ return Zn(ee(t.firestore), [ s.toMutation(t._key, vn.none()) ]);
5045
5045
  }
5046
5046
 
5047
5047
  function Ir(t, n, e, ...r) {
@@ -5050,7 +5050,7 @@ function Ir(t, n, e, ...r) {
5050
5050
  // performing validation.
5051
5051
  let i;
5052
5052
  i = "string" == typeof (n = h(n)) || n instanceof ye ? Ce(s, "updateDoc", t._key, n, e, r) : Oe(s, "updateDoc", t._key, n);
5053
- return Zn(ee(t.firestore), [ i.toMutation(t._key, bn.exists(!0)) ]);
5053
+ return Zn(ee(t.firestore), [ i.toMutation(t._key, vn.exists(!0)) ]);
5054
5054
  }
5055
5055
 
5056
5056
  /**
@@ -5065,7 +5065,7 @@ function Ir(t, n, e, ...r) {
5065
5065
  * @returns A `Promise` resolved once the document has been successfully
5066
5066
  * deleted from the backend.
5067
5067
  */ function Tr(t) {
5068
- return Zn(ee((t = st(t, ae)).firestore), [ new An(t._key, bn.none()) ]);
5068
+ return Zn(ee((t = st(t, ae)).firestore), [ new An(t._key, vn.none()) ]);
5069
5069
  }
5070
5070
 
5071
5071
  /**
@@ -5083,7 +5083,7 @@ function Ir(t, n, e, ...r) {
5083
5083
  * newly created document after it has been written to the backend.
5084
5084
  */ function Ar(t, n) {
5085
5085
  const e = we(t = st(t, le)), r = _r(t.converter, n), s = Ne(Ve(t.firestore), "addDoc", e._key, r, null !== e.converter, {});
5086
- return Zn(ee(t.firestore), [ s.toMutation(e._key, bn.exists(!1)) ]).then((() => e));
5086
+ return Zn(ee(t.firestore), [ s.toMutation(e._key, vn.exists(!1)) ]).then((() => e));
5087
5087
  }
5088
5088
 
5089
5089
  /**
@@ -5203,7 +5203,7 @@ function Ir(t, n, e, ...r) {
5203
5203
  set(t, n, e) {
5204
5204
  this._verifyNotCommitted();
5205
5205
  const r = Fr(t, this._firestore), s = _r(r.converter, n, e), i = Ne(this._dataReader, "WriteBatch.set", r._key, s, null !== r.converter, e);
5206
- return this._mutations.push(i.toMutation(r._key, bn.none())), this;
5206
+ return this._mutations.push(i.toMutation(r._key, vn.none())), this;
5207
5207
  }
5208
5208
  update(t, n, e, ...r) {
5209
5209
  this._verifyNotCommitted();
@@ -5212,7 +5212,7 @@ function Ir(t, n, e, ...r) {
5212
5212
  // performing validation.
5213
5213
  let i;
5214
5214
  return i = "string" == typeof (n = h(n)) || n instanceof ye ? Ce(this._dataReader, "WriteBatch.update", s._key, n, e, r) : Oe(this._dataReader, "WriteBatch.update", s._key, n),
5215
- this._mutations.push(i.toMutation(s._key, bn.exists(!0))), this;
5215
+ this._mutations.push(i.toMutation(s._key, vn.exists(!0))), this;
5216
5216
  }
5217
5217
  /**
5218
5218
  * Deletes the document referred to by the provided {@link DocumentReference}.
@@ -5222,7 +5222,7 @@ function Ir(t, n, e, ...r) {
5222
5222
  */ delete(t) {
5223
5223
  this._verifyNotCommitted();
5224
5224
  const n = Fr(t, this._firestore);
5225
- return this._mutations = this._mutations.concat(new An(n._key, bn.none())), this;
5225
+ return this._mutations = this._mutations.concat(new An(n._key, vn.none())), this;
5226
5226
  }
5227
5227
  /**
5228
5228
  * Commits all of the writes in this write batch as a single atomic unit.
@@ -5354,7 +5354,7 @@ function Fr(t, n) {
5354
5354
  * as a precondition, or no precondition if it was not read.
5355
5355
  */ precondition(t) {
5356
5356
  const n = this.readVersions.get(t.toString());
5357
- return !this.writtenDocs.has(t.toString()) && n ? bn.updateTime(n) : bn.none();
5357
+ return !this.writtenDocs.has(t.toString()) && n ? vn.updateTime(n) : vn.none();
5358
5358
  }
5359
5359
  /**
5360
5360
  * Returns the precondition for a document if the operation is an update.
@@ -5375,11 +5375,11 @@ function Fr(t, n) {
5375
5375
  // transaction.
5376
5376
  throw new U(A, "Can't update a document that doesn't exist.");
5377
5377
  // Document exists, base precondition on document update time.
5378
- return bn.updateTime(n);
5378
+ return vn.updateTime(n);
5379
5379
  }
5380
5380
  // Document was not read, so we just use the preconditions for a blind
5381
5381
  // update.
5382
- return bn.exists(!0);
5382
+ return vn.exists(!0);
5383
5383
  }
5384
5384
  write(t) {
5385
5385
  this.ensureCommitNotCalled(), this.mutations.push(t);
@@ -5927,7 +5927,7 @@ class Ur {
5927
5927
  return n && r._setSettings(n), r;
5928
5928
  }), "PUBLIC" /* PUBLIC */)),
5929
5929
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
5930
- r("firestore-lite", "3.1.1", "rn"), r("firestore-lite", "3.1.1", "esm2017");
5930
+ r("firestore-lite", "3.2.0-canary.477bdef13", "rn"), r("firestore-lite", "3.2.0-canary.477bdef13", "esm2017");
5931
5931
 
5932
- export { ge as Bytes, le as CollectionReference, ae as DocumentReference, He as DocumentSnapshot, ye as FieldPath, ve as FieldValue, se as Firestore, U as FirestoreError, be as GeoPoint, he as Query, Xe as QueryConstraint, Ye as QueryDocumentSnapshot, Ke as QuerySnapshot, yt as Timestamp, Ur as Transaction, $r as WriteBatch, Ar as addDoc, Nr as arrayRemove, Vr as arrayUnion, fe as collection, de as collectionGroup, ue as connectFirestoreEmulator, Tr as deleteDoc, Pr as deleteField, we as doc, _e as documentId, dr as endAt, fr as endBefore, vr as getDoc, br as getDocs, oe as getFirestore, Dr as increment, ie as initializeFirestore, or as limit, ur as limitToLast, sr as orderBy, tr as query, pe as queryEqual, me as refEqual, jr as runTransaction, Rr as serverTimestamp, Er as setDoc, w as setLogLevel, Je as snapshotEqual, hr as startAfter, ar as startAt, ce as terminate, Ir as updateDoc, er as where, Sr as writeBatch };
5932
+ export { ge as Bytes, le as CollectionReference, ae as DocumentReference, He as DocumentSnapshot, ye as FieldPath, be as FieldValue, se as Firestore, U as FirestoreError, ve as GeoPoint, he as Query, Xe as QueryConstraint, Ye as QueryDocumentSnapshot, Ke as QuerySnapshot, yt as Timestamp, Ur as Transaction, $r as WriteBatch, Ar as addDoc, Nr as arrayRemove, Vr as arrayUnion, fe as collection, de as collectionGroup, ue as connectFirestoreEmulator, Tr as deleteDoc, Pr as deleteField, we as doc, _e as documentId, dr as endAt, fr as endBefore, br as getDoc, vr as getDocs, oe as getFirestore, Dr as increment, ie as initializeFirestore, or as limit, ur as limitToLast, sr as orderBy, tr as query, pe as queryEqual, me as refEqual, jr as runTransaction, Rr as serverTimestamp, Er as setDoc, w as setLogLevel, Je as snapshotEqual, hr as startAfter, ar as startAt, ce as terminate, Ir as updateDoc, er as where, Sr as writeBatch };
5933
5933
  //# sourceMappingURL=index.rn.esm2017.js.map