@firebase/firestore 3.12.1-canary.e642fc7cd → 3.12.1-canary.fe7da7ec3

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.
@@ -70,7 +70,7 @@ O.MOCK_USER = new O("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- var F = "9.22.1-canary.e642fc7cd", P = new l("@firebase/firestore");
73
+ var F = "9.22.1-canary.fe7da7ec3", P = new l("@firebase/firestore");
74
74
 
75
75
  /**
76
76
  * @license
@@ -7471,23 +7471,26 @@ function Ro(t, e) {
7471
7471
  var e = mt(t);
7472
7472
  if (void 0 !== e && !this.en(e)) return !1;
7473
7473
  // Process all equalities first. Equalities can appear out of order.
7474
- for (var n = yt(t), r = 0, i = 0; r < n.length && this.en(n[r]); ++r) ;
7474
+ for (var n = yt(t), r = new Set, i = 0, o = 0; i < n.length && this.en(n[i]); ++i) r = r.add(n[i].fieldPath.canonicalString());
7475
7475
  // If we already have processed all segments, all segments are used to serve
7476
7476
  // the equality filters and we do not need to map any segments to the
7477
7477
  // target's inequality and orderBy clauses.
7478
- if (r === n.length) return !0;
7479
- // If there is an inequality filter, the next segment must match both the
7480
- // filter and the first orderBy clause.
7481
- if (void 0 !== this.Ze) {
7482
- var o = n[r];
7483
- if (!this.nn(this.Ze, o) || !this.sn(this.Ye[i++], o)) return !1;
7484
- ++r;
7478
+ if (i === n.length) return !0;
7479
+ if (void 0 !== this.Ze) {
7480
+ // If there is an inequality filter and the field was not in one of the
7481
+ // equality filters above, the next segment must match both the filter
7482
+ // and the first orderBy clause.
7483
+ if (!r.has(this.Ze.field.canonicalString())) {
7484
+ var u = n[i];
7485
+ if (!this.nn(this.Ze, u) || !this.sn(this.Ye[o++], u)) return !1;
7486
+ }
7487
+ ++i;
7485
7488
  }
7486
7489
  // All remaining segments need to represent the prefix of the target's
7487
7490
  // orderBy.
7488
- for (;r < n.length; ++r) {
7489
- var u = n[r];
7490
- if (i >= this.Ye.length || !this.sn(this.Ye[i++], u)) return !1;
7491
+ for (;i < n.length; ++i) {
7492
+ var a = n[i];
7493
+ if (o >= this.Ye.length || !this.sn(this.Ye[o++], a)) return !1;
7491
7494
  }
7492
7495
  return !0;
7493
7496
  }, t.prototype.en = function(t) {
@@ -18086,22 +18089,22 @@ function Yc(t, e) {
18086
18089
  function Zc(t, e, n, r) {
18087
18090
  var i;
18088
18091
  void 0 === r && (r = {});
18089
- var o = (t = Hc(t, Jc))._getSettings();
18090
- if ("firestore.googleapis.com" !== o.host && o.host !== e && q("Host has been set in both settings() and useEmulator(), emulator host will be used"),
18092
+ var o = (t = Hc(t, Jc))._getSettings(), u = "".concat(e, ":").concat(n);
18093
+ if ("firestore.googleapis.com" !== o.host && o.host !== u && q("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),
18091
18094
  t._setSettings(Object.assign(Object.assign({}, o), {
18092
- host: "".concat(e, ":").concat(n),
18095
+ host: u,
18093
18096
  ssl: !1
18094
18097
  })), r.mockUserToken) {
18095
- var u, a;
18096
- if ("string" == typeof r.mockUserToken) u = r.mockUserToken, a = O.MOCK_USER; else {
18098
+ var a, s;
18099
+ if ("string" == typeof r.mockUserToken) a = r.mockUserToken, s = O.MOCK_USER; else {
18097
18100
  // Let createMockUserToken validate first (catches common mistakes like
18098
18101
  // invalid field "uid" and missing field "sub" / "user_id".)
18099
- u = y(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
18100
- var s = r.mockUserToken.sub || r.mockUserToken.user_id;
18101
- if (!s) throw new Q(K.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
18102
- a = new O(s);
18102
+ a = y(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
18103
+ var c = r.mockUserToken.sub || r.mockUserToken.user_id;
18104
+ if (!c) throw new Q(K.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
18105
+ s = new O(c);
18103
18106
  }
18104
- t._authCredentials = new X(new H(u, a));
18107
+ t._authCredentials = new X(new H(a, s));
18105
18108
  }
18106
18109
  }
18107
18110
 
@@ -22149,9 +22152,9 @@ function Lf(t, e) {
22149
22152
  return r = Object.assign({
22150
22153
  useFetchStreams: xf
22151
22154
  }, r), o._setSettings(r), o;
22152
- }), "PUBLIC").setMultipleInstances(!0)), u(k, "3.12.1-canary.e642fc7cd", void 0),
22155
+ }), "PUBLIC").setMultipleInstances(!0)), u(k, "3.12.1-canary.fe7da7ec3", void 0),
22153
22156
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
22154
- u(k, "3.12.1-canary.e642fc7cd", "esm5");
22157
+ u(k, "3.12.1-canary.fe7da7ec3", "esm5");
22155
22158
 
22156
22159
  export { Rh as AbstractUserDataWriter, Cl as AggregateField, xl as AggregateQuerySnapshot, Nl as Bytes, ll as CACHE_SIZE_UNLIMITED, el as CollectionReference, $c as DocumentReference, jh as DocumentSnapshot, Al as FieldPath, Ol as FieldValue, hl as Firestore, Q as FirestoreError, Fl as GeoPoint, cl as LoadBundleTask, tl as Query, vh as QueryCompositeFilterConstraint, hh as QueryConstraint, Kh as QueryDocumentSnapshot, Dh as QueryEndAtConstraint, dh as QueryFieldFilterConstraint, bh as QueryLimitConstraint, gh as QueryOrderByConstraint, Qh as QuerySnapshot, Th as QueryStartAtConstraint, Gh as SnapshotMetadata, st as Timestamp, Nf as Transaction, Df as WriteBatch, Ue as _DatabaseId, pt as _DocumentKey, nt as _EmptyAppCheckTokenProvider, Y as _EmptyAuthCredentialsProvider, dt as _FieldPath, hi as _TestingHooks, Hc as _cast, G as _debugAssert, ke as _isBase64Available, q as _logWarn, jc as _validateIsNotUsedTogether, uf as addDoc, Uh as aggregateFieldEqual, zh as aggregateQuerySnapshotEqual, yh as and, Pf as arrayRemove, Ff as arrayUnion, qh as average, wl as clearIndexedDbPersistence, nl as collection, rl as collectionGroup, Zc as connectFirestoreEmulator, Bh as count, of as deleteDoc, kf as deleteField, El as disableNetwork, il as doc, kl as documentId, ml as enableIndexedDbPersistence, yl as enableMultiTabIndexedDbPersistence, Il as enableNetwork, xh as endAt, Ch as endBefore, pl as ensureFirestoreConfigured, cf as executeWrite, ff as getAggregateFromServer, hf as getCountFromServer, Yh as getDoc, Jh as getDocFromCache, Zh as getDocFromServer, $h as getDocs, tf as getDocsFromCache, ef as getDocsFromServer, dl as getFirestore, Rf as increment, fl as initializeFirestore, Ih as limit, Eh as limitToLast, Sl as loadBundle, yf as memoryEagerGarbageCollector, wf as memoryLocalCache, gf as memoryLruGarbageCollector, _l as namedQuery, af as onSnapshot, sf as onSnapshotsInSync, mh as or, wh as orderBy, bf as persistentLocalCache, Sf as persistentMultipleTabManager, Tf as persistentSingleTabManager, fh as query, ul as queryEqual, ol as refEqual, Af as runTransaction, Of as serverTimestamp, nf as setDoc, Mf as setIndexConfiguration, V as setLogLevel, Hh as snapshotEqual, _h as startAfter, Sh as startAt, Lh as sum, Tl as terminate, rf as updateDoc, bl as waitForPendingWrites, ph as where, Vf as writeBatch };
22157
22160
  //# sourceMappingURL=index.esm5.js.map