@entropic-bond/firebase 1.13.24 → 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
- }, Hp = function(n) {
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) : Hp(this.decodeStringToByteArray(n, e));
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 Wp();
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 Wp extends Error {
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, Hr.prototype.create);
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 Hr {
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 Wr(n) {
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 Et {
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 H;
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
- })(H || (H = {}));
820
+ })(W || (W = {}));
821
821
  const wm = {
822
- debug: H.DEBUG,
823
- verbose: H.VERBOSE,
824
- info: H.INFO,
825
- warn: H.WARN,
826
- error: H.ERROR,
827
- silent: H.SILENT
828
- }, Im = H.INFO, vm = {
829
- [H.DEBUG]: "log",
830
- [H.VERBOSE]: "log",
831
- [H.INFO]: "info",
832
- [H.WARN]: "warn",
833
- [H.ERROR]: "error"
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 H))
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, H.DEBUG, ...e), this._logHandler(this, H.DEBUG, ...e);
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, H.VERBOSE, ...e), this._logHandler(this, H.VERBOSE, ...e);
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, H.INFO, ...e), this._logHandler(this, H.INFO, ...e);
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, H.WARN, ...e), this._logHandler(this, H.WARN, ...e);
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, H.ERROR, ...e), this._logHandler(this, H.ERROR, ...e);
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(Ut(n.result)), s();
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 Ut(n[e]);
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]), Ut(r);
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), Ut(dh.get(this));
975
+ return n.apply(fo(this), e), Ft(dh.get(this));
976
976
  } : function(...e) {
977
- return Ut(n.apply(fo(this), e));
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 Ut(n) {
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 = Ut(a);
993
+ const a = indexedDB.open(n, e), c = Ft(a);
994
994
  return r && a.addEventListener("upgradeneeded", (l) => {
995
- r(Ut(a.result), l.oldVersion, l.newVersion, Ut(a.transaction), l);
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 Tt = 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", Hm = "@firebase/database", Wm = "@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";
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
- [Hm]: "fire-rtdb",
1064
- [Wm]: "fire-data-connect",
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
- Tt.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
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 Tt.debug(`There were multiple attempts to register component ${e}.`), !1;
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
- }, Ft = new Hr("app", "Firebase", fg);
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 Et(
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 Ft.create("app-deleted", { appName: this._name });
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 Ft.create("bad-app-name", {
1179
+ throw Bt.create("bad-app-name", {
1180
1180
  appName: String(s)
1181
1181
  });
1182
1182
  if (t || (t = uh()), !t)
1183
- throw Ft.create(
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 Ft.create("duplicate-app", { appName: s });
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 Ft.create("no-app", { appName: n });
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 "/")`), Tt.warn(a.join(" "));
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 Et(
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 Ft.create("idb-open", {
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
- Tt.warn(e.message);
1251
+ wt.warn(e.message);
1252
1252
  else {
1253
- const t = Ft.create("idb-get", {
1253
+ const t = Bt.create("idb-get", {
1254
1254
  originalErrorMessage: e?.message
1255
1255
  });
1256
- Tt.warn(t.message);
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
- Tt.warn(t.message);
1266
+ wt.warn(t.message);
1267
1267
  else {
1268
- const r = Ft.create("idb-set", {
1268
+ const r = Bt.create("idb-set", {
1269
1269
  originalErrorMessage: t?.message
1270
1270
  });
1271
- Tt.warn(r.message);
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
- Tt.warn(e);
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 Tt.warn(e), "";
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 Et(
1409
+ $t(new Tt(
1410
1410
  "platform-logger",
1411
1411
  (e) => new Mm(e),
1412
1412
  "PRIVATE"
1413
1413
  /* ComponentType.PRIVATE */
1414
- )), $t(new Et(
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 Bt, _h;
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, Bt = a;
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 = Hi(o);
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 = Hi(o)) && (u = o.g[u.toString()], o = -1, u && (o = qi(u, h, p, v)), (h = o > -1 ? u[o] : null) && zi(h));
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 = Hi(u)) ? (Bi(h, o), h.h == 0 && (h.src = null, u[ji] = null)) : os(o);
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 Hi(o) {
1938
+ function Wi(o) {
1939
1939
  return o = o[ji], o instanceof cs ? o : null;
1940
1940
  }
1941
- var Wi = "__closure_events_fn_" + (Math.random() * 1e9 >>> 0);
1941
+ var Hi = "__closure_events_fn_" + (Math.random() * 1e9 >>> 0);
1942
1942
  function gc(o) {
1943
- return typeof o == "function" ? o : (o[Wi] || (o[Wi] = function(u) {
1943
+ return typeof o == "function" ? o : (o[Hi] || (o[Hi] = function(u) {
1944
1944
  return o.handleEvent(u);
1945
- }), o[Wi]);
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 bt(o, u, h, p) {
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
- bt.prototype.ba = function(o) {
2198
+ Pt.prototype.ba = function(o) {
2199
2199
  o = o.target;
2200
2200
  const u = this.O;
2201
- u && St(o) == 3 ? u.j() : this.Y(o);
2202
- }, bt.prototype.Y = function(o) {
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 = St(this.g), fe = this.g.ya(), X = this.g.ca();
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 = St(o.g) == 4;
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
- bt.prototype.cancel = function() {
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
- bt.prototype.aa = function() {
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 kt = X[5];
2338
- kt != null && typeof kt == "number" && kt > 0 && (p = 1.5 * kt, h.O = p, h.j.info("backChannelRequestTimeoutMs_=" + p)), p = h;
2339
- const Nt = o.g;
2340
- if (Nt) {
2341
- const Ts = Nt.g ? Nt.g.getResponseHeader("X-Client-Wire-Protocol") : null;
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 = Nt.g ? Nt.g.getResponseHeader("X-HTTP-Session-Id") : null;
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 Pt(o) {
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 Pt ? (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));
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
- Pt.prototype.toString = function() {
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
- }, Pt.prototype.resolve = function(o) {
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 Pt(o);
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(Ct, h, "TestLoadImage: loaded", !0, u, p), p.onerror = f(Ct, h, "TestLoadImage: error", !1, u, p), p.onabort = f(Ct, h, "TestLoadImage: abort", !1, u, p), p.ontimeout = f(Ct, h, "TestLoadImage: timeout", !1, u, p), a.setTimeout(function() {
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(), Ct(h, "TestPingServer: timeout", !1, u);
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 ? Ct(h, "TestPingServer: ok", !0, u) : Ct(h, "TestPingServer: server error", !1, u);
2567
+ clearTimeout(v), b.ok ? St(h, "TestPingServer: ok", !0, u) : St(h, "TestPingServer: server error", !1, u);
2568
2568
  }).catch(() => {
2569
- clearTimeout(v), Ct(h, "TestPingServer: error", !1, u);
2569
+ clearTimeout(v), St(h, "TestPingServer: error", !1, u);
2570
2570
  });
2571
2571
  }
2572
- function Ct(o, u, h, p, v) {
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
- Hc(this);
2609
+ Wc(this);
2610
2610
  } else o.text().then(this.Oa.bind(this), this.ga.bind(this));
2611
2611
  };
2612
- function Hc(o) {
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 && Hc(this);
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 Wc(o) {
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 = Wc(h), typeof o == "string" ? h != null && lr(h) : ee(o, u, 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 && St(o) == 4) setTimeout(o.Ca.bind(o), 0);
2716
- else if (Se(o, "readystatechange"), St(o) == 4) {
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 = St(o) > 2 ? o.g.statusText : "";
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 St(o) {
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 St(this) > 2 ? this.g.status : -1;
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 && St(o) >= 2 && o.g.getAllResponseHeaders() || "").split(`\r
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 bt(o, o.j, u), u.M = 2, u.A = fs(et(h)), h = !1, a.navigator && a.navigator.sendBeacon) try {
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 bt(this, this.j, o);
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(Wc(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;
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 bt(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);
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, kt] of O) {
2932
- let Nt = kt;
2933
- c(kt) && (Nt = Gi(kt)), fe.push(b + sn + "=" + encodeURIComponent(Nt));
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 bt(o, o.j, "rpc", o.Y), o.u === null && (o.g.J = o.o), o.g.P = 0;
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 Pt(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);
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 Pt ? et(h) : new Pt(h);
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 Pt(null);
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 <= H.DEBUG) {
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 wt(n, ...e) {
3156
- if (fn.logLevel <= H.ERROR) {
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 <= H.WARN) {
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 wt(r), new Error(r);
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 W(n, e) {
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) ? W(s, i) : go(s) ? 1 : -1;
3543
+ if (s !== i) return go(s) === go(i) ? H(s, i) : go(s) ? 1 : -1;
3544
3544
  }
3545
- return W(n.length, e.length);
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 W(e.length, t.length);
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 Bt.fromString(e.substring(4, e.length - 2));
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 ? W(this.nanoseconds, e.nanoseconds) : W(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 : W(n.largestBatchId, e.largestBatchId));
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 Hg(n) {
4202
+ function Wg(n) {
4203
4203
  let e = "";
4204
- for (let t = 0; t < n.length; t++) e.length > 0 && (e = Cu(e)), e = Wg(n.get(t), 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 Wg(n, e) {
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 W(this.binaryString, e.binaryString);
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 Ht(n) {
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 Wt(n) {
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 = Ht(n.mapValue.fields[Oh].timestampValue);
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__", Hs = "value";
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 = Ht(s.timestampValue), c = Ht(i.timestampValue);
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 Wt(s.bytesValue).isEqual(Wt(i.bytesValue));
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 W(t, r);
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 W(n.booleanValue, e.booleanValue);
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 = Wt(i), l = Wt(a);
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 = W(c[d], l[d]);
4923
+ const f = H(c[d], l[d]);
4924
4924
  if (f !== 0) return f;
4925
4925
  }
4926
- return W(c.length, l.length);
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 = W(ce(i.latitude), ce(a.latitude));
4931
- return c !== 0 ? c : W(ce(i.longitude), ce(a.longitude));
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[Hs]?.arrayValue, f = l[Hs]?.arrayValue, m = W(d?.values?.length || 0, f?.values?.length || 0);
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 W(l.length, f.length);
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 W(n, e);
4963
- const t = Ht(n), r = Ht(e), s = W(t.seconds, r.seconds);
4964
- return s !== 0 ? s : W(t.nanos, r.nanos);
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 W(t.length, r.length);
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 = Ht(t);
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 Wt(t).toBase64();
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 Wt(n.bytesValue).approximateByteSize();
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 Ws(n, e) {
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 Hh(n) {
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 It() {
5782
+ function vt() {
5783
5783
  return __;
5784
5784
  }
5785
- const Wh = new se(L.comparator);
5785
+ const Hh = new se(L.comparator);
5786
5786
  function br(...n) {
5787
- let e = Wh;
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 = Wh;
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(W);
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 wt("GRPC error has no .code"), P.UNKNOWN;
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 Bt([4294967295, 4294967295], 0);
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 Bt([t, r], 0), new Bt([s, i], 0)];
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 = Bt.fromNumber(this.ge);
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(Bt.fromNumber(r)));
6311
- return s.compare(M_) === 1 && (s = new Bt([s.getBits(0), s.getBits(1)], 0)), s.modulo(this.pe).toNumber();
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(W), It(), G());
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 Hu {
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 = Wu(), /** See public getters for explanations of these fields. */
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 = Wu();
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 = It(), this.He = As(), /** A mapping of document keys to their set of target IDs. */
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(W);
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 = Wt(r).toUint8Array();
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 = It(), this.He = As(), this.Je = As(), this.Ze = new se(W), s;
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 Hu(), this.ze.set(e, t)), t;
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(W), this.Je = this.Je.insert(e, t)), t;
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(W), this.He = this.He.insert(e, t)), t;
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 Hu()), this.Ge.getRemoteKeysForTarget(e).forEach((t) => {
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 Wu() {
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 = Ht(t);
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 Ho(n, e).canonicalString();
6807
+ return Wo(n, e).canonicalString();
6808
6808
  }
6809
- function Ho(n, e) {
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 Wo(n, e) {
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: Wo(n, e),
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 H_(n, e) {
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: Wo(n, e.key)
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: Wo(n, e.key)
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 W_(n, e) {
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: Ot(_.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: Ot(d.fieldPath)
7035
+ field: Vt(d.fieldPath)
7036
7036
  }
7037
7037
  }) : d.aggregateType === "sum" && c.push({
7038
7038
  alias: f,
7039
7039
  sum: {
7040
- field: Ot(d.fieldPath)
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 Ot(n) {
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: Ot(t.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: Ot(t.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: Ot(t.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: Ot(t.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: Ot(t.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 Mt {
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 Mt(this.target, this.targetId, this.purpose, e, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, this.expectedCount);
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 Mt(
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 Mt(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, e);
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 Mt(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, e, this.resumeToken, this.expectedCount);
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 Hn {
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 Hn(0);
7420
+ return new Wn(0);
7421
7421
  }
7422
7422
  static ar() {
7423
- return new Hn(-1);
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 = W(n, t);
7429
- return s === 0 ? W(e, r) : s;
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() <= H.DEBUG && V("LruGarbageCollector", `LRU Garbage Collection
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 = It();
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) || W(e.Hr, t.Hr);
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 W(e.Hr, t.Hr) || L.comparator(e.key, t.key);
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(W);
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(W);
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 = It();
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 = It();
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 = Hn._r();
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 Hn(t), this.highestTargetId = t), e.sequenceNumber > this.ii && (this.ii = e.sequenceNumber);
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) => Hg(r.path), (r, s) => r.isEqual(s)), this.garbageCollector = uy(this, t);
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() <= H.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() <= H.DEBUG && V("QueryEngine", "Query:", kn(t), "scans", r.documentReadCount, "local documents and returns", s, "documents as results."), r.documentReadCount > this.ds * s ? (Sn() <= H.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());
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() <= H.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));
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(Hh(e));
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() <= H.DEBUG && V("QueryEngine", "Using full collection scan to execute query:", kn(t)), this.fs.getDocumentsMatchingQuery(e, t, zt.min(), r);
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(W), /** Maps a target to its targetID. */
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 = It(), d = G();
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 = It();
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 Mt(e, a, "TargetPurposeListen", r.currentSequenceNumber), t.li.addTargetData(r, s).next(() => s))));
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
- (wt(t.toString()), wt("Using maximum backoff delay to prevent overloading the backend."), this.M_.g_())
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 = W_(e.writeResults, e.commitTime), r = ct(e.commitTime);
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) => H_(this.serializer, 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, Ho(t, r), s, i, a)).catch((i) => {
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, Ho(t, r), s, a, c, i)).catch((a) => {
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 ? (wt(t), this.aa = !1) : V("OnlineStateTracker", t);
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 Hy(n) {
9771
+ async function Wy(n) {
9772
9772
  n.Va.set(
9773
9773
  "Online"
9774
9774
  /* OnlineState.Online */
9775
9775
  );
9776
9776
  }
9777
- async function Wy(n) {
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 Mt(f.target, l, d, f.sequenceNumber);
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: Hy.bind(null, n),
9960
- Yo: Wy.bind(null, n),
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 (wt("AsyncQueue", `${e}: ${n}`), Jn(n)) return new D(P.UNAVAILABLE, `${e}: ${n}`);
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 Wn {
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 Wn(
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 Wn(
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 = Wn.fromInitialDocuments(e.query, e.docs, e.mutatedKeys, e.fromCache, e.hasCachedResults), this.Oa = !0, this.xa.next(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 = Hh(e), this.tu = new Mn(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 Wn(
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 Wn.fromInitialDocuments(this.query, this.tu, this.mutatedKeys, this.Xa === 0, this.hasCachedResults);
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 = Hn.ar(), this.onlineState = "Unknown", // The primary state is set to `true` or `false` immediately after Firestore
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 = It(), N = G();
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(W)), d = d.insert(c, l), a.du[a.currentUser.toKey()] = d;
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(W),
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 Mt(at(wi(t.path)), r, "TargetPurposeLimboResolution", _i.ce));
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) : wt("Uncaught Error in snapshot listener:", e.toString()));
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 qt(this.firestore, this.converter, this._key.path.popLast());
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 qt extends pt {
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 qt(this.firestore, e, this._path);
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 qt(
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 qt)) throw new D(P.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
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 qt(
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 qt)) throw new D(P.INVALID_ARGUMENT, "Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
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 qt ? n.converter : null, new L(r));
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, wt("INTERNAL UNHANDLED ERROR: ", ml(r)), r;
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 W(this._lat, e._lat) || W(this._long, e._long);
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
- [Hs]: {
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(Wt(e.bytesValue));
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?.[Hs].arrayValue?.values?.map((r) => ce(r.doubleValue));
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 = Ht(e);
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
- wt(`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;
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 HE {
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 WE {
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 Hd(e._query, t), new pt(e.firestore, e.converter, $o(e._query, t));
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) Hd(a, l), a = $o(a, l);
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) => Wd("or", e)), er._create("or", n);
12703
+ return n.forEach((e) => Hd("or", e)), er._create("or", n);
12704
12704
  }
12705
12705
  function QE(...n) {
12706
- return n.forEach((e) => Wd("and", e)), er._create("and", n);
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 Ha extends Vi {
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 Ha(e, t, r);
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 Ha._create(
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(Ws(a, l.key));
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(Ws(c, U));
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 Ws(n, new L(r));
12823
+ return Hs(n, new L(r));
12824
12824
  }
12825
- if (t instanceof de) return Ws(n, t._key);
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 Hd(n, e) {
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 Wd(n, e) {
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 HE("count");
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 WE(l, f, d);
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 Et("firestore", (r, { instanceIdentifier: s, options: i }) => {
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(jt.toPersistentDocumentChange(r))
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) => jt.toPersistentDocumentChange(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 jt.isArrayOperator(r.operator) && s instanceof pe ? {
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 Wa {
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");
@@ -14171,11 +14177,11 @@ class Wa {
14171
14177
  return r ? this.onDocumentChange(t, r) : Promise.resolve();
14172
14178
  }
14173
14179
  async onDocumentChange(e, t) {
14174
- const r = jt.toPersistentDocumentChange(e);
14180
+ const r = gt.toPersistentDocumentChange(e);
14175
14181
  this._beforeDocumentChange?.(r, t);
14176
14182
  const s = {};
14177
14183
  e.type !== "update" || !r.before || r.after?.id && this._disabledChangeListeners.has(r.after?.id) || (await Promise.all(t.map(async (i) => {
14178
- const a = Wa.ownerCollectionPath(pe.createInstance(i.ownerClassName()), i, r.params), c = await this._resolveCollectionPaths(a);
14184
+ const a = Ha.ownerCollectionPath(pe.createInstance(i.ownerClassName()), i, r.params), c = await this._resolveCollectionPaths(a);
14179
14185
  await Promise.all(c.map(async (l) => {
14180
14186
  const d = TT.getModel(l);
14181
14187
  let f = d.find(), m = !1;
@@ -14218,12 +14224,12 @@ class Wa {
14218
14224
  return typeof t.ownerCollection == "function" ? s = t.ownerCollection(e, t, r) : s = t.ownerCollection ?? e.className, s;
14219
14225
  }
14220
14226
  }
14221
- class jt {
14227
+ class gt {
14222
14228
  constructor() {
14223
14229
  this._cachedPropsUpdater = void 0;
14224
14230
  }
14225
14231
  installCachedPropsUpdater(e) {
14226
- return this._cachedPropsUpdater = new Wa(e), this._cachedPropsUpdater.resolveCollectionPaths = this.resolveCollectionPaths.bind(this), this._cachedPropsUpdater;
14232
+ return this._cachedPropsUpdater = new Ha(e), this._cachedPropsUpdater.resolveCollectionPaths = this.resolveCollectionPaths.bind(this), this._cachedPropsUpdater;
14227
14233
  }
14228
14234
  get cachedPropsUpdater() {
14229
14235
  return this._cachedPropsUpdater;
@@ -14242,7 +14248,7 @@ class jt {
14242
14248
  */
14243
14249
  static toPropertyPathOperations(e) {
14244
14250
  return e ? e.map((t) => {
14245
- if (jt.isArrayOperator(t.operator) && t.value[0] instanceof pe)
14251
+ if (gt.isArrayOperator(t.operator) && t.value[0] instanceof pe)
14246
14252
  return {
14247
14253
  property: pe.searchableArrayNameFor(t.property),
14248
14254
  operator: t.operator,
@@ -14276,14 +14282,35 @@ class jt {
14276
14282
  return [void 0, e];
14277
14283
  }
14278
14284
  static isStringMatchingTemplate(e, t) {
14279
- const r = e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&").replace(/\\\$\\\{[^}]+\\\}/g, "([^/]+)").replace(/\\\{[^}]+\\\}/g, "([^/]+)");
14280
- return new RegExp("^" + r + "$").test(t);
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;
14281
14296
  }
14282
14297
  static extractTemplateParams(e, t) {
14283
- const r = [], s = t.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&").replace(/\\\{([^}]+)\\\}/g, (l, d) => (r.push(d), "([^/]+)")), i = new RegExp("^" + s + "$"), a = e.match(i), c = {};
14284
- return a && r.forEach((l, d) => {
14285
- c[l] = a[d + 1];
14286
- }), c;
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;
14287
14314
  }
14288
14315
  }
14289
14316
  const ef = class On {
@@ -14582,13 +14609,13 @@ function rf() {
14582
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."
14583
14610
  };
14584
14611
  }
14585
- const bT = rf, sf = new Hr("auth", "Firebase", rf());
14612
+ const bT = rf, sf = new Wr("auth", "Firebase", rf());
14586
14613
  const ri = new ia("@firebase/auth");
14587
14614
  function PT(n, ...e) {
14588
- ri.logLevel <= H.WARN && ri.warn(`Auth (${Tn}): ${n}`, ...e);
14615
+ ri.logLevel <= W.WARN && ri.warn(`Auth (${Tn}): ${n}`, ...e);
14589
14616
  }
14590
14617
  function xs(n, ...e) {
14591
- ri.logLevel <= H.ERROR && ri.error(`Auth (${Tn}): ${n}`, ...e);
14618
+ ri.logLevel <= W.ERROR && ri.error(`Auth (${Tn}): ${n}`, ...e);
14592
14619
  }
14593
14620
  function ze(n, ...e) {
14594
14621
  throw Ka(n, ...e);
@@ -14601,7 +14628,7 @@ function Ga(n, e, t) {
14601
14628
  ...bT(),
14602
14629
  [e]: t
14603
14630
  };
14604
- return new Hr("auth", "Firebase", r).create(e, {
14631
+ return new Wr("auth", "Firebase", r).create(e, {
14605
14632
  appName: n.name
14606
14633
  });
14607
14634
  }
@@ -14628,12 +14655,12 @@ function M(n, e, ...t) {
14628
14655
  if (!n)
14629
14656
  throw Ka(e, ...t);
14630
14657
  }
14631
- function gt(n) {
14658
+ function _t(n) {
14632
14659
  const e = "INTERNAL ASSERTION FAILED: " + n;
14633
14660
  throw xs(e), new Error(e);
14634
14661
  }
14635
- function vt(n, e) {
14636
- n || gt(e);
14662
+ function At(n, e) {
14663
+ n || _t(e);
14637
14664
  }
14638
14665
  function Zo() {
14639
14666
  return typeof self < "u" && self.location?.href || "";
@@ -14666,14 +14693,14 @@ function kT() {
14666
14693
  }
14667
14694
  class ts {
14668
14695
  constructor(e, t) {
14669
- this.shortDelay = e, this.longDelay = t, vt(t > e, "Short delay should be less than long delay!"), this.isMobile = tm() || im();
14696
+ this.shortDelay = e, this.longDelay = t, At(t > e, "Short delay should be less than long delay!"), this.isMobile = tm() || im();
14670
14697
  }
14671
14698
  get() {
14672
14699
  return ST() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
14673
14700
  }
14674
14701
  }
14675
14702
  function Qa(n, e) {
14676
- vt(n.emulator, "Emulator should always be set here");
14703
+ At(n.emulator, "Emulator should always be set here");
14677
14704
  const { url: t } = n.emulator;
14678
14705
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
14679
14706
  }
@@ -14690,7 +14717,7 @@ class af {
14690
14717
  return globalThis.fetch;
14691
14718
  if (typeof fetch < "u")
14692
14719
  return fetch;
14693
- gt("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
14720
+ _t("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
14694
14721
  }
14695
14722
  static headers() {
14696
14723
  if (this.headersImpl)
@@ -14701,7 +14728,7 @@ class af {
14701
14728
  return globalThis.Headers;
14702
14729
  if (typeof Headers < "u")
14703
14730
  return Headers;
14704
- gt("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
14731
+ _t("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
14705
14732
  }
14706
14733
  static response() {
14707
14734
  if (this.responseImpl)
@@ -14712,7 +14739,7 @@ class af {
14712
14739
  return globalThis.Response;
14713
14740
  if (typeof Response < "u")
14714
14741
  return Response;
14715
- gt("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
14742
+ _t("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
14716
14743
  }
14717
14744
  }
14718
14745
  const NT = {
@@ -14799,7 +14826,7 @@ const DT = [
14799
14826
  "/v1/token"
14800
14827
  /* Endpoint.TOKEN */
14801
14828
  ], OT = new ts(3e4, 6e4);
14802
- function Rt(n, e) {
14829
+ function bt(n, e) {
14803
14830
  return n.tenantId && !e.tenantId ? {
14804
14831
  ...e,
14805
14832
  tenantId: n.tenantId
@@ -14811,7 +14838,7 @@ async function Ze(n, e, t, r, s = {}) {
14811
14838
  r && (e === "GET" ? a = r : i = {
14812
14839
  body: JSON.stringify(r)
14813
14840
  });
14814
- const c = Wr({
14841
+ const c = Hr({
14815
14842
  key: n.config.apiKey,
14816
14843
  ...a
14817
14844
  }).slice(1), l = await n._getAdditionalHeaders();
@@ -14956,7 +14983,7 @@ class MT {
14956
14983
  }
14957
14984
  }
14958
14985
  async function xT(n, e) {
14959
- return Ze(n, "GET", "/v2/recaptchaConfig", Rt(n, e));
14986
+ return Ze(n, "GET", "/v2/recaptchaConfig", bt(n, e));
14960
14987
  }
14961
14988
  async function UT(n, e) {
14962
14989
  return Ze(n, "POST", "/v1/accounts:delete", e);
@@ -15140,9 +15167,9 @@ function lf(n) {
15140
15167
  photoURL: t.photoUrl || null
15141
15168
  }));
15142
15169
  }
15143
- async function HT(n, e) {
15170
+ async function WT(n, e) {
15144
15171
  const t = await cf(n, {}, async () => {
15145
- const r = Wr({
15172
+ const r = Hr({
15146
15173
  grant_type: "refresh_token",
15147
15174
  refresh_token: e
15148
15175
  }).slice(1), { tokenApiHost: s, apiKey: i } = n.config, a = await uf(n, s, "/v1/token", `key=${i}`), c = await n._getAdditionalHeaders();
@@ -15163,8 +15190,8 @@ async function HT(n, e) {
15163
15190
  refreshToken: t.refresh_token
15164
15191
  };
15165
15192
  }
15166
- async function WT(n, e) {
15167
- return Ze(n, "POST", "/v2/accounts:revokeToken", Rt(n, e));
15193
+ async function HT(n, e) {
15194
+ return Ze(n, "POST", "/v2/accounts:revokeToken", bt(n, e));
15168
15195
  }
15169
15196
  class Un {
15170
15197
  constructor() {
@@ -15211,7 +15238,7 @@ class Un {
15211
15238
  this.refreshToken = null;
15212
15239
  }
15213
15240
  async refresh(e, t) {
15214
- const { accessToken: r, refreshToken: s, expiresIn: i } = await HT(e, t);
15241
+ const { accessToken: r, refreshToken: s, expiresIn: i } = await WT(e, t);
15215
15242
  this.updateTokensAndExpiration(r, s, Number(i));
15216
15243
  }
15217
15244
  updateTokensAndExpiration(e, t, r) {
@@ -15241,10 +15268,10 @@ class Un {
15241
15268
  return Object.assign(new Un(), this.toJSON());
15242
15269
  }
15243
15270
  _performRefresh() {
15244
- return gt("not implemented");
15271
+ return _t("not implemented");
15245
15272
  }
15246
15273
  }
15247
- function Dt(n, e) {
15274
+ function Ot(n, e) {
15248
15275
  M(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
15249
15276
  }
15250
15277
  class Ge {
@@ -15349,7 +15376,7 @@ class Ge {
15349
15376
  e,
15350
15377
  "internal-error"
15351
15378
  /* AuthErrorCode.INTERNAL_ERROR */
15352
- ), Dt(r, e.name), Dt(s, e.name), M(
15379
+ ), Ot(r, e.name), Ot(s, e.name), M(
15353
15380
  typeof _ == "boolean",
15354
15381
  e,
15355
15382
  "internal-error"
@@ -15359,7 +15386,7 @@ class Ge {
15359
15386
  e,
15360
15387
  "internal-error"
15361
15388
  /* AuthErrorCode.INTERNAL_ERROR */
15362
- ), Dt(i, e.name), Dt(a, e.name), Dt(c, e.name), Dt(l, e.name), Dt(d, e.name), Dt(f, e.name);
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);
15363
15390
  const U = new Ge({
15364
15391
  uid: m,
15365
15392
  auth: e,
@@ -15427,10 +15454,10 @@ class Ge {
15427
15454
  }
15428
15455
  }
15429
15456
  const kl = /* @__PURE__ */ new Map();
15430
- function _t(n) {
15431
- vt(n instanceof Function, "Expected a class definition");
15457
+ function yt(n) {
15458
+ At(n instanceof Function, "Expected a class definition");
15432
15459
  let e = kl.get(n);
15433
- return e ? (vt(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), kl.set(n, e), e);
15460
+ return e ? (At(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), kl.set(n, e), e);
15434
15461
  }
15435
15462
  class hf {
15436
15463
  constructor() {
@@ -15497,12 +15524,12 @@ class Fn {
15497
15524
  }
15498
15525
  static async create(e, t, r = "authUser") {
15499
15526
  if (!t.length)
15500
- return new Fn(_t(Nl), e, r);
15527
+ return new Fn(yt(Nl), e, r);
15501
15528
  const s = (await Promise.all(t.map(async (d) => {
15502
15529
  if (await d._isAvailable())
15503
15530
  return d;
15504
15531
  }))).filter((d) => d);
15505
- let i = s[0] || _t(Nl);
15532
+ let i = s[0] || yt(Nl);
15506
15533
  const a = Us(r, e.config.apiKey, e.name);
15507
15534
  let c = null;
15508
15535
  for (const d of t)
@@ -15655,7 +15682,7 @@ class QT {
15655
15682
  }
15656
15683
  }
15657
15684
  async function YT(n, e = {}) {
15658
- return Ze(n, "GET", "/v2/passwordPolicy", Rt(n, e));
15685
+ return Ze(n, "GET", "/v2/passwordPolicy", bt(n, e));
15659
15686
  }
15660
15687
  const JT = 6;
15661
15688
  class XT {
@@ -15732,7 +15759,7 @@ class ZT {
15732
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);
15733
15760
  }
15734
15761
  _initializeWithPersistence(e, t) {
15735
- return t && (this._popupRedirectResolver = _t(t)), this._initializationPromise = this.queue(async () => {
15762
+ return t && (this._popupRedirectResolver = yt(t)), this._initializationPromise = this.queue(async () => {
15736
15763
  if (!this._deleted && (this.persistenceManager = await Fn.create(this, e), this._resolvePersistenceManagerAvailable?.(), !this._deleted)) {
15737
15764
  if (this._popupRedirectResolver?._shouldInitProactively)
15738
15765
  try {
@@ -15857,7 +15884,7 @@ class ZT {
15857
15884
  }
15858
15885
  setPersistence(e) {
15859
15886
  return Pe(this.app) ? Promise.reject(lt(this)) : this.queue(async () => {
15860
- await this.assertedPersistence.setPersistence(_t(e));
15887
+ await this.assertedPersistence.setPersistence(yt(e));
15861
15888
  });
15862
15889
  }
15863
15890
  _getRecaptchaConfig() {
@@ -15882,7 +15909,7 @@ class ZT {
15882
15909
  return this.assertedPersistence.persistence;
15883
15910
  }
15884
15911
  _updateErrorMap(e) {
15885
- this._errorFactory = new Hr("auth", "Firebase", e());
15912
+ this._errorFactory = new Wr("auth", "Firebase", e());
15886
15913
  }
15887
15914
  onAuthStateChanged(e, t, r) {
15888
15915
  return this.registerStateListener(this.authStateSubscription, e, t, r);
@@ -15915,7 +15942,7 @@ class ZT {
15915
15942
  token: e,
15916
15943
  idToken: t
15917
15944
  };
15918
- this.tenantId != null && (r.tenantId = this.tenantId), await WT(this, r);
15945
+ this.tenantId != null && (r.tenantId = this.tenantId), await HT(this, r);
15919
15946
  }
15920
15947
  }
15921
15948
  toJSON() {
@@ -15932,7 +15959,7 @@ class ZT {
15932
15959
  }
15933
15960
  async getOrInitRedirectPersistenceManager(e) {
15934
15961
  if (!this.redirectPersistenceManager) {
15935
- const t = e && _t(e) || this._popupRedirectResolver;
15962
+ const t = e && yt(e) || this._popupRedirectResolver;
15936
15963
  M(
15937
15964
  t,
15938
15965
  this,
@@ -15940,7 +15967,7 @@ class ZT {
15940
15967
  /* AuthErrorCode.ARGUMENT_ERROR */
15941
15968
  ), this.redirectPersistenceManager = await Fn.create(
15942
15969
  this,
15943
- [_t(t._redirectPersistence)],
15970
+ [yt(t._redirectPersistence)],
15944
15971
  "redirectUser"
15945
15972
  /* KeyName.REDIRECT_USER */
15946
15973
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -16285,7 +16312,7 @@ function cw(n, e) {
16285
16312
  return t.initialize({ options: e });
16286
16313
  }
16287
16314
  function uw(n, e) {
16288
- const t = e?.persistence || [], r = (Array.isArray(t) ? t : [t]).map(_t);
16315
+ const t = e?.persistence || [], r = (Array.isArray(t) ? t : [t]).map(yt);
16289
16316
  e?.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e?.popupRedirectResolver);
16290
16317
  }
16291
16318
  function vf(n, e, t) {
@@ -16359,29 +16386,29 @@ class Xa {
16359
16386
  * @returns a JSON-serializable representation of this object.
16360
16387
  */
16361
16388
  toJSON() {
16362
- return gt("not implemented");
16389
+ return _t("not implemented");
16363
16390
  }
16364
16391
  /** @internal */
16365
16392
  _getIdTokenResponse(e) {
16366
- return gt("not implemented");
16393
+ return _t("not implemented");
16367
16394
  }
16368
16395
  /** @internal */
16369
16396
  _linkToIdToken(e, t) {
16370
- return gt("not implemented");
16397
+ return _t("not implemented");
16371
16398
  }
16372
16399
  /** @internal */
16373
16400
  _getReauthenticationResolver(e) {
16374
- return gt("not implemented");
16401
+ return _t("not implemented");
16375
16402
  }
16376
16403
  }
16377
16404
  async function dw(n, e) {
16378
16405
  return Ze(n, "POST", "/v1/accounts:signUp", e);
16379
16406
  }
16380
16407
  async function fw(n, e) {
16381
- return ns(n, "POST", "/v1/accounts:signInWithPassword", Rt(n, e));
16408
+ return ns(n, "POST", "/v1/accounts:signInWithPassword", bt(n, e));
16382
16409
  }
16383
16410
  async function Rf(n, e) {
16384
- return Ze(n, "POST", "/v1/accounts:sendOobCode", Rt(n, e));
16411
+ return Ze(n, "POST", "/v1/accounts:sendOobCode", bt(n, e));
16385
16412
  }
16386
16413
  async function pw(n, e) {
16387
16414
  return Rf(n, e);
@@ -16390,10 +16417,10 @@ async function mw(n, e) {
16390
16417
  return Rf(n, e);
16391
16418
  }
16392
16419
  async function gw(n, e) {
16393
- return ns(n, "POST", "/v1/accounts:signInWithEmailLink", Rt(n, e));
16420
+ return ns(n, "POST", "/v1/accounts:signInWithEmailLink", bt(n, e));
16394
16421
  }
16395
16422
  async function _w(n, e) {
16396
- return ns(n, "POST", "/v1/accounts:signInWithEmailLink", Rt(n, e));
16423
+ return ns(n, "POST", "/v1/accounts:signInWithEmailLink", bt(n, e));
16397
16424
  }
16398
16425
  class zr extends Xa {
16399
16426
  /** @internal */
@@ -16498,7 +16525,7 @@ class zr extends Xa {
16498
16525
  }
16499
16526
  }
16500
16527
  async function Bn(n, e) {
16501
- return ns(n, "POST", "/v1/accounts:signInWithIdp", Rt(n, e));
16528
+ return ns(n, "POST", "/v1/accounts:signInWithIdp", bt(n, e));
16502
16529
  }
16503
16530
  const yw = "http://localhost";
16504
16531
  class yn extends Xa {
@@ -16565,7 +16592,7 @@ class yn extends Xa {
16565
16592
  e.pendingToken = this.pendingToken;
16566
16593
  else {
16567
16594
  const t = {};
16568
- 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 = Wr(t);
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);
16569
16596
  }
16570
16597
  return e;
16571
16598
  }
@@ -16855,7 +16882,7 @@ class st extends rs {
16855
16882
  }
16856
16883
  st.GOOGLE_SIGN_IN_METHOD = "google.com";
16857
16884
  st.PROVIDER_ID = "google.com";
16858
- class Vt extends rs {
16885
+ class Lt extends rs {
16859
16886
  constructor() {
16860
16887
  super(
16861
16888
  "github.com"
@@ -16869,8 +16896,8 @@ class Vt extends rs {
16869
16896
  */
16870
16897
  static credential(e) {
16871
16898
  return yn._fromParams({
16872
- providerId: Vt.PROVIDER_ID,
16873
- signInMethod: Vt.GITHUB_SIGN_IN_METHOD,
16899
+ providerId: Lt.PROVIDER_ID,
16900
+ signInMethod: Lt.GITHUB_SIGN_IN_METHOD,
16874
16901
  accessToken: e
16875
16902
  });
16876
16903
  }
@@ -16880,7 +16907,7 @@ class Vt extends rs {
16880
16907
  * @param userCredential - The user credential.
16881
16908
  */
16882
16909
  static credentialFromResult(e) {
16883
- return Vt.credentialFromTaggedObject(e);
16910
+ return Lt.credentialFromTaggedObject(e);
16884
16911
  }
16885
16912
  /**
16886
16913
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -16889,21 +16916,21 @@ class Vt extends rs {
16889
16916
  * @param userCredential - The user credential.
16890
16917
  */
16891
16918
  static credentialFromError(e) {
16892
- return Vt.credentialFromTaggedObject(e.customData || {});
16919
+ return Lt.credentialFromTaggedObject(e.customData || {});
16893
16920
  }
16894
16921
  static credentialFromTaggedObject({ _tokenResponse: e }) {
16895
16922
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
16896
16923
  return null;
16897
16924
  try {
16898
- return Vt.credential(e.oauthAccessToken);
16925
+ return Lt.credential(e.oauthAccessToken);
16899
16926
  } catch {
16900
16927
  return null;
16901
16928
  }
16902
16929
  }
16903
16930
  }
16904
- Vt.GITHUB_SIGN_IN_METHOD = "github.com";
16905
- Vt.PROVIDER_ID = "github.com";
16906
- class We extends rs {
16931
+ Lt.GITHUB_SIGN_IN_METHOD = "github.com";
16932
+ Lt.PROVIDER_ID = "github.com";
16933
+ class He extends rs {
16907
16934
  constructor() {
16908
16935
  super(
16909
16936
  "twitter.com"
@@ -16918,8 +16945,8 @@ class We extends rs {
16918
16945
  */
16919
16946
  static credential(e, t) {
16920
16947
  return yn._fromParams({
16921
- providerId: We.PROVIDER_ID,
16922
- signInMethod: We.TWITTER_SIGN_IN_METHOD,
16948
+ providerId: He.PROVIDER_ID,
16949
+ signInMethod: He.TWITTER_SIGN_IN_METHOD,
16923
16950
  oauthToken: e,
16924
16951
  oauthTokenSecret: t
16925
16952
  });
@@ -16930,7 +16957,7 @@ class We extends rs {
16930
16957
  * @param userCredential - The user credential.
16931
16958
  */
16932
16959
  static credentialFromResult(e) {
16933
- return We.credentialFromTaggedObject(e);
16960
+ return He.credentialFromTaggedObject(e);
16934
16961
  }
16935
16962
  /**
16936
16963
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -16939,7 +16966,7 @@ class We extends rs {
16939
16966
  * @param userCredential - The user credential.
16940
16967
  */
16941
16968
  static credentialFromError(e) {
16942
- return We.credentialFromTaggedObject(e.customData || {});
16969
+ return He.credentialFromTaggedObject(e.customData || {});
16943
16970
  }
16944
16971
  static credentialFromTaggedObject({ _tokenResponse: e }) {
16945
16972
  if (!e)
@@ -16948,24 +16975,24 @@ class We extends rs {
16948
16975
  if (!t || !r)
16949
16976
  return null;
16950
16977
  try {
16951
- return We.credential(t, r);
16978
+ return He.credential(t, r);
16952
16979
  } catch {
16953
16980
  return null;
16954
16981
  }
16955
16982
  }
16956
16983
  }
16957
- We.TWITTER_SIGN_IN_METHOD = "twitter.com";
16958
- We.PROVIDER_ID = "twitter.com";
16984
+ He.TWITTER_SIGN_IN_METHOD = "twitter.com";
16985
+ He.PROVIDER_ID = "twitter.com";
16959
16986
  async function bf(n, e) {
16960
- return ns(n, "POST", "/v1/accounts:signUp", Rt(n, e));
16987
+ return ns(n, "POST", "/v1/accounts:signUp", bt(n, e));
16961
16988
  }
16962
- class At {
16989
+ class Rt {
16963
16990
  constructor(e) {
16964
16991
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
16965
16992
  }
16966
16993
  static async _fromIdTokenResponse(e, t, r, s = !1) {
16967
16994
  const i = await Ge._fromIdTokenResponse(e, r, s), a = Ml(r);
16968
- return new At({
16995
+ return new Rt({
16969
16996
  user: i,
16970
16997
  providerId: a,
16971
16998
  _tokenResponse: r,
@@ -16979,7 +17006,7 @@ class At {
16979
17006
  !0
16980
17007
  );
16981
17008
  const s = Ml(r);
16982
- return new At({
17009
+ return new Rt({
16983
17010
  user: e,
16984
17011
  providerId: s,
16985
17012
  _tokenResponse: r,
@@ -16995,7 +17022,7 @@ async function ww(n) {
16995
17022
  return Promise.reject(lt(n));
16996
17023
  const e = mt(n);
16997
17024
  if (await e._initializationPromise, e.currentUser?.isAnonymous)
16998
- return new At({
17025
+ return new Rt({
16999
17026
  user: e.currentUser,
17000
17027
  providerId: null,
17001
17028
  operationType: "signIn"
@@ -17003,7 +17030,7 @@ async function ww(n) {
17003
17030
  });
17004
17031
  const t = await bf(e, {
17005
17032
  returnSecureToken: !0
17006
- }), r = await At._fromIdTokenResponse(e, "signIn", t, !0);
17033
+ }), r = await Rt._fromIdTokenResponse(e, "signIn", t, !0);
17007
17034
  return await e._updateCurrentUser(r.user), r;
17008
17035
  }
17009
17036
  class oi extends Xe {
@@ -17041,7 +17068,7 @@ async function Iw(n, e) {
17041
17068
  }
17042
17069
  async function vw(n, e, t = !1) {
17043
17070
  const r = await Gn(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
17044
- return At._forOperation(n, "link", r);
17071
+ return Rt._forOperation(n, "link", r);
17045
17072
  }
17046
17073
  async function Aw(n, e, t) {
17047
17074
  await $r(e);
@@ -17074,7 +17101,7 @@ async function Rw(n, e, t = !1) {
17074
17101
  r,
17075
17102
  "user-mismatch"
17076
17103
  /* AuthErrorCode.USER_MISMATCH */
17077
- ), At._forOperation(n, s, i);
17104
+ ), Rt._forOperation(n, s, i);
17078
17105
  } catch (i) {
17079
17106
  throw i?.code === "auth/user-not-found" && ze(
17080
17107
  r,
@@ -17086,7 +17113,7 @@ async function Rw(n, e, t = !1) {
17086
17113
  async function Sf(n, e, t = !1) {
17087
17114
  if (Pe(n.app))
17088
17115
  return Promise.reject(lt(n));
17089
- const r = "signIn", s = await Pf(n, r, e), i = await At._fromIdTokenResponse(n, r, s);
17116
+ const r = "signIn", s = await Pf(n, r, e), i = await Rt._fromIdTokenResponse(n, r, s);
17090
17117
  return t || await n._updateCurrentUser(i.user), i;
17091
17118
  }
17092
17119
  async function bw(n, e) {
@@ -17144,7 +17171,7 @@ async function Sw(n, e, t) {
17144
17171
  /* RecaptchaClientType.WEB */
17145
17172
  }, "signUpPassword", bf).catch((l) => {
17146
17173
  throw l.code === "auth/password-does-not-meet-requirements" && kf(n), l;
17147
- }), c = await At._fromIdTokenResponse(r, "signIn", a);
17174
+ }), c = await Rt._fromIdTokenResponse(r, "signIn", a);
17148
17175
  return await r._updateCurrentUser(c.user), c;
17149
17176
  }
17150
17177
  function xl(n, e, t) {
@@ -17550,7 +17577,7 @@ async function Fl(n, e, t) {
17550
17577
  });
17551
17578
  return new ss(r).toPromise();
17552
17579
  }
17553
- async function Hw(n, e) {
17580
+ async function Ww(n, e) {
17554
17581
  const t = Ui(n, !1).get(e), r = await new ss(t).toPromise();
17555
17582
  return r === void 0 ? null : r.value;
17556
17583
  }
@@ -17558,7 +17585,7 @@ function Bl(n, e) {
17558
17585
  const t = Ui(n, !0).delete(e);
17559
17586
  return new ss(t).toPromise();
17560
17587
  }
17561
- const Ww = 800, Gw = 3;
17588
+ const Hw = 800, Gw = 3;
17562
17589
  class Uf {
17563
17590
  constructor() {
17564
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(() => {
@@ -17664,7 +17691,7 @@ class Uf {
17664
17691
  return this._withPendingWrite(async () => (await this._withRetries((r) => Fl(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
17665
17692
  }
17666
17693
  async _get(e) {
17667
- const t = await this._withRetries((r) => Hw(r, e));
17694
+ const t = await this._withRetries((r) => Ww(r, e));
17668
17695
  return this.localCache[e] = t, t;
17669
17696
  }
17670
17697
  async _remove(e) {
@@ -17695,7 +17722,7 @@ class Uf {
17695
17722
  s(t);
17696
17723
  }
17697
17724
  startPolling() {
17698
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ww);
17725
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Hw);
17699
17726
  }
17700
17727
  stopPolling() {
17701
17728
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -17711,7 +17738,7 @@ Uf.type = "LOCAL";
17711
17738
  const Kw = Uf;
17712
17739
  new ts(3e4, 6e4);
17713
17740
  function tc(n, e) {
17714
- return e ? _t(e) : (M(
17741
+ return e ? yt(e) : (M(
17715
17742
  n._popupRedirectResolver,
17716
17743
  n,
17717
17744
  "argument-error"
@@ -17827,10 +17854,10 @@ class Ff {
17827
17854
  }
17828
17855
  }
17829
17856
  resolve(e) {
17830
- vt(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
17857
+ At(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
17831
17858
  }
17832
17859
  reject(e) {
17833
- vt(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
17860
+ At(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
17834
17861
  }
17835
17862
  unregisterAndCleanUp() {
17836
17863
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -17847,17 +17874,17 @@ async function Ro(n, e, t) {
17847
17874
  const r = mt(n);
17848
17875
  of(n, e, Mi);
17849
17876
  const s = tc(r, t);
17850
- return new xt(r, "signInViaPopup", e, s).executeNotNull();
17877
+ return new Ut(r, "signInViaPopup", e, s).executeNotNull();
17851
17878
  }
17852
17879
  async function ql(n, e, t) {
17853
17880
  const r = J(n);
17854
17881
  of(r.auth, e, Mi);
17855
17882
  const s = tc(r.auth, t);
17856
- return new xt(r.auth, "linkViaPopup", e, s, r).executeNotNull();
17883
+ return new Ut(r.auth, "linkViaPopup", e, s, r).executeNotNull();
17857
17884
  }
17858
- class xt extends Ff {
17885
+ class Ut extends Ff {
17859
17886
  constructor(e, t, r, s, i) {
17860
- super(e, t, s, i), this.provider = r, this.authWindow = null, this.pollId = null, xt.currentPopupAction && xt.currentPopupAction.cancel(), xt.currentPopupAction = this;
17887
+ super(e, t, s, i), this.provider = r, this.authWindow = null, this.pollId = null, Ut.currentPopupAction && Ut.currentPopupAction.cancel(), Ut.currentPopupAction = this;
17861
17888
  }
17862
17889
  async executeNotNull() {
17863
17890
  const e = await this.execute();
@@ -17869,7 +17896,7 @@ class xt extends Ff {
17869
17896
  ), e;
17870
17897
  }
17871
17898
  async onExecution() {
17872
- vt(this.filter.length === 1, "Popup operations only handle one event");
17899
+ At(this.filter.length === 1, "Popup operations only handle one event");
17873
17900
  const e = ec();
17874
17901
  this.authWindow = await this.resolver._openPopup(
17875
17902
  this.auth,
@@ -17898,7 +17925,7 @@ class xt extends Ff {
17898
17925
  ));
17899
17926
  }
17900
17927
  cleanUp() {
17901
- this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, xt.currentPopupAction = null;
17928
+ this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, Ut.currentPopupAction = null;
17902
17929
  }
17903
17930
  pollUserCancellation() {
17904
17931
  const e = () => {
@@ -17921,7 +17948,7 @@ class xt extends Ff {
17921
17948
  e();
17922
17949
  }
17923
17950
  }
17924
- xt.currentPopupAction = null;
17951
+ Ut.currentPopupAction = null;
17925
17952
  const Zw = "pendingRedirect", Fs = /* @__PURE__ */ new Map();
17926
17953
  class eI extends Ff {
17927
17954
  constructor(e, t, r = !1) {
@@ -17980,7 +18007,7 @@ function nI(n, e) {
17980
18007
  Fs.set(n._key(), e);
17981
18008
  }
17982
18009
  function rI(n) {
17983
- return _t(n._redirectPersistence);
18010
+ return yt(n._redirectPersistence);
17984
18011
  }
17985
18012
  function sI(n) {
17986
18013
  return Us(Zw, n.config.apiKey, n.name);
@@ -18160,7 +18187,7 @@ function II(n) {
18160
18187
  }, s = wI.get(n.config.apiHost);
18161
18188
  s && (r.eid = s);
18162
18189
  const i = n._getFrameworks();
18163
- return i.length && (r.fw = i.join(",")), `${t}?${Wr(r).slice(1)}`;
18190
+ return i.length && (r.fw = i.join(",")), `${t}?${Hr(r).slice(1)}`;
18164
18191
  }
18165
18192
  async function vI(n) {
18166
18193
  const e = await gI(n), t = ht().gapi;
@@ -18247,7 +18274,7 @@ function kI(n, e) {
18247
18274
  r.initMouseEvent("click", !0, !0, window, 1, 0, 0, 0, 0, !1, !1, !1, !1, 1, null), t.dispatchEvent(r);
18248
18275
  }
18249
18276
  const NI = "__/auth/handler", DI = "emulator/auth/handler", OI = encodeURIComponent("fac");
18250
- async function Hl(n, e, t, r, s, i) {
18277
+ async function Wl(n, e, t, r, s, i) {
18251
18278
  M(
18252
18279
  n.config.authDomain,
18253
18280
  n,
@@ -18281,7 +18308,7 @@ async function Hl(n, e, t, r, s, i) {
18281
18308
  for (const f of Object.keys(c))
18282
18309
  c[f] === void 0 && delete c[f];
18283
18310
  const l = await n._getAppCheckToken(), d = l ? `#${OI}=${encodeURIComponent(l)}` : "";
18284
- return `${VI(n)}?${Wr(c).slice(1)}${d}`;
18311
+ return `${VI(n)}?${Hr(c).slice(1)}${d}`;
18285
18312
  }
18286
18313
  function VI({ config: n }) {
18287
18314
  return n.emulator ? Qa(n, DI) : `https://${n.authDomain}/${NI}`;
@@ -18294,13 +18321,13 @@ class LI {
18294
18321
  // Wrapping in async even though we don't await anywhere in order
18295
18322
  // to make sure errors are raised as promise rejections
18296
18323
  async _openPopup(e, t, r, s) {
18297
- vt(this.eventManagers[e._key()]?.manager, "_initialize() not called before _openPopup()");
18298
- const i = await Hl(e, t, r, Zo(), s);
18324
+ At(this.eventManagers[e._key()]?.manager, "_initialize() not called before _openPopup()");
18325
+ const i = await Wl(e, t, r, Zo(), s);
18299
18326
  return SI(e, i, ec());
18300
18327
  }
18301
18328
  async _openRedirect(e, t, r, s) {
18302
18329
  await this._originValidation(e);
18303
- const i = await Hl(e, t, r, Zo(), s);
18330
+ const i = await Wl(e, t, r, Zo(), s);
18304
18331
  return Fw(i), new Promise(() => {
18305
18332
  });
18306
18333
  }
@@ -18308,7 +18335,7 @@ class LI {
18308
18335
  const t = e._key();
18309
18336
  if (this.eventManagers[t]) {
18310
18337
  const { manager: s, promise: i } = this.eventManagers[t];
18311
- return s ? Promise.resolve(s) : (vt(i, "If manager is not set, promise should be"), i);
18338
+ return s ? Promise.resolve(s) : (At(i, "If manager is not set, promise should be"), i);
18312
18339
  }
18313
18340
  const r = this.initAndGetManager(e);
18314
18341
  return this.eventManagers[t] = { promise: r }, r.catch(() => {
@@ -18346,7 +18373,7 @@ class LI {
18346
18373
  }
18347
18374
  }
18348
18375
  const MI = LI;
18349
- var Wl = "@firebase/auth", Gl = "1.12.1";
18376
+ var Hl = "@firebase/auth", Gl = "1.12.1";
18350
18377
  class xI {
18351
18378
  constructor(e) {
18352
18379
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
@@ -18398,7 +18425,7 @@ function UI(n) {
18398
18425
  }
18399
18426
  }
18400
18427
  function FI(n) {
18401
- $t(new Et(
18428
+ $t(new Tt(
18402
18429
  "auth",
18403
18430
  (e, { options: t }) => {
18404
18431
  const r = e.getProvider("app").getImmediate(), s = e.getProvider("heartbeat"), i = e.getProvider("app-check-internal"), { apiKey: a, authDomain: c } = r.options;
@@ -18424,7 +18451,7 @@ function FI(n) {
18424
18451
  "auth-internal"
18425
18452
  /* _ComponentName.AUTH_INTERNAL */
18426
18453
  ).initialize();
18427
- })), $t(new Et(
18454
+ })), $t(new Tt(
18428
18455
  "auth-internal",
18429
18456
  (e) => {
18430
18457
  const t = mt(e.getProvider(
@@ -18438,7 +18465,7 @@ function FI(n) {
18438
18465
  ).setInstantiationMode(
18439
18466
  "EXPLICIT"
18440
18467
  /* InstantiationMode.EXPLICIT */
18441
- )), je(Wl, Gl, UI(n)), je(Wl, Gl, "esm2020");
18468
+ )), je(Hl, Gl, UI(n)), je(Hl, Gl, "esm2020");
18442
18469
  }
18443
18470
  const BI = 5 * 60, qI = lh("authIdTokenMaxAge") || BI;
18444
18471
  let Kl = null;
@@ -18500,7 +18527,7 @@ FI(
18500
18527
  "Browser"
18501
18528
  /* ClientPlatform.BROWSER */
18502
18529
  );
18503
- const qf = "firebasestorage.googleapis.com", jf = "storageBucket", HI = 2 * 60 * 1e3, WI = 10 * 60 * 1e3, GI = 1e3;
18530
+ const qf = "firebasestorage.googleapis.com", jf = "storageBucket", WI = 2 * 60 * 1e3, HI = 10 * 60 * 1e3, GI = 1e3;
18504
18531
  class ie extends Xe {
18505
18532
  /**
18506
18533
  * @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
@@ -18576,7 +18603,7 @@ function ev(n) {
18576
18603
  function tv() {
18577
18604
  return new ie(ne.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + jf + "' property when initializing the app?");
18578
18605
  }
18579
- function Hf() {
18606
+ function Wf() {
18580
18607
  return new ie(ne.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
18581
18608
  }
18582
18609
  function nv() {
@@ -18591,7 +18618,7 @@ function sv(n) {
18591
18618
  function na(n) {
18592
18619
  return new ie(ne.INVALID_ARGUMENT, n);
18593
18620
  }
18594
- function Wf() {
18621
+ function Hf() {
18595
18622
  return new ie(ne.APP_DELETED, "The Firebase app was deleted.");
18596
18623
  }
18597
18624
  function iv(n) {
@@ -18821,7 +18848,7 @@ class dv {
18821
18848
  const l = rc();
18822
18849
  l.serverResponse = c.getErrorText(), this.errorCallback_ ? a(this.errorCallback_(c, l)) : a(l);
18823
18850
  } else if (s.canceled) {
18824
- const l = this.appDelete_ ? Wf() : zf();
18851
+ const l = this.appDelete_ ? Hf() : zf();
18825
18852
  a(l);
18826
18853
  } else {
18827
18854
  const l = $f();
@@ -19011,7 +19038,7 @@ function Rv(n) {
19011
19038
  function bv(n, e) {
19012
19039
  return n.length >= e.length ? n.substring(n.length - e.length) === e : !1;
19013
19040
  }
19014
- class Lt {
19041
+ class Mt {
19015
19042
  constructor(e, t) {
19016
19043
  let r = 0, s = "";
19017
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;
@@ -19025,16 +19052,16 @@ class Lt {
19025
19052
  slice(e, t) {
19026
19053
  if (Ql(this.data_)) {
19027
19054
  const r = this.data_, s = Tv(r, e, t);
19028
- return s === null ? null : new Lt(s);
19055
+ return s === null ? null : new Mt(s);
19029
19056
  } else {
19030
19057
  const r = new Uint8Array(this.data_.buffer, e, t - e);
19031
- return new Lt(r, !0);
19058
+ return new Mt(r, !0);
19032
19059
  }
19033
19060
  }
19034
19061
  static getBlob(...e) {
19035
19062
  if (sc()) {
19036
- const t = e.map((r) => r instanceof Lt ? r.data_ : r);
19037
- return new Lt(Ev.apply(null, t));
19063
+ const t = e.map((r) => r instanceof Mt ? r.data_ : r);
19064
+ return new Mt(Ev.apply(null, t));
19038
19065
  } else {
19039
19066
  const t = e.map((a) => Fi(a) ? Iv(it.RAW, a).data : a.data_);
19040
19067
  let r = 0;
@@ -19046,7 +19073,7 @@ class Lt {
19046
19073
  return t.forEach((a) => {
19047
19074
  for (let c = 0; c < a.length; c++)
19048
19075
  s[i++] = a[c];
19049
- }), new Lt(s, !0);
19076
+ }), new Mt(s, !0);
19050
19077
  }
19051
19078
  }
19052
19079
  uploadData() {
@@ -19154,21 +19181,21 @@ class An {
19154
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 = [];
19155
19182
  }
19156
19183
  }
19157
- function yt(n) {
19184
+ function Et(n) {
19158
19185
  if (!n)
19159
19186
  throw rc();
19160
19187
  }
19161
19188
  function ic(n, e) {
19162
19189
  function t(r, s) {
19163
19190
  const i = tp(n, s, e);
19164
- return yt(i !== null), i;
19191
+ return Et(i !== null), i;
19165
19192
  }
19166
19193
  return t;
19167
19194
  }
19168
19195
  function Vv(n, e) {
19169
19196
  function t(r, s) {
19170
19197
  const i = tp(n, s, e);
19171
- return yt(i !== null), Ov(i, s, n.host, n._protocol);
19198
+ return Et(i !== null), Ov(i, s, n.host, n._protocol);
19172
19199
  }
19173
19200
  return t;
19174
19201
  }
@@ -19229,9 +19256,9 @@ Content-Type: application/json; charset=utf-8\r
19229
19256
  Content-Type: ` + d.contentType + `\r
19230
19257
  \r
19231
19258
  `, _ = `\r
19232
- --` + l + "--", R = Lt.getBlob(m, r, _);
19259
+ --` + l + "--", R = Mt.getBlob(m, r, _);
19233
19260
  if (R === null)
19234
- throw Hf();
19261
+ throw Wf();
19235
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);
19236
19263
  return $.urlParams = S, $.headers = a, $.body = R.uploadData(), $.errorHandler = is(e), $;
19237
19264
  }
@@ -19245,9 +19272,9 @@ function ac(n, e) {
19245
19272
  try {
19246
19273
  t = n.getResponseHeader("X-Goog-Upload-Status");
19247
19274
  } catch {
19248
- yt(!1);
19275
+ Et(!1);
19249
19276
  }
19250
- return yt(!!t && (e || ["active"]).indexOf(t) !== -1), t;
19277
+ return Et(!!t && (e || ["active"]).indexOf(t) !== -1), t;
19251
19278
  }
19252
19279
  function Bv(n, e, t, r, s) {
19253
19280
  const i = e.bucketOnlyServerUrl(), a = rp(e, r, s), c = { name: a.fullPath }, l = sr(i, n.host, n._protocol), d = "POST", f = {
@@ -19263,9 +19290,9 @@ function Bv(n, e, t, r, s) {
19263
19290
  try {
19264
19291
  k = N.getResponseHeader("X-Goog-Upload-URL");
19265
19292
  } catch {
19266
- yt(!1);
19293
+ Et(!1);
19267
19294
  }
19268
- return yt(Fi(k)), k;
19295
+ return Et(Fi(k)), k;
19269
19296
  }
19270
19297
  const S = new An(l, d, R, _);
19271
19298
  return S.urlParams = c, S.headers = f, S.body = m, S.errorHandler = is(e), S;
@@ -19278,11 +19305,11 @@ function qv(n, e, t, r) {
19278
19305
  try {
19279
19306
  m = d.getResponseHeader("X-Goog-Upload-Size-Received");
19280
19307
  } catch {
19281
- yt(!1);
19308
+ Et(!1);
19282
19309
  }
19283
- m || yt(!1);
19310
+ m || Et(!1);
19284
19311
  const _ = Number(m);
19285
- return yt(!isNaN(_)), new ui(_, r.size(), f === "final");
19312
+ return Et(!isNaN(_)), new ui(_, r.size(), f === "final");
19286
19313
  }
19287
19314
  const a = "POST", c = n.maxUploadRetryTime, l = new An(t, a, i, c);
19288
19315
  return l.headers = s, l.errorHandler = is(e), l;
@@ -19303,7 +19330,7 @@ function jv(n, e, t, r, s, i, a, c) {
19303
19330
  "X-Goog-Upload-Offset": `${l.current}`
19304
19331
  }, N = r.slice(m, _);
19305
19332
  if (N === null)
19306
- throw Hf();
19333
+ throw Wf();
19307
19334
  function k(K, ge) {
19308
19335
  const re = ac(K, ["active", "final"]), w = l.current + f, g = r.size();
19309
19336
  let E;
@@ -19415,15 +19442,15 @@ class zv {
19415
19442
  this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
19416
19443
  }
19417
19444
  }
19418
- class Hv extends zv {
19445
+ class Wv extends zv {
19419
19446
  initXhr() {
19420
19447
  this.xhr_.responseType = "text";
19421
19448
  }
19422
19449
  }
19423
19450
  function an() {
19424
- return new Hv();
19451
+ return new Wv();
19425
19452
  }
19426
- class Wv {
19453
+ class Hv {
19427
19454
  isExponentialBackoffExpired() {
19428
19455
  return this.sleepTime > this.maxSleepTime;
19429
19456
  }
@@ -19825,7 +19852,7 @@ class En {
19825
19852
  }
19826
19853
  }
19827
19854
  function Gv(n, e, t) {
19828
- return n._throwIfRoot("uploadBytesResumable"), new Wv(n, new Lt(e), t);
19855
+ return n._throwIfRoot("uploadBytesResumable"), new Hv(n, new Mt(e), t);
19829
19856
  }
19830
19857
  function Kv(n) {
19831
19858
  n._throwIfRoot("getDownloadURL");
@@ -19882,7 +19909,7 @@ function eA(n, e, t, r = {}) {
19882
19909
  }
19883
19910
  class cc {
19884
19911
  constructor(e, t, r, s, i, a = !1) {
19885
- 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 = HI, this._maxUploadRetryTime = WI, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket = Be.makeFromBucketSpec(s, this._host) : this._bucket = Xl(this._host, this.app.options);
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);
19886
19913
  }
19887
19914
  /**
19888
19915
  * The host string for this service, in the form of `host` or
@@ -19963,7 +19990,7 @@ class cc {
19963
19990
  */
19964
19991
  _makeRequest(e, t, r, s, i = !0) {
19965
19992
  if (this._deleted)
19966
- return new ov(Wf());
19993
+ return new ov(Hf());
19967
19994
  {
19968
19995
  const a = _v(e, this._appId, r, s, t, this._firebaseVersion, i, this._isUsingEmulator);
19969
19996
  return this._requests.add(a), a.getPromise().then(() => this._requests.delete(a), () => this._requests.delete(a)), a;
@@ -20006,7 +20033,7 @@ function iA(n, { instanceIdentifier: e }) {
20006
20033
  return new cc(t, r, s, e, Tn);
20007
20034
  }
20008
20035
  function oA() {
20009
- $t(new Et(
20036
+ $t(new Tt(
20010
20037
  ip,
20011
20038
  iA,
20012
20039
  "PUBLIC"
@@ -20423,7 +20450,7 @@ function RA(n) {
20423
20450
  const s = t.getProvider("app").getImmediate(), i = t.getProvider(IA), a = t.getProvider(AA), c = t.getProvider(vA);
20424
20451
  return new fA(s, i, a, c, r);
20425
20452
  };
20426
- $t(new Et(
20453
+ $t(new Tt(
20427
20454
  uc,
20428
20455
  e,
20429
20456
  "PUBLIC"
@@ -20443,13 +20470,13 @@ function PA(n, e, t) {
20443
20470
  return mA(J(n), e);
20444
20471
  }
20445
20472
  RA();
20446
- const He = class He {
20473
+ const We = class We {
20447
20474
  static setFirebaseConfig(e) {
20448
- He._firebaseConfig = e;
20475
+ We._firebaseConfig = e;
20449
20476
  }
20450
20477
  static useEmulator(e) {
20451
20478
  this._emulatorConfig = {
20452
- ...He.defaultEmulatorConfig,
20479
+ ...We.defaultEmulatorConfig,
20453
20480
  emulate: !0,
20454
20481
  ...e
20455
20482
  };
@@ -20458,11 +20485,11 @@ const He = class He {
20458
20485
  return this._emulatorConfig;
20459
20486
  }
20460
20487
  constructor() {
20461
- if (!He._firebaseConfig) throw new Error("You should set a firebase config object before using Firebase");
20462
- this._firebaseApp = ph(He._firebaseConfig);
20488
+ if (!We._firebaseConfig) throw new Error("You should set a firebase config object before using Firebase");
20489
+ this._firebaseApp = ph(We._firebaseConfig);
20463
20490
  }
20464
20491
  static get instance() {
20465
- return this._instance || (this._instance = new He());
20492
+ return this._instance || (this._instance = new We());
20466
20493
  }
20467
20494
  firestore() {
20468
20495
  return LE(this._firebaseApp);
@@ -20474,22 +20501,22 @@ const He = class He {
20474
20501
  return $I(this._firebaseApp);
20475
20502
  }
20476
20503
  functions() {
20477
- return bA(this._firebaseApp, He._region);
20504
+ return bA(this._firebaseApp, We._region);
20478
20505
  }
20479
20506
  static setRegion(e) {
20480
20507
  this._region = e;
20481
20508
  }
20482
20509
  };
20483
- He.defaultEmulatorConfig = {
20510
+ We.defaultEmulatorConfig = {
20484
20511
  host: "localhost",
20485
20512
  firestorePort: 8080,
20486
20513
  storagePort: 9199,
20487
20514
  authPort: 9099,
20488
20515
  functionsPort: 5001,
20489
20516
  emulate: !1
20490
- }, He._emulatorConfig = He.defaultEmulatorConfig;
20491
- let q = He;
20492
- class NA extends jt {
20517
+ }, We._emulatorConfig = We.defaultEmulatorConfig;
20518
+ let q = We;
20519
+ class NA extends gt {
20493
20520
  constructor(e) {
20494
20521
  if (super(), this._lastLimit = 0, e && q.useEmulator(e), q.emulator?.emulate) {
20495
20522
  const { host: t, firestorePort: r } = q.emulator;
@@ -20566,7 +20593,7 @@ class NA extends jt {
20566
20593
  }
20567
20594
  queryObjectToQueryConstraints(e, t) {
20568
20595
  const r = q.instance.firestore(), s = [], i = [], a = [];
20569
- return jt.toPropertyPathOperations(e.operations).forEach((c) => {
20596
+ return gt.toPropertyPathOperations(e.operations).forEach((c) => {
20570
20597
  const l = this.toFirebaseOperator(c.operator);
20571
20598
  c.aggregate ? i.push(Tl(c.property, l, c.value)) : s.push(Tl(c.property, l, c.value));
20572
20599
  }), e.sort?.propertyName && a.push(YE(e.sort.propertyName, e.sort.order)), this._lastConstraints = {
@@ -20654,7 +20681,7 @@ No = SA([
20654
20681
  tf("FirebaseCloudStorage", () => new No())
20655
20682
  ], No);
20656
20683
  const sh = {
20657
- twitter: () => new We(),
20684
+ twitter: () => new He(),
20658
20685
  facebook: () => new rt(),
20659
20686
  google: () => new st()
20660
20687
  };
@@ -20795,11 +20822,11 @@ class hp extends nf {
20795
20822
  new rt()
20796
20823
  )), this.registerCredentialProvider("twitter", () => Ro(
20797
20824
  q.instance.auth(),
20798
- new We()
20825
+ new He()
20799
20826
  )), this.registerCredentialProvider("link-twitter", () => {
20800
20827
  const e = q.instance.auth().currentUser;
20801
20828
  if (!e) throw new Error("There is no logged in user");
20802
- return ql(e, new We());
20829
+ return ql(e, new He());
20803
20830
  }), this.registerCredentialProvider("anonymous", () => ww(
20804
20831
  q.instance.auth()
20805
20832
  ));