@firebase/firestore 3.4.2-canary.c271d16a9 → 3.4.2-canary.ff2f7d4c8
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.
- package/dist/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/firestore/test/util/helpers.d.ts +4 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.esm2017.js +869 -869
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +1257 -1257
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +2674 -24
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +2675 -25
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1068 -1068
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +8 -8
- package/dist/lite/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/lite/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/lite/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/lite/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/lite/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/lite/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/lite/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/lite/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/lite/firestore/test/util/helpers.d.ts +4 -6
- package/dist/lite/index.browser.esm2017.js +124 -124
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +135 -135
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +2 -2
- package/dist/lite/index.node.cjs.js +11 -12
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +11 -12
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +148 -148
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +2 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +16 -16
- package/dist/lite/packages/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/lite/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/lite/packages/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/lite/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/lite/packages/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/lite/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/lite/packages/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +4 -6
- package/dist/lite/private.d.ts +2 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +105 -105
- package/dist/packages/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/packages/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/packages/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/packages/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/packages/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/packages/firestore/test/util/helpers.d.ts +4 -6
- package/dist/private.d.ts +8 -8
- package/package.json +10 -13
- package/dist/firestore/compat/api/blob.d.ts +0 -29
- package/dist/firestore/compat/api/database.d.ts +0 -228
- package/dist/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/firestore/compat/api/observer.d.ts +0 -29
- package/dist/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/firestore/compat/config.d.ts +0 -28
- package/dist/firestore/compat/index.console.d.ts +0 -42
- package/dist/firestore/compat/index.d.ts +0 -49
- package/dist/firestore/compat/index.node.d.ts +0 -22
- package/dist/firestore/compat/index.rn.d.ts +0 -22
- package/dist/firestore/compat/register-module.d.ts +0 -42
- package/dist/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/lite/firestore/compat/api/blob.d.ts +0 -29
- package/dist/lite/firestore/compat/api/database.d.ts +0 -228
- package/dist/lite/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/lite/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/lite/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/lite/firestore/compat/api/observer.d.ts +0 -29
- package/dist/lite/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/lite/firestore/compat/config.d.ts +0 -28
- package/dist/lite/firestore/compat/index.console.d.ts +0 -42
- package/dist/lite/firestore/compat/index.d.ts +0 -49
- package/dist/lite/firestore/compat/index.node.d.ts +0 -22
- package/dist/lite/firestore/compat/index.rn.d.ts +0 -22
- package/dist/lite/firestore/compat/register-module.d.ts +0 -42
- package/dist/lite/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/lite/packages/firestore/compat/api/blob.d.ts +0 -29
- package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -228
- package/dist/lite/packages/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/lite/packages/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/lite/packages/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/lite/packages/firestore/compat/api/observer.d.ts +0 -29
- package/dist/lite/packages/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/lite/packages/firestore/compat/config.d.ts +0 -28
- package/dist/lite/packages/firestore/compat/index.console.d.ts +0 -42
- package/dist/lite/packages/firestore/compat/index.d.ts +0 -49
- package/dist/lite/packages/firestore/compat/index.node.d.ts +0 -22
- package/dist/lite/packages/firestore/compat/index.rn.d.ts +0 -22
- package/dist/lite/packages/firestore/compat/register-module.d.ts +0 -42
- package/dist/lite/packages/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/lite/src/protos/README.md +0 -2
- package/dist/lite/src/protos/firestore/bundle.proto +0 -121
- package/dist/lite/src/protos/firestore_bundle_proto.ts +0 -93
- package/dist/lite/src/protos/firestore_proto_api.ts +0 -1259
- package/dist/lite/src/protos/google/api/annotations.proto +0 -31
- package/dist/lite/src/protos/google/api/http.proto +0 -370
- package/dist/lite/src/protos/google/firestore/v1/common.proto +0 -84
- package/dist/lite/src/protos/google/firestore/v1/document.proto +0 -151
- package/dist/lite/src/protos/google/firestore/v1/firestore.proto +0 -761
- package/dist/lite/src/protos/google/firestore/v1/query.proto +0 -302
- package/dist/lite/src/protos/google/firestore/v1/write.proto +0 -264
- package/dist/lite/src/protos/google/protobuf/any.proto +0 -155
- package/dist/lite/src/protos/google/protobuf/descriptor.proto +0 -882
- package/dist/lite/src/protos/google/protobuf/empty.proto +0 -52
- package/dist/lite/src/protos/google/protobuf/struct.proto +0 -96
- package/dist/lite/src/protos/google/protobuf/timestamp.proto +0 -137
- package/dist/lite/src/protos/google/protobuf/wrappers.proto +0 -123
- package/dist/lite/src/protos/google/rpc/status.proto +0 -92
- package/dist/lite/src/protos/google/type/latlng.proto +0 -71
- package/dist/lite/src/protos/update.sh +0 -61
- package/dist/packages/firestore/compat/api/blob.d.ts +0 -29
- package/dist/packages/firestore/compat/api/database.d.ts +0 -228
- package/dist/packages/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/packages/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/packages/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/packages/firestore/compat/api/observer.d.ts +0 -29
- package/dist/packages/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/packages/firestore/compat/config.d.ts +0 -28
- package/dist/packages/firestore/compat/index.console.d.ts +0 -42
- package/dist/packages/firestore/compat/index.d.ts +0 -49
- package/dist/packages/firestore/compat/index.node.d.ts +0 -22
- package/dist/packages/firestore/compat/index.rn.d.ts +0 -22
- package/dist/packages/firestore/compat/register-module.d.ts +0 -42
- package/dist/packages/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/src/protos/README.md +0 -2
- package/dist/src/protos/firestore/bundle.proto +0 -121
- package/dist/src/protos/firestore_bundle_proto.ts +0 -93
- package/dist/src/protos/firestore_proto_api.ts +0 -1259
- package/dist/src/protos/google/api/annotations.proto +0 -31
- package/dist/src/protos/google/api/http.proto +0 -370
- package/dist/src/protos/google/firestore/v1/common.proto +0 -84
- package/dist/src/protos/google/firestore/v1/document.proto +0 -151
- package/dist/src/protos/google/firestore/v1/firestore.proto +0 -761
- package/dist/src/protos/google/firestore/v1/query.proto +0 -302
- package/dist/src/protos/google/firestore/v1/write.proto +0 -264
- package/dist/src/protos/google/protobuf/any.proto +0 -155
- package/dist/src/protos/google/protobuf/descriptor.proto +0 -882
- package/dist/src/protos/google/protobuf/empty.proto +0 -52
- package/dist/src/protos/google/protobuf/struct.proto +0 -96
- package/dist/src/protos/google/protobuf/timestamp.proto +0 -137
- package/dist/src/protos/google/protobuf/wrappers.proto +0 -123
- package/dist/src/protos/google/rpc/status.proto +0 -92
- package/dist/src/protos/google/type/latlng.proto +0 -71
- package/dist/src/protos/update.sh +0 -61
|
@@ -4,7 +4,7 @@ import { SDK_VERSION as i, _registerComponent as o, registerVersion as a, _getPr
|
|
|
4
4
|
|
|
5
5
|
import { Component as c } from "@firebase/component";
|
|
6
6
|
|
|
7
|
-
import { Logger as
|
|
7
|
+
import { Logger as f, LogLevel as l } from "@firebase/logger";
|
|
8
8
|
|
|
9
9
|
import { FirebaseError as h, getModularInstance as p, createMockUserToken as d } from "@firebase/util";
|
|
10
10
|
|
|
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
var y = "9.6.2-canary.
|
|
70
|
+
var y = "9.6.2-canary.ff2f7d4c8", v = new f("@firebase/firestore");
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -104,7 +104,7 @@ function g(t) {
|
|
|
104
104
|
|
|
105
105
|
function w(t) {
|
|
106
106
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
107
|
-
if (v.logLevel <=
|
|
107
|
+
if (v.logLevel <= l.DEBUG) {
|
|
108
108
|
var i = e.map(T);
|
|
109
109
|
v.debug.apply(v, r([ "Firestore (" + y + "): " + t ], i));
|
|
110
110
|
}
|
|
@@ -112,7 +112,7 @@ function w(t) {
|
|
|
112
112
|
|
|
113
113
|
function b(t) {
|
|
114
114
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
115
|
-
if (v.logLevel <=
|
|
115
|
+
if (v.logLevel <= l.ERROR) {
|
|
116
116
|
var i = e.map(T);
|
|
117
117
|
v.error.apply(v, r([ "Firestore (" + y + "): " + t ], i));
|
|
118
118
|
}
|
|
@@ -122,7 +122,7 @@ function b(t) {
|
|
|
122
122
|
* @internal
|
|
123
123
|
*/ function _(t) {
|
|
124
124
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
125
|
-
if (v.logLevel <=
|
|
125
|
+
if (v.logLevel <= l.WARN) {
|
|
126
126
|
var i = e.map(T);
|
|
127
127
|
v.warn.apply(v, r([ "Firestore (" + y + "): " + t ], i));
|
|
128
128
|
}
|
|
@@ -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 A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded",
|
|
228
|
+
*/ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", N = "not-found", P = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", j = "out-of-range", L = "unimplemented", R = "internal", M = "unavailable", U = /** @class */ function(e) {
|
|
229
229
|
/** @hideconstructor */
|
|
230
230
|
function n(
|
|
231
231
|
/**
|
|
@@ -647,7 +647,7 @@ function ut(t, e) {
|
|
|
647
647
|
return null == t;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
/** Returns whether the value represents -0. */ function
|
|
650
|
+
/** Returns whether the value represents -0. */ function ft(t) {
|
|
651
651
|
// Detect if the value is -0.0. Based on polyfill from
|
|
652
652
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
653
653
|
return 0 === t && 1 / t == -1 / 0;
|
|
@@ -672,7 +672,7 @@ function ut(t, e) {
|
|
|
672
672
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
673
673
|
* See the License for the specific language governing permissions and
|
|
674
674
|
* limitations under the License.
|
|
675
|
-
*/ var
|
|
675
|
+
*/ var lt, ht, pt = {
|
|
676
676
|
BatchGetDocuments: "batchGet",
|
|
677
677
|
Commit: "commit",
|
|
678
678
|
RunQuery: "runQuery"
|
|
@@ -737,15 +737,15 @@ function dt(t) {
|
|
|
737
737
|
// return Code.OUT_OF_RANGE;
|
|
738
738
|
case 401:
|
|
739
739
|
// Unauthorized
|
|
740
|
-
return
|
|
740
|
+
return q;
|
|
741
741
|
|
|
742
742
|
case 403:
|
|
743
743
|
// Forbidden
|
|
744
|
-
return
|
|
744
|
+
return P;
|
|
745
745
|
|
|
746
746
|
case 404:
|
|
747
747
|
// Not Found
|
|
748
|
-
return
|
|
748
|
+
return N;
|
|
749
749
|
|
|
750
750
|
case 409:
|
|
751
751
|
// Conflict
|
|
@@ -759,7 +759,7 @@ function dt(t) {
|
|
|
759
759
|
|
|
760
760
|
case 429:
|
|
761
761
|
// Too Many Requests
|
|
762
|
-
return
|
|
762
|
+
return F;
|
|
763
763
|
|
|
764
764
|
case 499:
|
|
765
765
|
// Client Closed Request
|
|
@@ -808,7 +808,7 @@ function dt(t) {
|
|
|
808
808
|
/**
|
|
809
809
|
* A Rest-based connection that relies on the native HTTP stack
|
|
810
810
|
* (e.g. `fetch` or a polyfill).
|
|
811
|
-
*/ (ht =
|
|
811
|
+
*/ (ht = lt || (lt = {}))[ht.OK = 0] = "OK", ht[ht.CANCELLED = 1] = "CANCELLED",
|
|
812
812
|
ht[ht.UNKNOWN = 2] = "UNKNOWN", ht[ht.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
|
|
813
813
|
ht[ht.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", ht[ht.NOT_FOUND = 5] = "NOT_FOUND",
|
|
814
814
|
ht[ht.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", ht[ht.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
|
|
@@ -968,7 +968,7 @@ var mt = /** @class */ function(r) {
|
|
|
968
968
|
* limitations under the License.
|
|
969
969
|
*/ var vt = /** @class */ function() {
|
|
970
970
|
function t() {}
|
|
971
|
-
return t.
|
|
971
|
+
return t.R = function() {
|
|
972
972
|
for (
|
|
973
973
|
// Alphanumeric characters
|
|
974
974
|
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length, n = ""
|
|
@@ -1418,7 +1418,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1418
1418
|
* FieldValueOptions to value().
|
|
1419
1419
|
* - With respect to other ServerTimestampValues, they sort by their
|
|
1420
1420
|
* localWriteTime.
|
|
1421
|
-
*/ function
|
|
1421
|
+
*/ function Nt(t) {
|
|
1422
1422
|
var e, n;
|
|
1423
1423
|
return "server_timestamp" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);
|
|
1424
1424
|
}
|
|
@@ -1428,14 +1428,14 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1428
1428
|
*
|
|
1429
1429
|
* Preserving the previous values allows the user to display the last resoled
|
|
1430
1430
|
* value until the backend responds with the timestamp.
|
|
1431
|
-
*/ function
|
|
1431
|
+
*/ function Pt(t) {
|
|
1432
1432
|
var e = t.mapValue.fields.__previous_value__;
|
|
1433
|
-
return
|
|
1433
|
+
return Nt(e) ? Pt(e) : e;
|
|
1434
1434
|
}
|
|
1435
1435
|
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Returns the local time at which this timestamp was first set.
|
|
1438
|
-
*/ function
|
|
1438
|
+
*/ function qt(t) {
|
|
1439
1439
|
var e = kt(t.mapValue.fields.__local_write_time__.timestampValue);
|
|
1440
1440
|
return new bt(e.seconds, e.nanos);
|
|
1441
1441
|
}
|
|
@@ -1456,14 +1456,14 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1456
1456
|
* See the License for the specific language governing permissions and
|
|
1457
1457
|
* limitations under the License.
|
|
1458
1458
|
*/
|
|
1459
|
-
/** Extracts the backend's type order for the provided value. */ function
|
|
1460
|
-
return "nullValue" in t ? 0 /* NullValue */ : "booleanValue" in t ? 1 /* BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* NumberValue */ : "timestampValue" in t ? 3 /* TimestampValue */ : "stringValue" in t ? 5 /* StringValue */ : "bytesValue" in t ? 6 /* BlobValue */ : "referenceValue" in t ? 7 /* RefValue */ : "geoPointValue" in t ? 8 /* GeoPointValue */ : "arrayValue" in t ? 9 /* ArrayValue */ : "mapValue" in t ?
|
|
1459
|
+
/** Extracts the backend's type order for the provided value. */ function Ft(t) {
|
|
1460
|
+
return "nullValue" in t ? 0 /* NullValue */ : "booleanValue" in t ? 1 /* BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* NumberValue */ : "timestampValue" in t ? 3 /* TimestampValue */ : "stringValue" in t ? 5 /* StringValue */ : "bytesValue" in t ? 6 /* BlobValue */ : "referenceValue" in t ? 7 /* RefValue */ : "geoPointValue" in t ? 8 /* GeoPointValue */ : "arrayValue" in t ? 9 /* ArrayValue */ : "mapValue" in t ? Nt(t) ? 4 /* ServerTimestampValue */ : 10 /* ObjectValue */ : S();
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
1463
|
/** Tests `left` and `right` for equality based on the backend semantics. */ function Ot(t, e) {
|
|
1464
1464
|
if (t === e) return !0;
|
|
1465
|
-
var n =
|
|
1466
|
-
if (n !==
|
|
1465
|
+
var n = Ft(t);
|
|
1466
|
+
if (n !== Ft(e)) return !1;
|
|
1467
1467
|
switch (n) {
|
|
1468
1468
|
case 0 /* NullValue */ :
|
|
1469
1469
|
return !0;
|
|
@@ -1472,7 +1472,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1472
1472
|
return t.booleanValue === e.booleanValue;
|
|
1473
1473
|
|
|
1474
1474
|
case 4 /* ServerTimestampValue */ :
|
|
1475
|
-
return
|
|
1475
|
+
return qt(t).isEqual(qt(e));
|
|
1476
1476
|
|
|
1477
1477
|
case 3 /* TimestampValue */ :
|
|
1478
1478
|
return function(t, e) {
|
|
@@ -1504,7 +1504,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1504
1504
|
if ("integerValue" in t && "integerValue" in e) return Vt(t.integerValue) === Vt(e.integerValue);
|
|
1505
1505
|
if ("doubleValue" in t && "doubleValue" in e) {
|
|
1506
1506
|
var n = Vt(t.doubleValue), r = Vt(e.doubleValue);
|
|
1507
|
-
return n === r ?
|
|
1507
|
+
return n === r ? ft(n) === ft(r) : isNaN(n) && isNaN(r);
|
|
1508
1508
|
}
|
|
1509
1509
|
return !1;
|
|
1510
1510
|
}(t, e);
|
|
@@ -1533,7 +1533,7 @@ function Ct(t, e) {
|
|
|
1533
1533
|
|
|
1534
1534
|
function jt(t, e) {
|
|
1535
1535
|
if (t === e) return 0;
|
|
1536
|
-
var n =
|
|
1536
|
+
var n = Ft(t), r = Ft(e);
|
|
1537
1537
|
if (n !== r) return gt(n, r);
|
|
1538
1538
|
switch (n) {
|
|
1539
1539
|
case 0 /* NullValue */ :
|
|
@@ -1554,7 +1554,7 @@ function jt(t, e) {
|
|
|
1554
1554
|
return Lt(t.timestampValue, e.timestampValue);
|
|
1555
1555
|
|
|
1556
1556
|
case 4 /* ServerTimestampValue */ :
|
|
1557
|
-
return Lt(
|
|
1557
|
+
return Lt(qt(t), qt(e));
|
|
1558
1558
|
|
|
1559
1559
|
case 5 /* StringValue */ :
|
|
1560
1560
|
return gt(t.stringValue, e.stringValue);
|
|
@@ -1873,7 +1873,7 @@ function Rt(t, e) {
|
|
|
1873
1873
|
void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []),
|
|
1874
1874
|
void 0 === i && (i = null), void 0 === o && (o = null), void 0 === a && (a = null),
|
|
1875
1875
|
this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = r, this.limit = i,
|
|
1876
|
-
this.startAt = o, this.endAt = a, this.
|
|
1876
|
+
this.startAt = o, this.endAt = a, this.P = null;
|
|
1877
1877
|
};
|
|
1878
1878
|
|
|
1879
1879
|
/**
|
|
@@ -1930,7 +1930,7 @@ var Wt = /** @class */ function(e) {
|
|
|
1930
1930
|
}, n.prototype.matches = function(t) {
|
|
1931
1931
|
var e = t.data.field(this.field);
|
|
1932
1932
|
// Types do not have to match in NOT_EQUAL filters.
|
|
1933
|
-
return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(jt(e, this.value)) : null !== e &&
|
|
1933
|
+
return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(jt(e, this.value)) : null !== e && Ft(this.value) === Ft(e) && this.D(jt(e, this.value));
|
|
1934
1934
|
// Only compare types with matching backend order (such as double and int).
|
|
1935
1935
|
}, n.prototype.D = function(t) {
|
|
1936
1936
|
switch (this.op) {
|
|
@@ -2088,7 +2088,7 @@ function(t, e, n, r, i, o /* First */ , a, s) {
|
|
|
2088
2088
|
this.filters = r, this.limit = i, this.limitType = o, this.startAt = a, this.endAt = s,
|
|
2089
2089
|
this.$ = null,
|
|
2090
2090
|
// The corresponding `Target` of this `Query` instance.
|
|
2091
|
-
this.
|
|
2091
|
+
this.S = null, this.startAt, this.endAt;
|
|
2092
2092
|
};
|
|
2093
2093
|
|
|
2094
2094
|
/** Creates a new Query for a query that matches all documents at `path` */ function ue(t) {
|
|
@@ -2099,7 +2099,7 @@ function ce(t) {
|
|
|
2099
2099
|
return t.explicitOrderBy.length > 0 ? t.explicitOrderBy[0].field : null;
|
|
2100
2100
|
}
|
|
2101
2101
|
|
|
2102
|
-
function
|
|
2102
|
+
function fe(t) {
|
|
2103
2103
|
for (var e = 0, n = t.filters; e < n.length; e++) {
|
|
2104
2104
|
var r = n[e];
|
|
2105
2105
|
if (r.N()) return r.field;
|
|
@@ -2114,7 +2114,7 @@ function le(t) {
|
|
|
2114
2114
|
/**
|
|
2115
2115
|
* Returns whether the query matches a collection group rather than a specific
|
|
2116
2116
|
* collection.
|
|
2117
|
-
*/ function
|
|
2117
|
+
*/ function le(t) {
|
|
2118
2118
|
return null !== t.collectionGroup;
|
|
2119
2119
|
}
|
|
2120
2120
|
|
|
@@ -2126,7 +2126,7 @@ function le(t) {
|
|
|
2126
2126
|
var e = I(t);
|
|
2127
2127
|
if (null === e.$) {
|
|
2128
2128
|
e.$ = [];
|
|
2129
|
-
var n =
|
|
2129
|
+
var n = fe(e), r = ce(e);
|
|
2130
2130
|
if (null !== n && null === r)
|
|
2131
2131
|
// In order to implicitly add key ordering, we must also add the
|
|
2132
2132
|
// inequality filter field for it to be a valid query.
|
|
@@ -2151,7 +2151,7 @@ function le(t) {
|
|
|
2151
2151
|
* Converts this `Query` instance to it's corresponding `Target` representation.
|
|
2152
2152
|
*/ function pe(t) {
|
|
2153
2153
|
var e = I(t);
|
|
2154
|
-
if (!e.
|
|
2154
|
+
if (!e.S) if ("F" /* First */ === e.limitType) e.S = Ht(e.path, e.collectionGroup, he(e), e.filters, e.limit, e.startAt, e.endAt); else {
|
|
2155
2155
|
for (
|
|
2156
2156
|
// Flip the orderBy directions since we want the last results
|
|
2157
2157
|
var n = [], r = 0, i = he(e); r < i.length; r++) {
|
|
@@ -2161,9 +2161,9 @@ function le(t) {
|
|
|
2161
2161
|
// We need to swap the cursors to match the now-flipped query ordering.
|
|
2162
2162
|
var s = e.endAt ? new re(e.endAt.position, !e.endAt.before) : null, u = e.startAt ? new re(e.startAt.position, !e.startAt.before) : null;
|
|
2163
2163
|
// Now return as a LimitType.First query.
|
|
2164
|
-
e.
|
|
2164
|
+
e.S = Ht(e.path, e.collectionGroup, n, e.filters, e.limit, s, u);
|
|
2165
2165
|
}
|
|
2166
|
-
return e.
|
|
2166
|
+
return e.S;
|
|
2167
2167
|
}
|
|
2168
2168
|
|
|
2169
2169
|
/**
|
|
@@ -2193,7 +2193,7 @@ function le(t) {
|
|
|
2193
2193
|
*/
|
|
2194
2194
|
function de(t, e) {
|
|
2195
2195
|
return function(t) {
|
|
2196
|
-
return "number" == typeof t && Number.isInteger(t) && !
|
|
2196
|
+
return "number" == typeof t && Number.isInteger(t) && !ft(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
|
|
2197
2197
|
}(e) ?
|
|
2198
2198
|
/**
|
|
2199
2199
|
* Returns an IntegerValue for `value`.
|
|
@@ -2203,7 +2203,7 @@ function de(t, e) {
|
|
|
2203
2203
|
integerValue: "" + t
|
|
2204
2204
|
};
|
|
2205
2205
|
}(e) : function(t, e) {
|
|
2206
|
-
if (t.
|
|
2206
|
+
if (t.F) {
|
|
2207
2207
|
if (isNaN(e)) return {
|
|
2208
2208
|
doubleValue: "NaN"
|
|
2209
2209
|
};
|
|
@@ -2215,7 +2215,7 @@ function de(t, e) {
|
|
|
2215
2215
|
};
|
|
2216
2216
|
}
|
|
2217
2217
|
return {
|
|
2218
|
-
doubleValue:
|
|
2218
|
+
doubleValue: ft(e) ? "-0" : e
|
|
2219
2219
|
};
|
|
2220
2220
|
}(t, e);
|
|
2221
2221
|
}
|
|
@@ -2332,7 +2332,7 @@ function de(t, e) {
|
|
|
2332
2332
|
"not-in": "NOT_IN",
|
|
2333
2333
|
"array-contains-any": "ARRAY_CONTAINS_ANY"
|
|
2334
2334
|
}, De = function(t, e) {
|
|
2335
|
-
this.databaseId = t, this.
|
|
2335
|
+
this.databaseId = t, this.F = e;
|
|
2336
2336
|
};
|
|
2337
2337
|
|
|
2338
2338
|
/** Transforms a value into a server-generated timestamp. */
|
|
@@ -2347,8 +2347,8 @@ function de(t, e) {
|
|
|
2347
2347
|
/**
|
|
2348
2348
|
* Returns a value for a Date that's appropriate to put into a proto.
|
|
2349
2349
|
*/
|
|
2350
|
-
function
|
|
2351
|
-
return t.
|
|
2350
|
+
function Ne(t, e) {
|
|
2351
|
+
return t.F ? new Date(1e3 * e.seconds).toISOString().replace(/\.\d*/, "").replace("Z", "") + "." + ("000000000" + e.nanoseconds).slice(-9) + "Z" : {
|
|
2352
2352
|
seconds: "" + e.seconds,
|
|
2353
2353
|
nanos: e.nanoseconds
|
|
2354
2354
|
};
|
|
@@ -2358,15 +2358,15 @@ function Pe(t, e) {
|
|
|
2358
2358
|
* Returns a value for bytes that's appropriate to put in a proto.
|
|
2359
2359
|
*
|
|
2360
2360
|
* Visible for testing.
|
|
2361
|
-
*/ function
|
|
2362
|
-
return t.
|
|
2361
|
+
*/ function Pe(t, e) {
|
|
2362
|
+
return t.F ? e.toBase64() : e.toUint8Array();
|
|
2363
2363
|
}
|
|
2364
2364
|
|
|
2365
|
-
function
|
|
2366
|
-
return
|
|
2365
|
+
function qe(t, e) {
|
|
2366
|
+
return Ne(t, e.toTimestamp());
|
|
2367
2367
|
}
|
|
2368
2368
|
|
|
2369
|
-
function
|
|
2369
|
+
function Fe(t) {
|
|
2370
2370
|
return E(!!t), _t.fromTimestamp(function(t) {
|
|
2371
2371
|
var e = kt(t);
|
|
2372
2372
|
return new bt(e.seconds, e.nanos);
|
|
@@ -2577,7 +2577,7 @@ function Qe(t) {
|
|
|
2577
2577
|
var o = i[0], a = i[1];
|
|
2578
2578
|
return r.K.m(t, e, n, o, a);
|
|
2579
2579
|
})).catch((function(t) {
|
|
2580
|
-
throw "FirebaseError" === t.name ? (t.code ===
|
|
2580
|
+
throw "FirebaseError" === t.name ? (t.code === q && (r.authCredentials.invalidateToken(),
|
|
2581
2581
|
r.appCheckCredentials.invalidateToken()), t) : new U(k, t.toString());
|
|
2582
2582
|
}));
|
|
2583
2583
|
},
|
|
@@ -2587,7 +2587,7 @@ function Qe(t) {
|
|
|
2587
2587
|
var o = i[0], a = i[1];
|
|
2588
2588
|
return r.K.T(t, e, n, o, a);
|
|
2589
2589
|
})).catch((function(t) {
|
|
2590
|
-
throw "FirebaseError" === t.name ? (t.code ===
|
|
2590
|
+
throw "FirebaseError" === t.name ? (t.code === q && (r.authCredentials.invalidateToken(),
|
|
2591
2591
|
r.appCheckCredentials.invalidateToken()), t) : new U(k, t.toString());
|
|
2592
2592
|
}));
|
|
2593
2593
|
}, n.prototype.terminate = function() {
|
|
@@ -2672,7 +2672,7 @@ function Ye(t, r) {
|
|
|
2672
2672
|
}(0, t);
|
|
2673
2673
|
}))), e.precondition.isNone || (n.currentDocument = function(t, e) {
|
|
2674
2674
|
return void 0 !== e.updateTime ? {
|
|
2675
|
-
updateTime:
|
|
2675
|
+
updateTime: qe(t, e.updateTime)
|
|
2676
2676
|
} : void 0 !== e.exists ? {
|
|
2677
2677
|
exists: e.exists
|
|
2678
2678
|
} : S();
|
|
@@ -2705,7 +2705,7 @@ function $e(t, r) {
|
|
|
2705
2705
|
var n = function(t, e) {
|
|
2706
2706
|
return "found" in e ? function(t, e) {
|
|
2707
2707
|
E(!!e.found), e.found.name, e.found.updateTime;
|
|
2708
|
-
var n = je(t, e.found.name), r =
|
|
2708
|
+
var n = je(t, e.found.name), r = Fe(e.found.updateTime), i = new zt({
|
|
2709
2709
|
mapValue: {
|
|
2710
2710
|
fields: e.found.fields
|
|
2711
2711
|
}
|
|
@@ -2713,7 +2713,7 @@ function $e(t, r) {
|
|
|
2713
2713
|
return Qt.newFoundDocument(n, r, i);
|
|
2714
2714
|
}(t, e) : "missing" in e ? function(t, e) {
|
|
2715
2715
|
E(!!e.missing), E(!!e.readTime);
|
|
2716
|
-
var n = je(t, e.missing), r =
|
|
2716
|
+
var n = je(t, e.missing), r = Fe(e.readTime);
|
|
2717
2717
|
return Qt.newNoDocument(n, r);
|
|
2718
2718
|
}(t, e) : S();
|
|
2719
2719
|
}(e.q, t);
|
|
@@ -2807,7 +2807,7 @@ function Xe(t, r) {
|
|
|
2807
2807
|
}(e.orderBy);
|
|
2808
2808
|
o && (n.structuredQuery.orderBy = o);
|
|
2809
2809
|
var a = function(t, e) {
|
|
2810
|
-
return t.
|
|
2810
|
+
return t.F || ct(e) ? e : {
|
|
2811
2811
|
value: e
|
|
2812
2812
|
};
|
|
2813
2813
|
}(t, e.limit);
|
|
@@ -2822,7 +2822,7 @@ function Xe(t, r) {
|
|
|
2822
2822
|
return !!t.document;
|
|
2823
2823
|
})).map((function(t) {
|
|
2824
2824
|
return function(t, e, n) {
|
|
2825
|
-
var r = je(t, e.name), i =
|
|
2825
|
+
var r = je(t, e.name), i = Fe(e.updateTime), o = new zt({
|
|
2826
2826
|
mapValue: {
|
|
2827
2827
|
fields: e.fields
|
|
2828
2828
|
}
|
|
@@ -3243,7 +3243,7 @@ var sn = /** @class */ function() {
|
|
|
3243
3243
|
/**
|
|
3244
3244
|
* A `Query` refers to a query which you can read or listen to. You can also
|
|
3245
3245
|
* construct refined `Query` objects by adding filters and ordering.
|
|
3246
|
-
*/ function
|
|
3246
|
+
*/ function fn(t, e) {
|
|
3247
3247
|
for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
|
|
3248
3248
|
if (t = p(t), rt("collection", "path", e), t instanceof en) {
|
|
3249
3249
|
var o = Z.fromString.apply(Z, r([ e ], n));
|
|
@@ -3267,7 +3267,7 @@ var sn = /** @class */ function() {
|
|
|
3267
3267
|
* collection or subcollection with this ID as the last segment of its path
|
|
3268
3268
|
* will be included. Cannot contain a slash.
|
|
3269
3269
|
* @returns The created `Query`.
|
|
3270
|
-
*/ function
|
|
3270
|
+
*/ function ln(t, e) {
|
|
3271
3271
|
if (t = st(t, en), rt("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new U(V, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
|
|
3272
3272
|
return new un(t,
|
|
3273
3273
|
/* converter= */ null,
|
|
@@ -3285,7 +3285,7 @@ function hn(t, e) {
|
|
|
3285
3285
|
if (t = p(t),
|
|
3286
3286
|
// We allow omission of 'pathString' but explicitly prohibit passing in both
|
|
3287
3287
|
// 'undefined' and 'null'.
|
|
3288
|
-
1 === arguments.length && (e = vt.
|
|
3288
|
+
1 === arguments.length && (e = vt.R()), rt("doc", "path", e), t instanceof en) {
|
|
3289
3289
|
var o = Z.fromString.apply(Z, r([ e ], n));
|
|
3290
3290
|
return it(o), new sn(t,
|
|
3291
3291
|
/* converter= */ null, new nt(o));
|
|
@@ -3681,12 +3681,12 @@ function(t) {
|
|
|
3681
3681
|
Un("Data must be an object, but it was:", a, r);
|
|
3682
3682
|
var s, u, c = Rn(r, a);
|
|
3683
3683
|
if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
|
|
3684
|
-
for (var
|
|
3685
|
-
var p = xn(e, h[
|
|
3684
|
+
for (var f = [], l = 0, h = o.mergeFields; l < h.length; l++) {
|
|
3685
|
+
var p = xn(e, h[l], n);
|
|
3686
3686
|
if (!a.contains(p)) throw new U(V, "Field '" + p + "' is specified in your field mask but missing from your input data.");
|
|
3687
|
-
Qn(
|
|
3687
|
+
Qn(f, p) || f.push(p);
|
|
3688
3688
|
}
|
|
3689
|
-
s = new Et(
|
|
3689
|
+
s = new Et(f), u = a.fieldTransforms.filter((function(t) {
|
|
3690
3690
|
return s.covers(t.field);
|
|
3691
3691
|
}));
|
|
3692
3692
|
} else s = null, u = a.fieldTransforms;
|
|
@@ -3731,7 +3731,7 @@ var Vn = /** @class */ function(e) {
|
|
|
3731
3731
|
}, e.databaseId, e.q, e.ignoreUndefinedProperties);
|
|
3732
3732
|
}
|
|
3733
3733
|
|
|
3734
|
-
var
|
|
3734
|
+
var Nn = /** @class */ function(e) {
|
|
3735
3735
|
function n() {
|
|
3736
3736
|
return null !== e && e.apply(this, arguments) || this;
|
|
3737
3737
|
}
|
|
@@ -3740,7 +3740,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3740
3740
|
}, n.prototype.isEqual = function(t) {
|
|
3741
3741
|
return t instanceof n;
|
|
3742
3742
|
}, n;
|
|
3743
|
-
}(gn),
|
|
3743
|
+
}(gn), Pn = /** @class */ function(e) {
|
|
3744
3744
|
function n(t, n) {
|
|
3745
3745
|
var r = this;
|
|
3746
3746
|
return (r = e.call(this, t) || this).lt = n, r;
|
|
@@ -3755,7 +3755,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3755
3755
|
// TODO(mrschmidt): Implement isEquals
|
|
3756
3756
|
return this === t;
|
|
3757
3757
|
}, n;
|
|
3758
|
-
}(gn),
|
|
3758
|
+
}(gn), qn = /** @class */ function(e) {
|
|
3759
3759
|
function n(t, n) {
|
|
3760
3760
|
var r = this;
|
|
3761
3761
|
return (r = e.call(this, t) || this).lt = n, r;
|
|
@@ -3770,7 +3770,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3770
3770
|
// TODO(mrschmidt): Implement isEquals
|
|
3771
3771
|
return this === t;
|
|
3772
3772
|
}, n;
|
|
3773
|
-
}(gn),
|
|
3773
|
+
}(gn), Fn = /** @class */ function(e) {
|
|
3774
3774
|
function n(t, n) {
|
|
3775
3775
|
var r = this;
|
|
3776
3776
|
return (r = e.call(this, t) || this).ft = n, r;
|
|
@@ -3811,7 +3811,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3811
3811
|
for (var c = 0; c < o.length; c += 2) s.push(xn(e, o[c])), u.push(o[c + 1]);
|
|
3812
3812
|
// We iterate in reverse order to pick the last value for a field if the
|
|
3813
3813
|
// user specified the field multiple times.
|
|
3814
|
-
for (var
|
|
3814
|
+
for (var f = [], l = zt.empty(), h = s.length - 1; h >= 0; --h) if (!Qn(f, s[h])) {
|
|
3815
3815
|
var d = s[h], m = u[h];
|
|
3816
3816
|
// For Compat types, we have to "extract" the underlying types before
|
|
3817
3817
|
// performing validation.
|
|
@@ -3819,13 +3819,13 @@ var Pn = /** @class */ function(e) {
|
|
|
3819
3819
|
var y = a.it(d);
|
|
3820
3820
|
if (m instanceof Vn)
|
|
3821
3821
|
// Add it to the field mask, but don't add anything to updateData.
|
|
3822
|
-
|
|
3822
|
+
f.push(d); else {
|
|
3823
3823
|
var v = Ln(m, y);
|
|
3824
|
-
null != v && (
|
|
3824
|
+
null != v && (f.push(d), l.set(d, v));
|
|
3825
3825
|
}
|
|
3826
3826
|
}
|
|
3827
|
-
var g = new Et(
|
|
3828
|
-
return new Tn(
|
|
3827
|
+
var g = new Et(f);
|
|
3828
|
+
return new Tn(l, g, a.fieldTransforms);
|
|
3829
3829
|
}
|
|
3830
3830
|
|
|
3831
3831
|
/**
|
|
@@ -3852,7 +3852,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3852
3852
|
// from firestore-exp.
|
|
3853
3853
|
t = p(t))) return Un("Unsupported field value:", e, t), Rn(t, e);
|
|
3854
3854
|
if (t instanceof gn)
|
|
3855
|
-
// FieldValues usually parse into transforms (except
|
|
3855
|
+
// FieldValues usually parse into transforms (except deleteField())
|
|
3856
3856
|
// in which case we do not want to include this field in our parsed data
|
|
3857
3857
|
// (as doing so will overwrite the field directly prior to the transform
|
|
3858
3858
|
// trying to transform it). So we don't add this location to
|
|
@@ -3915,7 +3915,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3915
3915
|
if (t instanceof Date) {
|
|
3916
3916
|
var n = bt.fromDate(t);
|
|
3917
3917
|
return {
|
|
3918
|
-
timestampValue:
|
|
3918
|
+
timestampValue: Ne(e.q, n)
|
|
3919
3919
|
};
|
|
3920
3920
|
}
|
|
3921
3921
|
if (t instanceof bt) {
|
|
@@ -3924,7 +3924,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3924
3924
|
// truncation immediately without waiting for the backend to do that.
|
|
3925
3925
|
var r = new bt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
|
|
3926
3926
|
return {
|
|
3927
|
-
timestampValue:
|
|
3927
|
+
timestampValue: Ne(e.q, r)
|
|
3928
3928
|
};
|
|
3929
3929
|
}
|
|
3930
3930
|
if (t instanceof wn) return {
|
|
@@ -3934,7 +3934,7 @@ var Pn = /** @class */ function(e) {
|
|
|
3934
3934
|
}
|
|
3935
3935
|
};
|
|
3936
3936
|
if (t instanceof vn) return {
|
|
3937
|
-
bytesValue:
|
|
3937
|
+
bytesValue: Pe(e.q, t._byteString)
|
|
3938
3938
|
};
|
|
3939
3939
|
if (t instanceof sn) {
|
|
3940
3940
|
var i = e.databaseId, o = t.firestore._databaseId;
|
|
@@ -3986,7 +3986,7 @@ function Un(t, e, n) {
|
|
|
3986
3986
|
// FieldPath.
|
|
3987
3987
|
(e = p(e)) instanceof mn) return e._internalPath;
|
|
3988
3988
|
if ("string" == typeof e) return Gn(t, e);
|
|
3989
|
-
throw zn("Field path arguments must be of type string or
|
|
3989
|
+
throw zn("Field path arguments must be of type string or ", t,
|
|
3990
3990
|
/* hasConverter= */ !1,
|
|
3991
3991
|
/* path= */ void 0, n);
|
|
3992
3992
|
}
|
|
@@ -4254,12 +4254,12 @@ var Zn = /** @class */ function(e) {
|
|
|
4254
4254
|
var e = An(t.firestore), n = function(t, e, n, r, i, o, a) {
|
|
4255
4255
|
var s;
|
|
4256
4256
|
if (i.isKeyField()) {
|
|
4257
|
-
if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new U(V, "Invalid Query. You can't perform '" + o + "' queries on
|
|
4257
|
+
if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new U(V, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
|
|
4258
4258
|
if ("in" /* IN */ === o || "not-in" /* NOT_IN */ === o) {
|
|
4259
4259
|
dr(a, o);
|
|
4260
|
-
for (var u = [], c = 0,
|
|
4261
|
-
var
|
|
4262
|
-
u.push(pr(r, t,
|
|
4260
|
+
for (var u = [], c = 0, f = a; c < f.length; c++) {
|
|
4261
|
+
var l = f[c];
|
|
4262
|
+
u.push(pr(r, t, l));
|
|
4263
4263
|
}
|
|
4264
4264
|
s = {
|
|
4265
4265
|
arrayValue: {
|
|
@@ -4273,7 +4273,7 @@ var Zn = /** @class */ function(e) {
|
|
|
4273
4273
|
var h = Wt.create(i, o, s);
|
|
4274
4274
|
return function(t, e) {
|
|
4275
4275
|
if (e.N()) {
|
|
4276
|
-
var n =
|
|
4276
|
+
var n = fe(t);
|
|
4277
4277
|
if (null !== n && !n.isEqual(e.field)) throw new U(V, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
|
|
4278
4278
|
var r = ce(t);
|
|
4279
4279
|
null !== r && mr(t, e.field, r);
|
|
@@ -4358,7 +4358,7 @@ var er = /** @class */ function(e) {
|
|
|
4358
4358
|
return function(t, e) {
|
|
4359
4359
|
if (null === ce(t)) {
|
|
4360
4360
|
// This is the first order by. It must match any inequality.
|
|
4361
|
-
var n =
|
|
4361
|
+
var n = fe(t);
|
|
4362
4362
|
null !== n && mr(t, n, e.field);
|
|
4363
4363
|
}
|
|
4364
4364
|
}(t, r), r;
|
|
@@ -4456,19 +4456,19 @@ var cr = /** @class */ function(e) {
|
|
|
4456
4456
|
}, n;
|
|
4457
4457
|
}(Xn);
|
|
4458
4458
|
|
|
4459
|
-
function
|
|
4459
|
+
function fr() {
|
|
4460
4460
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4461
4461
|
return new cr("endBefore", t, /*before=*/ !0);
|
|
4462
4462
|
}
|
|
4463
4463
|
|
|
4464
|
-
function
|
|
4464
|
+
function lr() {
|
|
4465
4465
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4466
4466
|
return new cr("endAt", t, /*before=*/ !1);
|
|
4467
4467
|
}
|
|
4468
4468
|
|
|
4469
4469
|
/** Helper function to create a bound from a document or fields */ function hr(t, e, n, r) {
|
|
4470
4470
|
if (n[0] = p(n[0]), n[0] instanceof Kn) return function(t, e, n, r, i) {
|
|
4471
|
-
if (!r) throw new U(
|
|
4471
|
+
if (!r) throw new U(N, "Can't use a DocumentSnapshot that doesn't exist for " + n + "().");
|
|
4472
4472
|
// Because people expect to continue/end a query at the exact document
|
|
4473
4473
|
// provided, we need to use the implicit sort order rather than the explicit
|
|
4474
4474
|
// sort order, because it's guaranteed to contain the document key. That way
|
|
@@ -4480,10 +4480,10 @@ function fr() {
|
|
|
4480
4480
|
var u = s[a];
|
|
4481
4481
|
if (u.field.isKeyField()) o.push(Rt(e, r.key)); else {
|
|
4482
4482
|
var c = r.data.field(u.field);
|
|
4483
|
-
if (
|
|
4483
|
+
if (Nt(c)) throw new U(V, 'Invalid query. You are trying to start or end a query using a document for which the field "' + u.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
|
|
4484
4484
|
if (null === c) {
|
|
4485
|
-
var
|
|
4486
|
-
throw new U(V, "Invalid query. You are trying to start or end a query using a document for which the field '" +
|
|
4485
|
+
var f = u.field.canonicalString();
|
|
4486
|
+
throw new U(V, "Invalid query. You are trying to start or end a query using a document for which the field '" + f + "' (used as the orderBy) does not exist.");
|
|
4487
4487
|
}
|
|
4488
4488
|
o.push(c);
|
|
4489
4489
|
}
|
|
@@ -4499,11 +4499,11 @@ function fr() {
|
|
|
4499
4499
|
var c = i[u];
|
|
4500
4500
|
if (a[u].field.isKeyField()) {
|
|
4501
4501
|
if ("string" != typeof c) throw new U(V, "Invalid query. Expected a string for document ID in " + r + "(), but got a " + typeof c);
|
|
4502
|
-
if (!
|
|
4503
|
-
var
|
|
4504
|
-
if (!nt.isDocumentKey(
|
|
4505
|
-
var
|
|
4506
|
-
s.push(Rt(e,
|
|
4502
|
+
if (!le(t) && -1 !== c.indexOf("/")) throw new U(V, "Invalid query. When querying a collection and ordering by documentId(), the value passed to " + r + "() must be a plain document ID, but '" + c + "' contains a slash.");
|
|
4503
|
+
var f = t.path.child(Z.fromString(c));
|
|
4504
|
+
if (!nt.isDocumentKey(f)) throw new U(V, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to " + r + "() must result in a valid document path, but '" + f + "' is not because it contains an odd number of segments.");
|
|
4505
|
+
var l = new nt(f);
|
|
4506
|
+
s.push(Rt(e, l));
|
|
4507
4507
|
} else {
|
|
4508
4508
|
var h = jn(n, r, c);
|
|
4509
4509
|
s.push(h);
|
|
@@ -4515,14 +4515,14 @@ function fr() {
|
|
|
4515
4515
|
|
|
4516
4516
|
function pr(t, e, n) {
|
|
4517
4517
|
if ("string" == typeof (n = p(n))) {
|
|
4518
|
-
if ("" === n) throw new U(V, "Invalid query. When querying with
|
|
4519
|
-
if (!
|
|
4518
|
+
if ("" === n) throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
|
|
4519
|
+
if (!le(e) && -1 !== n.indexOf("/")) throw new U(V, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
|
|
4520
4520
|
var r = e.path.child(Z.fromString(n));
|
|
4521
|
-
if (!nt.isDocumentKey(r)) throw new U(V, "Invalid query. When querying a collection group by
|
|
4521
|
+
if (!nt.isDocumentKey(r)) throw new U(V, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
|
|
4522
4522
|
return Rt(t, new nt(r));
|
|
4523
4523
|
}
|
|
4524
4524
|
if (n instanceof sn) return Rt(t, n._key);
|
|
4525
|
-
throw new U(V, "Invalid query. When querying with
|
|
4525
|
+
throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: " + at(n) + ".");
|
|
4526
4526
|
}
|
|
4527
4527
|
|
|
4528
4528
|
/**
|
|
@@ -4604,7 +4604,7 @@ var vr = /** @class */ function(e) {
|
|
|
4604
4604
|
}(/** @class */ function() {
|
|
4605
4605
|
function t() {}
|
|
4606
4606
|
return t.prototype.convertValue = function(t, e) {
|
|
4607
|
-
switch (void 0 === e && (e = "none"),
|
|
4607
|
+
switch (void 0 === e && (e = "none"), Ft(t)) {
|
|
4608
4608
|
case 0 /* NullValue */ :
|
|
4609
4609
|
return null;
|
|
4610
4610
|
|
|
@@ -4656,11 +4656,11 @@ var vr = /** @class */ function(e) {
|
|
|
4656
4656
|
}, t.prototype.convertServerTimestamp = function(t, e) {
|
|
4657
4657
|
switch (e) {
|
|
4658
4658
|
case "previous":
|
|
4659
|
-
var n =
|
|
4659
|
+
var n = Pt(t);
|
|
4660
4660
|
return null == n ? null : this.convertValue(n, e);
|
|
4661
4661
|
|
|
4662
4662
|
case "estimate":
|
|
4663
|
-
return this.convertTimestamp(
|
|
4663
|
+
return this.convertTimestamp(qt(t));
|
|
4664
4664
|
|
|
4665
4665
|
default:
|
|
4666
4666
|
return null;
|
|
@@ -4805,7 +4805,7 @@ function _r(t, e, n) {
|
|
|
4805
4805
|
* Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
|
|
4806
4806
|
* include a server-generated timestamp in the written data.
|
|
4807
4807
|
*/ function Ir() {
|
|
4808
|
-
return new
|
|
4808
|
+
return new Nn("serverTimestamp");
|
|
4809
4809
|
}
|
|
4810
4810
|
|
|
4811
4811
|
/**
|
|
@@ -4823,7 +4823,7 @@ function _r(t, e, n) {
|
|
|
4823
4823
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4824
4824
|
// NOTE: We don't actually parse the data until it's used in set() or
|
|
4825
4825
|
// update() since we'd need the Firestore instance to do this.
|
|
4826
|
-
return new
|
|
4826
|
+
return new Pn("arrayUnion", t);
|
|
4827
4827
|
}
|
|
4828
4828
|
|
|
4829
4829
|
/**
|
|
@@ -4840,7 +4840,7 @@ function _r(t, e, n) {
|
|
|
4840
4840
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4841
4841
|
// NOTE: We don't actually parse the data until it's used in set() or
|
|
4842
4842
|
// update() since we'd need the Firestore instance to do this.
|
|
4843
|
-
return new
|
|
4843
|
+
return new qn("arrayRemove", t);
|
|
4844
4844
|
}
|
|
4845
4845
|
|
|
4846
4846
|
/**
|
|
@@ -4862,7 +4862,7 @@ function _r(t, e, n) {
|
|
|
4862
4862
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
4863
4863
|
* `updateDoc()`
|
|
4864
4864
|
*/ function Vr(t) {
|
|
4865
|
-
return new
|
|
4865
|
+
return new Fn("increment", t);
|
|
4866
4866
|
}
|
|
4867
4867
|
|
|
4868
4868
|
/**
|
|
@@ -4896,12 +4896,12 @@ function _r(t, e, n) {
|
|
|
4896
4896
|
}
|
|
4897
4897
|
return t.prototype.set = function(t, e, n) {
|
|
4898
4898
|
this._verifyNotCommitted();
|
|
4899
|
-
var r =
|
|
4899
|
+
var r = Nr(t, this._firestore), i = yr(r.converter, e, n), o = kn(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
|
|
4900
4900
|
return this._mutations.push(o.toMutation(r._key, _e.none())), this;
|
|
4901
4901
|
}, t.prototype.update = function(t, e, n) {
|
|
4902
4902
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
4903
4903
|
this._verifyNotCommitted();
|
|
4904
|
-
var o, a =
|
|
4904
|
+
var o, a = Nr(t, this._firestore);
|
|
4905
4905
|
// For Compat types, we have to "extract" the underlying types before
|
|
4906
4906
|
// performing validation.
|
|
4907
4907
|
return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(this._dataReader, "WriteBatch.update", a._key, e, n, r) : On(this._dataReader, "WriteBatch.update", a._key, e),
|
|
@@ -4915,7 +4915,7 @@ function _r(t, e, n) {
|
|
|
4915
4915
|
*/
|
|
4916
4916
|
t.prototype.delete = function(t) {
|
|
4917
4917
|
this._verifyNotCommitted();
|
|
4918
|
-
var e =
|
|
4918
|
+
var e = Nr(t, this._firestore);
|
|
4919
4919
|
return this._mutations = this._mutations.concat(new Ie(e._key, _e.none())), this;
|
|
4920
4920
|
},
|
|
4921
4921
|
/**
|
|
@@ -4937,7 +4937,7 @@ function _r(t, e, n) {
|
|
|
4937
4937
|
}, t;
|
|
4938
4938
|
}();
|
|
4939
4939
|
|
|
4940
|
-
function
|
|
4940
|
+
function Nr(t, e) {
|
|
4941
4941
|
if ((t = p(t)).firestore !== e) throw new U(V, "Provided document reference is from a different Firestore instance.");
|
|
4942
4942
|
return t;
|
|
4943
4943
|
}
|
|
@@ -4954,7 +4954,7 @@ function Pr(t, e) {
|
|
|
4954
4954
|
*
|
|
4955
4955
|
* @returns A `WriteBatch` that can be used to atomically execute multiple
|
|
4956
4956
|
* writes.
|
|
4957
|
-
*/ function
|
|
4957
|
+
*/ function Pr(t) {
|
|
4958
4958
|
var e = Ze(t = st(t, en));
|
|
4959
4959
|
return new Dr(t, (function(t) {
|
|
4960
4960
|
return Ye(e, t);
|
|
@@ -4980,7 +4980,7 @@ function Pr(t, e) {
|
|
|
4980
4980
|
/**
|
|
4981
4981
|
* Internal transaction object responsible for accumulating the mutations to
|
|
4982
4982
|
* perform and the base versions for any documents read.
|
|
4983
|
-
*/ var
|
|
4983
|
+
*/ var qr = /** @class */ function() {
|
|
4984
4984
|
function t(t) {
|
|
4985
4985
|
this.datastore = t,
|
|
4986
4986
|
// The version of each document that was read during this transaction.
|
|
@@ -5100,7 +5100,7 @@ function Pr(t, e) {
|
|
|
5100
5100
|
}, t.prototype.write = function(t) {
|
|
5101
5101
|
this.ensureCommitNotCalled(), this.mutations.push(t);
|
|
5102
5102
|
}, t.prototype.ensureCommitNotCalled = function() {}, t;
|
|
5103
|
-
}(),
|
|
5103
|
+
}(), Fr = /** @class */ function() {
|
|
5104
5104
|
function t(t, e, n, r) {
|
|
5105
5105
|
this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = r,
|
|
5106
5106
|
this.Tt = 5, this.It = new He(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
|
|
@@ -5114,21 +5114,21 @@ function Pr(t, e) {
|
|
|
5114
5114
|
return e(t, void 0, void 0, (function() {
|
|
5115
5115
|
var t, e, r = this;
|
|
5116
5116
|
return n(this, (function(n) {
|
|
5117
|
-
return t = new
|
|
5117
|
+
return t = new qr(this.datastore), (e = this.Rt(t)) && e.then((function(e) {
|
|
5118
5118
|
r.asyncQueue.enqueueAndForget((function() {
|
|
5119
5119
|
return t.commit().then((function() {
|
|
5120
5120
|
r.deferred.resolve(e);
|
|
5121
5121
|
})).catch((function(t) {
|
|
5122
|
-
r.
|
|
5122
|
+
r.Pt(t);
|
|
5123
5123
|
}));
|
|
5124
5124
|
}));
|
|
5125
5125
|
})).catch((function(t) {
|
|
5126
|
-
r.
|
|
5126
|
+
r.Pt(t);
|
|
5127
5127
|
})), [ 2 /*return*/ ];
|
|
5128
5128
|
}));
|
|
5129
5129
|
}));
|
|
5130
5130
|
}));
|
|
5131
|
-
}, t.prototype.
|
|
5131
|
+
}, t.prototype.Rt = function(t) {
|
|
5132
5132
|
try {
|
|
5133
5133
|
var e = this.updateFunction(t);
|
|
5134
5134
|
return !ct(e) && e.catch && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")),
|
|
@@ -5137,7 +5137,7 @@ function Pr(t, e) {
|
|
|
5137
5137
|
// Do not retry errors thrown by user provided updateFunction.
|
|
5138
5138
|
return this.deferred.reject(t), null;
|
|
5139
5139
|
}
|
|
5140
|
-
}, t.prototype.
|
|
5140
|
+
}, t.prototype.Pt = function(t) {
|
|
5141
5141
|
var e = this;
|
|
5142
5142
|
this.Tt > 0 && this.Vt(t) ? (this.Tt -= 1, this.asyncQueue.enqueueAndForget((function() {
|
|
5143
5143
|
return e.At(), Promise.resolve();
|
|
@@ -5162,18 +5162,18 @@ function Pr(t, e) {
|
|
|
5162
5162
|
case A:
|
|
5163
5163
|
case k:
|
|
5164
5164
|
case D:
|
|
5165
|
-
case
|
|
5165
|
+
case F:
|
|
5166
5166
|
case R:
|
|
5167
5167
|
case M:
|
|
5168
5168
|
// Unauthenticated means something went wrong with our token and we need
|
|
5169
5169
|
// to retry with new credentials which will happen automatically.
|
|
5170
|
-
case
|
|
5170
|
+
case q:
|
|
5171
5171
|
return !1;
|
|
5172
5172
|
|
|
5173
5173
|
case V:
|
|
5174
|
-
case
|
|
5174
|
+
case N:
|
|
5175
5175
|
case "already-exists":
|
|
5176
|
-
case
|
|
5176
|
+
case P:
|
|
5177
5177
|
case O:
|
|
5178
5178
|
// Aborted might be retried in some scenarios, but that is dependant on
|
|
5179
5179
|
// the context and should handled individually by the calling code.
|
|
@@ -5335,9 +5335,9 @@ function Pr(t, e) {
|
|
|
5335
5335
|
this.$t = !1,
|
|
5336
5336
|
// Operations scheduled to be queued in the future. Operations are
|
|
5337
5337
|
// automatically removed after they are run or canceled.
|
|
5338
|
-
this.
|
|
5338
|
+
this.St = [],
|
|
5339
5339
|
// visible for testing
|
|
5340
|
-
this.
|
|
5340
|
+
this.Ft = null,
|
|
5341
5341
|
// Flag set while there's an outstanding AsyncQueue operation, used for
|
|
5342
5342
|
// assertion sanity-checks.
|
|
5343
5343
|
this.xt = !1,
|
|
@@ -5450,7 +5450,7 @@ function Pr(t, e) {
|
|
|
5450
5450
|
}, t.prototype.Ut = function(t) {
|
|
5451
5451
|
var e = this, n = this.Dt.then((function() {
|
|
5452
5452
|
return e.xt = !0, t().catch((function(t) {
|
|
5453
|
-
e.
|
|
5453
|
+
e.Ft = t, e.xt = !1;
|
|
5454
5454
|
var n =
|
|
5455
5455
|
/**
|
|
5456
5456
|
* Chrome includes Error.message in Error.stack. Other browsers do not.
|
|
@@ -5479,9 +5479,9 @@ function Pr(t, e) {
|
|
|
5479
5479
|
var i = Cr.createAndSchedule(this, t, e, n, (function(t) {
|
|
5480
5480
|
return r.jt(t);
|
|
5481
5481
|
}));
|
|
5482
|
-
return this.
|
|
5482
|
+
return this.St.push(i), i;
|
|
5483
5483
|
}, t.prototype.Lt = function() {
|
|
5484
|
-
this.
|
|
5484
|
+
this.Ft && S();
|
|
5485
5485
|
}, t.prototype.verifyOperationInProgress = function() {},
|
|
5486
5486
|
/**
|
|
5487
5487
|
* Waits until all currently queued tasks are finished executing. Delayed
|
|
@@ -5513,7 +5513,7 @@ function Pr(t, e) {
|
|
|
5513
5513
|
* exists.
|
|
5514
5514
|
*/
|
|
5515
5515
|
t.prototype.Bt = function(t) {
|
|
5516
|
-
for (var e = 0, n = this.
|
|
5516
|
+
for (var e = 0, n = this.St; e < n.length; e++) {
|
|
5517
5517
|
if (n[e].timerId === t) return !0;
|
|
5518
5518
|
}
|
|
5519
5519
|
return !1;
|
|
@@ -5530,10 +5530,10 @@ function Pr(t, e) {
|
|
|
5530
5530
|
// Note that draining may generate more delayed ops, so we do that first.
|
|
5531
5531
|
return this.Mt().then((function() {
|
|
5532
5532
|
// Run ops in the same order they'd run if they ran naturally.
|
|
5533
|
-
e.
|
|
5533
|
+
e.St.sort((function(t, e) {
|
|
5534
5534
|
return t.targetTimeMs - e.targetTimeMs;
|
|
5535
5535
|
}));
|
|
5536
|
-
for (var n = 0, r = e.
|
|
5536
|
+
for (var n = 0, r = e.St; n < r.length; n++) {
|
|
5537
5537
|
var i = r[n];
|
|
5538
5538
|
if (i.skipDelay(), "all" /* All */ !== t && i.timerId === t) break;
|
|
5539
5539
|
}
|
|
@@ -5548,8 +5548,8 @@ function Pr(t, e) {
|
|
|
5548
5548
|
},
|
|
5549
5549
|
/** Called once a DelayedOperation is run or canceled. */ t.prototype.jt = function(t) {
|
|
5550
5550
|
// NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.
|
|
5551
|
-
var e = this.
|
|
5552
|
-
this.
|
|
5551
|
+
var e = this.St.indexOf(t);
|
|
5552
|
+
this.St.splice(e, 1);
|
|
5553
5553
|
}, t;
|
|
5554
5554
|
}(), Lr = /** @class */ function() {
|
|
5555
5555
|
/** @hideconstructor */
|
|
@@ -5563,7 +5563,7 @@ function Pr(t, e) {
|
|
|
5563
5563
|
*/;
|
|
5564
5564
|
}
|
|
5565
5565
|
return t.prototype.get = function(t) {
|
|
5566
|
-
var e = this, n =
|
|
5566
|
+
var e = this, n = Nr(t, this._firestore), r = new vr(this._firestore);
|
|
5567
5567
|
return this._transaction.lookup([ n._key ]).then((function(t) {
|
|
5568
5568
|
if (!t || 1 !== t.length) return S();
|
|
5569
5569
|
var i = t[0];
|
|
@@ -5572,11 +5572,11 @@ function Pr(t, e) {
|
|
|
5572
5572
|
throw S();
|
|
5573
5573
|
}));
|
|
5574
5574
|
}, t.prototype.set = function(t, e, n) {
|
|
5575
|
-
var r =
|
|
5575
|
+
var r = Nr(t, this._firestore), i = yr(r.converter, e, n), o = kn(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
|
|
5576
5576
|
return this._transaction.set(r._key, o), this;
|
|
5577
5577
|
}, t.prototype.update = function(t, e, n) {
|
|
5578
5578
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
5579
|
-
var o, a =
|
|
5579
|
+
var o, a = Nr(t, this._firestore);
|
|
5580
5580
|
// For Compat types, we have to "extract" the underlying types before
|
|
5581
5581
|
// performing validation.
|
|
5582
5582
|
return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(this._dataReader, "Transaction.update", a._key, e, n, r) : On(this._dataReader, "Transaction.update", a._key, e),
|
|
@@ -5589,7 +5589,7 @@ function Pr(t, e) {
|
|
|
5589
5589
|
* @returns This `Transaction` instance. Used for chaining method calls.
|
|
5590
5590
|
*/
|
|
5591
5591
|
t.prototype.delete = function(t) {
|
|
5592
|
-
var e =
|
|
5592
|
+
var e = Nr(t, this._firestore);
|
|
5593
5593
|
return this._transaction.delete(e._key), this;
|
|
5594
5594
|
}, t;
|
|
5595
5595
|
}();
|
|
@@ -5629,7 +5629,7 @@ function Pr(t, e) {
|
|
|
5629
5629
|
*/
|
|
5630
5630
|
function Rr(t, e) {
|
|
5631
5631
|
var n = Ze(t = st(t, en)), r = new x;
|
|
5632
|
-
return new
|
|
5632
|
+
return new Fr(new jr, n, (function(n) {
|
|
5633
5633
|
return e(new Lr(t, n));
|
|
5634
5634
|
}), r).run(), r.promise
|
|
5635
5635
|
/**
|
|
@@ -5647,7 +5647,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
|
|
|
5647
5647
|
return n && i._setSettings(n), i;
|
|
5648
5648
|
}), "PUBLIC")),
|
|
5649
5649
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
5650
|
-
a("firestore-lite", "3.4.2-canary.
|
|
5650
|
+
a("firestore-lite", "3.4.2-canary.ff2f7d4c8", ""), a("firestore-lite", "3.4.2-canary.ff2f7d4c8", "esm5");
|
|
5651
5651
|
|
|
5652
|
-
export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion,
|
|
5652
|
+
export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion, fn as collection, ln as collectionGroup, on as connectFirestoreEmulator, Tr as deleteDoc, Er as deleteField, hn as doc, yn as documentId, lr as endAt, fr as endBefore, gr as getDoc, wr as getDocs, rn as getFirestore, Vr as increment, nn as initializeFirestore, ir as limit, or as limitToLast, nr as orderBy, Jn as query, dn as queryEqual, pn as refEqual, Rr as runTransaction, Ir as serverTimestamp, br as setDoc, g as setLogLevel, Yn as snapshotEqual, ur as startAfter, sr as startAt, an as terminate, _r as updateDoc, tr as where, Pr as writeBatch };
|
|
5653
5653
|
//# sourceMappingURL=index.browser.esm5.js.map
|