@entropic-bond/firebase 1.13.23 → 1.13.25
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.
|
@@ -8,7 +8,7 @@ const ih = function(n) {
|
|
|
8
8
|
s < 128 ? e[t++] = s : s < 2048 ? (e[t++] = s >> 6 | 192, e[t++] = s & 63 | 128) : (s & 64512) === 55296 && r + 1 < n.length && (n.charCodeAt(r + 1) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (n.charCodeAt(++r) & 1023), e[t++] = s >> 18 | 240, e[t++] = s >> 12 & 63 | 128, e[t++] = s >> 6 & 63 | 128, e[t++] = s & 63 | 128) : (e[t++] = s >> 12 | 224, e[t++] = s >> 6 & 63 | 128, e[t++] = s & 63 | 128);
|
|
9
9
|
}
|
|
10
10
|
return e;
|
|
11
|
-
},
|
|
11
|
+
}, Wp = function(n) {
|
|
12
12
|
const e = [];
|
|
13
13
|
let t = 0, r = 0;
|
|
14
14
|
for (; t < n.length; ) {
|
|
@@ -112,7 +112,7 @@ const ih = function(n) {
|
|
|
112
112
|
* @return string representing the decoded value.
|
|
113
113
|
*/
|
|
114
114
|
decodeString(n, e) {
|
|
115
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
|
115
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Wp(this.decodeStringToByteArray(n, e));
|
|
116
116
|
},
|
|
117
117
|
/**
|
|
118
118
|
* Base64-decode a string.
|
|
@@ -139,7 +139,7 @@ const ih = function(n) {
|
|
|
139
139
|
++s;
|
|
140
140
|
const m = s < n.length ? t[n.charAt(s)] : 64;
|
|
141
141
|
if (++s, i == null || c == null || d == null || m == null)
|
|
142
|
-
throw new
|
|
142
|
+
throw new Hp();
|
|
143
143
|
const _ = i << 2 | c >> 4;
|
|
144
144
|
if (r.push(_), d !== 64) {
|
|
145
145
|
const R = c << 4 & 240 | d >> 2;
|
|
@@ -164,7 +164,7 @@ const ih = function(n) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
|
-
class
|
|
167
|
+
class Hp extends Error {
|
|
168
168
|
constructor() {
|
|
169
169
|
super(...arguments), this.name = "DecodeBase64StringError";
|
|
170
170
|
}
|
|
@@ -421,10 +421,10 @@ function um() {
|
|
|
421
421
|
const lm = "FirebaseError";
|
|
422
422
|
class Xe extends Error {
|
|
423
423
|
constructor(e, t, r) {
|
|
424
|
-
super(t), this.code = e, this.customData = r, this.name = lm, Object.setPrototypeOf(this, Xe.prototype), Error.captureStackTrace && Error.captureStackTrace(this,
|
|
424
|
+
super(t), this.code = e, this.customData = r, this.name = lm, Object.setPrototypeOf(this, Xe.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Wr.prototype.create);
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
class
|
|
427
|
+
class Wr {
|
|
428
428
|
constructor(e, t, r) {
|
|
429
429
|
this.service = e, this.serviceName = t, this.errors = r;
|
|
430
430
|
}
|
|
@@ -468,7 +468,7 @@ function dn(n, e) {
|
|
|
468
468
|
function du(n) {
|
|
469
469
|
return n !== null && typeof n == "object";
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Hr(n) {
|
|
472
472
|
const e = [];
|
|
473
473
|
for (const [t, r] of Object.entries(n))
|
|
474
474
|
Array.isArray(r) ? r.forEach((s) => {
|
|
@@ -593,7 +593,7 @@ function lo() {
|
|
|
593
593
|
function J(n) {
|
|
594
594
|
return n && n._delegate ? n._delegate : n;
|
|
595
595
|
}
|
|
596
|
-
class
|
|
596
|
+
class Tt {
|
|
597
597
|
/**
|
|
598
598
|
*
|
|
599
599
|
* @param name The public service name, e.g. app, auth, firestore, database
|
|
@@ -814,23 +814,23 @@ class Tm {
|
|
|
814
814
|
return Array.from(this.providers.values());
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
var
|
|
817
|
+
var W;
|
|
818
818
|
(function(n) {
|
|
819
819
|
n[n.DEBUG = 0] = "DEBUG", n[n.VERBOSE = 1] = "VERBOSE", n[n.INFO = 2] = "INFO", n[n.WARN = 3] = "WARN", n[n.ERROR = 4] = "ERROR", n[n.SILENT = 5] = "SILENT";
|
|
820
|
-
})(
|
|
820
|
+
})(W || (W = {}));
|
|
821
821
|
const wm = {
|
|
822
|
-
debug:
|
|
823
|
-
verbose:
|
|
824
|
-
info:
|
|
825
|
-
warn:
|
|
826
|
-
error:
|
|
827
|
-
silent:
|
|
828
|
-
}, Im =
|
|
829
|
-
[
|
|
830
|
-
[
|
|
831
|
-
[
|
|
832
|
-
[
|
|
833
|
-
[
|
|
822
|
+
debug: W.DEBUG,
|
|
823
|
+
verbose: W.VERBOSE,
|
|
824
|
+
info: W.INFO,
|
|
825
|
+
warn: W.WARN,
|
|
826
|
+
error: W.ERROR,
|
|
827
|
+
silent: W.SILENT
|
|
828
|
+
}, Im = W.INFO, vm = {
|
|
829
|
+
[W.DEBUG]: "log",
|
|
830
|
+
[W.VERBOSE]: "log",
|
|
831
|
+
[W.INFO]: "info",
|
|
832
|
+
[W.WARN]: "warn",
|
|
833
|
+
[W.ERROR]: "error"
|
|
834
834
|
}, Am = (n, e, ...t) => {
|
|
835
835
|
if (e < n.logLevel)
|
|
836
836
|
return;
|
|
@@ -854,7 +854,7 @@ class ia {
|
|
|
854
854
|
return this._logLevel;
|
|
855
855
|
}
|
|
856
856
|
set logLevel(e) {
|
|
857
|
-
if (!(e in
|
|
857
|
+
if (!(e in W))
|
|
858
858
|
throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
|
|
859
859
|
this._logLevel = e;
|
|
860
860
|
}
|
|
@@ -880,19 +880,19 @@ class ia {
|
|
|
880
880
|
* The functions below are all based on the `console` interface
|
|
881
881
|
*/
|
|
882
882
|
debug(...e) {
|
|
883
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
883
|
+
this._userLogHandler && this._userLogHandler(this, W.DEBUG, ...e), this._logHandler(this, W.DEBUG, ...e);
|
|
884
884
|
}
|
|
885
885
|
log(...e) {
|
|
886
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
886
|
+
this._userLogHandler && this._userLogHandler(this, W.VERBOSE, ...e), this._logHandler(this, W.VERBOSE, ...e);
|
|
887
887
|
}
|
|
888
888
|
info(...e) {
|
|
889
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
889
|
+
this._userLogHandler && this._userLogHandler(this, W.INFO, ...e), this._logHandler(this, W.INFO, ...e);
|
|
890
890
|
}
|
|
891
891
|
warn(...e) {
|
|
892
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
892
|
+
this._userLogHandler && this._userLogHandler(this, W.WARN, ...e), this._logHandler(this, W.WARN, ...e);
|
|
893
893
|
}
|
|
894
894
|
error(...e) {
|
|
895
|
-
this._userLogHandler && this._userLogHandler(this,
|
|
895
|
+
this._userLogHandler && this._userLogHandler(this, W.ERROR, ...e), this._logHandler(this, W.ERROR, ...e);
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
898
|
const Rm = (n, e) => e.some((t) => n instanceof t);
|
|
@@ -919,7 +919,7 @@ function Cm(n) {
|
|
|
919
919
|
const s = () => {
|
|
920
920
|
n.removeEventListener("success", i), n.removeEventListener("error", a);
|
|
921
921
|
}, i = () => {
|
|
922
|
-
t(
|
|
922
|
+
t(Ft(n.result)), s();
|
|
923
923
|
}, a = () => {
|
|
924
924
|
r(n.error), s();
|
|
925
925
|
};
|
|
@@ -955,7 +955,7 @@ let Oo = {
|
|
|
955
955
|
if (e === "store")
|
|
956
956
|
return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
|
|
957
957
|
}
|
|
958
|
-
return
|
|
958
|
+
return Ft(n[e]);
|
|
959
959
|
},
|
|
960
960
|
set(n, e, t) {
|
|
961
961
|
return n[e] = t, !0;
|
|
@@ -970,17 +970,17 @@ function km(n) {
|
|
|
970
970
|
function Nm(n) {
|
|
971
971
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
|
972
972
|
const r = n.call(fo(this), e, ...t);
|
|
973
|
-
return fh.set(r, e.sort ? e.sort() : [e]),
|
|
973
|
+
return fh.set(r, e.sort ? e.sort() : [e]), Ft(r);
|
|
974
974
|
} : Pm().includes(n) ? function(...e) {
|
|
975
|
-
return n.apply(fo(this), e),
|
|
975
|
+
return n.apply(fo(this), e), Ft(dh.get(this));
|
|
976
976
|
} : function(...e) {
|
|
977
|
-
return
|
|
977
|
+
return Ft(n.apply(fo(this), e));
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
980
|
function Dm(n) {
|
|
981
981
|
return typeof n == "function" ? Nm(n) : (n instanceof IDBTransaction && Sm(n), Rm(n, bm()) ? new Proxy(n, Oo) : n);
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function Ft(n) {
|
|
984
984
|
if (n instanceof IDBRequest)
|
|
985
985
|
return Cm(n);
|
|
986
986
|
if (ho.has(n))
|
|
@@ -990,9 +990,9 @@ function Ut(n) {
|
|
|
990
990
|
}
|
|
991
991
|
const fo = (n) => oa.get(n);
|
|
992
992
|
function Om(n, e, { blocked: t, upgrade: r, blocking: s, terminated: i } = {}) {
|
|
993
|
-
const a = indexedDB.open(n, e), c =
|
|
993
|
+
const a = indexedDB.open(n, e), c = Ft(a);
|
|
994
994
|
return r && a.addEventListener("upgradeneeded", (l) => {
|
|
995
|
-
r(
|
|
995
|
+
r(Ft(a.result), l.oldVersion, l.newVersion, Ft(a.transaction), l);
|
|
996
996
|
}), t && a.addEventListener("blocked", (l) => t(
|
|
997
997
|
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
|
998
998
|
l.oldVersion,
|
|
@@ -1050,7 +1050,7 @@ function xm(n) {
|
|
|
1050
1050
|
return n.getComponent()?.type === "VERSION";
|
|
1051
1051
|
}
|
|
1052
1052
|
const Vo = "@firebase/app", gu = "0.14.9";
|
|
1053
|
-
const
|
|
1053
|
+
const wt = new ia("@firebase/app"), Um = "@firebase/app-compat", Fm = "@firebase/analytics-compat", Bm = "@firebase/analytics", qm = "@firebase/app-check-compat", jm = "@firebase/app-check", $m = "@firebase/auth", zm = "@firebase/auth-compat", Wm = "@firebase/database", Hm = "@firebase/data-connect", Gm = "@firebase/database-compat", Km = "@firebase/functions", Qm = "@firebase/functions-compat", Ym = "@firebase/installations", Jm = "@firebase/installations-compat", Xm = "@firebase/messaging", Zm = "@firebase/messaging-compat", eg = "@firebase/performance", tg = "@firebase/performance-compat", ng = "@firebase/remote-config", rg = "@firebase/remote-config-compat", sg = "@firebase/storage", ig = "@firebase/storage-compat", og = "@firebase/firestore", ag = "@firebase/ai", cg = "@firebase/firestore-compat", ug = "firebase", lg = "12.10.0";
|
|
1054
1054
|
const Lo = "[DEFAULT]", hg = {
|
|
1055
1055
|
[Vo]: "fire-core",
|
|
1056
1056
|
[Um]: "fire-core-compat",
|
|
@@ -1060,8 +1060,8 @@ const Lo = "[DEFAULT]", hg = {
|
|
|
1060
1060
|
[qm]: "fire-app-check-compat",
|
|
1061
1061
|
[$m]: "fire-auth",
|
|
1062
1062
|
[zm]: "fire-auth-compat",
|
|
1063
|
-
[
|
|
1064
|
-
[
|
|
1063
|
+
[Wm]: "fire-rtdb",
|
|
1064
|
+
[Hm]: "fire-data-connect",
|
|
1065
1065
|
[Gm]: "fire-rtdb-compat",
|
|
1066
1066
|
[Km]: "fire-fn",
|
|
1067
1067
|
[Qm]: "fire-fn-compat",
|
|
@@ -1087,13 +1087,13 @@ function _u(n, e) {
|
|
|
1087
1087
|
try {
|
|
1088
1088
|
n.container.addComponent(e);
|
|
1089
1089
|
} catch (t) {
|
|
1090
|
-
|
|
1090
|
+
wt.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
1093
|
function $t(n) {
|
|
1094
1094
|
const e = n.name;
|
|
1095
1095
|
if (Mo.has(e))
|
|
1096
|
-
return
|
|
1096
|
+
return wt.debug(`There were multiple attempts to register component ${e}.`), !1;
|
|
1097
1097
|
Mo.set(e, n);
|
|
1098
1098
|
for (const t of js.values())
|
|
1099
1099
|
_u(t, n);
|
|
@@ -1123,10 +1123,10 @@ const fg = {
|
|
|
1123
1123
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1124
1124
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
|
1125
1125
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
|
1126
|
-
},
|
|
1126
|
+
}, Bt = new Wr("app", "Firebase", fg);
|
|
1127
1127
|
class pg {
|
|
1128
1128
|
constructor(e, t, r) {
|
|
1129
|
-
this._isDeleted = !1, this._options = { ...e }, this._config = { ...t }, this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new
|
|
1129
|
+
this._isDeleted = !1, this._options = { ...e }, this._config = { ...t }, this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new Tt(
|
|
1130
1130
|
"app",
|
|
1131
1131
|
() => this,
|
|
1132
1132
|
"PUBLIC"
|
|
@@ -1163,7 +1163,7 @@ class pg {
|
|
|
1163
1163
|
*/
|
|
1164
1164
|
checkDestroyed() {
|
|
1165
1165
|
if (this.isDeleted)
|
|
1166
|
-
throw
|
|
1166
|
+
throw Bt.create("app-deleted", { appName: this._name });
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
const Tn = lg;
|
|
@@ -1176,11 +1176,11 @@ function ph(n, e = {}) {
|
|
|
1176
1176
|
...e
|
|
1177
1177
|
}, s = r.name;
|
|
1178
1178
|
if (typeof s != "string" || !s)
|
|
1179
|
-
throw
|
|
1179
|
+
throw Bt.create("bad-app-name", {
|
|
1180
1180
|
appName: String(s)
|
|
1181
1181
|
});
|
|
1182
1182
|
if (t || (t = uh()), !t)
|
|
1183
|
-
throw
|
|
1183
|
+
throw Bt.create(
|
|
1184
1184
|
"no-options"
|
|
1185
1185
|
/* AppError.NO_OPTIONS */
|
|
1186
1186
|
);
|
|
@@ -1188,7 +1188,7 @@ function ph(n, e = {}) {
|
|
|
1188
1188
|
if (i) {
|
|
1189
1189
|
if (dn(t, i.options) && dn(r, i.config))
|
|
1190
1190
|
return i;
|
|
1191
|
-
throw
|
|
1191
|
+
throw Bt.create("duplicate-app", { appName: s });
|
|
1192
1192
|
}
|
|
1193
1193
|
const a = new Tm(s);
|
|
1194
1194
|
for (const l of Mo.values())
|
|
@@ -1201,7 +1201,7 @@ function mi(n = Lo) {
|
|
|
1201
1201
|
if (!e && n === Lo && uh())
|
|
1202
1202
|
return ph();
|
|
1203
1203
|
if (!e)
|
|
1204
|
-
throw
|
|
1204
|
+
throw Bt.create("no-app", { appName: n });
|
|
1205
1205
|
return e;
|
|
1206
1206
|
}
|
|
1207
1207
|
function je(n, e, t) {
|
|
@@ -1212,10 +1212,10 @@ function je(n, e, t) {
|
|
|
1212
1212
|
const a = [
|
|
1213
1213
|
`Unable to register library "${r}" with version "${e}":`
|
|
1214
1214
|
];
|
|
1215
|
-
s && a.push(`library name "${r}" contains illegal characters (whitespace or "/")`), s && i && a.push("and"), i && a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),
|
|
1215
|
+
s && a.push(`library name "${r}" contains illegal characters (whitespace or "/")`), s && i && a.push("and"), i && a.push(`version name "${e}" contains illegal characters (whitespace or "/")`), wt.warn(a.join(" "));
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
|
-
$t(new
|
|
1218
|
+
$t(new Tt(
|
|
1219
1219
|
`${r}-version`,
|
|
1220
1220
|
() => ({ library: r, version: e }),
|
|
1221
1221
|
"VERSION"
|
|
@@ -1237,7 +1237,7 @@ function mh() {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
1239
|
}).catch((n) => {
|
|
1240
|
-
throw
|
|
1240
|
+
throw Bt.create("idb-open", {
|
|
1241
1241
|
originalErrorMessage: n.message
|
|
1242
1242
|
});
|
|
1243
1243
|
})), mo;
|
|
@@ -1248,12 +1248,12 @@ async function _g(n) {
|
|
|
1248
1248
|
return await t.done, r;
|
|
1249
1249
|
} catch (e) {
|
|
1250
1250
|
if (e instanceof Xe)
|
|
1251
|
-
|
|
1251
|
+
wt.warn(e.message);
|
|
1252
1252
|
else {
|
|
1253
|
-
const t =
|
|
1253
|
+
const t = Bt.create("idb-get", {
|
|
1254
1254
|
originalErrorMessage: e?.message
|
|
1255
1255
|
});
|
|
1256
|
-
|
|
1256
|
+
wt.warn(t.message);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
@@ -1263,12 +1263,12 @@ async function yu(n, e) {
|
|
|
1263
1263
|
await r.objectStore(Lr).put(e, gh(n)), await r.done;
|
|
1264
1264
|
} catch (t) {
|
|
1265
1265
|
if (t instanceof Xe)
|
|
1266
|
-
|
|
1266
|
+
wt.warn(t.message);
|
|
1267
1267
|
else {
|
|
1268
|
-
const r =
|
|
1268
|
+
const r = Bt.create("idb-set", {
|
|
1269
1269
|
originalErrorMessage: t?.message
|
|
1270
1270
|
});
|
|
1271
|
-
|
|
1271
|
+
wt.warn(r.message);
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
@@ -1300,7 +1300,7 @@ class Tg {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
return this._storage.overwrite(this._heartbeatsCache);
|
|
1302
1302
|
} catch (e) {
|
|
1303
|
-
|
|
1303
|
+
wt.warn(e);
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
1306
|
/**
|
|
@@ -1317,7 +1317,7 @@ class Tg {
|
|
|
1317
1317
|
const e = Eu(), { heartbeatsToSend: t, unsentEntries: r } = wg(this._heartbeatsCache.heartbeats), s = qs(JSON.stringify({ version: 2, heartbeats: t }));
|
|
1318
1318
|
return this._heartbeatsCache.lastSentHeartbeatDate = e, r.length > 0 ? (this._heartbeatsCache.heartbeats = r, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
|
|
1319
1319
|
} catch (e) {
|
|
1320
|
-
return
|
|
1320
|
+
return wt.warn(e), "";
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
@@ -1406,12 +1406,12 @@ function vg(n) {
|
|
|
1406
1406
|
return e;
|
|
1407
1407
|
}
|
|
1408
1408
|
function Ag(n) {
|
|
1409
|
-
$t(new
|
|
1409
|
+
$t(new Tt(
|
|
1410
1410
|
"platform-logger",
|
|
1411
1411
|
(e) => new Mm(e),
|
|
1412
1412
|
"PRIVATE"
|
|
1413
1413
|
/* ComponentType.PRIVATE */
|
|
1414
|
-
)), $t(new
|
|
1414
|
+
)), $t(new Tt(
|
|
1415
1415
|
"heartbeat",
|
|
1416
1416
|
(e) => new Tg(e),
|
|
1417
1417
|
"PRIVATE"
|
|
@@ -1420,7 +1420,7 @@ function Ag(n) {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
Ag("");
|
|
1422
1422
|
var wu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1423
|
-
var
|
|
1423
|
+
var qt, _h;
|
|
1424
1424
|
(function() {
|
|
1425
1425
|
var n;
|
|
1426
1426
|
function e(w, g) {
|
|
@@ -1644,7 +1644,7 @@ var Bt, _h;
|
|
|
1644
1644
|
for (let A = 0; A < I; A++) T[A] = g > 0 ? w.i(A + E) >>> g | w.i(A + E + 1) << 32 - g : w.i(A + E);
|
|
1645
1645
|
return new a(T, w.h);
|
|
1646
1646
|
}
|
|
1647
|
-
r.prototype.digest = r.prototype.A, r.prototype.reset = r.prototype.u, r.prototype.update = r.prototype.v, _h = r, a.prototype.add = a.prototype.add, a.prototype.multiply = a.prototype.j, a.prototype.modulo = a.prototype.B, a.prototype.compare = a.prototype.l, a.prototype.toNumber = a.prototype.m, a.prototype.toString = a.prototype.toString, a.prototype.getBits = a.prototype.i, a.fromNumber = d, a.fromString = f,
|
|
1647
|
+
r.prototype.digest = r.prototype.A, r.prototype.reset = r.prototype.u, r.prototype.update = r.prototype.v, _h = r, a.prototype.add = a.prototype.add, a.prototype.multiply = a.prototype.j, a.prototype.modulo = a.prototype.B, a.prototype.compare = a.prototype.l, a.prototype.toNumber = a.prototype.m, a.prototype.toString = a.prototype.toString, a.prototype.getBits = a.prototype.i, a.fromNumber = d, a.fromString = f, qt = a;
|
|
1648
1648
|
}).apply(typeof wu < "u" ? wu : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1649
1649
|
var ws = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1650
1650
|
var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
@@ -1894,7 +1894,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1894
1894
|
function mp(o, u, h, p, v, b) {
|
|
1895
1895
|
if (!u) throw Error("Invalid event type");
|
|
1896
1896
|
const O = c(v) ? !!v.capture : !!v;
|
|
1897
|
-
let z =
|
|
1897
|
+
let z = Wi(o);
|
|
1898
1898
|
if (z || (o[ji] = z = new cs(o)), h = z.add(u, h, p, O, b), h.proxy) return h;
|
|
1899
1899
|
if (p = gp(), h.proxy = p, p.src = o, p.listener = h, o.addEventListener) A || (v = O), v === void 0 && (v = !1), o.addEventListener(u.toString(), p, v);
|
|
1900
1900
|
else if (o.attachEvent) o.attachEvent(mc(u.toString()), p);
|
|
@@ -1911,7 +1911,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1911
1911
|
}
|
|
1912
1912
|
function pc(o, u, h, p, v) {
|
|
1913
1913
|
if (Array.isArray(u)) for (var b = 0; b < u.length; b++) pc(o, u[b], h, p, v);
|
|
1914
|
-
else p = c(p) ? !!p.capture : !!p, h = gc(h), o && o[Zt] ? (o = o.i, b = String(u).toString(), b in o.g && (u = o.g[b], h = qi(u, h, p, v), h > -1 && (os(u[h]), Array.prototype.splice.call(u, h, 1), u.length == 0 && (delete o.g[b], o.h--)))) : o && (o =
|
|
1914
|
+
else p = c(p) ? !!p.capture : !!p, h = gc(h), o && o[Zt] ? (o = o.i, b = String(u).toString(), b in o.g && (u = o.g[b], h = qi(u, h, p, v), h > -1 && (os(u[h]), Array.prototype.splice.call(u, h, 1), u.length == 0 && (delete o.g[b], o.h--)))) : o && (o = Wi(o)) && (u = o.g[u.toString()], o = -1, u && (o = qi(u, h, p, v)), (h = o > -1 ? u[o] : null) && zi(h));
|
|
1915
1915
|
}
|
|
1916
1916
|
function zi(o) {
|
|
1917
1917
|
if (typeof o != "number" && o && !o.da) {
|
|
@@ -1919,7 +1919,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1919
1919
|
if (u && u[Zt]) Bi(u.i, o);
|
|
1920
1920
|
else {
|
|
1921
1921
|
var h = o.type, p = o.proxy;
|
|
1922
|
-
u.removeEventListener ? u.removeEventListener(h, p, o.capture) : u.detachEvent ? u.detachEvent(mc(h), p) : u.addListener && u.removeListener && u.removeListener(p), (h =
|
|
1922
|
+
u.removeEventListener ? u.removeEventListener(h, p, o.capture) : u.detachEvent ? u.detachEvent(mc(h), p) : u.addListener && u.removeListener && u.removeListener(p), (h = Wi(u)) ? (Bi(h, o), h.h == 0 && (h.src = null, u[ji] = null)) : os(o);
|
|
1923
1923
|
}
|
|
1924
1924
|
}
|
|
1925
1925
|
}
|
|
@@ -1935,14 +1935,14 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1935
1935
|
}
|
|
1936
1936
|
return o;
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function Wi(o) {
|
|
1939
1939
|
return o = o[ji], o instanceof cs ? o : null;
|
|
1940
1940
|
}
|
|
1941
|
-
var
|
|
1941
|
+
var Hi = "__closure_events_fn_" + (Math.random() * 1e9 >>> 0);
|
|
1942
1942
|
function gc(o) {
|
|
1943
|
-
return typeof o == "function" ? o : (o[
|
|
1943
|
+
return typeof o == "function" ? o : (o[Hi] || (o[Hi] = function(u) {
|
|
1944
1944
|
return o.handleEvent(u);
|
|
1945
|
-
}), o[
|
|
1945
|
+
}), o[Hi]);
|
|
1946
1946
|
}
|
|
1947
1947
|
function ve() {
|
|
1948
1948
|
I.call(this), this.i = new cs(this), this.M = this, this.G = null;
|
|
@@ -2167,7 +2167,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2167
2167
|
for (; u > 0 && o.length; ) h.push(o.shift()), u--;
|
|
2168
2168
|
return o.length && h.push(o.join(":")), h;
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function Pt(o, u, h, p) {
|
|
2171
2171
|
this.j = o, this.i = u, this.l = h, this.S = p || 1, this.V = new ir(this), this.H = 45e3, this.J = null, this.o = !1, this.u = this.B = this.A = this.M = this.F = this.T = this.D = null, this.G = [], this.g = null, this.C = 0, this.m = this.v = null, this.X = -1, this.K = !1, this.P = 0, this.O = null, this.W = this.L = this.U = this.R = !1, this.h = new Cc();
|
|
2172
2172
|
}
|
|
2173
2173
|
function Cc() {
|
|
@@ -2195,14 +2195,14 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2195
2195
|
u
|
|
2196
2196
|
)) : (o.v = "GET", o.g.ea(o.B, o.v, null, u)), ar(), Ip(o.i, o.v, o.B, o.l, o.S, o.u);
|
|
2197
2197
|
}
|
|
2198
|
-
|
|
2198
|
+
Pt.prototype.ba = function(o) {
|
|
2199
2199
|
o = o.target;
|
|
2200
2200
|
const u = this.O;
|
|
2201
|
-
u &&
|
|
2202
|
-
},
|
|
2201
|
+
u && kt(o) == 3 ? u.j() : this.Y(o);
|
|
2202
|
+
}, Pt.prototype.Y = function(o) {
|
|
2203
2203
|
try {
|
|
2204
2204
|
if (o == this.g) e: {
|
|
2205
|
-
const z =
|
|
2205
|
+
const z = kt(this.g), fe = this.g.ya(), X = this.g.ca();
|
|
2206
2206
|
if (!(z < 3) && (z != 3 || this.g && (this.h.h || this.g.la() || Yc(this.g)))) {
|
|
2207
2207
|
this.K || z != 4 || fe == 7 || (fe == 8 || X <= 0 ? ar(3) : ar(2)), Zi(this);
|
|
2208
2208
|
var u = this.g.ca();
|
|
@@ -2261,7 +2261,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2261
2261
|
const u = Yc(o.g);
|
|
2262
2262
|
if (u === "") return "";
|
|
2263
2263
|
let h = "";
|
|
2264
|
-
const p = u.length, v =
|
|
2264
|
+
const p = u.length, v = kt(o.g) == 4;
|
|
2265
2265
|
if (!o.h.i) {
|
|
2266
2266
|
if (typeof TextDecoder > "u") return tn(o), hr(o), "";
|
|
2267
2267
|
o.h.i = new a.TextDecoder();
|
|
@@ -2277,7 +2277,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2277
2277
|
`, h);
|
|
2278
2278
|
return p == -1 ? Ji : (h = Number(u.substring(h, p)), isNaN(h) ? Sc : (p += 1, p + h > u.length ? Ji : (u = u.slice(p, p + h), o.C = p + h, u)));
|
|
2279
2279
|
}
|
|
2280
|
-
|
|
2280
|
+
Pt.prototype.cancel = function() {
|
|
2281
2281
|
this.K = !0, tn(this);
|
|
2282
2282
|
};
|
|
2283
2283
|
function ds(o) {
|
|
@@ -2290,7 +2290,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2290
2290
|
function Zi(o) {
|
|
2291
2291
|
o.D && (a.clearTimeout(o.D), o.D = null);
|
|
2292
2292
|
}
|
|
2293
|
-
|
|
2293
|
+
Pt.prototype.aa = function() {
|
|
2294
2294
|
this.D = null;
|
|
2295
2295
|
const o = Date.now();
|
|
2296
2296
|
o - this.T >= 0 ? (Ap(this.i, this.B), this.M != 2 && (ar(), ke(17)), tn(this), this.m = 2, hr(this)) : Dc(this, this.T - o);
|
|
@@ -2334,17 +2334,17 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2334
2334
|
tt != null && (h.ka = tt, h.j.info("VER=" + h.ka));
|
|
2335
2335
|
const sn = X[4];
|
|
2336
2336
|
sn != null && (h.za = sn, h.j.info("SVER=" + h.za));
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2339
|
-
const
|
|
2340
|
-
if (
|
|
2341
|
-
const Ts =
|
|
2337
|
+
const Nt = X[5];
|
|
2338
|
+
Nt != null && typeof Nt == "number" && Nt > 0 && (p = 1.5 * Nt, h.O = p, h.j.info("backChannelRequestTimeoutMs_=" + p)), p = h;
|
|
2339
|
+
const Dt = o.g;
|
|
2340
|
+
if (Dt) {
|
|
2341
|
+
const Ts = Dt.g ? Dt.g.getResponseHeader("X-Client-Wire-Protocol") : null;
|
|
2342
2342
|
if (Ts) {
|
|
2343
2343
|
var b = p.h;
|
|
2344
2344
|
b.g || Ts.indexOf("spdy") == -1 && Ts.indexOf("quic") == -1 && Ts.indexOf("h2") == -1 || (b.j = b.l, b.g = /* @__PURE__ */ new Set(), b.h && (no(b, b.h), b.h = null));
|
|
2345
2345
|
}
|
|
2346
2346
|
if (p.G) {
|
|
2347
|
-
const uo =
|
|
2347
|
+
const uo = Dt.g ? Dt.g.getResponseHeader("X-HTTP-Session-Id") : null;
|
|
2348
2348
|
uo && (p.wa = uo, ee(p.J, p.G, uo));
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
@@ -2414,18 +2414,18 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2414
2414
|
}
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2417
|
+
function Ct(o) {
|
|
2418
2418
|
this.g = this.o = this.j = "", this.u = null, this.m = this.h = "", this.l = !1;
|
|
2419
2419
|
let u;
|
|
2420
|
-
o instanceof
|
|
2420
|
+
o instanceof Ct ? (this.l = o.l, dr(this, o.j), this.o = o.o, this.g = o.g, fr(this, o.u), this.h = o.h, ro(this, zc(o.i)), this.m = o.m) : o && (u = String(o).match(Uc)) ? (this.l = !1, dr(this, u[1] || "", !0), this.o = pr(u[2] || ""), this.g = pr(u[3] || "", !0), fr(this, u[4]), this.h = pr(u[5] || "", !0), ro(this, u[6] || "", !0), this.m = pr(u[7] || "")) : (this.l = !1, this.i = new gr(null, this.l));
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
Ct.prototype.toString = function() {
|
|
2423
2423
|
const o = [];
|
|
2424
2424
|
var u = this.j;
|
|
2425
2425
|
u && o.push(mr(u, Fc, !0), ":");
|
|
2426
2426
|
var h = this.g;
|
|
2427
2427
|
return (h || u == "file") && (o.push("//"), (u = this.o) && o.push(mr(u, Fc, !0), "@"), o.push(lr(h).replace(/%25([0-9a-fA-F]{2})/g, "%$1")), h = this.u, h != null && o.push(":", String(h))), (h = this.h) && (this.g && h.charAt(0) != "/" && o.push("/"), o.push(mr(h, h.charAt(0) == "/" ? Op : Dp, !0))), (h = this.i.toString()) && o.push("?", h), (h = this.m) && o.push("#", mr(h, Lp)), o.join("");
|
|
2428
|
-
},
|
|
2428
|
+
}, Ct.prototype.resolve = function(o) {
|
|
2429
2429
|
const u = et(this);
|
|
2430
2430
|
let h = !!o.j;
|
|
2431
2431
|
h ? dr(u, o.j) : h = !!o.o, h ? u.o = o.o : h = !!o.g, h ? u.g = o.g : h = o.u != null;
|
|
@@ -2451,7 +2451,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2451
2451
|
return h ? u.h = p : h = o.i.toString() !== "", h ? ro(u, zc(o.i)) : h = !!o.m, h && (u.m = o.m), u;
|
|
2452
2452
|
};
|
|
2453
2453
|
function et(o) {
|
|
2454
|
-
return new
|
|
2454
|
+
return new Ct(o);
|
|
2455
2455
|
}
|
|
2456
2456
|
function dr(o, u, h) {
|
|
2457
2457
|
o.j = h ? pr(u, !0) : u, o.j && (o.j = o.j.replace(/:$/, ""));
|
|
@@ -2554,22 +2554,22 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2554
2554
|
const h = new ur();
|
|
2555
2555
|
if (a.Image) {
|
|
2556
2556
|
const p = new Image();
|
|
2557
|
-
p.onload = f(
|
|
2557
|
+
p.onload = f(St, h, "TestLoadImage: loaded", !0, u, p), p.onerror = f(St, h, "TestLoadImage: error", !1, u, p), p.onabort = f(St, h, "TestLoadImage: abort", !1, u, p), p.ontimeout = f(St, h, "TestLoadImage: timeout", !1, u, p), a.setTimeout(function() {
|
|
2558
2558
|
p.ontimeout && p.ontimeout();
|
|
2559
2559
|
}, 1e4), p.src = o;
|
|
2560
2560
|
} else u(!1);
|
|
2561
2561
|
}
|
|
2562
2562
|
function Up(o, u) {
|
|
2563
2563
|
const h = new ur(), p = new AbortController(), v = setTimeout(() => {
|
|
2564
|
-
p.abort(),
|
|
2564
|
+
p.abort(), St(h, "TestPingServer: timeout", !1, u);
|
|
2565
2565
|
}, 1e4);
|
|
2566
2566
|
fetch(o, { signal: p.signal }).then((b) => {
|
|
2567
|
-
clearTimeout(v), b.ok ?
|
|
2567
|
+
clearTimeout(v), b.ok ? St(h, "TestPingServer: ok", !0, u) : St(h, "TestPingServer: server error", !1, u);
|
|
2568
2568
|
}).catch(() => {
|
|
2569
|
-
clearTimeout(v),
|
|
2569
|
+
clearTimeout(v), St(h, "TestPingServer: error", !1, u);
|
|
2570
2570
|
});
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function St(o, u, h, p, v) {
|
|
2573
2573
|
try {
|
|
2574
2574
|
v && (v.onload = null, v.onerror = null, v.onabort = null, v.ontimeout = null), p(h);
|
|
2575
2575
|
} catch {
|
|
@@ -2606,10 +2606,10 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2606
2606
|
if (this.responseType) throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');
|
|
2607
2607
|
this.response = [];
|
|
2608
2608
|
} else this.response = this.responseText = "", this.B = new TextDecoder();
|
|
2609
|
-
|
|
2609
|
+
Wc(this);
|
|
2610
2610
|
} else o.text().then(this.Oa.bind(this), this.ga.bind(this));
|
|
2611
2611
|
};
|
|
2612
|
-
function
|
|
2612
|
+
function Wc(o) {
|
|
2613
2613
|
o.j.read().then(o.Ma.bind(o)).catch(o.ga.bind(o));
|
|
2614
2614
|
}
|
|
2615
2615
|
n.Ma = function(o) {
|
|
@@ -2619,7 +2619,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2619
2619
|
var u = o.value ? o.value : new Uint8Array(0);
|
|
2620
2620
|
(u = this.B.decode(u, { stream: !o.done })) && (this.response = this.responseText += u);
|
|
2621
2621
|
}
|
|
2622
|
-
o.done ? _r(this) : yr(this), this.readyState == 3 &&
|
|
2622
|
+
o.done ? _r(this) : yr(this), this.readyState == 3 && Wc(this);
|
|
2623
2623
|
}
|
|
2624
2624
|
}, n.Oa = function(o) {
|
|
2625
2625
|
this.g && (this.response = this.responseText = o, _r(this));
|
|
@@ -2650,7 +2650,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2650
2650
|
}, set: function(o) {
|
|
2651
2651
|
this.m = o ? "include" : "same-origin";
|
|
2652
2652
|
} });
|
|
2653
|
-
function
|
|
2653
|
+
function Hc(o) {
|
|
2654
2654
|
let u = "";
|
|
2655
2655
|
return as(o, function(h, p) {
|
|
2656
2656
|
u += p, u += ":", u += h, u += `\r
|
|
@@ -2665,7 +2665,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2665
2665
|
}
|
|
2666
2666
|
p = !0;
|
|
2667
2667
|
}
|
|
2668
|
-
p || (h =
|
|
2668
|
+
p || (h = Hc(h), typeof o == "string" ? h != null && lr(h) : ee(o, u, h));
|
|
2669
2669
|
}
|
|
2670
2670
|
function oe(o) {
|
|
2671
2671
|
ve.call(this), this.headers = /* @__PURE__ */ new Map(), this.L = o || null, this.h = !1, this.g = null, this.D = "", this.o = 0, this.l = "", this.j = this.B = this.v = this.A = !1, this.m = null, this.F = "", this.H = !1;
|
|
@@ -2712,8 +2712,8 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2712
2712
|
};
|
|
2713
2713
|
function Qc(o) {
|
|
2714
2714
|
if (o.h && typeof i < "u") {
|
|
2715
|
-
if (o.v &&
|
|
2716
|
-
else if (Se(o, "readystatechange"),
|
|
2715
|
+
if (o.v && kt(o) == 4) setTimeout(o.Ca.bind(o), 0);
|
|
2716
|
+
else if (Se(o, "readystatechange"), kt(o) == 4) {
|
|
2717
2717
|
o.h = !1;
|
|
2718
2718
|
try {
|
|
2719
2719
|
const b = o.ca();
|
|
@@ -2743,7 +2743,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2743
2743
|
else {
|
|
2744
2744
|
o.o = 6;
|
|
2745
2745
|
try {
|
|
2746
|
-
var v =
|
|
2746
|
+
var v = kt(o) > 2 ? o.g.statusText : "";
|
|
2747
2747
|
} catch {
|
|
2748
2748
|
v = "";
|
|
2749
2749
|
}
|
|
@@ -2769,12 +2769,12 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2769
2769
|
n.isActive = function() {
|
|
2770
2770
|
return !!this.g;
|
|
2771
2771
|
};
|
|
2772
|
-
function
|
|
2772
|
+
function kt(o) {
|
|
2773
2773
|
return o.g ? o.g.readyState : 0;
|
|
2774
2774
|
}
|
|
2775
2775
|
n.ca = function() {
|
|
2776
2776
|
try {
|
|
2777
|
-
return
|
|
2777
|
+
return kt(this) > 2 ? this.g.status : -1;
|
|
2778
2778
|
} catch {
|
|
2779
2779
|
return -1;
|
|
2780
2780
|
}
|
|
@@ -2808,7 +2808,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2808
2808
|
}
|
|
2809
2809
|
function jp(o) {
|
|
2810
2810
|
const u = {};
|
|
2811
|
-
o = (o.g &&
|
|
2811
|
+
o = (o.g && kt(o) >= 2 && o.g.getAllResponseHeaders() || "").split(`\r
|
|
2812
2812
|
`);
|
|
2813
2813
|
for (let p = 0; p < o.length; p++) {
|
|
2814
2814
|
if (y(o[p])) continue;
|
|
@@ -2840,7 +2840,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2840
2840
|
function oo(o) {
|
|
2841
2841
|
if (Xc(o), o.I == 3) {
|
|
2842
2842
|
var u = o.V++, h = et(o.J);
|
|
2843
|
-
if (ee(h, "SID", o.M), ee(h, "RID", u), ee(h, "TYPE", "terminate"), Tr(o, h), u = new
|
|
2843
|
+
if (ee(h, "SID", o.M), ee(h, "RID", u), ee(h, "TYPE", "terminate"), Tr(o, h), u = new Pt(o, o.j, u), u.M = 2, u.A = fs(et(h)), h = !1, a.navigator && a.navigator.sendBeacon) try {
|
|
2844
2844
|
h = a.navigator.sendBeacon(u.A.toString(), "");
|
|
2845
2845
|
} catch {
|
|
2846
2846
|
}
|
|
@@ -2868,7 +2868,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2868
2868
|
if (this.m) if (this.m = null, this.I == 1) {
|
|
2869
2869
|
if (!o) {
|
|
2870
2870
|
this.V = Math.floor(Math.random() * 1e5), o = this.V++;
|
|
2871
|
-
const v = new
|
|
2871
|
+
const v = new Pt(this, this.j, o);
|
|
2872
2872
|
let b = this.o;
|
|
2873
2873
|
if (this.U && (b ? (b = lc(b), dc(b, this.U)) : b = this.U), this.u !== null || this.R || (v.J = b, b = null), this.S) e: {
|
|
2874
2874
|
for (var u = 0, h = 0; h < this.i.length; h++) {
|
|
@@ -2893,7 +2893,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2893
2893
|
u = 1e3;
|
|
2894
2894
|
}
|
|
2895
2895
|
else u = 1e3;
|
|
2896
|
-
u = eu(this, v, u), h = et(this.J), ee(h, "RID", o), ee(h, "CVER", 22), this.G && ee(h, "X-HTTP-Session-Id", this.G), Tr(this, h), b && (this.R ? u = "headers=" + lr(
|
|
2896
|
+
u = eu(this, v, u), h = et(this.J), ee(h, "RID", o), ee(h, "CVER", 22), this.G && ee(h, "X-HTTP-Session-Id", this.G), Tr(this, h), b && (this.R ? u = "headers=" + lr(Hc(b)) + "&" + u : this.u && io(h, this.u, b)), no(this.h, v), this.Ra && ee(h, "TYPE", "init"), this.S ? (ee(h, "$req", u), ee(h, "SID", "null"), v.U = !0, Xi(v, h, null)) : Xi(v, h, u), this.I = 2;
|
|
2897
2897
|
}
|
|
2898
2898
|
} else this.I == 3 && (o ? Zc(this, o) : this.i.length == 0 || Vc(this.h) || Zc(this));
|
|
2899
2899
|
};
|
|
@@ -2901,7 +2901,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2901
2901
|
var h;
|
|
2902
2902
|
u ? h = u.l : h = o.V++;
|
|
2903
2903
|
const p = et(o.J);
|
|
2904
|
-
ee(p, "SID", o.M), ee(p, "RID", h), ee(p, "AID", o.K), Tr(o, p), o.u && o.o && io(p, o.u, o.o), h = new
|
|
2904
|
+
ee(p, "SID", o.M), ee(p, "RID", h), ee(p, "AID", o.K), Tr(o, p), o.u && o.o && io(p, o.u, o.o), h = new Pt(o, o.j, h, o.D + 1), o.u === null && (h.J = o.o), u && (o.i = u.G.concat(o.i)), u = eu(o, h, 1e3), h.H = Math.round(o.va * 0.5) + Math.round(o.va * 0.5 * Math.random()), no(o.h, h), Xi(h, p, u);
|
|
2905
2905
|
}
|
|
2906
2906
|
function Tr(o, u) {
|
|
2907
2907
|
o.H && as(o.H, function(h, p) {
|
|
@@ -2928,9 +2928,9 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2928
2928
|
b = "req" + b + "_" || "";
|
|
2929
2929
|
try {
|
|
2930
2930
|
var O = tt instanceof Map ? tt : Object.entries(tt);
|
|
2931
|
-
for (const [sn,
|
|
2932
|
-
let
|
|
2933
|
-
c(
|
|
2931
|
+
for (const [sn, Nt] of O) {
|
|
2932
|
+
let Dt = Nt;
|
|
2933
|
+
c(Nt) && (Dt = Gi(Nt)), fe.push(b + sn + "=" + encodeURIComponent(Dt));
|
|
2934
2934
|
}
|
|
2935
2935
|
} catch (sn) {
|
|
2936
2936
|
throw fe.push(b + "type=" + encodeURIComponent("_badmap")), sn;
|
|
@@ -2970,7 +2970,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2970
2970
|
o.B != null && (a.clearTimeout(o.B), o.B = null);
|
|
2971
2971
|
}
|
|
2972
2972
|
function nu(o) {
|
|
2973
|
-
o.g = new
|
|
2973
|
+
o.g = new Pt(o, o.j, "rpc", o.Y), o.u === null && (o.g.J = o.o), o.g.P = 0;
|
|
2974
2974
|
var u = et(o.na);
|
|
2975
2975
|
ee(u, "RID", "rpc"), ee(u, "SID", o.M), ee(u, "AID", o.K), ee(u, "CI", o.F ? "0" : "1"), !o.F && o.ia && ee(u, "TO", o.ia), ee(u, "TYPE", "xmlhttp"), Tr(o, u), o.u && o.o && io(u, o.u, o.o), o.O && (o.g.H = o.O);
|
|
2976
2976
|
var h = o.g;
|
|
@@ -3018,7 +3018,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
3018
3018
|
if (o.j.info("Error code " + u), u == 2) {
|
|
3019
3019
|
var h = d(o.bb, o), p = o.Ua;
|
|
3020
3020
|
const v = !p;
|
|
3021
|
-
p = new
|
|
3021
|
+
p = new Ct(p || "//www.google.com/images/cleardot.gif"), a.location && a.location.protocol == "http" || dr(p, "https"), fs(p), v ? xp(p.toString(), h) : Up(p.toString(), h);
|
|
3022
3022
|
} else ke(2);
|
|
3023
3023
|
o.I = 0, o.l && o.l.pa(u), iu(o), Xc(o);
|
|
3024
3024
|
}
|
|
@@ -3032,12 +3032,12 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
3034
3034
|
function ou(o, u, h) {
|
|
3035
|
-
var p = h instanceof
|
|
3035
|
+
var p = h instanceof Ct ? et(h) : new Ct(h);
|
|
3036
3036
|
if (p.g != "") u && (p.g = u + "." + p.g), fr(p, p.u);
|
|
3037
3037
|
else {
|
|
3038
3038
|
var v = a.location;
|
|
3039
3039
|
p = v.protocol, u = u ? u + "." + v.hostname : v.hostname, v = +v.port;
|
|
3040
|
-
const b = new
|
|
3040
|
+
const b = new Ct(null);
|
|
3041
3041
|
p && dr(b, p), u && (b.g = u), v && fr(b, v), h && (b.h = h), p = b;
|
|
3042
3042
|
}
|
|
3043
3043
|
return h = o.G, u = o.wa, h && u && ee(p, h, u), ee(p, "VER", o.ka), Tr(o, p), p;
|
|
@@ -3147,19 +3147,19 @@ function Sn() {
|
|
|
3147
3147
|
return fn.logLevel;
|
|
3148
3148
|
}
|
|
3149
3149
|
function V(n, ...e) {
|
|
3150
|
-
if (fn.logLevel <=
|
|
3150
|
+
if (fn.logLevel <= W.DEBUG) {
|
|
3151
3151
|
const t = e.map(aa);
|
|
3152
3152
|
fn.debug(`Firestore (${Qn}): ${n}`, ...t);
|
|
3153
3153
|
}
|
|
3154
3154
|
}
|
|
3155
|
-
function
|
|
3156
|
-
if (fn.logLevel <=
|
|
3155
|
+
function It(n, ...e) {
|
|
3156
|
+
if (fn.logLevel <= W.ERROR) {
|
|
3157
3157
|
const t = e.map(aa);
|
|
3158
3158
|
fn.error(`Firestore (${Qn}): ${n}`, ...t);
|
|
3159
3159
|
}
|
|
3160
3160
|
}
|
|
3161
3161
|
function pn(n, ...e) {
|
|
3162
|
-
if (fn.logLevel <=
|
|
3162
|
+
if (fn.logLevel <= W.WARN) {
|
|
3163
3163
|
const t = e.map(aa);
|
|
3164
3164
|
fn.warn(`Firestore (${Qn}): ${n}`, ...t);
|
|
3165
3165
|
}
|
|
@@ -3185,7 +3185,7 @@ function vh(n, e, t) {
|
|
|
3185
3185
|
} catch {
|
|
3186
3186
|
r += " CONTEXT: " + t;
|
|
3187
3187
|
}
|
|
3188
|
-
throw
|
|
3188
|
+
throw It(r), new Error(r);
|
|
3189
3189
|
}
|
|
3190
3190
|
function Y(n, e, t, r) {
|
|
3191
3191
|
let s = "Unexpected state";
|
|
@@ -3533,16 +3533,16 @@ class ca {
|
|
|
3533
3533
|
return r;
|
|
3534
3534
|
}
|
|
3535
3535
|
}
|
|
3536
|
-
function
|
|
3536
|
+
function H(n, e) {
|
|
3537
3537
|
return n < e ? -1 : n > e ? 1 : 0;
|
|
3538
3538
|
}
|
|
3539
3539
|
function Uo(n, e) {
|
|
3540
3540
|
const t = Math.min(n.length, e.length);
|
|
3541
3541
|
for (let r = 0; r < t; r++) {
|
|
3542
3542
|
const s = n.charAt(r), i = e.charAt(r);
|
|
3543
|
-
if (s !== i) return go(s) === go(i) ?
|
|
3543
|
+
if (s !== i) return go(s) === go(i) ? H(s, i) : go(s) ? 1 : -1;
|
|
3544
3544
|
}
|
|
3545
|
-
return
|
|
3545
|
+
return H(n.length, e.length);
|
|
3546
3546
|
}
|
|
3547
3547
|
const Og = 55296, Vg = 57343;
|
|
3548
3548
|
function go(n) {
|
|
@@ -3624,7 +3624,7 @@ class nt {
|
|
|
3624
3624
|
const i = nt.compareSegments(e.get(s), t.get(s));
|
|
3625
3625
|
if (i !== 0) return i;
|
|
3626
3626
|
}
|
|
3627
|
-
return
|
|
3627
|
+
return H(e.length, t.length);
|
|
3628
3628
|
}
|
|
3629
3629
|
static compareSegments(e, t) {
|
|
3630
3630
|
const r = nt.isNumericId(e), s = nt.isNumericId(t);
|
|
@@ -3635,7 +3635,7 @@ class nt {
|
|
|
3635
3635
|
return e.startsWith("__id") && e.endsWith("__");
|
|
3636
3636
|
}
|
|
3637
3637
|
static extractNumericId(e) {
|
|
3638
|
-
return
|
|
3638
|
+
return qt.fromString(e.substring(4, e.length - 2));
|
|
3639
3639
|
}
|
|
3640
3640
|
}
|
|
3641
3641
|
class Z extends nt {
|
|
@@ -3939,7 +3939,7 @@ class te {
|
|
|
3939
3939
|
return 1e3 * this.seconds + this.nanoseconds / Pu;
|
|
3940
3940
|
}
|
|
3941
3941
|
_compareTo(e) {
|
|
3942
|
-
return this.seconds === e.seconds ?
|
|
3942
|
+
return this.seconds === e.seconds ? H(this.nanoseconds, e.nanoseconds) : H(this.seconds, e.seconds);
|
|
3943
3943
|
}
|
|
3944
3944
|
/**
|
|
3945
3945
|
* Returns true if this `Timestamp` is equal to the provided one.
|
|
@@ -4037,7 +4037,7 @@ class zt {
|
|
|
4037
4037
|
}
|
|
4038
4038
|
function Bg(n, e) {
|
|
4039
4039
|
let t = n.readTime.compareTo(e.readTime);
|
|
4040
|
-
return t !== 0 ? t : (t = L.comparator(n.documentKey, e.documentKey), t !== 0 ? t :
|
|
4040
|
+
return t !== 0 ? t : (t = L.comparator(n.documentKey, e.documentKey), t !== 0 ? t : H(n.largestBatchId, e.largestBatchId));
|
|
4041
4041
|
}
|
|
4042
4042
|
const qg = "The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";
|
|
4043
4043
|
class jg {
|
|
@@ -4199,12 +4199,12 @@ function zg(n) {
|
|
|
4199
4199
|
return typeof n == "number" && Number.isInteger(n) && !$s(n) && n <= Number.MAX_SAFE_INTEGER && n >= Number.MIN_SAFE_INTEGER;
|
|
4200
4200
|
}
|
|
4201
4201
|
const Ph = "";
|
|
4202
|
-
function
|
|
4202
|
+
function Wg(n) {
|
|
4203
4203
|
let e = "";
|
|
4204
|
-
for (let t = 0; t < n.length; t++) e.length > 0 && (e = Cu(e)), e =
|
|
4204
|
+
for (let t = 0; t < n.length; t++) e.length > 0 && (e = Cu(e)), e = Hg(n.get(t), e);
|
|
4205
4205
|
return Cu(e);
|
|
4206
4206
|
}
|
|
4207
|
-
function
|
|
4207
|
+
function Hg(n, e) {
|
|
4208
4208
|
let t = e;
|
|
4209
4209
|
const r = n.length;
|
|
4210
4210
|
for (let s = 0; s < r; s++) {
|
|
@@ -4731,7 +4731,7 @@ class Ie {
|
|
|
4731
4731
|
return 2 * this.binaryString.length;
|
|
4732
4732
|
}
|
|
4733
4733
|
compareTo(e) {
|
|
4734
|
-
return
|
|
4734
|
+
return H(this.binaryString, e.binaryString);
|
|
4735
4735
|
}
|
|
4736
4736
|
isEqual(e) {
|
|
4737
4737
|
return this.binaryString === e.binaryString;
|
|
@@ -4739,7 +4739,7 @@ class Ie {
|
|
|
4739
4739
|
}
|
|
4740
4740
|
Ie.EMPTY_BYTE_STRING = new Ie("");
|
|
4741
4741
|
const Kg = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
4742
|
-
function
|
|
4742
|
+
function Wt(n) {
|
|
4743
4743
|
if (Y(!!n, 39018), typeof n == "string") {
|
|
4744
4744
|
let e = 0;
|
|
4745
4745
|
const t = Kg.exec(n);
|
|
@@ -4763,7 +4763,7 @@ function Ht(n) {
|
|
|
4763
4763
|
function ce(n) {
|
|
4764
4764
|
return typeof n == "number" ? n : typeof n == "string" ? Number(n) : 0;
|
|
4765
4765
|
}
|
|
4766
|
-
function
|
|
4766
|
+
function Ht(n) {
|
|
4767
4767
|
return typeof n == "string" ? Ie.fromBase64String(n) : Ie.fromUint8Array(n);
|
|
4768
4768
|
}
|
|
4769
4769
|
const kh = "server_timestamp", Nh = "__type__", Dh = "__previous_value__", Oh = "__local_write_time__";
|
|
@@ -4775,7 +4775,7 @@ function Ti(n) {
|
|
|
4775
4775
|
return Ei(e) ? Ti(e) : e;
|
|
4776
4776
|
}
|
|
4777
4777
|
function xr(n) {
|
|
4778
|
-
const e =
|
|
4778
|
+
const e = Wt(n.mapValue.fields[Oh].timestampValue);
|
|
4779
4779
|
return new te(e.seconds, e.nanos);
|
|
4780
4780
|
}
|
|
4781
4781
|
class Qg {
|
|
@@ -4822,7 +4822,7 @@ function Yg(n, e) {
|
|
|
4822
4822
|
}
|
|
4823
4823
|
const Vh = "__type__", Jg = "__max__", vs = {
|
|
4824
4824
|
mapValue: {}
|
|
4825
|
-
}, Lh = "__vector__",
|
|
4825
|
+
}, Lh = "__vector__", Ws = "value";
|
|
4826
4826
|
function Gt(n) {
|
|
4827
4827
|
return "nullValue" in n ? 0 : "booleanValue" in n ? 1 : "integerValue" in n || "doubleValue" in n ? 2 : "timestampValue" in n ? 3 : "stringValue" in n ? 5 : "bytesValue" in n ? 6 : "referenceValue" in n ? 7 : "geoPointValue" in n ? 8 : "arrayValue" in n ? 9 : "mapValue" in n ? Ei(n) ? 4 : Zg(n) ? 9007199254740991 : Xg(n) ? 10 : 11 : x(28295, {
|
|
4828
4828
|
value: n
|
|
@@ -4844,14 +4844,14 @@ function dt(n, e) {
|
|
|
4844
4844
|
return function(s, i) {
|
|
4845
4845
|
if (typeof s.timestampValue == "string" && typeof i.timestampValue == "string" && s.timestampValue.length === i.timestampValue.length)
|
|
4846
4846
|
return s.timestampValue === i.timestampValue;
|
|
4847
|
-
const a =
|
|
4847
|
+
const a = Wt(s.timestampValue), c = Wt(i.timestampValue);
|
|
4848
4848
|
return a.seconds === c.seconds && a.nanos === c.nanos;
|
|
4849
4849
|
}(n, e);
|
|
4850
4850
|
case 5:
|
|
4851
4851
|
return n.stringValue === e.stringValue;
|
|
4852
4852
|
case 6:
|
|
4853
4853
|
return function(s, i) {
|
|
4854
|
-
return
|
|
4854
|
+
return Ht(s.bytesValue).isEqual(Ht(i.bytesValue));
|
|
4855
4855
|
}(n, e);
|
|
4856
4856
|
case 7:
|
|
4857
4857
|
return n.referenceValue === e.referenceValue;
|
|
@@ -4890,13 +4890,13 @@ function Fr(n, e) {
|
|
|
4890
4890
|
function jn(n, e) {
|
|
4891
4891
|
if (n === e) return 0;
|
|
4892
4892
|
const t = Gt(n), r = Gt(e);
|
|
4893
|
-
if (t !== r) return
|
|
4893
|
+
if (t !== r) return H(t, r);
|
|
4894
4894
|
switch (t) {
|
|
4895
4895
|
case 0:
|
|
4896
4896
|
case 9007199254740991:
|
|
4897
4897
|
return 0;
|
|
4898
4898
|
case 1:
|
|
4899
|
-
return
|
|
4899
|
+
return H(n.booleanValue, e.booleanValue);
|
|
4900
4900
|
case 2:
|
|
4901
4901
|
return function(i, a) {
|
|
4902
4902
|
const c = ce(i.integerValue || i.doubleValue), l = ce(a.integerValue || a.doubleValue);
|
|
@@ -4913,28 +4913,28 @@ function jn(n, e) {
|
|
|
4913
4913
|
return Uo(n.stringValue, e.stringValue);
|
|
4914
4914
|
case 6:
|
|
4915
4915
|
return function(i, a) {
|
|
4916
|
-
const c =
|
|
4916
|
+
const c = Ht(i), l = Ht(a);
|
|
4917
4917
|
return c.compareTo(l);
|
|
4918
4918
|
}(n.bytesValue, e.bytesValue);
|
|
4919
4919
|
case 7:
|
|
4920
4920
|
return function(i, a) {
|
|
4921
4921
|
const c = i.split("/"), l = a.split("/");
|
|
4922
4922
|
for (let d = 0; d < c.length && d < l.length; d++) {
|
|
4923
|
-
const f =
|
|
4923
|
+
const f = H(c[d], l[d]);
|
|
4924
4924
|
if (f !== 0) return f;
|
|
4925
4925
|
}
|
|
4926
|
-
return
|
|
4926
|
+
return H(c.length, l.length);
|
|
4927
4927
|
}(n.referenceValue, e.referenceValue);
|
|
4928
4928
|
case 8:
|
|
4929
4929
|
return function(i, a) {
|
|
4930
|
-
const c =
|
|
4931
|
-
return c !== 0 ? c :
|
|
4930
|
+
const c = H(ce(i.latitude), ce(a.latitude));
|
|
4931
|
+
return c !== 0 ? c : H(ce(i.longitude), ce(a.longitude));
|
|
4932
4932
|
}(n.geoPointValue, e.geoPointValue);
|
|
4933
4933
|
case 9:
|
|
4934
4934
|
return Du(n.arrayValue, e.arrayValue);
|
|
4935
4935
|
case 10:
|
|
4936
4936
|
return function(i, a) {
|
|
4937
|
-
const c = i.fields || {}, l = a.fields || {}, d = c[
|
|
4937
|
+
const c = i.fields || {}, l = a.fields || {}, d = c[Ws]?.arrayValue, f = l[Ws]?.arrayValue, m = H(d?.values?.length || 0, f?.values?.length || 0);
|
|
4938
4938
|
return m !== 0 ? m : Du(d, f);
|
|
4939
4939
|
}(n.mapValue, e.mapValue);
|
|
4940
4940
|
case 11:
|
|
@@ -4950,7 +4950,7 @@ function jn(n, e) {
|
|
|
4950
4950
|
const R = jn(c[l[m]], d[f[m]]);
|
|
4951
4951
|
if (R !== 0) return R;
|
|
4952
4952
|
}
|
|
4953
|
-
return
|
|
4953
|
+
return H(l.length, f.length);
|
|
4954
4954
|
}(n.mapValue, e.mapValue);
|
|
4955
4955
|
default:
|
|
4956
4956
|
throw x(23264, {
|
|
@@ -4959,9 +4959,9 @@ function jn(n, e) {
|
|
|
4959
4959
|
}
|
|
4960
4960
|
}
|
|
4961
4961
|
function Nu(n, e) {
|
|
4962
|
-
if (typeof n == "string" && typeof e == "string" && n.length === e.length) return
|
|
4963
|
-
const t =
|
|
4964
|
-
return s !== 0 ? s :
|
|
4962
|
+
if (typeof n == "string" && typeof e == "string" && n.length === e.length) return H(n, e);
|
|
4963
|
+
const t = Wt(n), r = Wt(e), s = H(t.seconds, r.seconds);
|
|
4964
|
+
return s !== 0 ? s : H(t.nanos, r.nanos);
|
|
4965
4965
|
}
|
|
4966
4966
|
function Du(n, e) {
|
|
4967
4967
|
const t = n.values || [], r = e.values || [];
|
|
@@ -4969,17 +4969,17 @@ function Du(n, e) {
|
|
|
4969
4969
|
const i = jn(t[s], r[s]);
|
|
4970
4970
|
if (i) return i;
|
|
4971
4971
|
}
|
|
4972
|
-
return
|
|
4972
|
+
return H(t.length, r.length);
|
|
4973
4973
|
}
|
|
4974
4974
|
function $n(n) {
|
|
4975
4975
|
return Fo(n);
|
|
4976
4976
|
}
|
|
4977
4977
|
function Fo(n) {
|
|
4978
4978
|
return "nullValue" in n ? "null" : "booleanValue" in n ? "" + n.booleanValue : "integerValue" in n ? "" + n.integerValue : "doubleValue" in n ? "" + n.doubleValue : "timestampValue" in n ? function(t) {
|
|
4979
|
-
const r =
|
|
4979
|
+
const r = Wt(t);
|
|
4980
4980
|
return `time(${r.seconds},${r.nanos})`;
|
|
4981
4981
|
}(n.timestampValue) : "stringValue" in n ? n.stringValue : "bytesValue" in n ? function(t) {
|
|
4982
|
-
return
|
|
4982
|
+
return Ht(t).toBase64();
|
|
4983
4983
|
}(n.bytesValue) : "referenceValue" in n ? function(t) {
|
|
4984
4984
|
return L.fromName(t).toString();
|
|
4985
4985
|
}(n.referenceValue) : "geoPointValue" in n ? function(t) {
|
|
@@ -5013,7 +5013,7 @@ function Ds(n) {
|
|
|
5013
5013
|
case 5:
|
|
5014
5014
|
return 2 * n.stringValue.length;
|
|
5015
5015
|
case 6:
|
|
5016
|
-
return
|
|
5016
|
+
return Ht(n.bytesValue).approximateByteSize();
|
|
5017
5017
|
case 7:
|
|
5018
5018
|
return n.referenceValue.length;
|
|
5019
5019
|
case 9:
|
|
@@ -5034,7 +5034,7 @@ function Ds(n) {
|
|
|
5034
5034
|
});
|
|
5035
5035
|
}
|
|
5036
5036
|
}
|
|
5037
|
-
function
|
|
5037
|
+
function Hs(n, e) {
|
|
5038
5038
|
return {
|
|
5039
5039
|
referenceValue: `projects/${n.projectId}/databases/${n.database}/documents/${e.path.canonicalString()}`
|
|
5040
5040
|
};
|
|
@@ -5701,7 +5701,7 @@ function vi(n, e) {
|
|
|
5701
5701
|
function m_(n) {
|
|
5702
5702
|
return n.collectionGroup || (n.path.length % 2 == 1 ? n.path.lastSegment() : n.path.get(n.path.length - 2));
|
|
5703
5703
|
}
|
|
5704
|
-
function
|
|
5704
|
+
function Wh(n) {
|
|
5705
5705
|
return (e, t) => {
|
|
5706
5706
|
let r = !1;
|
|
5707
5707
|
for (const s of Vn(n)) {
|
|
@@ -5779,17 +5779,17 @@ class In {
|
|
|
5779
5779
|
}
|
|
5780
5780
|
}
|
|
5781
5781
|
const __ = new se(L.comparator);
|
|
5782
|
-
function
|
|
5782
|
+
function vt() {
|
|
5783
5783
|
return __;
|
|
5784
5784
|
}
|
|
5785
|
-
const
|
|
5785
|
+
const Hh = new se(L.comparator);
|
|
5786
5786
|
function br(...n) {
|
|
5787
|
-
let e =
|
|
5787
|
+
let e = Hh;
|
|
5788
5788
|
for (const t of n) e = e.insert(t.key, t);
|
|
5789
5789
|
return e;
|
|
5790
5790
|
}
|
|
5791
5791
|
function Gh(n) {
|
|
5792
|
-
let e =
|
|
5792
|
+
let e = Hh;
|
|
5793
5793
|
return n.forEach((t, r) => e = e.insert(t, r.overlayedDocument)), e;
|
|
5794
5794
|
}
|
|
5795
5795
|
function cn() {
|
|
@@ -5807,7 +5807,7 @@ function G(...n) {
|
|
|
5807
5807
|
for (const t of n) e = e.add(t);
|
|
5808
5808
|
return e;
|
|
5809
5809
|
}
|
|
5810
|
-
const T_ = new me(
|
|
5810
|
+
const T_ = new me(H);
|
|
5811
5811
|
function w_() {
|
|
5812
5812
|
return T_;
|
|
5813
5813
|
}
|
|
@@ -6222,7 +6222,7 @@ function V_(n) {
|
|
|
6222
6222
|
}
|
|
6223
6223
|
function nd(n) {
|
|
6224
6224
|
if (n === void 0)
|
|
6225
|
-
return
|
|
6225
|
+
return It("GRPC error has no .code"), P.UNKNOWN;
|
|
6226
6226
|
switch (n) {
|
|
6227
6227
|
case ue.OK:
|
|
6228
6228
|
return P.OK;
|
|
@@ -6268,7 +6268,7 @@ function nd(n) {
|
|
|
6268
6268
|
function L_() {
|
|
6269
6269
|
return new TextEncoder();
|
|
6270
6270
|
}
|
|
6271
|
-
const M_ = new
|
|
6271
|
+
const M_ = new qt([4294967295, 4294967295], 0);
|
|
6272
6272
|
function $u(n) {
|
|
6273
6273
|
const e = L_().encode(n), t = new _h();
|
|
6274
6274
|
return t.update(e), new Uint8Array(t.digest());
|
|
@@ -6291,7 +6291,7 @@ function zu(n) {
|
|
|
6291
6291
|
/* littleEndian= */
|
|
6292
6292
|
!0
|
|
6293
6293
|
);
|
|
6294
|
-
return [new
|
|
6294
|
+
return [new qt([t, r], 0), new qt([s, i], 0)];
|
|
6295
6295
|
}
|
|
6296
6296
|
class ga {
|
|
6297
6297
|
constructor(e, t, r) {
|
|
@@ -6302,13 +6302,13 @@ class ga {
|
|
|
6302
6302
|
if (e.length === 0 && t !== 0)
|
|
6303
6303
|
throw new Pr(`Invalid padding when bitmap length is 0: ${t}`);
|
|
6304
6304
|
this.ge = 8 * e.length - t, // Set the bit count in Integer to avoid repetition in mightContain().
|
|
6305
|
-
this.pe =
|
|
6305
|
+
this.pe = qt.fromNumber(this.ge);
|
|
6306
6306
|
}
|
|
6307
6307
|
// Calculate the ith hash value based on the hashed 64bit integers,
|
|
6308
6308
|
// and calculate its corresponding bit index in the bitmap to be checked.
|
|
6309
6309
|
ye(e, t, r) {
|
|
6310
|
-
let s = e.add(t.multiply(
|
|
6311
|
-
return s.compare(M_) === 1 && (s = new
|
|
6310
|
+
let s = e.add(t.multiply(qt.fromNumber(r)));
|
|
6311
|
+
return s.compare(M_) === 1 && (s = new qt([s.getBits(0), s.getBits(1)], 0)), s.modulo(this.pe).toNumber();
|
|
6312
6312
|
}
|
|
6313
6313
|
// Return whether the bit on the given index in the bitmap is set to 1.
|
|
6314
6314
|
we(e) {
|
|
@@ -6359,7 +6359,7 @@ class Pi {
|
|
|
6359
6359
|
// PORTING NOTE: Multi-tab only
|
|
6360
6360
|
static createSynthesizedRemoteEventForCurrentChange(e, t, r) {
|
|
6361
6361
|
const s = /* @__PURE__ */ new Map();
|
|
6362
|
-
return s.set(e, Yr.createSynthesizedTargetChangeForCurrentChange(e, t, r)), new Pi(B.min(), s, new se(
|
|
6362
|
+
return s.set(e, Yr.createSynthesizedTargetChangeForCurrentChange(e, t, r)), new Pi(B.min(), s, new se(H), vt(), G());
|
|
6363
6363
|
}
|
|
6364
6364
|
}
|
|
6365
6365
|
class Yr {
|
|
@@ -6390,7 +6390,7 @@ class sd {
|
|
|
6390
6390
|
this.state = e, this.targetIds = t, this.resumeToken = r, this.cause = s;
|
|
6391
6391
|
}
|
|
6392
6392
|
}
|
|
6393
|
-
class
|
|
6393
|
+
class Wu {
|
|
6394
6394
|
constructor() {
|
|
6395
6395
|
this.ve = 0, /**
|
|
6396
6396
|
* Keeps track of the document changes since the last raised snapshot.
|
|
@@ -6398,7 +6398,7 @@ class Hu {
|
|
|
6398
6398
|
* These changes are continuously updated as we receive document updates and
|
|
6399
6399
|
* always reflect the current set of changes against the last issued snapshot.
|
|
6400
6400
|
*/
|
|
6401
|
-
this.Fe =
|
|
6401
|
+
this.Fe = Hu(), /** See public getters for explanations of these fields. */
|
|
6402
6402
|
this.Me = Ie.EMPTY_BYTE_STRING, this.xe = !1, /**
|
|
6403
6403
|
* Whether this target state should be included in the next snapshot. We
|
|
6404
6404
|
* initialize to true so that newly-added targets are included in the next
|
|
@@ -6466,7 +6466,7 @@ class Hu {
|
|
|
6466
6466
|
* Resets the document changes and sets `hasPendingChanges` to false.
|
|
6467
6467
|
*/
|
|
6468
6468
|
Ke() {
|
|
6469
|
-
this.Oe = !1, this.Fe =
|
|
6469
|
+
this.Oe = !1, this.Fe = Hu();
|
|
6470
6470
|
}
|
|
6471
6471
|
qe(e, t) {
|
|
6472
6472
|
this.Oe = !0, this.Fe = this.Fe.insert(e, t);
|
|
@@ -6490,13 +6490,13 @@ class x_ {
|
|
|
6490
6490
|
constructor(e) {
|
|
6491
6491
|
this.Ge = e, /** The internal state of all tracked targets. */
|
|
6492
6492
|
this.ze = /* @__PURE__ */ new Map(), /** Keeps track of the documents to update since the last raised snapshot. */
|
|
6493
|
-
this.je =
|
|
6493
|
+
this.je = vt(), this.He = As(), /** A mapping of document keys to their set of target IDs. */
|
|
6494
6494
|
this.Je = As(), /**
|
|
6495
6495
|
* A map of targets with existence filter mismatches. These targets are
|
|
6496
6496
|
* known to be inconsistent and their listens needs to be re-established by
|
|
6497
6497
|
* RemoteStore.
|
|
6498
6498
|
*/
|
|
6499
|
-
this.Ze = new se(
|
|
6499
|
+
this.Ze = new se(H);
|
|
6500
6500
|
}
|
|
6501
6501
|
/**
|
|
6502
6502
|
* Processes and adds the DocumentWatchChange to the current set of changes.
|
|
@@ -6586,7 +6586,7 @@ class x_ {
|
|
|
6586
6586
|
const { bits: { bitmap: r = "", padding: s = 0 }, hashCount: i = 0 } = t;
|
|
6587
6587
|
let a, c;
|
|
6588
6588
|
try {
|
|
6589
|
-
a =
|
|
6589
|
+
a = Ht(r).toUint8Array();
|
|
6590
6590
|
} catch (l) {
|
|
6591
6591
|
if (l instanceof Sh) return pn("Decoding the base64 bloom filter in existence filter failed (" + l.message + "); ignoring the bloom filter and falling back to full re-query."), null;
|
|
6592
6592
|
throw l;
|
|
@@ -6647,7 +6647,7 @@ class x_ {
|
|
|
6647
6647
|
}), c && (r = r.add(i));
|
|
6648
6648
|
}), this.je.forEach((i, a) => a.setReadTime(e));
|
|
6649
6649
|
const s = new Pi(e, t, this.Ze, this.je, r);
|
|
6650
|
-
return this.je =
|
|
6650
|
+
return this.je = vt(), this.He = As(), this.Je = As(), this.Ze = new se(H), s;
|
|
6651
6651
|
}
|
|
6652
6652
|
/**
|
|
6653
6653
|
* Adds the provided document to the internal list of document updates and
|
|
@@ -6701,15 +6701,15 @@ class x_ {
|
|
|
6701
6701
|
}
|
|
6702
6702
|
nt(e) {
|
|
6703
6703
|
let t = this.ze.get(e);
|
|
6704
|
-
return t || (t = new
|
|
6704
|
+
return t || (t = new Wu(), this.ze.set(e, t)), t;
|
|
6705
6705
|
}
|
|
6706
6706
|
Rt(e) {
|
|
6707
6707
|
let t = this.Je.get(e);
|
|
6708
|
-
return t || (t = new me(
|
|
6708
|
+
return t || (t = new me(H), this.Je = this.Je.insert(e, t)), t;
|
|
6709
6709
|
}
|
|
6710
6710
|
It(e) {
|
|
6711
6711
|
let t = this.He.get(e);
|
|
6712
|
-
return t || (t = new me(
|
|
6712
|
+
return t || (t = new me(H), this.He = this.He.insert(e, t)), t;
|
|
6713
6713
|
}
|
|
6714
6714
|
/**
|
|
6715
6715
|
* Verifies that the user is still interested in this target (by calling
|
|
@@ -6734,7 +6734,7 @@ class x_ {
|
|
|
6734
6734
|
* from all documents).
|
|
6735
6735
|
*/
|
|
6736
6736
|
it(e) {
|
|
6737
|
-
this.ze.set(e, new
|
|
6737
|
+
this.ze.set(e, new Wu()), this.Ge.getRemoteKeysForTarget(e).forEach((t) => {
|
|
6738
6738
|
this.et(
|
|
6739
6739
|
e,
|
|
6740
6740
|
t,
|
|
@@ -6754,7 +6754,7 @@ class x_ {
|
|
|
6754
6754
|
function As() {
|
|
6755
6755
|
return new se(L.comparator);
|
|
6756
6756
|
}
|
|
6757
|
-
function
|
|
6757
|
+
function Hu() {
|
|
6758
6758
|
return new se(L.comparator);
|
|
6759
6759
|
}
|
|
6760
6760
|
const U_ = {
|
|
@@ -6799,14 +6799,14 @@ function j_(n, e) {
|
|
|
6799
6799
|
}
|
|
6800
6800
|
function ct(n) {
|
|
6801
6801
|
return Y(!!n, 49232), B.fromTimestamp(function(t) {
|
|
6802
|
-
const r =
|
|
6802
|
+
const r = Wt(t);
|
|
6803
6803
|
return new te(r.seconds, r.nanos);
|
|
6804
6804
|
}(n));
|
|
6805
6805
|
}
|
|
6806
6806
|
function _a(n, e) {
|
|
6807
|
-
return
|
|
6807
|
+
return Wo(n, e).canonicalString();
|
|
6808
6808
|
}
|
|
6809
|
-
function
|
|
6809
|
+
function Wo(n, e) {
|
|
6810
6810
|
const t = function(s) {
|
|
6811
6811
|
return new Z(["projects", s.projectId, "databases", s.database]);
|
|
6812
6812
|
}(n).child("documents");
|
|
@@ -6818,7 +6818,7 @@ function od(n) {
|
|
|
6818
6818
|
key: e.toString()
|
|
6819
6819
|
}), e;
|
|
6820
6820
|
}
|
|
6821
|
-
function
|
|
6821
|
+
function Ho(n, e) {
|
|
6822
6822
|
return _a(n.databaseId, e.path);
|
|
6823
6823
|
}
|
|
6824
6824
|
function _o(n, e) {
|
|
@@ -6844,7 +6844,7 @@ function cd(n) {
|
|
|
6844
6844
|
}
|
|
6845
6845
|
function Gu(n, e, t) {
|
|
6846
6846
|
return {
|
|
6847
|
-
name:
|
|
6847
|
+
name: Ho(n, e),
|
|
6848
6848
|
fields: t.value.mapValue.fields
|
|
6849
6849
|
};
|
|
6850
6850
|
}
|
|
@@ -6903,13 +6903,13 @@ function z_(n, e) {
|
|
|
6903
6903
|
}
|
|
6904
6904
|
return t;
|
|
6905
6905
|
}
|
|
6906
|
-
function
|
|
6906
|
+
function W_(n, e) {
|
|
6907
6907
|
let t;
|
|
6908
6908
|
if (e instanceof Qr) t = {
|
|
6909
6909
|
update: Gu(n, e.key, e.value)
|
|
6910
6910
|
};
|
|
6911
6911
|
else if (e instanceof bi) t = {
|
|
6912
|
-
delete:
|
|
6912
|
+
delete: Ho(n, e.key)
|
|
6913
6913
|
};
|
|
6914
6914
|
else if (e instanceof Xt) t = {
|
|
6915
6915
|
update: Gu(n, e.key, e.data),
|
|
@@ -6920,7 +6920,7 @@ function H_(n, e) {
|
|
|
6920
6920
|
dt: e.type
|
|
6921
6921
|
});
|
|
6922
6922
|
t = {
|
|
6923
|
-
verify:
|
|
6923
|
+
verify: Ho(n, e.key)
|
|
6924
6924
|
};
|
|
6925
6925
|
}
|
|
6926
6926
|
return e.fieldTransforms.length > 0 && (t.updateTransforms = e.fieldTransforms.map((r) => function(i, a) {
|
|
@@ -6956,7 +6956,7 @@ function H_(n, e) {
|
|
|
6956
6956
|
} : x(27497);
|
|
6957
6957
|
}(n, e.precondition)), t;
|
|
6958
6958
|
}
|
|
6959
|
-
function
|
|
6959
|
+
function H_(n, e) {
|
|
6960
6960
|
return n && n.length > 0 ? (Y(e !== void 0, 14353), n.map((t) => function(s, i) {
|
|
6961
6961
|
let a = s.updateTime ? ct(s.updateTime) : ct(i);
|
|
6962
6962
|
return a.isEqual(B.min()) && // The Firestore Emulator currently returns an update time of 0 for
|
|
@@ -6998,7 +6998,7 @@ function ud(n, e) {
|
|
|
6998
6998
|
// visible for testing
|
|
6999
6999
|
function(_) {
|
|
7000
7000
|
return {
|
|
7001
|
-
field:
|
|
7001
|
+
field: Vt(_.field),
|
|
7002
7002
|
direction: J_(_.dir)
|
|
7003
7003
|
};
|
|
7004
7004
|
}(f)
|
|
@@ -7032,12 +7032,12 @@ function K_(n, e, t, r) {
|
|
|
7032
7032
|
}) : d.aggregateType === "avg" ? c.push({
|
|
7033
7033
|
alias: f,
|
|
7034
7034
|
avg: {
|
|
7035
|
-
field:
|
|
7035
|
+
field: Vt(d.fieldPath)
|
|
7036
7036
|
}
|
|
7037
7037
|
}) : d.aggregateType === "sum" && c.push({
|
|
7038
7038
|
alias: f,
|
|
7039
7039
|
sum: {
|
|
7040
|
-
field:
|
|
7040
|
+
field: Vt(d.fieldPath)
|
|
7041
7041
|
}
|
|
7042
7042
|
});
|
|
7043
7043
|
}), {
|
|
@@ -7203,7 +7203,7 @@ function X_(n) {
|
|
|
7203
7203
|
function Z_(n) {
|
|
7204
7204
|
return B_[n];
|
|
7205
7205
|
}
|
|
7206
|
-
function
|
|
7206
|
+
function Vt(n) {
|
|
7207
7207
|
return {
|
|
7208
7208
|
fieldPath: n.canonicalString()
|
|
7209
7209
|
};
|
|
@@ -7216,33 +7216,33 @@ function hd(n) {
|
|
|
7216
7216
|
if (t.op === "==") {
|
|
7217
7217
|
if (Vu(t.value)) return {
|
|
7218
7218
|
unaryFilter: {
|
|
7219
|
-
field:
|
|
7219
|
+
field: Vt(t.field),
|
|
7220
7220
|
op: "IS_NAN"
|
|
7221
7221
|
}
|
|
7222
7222
|
};
|
|
7223
7223
|
if (Ou(t.value)) return {
|
|
7224
7224
|
unaryFilter: {
|
|
7225
|
-
field:
|
|
7225
|
+
field: Vt(t.field),
|
|
7226
7226
|
op: "IS_NULL"
|
|
7227
7227
|
}
|
|
7228
7228
|
};
|
|
7229
7229
|
} else if (t.op === "!=") {
|
|
7230
7230
|
if (Vu(t.value)) return {
|
|
7231
7231
|
unaryFilter: {
|
|
7232
|
-
field:
|
|
7232
|
+
field: Vt(t.field),
|
|
7233
7233
|
op: "IS_NOT_NAN"
|
|
7234
7234
|
}
|
|
7235
7235
|
};
|
|
7236
7236
|
if (Ou(t.value)) return {
|
|
7237
7237
|
unaryFilter: {
|
|
7238
|
-
field:
|
|
7238
|
+
field: Vt(t.field),
|
|
7239
7239
|
op: "IS_NOT_NULL"
|
|
7240
7240
|
}
|
|
7241
7241
|
};
|
|
7242
7242
|
}
|
|
7243
7243
|
return {
|
|
7244
7244
|
fieldFilter: {
|
|
7245
|
-
field:
|
|
7245
|
+
field: Vt(t.field),
|
|
7246
7246
|
op: X_(t.op),
|
|
7247
7247
|
value: t.value
|
|
7248
7248
|
}
|
|
@@ -7271,20 +7271,20 @@ function dd(n) {
|
|
|
7271
7271
|
function fd(n) {
|
|
7272
7272
|
return !!n && typeof n._toProto == "function" && n._protoValueType === "ProtoValue";
|
|
7273
7273
|
}
|
|
7274
|
-
class
|
|
7274
|
+
class xt {
|
|
7275
7275
|
constructor(e, t, r, s, i = B.min(), a = B.min(), c = Ie.EMPTY_BYTE_STRING, l = null) {
|
|
7276
7276
|
this.target = e, this.targetId = t, this.purpose = r, this.sequenceNumber = s, this.snapshotVersion = i, this.lastLimboFreeSnapshotVersion = a, this.resumeToken = c, this.expectedCount = l;
|
|
7277
7277
|
}
|
|
7278
7278
|
/** Creates a new target data instance with an updated sequence number. */
|
|
7279
7279
|
withSequenceNumber(e) {
|
|
7280
|
-
return new
|
|
7280
|
+
return new xt(this.target, this.targetId, this.purpose, e, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, this.expectedCount);
|
|
7281
7281
|
}
|
|
7282
7282
|
/**
|
|
7283
7283
|
* Creates a new target data instance with an updated resume token and
|
|
7284
7284
|
* snapshot version.
|
|
7285
7285
|
*/
|
|
7286
7286
|
withResumeToken(e, t) {
|
|
7287
|
-
return new
|
|
7287
|
+
return new xt(
|
|
7288
7288
|
this.target,
|
|
7289
7289
|
this.targetId,
|
|
7290
7290
|
this.purpose,
|
|
@@ -7300,14 +7300,14 @@ class Mt {
|
|
|
7300
7300
|
* Creates a new target data instance with an updated expected count.
|
|
7301
7301
|
*/
|
|
7302
7302
|
withExpectedCount(e) {
|
|
7303
|
-
return new
|
|
7303
|
+
return new xt(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, e);
|
|
7304
7304
|
}
|
|
7305
7305
|
/**
|
|
7306
7306
|
* Creates a new target data instance with an updated last limbo free
|
|
7307
7307
|
* snapshot version number.
|
|
7308
7308
|
*/
|
|
7309
7309
|
withLastLimboFreeSnapshotVersion(e) {
|
|
7310
|
-
return new
|
|
7310
|
+
return new xt(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, e, this.resumeToken, this.expectedCount);
|
|
7311
7311
|
}
|
|
7312
7312
|
}
|
|
7313
7313
|
class ty {
|
|
@@ -7409,7 +7409,7 @@ class Le {
|
|
|
7409
7409
|
}
|
|
7410
7410
|
}
|
|
7411
7411
|
Le.DEFAULT_COLLECTION_PERCENTILE = 10, Le.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT = 1e3, Le.DEFAULT = new Le(pd, Le.DEFAULT_COLLECTION_PERCENTILE, Le.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT), Le.DISABLED = new Le(-1, 0, 0);
|
|
7412
|
-
class
|
|
7412
|
+
class Wn {
|
|
7413
7413
|
constructor(e) {
|
|
7414
7414
|
this.sr = e;
|
|
7415
7415
|
}
|
|
@@ -7417,16 +7417,16 @@ class Hn {
|
|
|
7417
7417
|
return this.sr += 2, this.sr;
|
|
7418
7418
|
}
|
|
7419
7419
|
static _r() {
|
|
7420
|
-
return new
|
|
7420
|
+
return new Wn(0);
|
|
7421
7421
|
}
|
|
7422
7422
|
static ar() {
|
|
7423
|
-
return new
|
|
7423
|
+
return new Wn(-1);
|
|
7424
7424
|
}
|
|
7425
7425
|
}
|
|
7426
7426
|
const Qu = "LruGarbageCollector", iy = 1048576;
|
|
7427
7427
|
function Yu([n, e], [t, r]) {
|
|
7428
|
-
const s =
|
|
7429
|
-
return s === 0 ?
|
|
7428
|
+
const s = H(n, t);
|
|
7429
|
+
return s === 0 ? H(e, r) : s;
|
|
7430
7430
|
}
|
|
7431
7431
|
class oy {
|
|
7432
7432
|
constructor(e) {
|
|
@@ -7502,7 +7502,7 @@ class cy {
|
|
|
7502
7502
|
return this.calculateTargetCount(e, this.params.percentileToCollect).next((m) => (
|
|
7503
7503
|
// Cap at the configured max
|
|
7504
7504
|
(m > this.params.maximumSequenceNumbersToCollect ? (V("LruGarbageCollector", `Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${m}`), s = this.params.maximumSequenceNumbersToCollect) : s = m, a = Date.now(), this.nthSequenceNumber(e, s))
|
|
7505
|
-
)).next((m) => (r = m, c = Date.now(), this.removeTargets(e, r, t))).next((m) => (i = m, l = Date.now(), this.removeOrphanedDocuments(e, r))).next((m) => (d = Date.now(), Sn() <=
|
|
7505
|
+
)).next((m) => (r = m, c = Date.now(), this.removeTargets(e, r, t))).next((m) => (i = m, l = Date.now(), this.removeOrphanedDocuments(e, r))).next((m) => (d = Date.now(), Sn() <= W.DEBUG && V("LruGarbageCollector", `LRU Garbage Collection
|
|
7506
7506
|
Counted targets in ${a - f}ms
|
|
7507
7507
|
Determined least recently used ${s} in ` + (c - a) + `ms
|
|
7508
7508
|
Removed ${i} targets in ` + (l - c) + `ms
|
|
@@ -7663,7 +7663,7 @@ class dy {
|
|
|
7663
7663
|
* @returns A map represents the local documents view.
|
|
7664
7664
|
*/
|
|
7665
7665
|
computeViews(e, t, r, s) {
|
|
7666
|
-
let i =
|
|
7666
|
+
let i = vt();
|
|
7667
7667
|
const a = Nr(), c = function() {
|
|
7668
7668
|
return Nr();
|
|
7669
7669
|
}();
|
|
@@ -7957,11 +7957,11 @@ class ye {
|
|
|
7957
7957
|
}
|
|
7958
7958
|
/** Compare by key then by ID */
|
|
7959
7959
|
static Kr(e, t) {
|
|
7960
|
-
return L.comparator(e.key, t.key) ||
|
|
7960
|
+
return L.comparator(e.key, t.key) || H(e.Hr, t.Hr);
|
|
7961
7961
|
}
|
|
7962
7962
|
/** Compare by ID then by key */
|
|
7963
7963
|
static Ur(e, t) {
|
|
7964
|
-
return
|
|
7964
|
+
return H(e.Hr, t.Hr) || L.comparator(e.key, t.key);
|
|
7965
7965
|
}
|
|
7966
7966
|
}
|
|
7967
7967
|
class gy {
|
|
@@ -8006,7 +8006,7 @@ class gy {
|
|
|
8006
8006
|
}), C.resolve(i);
|
|
8007
8007
|
}
|
|
8008
8008
|
getAllMutationBatchesAffectingDocumentKeys(e, t) {
|
|
8009
|
-
let r = new me(
|
|
8009
|
+
let r = new me(H);
|
|
8010
8010
|
return t.forEach((s) => {
|
|
8011
8011
|
const i = new ye(s, 0), a = new ye(s, Number.POSITIVE_INFINITY);
|
|
8012
8012
|
this.Jr.forEachInRange([i, a], (c) => {
|
|
@@ -8019,7 +8019,7 @@ class gy {
|
|
|
8019
8019
|
let i = r;
|
|
8020
8020
|
L.isDocumentKey(i) || (i = i.child(""));
|
|
8021
8021
|
const a = new ye(new L(i), 0);
|
|
8022
|
-
let c = new me(
|
|
8022
|
+
let c = new me(H);
|
|
8023
8023
|
return this.Jr.forEachWhile((l) => {
|
|
8024
8024
|
const d = l.key.path;
|
|
8025
8025
|
return !!r.isPrefixOf(d) && // Rows with document keys more than one segment longer than the query
|
|
@@ -8132,14 +8132,14 @@ class _y {
|
|
|
8132
8132
|
return C.resolve(r ? r.document.mutableCopy() : be.newInvalidDocument(t));
|
|
8133
8133
|
}
|
|
8134
8134
|
getEntries(e, t) {
|
|
8135
|
-
let r =
|
|
8135
|
+
let r = vt();
|
|
8136
8136
|
return t.forEach((s) => {
|
|
8137
8137
|
const i = this.docs.get(s);
|
|
8138
8138
|
r = r.insert(s, i ? i.document.mutableCopy() : be.newInvalidDocument(s));
|
|
8139
8139
|
}), C.resolve(r);
|
|
8140
8140
|
}
|
|
8141
8141
|
getDocumentsMatchingQuery(e, t, r, s) {
|
|
8142
|
-
let i =
|
|
8142
|
+
let i = vt();
|
|
8143
8143
|
const a = t.path, c = new L(a.child("__id-9223372036854775808__")), l = this.docs.getIteratorFrom(c);
|
|
8144
8144
|
for (; l.hasNext(); ) {
|
|
8145
8145
|
const { key: d, value: { document: f } } = l.getNext();
|
|
@@ -8190,7 +8190,7 @@ class Ey {
|
|
|
8190
8190
|
* A ordered bidirectional mapping between documents and the remote target
|
|
8191
8191
|
* IDs.
|
|
8192
8192
|
*/
|
|
8193
|
-
this.si = new ya(), this.targetCount = 0, this.oi =
|
|
8193
|
+
this.si = new ya(), this.targetCount = 0, this.oi = Wn._r();
|
|
8194
8194
|
}
|
|
8195
8195
|
forEachTarget(e, t) {
|
|
8196
8196
|
return this.ri.forEach((r, s) => t(s)), C.resolve();
|
|
@@ -8210,7 +8210,7 @@ class Ey {
|
|
|
8210
8210
|
lr(e) {
|
|
8211
8211
|
this.ri.set(e.target, e);
|
|
8212
8212
|
const t = e.targetId;
|
|
8213
|
-
t > this.highestTargetId && (this.oi = new
|
|
8213
|
+
t > this.highestTargetId && (this.oi = new Wn(t), this.highestTargetId = t), e.sequenceNumber > this.ii && (this.ii = e.sequenceNumber);
|
|
8214
8214
|
}
|
|
8215
8215
|
addTargetData(e, t) {
|
|
8216
8216
|
return this.lr(t), this.targetCount += 1, C.resolve();
|
|
@@ -8373,7 +8373,7 @@ class Ea {
|
|
|
8373
8373
|
}
|
|
8374
8374
|
class Js {
|
|
8375
8375
|
constructor(e, t) {
|
|
8376
|
-
this.persistence = e, this.fi = new In((r) =>
|
|
8376
|
+
this.persistence = e, this.fi = new In((r) => Wg(r.path), (r, s) => r.isEqual(s)), this.garbageCollector = uy(this, t);
|
|
8377
8377
|
}
|
|
8378
8378
|
static Vi(e, t) {
|
|
8379
8379
|
return new Js(e, t);
|
|
@@ -8508,7 +8508,7 @@ class Iy {
|
|
|
8508
8508
|
}).next(() => i.result);
|
|
8509
8509
|
}
|
|
8510
8510
|
ws(e, t, r, s) {
|
|
8511
|
-
return r.documentReadCount < this.Vs ? (Sn() <=
|
|
8511
|
+
return r.documentReadCount < this.Vs ? (Sn() <= W.DEBUG && V("QueryEngine", "SDK will not create cache indexes for query:", kn(t), "since it only creates cache indexes for collection contains", "more than or equal to", this.Vs, "documents"), C.resolve()) : (Sn() <= W.DEBUG && V("QueryEngine", "Query:", kn(t), "scans", r.documentReadCount, "local documents and returns", s, "documents as results."), r.documentReadCount > this.ds * s ? (Sn() <= W.DEBUG && V("QueryEngine", "The SDK decides to create cache indexes for query:", kn(t), "as using cache indexes may help improve performance."), this.indexManager.createTargetIndexes(e, at(t))) : C.resolve());
|
|
8512
8512
|
}
|
|
8513
8513
|
/**
|
|
8514
8514
|
* Performs an indexed query that evaluates the query based on a collection's
|
|
@@ -8550,12 +8550,12 @@ class Iy {
|
|
|
8550
8550
|
ps(e, t, r, s) {
|
|
8551
8551
|
return Uu(t) || s.isEqual(B.min()) ? C.resolve(null) : this.fs.getDocuments(e, r).next((i) => {
|
|
8552
8552
|
const a = this.bs(t, i);
|
|
8553
|
-
return this.Ss(t, a, r, s) ? C.resolve(null) : (Sn() <=
|
|
8553
|
+
return this.Ss(t, a, r, s) ? C.resolve(null) : (Sn() <= W.DEBUG && V("QueryEngine", "Re-using previous result from %s to execute query: %s", s.toString(), kn(t)), this.Ds(e, a, t, Ug(s, Mr)).next((c) => c));
|
|
8554
8554
|
});
|
|
8555
8555
|
}
|
|
8556
8556
|
/** Applies the query filter and sorting to the provided documents. */
|
|
8557
8557
|
bs(e, t) {
|
|
8558
|
-
let r = new me(
|
|
8558
|
+
let r = new me(Wh(e));
|
|
8559
8559
|
return t.forEach((s, i) => {
|
|
8560
8560
|
vi(e, i) && (r = r.add(i));
|
|
8561
8561
|
}), r;
|
|
@@ -8581,7 +8581,7 @@ class Iy {
|
|
|
8581
8581
|
return !!i && (i.hasPendingWrites || i.version.compareTo(s) > 0);
|
|
8582
8582
|
}
|
|
8583
8583
|
ys(e, t, r) {
|
|
8584
|
-
return Sn() <=
|
|
8584
|
+
return Sn() <= W.DEBUG && V("QueryEngine", "Using full collection scan to execute query:", kn(t)), this.fs.getDocumentsMatchingQuery(e, t, zt.min(), r);
|
|
8585
8585
|
}
|
|
8586
8586
|
/**
|
|
8587
8587
|
* Combines the results from an indexed execution with the remaining documents
|
|
@@ -8605,7 +8605,7 @@ class Ay {
|
|
|
8605
8605
|
* PORTING NOTE: We are using an immutable data structure on Web to make re-runs
|
|
8606
8606
|
* of `applyRemoteEvent()` idempotent.
|
|
8607
8607
|
*/
|
|
8608
|
-
this.vs = new se(
|
|
8608
|
+
this.vs = new se(H), /** Maps a target to its targetID. */
|
|
8609
8609
|
// TODO(wuandy): Evaluate if TargetId can be part of Target.
|
|
8610
8610
|
this.Fs = new In((i) => ha(i), da), /**
|
|
8611
8611
|
* A per collection group index of the last read time processed by
|
|
@@ -8709,7 +8709,7 @@ function Py(n, e) {
|
|
|
8709
8709
|
return N.resumeToken.approximateByteSize() === 0 || k.snapshotVersion.toMicroseconds() - N.snapshotVersion.toMicroseconds() >= vy ? !0 : U.addedDocuments.size + U.modifiedDocuments.size + U.removedDocuments.size > 0;
|
|
8710
8710
|
}(_, R, f) && c.push(t.li.updateTargetData(i, R));
|
|
8711
8711
|
});
|
|
8712
|
-
let l =
|
|
8712
|
+
let l = vt(), d = G();
|
|
8713
8713
|
if (e.documentUpdates.forEach((f) => {
|
|
8714
8714
|
e.resolvedLimboDocuments.has(f) && c.push(t.persistence.referenceDelegate.updateLimboDocument(i, f));
|
|
8715
8715
|
}), // Each loop iteration only affects its "own" doc, so it's safe to get all
|
|
@@ -8726,7 +8726,7 @@ function Py(n, e) {
|
|
|
8726
8726
|
function Cy(n, e, t) {
|
|
8727
8727
|
let r = G(), s = G();
|
|
8728
8728
|
return t.forEach((i) => r = r.add(i)), e.getEntries(n, r).next((i) => {
|
|
8729
|
-
let a =
|
|
8729
|
+
let a = vt();
|
|
8730
8730
|
return t.forEach((c, l) => {
|
|
8731
8731
|
const d = i.get(c);
|
|
8732
8732
|
l.isFoundDocument() !== d.isFoundDocument() && (s = s.add(c)), // Note: The order of the steps below is important, since we want
|
|
@@ -8758,7 +8758,7 @@ function ky(n, e) {
|
|
|
8758
8758
|
// previous targetID.
|
|
8759
8759
|
// TODO(mcg): freshen last accessed date?
|
|
8760
8760
|
(s = i, C.resolve(s))
|
|
8761
|
-
) : t.li.allocateTargetId(r).next((a) => (s = new
|
|
8761
|
+
) : t.li.allocateTargetId(r).next((a) => (s = new xt(e, a, "TargetPurposeListen", r.currentSequenceNumber), t.li.addTargetData(r, s).next(() => s))));
|
|
8762
8762
|
}).then((r) => {
|
|
8763
8763
|
const s = t.vs.get(r.targetId);
|
|
8764
8764
|
return (s === null || r.snapshotVersion.compareTo(s.snapshotVersion) > 0) && (t.vs = t.vs.insert(r.targetId, r), t.Fs.set(e, r.targetId)), r;
|
|
@@ -9375,7 +9375,7 @@ class Ed {
|
|
|
9375
9375
|
this.M_.reset()
|
|
9376
9376
|
) : t && t.code === P.RESOURCE_EXHAUSTED ? (
|
|
9377
9377
|
// Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)
|
|
9378
|
-
(
|
|
9378
|
+
(It(t.toString()), It("Using maximum backoff delay to prevent overloading the backend."), this.M_.g_())
|
|
9379
9379
|
) : t && t.code === P.UNAUTHENTICATED && this.state !== 3 && // "unauthenticated" error means the token was rejected. This should rarely
|
|
9380
9380
|
// happen since both Auth and AppCheck ensure a sufficient TTL when we
|
|
9381
9381
|
// request a token. If a user manually resets their system clock this can
|
|
@@ -9529,7 +9529,7 @@ class Fy extends Ed {
|
|
|
9529
9529
|
// Note, that we could consider a successful handshake healthy, however,
|
|
9530
9530
|
// the write itself might be causing an error we want to back off from.
|
|
9531
9531
|
this.M_.reset();
|
|
9532
|
-
const t =
|
|
9532
|
+
const t = H_(e.writeResults, e.commitTime), r = ct(e.commitTime);
|
|
9533
9533
|
return this.listener.na(r, t);
|
|
9534
9534
|
}
|
|
9535
9535
|
/**
|
|
@@ -9545,7 +9545,7 @@ class Fy extends Ed {
|
|
|
9545
9545
|
ea(e) {
|
|
9546
9546
|
const t = {
|
|
9547
9547
|
streamToken: this.lastStreamToken,
|
|
9548
|
-
writes: e.map((r) =>
|
|
9548
|
+
writes: e.map((r) => W_(this.serializer, r))
|
|
9549
9549
|
};
|
|
9550
9550
|
this.K_(t);
|
|
9551
9551
|
}
|
|
@@ -9561,13 +9561,13 @@ class qy extends By {
|
|
|
9561
9561
|
}
|
|
9562
9562
|
/** Invokes the provided RPC with auth and AppCheck tokens. */
|
|
9563
9563
|
Wo(e, t, r, s) {
|
|
9564
|
-
return this.sa(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([i, a]) => this.connection.Wo(e,
|
|
9564
|
+
return this.sa(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([i, a]) => this.connection.Wo(e, Wo(t, r), s, i, a)).catch((i) => {
|
|
9565
9565
|
throw i.name === "FirebaseError" ? (i.code === P.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), this.appCheckCredentials.invalidateToken()), i) : new D(P.UNKNOWN, i.toString());
|
|
9566
9566
|
});
|
|
9567
9567
|
}
|
|
9568
9568
|
/** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */
|
|
9569
9569
|
jo(e, t, r, s, i) {
|
|
9570
|
-
return this.sa(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([a, c]) => this.connection.jo(e,
|
|
9570
|
+
return this.sa(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([a, c]) => this.connection.jo(e, Wo(t, r), s, a, c, i)).catch((a) => {
|
|
9571
9571
|
throw a.name === "FirebaseError" ? (a.code === P.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), this.appCheckCredentials.invalidateToken()), a) : new D(P.UNKNOWN, a.toString());
|
|
9572
9572
|
});
|
|
9573
9573
|
}
|
|
@@ -9647,7 +9647,7 @@ class $y {
|
|
|
9647
9647
|
la(e) {
|
|
9648
9648
|
const t = `Could not reach Cloud Firestore backend. ${e}
|
|
9649
9649
|
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;
|
|
9650
|
-
this.aa ? (
|
|
9650
|
+
this.aa ? (It(t), this.aa = !1) : V("OnlineStateTracker", t);
|
|
9651
9651
|
}
|
|
9652
9652
|
Pa() {
|
|
9653
9653
|
this._a !== null && (this._a.cancel(), this._a = null);
|
|
@@ -9768,13 +9768,13 @@ function vn(n) {
|
|
|
9768
9768
|
function Id(n) {
|
|
9769
9769
|
n.da = void 0;
|
|
9770
9770
|
}
|
|
9771
|
-
async function
|
|
9771
|
+
async function Wy(n) {
|
|
9772
9772
|
n.Va.set(
|
|
9773
9773
|
"Online"
|
|
9774
9774
|
/* OnlineState.Online */
|
|
9775
9775
|
);
|
|
9776
9776
|
}
|
|
9777
|
-
async function
|
|
9777
|
+
async function Hy(n) {
|
|
9778
9778
|
n.Ia.forEach((e, t) => {
|
|
9779
9779
|
va(n, e);
|
|
9780
9780
|
});
|
|
@@ -9833,7 +9833,7 @@ async function Ky(n, e, t) {
|
|
|
9833
9833
|
i.Ia.set(l, f.withResumeToken(Ie.EMPTY_BYTE_STRING, f.snapshotVersion)), // Cause a hard reset by unwatching and rewatching immediately, but
|
|
9834
9834
|
// deliberately don't send a resume token so that we get a full update.
|
|
9835
9835
|
wd(i, l);
|
|
9836
|
-
const m = new
|
|
9836
|
+
const m = new xt(f.target, l, d, f.sequenceNumber);
|
|
9837
9837
|
va(i, m);
|
|
9838
9838
|
}), i.remoteSyncer.applyRemoteEvent(c);
|
|
9839
9839
|
}(n, t);
|
|
@@ -9956,8 +9956,8 @@ function Xn(n) {
|
|
|
9956
9956
|
const i = F(t);
|
|
9957
9957
|
return i.sa(), new Uy(r, i.connection, i.authCredentials, i.appCheckCredentials, i.serializer, s);
|
|
9958
9958
|
}(n.datastore, n.asyncQueue, {
|
|
9959
|
-
Zo:
|
|
9960
|
-
Yo:
|
|
9959
|
+
Zo: Wy.bind(null, n),
|
|
9960
|
+
Yo: Hy.bind(null, n),
|
|
9961
9961
|
t_: Gy.bind(null, n),
|
|
9962
9962
|
J_: Ky.bind(null, n)
|
|
9963
9963
|
}), n.Ra.push(async (e) => {
|
|
@@ -10044,7 +10044,7 @@ class ba {
|
|
|
10044
10044
|
}
|
|
10045
10045
|
}
|
|
10046
10046
|
function Pa(n, e) {
|
|
10047
|
-
if (
|
|
10047
|
+
if (It("AsyncQueue", `${e}: ${n}`), Jn(n)) return new D(P.UNAVAILABLE, `${e}: ${n}`);
|
|
10048
10048
|
throw n;
|
|
10049
10049
|
}
|
|
10050
10050
|
class Mn {
|
|
@@ -10167,7 +10167,7 @@ class rl {
|
|
|
10167
10167
|
}), e;
|
|
10168
10168
|
}
|
|
10169
10169
|
}
|
|
10170
|
-
class
|
|
10170
|
+
class Hn {
|
|
10171
10171
|
constructor(e, t, r, s, i, a, c, l, d) {
|
|
10172
10172
|
this.query = e, this.docs = t, this.oldDocs = r, this.docChanges = s, this.mutatedKeys = i, this.fromCache = a, this.syncStateChanged = c, this.excludesMetadataChanges = l, this.hasCachedResults = d;
|
|
10173
10173
|
}
|
|
@@ -10179,7 +10179,7 @@ class Wn {
|
|
|
10179
10179
|
type: 0,
|
|
10180
10180
|
doc: c
|
|
10181
10181
|
});
|
|
10182
|
-
}), new
|
|
10182
|
+
}), new Hn(
|
|
10183
10183
|
e,
|
|
10184
10184
|
t,
|
|
10185
10185
|
Mn.emptySet(t),
|
|
@@ -10333,7 +10333,7 @@ class Na {
|
|
|
10333
10333
|
if (!this.options.includeMetadataChanges) {
|
|
10334
10334
|
const r = [];
|
|
10335
10335
|
for (const s of e.docChanges) s.type !== 3 && r.push(s);
|
|
10336
|
-
e = new
|
|
10336
|
+
e = new Hn(
|
|
10337
10337
|
e.query,
|
|
10338
10338
|
e.docs,
|
|
10339
10339
|
e.oldDocs,
|
|
@@ -10369,7 +10369,7 @@ class Na {
|
|
|
10369
10369
|
return !(!e.syncStateChanged && !t) && this.options.includeMetadataChanges === !0;
|
|
10370
10370
|
}
|
|
10371
10371
|
ka(e) {
|
|
10372
|
-
e =
|
|
10372
|
+
e = Hn.fromInitialDocuments(e.query, e.docs, e.mutatedKeys, e.fromCache, e.hasCachedResults), this.Oa = !0, this.xa.next(e);
|
|
10373
10373
|
}
|
|
10374
10374
|
Da() {
|
|
10375
10375
|
return this.options.source !== Yo.Cache;
|
|
@@ -10395,7 +10395,7 @@ class oE {
|
|
|
10395
10395
|
*/
|
|
10396
10396
|
this.current = !1, /** Documents in the view but not in the remote target */
|
|
10397
10397
|
this.Ya = G(), /** Document Keys that have local changes */
|
|
10398
|
-
this.mutatedKeys = G(), this.eu =
|
|
10398
|
+
this.mutatedKeys = G(), this.eu = Wh(e), this.tu = new Mn(this.eu);
|
|
10399
10399
|
}
|
|
10400
10400
|
/**
|
|
10401
10401
|
* The set of remote documents that the server has told us belongs to the target associated with
|
|
@@ -10497,7 +10497,7 @@ class oE {
|
|
|
10497
10497
|
}(f.type, m.type) || this.eu(f.doc, m.doc)), this.ou(r), s = s ?? !1;
|
|
10498
10498
|
const c = t && !s ? this._u() : [], l = this.Ya.size === 0 && this.current && !s ? 1 : 0, d = l !== this.Xa;
|
|
10499
10499
|
return this.Xa = l, a.length !== 0 || d ? {
|
|
10500
|
-
snapshot: new
|
|
10500
|
+
snapshot: new Hn(
|
|
10501
10501
|
this.query,
|
|
10502
10502
|
e.tu,
|
|
10503
10503
|
i,
|
|
@@ -10602,7 +10602,7 @@ class oE {
|
|
|
10602
10602
|
*/
|
|
10603
10603
|
// PORTING NOTE: Multi-tab only.
|
|
10604
10604
|
lu() {
|
|
10605
|
-
return
|
|
10605
|
+
return Hn.fromInitialDocuments(this.query, this.tu, this.mutatedKeys, this.Xa === 0, this.hasCachedResults);
|
|
10606
10606
|
}
|
|
10607
10607
|
}
|
|
10608
10608
|
const Da = "SyncEngine";
|
|
@@ -10643,7 +10643,7 @@ class uE {
|
|
|
10643
10643
|
*/
|
|
10644
10644
|
this.Au = /* @__PURE__ */ new Map(), this.Vu = new ya(), /** Stores user completion handlers, indexed by User and BatchId. */
|
|
10645
10645
|
this.du = {}, /** Stores user callbacks waiting for all pending writes to be acknowledged. */
|
|
10646
|
-
this.mu = /* @__PURE__ */ new Map(), this.fu =
|
|
10646
|
+
this.mu = /* @__PURE__ */ new Map(), this.fu = Wn.ar(), this.onlineState = "Unknown", // The primary state is set to `true` or `false` immediately after Firestore
|
|
10647
10647
|
// startup. In the interim, a client should only be considered primary if
|
|
10648
10648
|
// `isPrimary` is true.
|
|
10649
10649
|
this.gu = void 0;
|
|
@@ -10754,7 +10754,7 @@ async function mE(n, e, t) {
|
|
|
10754
10754
|
const l = F(a), d = te.now(), f = c.reduce((R, S) => R.add(S.key), G());
|
|
10755
10755
|
let m, _;
|
|
10756
10756
|
return l.persistence.runTransaction("Locally write mutations", "readwrite", (R) => {
|
|
10757
|
-
let S =
|
|
10757
|
+
let S = vt(), N = G();
|
|
10758
10758
|
return l.xs.getEntries(R, f).next((k) => {
|
|
10759
10759
|
S = k, S.forEach((U, $) => {
|
|
10760
10760
|
$.isValidDocument() || (N = N.add(U));
|
|
@@ -10782,7 +10782,7 @@ async function mE(n, e, t) {
|
|
|
10782
10782
|
}(r.localStore, e);
|
|
10783
10783
|
r.sharedClientState.addPendingMutation(s.batchId), function(a, c, l) {
|
|
10784
10784
|
let d = a.du[a.currentUser.toKey()];
|
|
10785
|
-
d || (d = new se(
|
|
10785
|
+
d || (d = new se(H)), d = d.insert(c, l), a.du[a.currentUser.toKey()] = d;
|
|
10786
10786
|
}(r, s.batchId, t), await Xr(r, s.changes), await ki(r.remoteStore);
|
|
10787
10787
|
} catch (s) {
|
|
10788
10788
|
const i = Pa(s, "Failed to persist write");
|
|
@@ -10833,7 +10833,7 @@ async function gE(n, e, t) {
|
|
|
10833
10833
|
/* targetChanges= */
|
|
10834
10834
|
/* @__PURE__ */ new Map(),
|
|
10835
10835
|
/* targetMismatches= */
|
|
10836
|
-
new se(
|
|
10836
|
+
new se(H),
|
|
10837
10837
|
a,
|
|
10838
10838
|
c
|
|
10839
10839
|
);
|
|
@@ -10920,7 +10920,7 @@ function Oa(n) {
|
|
|
10920
10920
|
const e = n.Eu.values().next().value;
|
|
10921
10921
|
n.Eu.delete(e);
|
|
10922
10922
|
const t = new L(Z.fromString(e)), r = n.fu.next();
|
|
10923
|
-
n.Au.set(r, new cE(t)), n.Ru = n.Ru.insert(t, r), Td(n.remoteStore, new
|
|
10923
|
+
n.Au.set(r, new cE(t)), n.Ru = n.Ru.insert(t, r), Td(n.remoteStore, new xt(at(wi(t.path)), r, "TargetPurposeLimboResolution", _i.ce));
|
|
10924
10924
|
}
|
|
10925
10925
|
}
|
|
10926
10926
|
async function Xr(n, e, t) {
|
|
@@ -11105,7 +11105,7 @@ class Va {
|
|
|
11105
11105
|
this.muted || this.observer.next && this.Ou(this.observer.next, e);
|
|
11106
11106
|
}
|
|
11107
11107
|
error(e) {
|
|
11108
|
-
this.muted || (this.observer.error ? this.Ou(this.observer.error, e) :
|
|
11108
|
+
this.muted || (this.observer.error ? this.Ou(this.observer.error, e) : It("Uncaught Error in snapshot listener:", e.toString()));
|
|
11109
11109
|
}
|
|
11110
11110
|
Nu() {
|
|
11111
11111
|
this.muted = !0;
|
|
@@ -11461,7 +11461,7 @@ class de {
|
|
|
11461
11461
|
* The collection this `DocumentReference` belongs to.
|
|
11462
11462
|
*/
|
|
11463
11463
|
get parent() {
|
|
11464
|
-
return new
|
|
11464
|
+
return new jt(this.firestore, this.converter, this._key.path.popLast());
|
|
11465
11465
|
}
|
|
11466
11466
|
withConverter(e) {
|
|
11467
11467
|
return new de(this.firestore, e, this._key);
|
|
@@ -11485,7 +11485,7 @@ de._jsonSchemaVersion = "firestore/documentReference/1.0", de._jsonSchema = {
|
|
|
11485
11485
|
type: he("string", de._jsonSchemaVersion),
|
|
11486
11486
|
referencePath: he("string")
|
|
11487
11487
|
};
|
|
11488
|
-
class
|
|
11488
|
+
class jt extends pt {
|
|
11489
11489
|
/** @hideconstructor */
|
|
11490
11490
|
constructor(e, t, r) {
|
|
11491
11491
|
super(e, t, wi(r)), this._path = r, /** The type of this Firestore reference. */
|
|
@@ -11516,13 +11516,13 @@ class qt extends pt {
|
|
|
11516
11516
|
);
|
|
11517
11517
|
}
|
|
11518
11518
|
withConverter(e) {
|
|
11519
|
-
return new
|
|
11519
|
+
return new jt(this.firestore, e, this._path);
|
|
11520
11520
|
}
|
|
11521
11521
|
}
|
|
11522
11522
|
function dl(n, e, ...t) {
|
|
11523
11523
|
if (n = J(n), Rh("collection", "path", e), n instanceof Ni) {
|
|
11524
11524
|
const r = Z.fromString(e, ...t);
|
|
11525
|
-
return Ru(r), new
|
|
11525
|
+
return Ru(r), new jt(
|
|
11526
11526
|
n,
|
|
11527
11527
|
/* converter= */
|
|
11528
11528
|
null,
|
|
@@ -11530,9 +11530,9 @@ function dl(n, e, ...t) {
|
|
|
11530
11530
|
);
|
|
11531
11531
|
}
|
|
11532
11532
|
{
|
|
11533
|
-
if (!(n instanceof de || n instanceof
|
|
11533
|
+
if (!(n instanceof de || n instanceof jt)) throw new D(P.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
|
|
11534
11534
|
const r = n._path.child(Z.fromString(e, ...t));
|
|
11535
|
-
return Ru(r), new
|
|
11535
|
+
return Ru(r), new jt(
|
|
11536
11536
|
n.firestore,
|
|
11537
11537
|
/* converter= */
|
|
11538
11538
|
null,
|
|
@@ -11553,9 +11553,9 @@ function bs(n, e, ...t) {
|
|
|
11553
11553
|
);
|
|
11554
11554
|
}
|
|
11555
11555
|
{
|
|
11556
|
-
if (!(n instanceof de || n instanceof
|
|
11556
|
+
if (!(n instanceof de || n instanceof jt)) throw new D(P.INVALID_ARGUMENT, "Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
|
|
11557
11557
|
const r = n._path.child(Z.fromString(e, ...t));
|
|
11558
|
-
return Au(r), new de(n.firestore, n instanceof
|
|
11558
|
+
return Au(r), new de(n.firestore, n instanceof jt ? n.converter : null, new L(r));
|
|
11559
11559
|
}
|
|
11560
11560
|
}
|
|
11561
11561
|
const fl = "AsyncQueue";
|
|
@@ -11643,7 +11643,7 @@ class pl {
|
|
|
11643
11643
|
}
|
|
11644
11644
|
cc(e) {
|
|
11645
11645
|
const t = this.ac.then(() => (this.rc = !0, e().catch((r) => {
|
|
11646
|
-
throw this.nc = r, this.rc = !1,
|
|
11646
|
+
throw this.nc = r, this.rc = !1, It("INTERNAL UNHANDLED ERROR: ", ml(r)), r;
|
|
11647
11647
|
}).then((r) => (this.rc = !1, r))));
|
|
11648
11648
|
return this.ac = t, t;
|
|
11649
11649
|
}
|
|
@@ -11904,7 +11904,7 @@ class ut {
|
|
|
11904
11904
|
* with an underscore.
|
|
11905
11905
|
*/
|
|
11906
11906
|
_compareTo(e) {
|
|
11907
|
-
return
|
|
11907
|
+
return H(this._lat, e._lat) || H(this._long, e._long);
|
|
11908
11908
|
}
|
|
11909
11909
|
/**
|
|
11910
11910
|
* Returns a JSON-serializable representation of this `GeoPoint` instance.
|
|
@@ -12267,7 +12267,7 @@ function Zr(n, e) {
|
|
|
12267
12267
|
[Vh]: {
|
|
12268
12268
|
stringValue: Lh
|
|
12269
12269
|
},
|
|
12270
|
-
[
|
|
12270
|
+
[Ws]: {
|
|
12271
12271
|
arrayValue: {
|
|
12272
12272
|
values: l.map((f) => {
|
|
12273
12273
|
if (typeof f != "number") throw c.createError("VectorValues must only contain numeric values.");
|
|
@@ -12375,7 +12375,7 @@ class zE {
|
|
|
12375
12375
|
case 5:
|
|
12376
12376
|
return e.stringValue;
|
|
12377
12377
|
case 6:
|
|
12378
|
-
return this.convertBytes(
|
|
12378
|
+
return this.convertBytes(Ht(e.bytesValue));
|
|
12379
12379
|
case 7:
|
|
12380
12380
|
return this.convertReference(e.referenceValue);
|
|
12381
12381
|
case 8:
|
|
@@ -12408,7 +12408,7 @@ class zE {
|
|
|
12408
12408
|
* @internal
|
|
12409
12409
|
*/
|
|
12410
12410
|
convertVectorValue(e) {
|
|
12411
|
-
const t = e.fields?.[
|
|
12411
|
+
const t = e.fields?.[Ws].arrayValue?.values?.map((r) => ce(r.doubleValue));
|
|
12412
12412
|
return new Qe(t);
|
|
12413
12413
|
}
|
|
12414
12414
|
convertGeoPoint(e) {
|
|
@@ -12429,7 +12429,7 @@ class zE {
|
|
|
12429
12429
|
}
|
|
12430
12430
|
}
|
|
12431
12431
|
convertTimestamp(e) {
|
|
12432
|
-
const t =
|
|
12432
|
+
const t = Wt(e);
|
|
12433
12433
|
return new te(t.seconds, t.nanos);
|
|
12434
12434
|
}
|
|
12435
12435
|
convertDocumentKey(e, t) {
|
|
@@ -12439,7 +12439,7 @@ class zE {
|
|
|
12439
12439
|
});
|
|
12440
12440
|
const s = new Ur(r.get(1), r.get(3)), i = new L(r.popFirst(5));
|
|
12441
12441
|
return s.isEqual(t) || // TODO(b/64130202): Somehow support foreign references.
|
|
12442
|
-
|
|
12442
|
+
It(`Document ${i} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`), i;
|
|
12443
12443
|
}
|
|
12444
12444
|
}
|
|
12445
12445
|
class Oi extends zE {
|
|
@@ -12468,7 +12468,7 @@ function yl(n) {
|
|
|
12468
12468
|
return !1;
|
|
12469
12469
|
}(n, ["next", "error", "complete"]);
|
|
12470
12470
|
}
|
|
12471
|
-
class
|
|
12471
|
+
class WE {
|
|
12472
12472
|
/**
|
|
12473
12473
|
* Create a new AggregateField<T>
|
|
12474
12474
|
* @param aggregateType - Specifies the type of aggregation operation to perform.
|
|
@@ -12480,7 +12480,7 @@ class HE {
|
|
|
12480
12480
|
this.type = "AggregateField", this.aggregateType = e;
|
|
12481
12481
|
}
|
|
12482
12482
|
}
|
|
12483
|
-
class
|
|
12483
|
+
class HE {
|
|
12484
12484
|
/** @hideconstructor */
|
|
12485
12485
|
constructor(e, t, r) {
|
|
12486
12486
|
this._userDataWriter = t, this._data = r, /** A type string to uniquely identify instances of this class. */
|
|
@@ -12637,7 +12637,7 @@ class es extends Vi {
|
|
|
12637
12637
|
}
|
|
12638
12638
|
_apply(e) {
|
|
12639
12639
|
const t = this._parse(e);
|
|
12640
|
-
return
|
|
12640
|
+
return Wd(e._query, t), new pt(e.firestore, e.converter, $o(e._query, t));
|
|
12641
12641
|
}
|
|
12642
12642
|
_parse(e) {
|
|
12643
12643
|
const t = Fa(e.firestore);
|
|
@@ -12689,7 +12689,7 @@ class er extends ja {
|
|
|
12689
12689
|
return t.getFilters().length === 0 ? e : (function(s, i) {
|
|
12690
12690
|
let a = s;
|
|
12691
12691
|
const c = i.getFlattenedFilters();
|
|
12692
|
-
for (const l of c)
|
|
12692
|
+
for (const l of c) Wd(a, l), a = $o(a, l);
|
|
12693
12693
|
}(e._query, t), new pt(e.firestore, e.converter, $o(e._query, t)));
|
|
12694
12694
|
}
|
|
12695
12695
|
_getQueryConstraints() {
|
|
@@ -12700,10 +12700,10 @@ class er extends ja {
|
|
|
12700
12700
|
}
|
|
12701
12701
|
}
|
|
12702
12702
|
function KE(...n) {
|
|
12703
|
-
return n.forEach((e) =>
|
|
12703
|
+
return n.forEach((e) => Hd("or", e)), er._create("or", n);
|
|
12704
12704
|
}
|
|
12705
12705
|
function QE(...n) {
|
|
12706
|
-
return n.forEach((e) =>
|
|
12706
|
+
return n.forEach((e) => Hd("and", e)), er._create("and", n);
|
|
12707
12707
|
}
|
|
12708
12708
|
class $a extends Vi {
|
|
12709
12709
|
/**
|
|
@@ -12751,7 +12751,7 @@ function wl(n) {
|
|
|
12751
12751
|
/* LimitType.First */
|
|
12752
12752
|
);
|
|
12753
12753
|
}
|
|
12754
|
-
class
|
|
12754
|
+
class Wa extends Vi {
|
|
12755
12755
|
/**
|
|
12756
12756
|
* @internal
|
|
12757
12757
|
*/
|
|
@@ -12759,7 +12759,7 @@ class Ha extends Vi {
|
|
|
12759
12759
|
super(), this.type = e, this._docOrFields = t, this._inclusive = r;
|
|
12760
12760
|
}
|
|
12761
12761
|
static _create(e, t, r) {
|
|
12762
|
-
return new
|
|
12762
|
+
return new Wa(e, t, r);
|
|
12763
12763
|
}
|
|
12764
12764
|
_apply(e) {
|
|
12765
12765
|
const t = XE(e, this.type, this._docOrFields, this._inclusive);
|
|
@@ -12767,7 +12767,7 @@ class Ha extends Vi {
|
|
|
12767
12767
|
}
|
|
12768
12768
|
}
|
|
12769
12769
|
function JE(...n) {
|
|
12770
|
-
return
|
|
12770
|
+
return Wa._create(
|
|
12771
12771
|
"startAfter",
|
|
12772
12772
|
n,
|
|
12773
12773
|
/*inclusive=*/
|
|
@@ -12778,7 +12778,7 @@ function XE(n, e, t, r) {
|
|
|
12778
12778
|
if (t[0] = J(t[0]), t[0] instanceof qa) return function(i, a, c, l, d) {
|
|
12779
12779
|
if (!l) throw new D(P.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${c}().`);
|
|
12780
12780
|
const f = [];
|
|
12781
|
-
for (const m of Vn(i)) if (m.field.isKeyField()) f.push(
|
|
12781
|
+
for (const m of Vn(i)) if (m.field.isKeyField()) f.push(Hs(a, l.key));
|
|
12782
12782
|
else {
|
|
12783
12783
|
const _ = l.data.field(m.field);
|
|
12784
12784
|
if (Ei(_)) throw new D(P.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field "' + m.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
|
|
@@ -12804,7 +12804,7 @@ function XE(n, e, t, r) {
|
|
|
12804
12804
|
const k = a.path.child(Z.fromString(N));
|
|
12805
12805
|
if (!L.isDocumentKey(k)) throw new D(P.INVALID_ARGUMENT, `Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${d}() must result in a valid document path, but '${k}' is not because it contains an odd number of segments.`);
|
|
12806
12806
|
const U = new L(k);
|
|
12807
|
-
R.push(
|
|
12807
|
+
R.push(Hs(c, U));
|
|
12808
12808
|
} else {
|
|
12809
12809
|
const k = Fd(l, d, N);
|
|
12810
12810
|
R.push(k);
|
|
@@ -12820,15 +12820,15 @@ function Il(n, e, t) {
|
|
|
12820
12820
|
if (!fa(e) && t.indexOf("/") !== -1) throw new D(P.INVALID_ARGUMENT, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${t}' contains a '/' character.`);
|
|
12821
12821
|
const r = e.path.child(Z.fromString(t));
|
|
12822
12822
|
if (!L.isDocumentKey(r)) throw new D(P.INVALID_ARGUMENT, `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}).`);
|
|
12823
|
-
return
|
|
12823
|
+
return Hs(n, new L(r));
|
|
12824
12824
|
}
|
|
12825
|
-
if (t instanceof de) return
|
|
12825
|
+
if (t instanceof de) return Hs(n, t._key);
|
|
12826
12826
|
throw new D(P.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${gi(t)}.`);
|
|
12827
12827
|
}
|
|
12828
12828
|
function vl(n, e) {
|
|
12829
12829
|
if (!Array.isArray(n) || n.length === 0) throw new D(P.INVALID_ARGUMENT, `Invalid Query. A non-empty array is required for '${e.toString()}' filters.`);
|
|
12830
12830
|
}
|
|
12831
|
-
function
|
|
12831
|
+
function Wd(n, e) {
|
|
12832
12832
|
const t = function(s, i) {
|
|
12833
12833
|
for (const a of s) for (const c of a.getFlattenedFilters()) if (i.indexOf(c.op) >= 0) return c.op;
|
|
12834
12834
|
return null;
|
|
@@ -12861,7 +12861,7 @@ function Hd(n, e) {
|
|
|
12861
12861
|
if (t !== null)
|
|
12862
12862
|
throw t === e.op ? new D(P.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${e.op.toString()}' filter.`) : new D(P.INVALID_ARGUMENT, `Invalid query. You cannot use '${e.op.toString()}' filters with '${t.toString()}' filters.`);
|
|
12863
12863
|
}
|
|
12864
|
-
function
|
|
12864
|
+
function Hd(n, e) {
|
|
12865
12865
|
if (!(e instanceof es || e instanceof er)) throw new D(P.INVALID_ARGUMENT, `Function ${n}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);
|
|
12866
12866
|
}
|
|
12867
12867
|
function ZE(n, e, t) {
|
|
@@ -12869,7 +12869,7 @@ function ZE(n, e, t) {
|
|
|
12869
12869
|
return r = n ? t && (t.merge || t.mergeFields) ? n.toFirestore(e, t) : n.toFirestore(e) : e, r;
|
|
12870
12870
|
}
|
|
12871
12871
|
function eT() {
|
|
12872
|
-
return new
|
|
12872
|
+
return new WE("count");
|
|
12873
12873
|
}
|
|
12874
12874
|
function tT(n) {
|
|
12875
12875
|
return nT(n, {
|
|
@@ -12888,7 +12888,7 @@ function nT(n, e) {
|
|
|
12888
12888
|
*/
|
|
12889
12889
|
function(c, l, d) {
|
|
12890
12890
|
const f = new Oi(c);
|
|
12891
|
-
return new
|
|
12891
|
+
return new HE(l, f, d);
|
|
12892
12892
|
}(t, n, i)
|
|
12893
12893
|
));
|
|
12894
12894
|
}
|
|
@@ -13230,7 +13230,7 @@ function cT(n) {
|
|
|
13230
13230
|
return n = Ke(n, Yt), Zn(n), new sT(n, (e) => Gd(n, e));
|
|
13231
13231
|
}
|
|
13232
13232
|
(function(e, t = !0) {
|
|
13233
|
-
Rg(Tn), $t(new
|
|
13233
|
+
Rg(Tn), $t(new Tt("firestore", (r, { instanceIdentifier: s, options: i }) => {
|
|
13234
13234
|
const a = r.getProvider("app").getImmediate(), c = new Yt(new Cg(r.getProvider("auth-internal")), new Ng(a, r.getProvider("app-check-internal")), Yg(a, s), a);
|
|
13235
13235
|
return i = {
|
|
13236
13236
|
useFetchStreams: t,
|
|
@@ -13753,7 +13753,7 @@ const Jd = class Xd {
|
|
|
13753
13753
|
return this._stream.onDocumentChange(
|
|
13754
13754
|
this.collectionName,
|
|
13755
13755
|
e,
|
|
13756
|
-
(r) => t(
|
|
13756
|
+
(r) => t(gt.toPersistentDocumentChange(r))
|
|
13757
13757
|
);
|
|
13758
13758
|
}
|
|
13759
13759
|
onCollectionChange(e, t) {
|
|
@@ -13761,10 +13761,16 @@ const Jd = class Xd {
|
|
|
13761
13761
|
this.preprocessQueryObject(e.getQueryObject()),
|
|
13762
13762
|
this.collectionName,
|
|
13763
13763
|
(r) => t(r.map(
|
|
13764
|
-
(s) =>
|
|
13764
|
+
(s) => gt.toPersistentDocumentChange(s)
|
|
13765
13765
|
))
|
|
13766
13766
|
);
|
|
13767
13767
|
}
|
|
13768
|
+
onCollectionTemplateChange(e, t) {
|
|
13769
|
+
return this._stream.onDocumentTemplateChange(
|
|
13770
|
+
e,
|
|
13771
|
+
(r) => t(gt.toPersistentDocumentChange(r))
|
|
13772
|
+
);
|
|
13773
|
+
}
|
|
13768
13774
|
// /**
|
|
13769
13775
|
// * Get the previous bunch of documents matching the last query
|
|
13770
13776
|
// * @param limit the max amount of documents to retrieve. If not set, uses the
|
|
@@ -13793,7 +13799,7 @@ const Jd = class Xd {
|
|
|
13793
13799
|
if (Object.values(e).length === 0) return e;
|
|
13794
13800
|
const t = e.operations?.map((r) => {
|
|
13795
13801
|
const s = r.value[0] ?? r.value;
|
|
13796
|
-
return
|
|
13802
|
+
return gt.isArrayOperator(r.operator) && s instanceof pe ? {
|
|
13797
13803
|
property: pe.searchableArrayNameFor(r.property),
|
|
13798
13804
|
operator: r.operator,
|
|
13799
13805
|
value: Array.isArray(r.value) ? r.value.map((i) => i.id) : s.id,
|
|
@@ -14109,7 +14115,7 @@ const Zd = class Dn {
|
|
|
14109
14115
|
};
|
|
14110
14116
|
Zd.error = { shouldBeRegistered: "You should register a data source before using the data Store." };
|
|
14111
14117
|
let TT = Zd;
|
|
14112
|
-
class
|
|
14118
|
+
class Ha {
|
|
14113
14119
|
constructor(e) {
|
|
14114
14120
|
this._resolveCollectionPaths = () => {
|
|
14115
14121
|
throw new Error("The method collectionsMatchingTemplate has not been implemented in the concrete data source");
|
|
@@ -14168,15 +14174,14 @@ class Wa {
|
|
|
14168
14174
|
}
|
|
14169
14175
|
updateProps(e, t) {
|
|
14170
14176
|
const r = this._collectionsToWatch[e];
|
|
14171
|
-
|
|
14172
|
-
return this.onDocumentChange(t, r);
|
|
14177
|
+
return r ? this.onDocumentChange(t, r) : Promise.resolve();
|
|
14173
14178
|
}
|
|
14174
14179
|
async onDocumentChange(e, t) {
|
|
14175
|
-
const r =
|
|
14180
|
+
const r = gt.toPersistentDocumentChange(e);
|
|
14176
14181
|
this._beforeDocumentChange?.(r, t);
|
|
14177
14182
|
const s = {};
|
|
14178
|
-
r.before
|
|
14179
|
-
const a =
|
|
14183
|
+
e.type !== "update" || !r.before || r.after?.id && this._disabledChangeListeners.has(r.after?.id) || (await Promise.all(t.map(async (i) => {
|
|
14184
|
+
const a = Ha.ownerCollectionPath(pe.createInstance(i.ownerClassName()), i, r.params), c = await this._resolveCollectionPaths(a);
|
|
14180
14185
|
await Promise.all(c.map(async (l) => {
|
|
14181
14186
|
const d = TT.getModel(l);
|
|
14182
14187
|
let f = d.find(), m = !1;
|
|
@@ -14206,7 +14211,7 @@ class Wa {
|
|
|
14206
14211
|
})
|
|
14207
14212
|
]);
|
|
14208
14213
|
}));
|
|
14209
|
-
})), this._afterDocumentChange?.(s, t))
|
|
14214
|
+
})), this._afterDocumentChange?.(s, t));
|
|
14210
14215
|
}
|
|
14211
14216
|
disableChangeListener(e) {
|
|
14212
14217
|
this._disabledChangeListeners.add(e.id);
|
|
@@ -14219,12 +14224,12 @@ class Wa {
|
|
|
14219
14224
|
return typeof t.ownerCollection == "function" ? s = t.ownerCollection(e, t, r) : s = t.ownerCollection ?? e.className, s;
|
|
14220
14225
|
}
|
|
14221
14226
|
}
|
|
14222
|
-
class
|
|
14227
|
+
class gt {
|
|
14223
14228
|
constructor() {
|
|
14224
14229
|
this._cachedPropsUpdater = void 0;
|
|
14225
14230
|
}
|
|
14226
14231
|
installCachedPropsUpdater(e) {
|
|
14227
|
-
return this._cachedPropsUpdater = new
|
|
14232
|
+
return this._cachedPropsUpdater = new Ha(e), this._cachedPropsUpdater.resolveCollectionPaths = this.resolveCollectionPaths.bind(this), this._cachedPropsUpdater;
|
|
14228
14233
|
}
|
|
14229
14234
|
get cachedPropsUpdater() {
|
|
14230
14235
|
return this._cachedPropsUpdater;
|
|
@@ -14243,7 +14248,7 @@ class jt {
|
|
|
14243
14248
|
*/
|
|
14244
14249
|
static toPropertyPathOperations(e) {
|
|
14245
14250
|
return e ? e.map((t) => {
|
|
14246
|
-
if (
|
|
14251
|
+
if (gt.isArrayOperator(t.operator) && t.value[0] instanceof pe)
|
|
14247
14252
|
return {
|
|
14248
14253
|
property: pe.searchableArrayNameFor(t.property),
|
|
14249
14254
|
operator: t.operator,
|
|
@@ -14277,14 +14282,35 @@ class jt {
|
|
|
14277
14282
|
return [void 0, e];
|
|
14278
14283
|
}
|
|
14279
14284
|
static isStringMatchingTemplate(e, t) {
|
|
14280
|
-
const r = e.
|
|
14281
|
-
|
|
14285
|
+
const r = e.split("/"), s = t.split("/");
|
|
14286
|
+
if (s.length > r.length) return !1;
|
|
14287
|
+
for (let i = 0; i < s.length; i++) {
|
|
14288
|
+
const a = r[i], c = s[i];
|
|
14289
|
+
if (!(a.startsWith("{") && a.endsWith("}") || a.startsWith("${") && a.endsWith("}")) && a !== c) return !1;
|
|
14290
|
+
}
|
|
14291
|
+
for (let i = s.length; i < r.length; i++) {
|
|
14292
|
+
const a = r[i];
|
|
14293
|
+
if (!(a.startsWith("{") && a.endsWith("}") || a.startsWith("${") && a.endsWith("}"))) return !1;
|
|
14294
|
+
}
|
|
14295
|
+
return !0;
|
|
14282
14296
|
}
|
|
14283
14297
|
static extractTemplateParams(e, t) {
|
|
14284
|
-
const r =
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14298
|
+
const r = t.split("/"), s = e.split("/"), i = {};
|
|
14299
|
+
if (s.length > r.length) return i;
|
|
14300
|
+
for (let a = 0; a < s.length; a++) {
|
|
14301
|
+
const c = r[a], l = s[a];
|
|
14302
|
+
if (c.startsWith("{") && c.endsWith("}"))
|
|
14303
|
+
i[c.slice(1, -1)] = l;
|
|
14304
|
+
else if (c.startsWith("${") && c.endsWith("}"))
|
|
14305
|
+
i[c.slice(2, -1)] = l;
|
|
14306
|
+
else if (c !== l)
|
|
14307
|
+
return {};
|
|
14308
|
+
}
|
|
14309
|
+
for (let a = s.length; a < r.length; a++) {
|
|
14310
|
+
const c = r[a];
|
|
14311
|
+
if (!(c.startsWith("{") && c.endsWith("}") || c.startsWith("${") && c.endsWith("}"))) return {};
|
|
14312
|
+
}
|
|
14313
|
+
return i;
|
|
14288
14314
|
}
|
|
14289
14315
|
}
|
|
14290
14316
|
const ef = class On {
|
|
@@ -14583,13 +14609,13 @@ function rf() {
|
|
|
14583
14609
|
"dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."
|
|
14584
14610
|
};
|
|
14585
14611
|
}
|
|
14586
|
-
const bT = rf, sf = new
|
|
14612
|
+
const bT = rf, sf = new Wr("auth", "Firebase", rf());
|
|
14587
14613
|
const ri = new ia("@firebase/auth");
|
|
14588
14614
|
function PT(n, ...e) {
|
|
14589
|
-
ri.logLevel <=
|
|
14615
|
+
ri.logLevel <= W.WARN && ri.warn(`Auth (${Tn}): ${n}`, ...e);
|
|
14590
14616
|
}
|
|
14591
14617
|
function xs(n, ...e) {
|
|
14592
|
-
ri.logLevel <=
|
|
14618
|
+
ri.logLevel <= W.ERROR && ri.error(`Auth (${Tn}): ${n}`, ...e);
|
|
14593
14619
|
}
|
|
14594
14620
|
function ze(n, ...e) {
|
|
14595
14621
|
throw Ka(n, ...e);
|
|
@@ -14602,7 +14628,7 @@ function Ga(n, e, t) {
|
|
|
14602
14628
|
...bT(),
|
|
14603
14629
|
[e]: t
|
|
14604
14630
|
};
|
|
14605
|
-
return new
|
|
14631
|
+
return new Wr("auth", "Firebase", r).create(e, {
|
|
14606
14632
|
appName: n.name
|
|
14607
14633
|
});
|
|
14608
14634
|
}
|
|
@@ -14629,12 +14655,12 @@ function M(n, e, ...t) {
|
|
|
14629
14655
|
if (!n)
|
|
14630
14656
|
throw Ka(e, ...t);
|
|
14631
14657
|
}
|
|
14632
|
-
function
|
|
14658
|
+
function _t(n) {
|
|
14633
14659
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
14634
14660
|
throw xs(e), new Error(e);
|
|
14635
14661
|
}
|
|
14636
|
-
function
|
|
14637
|
-
n ||
|
|
14662
|
+
function At(n, e) {
|
|
14663
|
+
n || _t(e);
|
|
14638
14664
|
}
|
|
14639
14665
|
function Zo() {
|
|
14640
14666
|
return typeof self < "u" && self.location?.href || "";
|
|
@@ -14667,14 +14693,14 @@ function kT() {
|
|
|
14667
14693
|
}
|
|
14668
14694
|
class ts {
|
|
14669
14695
|
constructor(e, t) {
|
|
14670
|
-
this.shortDelay = e, this.longDelay = t,
|
|
14696
|
+
this.shortDelay = e, this.longDelay = t, At(t > e, "Short delay should be less than long delay!"), this.isMobile = tm() || im();
|
|
14671
14697
|
}
|
|
14672
14698
|
get() {
|
|
14673
14699
|
return ST() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
14674
14700
|
}
|
|
14675
14701
|
}
|
|
14676
14702
|
function Qa(n, e) {
|
|
14677
|
-
|
|
14703
|
+
At(n.emulator, "Emulator should always be set here");
|
|
14678
14704
|
const { url: t } = n.emulator;
|
|
14679
14705
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
|
14680
14706
|
}
|
|
@@ -14691,7 +14717,7 @@ class af {
|
|
|
14691
14717
|
return globalThis.fetch;
|
|
14692
14718
|
if (typeof fetch < "u")
|
|
14693
14719
|
return fetch;
|
|
14694
|
-
|
|
14720
|
+
_t("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
14695
14721
|
}
|
|
14696
14722
|
static headers() {
|
|
14697
14723
|
if (this.headersImpl)
|
|
@@ -14702,7 +14728,7 @@ class af {
|
|
|
14702
14728
|
return globalThis.Headers;
|
|
14703
14729
|
if (typeof Headers < "u")
|
|
14704
14730
|
return Headers;
|
|
14705
|
-
|
|
14731
|
+
_t("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
14706
14732
|
}
|
|
14707
14733
|
static response() {
|
|
14708
14734
|
if (this.responseImpl)
|
|
@@ -14713,7 +14739,7 @@ class af {
|
|
|
14713
14739
|
return globalThis.Response;
|
|
14714
14740
|
if (typeof Response < "u")
|
|
14715
14741
|
return Response;
|
|
14716
|
-
|
|
14742
|
+
_t("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
14717
14743
|
}
|
|
14718
14744
|
}
|
|
14719
14745
|
const NT = {
|
|
@@ -14800,7 +14826,7 @@ const DT = [
|
|
|
14800
14826
|
"/v1/token"
|
|
14801
14827
|
/* Endpoint.TOKEN */
|
|
14802
14828
|
], OT = new ts(3e4, 6e4);
|
|
14803
|
-
function
|
|
14829
|
+
function bt(n, e) {
|
|
14804
14830
|
return n.tenantId && !e.tenantId ? {
|
|
14805
14831
|
...e,
|
|
14806
14832
|
tenantId: n.tenantId
|
|
@@ -14812,7 +14838,7 @@ async function Ze(n, e, t, r, s = {}) {
|
|
|
14812
14838
|
r && (e === "GET" ? a = r : i = {
|
|
14813
14839
|
body: JSON.stringify(r)
|
|
14814
14840
|
});
|
|
14815
|
-
const c =
|
|
14841
|
+
const c = Hr({
|
|
14816
14842
|
key: n.config.apiKey,
|
|
14817
14843
|
...a
|
|
14818
14844
|
}).slice(1), l = await n._getAdditionalHeaders();
|
|
@@ -14957,7 +14983,7 @@ class MT {
|
|
|
14957
14983
|
}
|
|
14958
14984
|
}
|
|
14959
14985
|
async function xT(n, e) {
|
|
14960
|
-
return Ze(n, "GET", "/v2/recaptchaConfig",
|
|
14986
|
+
return Ze(n, "GET", "/v2/recaptchaConfig", bt(n, e));
|
|
14961
14987
|
}
|
|
14962
14988
|
async function UT(n, e) {
|
|
14963
14989
|
return Ze(n, "POST", "/v1/accounts:delete", e);
|
|
@@ -15141,9 +15167,9 @@ function lf(n) {
|
|
|
15141
15167
|
photoURL: t.photoUrl || null
|
|
15142
15168
|
}));
|
|
15143
15169
|
}
|
|
15144
|
-
async function
|
|
15170
|
+
async function WT(n, e) {
|
|
15145
15171
|
const t = await cf(n, {}, async () => {
|
|
15146
|
-
const r =
|
|
15172
|
+
const r = Hr({
|
|
15147
15173
|
grant_type: "refresh_token",
|
|
15148
15174
|
refresh_token: e
|
|
15149
15175
|
}).slice(1), { tokenApiHost: s, apiKey: i } = n.config, a = await uf(n, s, "/v1/token", `key=${i}`), c = await n._getAdditionalHeaders();
|
|
@@ -15164,8 +15190,8 @@ async function HT(n, e) {
|
|
|
15164
15190
|
refreshToken: t.refresh_token
|
|
15165
15191
|
};
|
|
15166
15192
|
}
|
|
15167
|
-
async function
|
|
15168
|
-
return Ze(n, "POST", "/v2/accounts:revokeToken",
|
|
15193
|
+
async function HT(n, e) {
|
|
15194
|
+
return Ze(n, "POST", "/v2/accounts:revokeToken", bt(n, e));
|
|
15169
15195
|
}
|
|
15170
15196
|
class Un {
|
|
15171
15197
|
constructor() {
|
|
@@ -15212,7 +15238,7 @@ class Un {
|
|
|
15212
15238
|
this.refreshToken = null;
|
|
15213
15239
|
}
|
|
15214
15240
|
async refresh(e, t) {
|
|
15215
|
-
const { accessToken: r, refreshToken: s, expiresIn: i } = await
|
|
15241
|
+
const { accessToken: r, refreshToken: s, expiresIn: i } = await WT(e, t);
|
|
15216
15242
|
this.updateTokensAndExpiration(r, s, Number(i));
|
|
15217
15243
|
}
|
|
15218
15244
|
updateTokensAndExpiration(e, t, r) {
|
|
@@ -15242,10 +15268,10 @@ class Un {
|
|
|
15242
15268
|
return Object.assign(new Un(), this.toJSON());
|
|
15243
15269
|
}
|
|
15244
15270
|
_performRefresh() {
|
|
15245
|
-
return
|
|
15271
|
+
return _t("not implemented");
|
|
15246
15272
|
}
|
|
15247
15273
|
}
|
|
15248
|
-
function
|
|
15274
|
+
function Ot(n, e) {
|
|
15249
15275
|
M(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
|
15250
15276
|
}
|
|
15251
15277
|
class Ge {
|
|
@@ -15350,7 +15376,7 @@ class Ge {
|
|
|
15350
15376
|
e,
|
|
15351
15377
|
"internal-error"
|
|
15352
15378
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15353
|
-
),
|
|
15379
|
+
), Ot(r, e.name), Ot(s, e.name), M(
|
|
15354
15380
|
typeof _ == "boolean",
|
|
15355
15381
|
e,
|
|
15356
15382
|
"internal-error"
|
|
@@ -15360,7 +15386,7 @@ class Ge {
|
|
|
15360
15386
|
e,
|
|
15361
15387
|
"internal-error"
|
|
15362
15388
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15363
|
-
),
|
|
15389
|
+
), Ot(i, e.name), Ot(a, e.name), Ot(c, e.name), Ot(l, e.name), Ot(d, e.name), Ot(f, e.name);
|
|
15364
15390
|
const U = new Ge({
|
|
15365
15391
|
uid: m,
|
|
15366
15392
|
auth: e,
|
|
@@ -15428,10 +15454,10 @@ class Ge {
|
|
|
15428
15454
|
}
|
|
15429
15455
|
}
|
|
15430
15456
|
const kl = /* @__PURE__ */ new Map();
|
|
15431
|
-
function
|
|
15432
|
-
|
|
15457
|
+
function yt(n) {
|
|
15458
|
+
At(n instanceof Function, "Expected a class definition");
|
|
15433
15459
|
let e = kl.get(n);
|
|
15434
|
-
return e ? (
|
|
15460
|
+
return e ? (At(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), kl.set(n, e), e);
|
|
15435
15461
|
}
|
|
15436
15462
|
class hf {
|
|
15437
15463
|
constructor() {
|
|
@@ -15498,12 +15524,12 @@ class Fn {
|
|
|
15498
15524
|
}
|
|
15499
15525
|
static async create(e, t, r = "authUser") {
|
|
15500
15526
|
if (!t.length)
|
|
15501
|
-
return new Fn(
|
|
15527
|
+
return new Fn(yt(Nl), e, r);
|
|
15502
15528
|
const s = (await Promise.all(t.map(async (d) => {
|
|
15503
15529
|
if (await d._isAvailable())
|
|
15504
15530
|
return d;
|
|
15505
15531
|
}))).filter((d) => d);
|
|
15506
|
-
let i = s[0] ||
|
|
15532
|
+
let i = s[0] || yt(Nl);
|
|
15507
15533
|
const a = Us(r, e.config.apiKey, e.name);
|
|
15508
15534
|
let c = null;
|
|
15509
15535
|
for (const d of t)
|
|
@@ -15656,7 +15682,7 @@ class QT {
|
|
|
15656
15682
|
}
|
|
15657
15683
|
}
|
|
15658
15684
|
async function YT(n, e = {}) {
|
|
15659
|
-
return Ze(n, "GET", "/v2/passwordPolicy",
|
|
15685
|
+
return Ze(n, "GET", "/v2/passwordPolicy", bt(n, e));
|
|
15660
15686
|
}
|
|
15661
15687
|
const JT = 6;
|
|
15662
15688
|
class XT {
|
|
@@ -15733,7 +15759,7 @@ class ZT {
|
|
|
15733
15759
|
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = s, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Ol(this), this.idTokenSubscription = new Ol(this), this.beforeStateQueue = new QT(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = sf, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this._resolvePersistenceManagerAvailable = void 0, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = s.sdkClientVersion, this._persistenceManagerAvailable = new Promise((i) => this._resolvePersistenceManagerAvailable = i);
|
|
15734
15760
|
}
|
|
15735
15761
|
_initializeWithPersistence(e, t) {
|
|
15736
|
-
return t && (this._popupRedirectResolver =
|
|
15762
|
+
return t && (this._popupRedirectResolver = yt(t)), this._initializationPromise = this.queue(async () => {
|
|
15737
15763
|
if (!this._deleted && (this.persistenceManager = await Fn.create(this, e), this._resolvePersistenceManagerAvailable?.(), !this._deleted)) {
|
|
15738
15764
|
if (this._popupRedirectResolver?._shouldInitProactively)
|
|
15739
15765
|
try {
|
|
@@ -15858,7 +15884,7 @@ class ZT {
|
|
|
15858
15884
|
}
|
|
15859
15885
|
setPersistence(e) {
|
|
15860
15886
|
return Pe(this.app) ? Promise.reject(lt(this)) : this.queue(async () => {
|
|
15861
|
-
await this.assertedPersistence.setPersistence(
|
|
15887
|
+
await this.assertedPersistence.setPersistence(yt(e));
|
|
15862
15888
|
});
|
|
15863
15889
|
}
|
|
15864
15890
|
_getRecaptchaConfig() {
|
|
@@ -15883,7 +15909,7 @@ class ZT {
|
|
|
15883
15909
|
return this.assertedPersistence.persistence;
|
|
15884
15910
|
}
|
|
15885
15911
|
_updateErrorMap(e) {
|
|
15886
|
-
this._errorFactory = new
|
|
15912
|
+
this._errorFactory = new Wr("auth", "Firebase", e());
|
|
15887
15913
|
}
|
|
15888
15914
|
onAuthStateChanged(e, t, r) {
|
|
15889
15915
|
return this.registerStateListener(this.authStateSubscription, e, t, r);
|
|
@@ -15916,7 +15942,7 @@ class ZT {
|
|
|
15916
15942
|
token: e,
|
|
15917
15943
|
idToken: t
|
|
15918
15944
|
};
|
|
15919
|
-
this.tenantId != null && (r.tenantId = this.tenantId), await
|
|
15945
|
+
this.tenantId != null && (r.tenantId = this.tenantId), await HT(this, r);
|
|
15920
15946
|
}
|
|
15921
15947
|
}
|
|
15922
15948
|
toJSON() {
|
|
@@ -15933,7 +15959,7 @@ class ZT {
|
|
|
15933
15959
|
}
|
|
15934
15960
|
async getOrInitRedirectPersistenceManager(e) {
|
|
15935
15961
|
if (!this.redirectPersistenceManager) {
|
|
15936
|
-
const t = e &&
|
|
15962
|
+
const t = e && yt(e) || this._popupRedirectResolver;
|
|
15937
15963
|
M(
|
|
15938
15964
|
t,
|
|
15939
15965
|
this,
|
|
@@ -15941,7 +15967,7 @@ class ZT {
|
|
|
15941
15967
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
15942
15968
|
), this.redirectPersistenceManager = await Fn.create(
|
|
15943
15969
|
this,
|
|
15944
|
-
[
|
|
15970
|
+
[yt(t._redirectPersistence)],
|
|
15945
15971
|
"redirectUser"
|
|
15946
15972
|
/* KeyName.REDIRECT_USER */
|
|
15947
15973
|
), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
|
|
@@ -16286,7 +16312,7 @@ function cw(n, e) {
|
|
|
16286
16312
|
return t.initialize({ options: e });
|
|
16287
16313
|
}
|
|
16288
16314
|
function uw(n, e) {
|
|
16289
|
-
const t = e?.persistence || [], r = (Array.isArray(t) ? t : [t]).map(
|
|
16315
|
+
const t = e?.persistence || [], r = (Array.isArray(t) ? t : [t]).map(yt);
|
|
16290
16316
|
e?.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e?.popupRedirectResolver);
|
|
16291
16317
|
}
|
|
16292
16318
|
function vf(n, e, t) {
|
|
@@ -16360,29 +16386,29 @@ class Xa {
|
|
|
16360
16386
|
* @returns a JSON-serializable representation of this object.
|
|
16361
16387
|
*/
|
|
16362
16388
|
toJSON() {
|
|
16363
|
-
return
|
|
16389
|
+
return _t("not implemented");
|
|
16364
16390
|
}
|
|
16365
16391
|
/** @internal */
|
|
16366
16392
|
_getIdTokenResponse(e) {
|
|
16367
|
-
return
|
|
16393
|
+
return _t("not implemented");
|
|
16368
16394
|
}
|
|
16369
16395
|
/** @internal */
|
|
16370
16396
|
_linkToIdToken(e, t) {
|
|
16371
|
-
return
|
|
16397
|
+
return _t("not implemented");
|
|
16372
16398
|
}
|
|
16373
16399
|
/** @internal */
|
|
16374
16400
|
_getReauthenticationResolver(e) {
|
|
16375
|
-
return
|
|
16401
|
+
return _t("not implemented");
|
|
16376
16402
|
}
|
|
16377
16403
|
}
|
|
16378
16404
|
async function dw(n, e) {
|
|
16379
16405
|
return Ze(n, "POST", "/v1/accounts:signUp", e);
|
|
16380
16406
|
}
|
|
16381
16407
|
async function fw(n, e) {
|
|
16382
|
-
return ns(n, "POST", "/v1/accounts:signInWithPassword",
|
|
16408
|
+
return ns(n, "POST", "/v1/accounts:signInWithPassword", bt(n, e));
|
|
16383
16409
|
}
|
|
16384
16410
|
async function Rf(n, e) {
|
|
16385
|
-
return Ze(n, "POST", "/v1/accounts:sendOobCode",
|
|
16411
|
+
return Ze(n, "POST", "/v1/accounts:sendOobCode", bt(n, e));
|
|
16386
16412
|
}
|
|
16387
16413
|
async function pw(n, e) {
|
|
16388
16414
|
return Rf(n, e);
|
|
@@ -16391,10 +16417,10 @@ async function mw(n, e) {
|
|
|
16391
16417
|
return Rf(n, e);
|
|
16392
16418
|
}
|
|
16393
16419
|
async function gw(n, e) {
|
|
16394
|
-
return ns(n, "POST", "/v1/accounts:signInWithEmailLink",
|
|
16420
|
+
return ns(n, "POST", "/v1/accounts:signInWithEmailLink", bt(n, e));
|
|
16395
16421
|
}
|
|
16396
16422
|
async function _w(n, e) {
|
|
16397
|
-
return ns(n, "POST", "/v1/accounts:signInWithEmailLink",
|
|
16423
|
+
return ns(n, "POST", "/v1/accounts:signInWithEmailLink", bt(n, e));
|
|
16398
16424
|
}
|
|
16399
16425
|
class zr extends Xa {
|
|
16400
16426
|
/** @internal */
|
|
@@ -16499,7 +16525,7 @@ class zr extends Xa {
|
|
|
16499
16525
|
}
|
|
16500
16526
|
}
|
|
16501
16527
|
async function Bn(n, e) {
|
|
16502
|
-
return ns(n, "POST", "/v1/accounts:signInWithIdp",
|
|
16528
|
+
return ns(n, "POST", "/v1/accounts:signInWithIdp", bt(n, e));
|
|
16503
16529
|
}
|
|
16504
16530
|
const yw = "http://localhost";
|
|
16505
16531
|
class yn extends Xa {
|
|
@@ -16566,7 +16592,7 @@ class yn extends Xa {
|
|
|
16566
16592
|
e.pendingToken = this.pendingToken;
|
|
16567
16593
|
else {
|
|
16568
16594
|
const t = {};
|
|
16569
|
-
this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody =
|
|
16595
|
+
this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Hr(t);
|
|
16570
16596
|
}
|
|
16571
16597
|
return e;
|
|
16572
16598
|
}
|
|
@@ -16856,7 +16882,7 @@ class st extends rs {
|
|
|
16856
16882
|
}
|
|
16857
16883
|
st.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
16858
16884
|
st.PROVIDER_ID = "google.com";
|
|
16859
|
-
class
|
|
16885
|
+
class Lt extends rs {
|
|
16860
16886
|
constructor() {
|
|
16861
16887
|
super(
|
|
16862
16888
|
"github.com"
|
|
@@ -16870,8 +16896,8 @@ class Vt extends rs {
|
|
|
16870
16896
|
*/
|
|
16871
16897
|
static credential(e) {
|
|
16872
16898
|
return yn._fromParams({
|
|
16873
|
-
providerId:
|
|
16874
|
-
signInMethod:
|
|
16899
|
+
providerId: Lt.PROVIDER_ID,
|
|
16900
|
+
signInMethod: Lt.GITHUB_SIGN_IN_METHOD,
|
|
16875
16901
|
accessToken: e
|
|
16876
16902
|
});
|
|
16877
16903
|
}
|
|
@@ -16881,7 +16907,7 @@ class Vt extends rs {
|
|
|
16881
16907
|
* @param userCredential - The user credential.
|
|
16882
16908
|
*/
|
|
16883
16909
|
static credentialFromResult(e) {
|
|
16884
|
-
return
|
|
16910
|
+
return Lt.credentialFromTaggedObject(e);
|
|
16885
16911
|
}
|
|
16886
16912
|
/**
|
|
16887
16913
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -16890,21 +16916,21 @@ class Vt extends rs {
|
|
|
16890
16916
|
* @param userCredential - The user credential.
|
|
16891
16917
|
*/
|
|
16892
16918
|
static credentialFromError(e) {
|
|
16893
|
-
return
|
|
16919
|
+
return Lt.credentialFromTaggedObject(e.customData || {});
|
|
16894
16920
|
}
|
|
16895
16921
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
16896
16922
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
16897
16923
|
return null;
|
|
16898
16924
|
try {
|
|
16899
|
-
return
|
|
16925
|
+
return Lt.credential(e.oauthAccessToken);
|
|
16900
16926
|
} catch {
|
|
16901
16927
|
return null;
|
|
16902
16928
|
}
|
|
16903
16929
|
}
|
|
16904
16930
|
}
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
class
|
|
16931
|
+
Lt.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
16932
|
+
Lt.PROVIDER_ID = "github.com";
|
|
16933
|
+
class He extends rs {
|
|
16908
16934
|
constructor() {
|
|
16909
16935
|
super(
|
|
16910
16936
|
"twitter.com"
|
|
@@ -16919,8 +16945,8 @@ class We extends rs {
|
|
|
16919
16945
|
*/
|
|
16920
16946
|
static credential(e, t) {
|
|
16921
16947
|
return yn._fromParams({
|
|
16922
|
-
providerId:
|
|
16923
|
-
signInMethod:
|
|
16948
|
+
providerId: He.PROVIDER_ID,
|
|
16949
|
+
signInMethod: He.TWITTER_SIGN_IN_METHOD,
|
|
16924
16950
|
oauthToken: e,
|
|
16925
16951
|
oauthTokenSecret: t
|
|
16926
16952
|
});
|
|
@@ -16931,7 +16957,7 @@ class We extends rs {
|
|
|
16931
16957
|
* @param userCredential - The user credential.
|
|
16932
16958
|
*/
|
|
16933
16959
|
static credentialFromResult(e) {
|
|
16934
|
-
return
|
|
16960
|
+
return He.credentialFromTaggedObject(e);
|
|
16935
16961
|
}
|
|
16936
16962
|
/**
|
|
16937
16963
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -16940,7 +16966,7 @@ class We extends rs {
|
|
|
16940
16966
|
* @param userCredential - The user credential.
|
|
16941
16967
|
*/
|
|
16942
16968
|
static credentialFromError(e) {
|
|
16943
|
-
return
|
|
16969
|
+
return He.credentialFromTaggedObject(e.customData || {});
|
|
16944
16970
|
}
|
|
16945
16971
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
16946
16972
|
if (!e)
|
|
@@ -16949,24 +16975,24 @@ class We extends rs {
|
|
|
16949
16975
|
if (!t || !r)
|
|
16950
16976
|
return null;
|
|
16951
16977
|
try {
|
|
16952
|
-
return
|
|
16978
|
+
return He.credential(t, r);
|
|
16953
16979
|
} catch {
|
|
16954
16980
|
return null;
|
|
16955
16981
|
}
|
|
16956
16982
|
}
|
|
16957
16983
|
}
|
|
16958
|
-
|
|
16959
|
-
|
|
16984
|
+
He.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
|
16985
|
+
He.PROVIDER_ID = "twitter.com";
|
|
16960
16986
|
async function bf(n, e) {
|
|
16961
|
-
return ns(n, "POST", "/v1/accounts:signUp",
|
|
16987
|
+
return ns(n, "POST", "/v1/accounts:signUp", bt(n, e));
|
|
16962
16988
|
}
|
|
16963
|
-
class
|
|
16989
|
+
class Rt {
|
|
16964
16990
|
constructor(e) {
|
|
16965
16991
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
16966
16992
|
}
|
|
16967
16993
|
static async _fromIdTokenResponse(e, t, r, s = !1) {
|
|
16968
16994
|
const i = await Ge._fromIdTokenResponse(e, r, s), a = Ml(r);
|
|
16969
|
-
return new
|
|
16995
|
+
return new Rt({
|
|
16970
16996
|
user: i,
|
|
16971
16997
|
providerId: a,
|
|
16972
16998
|
_tokenResponse: r,
|
|
@@ -16980,7 +17006,7 @@ class At {
|
|
|
16980
17006
|
!0
|
|
16981
17007
|
);
|
|
16982
17008
|
const s = Ml(r);
|
|
16983
|
-
return new
|
|
17009
|
+
return new Rt({
|
|
16984
17010
|
user: e,
|
|
16985
17011
|
providerId: s,
|
|
16986
17012
|
_tokenResponse: r,
|
|
@@ -16996,7 +17022,7 @@ async function ww(n) {
|
|
|
16996
17022
|
return Promise.reject(lt(n));
|
|
16997
17023
|
const e = mt(n);
|
|
16998
17024
|
if (await e._initializationPromise, e.currentUser?.isAnonymous)
|
|
16999
|
-
return new
|
|
17025
|
+
return new Rt({
|
|
17000
17026
|
user: e.currentUser,
|
|
17001
17027
|
providerId: null,
|
|
17002
17028
|
operationType: "signIn"
|
|
@@ -17004,7 +17030,7 @@ async function ww(n) {
|
|
|
17004
17030
|
});
|
|
17005
17031
|
const t = await bf(e, {
|
|
17006
17032
|
returnSecureToken: !0
|
|
17007
|
-
}), r = await
|
|
17033
|
+
}), r = await Rt._fromIdTokenResponse(e, "signIn", t, !0);
|
|
17008
17034
|
return await e._updateCurrentUser(r.user), r;
|
|
17009
17035
|
}
|
|
17010
17036
|
class oi extends Xe {
|
|
@@ -17042,7 +17068,7 @@ async function Iw(n, e) {
|
|
|
17042
17068
|
}
|
|
17043
17069
|
async function vw(n, e, t = !1) {
|
|
17044
17070
|
const r = await Gn(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
17045
|
-
return
|
|
17071
|
+
return Rt._forOperation(n, "link", r);
|
|
17046
17072
|
}
|
|
17047
17073
|
async function Aw(n, e, t) {
|
|
17048
17074
|
await $r(e);
|
|
@@ -17075,7 +17101,7 @@ async function Rw(n, e, t = !1) {
|
|
|
17075
17101
|
r,
|
|
17076
17102
|
"user-mismatch"
|
|
17077
17103
|
/* AuthErrorCode.USER_MISMATCH */
|
|
17078
|
-
),
|
|
17104
|
+
), Rt._forOperation(n, s, i);
|
|
17079
17105
|
} catch (i) {
|
|
17080
17106
|
throw i?.code === "auth/user-not-found" && ze(
|
|
17081
17107
|
r,
|
|
@@ -17087,7 +17113,7 @@ async function Rw(n, e, t = !1) {
|
|
|
17087
17113
|
async function Sf(n, e, t = !1) {
|
|
17088
17114
|
if (Pe(n.app))
|
|
17089
17115
|
return Promise.reject(lt(n));
|
|
17090
|
-
const r = "signIn", s = await Pf(n, r, e), i = await
|
|
17116
|
+
const r = "signIn", s = await Pf(n, r, e), i = await Rt._fromIdTokenResponse(n, r, s);
|
|
17091
17117
|
return t || await n._updateCurrentUser(i.user), i;
|
|
17092
17118
|
}
|
|
17093
17119
|
async function bw(n, e) {
|
|
@@ -17145,7 +17171,7 @@ async function Sw(n, e, t) {
|
|
|
17145
17171
|
/* RecaptchaClientType.WEB */
|
|
17146
17172
|
}, "signUpPassword", bf).catch((l) => {
|
|
17147
17173
|
throw l.code === "auth/password-does-not-meet-requirements" && kf(n), l;
|
|
17148
|
-
}), c = await
|
|
17174
|
+
}), c = await Rt._fromIdTokenResponse(r, "signIn", a);
|
|
17149
17175
|
return await r._updateCurrentUser(c.user), c;
|
|
17150
17176
|
}
|
|
17151
17177
|
function xl(n, e, t) {
|
|
@@ -17551,7 +17577,7 @@ async function Fl(n, e, t) {
|
|
|
17551
17577
|
});
|
|
17552
17578
|
return new ss(r).toPromise();
|
|
17553
17579
|
}
|
|
17554
|
-
async function
|
|
17580
|
+
async function Ww(n, e) {
|
|
17555
17581
|
const t = Ui(n, !1).get(e), r = await new ss(t).toPromise();
|
|
17556
17582
|
return r === void 0 ? null : r.value;
|
|
17557
17583
|
}
|
|
@@ -17559,7 +17585,7 @@ function Bl(n, e) {
|
|
|
17559
17585
|
const t = Ui(n, !0).delete(e);
|
|
17560
17586
|
return new ss(t).toPromise();
|
|
17561
17587
|
}
|
|
17562
|
-
const
|
|
17588
|
+
const Hw = 800, Gw = 3;
|
|
17563
17589
|
class Uf {
|
|
17564
17590
|
constructor() {
|
|
17565
17591
|
this.type = "LOCAL", this._shouldAllowMigration = !0, this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.pendingWrites = 0, this.receiver = null, this.sender = null, this.serviceWorkerReceiverAvailable = !1, this.activeServiceWorker = null, this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {
|
|
@@ -17665,7 +17691,7 @@ class Uf {
|
|
|
17665
17691
|
return this._withPendingWrite(async () => (await this._withRetries((r) => Fl(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
17666
17692
|
}
|
|
17667
17693
|
async _get(e) {
|
|
17668
|
-
const t = await this._withRetries((r) =>
|
|
17694
|
+
const t = await this._withRetries((r) => Ww(r, e));
|
|
17669
17695
|
return this.localCache[e] = t, t;
|
|
17670
17696
|
}
|
|
17671
17697
|
async _remove(e) {
|
|
@@ -17696,7 +17722,7 @@ class Uf {
|
|
|
17696
17722
|
s(t);
|
|
17697
17723
|
}
|
|
17698
17724
|
startPolling() {
|
|
17699
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
17725
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Hw);
|
|
17700
17726
|
}
|
|
17701
17727
|
stopPolling() {
|
|
17702
17728
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -17712,7 +17738,7 @@ Uf.type = "LOCAL";
|
|
|
17712
17738
|
const Kw = Uf;
|
|
17713
17739
|
new ts(3e4, 6e4);
|
|
17714
17740
|
function tc(n, e) {
|
|
17715
|
-
return e ?
|
|
17741
|
+
return e ? yt(e) : (M(
|
|
17716
17742
|
n._popupRedirectResolver,
|
|
17717
17743
|
n,
|
|
17718
17744
|
"argument-error"
|
|
@@ -17828,10 +17854,10 @@ class Ff {
|
|
|
17828
17854
|
}
|
|
17829
17855
|
}
|
|
17830
17856
|
resolve(e) {
|
|
17831
|
-
|
|
17857
|
+
At(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
|
|
17832
17858
|
}
|
|
17833
17859
|
reject(e) {
|
|
17834
|
-
|
|
17860
|
+
At(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
|
|
17835
17861
|
}
|
|
17836
17862
|
unregisterAndCleanUp() {
|
|
17837
17863
|
this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
|
|
@@ -17848,17 +17874,17 @@ async function Ro(n, e, t) {
|
|
|
17848
17874
|
const r = mt(n);
|
|
17849
17875
|
of(n, e, Mi);
|
|
17850
17876
|
const s = tc(r, t);
|
|
17851
|
-
return new
|
|
17877
|
+
return new Ut(r, "signInViaPopup", e, s).executeNotNull();
|
|
17852
17878
|
}
|
|
17853
17879
|
async function ql(n, e, t) {
|
|
17854
17880
|
const r = J(n);
|
|
17855
17881
|
of(r.auth, e, Mi);
|
|
17856
17882
|
const s = tc(r.auth, t);
|
|
17857
|
-
return new
|
|
17883
|
+
return new Ut(r.auth, "linkViaPopup", e, s, r).executeNotNull();
|
|
17858
17884
|
}
|
|
17859
|
-
class
|
|
17885
|
+
class Ut extends Ff {
|
|
17860
17886
|
constructor(e, t, r, s, i) {
|
|
17861
|
-
super(e, t, s, i), this.provider = r, this.authWindow = null, this.pollId = null,
|
|
17887
|
+
super(e, t, s, i), this.provider = r, this.authWindow = null, this.pollId = null, Ut.currentPopupAction && Ut.currentPopupAction.cancel(), Ut.currentPopupAction = this;
|
|
17862
17888
|
}
|
|
17863
17889
|
async executeNotNull() {
|
|
17864
17890
|
const e = await this.execute();
|
|
@@ -17870,7 +17896,7 @@ class xt extends Ff {
|
|
|
17870
17896
|
), e;
|
|
17871
17897
|
}
|
|
17872
17898
|
async onExecution() {
|
|
17873
|
-
|
|
17899
|
+
At(this.filter.length === 1, "Popup operations only handle one event");
|
|
17874
17900
|
const e = ec();
|
|
17875
17901
|
this.authWindow = await this.resolver._openPopup(
|
|
17876
17902
|
this.auth,
|
|
@@ -17899,7 +17925,7 @@ class xt extends Ff {
|
|
|
17899
17925
|
));
|
|
17900
17926
|
}
|
|
17901
17927
|
cleanUp() {
|
|
17902
|
-
this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null,
|
|
17928
|
+
this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, Ut.currentPopupAction = null;
|
|
17903
17929
|
}
|
|
17904
17930
|
pollUserCancellation() {
|
|
17905
17931
|
const e = () => {
|
|
@@ -17922,7 +17948,7 @@ class xt extends Ff {
|
|
|
17922
17948
|
e();
|
|
17923
17949
|
}
|
|
17924
17950
|
}
|
|
17925
|
-
|
|
17951
|
+
Ut.currentPopupAction = null;
|
|
17926
17952
|
const Zw = "pendingRedirect", Fs = /* @__PURE__ */ new Map();
|
|
17927
17953
|
class eI extends Ff {
|
|
17928
17954
|
constructor(e, t, r = !1) {
|
|
@@ -17981,7 +18007,7 @@ function nI(n, e) {
|
|
|
17981
18007
|
Fs.set(n._key(), e);
|
|
17982
18008
|
}
|
|
17983
18009
|
function rI(n) {
|
|
17984
|
-
return
|
|
18010
|
+
return yt(n._redirectPersistence);
|
|
17985
18011
|
}
|
|
17986
18012
|
function sI(n) {
|
|
17987
18013
|
return Us(Zw, n.config.apiKey, n.name);
|
|
@@ -18161,7 +18187,7 @@ function II(n) {
|
|
|
18161
18187
|
}, s = wI.get(n.config.apiHost);
|
|
18162
18188
|
s && (r.eid = s);
|
|
18163
18189
|
const i = n._getFrameworks();
|
|
18164
|
-
return i.length && (r.fw = i.join(",")), `${t}?${
|
|
18190
|
+
return i.length && (r.fw = i.join(",")), `${t}?${Hr(r).slice(1)}`;
|
|
18165
18191
|
}
|
|
18166
18192
|
async function vI(n) {
|
|
18167
18193
|
const e = await gI(n), t = ht().gapi;
|
|
@@ -18248,7 +18274,7 @@ function kI(n, e) {
|
|
|
18248
18274
|
r.initMouseEvent("click", !0, !0, window, 1, 0, 0, 0, 0, !1, !1, !1, !1, 1, null), t.dispatchEvent(r);
|
|
18249
18275
|
}
|
|
18250
18276
|
const NI = "__/auth/handler", DI = "emulator/auth/handler", OI = encodeURIComponent("fac");
|
|
18251
|
-
async function
|
|
18277
|
+
async function Wl(n, e, t, r, s, i) {
|
|
18252
18278
|
M(
|
|
18253
18279
|
n.config.authDomain,
|
|
18254
18280
|
n,
|
|
@@ -18282,7 +18308,7 @@ async function Hl(n, e, t, r, s, i) {
|
|
|
18282
18308
|
for (const f of Object.keys(c))
|
|
18283
18309
|
c[f] === void 0 && delete c[f];
|
|
18284
18310
|
const l = await n._getAppCheckToken(), d = l ? `#${OI}=${encodeURIComponent(l)}` : "";
|
|
18285
|
-
return `${VI(n)}?${
|
|
18311
|
+
return `${VI(n)}?${Hr(c).slice(1)}${d}`;
|
|
18286
18312
|
}
|
|
18287
18313
|
function VI({ config: n }) {
|
|
18288
18314
|
return n.emulator ? Qa(n, DI) : `https://${n.authDomain}/${NI}`;
|
|
@@ -18295,13 +18321,13 @@ class LI {
|
|
|
18295
18321
|
// Wrapping in async even though we don't await anywhere in order
|
|
18296
18322
|
// to make sure errors are raised as promise rejections
|
|
18297
18323
|
async _openPopup(e, t, r, s) {
|
|
18298
|
-
|
|
18299
|
-
const i = await
|
|
18324
|
+
At(this.eventManagers[e._key()]?.manager, "_initialize() not called before _openPopup()");
|
|
18325
|
+
const i = await Wl(e, t, r, Zo(), s);
|
|
18300
18326
|
return SI(e, i, ec());
|
|
18301
18327
|
}
|
|
18302
18328
|
async _openRedirect(e, t, r, s) {
|
|
18303
18329
|
await this._originValidation(e);
|
|
18304
|
-
const i = await
|
|
18330
|
+
const i = await Wl(e, t, r, Zo(), s);
|
|
18305
18331
|
return Fw(i), new Promise(() => {
|
|
18306
18332
|
});
|
|
18307
18333
|
}
|
|
@@ -18309,7 +18335,7 @@ class LI {
|
|
|
18309
18335
|
const t = e._key();
|
|
18310
18336
|
if (this.eventManagers[t]) {
|
|
18311
18337
|
const { manager: s, promise: i } = this.eventManagers[t];
|
|
18312
|
-
return s ? Promise.resolve(s) : (
|
|
18338
|
+
return s ? Promise.resolve(s) : (At(i, "If manager is not set, promise should be"), i);
|
|
18313
18339
|
}
|
|
18314
18340
|
const r = this.initAndGetManager(e);
|
|
18315
18341
|
return this.eventManagers[t] = { promise: r }, r.catch(() => {
|
|
@@ -18347,7 +18373,7 @@ class LI {
|
|
|
18347
18373
|
}
|
|
18348
18374
|
}
|
|
18349
18375
|
const MI = LI;
|
|
18350
|
-
var
|
|
18376
|
+
var Hl = "@firebase/auth", Gl = "1.12.1";
|
|
18351
18377
|
class xI {
|
|
18352
18378
|
constructor(e) {
|
|
18353
18379
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
@@ -18399,7 +18425,7 @@ function UI(n) {
|
|
|
18399
18425
|
}
|
|
18400
18426
|
}
|
|
18401
18427
|
function FI(n) {
|
|
18402
|
-
$t(new
|
|
18428
|
+
$t(new Tt(
|
|
18403
18429
|
"auth",
|
|
18404
18430
|
(e, { options: t }) => {
|
|
18405
18431
|
const r = e.getProvider("app").getImmediate(), s = e.getProvider("heartbeat"), i = e.getProvider("app-check-internal"), { apiKey: a, authDomain: c } = r.options;
|
|
@@ -18425,7 +18451,7 @@ function FI(n) {
|
|
|
18425
18451
|
"auth-internal"
|
|
18426
18452
|
/* _ComponentName.AUTH_INTERNAL */
|
|
18427
18453
|
).initialize();
|
|
18428
|
-
})), $t(new
|
|
18454
|
+
})), $t(new Tt(
|
|
18429
18455
|
"auth-internal",
|
|
18430
18456
|
(e) => {
|
|
18431
18457
|
const t = mt(e.getProvider(
|
|
@@ -18439,7 +18465,7 @@ function FI(n) {
|
|
|
18439
18465
|
).setInstantiationMode(
|
|
18440
18466
|
"EXPLICIT"
|
|
18441
18467
|
/* InstantiationMode.EXPLICIT */
|
|
18442
|
-
)), je(
|
|
18468
|
+
)), je(Hl, Gl, UI(n)), je(Hl, Gl, "esm2020");
|
|
18443
18469
|
}
|
|
18444
18470
|
const BI = 5 * 60, qI = lh("authIdTokenMaxAge") || BI;
|
|
18445
18471
|
let Kl = null;
|
|
@@ -18501,7 +18527,7 @@ FI(
|
|
|
18501
18527
|
"Browser"
|
|
18502
18528
|
/* ClientPlatform.BROWSER */
|
|
18503
18529
|
);
|
|
18504
|
-
const qf = "firebasestorage.googleapis.com", jf = "storageBucket",
|
|
18530
|
+
const qf = "firebasestorage.googleapis.com", jf = "storageBucket", WI = 2 * 60 * 1e3, HI = 10 * 60 * 1e3, GI = 1e3;
|
|
18505
18531
|
class ie extends Xe {
|
|
18506
18532
|
/**
|
|
18507
18533
|
* @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
|
|
@@ -18577,7 +18603,7 @@ function ev(n) {
|
|
|
18577
18603
|
function tv() {
|
|
18578
18604
|
return new ie(ne.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + jf + "' property when initializing the app?");
|
|
18579
18605
|
}
|
|
18580
|
-
function
|
|
18606
|
+
function Wf() {
|
|
18581
18607
|
return new ie(ne.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
|
|
18582
18608
|
}
|
|
18583
18609
|
function nv() {
|
|
@@ -18592,7 +18618,7 @@ function sv(n) {
|
|
|
18592
18618
|
function na(n) {
|
|
18593
18619
|
return new ie(ne.INVALID_ARGUMENT, n);
|
|
18594
18620
|
}
|
|
18595
|
-
function
|
|
18621
|
+
function Hf() {
|
|
18596
18622
|
return new ie(ne.APP_DELETED, "The Firebase app was deleted.");
|
|
18597
18623
|
}
|
|
18598
18624
|
function iv(n) {
|
|
@@ -18822,7 +18848,7 @@ class dv {
|
|
|
18822
18848
|
const l = rc();
|
|
18823
18849
|
l.serverResponse = c.getErrorText(), this.errorCallback_ ? a(this.errorCallback_(c, l)) : a(l);
|
|
18824
18850
|
} else if (s.canceled) {
|
|
18825
|
-
const l = this.appDelete_ ?
|
|
18851
|
+
const l = this.appDelete_ ? Hf() : zf();
|
|
18826
18852
|
a(l);
|
|
18827
18853
|
} else {
|
|
18828
18854
|
const l = $f();
|
|
@@ -19012,7 +19038,7 @@ function Rv(n) {
|
|
|
19012
19038
|
function bv(n, e) {
|
|
19013
19039
|
return n.length >= e.length ? n.substring(n.length - e.length) === e : !1;
|
|
19014
19040
|
}
|
|
19015
|
-
class
|
|
19041
|
+
class Mt {
|
|
19016
19042
|
constructor(e, t) {
|
|
19017
19043
|
let r = 0, s = "";
|
|
19018
19044
|
Ql(e) ? (this.data_ = e, r = e.size, s = e.type) : e instanceof ArrayBuffer ? (t ? this.data_ = new Uint8Array(e) : (this.data_ = new Uint8Array(e.byteLength), this.data_.set(new Uint8Array(e))), r = this.data_.length) : e instanceof Uint8Array && (t ? this.data_ = e : (this.data_ = new Uint8Array(e.length), this.data_.set(e)), r = e.length), this.size_ = r, this.type_ = s;
|
|
@@ -19026,16 +19052,16 @@ class Lt {
|
|
|
19026
19052
|
slice(e, t) {
|
|
19027
19053
|
if (Ql(this.data_)) {
|
|
19028
19054
|
const r = this.data_, s = Tv(r, e, t);
|
|
19029
|
-
return s === null ? null : new
|
|
19055
|
+
return s === null ? null : new Mt(s);
|
|
19030
19056
|
} else {
|
|
19031
19057
|
const r = new Uint8Array(this.data_.buffer, e, t - e);
|
|
19032
|
-
return new
|
|
19058
|
+
return new Mt(r, !0);
|
|
19033
19059
|
}
|
|
19034
19060
|
}
|
|
19035
19061
|
static getBlob(...e) {
|
|
19036
19062
|
if (sc()) {
|
|
19037
|
-
const t = e.map((r) => r instanceof
|
|
19038
|
-
return new
|
|
19063
|
+
const t = e.map((r) => r instanceof Mt ? r.data_ : r);
|
|
19064
|
+
return new Mt(Ev.apply(null, t));
|
|
19039
19065
|
} else {
|
|
19040
19066
|
const t = e.map((a) => Fi(a) ? Iv(it.RAW, a).data : a.data_);
|
|
19041
19067
|
let r = 0;
|
|
@@ -19047,7 +19073,7 @@ class Lt {
|
|
|
19047
19073
|
return t.forEach((a) => {
|
|
19048
19074
|
for (let c = 0; c < a.length; c++)
|
|
19049
19075
|
s[i++] = a[c];
|
|
19050
|
-
}), new
|
|
19076
|
+
}), new Mt(s, !0);
|
|
19051
19077
|
}
|
|
19052
19078
|
}
|
|
19053
19079
|
uploadData() {
|
|
@@ -19155,21 +19181,21 @@ class An {
|
|
|
19155
19181
|
this.url = e, this.method = t, this.handler = r, this.timeout = s, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
|
|
19156
19182
|
}
|
|
19157
19183
|
}
|
|
19158
|
-
function
|
|
19184
|
+
function Et(n) {
|
|
19159
19185
|
if (!n)
|
|
19160
19186
|
throw rc();
|
|
19161
19187
|
}
|
|
19162
19188
|
function ic(n, e) {
|
|
19163
19189
|
function t(r, s) {
|
|
19164
19190
|
const i = tp(n, s, e);
|
|
19165
|
-
return
|
|
19191
|
+
return Et(i !== null), i;
|
|
19166
19192
|
}
|
|
19167
19193
|
return t;
|
|
19168
19194
|
}
|
|
19169
19195
|
function Vv(n, e) {
|
|
19170
19196
|
function t(r, s) {
|
|
19171
19197
|
const i = tp(n, s, e);
|
|
19172
|
-
return
|
|
19198
|
+
return Et(i !== null), Ov(i, s, n.host, n._protocol);
|
|
19173
19199
|
}
|
|
19174
19200
|
return t;
|
|
19175
19201
|
}
|
|
@@ -19230,9 +19256,9 @@ Content-Type: application/json; charset=utf-8\r
|
|
|
19230
19256
|
Content-Type: ` + d.contentType + `\r
|
|
19231
19257
|
\r
|
|
19232
19258
|
`, _ = `\r
|
|
19233
|
-
--` + l + "--", R =
|
|
19259
|
+
--` + l + "--", R = Mt.getBlob(m, r, _);
|
|
19234
19260
|
if (R === null)
|
|
19235
|
-
throw
|
|
19261
|
+
throw Wf();
|
|
19236
19262
|
const S = { name: d.fullPath }, N = sr(i, n.host, n._protocol), k = "POST", U = n.maxUploadRetryTime, $ = new An(N, k, ic(n, t), U);
|
|
19237
19263
|
return $.urlParams = S, $.headers = a, $.body = R.uploadData(), $.errorHandler = is(e), $;
|
|
19238
19264
|
}
|
|
@@ -19246,9 +19272,9 @@ function ac(n, e) {
|
|
|
19246
19272
|
try {
|
|
19247
19273
|
t = n.getResponseHeader("X-Goog-Upload-Status");
|
|
19248
19274
|
} catch {
|
|
19249
|
-
|
|
19275
|
+
Et(!1);
|
|
19250
19276
|
}
|
|
19251
|
-
return
|
|
19277
|
+
return Et(!!t && (e || ["active"]).indexOf(t) !== -1), t;
|
|
19252
19278
|
}
|
|
19253
19279
|
function Bv(n, e, t, r, s) {
|
|
19254
19280
|
const i = e.bucketOnlyServerUrl(), a = rp(e, r, s), c = { name: a.fullPath }, l = sr(i, n.host, n._protocol), d = "POST", f = {
|
|
@@ -19264,9 +19290,9 @@ function Bv(n, e, t, r, s) {
|
|
|
19264
19290
|
try {
|
|
19265
19291
|
k = N.getResponseHeader("X-Goog-Upload-URL");
|
|
19266
19292
|
} catch {
|
|
19267
|
-
|
|
19293
|
+
Et(!1);
|
|
19268
19294
|
}
|
|
19269
|
-
return
|
|
19295
|
+
return Et(Fi(k)), k;
|
|
19270
19296
|
}
|
|
19271
19297
|
const S = new An(l, d, R, _);
|
|
19272
19298
|
return S.urlParams = c, S.headers = f, S.body = m, S.errorHandler = is(e), S;
|
|
@@ -19279,11 +19305,11 @@ function qv(n, e, t, r) {
|
|
|
19279
19305
|
try {
|
|
19280
19306
|
m = d.getResponseHeader("X-Goog-Upload-Size-Received");
|
|
19281
19307
|
} catch {
|
|
19282
|
-
|
|
19308
|
+
Et(!1);
|
|
19283
19309
|
}
|
|
19284
|
-
m ||
|
|
19310
|
+
m || Et(!1);
|
|
19285
19311
|
const _ = Number(m);
|
|
19286
|
-
return
|
|
19312
|
+
return Et(!isNaN(_)), new ui(_, r.size(), f === "final");
|
|
19287
19313
|
}
|
|
19288
19314
|
const a = "POST", c = n.maxUploadRetryTime, l = new An(t, a, i, c);
|
|
19289
19315
|
return l.headers = s, l.errorHandler = is(e), l;
|
|
@@ -19304,7 +19330,7 @@ function jv(n, e, t, r, s, i, a, c) {
|
|
|
19304
19330
|
"X-Goog-Upload-Offset": `${l.current}`
|
|
19305
19331
|
}, N = r.slice(m, _);
|
|
19306
19332
|
if (N === null)
|
|
19307
|
-
throw
|
|
19333
|
+
throw Wf();
|
|
19308
19334
|
function k(K, ge) {
|
|
19309
19335
|
const re = ac(K, ["active", "final"]), w = l.current + f, g = r.size();
|
|
19310
19336
|
let E;
|
|
@@ -19416,15 +19442,15 @@ class zv {
|
|
|
19416
19442
|
this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
|
|
19417
19443
|
}
|
|
19418
19444
|
}
|
|
19419
|
-
class
|
|
19445
|
+
class Wv extends zv {
|
|
19420
19446
|
initXhr() {
|
|
19421
19447
|
this.xhr_.responseType = "text";
|
|
19422
19448
|
}
|
|
19423
19449
|
}
|
|
19424
19450
|
function an() {
|
|
19425
|
-
return new
|
|
19451
|
+
return new Wv();
|
|
19426
19452
|
}
|
|
19427
|
-
class
|
|
19453
|
+
class Hv {
|
|
19428
19454
|
isExponentialBackoffExpired() {
|
|
19429
19455
|
return this.sleepTime > this.maxSleepTime;
|
|
19430
19456
|
}
|
|
@@ -19826,7 +19852,7 @@ class En {
|
|
|
19826
19852
|
}
|
|
19827
19853
|
}
|
|
19828
19854
|
function Gv(n, e, t) {
|
|
19829
|
-
return n._throwIfRoot("uploadBytesResumable"), new
|
|
19855
|
+
return n._throwIfRoot("uploadBytesResumable"), new Hv(n, new Mt(e), t);
|
|
19830
19856
|
}
|
|
19831
19857
|
function Kv(n) {
|
|
19832
19858
|
n._throwIfRoot("getDownloadURL");
|
|
@@ -19883,7 +19909,7 @@ function eA(n, e, t, r = {}) {
|
|
|
19883
19909
|
}
|
|
19884
19910
|
class cc {
|
|
19885
19911
|
constructor(e, t, r, s, i, a = !1) {
|
|
19886
|
-
this.app = e, this._authProvider = t, this._appCheckProvider = r, this._url = s, this._firebaseVersion = i, this._isUsingEmulator = a, this._bucket = null, this._host = qf, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime =
|
|
19912
|
+
this.app = e, this._authProvider = t, this._appCheckProvider = r, this._url = s, this._firebaseVersion = i, this._isUsingEmulator = a, this._bucket = null, this._host = qf, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = WI, this._maxUploadRetryTime = HI, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket = Be.makeFromBucketSpec(s, this._host) : this._bucket = Xl(this._host, this.app.options);
|
|
19887
19913
|
}
|
|
19888
19914
|
/**
|
|
19889
19915
|
* The host string for this service, in the form of `host` or
|
|
@@ -19964,7 +19990,7 @@ class cc {
|
|
|
19964
19990
|
*/
|
|
19965
19991
|
_makeRequest(e, t, r, s, i = !0) {
|
|
19966
19992
|
if (this._deleted)
|
|
19967
|
-
return new ov(
|
|
19993
|
+
return new ov(Hf());
|
|
19968
19994
|
{
|
|
19969
19995
|
const a = _v(e, this._appId, r, s, t, this._firebaseVersion, i, this._isUsingEmulator);
|
|
19970
19996
|
return this._requests.add(a), a.getPromise().then(() => this._requests.delete(a), () => this._requests.delete(a)), a;
|
|
@@ -20007,7 +20033,7 @@ function iA(n, { instanceIdentifier: e }) {
|
|
|
20007
20033
|
return new cc(t, r, s, e, Tn);
|
|
20008
20034
|
}
|
|
20009
20035
|
function oA() {
|
|
20010
|
-
$t(new
|
|
20036
|
+
$t(new Tt(
|
|
20011
20037
|
ip,
|
|
20012
20038
|
iA,
|
|
20013
20039
|
"PUBLIC"
|
|
@@ -20424,7 +20450,7 @@ function RA(n) {
|
|
|
20424
20450
|
const s = t.getProvider("app").getImmediate(), i = t.getProvider(IA), a = t.getProvider(AA), c = t.getProvider(vA);
|
|
20425
20451
|
return new fA(s, i, a, c, r);
|
|
20426
20452
|
};
|
|
20427
|
-
$t(new
|
|
20453
|
+
$t(new Tt(
|
|
20428
20454
|
uc,
|
|
20429
20455
|
e,
|
|
20430
20456
|
"PUBLIC"
|
|
@@ -20444,13 +20470,13 @@ function PA(n, e, t) {
|
|
|
20444
20470
|
return mA(J(n), e);
|
|
20445
20471
|
}
|
|
20446
20472
|
RA();
|
|
20447
|
-
const
|
|
20473
|
+
const We = class We {
|
|
20448
20474
|
static setFirebaseConfig(e) {
|
|
20449
|
-
|
|
20475
|
+
We._firebaseConfig = e;
|
|
20450
20476
|
}
|
|
20451
20477
|
static useEmulator(e) {
|
|
20452
20478
|
this._emulatorConfig = {
|
|
20453
|
-
...
|
|
20479
|
+
...We.defaultEmulatorConfig,
|
|
20454
20480
|
emulate: !0,
|
|
20455
20481
|
...e
|
|
20456
20482
|
};
|
|
@@ -20459,11 +20485,11 @@ const He = class He {
|
|
|
20459
20485
|
return this._emulatorConfig;
|
|
20460
20486
|
}
|
|
20461
20487
|
constructor() {
|
|
20462
|
-
if (!
|
|
20463
|
-
this._firebaseApp = ph(
|
|
20488
|
+
if (!We._firebaseConfig) throw new Error("You should set a firebase config object before using Firebase");
|
|
20489
|
+
this._firebaseApp = ph(We._firebaseConfig);
|
|
20464
20490
|
}
|
|
20465
20491
|
static get instance() {
|
|
20466
|
-
return this._instance || (this._instance = new
|
|
20492
|
+
return this._instance || (this._instance = new We());
|
|
20467
20493
|
}
|
|
20468
20494
|
firestore() {
|
|
20469
20495
|
return LE(this._firebaseApp);
|
|
@@ -20475,22 +20501,22 @@ const He = class He {
|
|
|
20475
20501
|
return $I(this._firebaseApp);
|
|
20476
20502
|
}
|
|
20477
20503
|
functions() {
|
|
20478
|
-
return bA(this._firebaseApp,
|
|
20504
|
+
return bA(this._firebaseApp, We._region);
|
|
20479
20505
|
}
|
|
20480
20506
|
static setRegion(e) {
|
|
20481
20507
|
this._region = e;
|
|
20482
20508
|
}
|
|
20483
20509
|
};
|
|
20484
|
-
|
|
20510
|
+
We.defaultEmulatorConfig = {
|
|
20485
20511
|
host: "localhost",
|
|
20486
20512
|
firestorePort: 8080,
|
|
20487
20513
|
storagePort: 9199,
|
|
20488
20514
|
authPort: 9099,
|
|
20489
20515
|
functionsPort: 5001,
|
|
20490
20516
|
emulate: !1
|
|
20491
|
-
},
|
|
20492
|
-
let q =
|
|
20493
|
-
class NA extends
|
|
20517
|
+
}, We._emulatorConfig = We.defaultEmulatorConfig;
|
|
20518
|
+
let q = We;
|
|
20519
|
+
class NA extends gt {
|
|
20494
20520
|
constructor(e) {
|
|
20495
20521
|
if (super(), this._lastLimit = 0, e && q.useEmulator(e), q.emulator?.emulate) {
|
|
20496
20522
|
const { host: t, firestorePort: r } = q.emulator;
|
|
@@ -20567,7 +20593,7 @@ class NA extends jt {
|
|
|
20567
20593
|
}
|
|
20568
20594
|
queryObjectToQueryConstraints(e, t) {
|
|
20569
20595
|
const r = q.instance.firestore(), s = [], i = [], a = [];
|
|
20570
|
-
return
|
|
20596
|
+
return gt.toPropertyPathOperations(e.operations).forEach((c) => {
|
|
20571
20597
|
const l = this.toFirebaseOperator(c.operator);
|
|
20572
20598
|
c.aggregate ? i.push(Tl(c.property, l, c.value)) : s.push(Tl(c.property, l, c.value));
|
|
20573
20599
|
}), e.sort?.propertyName && a.push(YE(e.sort.propertyName, e.sort.order)), this._lastConstraints = {
|
|
@@ -20655,7 +20681,7 @@ No = SA([
|
|
|
20655
20681
|
tf("FirebaseCloudStorage", () => new No())
|
|
20656
20682
|
], No);
|
|
20657
20683
|
const sh = {
|
|
20658
|
-
twitter: () => new
|
|
20684
|
+
twitter: () => new He(),
|
|
20659
20685
|
facebook: () => new rt(),
|
|
20660
20686
|
google: () => new st()
|
|
20661
20687
|
};
|
|
@@ -20796,11 +20822,11 @@ class hp extends nf {
|
|
|
20796
20822
|
new rt()
|
|
20797
20823
|
)), this.registerCredentialProvider("twitter", () => Ro(
|
|
20798
20824
|
q.instance.auth(),
|
|
20799
|
-
new
|
|
20825
|
+
new He()
|
|
20800
20826
|
)), this.registerCredentialProvider("link-twitter", () => {
|
|
20801
20827
|
const e = q.instance.auth().currentUser;
|
|
20802
20828
|
if (!e) throw new Error("There is no logged in user");
|
|
20803
|
-
return ql(e, new
|
|
20829
|
+
return ql(e, new He());
|
|
20804
20830
|
}), this.registerCredentialProvider("anonymous", () => ww(
|
|
20805
20831
|
q.instance.auth()
|
|
20806
20832
|
));
|