@feedmepos/mf-financing 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -1,18 +1,220 @@
1
1
  import { createRouter as bn, createWebHistory as wn, useRoute as En } from "vue-router";
2
- import { computed as Tn, defineComponent as Sn, watch as An, onMounted as kn, resolveComponent as Cn, openBlock as Rn, createBlock as Pn, unref as On } from "vue";
2
+ import { computed as Tn, defineComponent as Sn, watch as An, onMounted as Cn, resolveComponent as Pn, openBlock as kn, createBlock as Rn, unref as On } from "vue";
3
3
  import { defineStore as Nn } from "pinia";
4
4
  import { useCoreStore as Dn } from "@feedmepos/mf-common";
5
5
  const Ln = {
6
6
  title: "Financing",
7
7
  routes: {
8
8
  application: "Application"
9
+ },
10
+ components: {
11
+ restaurant: "Restaurant",
12
+ select: "Select"
13
+ },
14
+ infoCard: {
15
+ title: "Apply for financing for your pos system",
16
+ description: "Upgrade your business operations today without draining your vital cash reserves. By financing your Point of Sale system, you transform a heavy upfront cost into manageable, predictable monthly payments, allowing you to keep your working capital free for inventory, marketing, and unexpected expenses. This smart investment strategy gives you immediate access to top-tier technology that streamlines efficiency and drives sales, effectively letting the system pay for itself through the growth it generates."
17
+ },
18
+ stepper: {
19
+ title: "POS Financing Pre-requisites",
20
+ description: "Complete the steps below to get your POS financing ready.",
21
+ steps: {
22
+ eligibility: {
23
+ title: "Checking Eligibility",
24
+ description: "Verify your payout account and payment gateway"
25
+ },
26
+ apply: {
27
+ title: "Apply for Financing",
28
+ description: "Submit your application"
29
+ },
30
+ processing: {
31
+ title: "Processing",
32
+ description: "Reviewing your loan application details"
33
+ },
34
+ disbursed: {
35
+ title: "Disbursed",
36
+ description: "Your application is approved. Funds will be disbursed soon."
37
+ }
38
+ }
39
+ },
40
+ dashboard: {
41
+ totalLoan: "Total Loan Amount",
42
+ totalPaid: "Total Paid",
43
+ remainingBalance: "Remaining Balance",
44
+ repaymentProgress: "Repayment Progress",
45
+ payments: "Payments",
46
+ completed: "Completed",
47
+ upcomingPayments: "Upcoming Payments",
48
+ dueDate: "Due Date",
49
+ allPaid: "Congratulations! All payments completed.",
50
+ paymentHistory: "Payment History",
51
+ table: {
52
+ dueDate: "Due Date",
53
+ amount: "Amount",
54
+ status: "Status",
55
+ paidDate: "Paid Date"
56
+ },
57
+ status: {
58
+ pending: "Pending",
59
+ paid: "Paid",
60
+ overdue: "Overdue"
61
+ },
62
+ principalLoan: "Principal Loan",
63
+ paidAmount: "Paid Amount",
64
+ overdueAmount: "Overdue Amount / Aging (days)",
65
+ lastUpdated: "Last Updated"
66
+ },
67
+ apply: {
68
+ title: "Apply for Financing",
69
+ description: "Fill in the details below to apply for financing.",
70
+ sections: {
71
+ business: "Business Information",
72
+ contact: "Contact Information",
73
+ loan: "Loan Details",
74
+ documents: "Required Documents"
75
+ },
76
+ fields: {
77
+ businessName: "Business Name",
78
+ businessNamePlaceholder: "Enter your business name",
79
+ registrationNumber: "Business Registration Number",
80
+ registrationNumberPlaceholder: "Enter registration number",
81
+ contactName: "Contact Name",
82
+ contactNamePlaceholder: "Enter contact name",
83
+ contactEmail: "Email Address",
84
+ contactEmailPlaceholder: "Enter email address",
85
+ contactPhone: "Phone Number",
86
+ contactPhonePlaceholder: "Enter phone number",
87
+ loanAmount: "Loan Amount",
88
+ loanAmountPlaceholder: "Enter loan amount",
89
+ loanPurpose: "Loan Purpose",
90
+ loanPurposePlaceholder: "Describe the purpose of the loan",
91
+ ssmCertificate: "SSM Certificate",
92
+ bankStatement: "Bank Statement (Last 3 months)",
93
+ financialStatement: "Financial Statement"
94
+ },
95
+ errors: {
96
+ required: "This field is required",
97
+ invalidEmail: "Please enter a valid email address",
98
+ invalidAmount: "Please enter a valid amount"
99
+ },
100
+ buttons: {
101
+ cancel: "Cancel",
102
+ submit: "Submit Application"
103
+ },
104
+ confirm: {
105
+ title: "Confirm Submission",
106
+ message: "Are you sure you want to submit this financing application?",
107
+ cancel: "Cancel",
108
+ confirm: "Submit"
109
+ }
9
110
  }
10
111
  }, Mn = {
11
112
  financing: Ln
12
113
  }, Un = {
13
- title: "融资",
114
+ title: "餐厅融资",
14
115
  routes: {
15
116
  application: "申请"
117
+ },
118
+ components: {
119
+ restaurant: "餐厅",
120
+ select: "选择"
121
+ },
122
+ infoCard: {
123
+ title: "为您的POS系统申请融资",
124
+ description: "立即升级您的业务运营,而不会耗尽您的重要现金储备。通过为您的销售点系统融资,您可以将沉重的预付成本转化为可管理的、可预测的每月付款,让您的工作资本可以自由用于库存、营销和意外支出。这种明智的投资策略让您立即获得简化效率并推动销售的顶级技术,有效地让系统通过其产生的增长来支付自身。"
125
+ },
126
+ stepper: {
127
+ title: "POS融资先决条件",
128
+ description: "完成以下步骤以准备好您的POS融资。",
129
+ steps: {
130
+ eligibility: {
131
+ title: "检查资格",
132
+ description: "验证您的收款账户和支付网关"
133
+ },
134
+ apply: {
135
+ title: "申请融资",
136
+ description: "提交您的申请"
137
+ },
138
+ processing: {
139
+ title: "处理中",
140
+ description: "审核您的贷款申请详情"
141
+ },
142
+ disbursed: {
143
+ title: "已发放",
144
+ description: "您的申请已获批准。资金将很快发放。"
145
+ }
146
+ }
147
+ },
148
+ dashboard: {
149
+ totalLoan: "贷款总额",
150
+ totalPaid: "已支付总额",
151
+ remainingBalance: "剩余余额",
152
+ repaymentProgress: "还款进度",
153
+ payments: "期数",
154
+ completed: "已完成",
155
+ upcomingPayments: "即将到期的付款",
156
+ dueDate: "到期日",
157
+ allPaid: "恭喜!所有付款已完成。",
158
+ paymentHistory: "付款历史",
159
+ table: {
160
+ dueDate: "到期日",
161
+ amount: "金额",
162
+ status: "状态",
163
+ paidDate: "付款日期"
164
+ },
165
+ status: {
166
+ pending: "待付款",
167
+ paid: "已付款",
168
+ overdue: "逾期"
169
+ },
170
+ principalLoan: "本金贷款",
171
+ paidAmount: "已付金额",
172
+ overdueAmount: "逾期金额 / 账龄 (天)",
173
+ lastUpdated: "最后更新"
174
+ },
175
+ apply: {
176
+ title: "申请融资",
177
+ description: "填写以下详情以申请融资。",
178
+ sections: {
179
+ business: "商业信息",
180
+ contact: "联系信息",
181
+ loan: "贷款详情",
182
+ documents: "所需文件"
183
+ },
184
+ fields: {
185
+ businessName: "商业名称",
186
+ businessNamePlaceholder: "输入您的商业名称",
187
+ registrationNumber: "商业注册号码",
188
+ registrationNumberPlaceholder: "输入注册号码",
189
+ contactName: "联系人姓名",
190
+ contactNamePlaceholder: "输入联系人姓名",
191
+ contactEmail: "电子邮件地址",
192
+ contactEmailPlaceholder: "输入电子邮件地址",
193
+ contactPhone: "电话号码",
194
+ contactPhonePlaceholder: "输入电话号码",
195
+ loanAmount: "贷款金额",
196
+ loanAmountPlaceholder: "输入贷款金额",
197
+ loanPurpose: "贷款用途",
198
+ loanPurposePlaceholder: "描述贷款用途",
199
+ ssmCertificate: "SSM证书",
200
+ bankStatement: "银行对账单(最近3个月)",
201
+ financialStatement: "财务报表"
202
+ },
203
+ errors: {
204
+ required: "此字段为必填项",
205
+ invalidEmail: "请输入有效的电子邮件地址",
206
+ invalidAmount: "请输入有效的金额"
207
+ },
208
+ buttons: {
209
+ cancel: "取消",
210
+ submit: "提交申请"
211
+ },
212
+ confirm: {
213
+ title: "确认提交",
214
+ message: "您确定要提交此融资申请吗?",
215
+ cancel: "取消",
216
+ confirm: "提交"
217
+ }
16
218
  }
17
219
  }, xn = {
18
220
  financing: Un
@@ -24,10 +226,15 @@ const Ln = {
24
226
  {
25
227
  path: "/application",
26
228
  name: "mf-financing-application",
27
- component: () => import("./Application-lADRz5Yu.js"),
229
+ component: () => import("./Application-CyMgeDII.js"),
28
230
  meta: {
29
231
  sidebarDisplay: "i18n:financing.routes.application"
30
232
  }
233
+ },
234
+ {
235
+ path: "/application/submission",
236
+ name: "mf-financing-application-submission",
237
+ component: () => import("./Submission-BdBXosJD.js")
31
238
  }
32
239
  ];
33
240
  bn({
@@ -86,7 +293,7 @@ const At = function(n) {
86
293
  i < 128 ? e[t++] = i : i < 2048 ? (e[t++] = i >> 6 | 192, e[t++] = i & 63 | 128) : (i & 64512) === 55296 && r + 1 < n.length && (n.charCodeAt(r + 1) & 64512) === 56320 ? (i = 65536 + ((i & 1023) << 10) + (n.charCodeAt(++r) & 1023), e[t++] = i >> 18 | 240, e[t++] = i >> 12 & 63 | 128, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128) : (e[t++] = i >> 12 | 224, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128);
87
294
  }
88
295
  return e;
89
- }, $n = function(n) {
296
+ }, Hn = function(n) {
90
297
  const e = [];
91
298
  let t = 0, r = 0;
92
299
  for (; t < n.length; ) {
@@ -105,7 +312,7 @@ const At = function(n) {
105
312
  }
106
313
  }
107
314
  return e.join("");
108
- }, kt = {
315
+ }, Ct = {
109
316
  /**
110
317
  * Maps bytes to characters.
111
318
  */
@@ -165,8 +372,8 @@ const At = function(n) {
165
372
  const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
166
373
  for (let i = 0; i < n.length; i += 3) {
167
374
  const s = n[i], o = i + 1 < n.length, c = o ? n[i + 1] : 0, a = i + 2 < n.length, l = a ? n[i + 2] : 0, d = s >> 2, f = (s & 3) << 4 | c >> 4;
168
- let g = (c & 15) << 2 | l >> 6, v = l & 63;
169
- a || (v = 64, o || (g = 64)), r.push(t[d], t[f], t[g], t[v]);
375
+ let m = (c & 15) << 2 | l >> 6, v = l & 63;
376
+ a || (v = 64, o || (m = 64)), r.push(t[d], t[f], t[m], t[v]);
170
377
  }
171
378
  return r.join("");
172
379
  },
@@ -190,7 +397,7 @@ const At = function(n) {
190
397
  * @return string representing the decoded value.
191
398
  */
192
399
  decodeString(n, e) {
193
- return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : $n(this.decodeStringToByteArray(n, e));
400
+ return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Hn(this.decodeStringToByteArray(n, e));
194
401
  },
195
402
  /**
196
403
  * Base64-decode a string.
@@ -217,9 +424,9 @@ const At = function(n) {
217
424
  ++i;
218
425
  const f = i < n.length ? t[n.charAt(i)] : 64;
219
426
  if (++i, s == null || c == null || l == null || f == null)
220
- throw new Hn();
221
- const g = s << 2 | c >> 4;
222
- if (r.push(g), l !== 64) {
427
+ throw new $n();
428
+ const m = s << 2 | c >> 4;
429
+ if (r.push(m), l !== 64) {
223
430
  const v = c << 4 & 240 | l >> 2;
224
431
  if (r.push(v), f !== 64) {
225
432
  const B = l << 6 & 192 | f;
@@ -242,19 +449,19 @@ const At = function(n) {
242
449
  }
243
450
  }
244
451
  };
245
- class Hn extends Error {
452
+ class $n extends Error {
246
453
  constructor() {
247
454
  super(...arguments), this.name = "DecodeBase64StringError";
248
455
  }
249
456
  }
250
457
  const Vn = function(n) {
251
458
  const e = At(n);
252
- return kt.encodeByteArray(e, !0);
253
- }, Ct = function(n) {
459
+ return Ct.encodeByteArray(e, !0);
460
+ }, Pt = function(n) {
254
461
  return Vn(n).replace(/\./g, "");
255
- }, Rt = function(n) {
462
+ }, kt = function(n) {
256
463
  try {
257
- return kt.decodeString(n, !0);
464
+ return Ct.decodeString(n, !0);
258
465
  } catch (e) {
259
466
  console.error("base64Decode failed: ", e);
260
467
  }
@@ -316,7 +523,7 @@ const Wn = () => jn().__FIREBASE_DEFAULTS__, zn = () => {
316
523
  } catch {
317
524
  return;
318
525
  }
319
- const e = n && Rt(n[1]);
526
+ const e = n && kt(n[1]);
320
527
  return e && JSON.parse(e);
321
528
  }, Be = () => {
322
529
  try {
@@ -328,7 +535,7 @@ const Wn = () => jn().__FIREBASE_DEFAULTS__, zn = () => {
328
535
  }, qn = (n) => {
329
536
  var e, t;
330
537
  return (t = (e = Be()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
331
- }, Pt = () => {
538
+ }, Rt = () => {
332
539
  var n;
333
540
  return (n = Be()) === null || n === void 0 ? void 0 : n.config;
334
541
  }, Ot = (n) => {
@@ -939,16 +1146,16 @@ const fr = {
939
1146
  warn: h.WARN,
940
1147
  error: h.ERROR,
941
1148
  silent: h.SILENT
942
- }, pr = h.INFO, gr = {
1149
+ }, pr = h.INFO, mr = {
943
1150
  [h.DEBUG]: "log",
944
1151
  [h.VERBOSE]: "log",
945
1152
  [h.INFO]: "info",
946
1153
  [h.WARN]: "warn",
947
1154
  [h.ERROR]: "error"
948
- }, mr = (n, e, ...t) => {
1155
+ }, gr = (n, e, ...t) => {
949
1156
  if (e < n.logLevel)
950
1157
  return;
951
- const r = (/* @__PURE__ */ new Date()).toISOString(), i = gr[e];
1158
+ const r = (/* @__PURE__ */ new Date()).toISOString(), i = mr[e];
952
1159
  if (i)
953
1160
  console[i](`[${r}] ${n.name}:`, ...t);
954
1161
  else
@@ -962,7 +1169,7 @@ class Nt {
962
1169
  * @param name The name that the logs will be associated with
963
1170
  */
964
1171
  constructor(e) {
965
- this.name = e, this._logLevel = pr, this._logHandler = mr, this._userLogHandler = null;
1172
+ this.name = e, this._logLevel = pr, this._logHandler = gr, this._userLogHandler = null;
966
1173
  }
967
1174
  get logLevel() {
968
1175
  return this._logLevel;
@@ -1020,15 +1227,15 @@ function vr() {
1020
1227
  IDBTransaction
1021
1228
  ]);
1022
1229
  }
1023
- function Ir() {
1230
+ function yr() {
1024
1231
  return nt || (nt = [
1025
1232
  IDBCursor.prototype.advance,
1026
1233
  IDBCursor.prototype.continue,
1027
1234
  IDBCursor.prototype.continuePrimaryKey
1028
1235
  ]);
1029
1236
  }
1030
- const Dt = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap();
1031
- function yr(n) {
1237
+ const Dt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap();
1238
+ function Ir(n) {
1032
1239
  const e = new Promise((t, r) => {
1033
1240
  const i = () => {
1034
1241
  n.removeEventListener("success", s), n.removeEventListener("error", o);
@@ -1045,7 +1252,7 @@ function yr(n) {
1045
1252
  }), Fe.set(e, n), e;
1046
1253
  }
1047
1254
  function br(n) {
1048
- if (Pe.has(n))
1255
+ if (Re.has(n))
1049
1256
  return;
1050
1257
  const e = new Promise((t, r) => {
1051
1258
  const i = () => {
@@ -1057,13 +1264,13 @@ function br(n) {
1057
1264
  };
1058
1265
  n.addEventListener("complete", s), n.addEventListener("error", o), n.addEventListener("abort", o);
1059
1266
  });
1060
- Pe.set(n, e);
1267
+ Re.set(n, e);
1061
1268
  }
1062
1269
  let Oe = {
1063
1270
  get(n, e, t) {
1064
1271
  if (n instanceof IDBTransaction) {
1065
1272
  if (e === "done")
1066
- return Pe.get(n);
1273
+ return Re.get(n);
1067
1274
  if (e === "objectStoreNames")
1068
1275
  return n.objectStoreNames || Lt.get(n);
1069
1276
  if (e === "store")
@@ -1085,7 +1292,7 @@ function Er(n) {
1085
1292
  return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
1086
1293
  const r = n.call(Se(this), e, ...t);
1087
1294
  return Lt.set(r, e.sort ? e.sort() : [e]), O(r);
1088
- } : Ir().includes(n) ? function(...e) {
1295
+ } : yr().includes(n) ? function(...e) {
1089
1296
  return n.apply(Se(this), e), O(Dt.get(this));
1090
1297
  } : function(...e) {
1091
1298
  return O(n.apply(Se(this), e));
@@ -1096,7 +1303,7 @@ function Tr(n) {
1096
1303
  }
1097
1304
  function O(n) {
1098
1305
  if (n instanceof IDBRequest)
1099
- return yr(n);
1306
+ return Ir(n);
1100
1307
  if (Te.has(n))
1101
1308
  return Te.get(n);
1102
1309
  const e = Tr(n);
@@ -1117,13 +1324,13 @@ function Sr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
1117
1324
  }).catch(() => {
1118
1325
  }), c;
1119
1326
  }
1120
- const Ar = ["get", "getKey", "getAll", "getAllKeys", "count"], kr = ["put", "add", "delete", "clear"], Ae = /* @__PURE__ */ new Map();
1327
+ const Ar = ["get", "getKey", "getAll", "getAllKeys", "count"], Cr = ["put", "add", "delete", "clear"], Ae = /* @__PURE__ */ new Map();
1121
1328
  function rt(n, e) {
1122
1329
  if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
1123
1330
  return;
1124
1331
  if (Ae.get(e))
1125
1332
  return Ae.get(e);
1126
- const t = e.replace(/FromIndex$/, ""), r = e !== t, i = kr.includes(t);
1333
+ const t = e.replace(/FromIndex$/, ""), r = e !== t, i = Cr.includes(t);
1127
1334
  if (
1128
1335
  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
1129
1336
  !(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Ar.includes(t))
@@ -1160,7 +1367,7 @@ wr((n) => ({
1160
1367
  * See the License for the specific language governing permissions and
1161
1368
  * limitations under the License.
1162
1369
  */
1163
- class Cr {
1370
+ class Pr {
1164
1371
  constructor(e) {
1165
1372
  this.container = e;
1166
1373
  }
@@ -1168,7 +1375,7 @@ class Cr {
1168
1375
  // auth token refresh, and installations will send this string.
1169
1376
  getPlatformInfoString() {
1170
1377
  return this.container.getProviders().map((t) => {
1171
- if (Rr(t)) {
1378
+ if (kr(t)) {
1172
1379
  const r = t.getImmediate();
1173
1380
  return `${r.library}/${r.version}`;
1174
1381
  } else
@@ -1176,7 +1383,7 @@ class Cr {
1176
1383
  }).filter((t) => t).join(" ");
1177
1384
  }
1178
1385
  }
1179
- function Rr(n) {
1386
+ function kr(n) {
1180
1387
  const e = n.getComponent();
1181
1388
  return (e == null ? void 0 : e.type) === "VERSION";
1182
1389
  }
@@ -1197,7 +1404,7 @@ const Ne = "@firebase/app", it = "0.10.13";
1197
1404
  * See the License for the specific language governing permissions and
1198
1405
  * limitations under the License.
1199
1406
  */
1200
- const E = new Nt("@firebase/app"), Pr = "@firebase/app-compat", Or = "@firebase/analytics-compat", Nr = "@firebase/analytics", Dr = "@firebase/app-check-compat", Lr = "@firebase/app-check", Mr = "@firebase/auth", Ur = "@firebase/auth-compat", xr = "@firebase/database", Br = "@firebase/data-connect", Fr = "@firebase/database-compat", $r = "@firebase/functions", Hr = "@firebase/functions-compat", Vr = "@firebase/installations", jr = "@firebase/installations-compat", Wr = "@firebase/messaging", zr = "@firebase/messaging-compat", Gr = "@firebase/performance", qr = "@firebase/performance-compat", Kr = "@firebase/remote-config", Jr = "@firebase/remote-config-compat", Yr = "@firebase/storage", Xr = "@firebase/storage-compat", Qr = "@firebase/firestore", Zr = "@firebase/vertexai-preview", ei = "@firebase/firestore-compat", ti = "firebase", ni = "10.14.1";
1407
+ const E = new Nt("@firebase/app"), Rr = "@firebase/app-compat", Or = "@firebase/analytics-compat", Nr = "@firebase/analytics", Dr = "@firebase/app-check-compat", Lr = "@firebase/app-check", Mr = "@firebase/auth", Ur = "@firebase/auth-compat", xr = "@firebase/database", Br = "@firebase/data-connect", Fr = "@firebase/database-compat", Hr = "@firebase/functions", $r = "@firebase/functions-compat", Vr = "@firebase/installations", jr = "@firebase/installations-compat", Wr = "@firebase/messaging", zr = "@firebase/messaging-compat", Gr = "@firebase/performance", qr = "@firebase/performance-compat", Kr = "@firebase/remote-config", Jr = "@firebase/remote-config-compat", Yr = "@firebase/storage", Xr = "@firebase/storage-compat", Qr = "@firebase/firestore", Zr = "@firebase/vertexai-preview", ei = "@firebase/firestore-compat", ti = "firebase", ni = "10.14.1";
1201
1408
  /**
1202
1409
  * @license
1203
1410
  * Copyright 2019 Google LLC
@@ -1216,7 +1423,7 @@ const E = new Nt("@firebase/app"), Pr = "@firebase/app-compat", Or = "@firebase/
1216
1423
  */
1217
1424
  const De = "[DEFAULT]", ri = {
1218
1425
  [Ne]: "fire-core",
1219
- [Pr]: "fire-core-compat",
1426
+ [Rr]: "fire-core-compat",
1220
1427
  [Nr]: "fire-analytics",
1221
1428
  [Or]: "fire-analytics-compat",
1222
1429
  [Lr]: "fire-app-check",
@@ -1226,8 +1433,8 @@ const De = "[DEFAULT]", ri = {
1226
1433
  [xr]: "fire-rtdb",
1227
1434
  [Br]: "fire-data-connect",
1228
1435
  [Fr]: "fire-rtdb-compat",
1229
- [$r]: "fire-fn",
1230
- [Hr]: "fire-fn-compat",
1436
+ [Hr]: "fire-fn",
1437
+ [$r]: "fire-fn-compat",
1231
1438
  [Vr]: "fire-iid",
1232
1439
  [jr]: "fire-iid-compat",
1233
1440
  [Wr]: "fire-fcm",
@@ -1283,7 +1490,7 @@ function Mt(n, e) {
1283
1490
  const t = n.container.getProvider("heartbeat").getImmediate({ optional: !0 });
1284
1491
  return t && t.triggerHeartbeat(), n.container.getProvider(e);
1285
1492
  }
1286
- function I(n) {
1493
+ function y(n) {
1287
1494
  return n.settings !== void 0;
1288
1495
  }
1289
1496
  /**
@@ -1401,7 +1608,7 @@ function Ut(n, e = {}) {
1401
1608
  throw N.create("bad-app-name", {
1402
1609
  appName: String(i)
1403
1610
  });
1404
- if (t || (t = Pt()), !t)
1611
+ if (t || (t = Rt()), !t)
1405
1612
  throw N.create(
1406
1613
  "no-options"
1407
1614
  /* AppError.NO_OPTIONS */
@@ -1420,13 +1627,13 @@ function Ut(n, e = {}) {
1420
1627
  }
1421
1628
  function ai(n = De) {
1422
1629
  const e = le.get(n);
1423
- if (!e && n === De && Pt())
1630
+ if (!e && n === De && Rt())
1424
1631
  return Ut();
1425
1632
  if (!e)
1426
1633
  throw N.create("no-app", { appName: n });
1427
1634
  return e;
1428
1635
  }
1429
- function $(n, e, t) {
1636
+ function H(n, e, t) {
1430
1637
  var r;
1431
1638
  let i = (r = ri[n]) !== null && r !== void 0 ? r : n;
1432
1639
  t && (i += `-${t}`);
@@ -1462,9 +1669,9 @@ function $(n, e, t) {
1462
1669
  * limitations under the License.
1463
1670
  */
1464
1671
  const ci = "firebase-heartbeat-database", li = 1, J = "firebase-heartbeat-store";
1465
- let ke = null;
1672
+ let Ce = null;
1466
1673
  function xt() {
1467
- return ke || (ke = Sr(ci, li, {
1674
+ return Ce || (Ce = Sr(ci, li, {
1468
1675
  upgrade: (n, e) => {
1469
1676
  switch (e) {
1470
1677
  case 0:
@@ -1479,7 +1686,7 @@ function xt() {
1479
1686
  throw N.create("idb-open", {
1480
1687
  originalErrorMessage: n.message
1481
1688
  });
1482
- })), ke;
1689
+ })), Ce;
1483
1690
  }
1484
1691
  async function ui(n) {
1485
1692
  try {
@@ -1535,7 +1742,7 @@ class fi {
1535
1742
  constructor(e) {
1536
1743
  this.container = e, this._heartbeatsCache = null;
1537
1744
  const t = this.container.getProvider("app").getImmediate();
1538
- this._storage = new gi(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
1745
+ this._storage = new mi(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
1539
1746
  }
1540
1747
  /**
1541
1748
  * Called to report a heartbeat. The function will generate
@@ -1568,7 +1775,7 @@ class fi {
1568
1775
  try {
1569
1776
  if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
1570
1777
  return "";
1571
- const t = at(), { heartbeatsToSend: r, unsentEntries: i } = pi(this._heartbeatsCache.heartbeats), s = Ct(JSON.stringify({ version: 2, heartbeats: r }));
1778
+ const t = at(), { heartbeatsToSend: r, unsentEntries: i } = pi(this._heartbeatsCache.heartbeats), s = Pt(JSON.stringify({ version: 2, heartbeats: r }));
1572
1779
  return this._heartbeatsCache.lastSentHeartbeatDate = t, i.length > 0 ? (this._heartbeatsCache.heartbeats = i, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
1573
1780
  } catch (t) {
1574
1781
  return E.warn(t), "";
@@ -1602,7 +1809,7 @@ function pi(n, e = di) {
1602
1809
  unsentEntries: r
1603
1810
  };
1604
1811
  }
1605
- class gi {
1812
+ class mi {
1606
1813
  constructor(e) {
1607
1814
  this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
1608
1815
  }
@@ -1648,7 +1855,7 @@ class gi {
1648
1855
  }
1649
1856
  }
1650
1857
  function ct(n) {
1651
- return Ct(
1858
+ return Pt(
1652
1859
  // heartbeatsCache wrapper properties
1653
1860
  JSON.stringify({ version: 2, heartbeats: n })
1654
1861
  ).length;
@@ -1669,10 +1876,10 @@ function ct(n) {
1669
1876
  * See the License for the specific language governing permissions and
1670
1877
  * limitations under the License.
1671
1878
  */
1672
- function mi(n) {
1879
+ function gi(n) {
1673
1880
  K(new W(
1674
1881
  "platform-logger",
1675
- (e) => new Cr(e),
1882
+ (e) => new Pr(e),
1676
1883
  "PRIVATE"
1677
1884
  /* ComponentType.PRIVATE */
1678
1885
  )), K(new W(
@@ -1680,9 +1887,9 @@ function mi(n) {
1680
1887
  (e) => new fi(e),
1681
1888
  "PRIVATE"
1682
1889
  /* ComponentType.PRIVATE */
1683
- )), $(Ne, it, n), $(Ne, it, "esm2017"), $("fire-js", "");
1890
+ )), H(Ne, it, n), H(Ne, it, "esm2017"), H("fire-js", "");
1684
1891
  }
1685
- mi("");
1892
+ gi("");
1686
1893
  var _i = "firebase", vi = "10.14.1";
1687
1894
  /**
1688
1895
  * @license
@@ -1700,8 +1907,8 @@ var _i = "firebase", vi = "10.14.1";
1700
1907
  * See the License for the specific language governing permissions and
1701
1908
  * limitations under the License.
1702
1909
  */
1703
- $(_i, vi, "app");
1704
- function $e(n, e) {
1910
+ H(_i, vi, "app");
1911
+ function He(n, e) {
1705
1912
  var t = {};
1706
1913
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
1707
1914
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1714,7 +1921,7 @@ function Ft() {
1714
1921
  "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."
1715
1922
  };
1716
1923
  }
1717
- const Ii = Ft, $t = new X("auth", "Firebase", Ft());
1924
+ const yi = Ft, Ht = new X("auth", "Firebase", Ft());
1718
1925
  /**
1719
1926
  * @license
1720
1927
  * Copyright 2020 Google LLC
@@ -1732,7 +1939,7 @@ const Ii = Ft, $t = new X("auth", "Firebase", Ft());
1732
1939
  * limitations under the License.
1733
1940
  */
1734
1941
  const ue = new Nt("@firebase/auth");
1735
- function yi(n, ...e) {
1942
+ function Ii(n, ...e) {
1736
1943
  ue.logLevel <= h.WARN && ue.warn(`Auth (${Z}): ${n}`, ...e);
1737
1944
  }
1738
1945
  function ie(n, ...e) {
@@ -1755,37 +1962,37 @@ function ie(n, ...e) {
1755
1962
  * limitations under the License.
1756
1963
  */
1757
1964
  function T(n, ...e) {
1758
- throw He(n, ...e);
1965
+ throw $e(n, ...e);
1759
1966
  }
1760
- function m(n, ...e) {
1761
- return He(n, ...e);
1967
+ function g(n, ...e) {
1968
+ return $e(n, ...e);
1762
1969
  }
1763
- function Ht(n, e, t) {
1764
- const r = Object.assign(Object.assign({}, Ii()), { [e]: t });
1970
+ function $t(n, e, t) {
1971
+ const r = Object.assign(Object.assign({}, yi()), { [e]: t });
1765
1972
  return new X("auth", "Firebase", r).create(e, {
1766
1973
  appName: n.name
1767
1974
  });
1768
1975
  }
1769
1976
  function D(n) {
1770
- return Ht(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
1977
+ return $t(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
1771
1978
  }
1772
- function He(n, ...e) {
1979
+ function $e(n, ...e) {
1773
1980
  if (typeof n != "string") {
1774
1981
  const t = e[0], r = [...e.slice(1)];
1775
1982
  return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
1776
1983
  }
1777
- return $t.create(n, ...e);
1984
+ return Ht.create(n, ...e);
1778
1985
  }
1779
1986
  function u(n, e, ...t) {
1780
1987
  if (!n)
1781
- throw He(e, ...t);
1988
+ throw $e(e, ...t);
1782
1989
  }
1783
- function y(n) {
1990
+ function I(n) {
1784
1991
  const e = "INTERNAL ASSERTION FAILED: " + n;
1785
1992
  throw ie(e), new Error(e);
1786
1993
  }
1787
1994
  function S(n, e) {
1788
- n || y(e);
1995
+ n || I(e);
1789
1996
  }
1790
1997
  /**
1791
1998
  * @license
@@ -1924,7 +2131,7 @@ class Vt {
1924
2131
  return globalThis.fetch;
1925
2132
  if (typeof fetch < "u")
1926
2133
  return fetch;
1927
- y("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2134
+ I("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
1928
2135
  }
1929
2136
  static headers() {
1930
2137
  if (this.headersImpl)
@@ -1935,7 +2142,7 @@ class Vt {
1935
2142
  return globalThis.Headers;
1936
2143
  if (typeof Headers < "u")
1937
2144
  return Headers;
1938
- y("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2145
+ I("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
1939
2146
  }
1940
2147
  static response() {
1941
2148
  if (this.responseImpl)
@@ -1946,7 +2153,7 @@ class Vt {
1946
2153
  return globalThis.Response;
1947
2154
  if (typeof Response < "u")
1948
2155
  return Response;
1949
- y("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2156
+ I("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
1950
2157
  }
1951
2158
  }
1952
2159
  /**
@@ -2057,7 +2264,7 @@ const Ti = {
2057
2264
  * limitations under the License.
2058
2265
  */
2059
2266
  const Si = new ee(3e4, 6e4);
2060
- function ge(n, e) {
2267
+ function me(n, e) {
2061
2268
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
2062
2269
  }
2063
2270
  async function G(n, e, t, r, i = {}) {
@@ -2105,7 +2312,7 @@ async function jt(n, e, t) {
2105
2312
  throw re(n, "user-disabled", o);
2106
2313
  const d = r[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
2107
2314
  if (l)
2108
- throw Ht(n, d, l);
2315
+ throw $t(n, d, l);
2109
2316
  T(n, d);
2110
2317
  }
2111
2318
  } catch (i) {
@@ -2127,7 +2334,7 @@ function zt(n, e, t, r) {
2127
2334
  class Ai {
2128
2335
  constructor(e) {
2129
2336
  this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
2130
- this.timer = setTimeout(() => r(m(
2337
+ this.timer = setTimeout(() => r(g(
2131
2338
  this.auth,
2132
2339
  "network-request-failed"
2133
2340
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
@@ -2143,7 +2350,7 @@ function re(n, e, t) {
2143
2350
  appName: n.name
2144
2351
  };
2145
2352
  t.email && (r.email = t.email), t.phoneNumber && (r.phoneNumber = t.phoneNumber);
2146
- const i = m(n, e, r);
2353
+ const i = g(n, e, r);
2147
2354
  return i.customData._tokenResponse = t, i;
2148
2355
  }
2149
2356
  /**
@@ -2162,7 +2369,7 @@ function re(n, e, t) {
2162
2369
  * See the License for the specific language governing permissions and
2163
2370
  * limitations under the License.
2164
2371
  */
2165
- async function ki(n, e) {
2372
+ async function Ci(n, e) {
2166
2373
  return G(n, "POST", "/v1/accounts:delete", e);
2167
2374
  }
2168
2375
  async function Gt(n, e) {
@@ -2193,7 +2400,7 @@ function q(n) {
2193
2400
  } catch {
2194
2401
  }
2195
2402
  }
2196
- async function Ci(n, e = !1) {
2403
+ async function Pi(n, e = !1) {
2197
2404
  const t = z(n), r = await t.getIdToken(e), i = je(r);
2198
2405
  u(
2199
2406
  i && i.exp && i.auth_time && i.iat,
@@ -2205,14 +2412,14 @@ async function Ci(n, e = !1) {
2205
2412
  return {
2206
2413
  claims: i,
2207
2414
  token: r,
2208
- authTime: q(Ce(i.auth_time)),
2209
- issuedAtTime: q(Ce(i.iat)),
2210
- expirationTime: q(Ce(i.exp)),
2415
+ authTime: q(Pe(i.auth_time)),
2416
+ issuedAtTime: q(Pe(i.iat)),
2417
+ expirationTime: q(Pe(i.exp)),
2211
2418
  signInProvider: o || null,
2212
2419
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
2213
2420
  };
2214
2421
  }
2215
- function Ce(n) {
2422
+ function Pe(n) {
2216
2423
  return Number(n) * 1e3;
2217
2424
  }
2218
2425
  function je(n) {
@@ -2220,7 +2427,7 @@ function je(n) {
2220
2427
  if (e === void 0 || t === void 0 || r === void 0)
2221
2428
  return ie("JWT malformed, contained fewer than 3 sections"), null;
2222
2429
  try {
2223
- const i = Rt(t);
2430
+ const i = kt(t);
2224
2431
  return i ? JSON.parse(i) : (ie("Failed to decode base64 JWT payload"), null);
2225
2432
  } catch (i) {
2226
2433
  return ie("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
@@ -2264,10 +2471,10 @@ async function Y(n, e, t = !1) {
2264
2471
  try {
2265
2472
  return await e;
2266
2473
  } catch (r) {
2267
- throw r instanceof L && Ri(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2474
+ throw r instanceof L && ki(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2268
2475
  }
2269
2476
  }
2270
- function Ri({ code: n }) {
2477
+ function ki({ code: n }) {
2271
2478
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
2272
2479
  }
2273
2480
  /**
@@ -2286,7 +2493,7 @@ function Ri({ code: n }) {
2286
2493
  * See the License for the specific language governing permissions and
2287
2494
  * limitations under the License.
2288
2495
  */
2289
- class Pi {
2496
+ class Ri {
2290
2497
  constructor(e) {
2291
2498
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
2292
2499
  }
@@ -2415,7 +2622,7 @@ function Ni(n, e) {
2415
2622
  }
2416
2623
  function qt(n) {
2417
2624
  return n.map((e) => {
2418
- var { providerId: t } = e, r = $e(e, ["providerId"]);
2625
+ var { providerId: t } = e, r = He(e, ["providerId"]);
2419
2626
  return {
2420
2627
  providerId: t,
2421
2628
  uid: r.rawId || "",
@@ -2464,7 +2671,7 @@ async function Di(n, e) {
2464
2671
  };
2465
2672
  }
2466
2673
  async function Li(n, e) {
2467
- return G(n, "POST", "/v2/accounts:revokeToken", ge(n, e));
2674
+ return G(n, "POST", "/v2/accounts:revokeToken", me(n, e));
2468
2675
  }
2469
2676
  /**
2470
2677
  * @license
@@ -2482,7 +2689,7 @@ async function Li(n, e) {
2482
2689
  * See the License for the specific language governing permissions and
2483
2690
  * limitations under the License.
2484
2691
  */
2485
- class H {
2692
+ class $ {
2486
2693
  constructor() {
2487
2694
  this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
2488
2695
  }
@@ -2534,7 +2741,7 @@ class H {
2534
2741
  this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + r * 1e3;
2535
2742
  }
2536
2743
  static fromJSON(e, t) {
2537
- const { refreshToken: r, accessToken: i, expirationTime: s } = t, o = new H();
2744
+ const { refreshToken: r, accessToken: i, expirationTime: s } = t, o = new $();
2538
2745
  return r && (u(typeof r == "string", "internal-error", {
2539
2746
  appName: e
2540
2747
  }), o.refreshToken = r), i && (u(typeof i == "string", "internal-error", {
@@ -2554,10 +2761,10 @@ class H {
2554
2761
  this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
2555
2762
  }
2556
2763
  _clone() {
2557
- return Object.assign(new H(), this.toJSON());
2764
+ return Object.assign(new $(), this.toJSON());
2558
2765
  }
2559
2766
  _performRefresh() {
2560
- return y("not implemented");
2767
+ return I("not implemented");
2561
2768
  }
2562
2769
  }
2563
2770
  /**
@@ -2581,8 +2788,8 @@ function A(n, e) {
2581
2788
  }
2582
2789
  class b {
2583
2790
  constructor(e) {
2584
- var { uid: t, auth: r, stsTokenManager: i } = e, s = $e(e, ["uid", "auth", "stsTokenManager"]);
2585
- this.providerId = "firebase", this.proactiveRefresh = new Pi(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Ue(s.createdAt || void 0, s.lastLoginAt || void 0);
2791
+ var { uid: t, auth: r, stsTokenManager: i } = e, s = He(e, ["uid", "auth", "stsTokenManager"]);
2792
+ this.providerId = "firebase", this.proactiveRefresh = new Ri(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Ue(s.createdAt || void 0, s.lastLoginAt || void 0);
2586
2793
  }
2587
2794
  async getIdToken(e) {
2588
2795
  const t = await Y(this, this.stsTokenManager.getToken(this.auth, e));
@@ -2594,7 +2801,7 @@ class b {
2594
2801
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
2595
2802
  }
2596
2803
  getIdTokenResult(e) {
2597
- return Ci(this, e);
2804
+ return Pi(this, e);
2598
2805
  }
2599
2806
  reload() {
2600
2807
  return Oi(this);
@@ -2633,10 +2840,10 @@ class b {
2633
2840
  e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await de(this), await this.auth._persistUserIfCurrent(this), r && this.auth._notifyListenersIfCurrent(this);
2634
2841
  }
2635
2842
  async delete() {
2636
- if (I(this.auth.app))
2843
+ if (y(this.auth.app))
2637
2844
  return Promise.reject(D(this.auth));
2638
2845
  const e = await this.getIdToken();
2639
- return await Y(this, ki(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
2846
+ return await Y(this, Ci(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
2640
2847
  }
2641
2848
  toJSON() {
2642
2849
  return Object.assign(Object.assign({
@@ -2664,20 +2871,20 @@ class b {
2664
2871
  }
2665
2872
  static _fromJSON(e, t) {
2666
2873
  var r, i, s, o, c, a, l, d;
2667
- const f = (r = t.displayName) !== null && r !== void 0 ? r : void 0, g = (i = t.email) !== null && i !== void 0 ? i : void 0, v = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, B = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, Ke = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, Ie = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, Je = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, Ye = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ye, emailVerified: Xe, isAnonymous: Qe, providerData: be, stsTokenManager: Ze } = t;
2874
+ const f = (r = t.displayName) !== null && r !== void 0 ? r : void 0, m = (i = t.email) !== null && i !== void 0 ? i : void 0, v = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, B = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, Ke = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, ye = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, Je = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, Ye = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: Ie, emailVerified: Xe, isAnonymous: Qe, providerData: be, stsTokenManager: Ze } = t;
2668
2875
  u(
2669
- ye && Ze,
2876
+ Ie && Ze,
2670
2877
  e,
2671
2878
  "internal-error"
2672
2879
  /* AuthErrorCode.INTERNAL_ERROR */
2673
2880
  );
2674
- const In = H.fromJSON(this.name, Ze);
2881
+ const yn = $.fromJSON(this.name, Ze);
2675
2882
  u(
2676
- typeof ye == "string",
2883
+ typeof Ie == "string",
2677
2884
  e,
2678
2885
  "internal-error"
2679
2886
  /* AuthErrorCode.INTERNAL_ERROR */
2680
- ), A(f, e.name), A(g, e.name), u(
2887
+ ), A(f, e.name), A(m, e.name), u(
2681
2888
  typeof Xe == "boolean",
2682
2889
  e,
2683
2890
  "internal-error"
@@ -2687,22 +2894,22 @@ class b {
2687
2894
  e,
2688
2895
  "internal-error"
2689
2896
  /* AuthErrorCode.INTERNAL_ERROR */
2690
- ), A(v, e.name), A(B, e.name), A(Ke, e.name), A(Ie, e.name), A(Je, e.name), A(Ye, e.name);
2897
+ ), A(v, e.name), A(B, e.name), A(Ke, e.name), A(ye, e.name), A(Je, e.name), A(Ye, e.name);
2691
2898
  const we = new b({
2692
- uid: ye,
2899
+ uid: Ie,
2693
2900
  auth: e,
2694
- email: g,
2901
+ email: m,
2695
2902
  emailVerified: Xe,
2696
2903
  displayName: f,
2697
2904
  isAnonymous: Qe,
2698
2905
  photoURL: B,
2699
2906
  phoneNumber: v,
2700
2907
  tenantId: Ke,
2701
- stsTokenManager: In,
2908
+ stsTokenManager: yn,
2702
2909
  createdAt: Je,
2703
2910
  lastLoginAt: Ye
2704
2911
  });
2705
- return be && Array.isArray(be) && (we.providerData = be.map((yn) => Object.assign({}, yn))), Ie && (we._redirectEventId = Ie), we;
2912
+ return be && Array.isArray(be) && (we.providerData = be.map((In) => Object.assign({}, In))), ye && (we._redirectEventId = ye), we;
2706
2913
  }
2707
2914
  /**
2708
2915
  * Initialize a User from an idToken server response
@@ -2710,7 +2917,7 @@ class b {
2710
2917
  * @param idTokenResponse
2711
2918
  */
2712
2919
  static async _fromIdTokenResponse(e, t, r = !1) {
2713
- const i = new H();
2920
+ const i = new $();
2714
2921
  i.updateFromServerResponse(t);
2715
2922
  const s = new b({
2716
2923
  uid: t.localId,
@@ -2732,7 +2939,7 @@ class b {
2732
2939
  "internal-error"
2733
2940
  /* AuthErrorCode.INTERNAL_ERROR */
2734
2941
  );
2735
- const s = i.providerUserInfo !== void 0 ? qt(i.providerUserInfo) : [], o = !(i.email && i.passwordHash) && !(s != null && s.length), c = new H();
2942
+ const s = i.providerUserInfo !== void 0 ? qt(i.providerUserInfo) : [], o = !(i.email && i.passwordHash) && !(s != null && s.length), c = new $();
2736
2943
  c.updateFromIdToken(r);
2737
2944
  const a = new b({
2738
2945
  uid: i.localId,
@@ -3079,7 +3286,7 @@ class xi {
3079
3286
  * limitations under the License.
3080
3287
  */
3081
3288
  async function Bi(n, e = {}) {
3082
- return G(n, "GET", "/v2/passwordPolicy", ge(n, e));
3289
+ return G(n, "GET", "/v2/passwordPolicy", me(n, e));
3083
3290
  }
3084
3291
  /**
3085
3292
  * @license
@@ -3098,7 +3305,7 @@ async function Bi(n, e = {}) {
3098
3305
  * limitations under the License.
3099
3306
  */
3100
3307
  const Fi = 6;
3101
- class $i {
3308
+ class Hi {
3102
3309
  constructor(e) {
3103
3310
  var t, r, i, s;
3104
3311
  const o = e.customStrengthOptions;
@@ -3185,9 +3392,9 @@ class $i {
3185
3392
  * See the License for the specific language governing permissions and
3186
3393
  * limitations under the License.
3187
3394
  */
3188
- class Hi {
3395
+ class $i {
3189
3396
  constructor(e, t, r, i) {
3190
- this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new pt(this), this.idTokenSubscription = new pt(this), this.beforeStateQueue = new xi(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 = $t, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
3397
+ this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new pt(this), this.idTokenSubscription = new pt(this), this.beforeStateQueue = new xi(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 = Ht, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
3191
3398
  }
3192
3399
  _initializeWithPersistence(e, t) {
3193
3400
  return t && (this._popupRedirectResolver = w(t)), this._initializationPromise = this.queue(async () => {
@@ -3231,7 +3438,7 @@ class Hi {
3231
3438
  }
3232
3439
  async initializeCurrentUser(e) {
3233
3440
  var t;
3234
- if (I(this.app)) {
3441
+ if (y(this.app)) {
3235
3442
  const o = this.app.settings.authIdToken;
3236
3443
  return o ? new Promise((c) => {
3237
3444
  setTimeout(() => this.initializeCurrentUserFromIdToken(o).then(c, c));
@@ -3287,7 +3494,7 @@ class Hi {
3287
3494
  this._deleted = !0;
3288
3495
  }
3289
3496
  async updateCurrentUser(e) {
3290
- if (I(this.app))
3497
+ if (y(this.app))
3291
3498
  return Promise.reject(D(this));
3292
3499
  const t = e ? z(e) : null;
3293
3500
  return t && u(
@@ -3309,14 +3516,14 @@ class Hi {
3309
3516
  });
3310
3517
  }
3311
3518
  async signOut() {
3312
- return I(this.app) ? Promise.reject(D(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
3519
+ return y(this.app) ? Promise.reject(D(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
3313
3520
  null,
3314
3521
  /* skipBeforeStateCallbacks */
3315
3522
  !0
3316
3523
  ));
3317
3524
  }
3318
3525
  setPersistence(e) {
3319
- return I(this.app) ? Promise.reject(D(this)) : this.queue(async () => {
3526
+ return y(this.app) ? Promise.reject(D(this)) : this.queue(async () => {
3320
3527
  await this.assertedPersistence.setPersistence(w(e));
3321
3528
  });
3322
3529
  }
@@ -3332,7 +3539,7 @@ class Hi {
3332
3539
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
3333
3540
  }
3334
3541
  async _updatePasswordPolicy() {
3335
- const e = await Bi(this), t = new $i(e);
3542
+ const e = await Bi(this), t = new Hi(e);
3336
3543
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
3337
3544
  }
3338
3545
  _getPersistence() {
@@ -3515,10 +3722,10 @@ class Hi {
3515
3722
  async _getAppCheckToken() {
3516
3723
  var e;
3517
3724
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
3518
- return t != null && t.error && yi(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
3725
+ return t != null && t.error && Ii(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
3519
3726
  }
3520
3727
  }
3521
- function me(n) {
3728
+ function ge(n) {
3522
3729
  return z(n);
3523
3730
  }
3524
3731
  class pt {
@@ -3605,7 +3812,7 @@ function qi(n, e) {
3605
3812
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
3606
3813
  }
3607
3814
  function Ki(n, e, t) {
3608
- const r = me(n);
3815
+ const r = ge(n);
3609
3816
  u(
3610
3817
  r._canInitEmulator,
3611
3818
  r,
@@ -3636,13 +3843,13 @@ function Ji(n) {
3636
3843
  const r = t[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r);
3637
3844
  if (i) {
3638
3845
  const s = i[1];
3639
- return { host: s, port: gt(r.substr(s.length + 1)) };
3846
+ return { host: s, port: mt(r.substr(s.length + 1)) };
3640
3847
  } else {
3641
3848
  const [s, o] = r.split(":");
3642
- return { host: s, port: gt(o) };
3849
+ return { host: s, port: mt(o) };
3643
3850
  }
3644
3851
  }
3645
- function gt(n) {
3852
+ function mt(n) {
3646
3853
  if (!n)
3647
3854
  return null;
3648
3855
  const e = Number(n);
@@ -3682,19 +3889,19 @@ class on {
3682
3889
  * @returns a JSON-serializable representation of this object.
3683
3890
  */
3684
3891
  toJSON() {
3685
- return y("not implemented");
3892
+ return I("not implemented");
3686
3893
  }
3687
3894
  /** @internal */
3688
3895
  _getIdTokenResponse(e) {
3689
- return y("not implemented");
3896
+ return I("not implemented");
3690
3897
  }
3691
3898
  /** @internal */
3692
3899
  _linkToIdToken(e, t) {
3693
- return y("not implemented");
3900
+ return I("not implemented");
3694
3901
  }
3695
3902
  /** @internal */
3696
3903
  _getReauthenticationResolver(e) {
3697
- return y("not implemented");
3904
+ return I("not implemented");
3698
3905
  }
3699
3906
  }
3700
3907
  /**
@@ -3714,7 +3921,7 @@ class on {
3714
3921
  * limitations under the License.
3715
3922
  */
3716
3923
  async function j(n, e) {
3717
- return Wt(n, "POST", "/v1/accounts:signInWithIdp", ge(n, e));
3924
+ return Wt(n, "POST", "/v1/accounts:signInWithIdp", me(n, e));
3718
3925
  }
3719
3926
  /**
3720
3927
  * @license
@@ -3767,7 +3974,7 @@ class U extends on {
3767
3974
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
3768
3975
  */
3769
3976
  static fromJSON(e) {
3770
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = $e(t, ["providerId", "signInMethod"]);
3977
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = He(t, ["providerId", "signInMethod"]);
3771
3978
  if (!r || !i)
3772
3979
  return null;
3773
3980
  const o = new U(r, i);
@@ -3906,7 +4113,7 @@ class te extends an {
3906
4113
  * See the License for the specific language governing permissions and
3907
4114
  * limitations under the License.
3908
4115
  */
3909
- class k extends te {
4116
+ class C extends te {
3910
4117
  constructor() {
3911
4118
  super(
3912
4119
  "facebook.com"
@@ -3927,8 +4134,8 @@ class k extends te {
3927
4134
  */
3928
4135
  static credential(e) {
3929
4136
  return U._fromParams({
3930
- providerId: k.PROVIDER_ID,
3931
- signInMethod: k.FACEBOOK_SIGN_IN_METHOD,
4137
+ providerId: C.PROVIDER_ID,
4138
+ signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
3932
4139
  accessToken: e
3933
4140
  });
3934
4141
  }
@@ -3938,7 +4145,7 @@ class k extends te {
3938
4145
  * @param userCredential - The user credential.
3939
4146
  */
3940
4147
  static credentialFromResult(e) {
3941
- return k.credentialFromTaggedObject(e);
4148
+ return C.credentialFromTaggedObject(e);
3942
4149
  }
3943
4150
  /**
3944
4151
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -3947,20 +4154,20 @@ class k extends te {
3947
4154
  * @param userCredential - The user credential.
3948
4155
  */
3949
4156
  static credentialFromError(e) {
3950
- return k.credentialFromTaggedObject(e.customData || {});
4157
+ return C.credentialFromTaggedObject(e.customData || {});
3951
4158
  }
3952
4159
  static credentialFromTaggedObject({ _tokenResponse: e }) {
3953
4160
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
3954
4161
  return null;
3955
4162
  try {
3956
- return k.credential(e.oauthAccessToken);
4163
+ return C.credential(e.oauthAccessToken);
3957
4164
  } catch {
3958
4165
  return null;
3959
4166
  }
3960
4167
  }
3961
4168
  }
3962
- k.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
3963
- k.PROVIDER_ID = "facebook.com";
4169
+ C.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
4170
+ C.PROVIDER_ID = "facebook.com";
3964
4171
  /**
3965
4172
  * @license
3966
4173
  * Copyright 2020 Google LLC
@@ -3977,7 +4184,7 @@ k.PROVIDER_ID = "facebook.com";
3977
4184
  * See the License for the specific language governing permissions and
3978
4185
  * limitations under the License.
3979
4186
  */
3980
- class C extends te {
4187
+ class P extends te {
3981
4188
  constructor() {
3982
4189
  super(
3983
4190
  "google.com"
@@ -3999,8 +4206,8 @@ class C extends te {
3999
4206
  */
4000
4207
  static credential(e, t) {
4001
4208
  return U._fromParams({
4002
- providerId: C.PROVIDER_ID,
4003
- signInMethod: C.GOOGLE_SIGN_IN_METHOD,
4209
+ providerId: P.PROVIDER_ID,
4210
+ signInMethod: P.GOOGLE_SIGN_IN_METHOD,
4004
4211
  idToken: e,
4005
4212
  accessToken: t
4006
4213
  });
@@ -4011,7 +4218,7 @@ class C extends te {
4011
4218
  * @param userCredential - The user credential.
4012
4219
  */
4013
4220
  static credentialFromResult(e) {
4014
- return C.credentialFromTaggedObject(e);
4221
+ return P.credentialFromTaggedObject(e);
4015
4222
  }
4016
4223
  /**
4017
4224
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4020,7 +4227,7 @@ class C extends te {
4020
4227
  * @param userCredential - The user credential.
4021
4228
  */
4022
4229
  static credentialFromError(e) {
4023
- return C.credentialFromTaggedObject(e.customData || {});
4230
+ return P.credentialFromTaggedObject(e.customData || {});
4024
4231
  }
4025
4232
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4026
4233
  if (!e)
@@ -4029,14 +4236,14 @@ class C extends te {
4029
4236
  if (!t && !r)
4030
4237
  return null;
4031
4238
  try {
4032
- return C.credential(t, r);
4239
+ return P.credential(t, r);
4033
4240
  } catch {
4034
4241
  return null;
4035
4242
  }
4036
4243
  }
4037
4244
  }
4038
- C.GOOGLE_SIGN_IN_METHOD = "google.com";
4039
- C.PROVIDER_ID = "google.com";
4245
+ P.GOOGLE_SIGN_IN_METHOD = "google.com";
4246
+ P.PROVIDER_ID = "google.com";
4040
4247
  /**
4041
4248
  * @license
4042
4249
  * Copyright 2020 Google LLC
@@ -4053,7 +4260,7 @@ C.PROVIDER_ID = "google.com";
4053
4260
  * See the License for the specific language governing permissions and
4054
4261
  * limitations under the License.
4055
4262
  */
4056
- class R extends te {
4263
+ class k extends te {
4057
4264
  constructor() {
4058
4265
  super(
4059
4266
  "github.com"
@@ -4067,8 +4274,8 @@ class R extends te {
4067
4274
  */
4068
4275
  static credential(e) {
4069
4276
  return U._fromParams({
4070
- providerId: R.PROVIDER_ID,
4071
- signInMethod: R.GITHUB_SIGN_IN_METHOD,
4277
+ providerId: k.PROVIDER_ID,
4278
+ signInMethod: k.GITHUB_SIGN_IN_METHOD,
4072
4279
  accessToken: e
4073
4280
  });
4074
4281
  }
@@ -4078,7 +4285,7 @@ class R extends te {
4078
4285
  * @param userCredential - The user credential.
4079
4286
  */
4080
4287
  static credentialFromResult(e) {
4081
- return R.credentialFromTaggedObject(e);
4288
+ return k.credentialFromTaggedObject(e);
4082
4289
  }
4083
4290
  /**
4084
4291
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4087,20 +4294,20 @@ class R extends te {
4087
4294
  * @param userCredential - The user credential.
4088
4295
  */
4089
4296
  static credentialFromError(e) {
4090
- return R.credentialFromTaggedObject(e.customData || {});
4297
+ return k.credentialFromTaggedObject(e.customData || {});
4091
4298
  }
4092
4299
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4093
4300
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
4094
4301
  return null;
4095
4302
  try {
4096
- return R.credential(e.oauthAccessToken);
4303
+ return k.credential(e.oauthAccessToken);
4097
4304
  } catch {
4098
4305
  return null;
4099
4306
  }
4100
4307
  }
4101
4308
  }
4102
- R.GITHUB_SIGN_IN_METHOD = "github.com";
4103
- R.PROVIDER_ID = "github.com";
4309
+ k.GITHUB_SIGN_IN_METHOD = "github.com";
4310
+ k.PROVIDER_ID = "github.com";
4104
4311
  /**
4105
4312
  * @license
4106
4313
  * Copyright 2020 Google LLC
@@ -4117,7 +4324,7 @@ R.PROVIDER_ID = "github.com";
4117
4324
  * See the License for the specific language governing permissions and
4118
4325
  * limitations under the License.
4119
4326
  */
4120
- class P extends te {
4327
+ class R extends te {
4121
4328
  constructor() {
4122
4329
  super(
4123
4330
  "twitter.com"
@@ -4132,8 +4339,8 @@ class P extends te {
4132
4339
  */
4133
4340
  static credential(e, t) {
4134
4341
  return U._fromParams({
4135
- providerId: P.PROVIDER_ID,
4136
- signInMethod: P.TWITTER_SIGN_IN_METHOD,
4342
+ providerId: R.PROVIDER_ID,
4343
+ signInMethod: R.TWITTER_SIGN_IN_METHOD,
4137
4344
  oauthToken: e,
4138
4345
  oauthTokenSecret: t
4139
4346
  });
@@ -4144,7 +4351,7 @@ class P extends te {
4144
4351
  * @param userCredential - The user credential.
4145
4352
  */
4146
4353
  static credentialFromResult(e) {
4147
- return P.credentialFromTaggedObject(e);
4354
+ return R.credentialFromTaggedObject(e);
4148
4355
  }
4149
4356
  /**
4150
4357
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4153,7 +4360,7 @@ class P extends te {
4153
4360
  * @param userCredential - The user credential.
4154
4361
  */
4155
4362
  static credentialFromError(e) {
4156
- return P.credentialFromTaggedObject(e.customData || {});
4363
+ return R.credentialFromTaggedObject(e.customData || {});
4157
4364
  }
4158
4365
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4159
4366
  if (!e)
@@ -4162,14 +4369,14 @@ class P extends te {
4162
4369
  if (!t || !r)
4163
4370
  return null;
4164
4371
  try {
4165
- return P.credential(t, r);
4372
+ return R.credential(t, r);
4166
4373
  } catch {
4167
4374
  return null;
4168
4375
  }
4169
4376
  }
4170
4377
  }
4171
- P.TWITTER_SIGN_IN_METHOD = "twitter.com";
4172
- P.PROVIDER_ID = "twitter.com";
4378
+ R.TWITTER_SIGN_IN_METHOD = "twitter.com";
4379
+ R.PROVIDER_ID = "twitter.com";
4173
4380
  /**
4174
4381
  * @license
4175
4382
  * Copyright 2020 Google LLC
@@ -4191,7 +4398,7 @@ class x {
4191
4398
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
4192
4399
  }
4193
4400
  static async _fromIdTokenResponse(e, t, r, i = !1) {
4194
- const s = await b._fromIdTokenResponse(e, r, i), o = mt(r);
4401
+ const s = await b._fromIdTokenResponse(e, r, i), o = gt(r);
4195
4402
  return new x({
4196
4403
  user: s,
4197
4404
  providerId: o,
@@ -4205,7 +4412,7 @@ class x {
4205
4412
  /* reload */
4206
4413
  !0
4207
4414
  );
4208
- const i = mt(r);
4415
+ const i = gt(r);
4209
4416
  return new x({
4210
4417
  user: e,
4211
4418
  providerId: i,
@@ -4214,7 +4421,7 @@ class x {
4214
4421
  });
4215
4422
  }
4216
4423
  }
4217
- function mt(n) {
4424
+ function gt(n) {
4218
4425
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
4219
4426
  }
4220
4427
  /**
@@ -4274,7 +4481,7 @@ async function Qi(n, e, t = !1) {
4274
4481
  */
4275
4482
  async function Zi(n, e, t = !1) {
4276
4483
  const { auth: r } = n;
4277
- if (I(r.app))
4484
+ if (y(r.app))
4278
4485
  return Promise.reject(D(r));
4279
4486
  const i = "reauthenticate";
4280
4487
  try {
@@ -4324,7 +4531,7 @@ async function Zi(n, e, t = !1) {
4324
4531
  * limitations under the License.
4325
4532
  */
4326
4533
  async function es(n, e, t = !1) {
4327
- if (I(n.app))
4534
+ if (y(n.app))
4328
4535
  return Promise.reject(D(n));
4329
4536
  const r = "signIn", i = await cn(n, r, e), s = await x._fromIdTokenResponse(n, r, i);
4330
4537
  return t || await n._updateCurrentUser(s.user), s;
@@ -4346,7 +4553,7 @@ async function es(n, e, t = !1) {
4346
4553
  * limitations under the License.
4347
4554
  */
4348
4555
  async function ts(n, e) {
4349
- return Wt(n, "POST", "/v1/accounts:signInWithCustomToken", ge(n, e));
4556
+ return Wt(n, "POST", "/v1/accounts:signInWithCustomToken", me(n, e));
4350
4557
  }
4351
4558
  /**
4352
4559
  * @license
@@ -4365,9 +4572,9 @@ async function ts(n, e) {
4365
4572
  * limitations under the License.
4366
4573
  */
4367
4574
  async function ns(n, e) {
4368
- if (I(n.app))
4575
+ if (y(n.app))
4369
4576
  return Promise.reject(D(n));
4370
- const t = me(n), r = await ts(t, {
4577
+ const t = ge(n), r = await ts(t, {
4371
4578
  token: e,
4372
4579
  returnSecureToken: !0
4373
4580
  }), i = await x._fromIdTokenResponse(t, "signIn", r);
@@ -4748,9 +4955,9 @@ class ls {
4748
4955
  o = {
4749
4956
  messageChannel: i,
4750
4957
  onMessage(f) {
4751
- const g = f;
4752
- if (g.data.eventId === l)
4753
- switch (g.data.status) {
4958
+ const m = f;
4959
+ if (m.data.eventId === l)
4960
+ switch (m.data.status) {
4754
4961
  case "ack":
4755
4962
  clearTimeout(d), s = setTimeout(
4756
4963
  () => {
@@ -4764,7 +4971,7 @@ class ls {
4764
4971
  );
4765
4972
  break;
4766
4973
  case "done":
4767
- clearTimeout(s), c(g.data.response);
4974
+ clearTimeout(s), c(m.data.response);
4768
4975
  break;
4769
4976
  default:
4770
4977
  clearTimeout(d), clearTimeout(s), a(new Error(
@@ -4857,7 +5064,7 @@ function fs() {
4857
5064
  * See the License for the specific language governing permissions and
4858
5065
  * limitations under the License.
4859
5066
  */
4860
- const pn = "firebaseLocalStorageDb", ps = 1, pe = "firebaseLocalStorage", gn = "fbase_key";
5067
+ const pn = "firebaseLocalStorageDb", ps = 1, pe = "firebaseLocalStorage", mn = "fbase_key";
4861
5068
  class ne {
4862
5069
  constructor(e) {
4863
5070
  this.request = e;
@@ -4875,7 +5082,7 @@ class ne {
4875
5082
  function ve(n, e) {
4876
5083
  return n.transaction([pe], e ? "readwrite" : "readonly").objectStore(pe);
4877
5084
  }
4878
- function gs() {
5085
+ function ms() {
4879
5086
  const n = indexedDB.deleteDatabase(pn);
4880
5087
  return new ne(n).toPromise();
4881
5088
  }
@@ -4887,24 +5094,24 @@ function xe() {
4887
5094
  }), n.addEventListener("upgradeneeded", () => {
4888
5095
  const r = n.result;
4889
5096
  try {
4890
- r.createObjectStore(pe, { keyPath: gn });
5097
+ r.createObjectStore(pe, { keyPath: mn });
4891
5098
  } catch (i) {
4892
5099
  t(i);
4893
5100
  }
4894
5101
  }), n.addEventListener("success", async () => {
4895
5102
  const r = n.result;
4896
- r.objectStoreNames.contains(pe) ? e(r) : (r.close(), await gs(), e(await xe()));
5103
+ r.objectStoreNames.contains(pe) ? e(r) : (r.close(), await ms(), e(await xe()));
4897
5104
  });
4898
5105
  });
4899
5106
  }
4900
5107
  async function _t(n, e, t) {
4901
5108
  const r = ve(n, !0).put({
4902
- [gn]: e,
5109
+ [mn]: e,
4903
5110
  value: t
4904
5111
  });
4905
5112
  return new ne(r).toPromise();
4906
5113
  }
4907
- async function ms(n, e) {
5114
+ async function gs(n, e) {
4908
5115
  const t = ve(n, !1).get(e), r = await new ne(t).toPromise();
4909
5116
  return r === void 0 ? null : r.value;
4910
5117
  }
@@ -4913,7 +5120,7 @@ function vt(n, e) {
4913
5120
  return new ne(t).toPromise();
4914
5121
  }
4915
5122
  const _s = 800, vs = 3;
4916
- class mn {
5123
+ class gn {
4917
5124
  constructor() {
4918
5125
  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(() => {
4919
5126
  }, () => {
@@ -5019,7 +5226,7 @@ class mn {
5019
5226
  return this._withPendingWrite(async () => (await this._withRetries((r) => _t(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
5020
5227
  }
5021
5228
  async _get(e) {
5022
- const t = await this._withRetries((r) => ms(r, e));
5229
+ const t = await this._withRetries((r) => gs(r, e));
5023
5230
  return this.localCache[e] = t, t;
5024
5231
  }
5025
5232
  async _remove(e) {
@@ -5062,8 +5269,8 @@ class mn {
5062
5269
  this.listeners[e] && (this.listeners[e].delete(t), this.listeners[e].size === 0 && delete this.listeners[e]), Object.keys(this.listeners).length === 0 && this.stopPolling();
5063
5270
  }
5064
5271
  }
5065
- mn.type = "LOCAL";
5066
- const Is = mn;
5272
+ gn.type = "LOCAL";
5273
+ const ys = gn;
5067
5274
  new ee(3e4, 6e4);
5068
5275
  /**
5069
5276
  * @license
@@ -5081,7 +5288,7 @@ new ee(3e4, 6e4);
5081
5288
  * See the License for the specific language governing permissions and
5082
5289
  * limitations under the License.
5083
5290
  */
5084
- function ys(n, e) {
5291
+ function Is(n, e) {
5085
5292
  return e ? w(e) : (u(
5086
5293
  n._popupRedirectResolver,
5087
5294
  n,
@@ -5281,7 +5488,7 @@ class F extends _n {
5281
5488
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
5282
5489
  this.reject(t);
5283
5490
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
5284
- t || this.reject(m(
5491
+ t || this.reject(g(
5285
5492
  this.auth,
5286
5493
  "web-storage-unsupported"
5287
5494
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -5293,7 +5500,7 @@ class F extends _n {
5293
5500
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
5294
5501
  }
5295
5502
  cancel() {
5296
- this.reject(m(
5503
+ this.reject(g(
5297
5504
  this.auth,
5298
5505
  "cancelled-popup-request"
5299
5506
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
@@ -5308,7 +5515,7 @@ class F extends _n {
5308
5515
  if (!((r = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || r === void 0) && r.closed) {
5309
5516
  this.pollId = window.setTimeout(
5310
5517
  () => {
5311
- this.pollId = null, this.reject(m(
5518
+ this.pollId = null, this.reject(g(
5312
5519
  this.auth,
5313
5520
  "popup-closed-by-user"
5314
5521
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -5360,7 +5567,7 @@ class As extends _n {
5360
5567
  let e = oe.get(this.auth._key());
5361
5568
  if (!e) {
5362
5569
  try {
5363
- const r = await ks(this.resolver, this.auth) ? await super.execute() : null;
5570
+ const r = await Cs(this.resolver, this.auth) ? await super.execute() : null;
5364
5571
  e = () => Promise.resolve(r);
5365
5572
  } catch (t) {
5366
5573
  e = () => Promise.reject(t);
@@ -5388,26 +5595,26 @@ class As extends _n {
5388
5595
  cleanUp() {
5389
5596
  }
5390
5597
  }
5391
- async function ks(n, e) {
5392
- const t = Ps(e), r = Rs(n);
5598
+ async function Cs(n, e) {
5599
+ const t = Rs(e), r = ks(n);
5393
5600
  if (!await r._isAvailable())
5394
5601
  return !1;
5395
5602
  const i = await r._get(t) === "true";
5396
5603
  return await r._remove(t), i;
5397
5604
  }
5398
- function Cs(n, e) {
5605
+ function Ps(n, e) {
5399
5606
  oe.set(n._key(), e);
5400
5607
  }
5401
- function Rs(n) {
5608
+ function ks(n) {
5402
5609
  return w(n._redirectPersistence);
5403
5610
  }
5404
- function Ps(n) {
5611
+ function Rs(n) {
5405
5612
  return se(Ss, n.config.apiKey, n.name);
5406
5613
  }
5407
5614
  async function Os(n, e, t = !1) {
5408
- if (I(n.app))
5615
+ if (y(n.app))
5409
5616
  return Promise.reject(D(n));
5410
- const r = me(n), i = ys(r, e), o = await new As(r, i, t).execute();
5617
+ const r = ge(n), i = Is(r, e), o = await new As(r, i, t).execute();
5411
5618
  return o && !t && (delete o.user._redirectEventId, await r._persistUserIfCurrent(o.user), await r._setRedirectUser(null, e)), o;
5412
5619
  }
5413
5620
  /**
@@ -5449,7 +5656,7 @@ class Ds {
5449
5656
  var r;
5450
5657
  if (e.error && !vn(e)) {
5451
5658
  const i = ((r = e.error.code) === null || r === void 0 ? void 0 : r.split("auth/")[1]) || "internal-error";
5452
- t.onError(m(this.auth, i));
5659
+ t.onError(g(this.auth, i));
5453
5660
  } else
5454
5661
  t.onAuthEvent(e);
5455
5662
  }
@@ -5458,13 +5665,13 @@ class Ds {
5458
5665
  return t.filter.includes(e.type) && r;
5459
5666
  }
5460
5667
  hasEventBeenHandled(e) {
5461
- return Date.now() - this.lastProcessedEventTime >= Ns && this.cachedEventUids.clear(), this.cachedEventUids.has(It(e));
5668
+ return Date.now() - this.lastProcessedEventTime >= Ns && this.cachedEventUids.clear(), this.cachedEventUids.has(yt(e));
5462
5669
  }
5463
5670
  saveEventToCache(e) {
5464
- this.cachedEventUids.add(It(e)), this.lastProcessedEventTime = Date.now();
5671
+ this.cachedEventUids.add(yt(e)), this.lastProcessedEventTime = Date.now();
5465
5672
  }
5466
5673
  }
5467
- function It(n) {
5674
+ function yt(n) {
5468
5675
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
5469
5676
  }
5470
5677
  function vn({ type: n, error: e }) {
@@ -5563,8 +5770,8 @@ function Fs(n) {
5563
5770
  * See the License for the specific language governing permissions and
5564
5771
  * limitations under the License.
5565
5772
  */
5566
- const $s = new ee(3e4, 6e4);
5567
- function yt() {
5773
+ const Hs = new ee(3e4, 6e4);
5774
+ function It() {
5568
5775
  const n = _().___jsl;
5569
5776
  if (n != null && n.H) {
5570
5777
  for (const e of Object.keys(n.H))
@@ -5573,22 +5780,22 @@ function yt() {
5573
5780
  n.CP[t] = null;
5574
5781
  }
5575
5782
  }
5576
- function Hs(n) {
5783
+ function $s(n) {
5577
5784
  return new Promise((e, t) => {
5578
5785
  var r, i, s;
5579
5786
  function o() {
5580
- yt(), gapi.load("gapi.iframes", {
5787
+ It(), gapi.load("gapi.iframes", {
5581
5788
  callback: () => {
5582
5789
  e(gapi.iframes.getContext());
5583
5790
  },
5584
5791
  ontimeout: () => {
5585
- yt(), t(m(
5792
+ It(), t(g(
5586
5793
  n,
5587
5794
  "network-request-failed"
5588
5795
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
5589
5796
  ));
5590
5797
  },
5591
- timeout: $s.get()
5798
+ timeout: Hs.get()
5592
5799
  });
5593
5800
  }
5594
5801
  if (!((i = (r = _().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
@@ -5598,7 +5805,7 @@ function Hs(n) {
5598
5805
  else {
5599
5806
  const c = zi("iframefcb");
5600
5807
  return _()[c] = () => {
5601
- gapi.load ? o() : t(m(
5808
+ gapi.load ? o() : t(g(
5602
5809
  n,
5603
5810
  "network-request-failed"
5604
5811
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
@@ -5611,7 +5818,7 @@ function Hs(n) {
5611
5818
  }
5612
5819
  let ae = null;
5613
5820
  function Vs(n) {
5614
- return ae = ae || Hs(n), ae;
5821
+ return ae = ae || $s(n), ae;
5615
5822
  }
5616
5823
  /**
5617
5824
  * @license
@@ -5679,7 +5886,7 @@ async function Js(n) {
5679
5886
  // Prevent iframe from closing on mouse out.
5680
5887
  setHideOnLeave: !1
5681
5888
  });
5682
- const o = m(
5889
+ const o = g(
5683
5890
  n,
5684
5891
  "network-request-failed"
5685
5892
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
@@ -5738,7 +5945,7 @@ function to(n, e, t, r = Xs, i = Qs) {
5738
5945
  left: o
5739
5946
  }), l = p().toLowerCase();
5740
5947
  t && (c = Xt(l) ? Zs : t), Jt(l) && (e = e || eo, a.scrollbars = "yes");
5741
- const d = Object.entries(a).reduce((g, [v, B]) => `${g}${v}=${B},`, "");
5948
+ const d = Object.entries(a).reduce((m, [v, B]) => `${m}${v}=${B},`, "");
5742
5949
  if (Mi(l) && c !== "_self")
5743
5950
  return no(e || "", c), new bt(null);
5744
5951
  const f = window.open(e || "", c, d);
@@ -5832,10 +6039,10 @@ function oo({ config: n }) {
5832
6039
  * See the License for the specific language governing permissions and
5833
6040
  * limitations under the License.
5834
6041
  */
5835
- const Re = "webStorageSupport";
6042
+ const ke = "webStorageSupport";
5836
6043
  class ao {
5837
6044
  constructor() {
5838
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = hn, this._completeRedirectFn = Os, this._overrideRedirectResult = Cs;
6045
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = hn, this._completeRedirectFn = Os, this._overrideRedirectResult = Ps;
5839
6046
  }
5840
6047
  // Wrapping in async even though we don't await anywhere in order
5841
6048
  // to make sure errors are raised as promise rejections
@@ -5875,9 +6082,9 @@ class ao {
5875
6082
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
5876
6083
  }
5877
6084
  _isIframeWebStorageSupported(e, t) {
5878
- this.iframes[e._key()].send(Re, { type: Re }, (i) => {
6085
+ this.iframes[e._key()].send(ke, { type: ke }, (i) => {
5879
6086
  var s;
5880
- const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Re];
6087
+ const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[ke];
5881
6088
  o !== void 0 && t(!!o), T(
5882
6089
  e,
5883
6090
  "internal-error"
@@ -5992,7 +6199,7 @@ function ho(n) {
5992
6199
  tokenApiHost: "securetoken.googleapis.com",
5993
6200
  apiScheme: "https",
5994
6201
  sdkClientVersion: rn(n)
5995
- }, l = new Hi(r, i, s, a);
6202
+ }, l = new $i(r, i, s, a);
5996
6203
  return qi(l, t), l;
5997
6204
  },
5998
6205
  "PUBLIC"
@@ -6008,7 +6215,7 @@ function ho(n) {
6008
6215
  })), K(new W(
6009
6216
  "auth-internal",
6010
6217
  (e) => {
6011
- const t = me(e.getProvider(
6218
+ const t = ge(e.getProvider(
6012
6219
  "auth"
6013
6220
  /* _ComponentName.AUTH */
6014
6221
  ).getImmediate());
@@ -6019,7 +6226,7 @@ function ho(n) {
6019
6226
  ).setInstantiationMode(
6020
6227
  "EXPLICIT"
6021
6228
  /* InstantiationMode.EXPLICIT */
6022
- )), $(Et, Tt, uo(n)), $(Et, Tt, "esm2017");
6229
+ )), H(Et, Tt, uo(n)), H(Et, Tt, "esm2017");
6023
6230
  }
6024
6231
  /**
6025
6232
  * @license
@@ -6039,7 +6246,7 @@ function ho(n) {
6039
6246
  */
6040
6247
  const fo = 5 * 60, po = Ot("authIdTokenMaxAge") || fo;
6041
6248
  let St = null;
6042
- const go = (n) => async (e) => {
6249
+ const mo = (n) => async (e) => {
6043
6250
  const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
6044
6251
  if (r && r > po)
6045
6252
  return;
@@ -6051,14 +6258,14 @@ const go = (n) => async (e) => {
6051
6258
  } : {}
6052
6259
  }));
6053
6260
  };
6054
- function mo(n = ai()) {
6261
+ function go(n = ai()) {
6055
6262
  const e = Mt(n, "auth");
6056
6263
  if (e.isInitialized())
6057
6264
  return e.getImmediate();
6058
6265
  const t = Gi(n, {
6059
6266
  popupRedirectResolver: co,
6060
6267
  persistence: [
6061
- Is,
6268
+ ys,
6062
6269
  as,
6063
6270
  hn
6064
6271
  ]
@@ -6066,7 +6273,7 @@ function mo(n = ai()) {
6066
6273
  if (r && typeof isSecureContext == "boolean" && isSecureContext) {
6067
6274
  const s = new URL(r, location.origin);
6068
6275
  if (location.origin === s.origin) {
6069
- const o = go(s.toString());
6276
+ const o = mo(s.toString());
6070
6277
  is(t, o, () => o(t.currentUser)), rs(t, (c) => o(c));
6071
6278
  }
6072
6279
  }
@@ -6082,7 +6289,7 @@ Vi({
6082
6289
  return new Promise((e, t) => {
6083
6290
  const r = document.createElement("script");
6084
6291
  r.setAttribute("src", n), r.onload = e, r.onerror = (i) => {
6085
- const s = m(
6292
+ const s = g(
6086
6293
  "internal-error"
6087
6294
  /* AuthErrorCode.INTERNAL_ERROR */
6088
6295
  );
@@ -6106,14 +6313,14 @@ const Eo = /* @__PURE__ */ Sn({
6106
6313
  async function s() {
6107
6314
  const o = e.sessionUser.value;
6108
6315
  if (!o || !o.token) return;
6109
- const c = await o.getCustomToken(), a = mo(i);
6316
+ const c = await o.getCustomToken(), a = go(i);
6110
6317
  await ns(a, c);
6111
6318
  }
6112
- return s(), An(e.sessionUser, s), kn(() => {
6319
+ return s(), An(e.sessionUser, s), Cn(() => {
6113
6320
  t.isIframe && parent.postMessage({ event: "ready" }, "*");
6114
6321
  }), (o, c) => {
6115
- const a = Cn("RouterView");
6116
- return Rn(), Pn(a, {
6322
+ const a = Pn("RouterView");
6323
+ return kn(), Rn(a, {
6117
6324
  key: On(r).path
6118
6325
  });
6119
6326
  };