@feedmepos/mf-financing 0.0.28-dev → 0.0.30-dev
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/{Submission-C4Q0Ox4-.js → Submission-lLcZsMOa.js} +4532 -4287
- package/dist/api/financing/index.d.ts +2 -0
- package/dist/api/otp/index.d.ts +14 -0
- package/dist/app.d.ts +44 -0
- package/dist/app.js +235 -191
- package/dist/package.json +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/submission/components/PhoneNumberOTPField.vue.d.ts +22 -0
- package/package.json +1 -1
- /package/dist/views/{Application.vue.d.ts → application/Application.vue.d.ts} +0 -0
- /package/dist/views/{components → application/components}/FinancingDashboard.vue.d.ts +0 -0
- /package/dist/views/{components → application/components}/FinancingStepper.vue.d.ts +0 -0
- /package/dist/views/{Submission.vue.d.ts → submission/Submission.vue.d.ts} +0 -0
- /package/dist/views/{components/cell → submission/components}/SignatureBoard.vue.d.ts +0 -0
- /package/dist/views/{components/cell → submission/components}/UploadButton.vue.d.ts +0 -0
package/dist/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createRouter as
|
|
2
|
-
import { computed as Tn, defineComponent as Sn, watch as An, onMounted as
|
|
1
|
+
import { createRouter as In, createWebHistory as wn, useRoute as En } from "vue-router";
|
|
2
|
+
import { computed as Tn, defineComponent as Sn, watch as An, onMounted as Pn, resolveComponent as kn, openBlock as Cn, 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 = {
|
|
@@ -70,7 +70,8 @@ const Ln = {
|
|
|
70
70
|
business: "Business Information",
|
|
71
71
|
businessDocument: "Business Document",
|
|
72
72
|
documents: "Bank Statements",
|
|
73
|
-
signature: "Declaration & Signature"
|
|
73
|
+
signature: "Declaration & Signature",
|
|
74
|
+
businessOwner: "Business Owner Information"
|
|
74
75
|
},
|
|
75
76
|
fields: {
|
|
76
77
|
businessName: "Business Name",
|
|
@@ -81,6 +82,10 @@ const Ln = {
|
|
|
81
82
|
businessAddressPlaceholder: "Enter your full business address",
|
|
82
83
|
taxIdentificationNo: "Tax Identification No. (TIN)",
|
|
83
84
|
taxIdentificationNoPlaceholder: "Enter your TIN number",
|
|
85
|
+
ownerName: "Owner Name",
|
|
86
|
+
ownerNamePlaceholder: "Enter owner's full name",
|
|
87
|
+
ownerPhoneNumber: "Owner Phone Number",
|
|
88
|
+
ownerPhoneNumberPlaceholder: "Enter phone number (e.g. +60123456789)",
|
|
84
89
|
businessRegistration: "Business Registration",
|
|
85
90
|
bankStatement: "Bank Statement",
|
|
86
91
|
signature: "Signature",
|
|
@@ -94,7 +99,12 @@ const Ln = {
|
|
|
94
99
|
bankStatementRequired: "Please upload at least one bank statement",
|
|
95
100
|
signatureRequired: "Please provide your signature",
|
|
96
101
|
submissionFailed: "Failed to submit application. Please try again.",
|
|
97
|
-
noRestaurant: "No restaurant selected. Please select a restaurant first."
|
|
102
|
+
noRestaurant: "No restaurant selected. Please select a restaurant first.",
|
|
103
|
+
invalidPhoneNumber: "Please enter a valid phone number",
|
|
104
|
+
phoneNotVerified: "Please verify your phone number before submitting",
|
|
105
|
+
otpSendFailed: "Failed to send OTP. Please try again.",
|
|
106
|
+
otpVerifyFailed: "Failed to verify OTP. Please try again.",
|
|
107
|
+
otpRequired: "OTP is required"
|
|
98
108
|
},
|
|
99
109
|
buttons: {
|
|
100
110
|
cancel: "Cancel",
|
|
@@ -106,6 +116,18 @@ const Ln = {
|
|
|
106
116
|
message: "Are you sure you want to submit this financing application?",
|
|
107
117
|
cancel: "Cancel",
|
|
108
118
|
confirm: "Submit"
|
|
119
|
+
},
|
|
120
|
+
otp: {
|
|
121
|
+
send: "Send OTP",
|
|
122
|
+
verified: "Verified",
|
|
123
|
+
sent: "OTP sent successfully",
|
|
124
|
+
title: "Verify Phone Number",
|
|
125
|
+
message: "Please enter the 6-digit verification code sent to your phone.",
|
|
126
|
+
codeLabel: "Verification Code",
|
|
127
|
+
codePlaceholder: "Enter 6-digit code",
|
|
128
|
+
verify: "Verify",
|
|
129
|
+
cancel: "Cancel",
|
|
130
|
+
resend: "Resend OTP"
|
|
109
131
|
}
|
|
110
132
|
},
|
|
111
133
|
upload: {
|
|
@@ -188,7 +210,8 @@ const Ln = {
|
|
|
188
210
|
business: "商业信息",
|
|
189
211
|
businessDocument: "商业文件",
|
|
190
212
|
documents: "银行对账单",
|
|
191
|
-
signature: "声明与签名"
|
|
213
|
+
signature: "声明与签名",
|
|
214
|
+
businessOwner: "商业所有者信息"
|
|
192
215
|
},
|
|
193
216
|
fields: {
|
|
194
217
|
businessName: "商业名称",
|
|
@@ -199,6 +222,10 @@ const Ln = {
|
|
|
199
222
|
businessAddressPlaceholder: "输入您的完整商业地址",
|
|
200
223
|
taxIdentificationNo: "税务识别号 (TIN)",
|
|
201
224
|
taxIdentificationNoPlaceholder: "输入您的税务识别号",
|
|
225
|
+
ownerName: "所有者姓名",
|
|
226
|
+
ownerNamePlaceholder: "输入所有者全名",
|
|
227
|
+
ownerPhoneNumber: "所有者电话号码",
|
|
228
|
+
ownerPhoneNumberPlaceholder: "输入电话号码(例如:+60123456789)",
|
|
202
229
|
businessRegistration: "商业注册文件",
|
|
203
230
|
bankStatement: "银行对账单",
|
|
204
231
|
signature: "签名",
|
|
@@ -212,7 +239,12 @@ const Ln = {
|
|
|
212
239
|
bankStatementRequired: "请上传至少一份银行对账单",
|
|
213
240
|
signatureRequired: "请提供您的签名",
|
|
214
241
|
submissionFailed: "提交申请失败。请重试。",
|
|
215
|
-
noRestaurant: "未选择餐厅。请先选择一个餐厅。"
|
|
242
|
+
noRestaurant: "未选择餐厅。请先选择一个餐厅。",
|
|
243
|
+
invalidPhoneNumber: "请输入有效的电话号码",
|
|
244
|
+
phoneNotVerified: "提交前请先验证您的电话号码",
|
|
245
|
+
otpSendFailed: "发送验证码失败。请重试。",
|
|
246
|
+
otpVerifyFailed: "验证失败。请重试。",
|
|
247
|
+
otpRequired: "验证码为必填项"
|
|
216
248
|
},
|
|
217
249
|
buttons: {
|
|
218
250
|
cancel: "取消",
|
|
@@ -224,6 +256,18 @@ const Ln = {
|
|
|
224
256
|
message: "您确定要提交此融资申请吗?",
|
|
225
257
|
cancel: "取消",
|
|
226
258
|
confirm: "提交"
|
|
259
|
+
},
|
|
260
|
+
otp: {
|
|
261
|
+
send: "发送验证码",
|
|
262
|
+
verified: "已验证",
|
|
263
|
+
sent: "验证码已发送",
|
|
264
|
+
title: "验证电话号码",
|
|
265
|
+
message: "请输入发送到您手机的6位验证码。",
|
|
266
|
+
codeLabel: "验证码",
|
|
267
|
+
codePlaceholder: "输入6位验证码",
|
|
268
|
+
verify: "验证",
|
|
269
|
+
cancel: "取消",
|
|
270
|
+
resend: "重新发送验证码"
|
|
227
271
|
}
|
|
228
272
|
},
|
|
229
273
|
upload: {
|
|
@@ -254,10 +298,10 @@ const Ln = {
|
|
|
254
298
|
{
|
|
255
299
|
path: "/application/submission",
|
|
256
300
|
name: "mf-financing-application-submission",
|
|
257
|
-
component: () => import("./Submission-
|
|
301
|
+
component: () => import("./Submission-lLcZsMOa.js")
|
|
258
302
|
}
|
|
259
303
|
];
|
|
260
|
-
|
|
304
|
+
In({
|
|
261
305
|
history: wn(),
|
|
262
306
|
routes: Bn
|
|
263
307
|
});
|
|
@@ -313,7 +357,7 @@ const At = function(n) {
|
|
|
313
357
|
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);
|
|
314
358
|
}
|
|
315
359
|
return e;
|
|
316
|
-
},
|
|
360
|
+
}, Vn = function(n) {
|
|
317
361
|
const e = [];
|
|
318
362
|
let t = 0, r = 0;
|
|
319
363
|
for (; t < n.length; ) {
|
|
@@ -332,7 +376,7 @@ const At = function(n) {
|
|
|
332
376
|
}
|
|
333
377
|
}
|
|
334
378
|
return e.join("");
|
|
335
|
-
},
|
|
379
|
+
}, Pt = {
|
|
336
380
|
/**
|
|
337
381
|
* Maps bytes to characters.
|
|
338
382
|
*/
|
|
@@ -417,7 +461,7 @@ const At = function(n) {
|
|
|
417
461
|
* @return string representing the decoded value.
|
|
418
462
|
*/
|
|
419
463
|
decodeString(n, e) {
|
|
420
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
|
464
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Vn(this.decodeStringToByteArray(n, e));
|
|
421
465
|
},
|
|
422
466
|
/**
|
|
423
467
|
* Base64-decode a string.
|
|
@@ -444,7 +488,7 @@ const At = function(n) {
|
|
|
444
488
|
++i;
|
|
445
489
|
const f = i < n.length ? t[n.charAt(i)] : 64;
|
|
446
490
|
if (++i, s == null || c == null || l == null || f == null)
|
|
447
|
-
throw new
|
|
491
|
+
throw new $n();
|
|
448
492
|
const m = s << 2 | c >> 4;
|
|
449
493
|
if (r.push(m), l !== 64) {
|
|
450
494
|
const v = c << 4 & 240 | l >> 2;
|
|
@@ -469,19 +513,19 @@ const At = function(n) {
|
|
|
469
513
|
}
|
|
470
514
|
}
|
|
471
515
|
};
|
|
472
|
-
class
|
|
516
|
+
class $n extends Error {
|
|
473
517
|
constructor() {
|
|
474
518
|
super(...arguments), this.name = "DecodeBase64StringError";
|
|
475
519
|
}
|
|
476
520
|
}
|
|
477
|
-
const
|
|
521
|
+
const Hn = function(n) {
|
|
478
522
|
const e = At(n);
|
|
479
|
-
return
|
|
523
|
+
return Pt.encodeByteArray(e, !0);
|
|
524
|
+
}, kt = function(n) {
|
|
525
|
+
return Hn(n).replace(/\./g, "");
|
|
480
526
|
}, Ct = function(n) {
|
|
481
|
-
return Vn(n).replace(/\./g, "");
|
|
482
|
-
}, Rt = function(n) {
|
|
483
527
|
try {
|
|
484
|
-
return
|
|
528
|
+
return Pt.decodeString(n, !0);
|
|
485
529
|
} catch (e) {
|
|
486
530
|
console.error("base64Decode failed: ", e);
|
|
487
531
|
}
|
|
@@ -543,7 +587,7 @@ const Wn = () => jn().__FIREBASE_DEFAULTS__, zn = () => {
|
|
|
543
587
|
} catch {
|
|
544
588
|
return;
|
|
545
589
|
}
|
|
546
|
-
const e = n &&
|
|
590
|
+
const e = n && Ct(n[1]);
|
|
547
591
|
return e && JSON.parse(e);
|
|
548
592
|
}, Be = () => {
|
|
549
593
|
try {
|
|
@@ -555,7 +599,7 @@ const Wn = () => jn().__FIREBASE_DEFAULTS__, zn = () => {
|
|
|
555
599
|
}, qn = (n) => {
|
|
556
600
|
var e, t;
|
|
557
601
|
return (t = (e = Be()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
|
|
558
|
-
},
|
|
602
|
+
}, Rt = () => {
|
|
559
603
|
var n;
|
|
560
604
|
return (n = Be()) === null || n === void 0 ? void 0 : n.config;
|
|
561
605
|
}, Ot = (n) => {
|
|
@@ -1254,8 +1298,8 @@ function yr() {
|
|
|
1254
1298
|
IDBCursor.prototype.continuePrimaryKey
|
|
1255
1299
|
]);
|
|
1256
1300
|
}
|
|
1257
|
-
const Dt = /* @__PURE__ */ new WeakMap(),
|
|
1258
|
-
function
|
|
1301
|
+
const Dt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap();
|
|
1302
|
+
function br(n) {
|
|
1259
1303
|
const e = new Promise((t, r) => {
|
|
1260
1304
|
const i = () => {
|
|
1261
1305
|
n.removeEventListener("success", s), n.removeEventListener("error", o);
|
|
@@ -1271,8 +1315,8 @@ function Ir(n) {
|
|
|
1271
1315
|
}).catch(() => {
|
|
1272
1316
|
}), Fe.set(e, n), e;
|
|
1273
1317
|
}
|
|
1274
|
-
function
|
|
1275
|
-
if (
|
|
1318
|
+
function Ir(n) {
|
|
1319
|
+
if (Re.has(n))
|
|
1276
1320
|
return;
|
|
1277
1321
|
const e = new Promise((t, r) => {
|
|
1278
1322
|
const i = () => {
|
|
@@ -1284,13 +1328,13 @@ function br(n) {
|
|
|
1284
1328
|
};
|
|
1285
1329
|
n.addEventListener("complete", s), n.addEventListener("error", o), n.addEventListener("abort", o);
|
|
1286
1330
|
});
|
|
1287
|
-
|
|
1331
|
+
Re.set(n, e);
|
|
1288
1332
|
}
|
|
1289
1333
|
let Oe = {
|
|
1290
1334
|
get(n, e, t) {
|
|
1291
1335
|
if (n instanceof IDBTransaction) {
|
|
1292
1336
|
if (e === "done")
|
|
1293
|
-
return
|
|
1337
|
+
return Re.get(n);
|
|
1294
1338
|
if (e === "objectStoreNames")
|
|
1295
1339
|
return n.objectStoreNames || Lt.get(n);
|
|
1296
1340
|
if (e === "store")
|
|
@@ -1319,11 +1363,11 @@ function Er(n) {
|
|
|
1319
1363
|
};
|
|
1320
1364
|
}
|
|
1321
1365
|
function Tr(n) {
|
|
1322
|
-
return typeof n == "function" ? Er(n) : (n instanceof IDBTransaction &&
|
|
1366
|
+
return typeof n == "function" ? Er(n) : (n instanceof IDBTransaction && Ir(n), _r(n, vr()) ? new Proxy(n, Oe) : n);
|
|
1323
1367
|
}
|
|
1324
1368
|
function O(n) {
|
|
1325
1369
|
if (n instanceof IDBRequest)
|
|
1326
|
-
return
|
|
1370
|
+
return br(n);
|
|
1327
1371
|
if (Te.has(n))
|
|
1328
1372
|
return Te.get(n);
|
|
1329
1373
|
const e = Tr(n);
|
|
@@ -1344,13 +1388,13 @@ function Sr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
|
1344
1388
|
}).catch(() => {
|
|
1345
1389
|
}), c;
|
|
1346
1390
|
}
|
|
1347
|
-
const Ar = ["get", "getKey", "getAll", "getAllKeys", "count"],
|
|
1391
|
+
const Ar = ["get", "getKey", "getAll", "getAllKeys", "count"], Pr = ["put", "add", "delete", "clear"], Ae = /* @__PURE__ */ new Map();
|
|
1348
1392
|
function rt(n, e) {
|
|
1349
1393
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
|
1350
1394
|
return;
|
|
1351
1395
|
if (Ae.get(e))
|
|
1352
1396
|
return Ae.get(e);
|
|
1353
|
-
const t = e.replace(/FromIndex$/, ""), r = e !== t, i =
|
|
1397
|
+
const t = e.replace(/FromIndex$/, ""), r = e !== t, i = Pr.includes(t);
|
|
1354
1398
|
if (
|
|
1355
1399
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
|
1356
1400
|
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Ar.includes(t))
|
|
@@ -1387,7 +1431,7 @@ wr((n) => ({
|
|
|
1387
1431
|
* See the License for the specific language governing permissions and
|
|
1388
1432
|
* limitations under the License.
|
|
1389
1433
|
*/
|
|
1390
|
-
class
|
|
1434
|
+
class kr {
|
|
1391
1435
|
constructor(e) {
|
|
1392
1436
|
this.container = e;
|
|
1393
1437
|
}
|
|
@@ -1395,7 +1439,7 @@ class Cr {
|
|
|
1395
1439
|
// auth token refresh, and installations will send this string.
|
|
1396
1440
|
getPlatformInfoString() {
|
|
1397
1441
|
return this.container.getProviders().map((t) => {
|
|
1398
|
-
if (
|
|
1442
|
+
if (Cr(t)) {
|
|
1399
1443
|
const r = t.getImmediate();
|
|
1400
1444
|
return `${r.library}/${r.version}`;
|
|
1401
1445
|
} else
|
|
@@ -1403,7 +1447,7 @@ class Cr {
|
|
|
1403
1447
|
}).filter((t) => t).join(" ");
|
|
1404
1448
|
}
|
|
1405
1449
|
}
|
|
1406
|
-
function
|
|
1450
|
+
function Cr(n) {
|
|
1407
1451
|
const e = n.getComponent();
|
|
1408
1452
|
return (e == null ? void 0 : e.type) === "VERSION";
|
|
1409
1453
|
}
|
|
@@ -1424,7 +1468,7 @@ const Ne = "@firebase/app", it = "0.10.13";
|
|
|
1424
1468
|
* See the License for the specific language governing permissions and
|
|
1425
1469
|
* limitations under the License.
|
|
1426
1470
|
*/
|
|
1427
|
-
const E = new Nt("@firebase/app"),
|
|
1471
|
+
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", Vr = "@firebase/functions", $r = "@firebase/functions-compat", Hr = "@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";
|
|
1428
1472
|
/**
|
|
1429
1473
|
* @license
|
|
1430
1474
|
* Copyright 2019 Google LLC
|
|
@@ -1443,7 +1487,7 @@ const E = new Nt("@firebase/app"), Pr = "@firebase/app-compat", Or = "@firebase/
|
|
|
1443
1487
|
*/
|
|
1444
1488
|
const De = "[DEFAULT]", ri = {
|
|
1445
1489
|
[Ne]: "fire-core",
|
|
1446
|
-
[
|
|
1490
|
+
[Rr]: "fire-core-compat",
|
|
1447
1491
|
[Nr]: "fire-analytics",
|
|
1448
1492
|
[Or]: "fire-analytics-compat",
|
|
1449
1493
|
[Lr]: "fire-app-check",
|
|
@@ -1453,9 +1497,9 @@ const De = "[DEFAULT]", ri = {
|
|
|
1453
1497
|
[xr]: "fire-rtdb",
|
|
1454
1498
|
[Br]: "fire-data-connect",
|
|
1455
1499
|
[Fr]: "fire-rtdb-compat",
|
|
1456
|
-
[
|
|
1457
|
-
[
|
|
1458
|
-
[
|
|
1500
|
+
[Vr]: "fire-fn",
|
|
1501
|
+
[$r]: "fire-fn-compat",
|
|
1502
|
+
[Hr]: "fire-iid",
|
|
1459
1503
|
[jr]: "fire-iid-compat",
|
|
1460
1504
|
[Wr]: "fire-fcm",
|
|
1461
1505
|
[zr]: "fire-fcm-compat",
|
|
@@ -1628,7 +1672,7 @@ function Ut(n, e = {}) {
|
|
|
1628
1672
|
throw N.create("bad-app-name", {
|
|
1629
1673
|
appName: String(i)
|
|
1630
1674
|
});
|
|
1631
|
-
if (t || (t =
|
|
1675
|
+
if (t || (t = Rt()), !t)
|
|
1632
1676
|
throw N.create(
|
|
1633
1677
|
"no-options"
|
|
1634
1678
|
/* AppError.NO_OPTIONS */
|
|
@@ -1647,13 +1691,13 @@ function Ut(n, e = {}) {
|
|
|
1647
1691
|
}
|
|
1648
1692
|
function ai(n = De) {
|
|
1649
1693
|
const e = le.get(n);
|
|
1650
|
-
if (!e && n === De &&
|
|
1694
|
+
if (!e && n === De && Rt())
|
|
1651
1695
|
return Ut();
|
|
1652
1696
|
if (!e)
|
|
1653
1697
|
throw N.create("no-app", { appName: n });
|
|
1654
1698
|
return e;
|
|
1655
1699
|
}
|
|
1656
|
-
function
|
|
1700
|
+
function V(n, e, t) {
|
|
1657
1701
|
var r;
|
|
1658
1702
|
let i = (r = ri[n]) !== null && r !== void 0 ? r : n;
|
|
1659
1703
|
t && (i += `-${t}`);
|
|
@@ -1689,9 +1733,9 @@ function $(n, e, t) {
|
|
|
1689
1733
|
* limitations under the License.
|
|
1690
1734
|
*/
|
|
1691
1735
|
const ci = "firebase-heartbeat-database", li = 1, J = "firebase-heartbeat-store";
|
|
1692
|
-
let
|
|
1736
|
+
let Pe = null;
|
|
1693
1737
|
function xt() {
|
|
1694
|
-
return
|
|
1738
|
+
return Pe || (Pe = Sr(ci, li, {
|
|
1695
1739
|
upgrade: (n, e) => {
|
|
1696
1740
|
switch (e) {
|
|
1697
1741
|
case 0:
|
|
@@ -1706,7 +1750,7 @@ function xt() {
|
|
|
1706
1750
|
throw N.create("idb-open", {
|
|
1707
1751
|
originalErrorMessage: n.message
|
|
1708
1752
|
});
|
|
1709
|
-
})),
|
|
1753
|
+
})), Pe;
|
|
1710
1754
|
}
|
|
1711
1755
|
async function ui(n) {
|
|
1712
1756
|
try {
|
|
@@ -1795,7 +1839,7 @@ class fi {
|
|
|
1795
1839
|
try {
|
|
1796
1840
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
|
|
1797
1841
|
return "";
|
|
1798
|
-
const t = at(), { heartbeatsToSend: r, unsentEntries: i } = pi(this._heartbeatsCache.heartbeats), s =
|
|
1842
|
+
const t = at(), { heartbeatsToSend: r, unsentEntries: i } = pi(this._heartbeatsCache.heartbeats), s = kt(JSON.stringify({ version: 2, heartbeats: r }));
|
|
1799
1843
|
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;
|
|
1800
1844
|
} catch (t) {
|
|
1801
1845
|
return E.warn(t), "";
|
|
@@ -1875,7 +1919,7 @@ class mi {
|
|
|
1875
1919
|
}
|
|
1876
1920
|
}
|
|
1877
1921
|
function ct(n) {
|
|
1878
|
-
return
|
|
1922
|
+
return kt(
|
|
1879
1923
|
// heartbeatsCache wrapper properties
|
|
1880
1924
|
JSON.stringify({ version: 2, heartbeats: n })
|
|
1881
1925
|
).length;
|
|
@@ -1899,7 +1943,7 @@ function ct(n) {
|
|
|
1899
1943
|
function gi(n) {
|
|
1900
1944
|
K(new W(
|
|
1901
1945
|
"platform-logger",
|
|
1902
|
-
(e) => new
|
|
1946
|
+
(e) => new kr(e),
|
|
1903
1947
|
"PRIVATE"
|
|
1904
1948
|
/* ComponentType.PRIVATE */
|
|
1905
1949
|
)), K(new W(
|
|
@@ -1907,7 +1951,7 @@ function gi(n) {
|
|
|
1907
1951
|
(e) => new fi(e),
|
|
1908
1952
|
"PRIVATE"
|
|
1909
1953
|
/* ComponentType.PRIVATE */
|
|
1910
|
-
)),
|
|
1954
|
+
)), V(Ne, it, n), V(Ne, it, "esm2017"), V("fire-js", "");
|
|
1911
1955
|
}
|
|
1912
1956
|
gi("");
|
|
1913
1957
|
var _i = "firebase", vi = "10.14.1";
|
|
@@ -1927,8 +1971,8 @@ var _i = "firebase", vi = "10.14.1";
|
|
|
1927
1971
|
* See the License for the specific language governing permissions and
|
|
1928
1972
|
* limitations under the License.
|
|
1929
1973
|
*/
|
|
1930
|
-
|
|
1931
|
-
function
|
|
1974
|
+
V(_i, vi, "app");
|
|
1975
|
+
function Ve(n, e) {
|
|
1932
1976
|
var t = {};
|
|
1933
1977
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
1934
1978
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -1941,7 +1985,7 @@ function Ft() {
|
|
|
1941
1985
|
"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."
|
|
1942
1986
|
};
|
|
1943
1987
|
}
|
|
1944
|
-
const yi = Ft,
|
|
1988
|
+
const yi = Ft, Vt = new X("auth", "Firebase", Ft());
|
|
1945
1989
|
/**
|
|
1946
1990
|
* @license
|
|
1947
1991
|
* Copyright 2020 Google LLC
|
|
@@ -1959,7 +2003,7 @@ const yi = Ft, $t = new X("auth", "Firebase", Ft());
|
|
|
1959
2003
|
* limitations under the License.
|
|
1960
2004
|
*/
|
|
1961
2005
|
const ue = new Nt("@firebase/auth");
|
|
1962
|
-
function
|
|
2006
|
+
function bi(n, ...e) {
|
|
1963
2007
|
ue.logLevel <= h.WARN && ue.warn(`Auth (${Z}): ${n}`, ...e);
|
|
1964
2008
|
}
|
|
1965
2009
|
function ie(n, ...e) {
|
|
@@ -1982,37 +2026,37 @@ function ie(n, ...e) {
|
|
|
1982
2026
|
* limitations under the License.
|
|
1983
2027
|
*/
|
|
1984
2028
|
function T(n, ...e) {
|
|
1985
|
-
throw
|
|
2029
|
+
throw $e(n, ...e);
|
|
1986
2030
|
}
|
|
1987
2031
|
function g(n, ...e) {
|
|
1988
|
-
return
|
|
2032
|
+
return $e(n, ...e);
|
|
1989
2033
|
}
|
|
1990
|
-
function
|
|
2034
|
+
function $t(n, e, t) {
|
|
1991
2035
|
const r = Object.assign(Object.assign({}, yi()), { [e]: t });
|
|
1992
2036
|
return new X("auth", "Firebase", r).create(e, {
|
|
1993
2037
|
appName: n.name
|
|
1994
2038
|
});
|
|
1995
2039
|
}
|
|
1996
2040
|
function D(n) {
|
|
1997
|
-
return
|
|
2041
|
+
return $t(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
|
1998
2042
|
}
|
|
1999
|
-
function
|
|
2043
|
+
function $e(n, ...e) {
|
|
2000
2044
|
if (typeof n != "string") {
|
|
2001
2045
|
const t = e[0], r = [...e.slice(1)];
|
|
2002
2046
|
return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
|
|
2003
2047
|
}
|
|
2004
|
-
return
|
|
2048
|
+
return Vt.create(n, ...e);
|
|
2005
2049
|
}
|
|
2006
2050
|
function u(n, e, ...t) {
|
|
2007
2051
|
if (!n)
|
|
2008
|
-
throw
|
|
2052
|
+
throw $e(e, ...t);
|
|
2009
2053
|
}
|
|
2010
|
-
function
|
|
2054
|
+
function b(n) {
|
|
2011
2055
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
2012
2056
|
throw ie(e), new Error(e);
|
|
2013
2057
|
}
|
|
2014
2058
|
function S(n, e) {
|
|
2015
|
-
n ||
|
|
2059
|
+
n || b(e);
|
|
2016
2060
|
}
|
|
2017
2061
|
/**
|
|
2018
2062
|
* @license
|
|
@@ -2034,7 +2078,7 @@ function Me() {
|
|
|
2034
2078
|
var n;
|
|
2035
2079
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
2036
2080
|
}
|
|
2037
|
-
function
|
|
2081
|
+
function Ii() {
|
|
2038
2082
|
return lt() === "http:" || lt() === "https:";
|
|
2039
2083
|
}
|
|
2040
2084
|
function lt() {
|
|
@@ -2063,7 +2107,7 @@ function wi() {
|
|
|
2063
2107
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
2064
2108
|
// installed which overwrites the native navigator.onLine value and
|
|
2065
2109
|
// defines navigator.connection.
|
|
2066
|
-
(
|
|
2110
|
+
(Ii() || Xn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
2067
2111
|
}
|
|
2068
2112
|
function Ei() {
|
|
2069
2113
|
if (typeof navigator > "u")
|
|
@@ -2117,7 +2161,7 @@ class ee {
|
|
|
2117
2161
|
* See the License for the specific language governing permissions and
|
|
2118
2162
|
* limitations under the License.
|
|
2119
2163
|
*/
|
|
2120
|
-
function
|
|
2164
|
+
function He(n, e) {
|
|
2121
2165
|
S(n.emulator, "Emulator should always be set here");
|
|
2122
2166
|
const { url: t } = n.emulator;
|
|
2123
2167
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
|
@@ -2138,7 +2182,7 @@ function Ve(n, e) {
|
|
|
2138
2182
|
* See the License for the specific language governing permissions and
|
|
2139
2183
|
* limitations under the License.
|
|
2140
2184
|
*/
|
|
2141
|
-
class
|
|
2185
|
+
class Ht {
|
|
2142
2186
|
static initialize(e, t, r) {
|
|
2143
2187
|
this.fetchImpl = e, t && (this.headersImpl = t), r && (this.responseImpl = r);
|
|
2144
2188
|
}
|
|
@@ -2151,7 +2195,7 @@ class Vt {
|
|
|
2151
2195
|
return globalThis.fetch;
|
|
2152
2196
|
if (typeof fetch < "u")
|
|
2153
2197
|
return fetch;
|
|
2154
|
-
|
|
2198
|
+
b("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
2155
2199
|
}
|
|
2156
2200
|
static headers() {
|
|
2157
2201
|
if (this.headersImpl)
|
|
@@ -2162,7 +2206,7 @@ class Vt {
|
|
|
2162
2206
|
return globalThis.Headers;
|
|
2163
2207
|
if (typeof Headers < "u")
|
|
2164
2208
|
return Headers;
|
|
2165
|
-
|
|
2209
|
+
b("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
2166
2210
|
}
|
|
2167
2211
|
static response() {
|
|
2168
2212
|
if (this.responseImpl)
|
|
@@ -2173,7 +2217,7 @@ class Vt {
|
|
|
2173
2217
|
return globalThis.Response;
|
|
2174
2218
|
if (typeof Response < "u")
|
|
2175
2219
|
return Response;
|
|
2176
|
-
|
|
2220
|
+
b("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
|
2177
2221
|
}
|
|
2178
2222
|
}
|
|
2179
2223
|
/**
|
|
@@ -2305,7 +2349,7 @@ async function G(n, e, t, r, i = {}) {
|
|
|
2305
2349
|
method: e,
|
|
2306
2350
|
headers: a
|
|
2307
2351
|
}, s);
|
|
2308
|
-
return Yn() || (l.referrerPolicy = "no-referrer"),
|
|
2352
|
+
return Yn() || (l.referrerPolicy = "no-referrer"), Ht.fetch()(zt(n, n.config.apiHost, t, c), l);
|
|
2309
2353
|
});
|
|
2310
2354
|
}
|
|
2311
2355
|
async function jt(n, e, t) {
|
|
@@ -2332,7 +2376,7 @@ async function jt(n, e, t) {
|
|
|
2332
2376
|
throw re(n, "user-disabled", o);
|
|
2333
2377
|
const d = r[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
2334
2378
|
if (l)
|
|
2335
|
-
throw
|
|
2379
|
+
throw $t(n, d, l);
|
|
2336
2380
|
T(n, d);
|
|
2337
2381
|
}
|
|
2338
2382
|
} catch (i) {
|
|
@@ -2349,7 +2393,7 @@ async function Wt(n, e, t, r, i = {}) {
|
|
|
2349
2393
|
}
|
|
2350
2394
|
function zt(n, e, t, r) {
|
|
2351
2395
|
const i = `${e}${t}?${r}`;
|
|
2352
|
-
return n.config.emulator ?
|
|
2396
|
+
return n.config.emulator ? He(n.config, i) : `${n.config.apiScheme}://${i}`;
|
|
2353
2397
|
}
|
|
2354
2398
|
class Ai {
|
|
2355
2399
|
constructor(e) {
|
|
@@ -2389,7 +2433,7 @@ function re(n, e, t) {
|
|
|
2389
2433
|
* See the License for the specific language governing permissions and
|
|
2390
2434
|
* limitations under the License.
|
|
2391
2435
|
*/
|
|
2392
|
-
async function
|
|
2436
|
+
async function Pi(n, e) {
|
|
2393
2437
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
2394
2438
|
}
|
|
2395
2439
|
async function Gt(n, e) {
|
|
@@ -2420,7 +2464,7 @@ function q(n) {
|
|
|
2420
2464
|
} catch {
|
|
2421
2465
|
}
|
|
2422
2466
|
}
|
|
2423
|
-
async function
|
|
2467
|
+
async function ki(n, e = !1) {
|
|
2424
2468
|
const t = z(n), r = await t.getIdToken(e), i = je(r);
|
|
2425
2469
|
u(
|
|
2426
2470
|
i && i.exp && i.auth_time && i.iat,
|
|
@@ -2432,14 +2476,14 @@ async function Ci(n, e = !1) {
|
|
|
2432
2476
|
return {
|
|
2433
2477
|
claims: i,
|
|
2434
2478
|
token: r,
|
|
2435
|
-
authTime: q(
|
|
2436
|
-
issuedAtTime: q(
|
|
2437
|
-
expirationTime: q(
|
|
2479
|
+
authTime: q(ke(i.auth_time)),
|
|
2480
|
+
issuedAtTime: q(ke(i.iat)),
|
|
2481
|
+
expirationTime: q(ke(i.exp)),
|
|
2438
2482
|
signInProvider: o || null,
|
|
2439
2483
|
signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
|
|
2440
2484
|
};
|
|
2441
2485
|
}
|
|
2442
|
-
function
|
|
2486
|
+
function ke(n) {
|
|
2443
2487
|
return Number(n) * 1e3;
|
|
2444
2488
|
}
|
|
2445
2489
|
function je(n) {
|
|
@@ -2447,7 +2491,7 @@ function je(n) {
|
|
|
2447
2491
|
if (e === void 0 || t === void 0 || r === void 0)
|
|
2448
2492
|
return ie("JWT malformed, contained fewer than 3 sections"), null;
|
|
2449
2493
|
try {
|
|
2450
|
-
const i =
|
|
2494
|
+
const i = Ct(t);
|
|
2451
2495
|
return i ? JSON.parse(i) : (ie("Failed to decode base64 JWT payload"), null);
|
|
2452
2496
|
} catch (i) {
|
|
2453
2497
|
return ie("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
|
|
@@ -2491,10 +2535,10 @@ async function Y(n, e, t = !1) {
|
|
|
2491
2535
|
try {
|
|
2492
2536
|
return await e;
|
|
2493
2537
|
} catch (r) {
|
|
2494
|
-
throw r instanceof L &&
|
|
2538
|
+
throw r instanceof L && Ci(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
|
2495
2539
|
}
|
|
2496
2540
|
}
|
|
2497
|
-
function
|
|
2541
|
+
function Ci({ code: n }) {
|
|
2498
2542
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
2499
2543
|
}
|
|
2500
2544
|
/**
|
|
@@ -2513,7 +2557,7 @@ function Ri({ code: n }) {
|
|
|
2513
2557
|
* See the License for the specific language governing permissions and
|
|
2514
2558
|
* limitations under the License.
|
|
2515
2559
|
*/
|
|
2516
|
-
class
|
|
2560
|
+
class Ri {
|
|
2517
2561
|
constructor(e) {
|
|
2518
2562
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
2519
2563
|
}
|
|
@@ -2642,7 +2686,7 @@ function Ni(n, e) {
|
|
|
2642
2686
|
}
|
|
2643
2687
|
function qt(n) {
|
|
2644
2688
|
return n.map((e) => {
|
|
2645
|
-
var { providerId: t } = e, r =
|
|
2689
|
+
var { providerId: t } = e, r = Ve(e, ["providerId"]);
|
|
2646
2690
|
return {
|
|
2647
2691
|
providerId: t,
|
|
2648
2692
|
uid: r.rawId || "",
|
|
@@ -2678,7 +2722,7 @@ async function Di(n, e) {
|
|
|
2678
2722
|
return c[
|
|
2679
2723
|
"Content-Type"
|
|
2680
2724
|
/* HttpHeader.CONTENT_TYPE */
|
|
2681
|
-
] = "application/x-www-form-urlencoded",
|
|
2725
|
+
] = "application/x-www-form-urlencoded", Ht.fetch()(o, {
|
|
2682
2726
|
method: "POST",
|
|
2683
2727
|
headers: c,
|
|
2684
2728
|
body: r
|
|
@@ -2709,7 +2753,7 @@ async function Li(n, e) {
|
|
|
2709
2753
|
* See the License for the specific language governing permissions and
|
|
2710
2754
|
* limitations under the License.
|
|
2711
2755
|
*/
|
|
2712
|
-
class
|
|
2756
|
+
class $ {
|
|
2713
2757
|
constructor() {
|
|
2714
2758
|
this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
|
|
2715
2759
|
}
|
|
@@ -2761,7 +2805,7 @@ class H {
|
|
|
2761
2805
|
this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + r * 1e3;
|
|
2762
2806
|
}
|
|
2763
2807
|
static fromJSON(e, t) {
|
|
2764
|
-
const { refreshToken: r, accessToken: i, expirationTime: s } = t, o = new
|
|
2808
|
+
const { refreshToken: r, accessToken: i, expirationTime: s } = t, o = new $();
|
|
2765
2809
|
return r && (u(typeof r == "string", "internal-error", {
|
|
2766
2810
|
appName: e
|
|
2767
2811
|
}), o.refreshToken = r), i && (u(typeof i == "string", "internal-error", {
|
|
@@ -2781,10 +2825,10 @@ class H {
|
|
|
2781
2825
|
this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
|
|
2782
2826
|
}
|
|
2783
2827
|
_clone() {
|
|
2784
|
-
return Object.assign(new
|
|
2828
|
+
return Object.assign(new $(), this.toJSON());
|
|
2785
2829
|
}
|
|
2786
2830
|
_performRefresh() {
|
|
2787
|
-
return
|
|
2831
|
+
return b("not implemented");
|
|
2788
2832
|
}
|
|
2789
2833
|
}
|
|
2790
2834
|
/**
|
|
@@ -2806,10 +2850,10 @@ class H {
|
|
|
2806
2850
|
function A(n, e) {
|
|
2807
2851
|
u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
|
2808
2852
|
}
|
|
2809
|
-
class
|
|
2853
|
+
class I {
|
|
2810
2854
|
constructor(e) {
|
|
2811
|
-
var { uid: t, auth: r, stsTokenManager: i } = e, s =
|
|
2812
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
2855
|
+
var { uid: t, auth: r, stsTokenManager: i } = e, s = Ve(e, ["uid", "auth", "stsTokenManager"]);
|
|
2856
|
+
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);
|
|
2813
2857
|
}
|
|
2814
2858
|
async getIdToken(e) {
|
|
2815
2859
|
const t = await Y(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -2821,7 +2865,7 @@ class b {
|
|
|
2821
2865
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
2822
2866
|
}
|
|
2823
2867
|
getIdTokenResult(e) {
|
|
2824
|
-
return
|
|
2868
|
+
return ki(this, e);
|
|
2825
2869
|
}
|
|
2826
2870
|
reload() {
|
|
2827
2871
|
return Oi(this);
|
|
@@ -2835,7 +2879,7 @@ class b {
|
|
|
2835
2879
|
), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
|
|
2836
2880
|
}
|
|
2837
2881
|
_clone(e) {
|
|
2838
|
-
const t = new
|
|
2882
|
+
const t = new I(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
|
|
2839
2883
|
return t.metadata._copy(this.metadata), t;
|
|
2840
2884
|
}
|
|
2841
2885
|
_onReload(e) {
|
|
@@ -2863,7 +2907,7 @@ class b {
|
|
|
2863
2907
|
if (y(this.auth.app))
|
|
2864
2908
|
return Promise.reject(D(this.auth));
|
|
2865
2909
|
const e = await this.getIdToken();
|
|
2866
|
-
return await Y(this,
|
|
2910
|
+
return await Y(this, Pi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
2867
2911
|
}
|
|
2868
2912
|
toJSON() {
|
|
2869
2913
|
return Object.assign(Object.assign({
|
|
@@ -2891,16 +2935,16 @@ class b {
|
|
|
2891
2935
|
}
|
|
2892
2936
|
static _fromJSON(e, t) {
|
|
2893
2937
|
var r, i, s, o, c, a, l, d;
|
|
2894
|
-
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:
|
|
2938
|
+
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: be, emailVerified: Xe, isAnonymous: Qe, providerData: Ie, stsTokenManager: Ze } = t;
|
|
2895
2939
|
u(
|
|
2896
|
-
|
|
2940
|
+
be && Ze,
|
|
2897
2941
|
e,
|
|
2898
2942
|
"internal-error"
|
|
2899
2943
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
2900
2944
|
);
|
|
2901
|
-
const yn =
|
|
2945
|
+
const yn = $.fromJSON(this.name, Ze);
|
|
2902
2946
|
u(
|
|
2903
|
-
typeof
|
|
2947
|
+
typeof be == "string",
|
|
2904
2948
|
e,
|
|
2905
2949
|
"internal-error"
|
|
2906
2950
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -2915,8 +2959,8 @@ class b {
|
|
|
2915
2959
|
"internal-error"
|
|
2916
2960
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
2917
2961
|
), A(v, e.name), A(B, e.name), A(Ke, e.name), A(ye, e.name), A(Je, e.name), A(Ye, e.name);
|
|
2918
|
-
const we = new
|
|
2919
|
-
uid:
|
|
2962
|
+
const we = new I({
|
|
2963
|
+
uid: be,
|
|
2920
2964
|
auth: e,
|
|
2921
2965
|
email: m,
|
|
2922
2966
|
emailVerified: Xe,
|
|
@@ -2929,7 +2973,7 @@ class b {
|
|
|
2929
2973
|
createdAt: Je,
|
|
2930
2974
|
lastLoginAt: Ye
|
|
2931
2975
|
});
|
|
2932
|
-
return
|
|
2976
|
+
return Ie && Array.isArray(Ie) && (we.providerData = Ie.map((bn) => Object.assign({}, bn))), ye && (we._redirectEventId = ye), we;
|
|
2933
2977
|
}
|
|
2934
2978
|
/**
|
|
2935
2979
|
* Initialize a User from an idToken server response
|
|
@@ -2937,9 +2981,9 @@ class b {
|
|
|
2937
2981
|
* @param idTokenResponse
|
|
2938
2982
|
*/
|
|
2939
2983
|
static async _fromIdTokenResponse(e, t, r = !1) {
|
|
2940
|
-
const i = new
|
|
2984
|
+
const i = new $();
|
|
2941
2985
|
i.updateFromServerResponse(t);
|
|
2942
|
-
const s = new
|
|
2986
|
+
const s = new I({
|
|
2943
2987
|
uid: t.localId,
|
|
2944
2988
|
auth: e,
|
|
2945
2989
|
stsTokenManager: i,
|
|
@@ -2959,9 +3003,9 @@ class b {
|
|
|
2959
3003
|
"internal-error"
|
|
2960
3004
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
2961
3005
|
);
|
|
2962
|
-
const s = i.providerUserInfo !== void 0 ? qt(i.providerUserInfo) : [], o = !(i.email && i.passwordHash) && !(s != null && s.length), c = new
|
|
3006
|
+
const s = i.providerUserInfo !== void 0 ? qt(i.providerUserInfo) : [], o = !(i.email && i.passwordHash) && !(s != null && s.length), c = new $();
|
|
2963
3007
|
c.updateFromIdToken(r);
|
|
2964
|
-
const a = new
|
|
3008
|
+
const a = new I({
|
|
2965
3009
|
uid: i.localId,
|
|
2966
3010
|
auth: e,
|
|
2967
3011
|
stsTokenManager: c,
|
|
@@ -3062,7 +3106,7 @@ const ht = Kt;
|
|
|
3062
3106
|
function se(n, e, t) {
|
|
3063
3107
|
return `firebase:${n}:${e}:${t}`;
|
|
3064
3108
|
}
|
|
3065
|
-
class
|
|
3109
|
+
class H {
|
|
3066
3110
|
constructor(e, t, r) {
|
|
3067
3111
|
this.persistence = e, this.auth = t, this.userKey = r;
|
|
3068
3112
|
const { config: i, name: s } = this.auth;
|
|
@@ -3073,7 +3117,7 @@ class V {
|
|
|
3073
3117
|
}
|
|
3074
3118
|
async getCurrentUser() {
|
|
3075
3119
|
const e = await this.persistence._get(this.fullUserKey);
|
|
3076
|
-
return e ?
|
|
3120
|
+
return e ? I._fromJSON(this.auth, e) : null;
|
|
3077
3121
|
}
|
|
3078
3122
|
removeCurrentUser() {
|
|
3079
3123
|
return this.persistence._remove(this.fullUserKey);
|
|
@@ -3093,7 +3137,7 @@ class V {
|
|
|
3093
3137
|
}
|
|
3094
3138
|
static async create(e, t, r = "authUser") {
|
|
3095
3139
|
if (!t.length)
|
|
3096
|
-
return new
|
|
3140
|
+
return new H(w(ht), e, r);
|
|
3097
3141
|
const i = (await Promise.all(t.map(async (l) => {
|
|
3098
3142
|
if (await l._isAvailable())
|
|
3099
3143
|
return l;
|
|
@@ -3105,20 +3149,20 @@ class V {
|
|
|
3105
3149
|
try {
|
|
3106
3150
|
const d = await l._get(o);
|
|
3107
3151
|
if (d) {
|
|
3108
|
-
const f =
|
|
3152
|
+
const f = I._fromJSON(e, d);
|
|
3109
3153
|
l !== s && (c = f), s = l;
|
|
3110
3154
|
break;
|
|
3111
3155
|
}
|
|
3112
3156
|
} catch {
|
|
3113
3157
|
}
|
|
3114
3158
|
const a = i.filter((l) => l._shouldAllowMigration);
|
|
3115
|
-
return !s._shouldAllowMigration || !a.length ? new
|
|
3159
|
+
return !s._shouldAllowMigration || !a.length ? new H(s, e, r) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
|
|
3116
3160
|
if (l !== s)
|
|
3117
3161
|
try {
|
|
3118
3162
|
await l._remove(o);
|
|
3119
3163
|
} catch {
|
|
3120
3164
|
}
|
|
3121
|
-
})), new
|
|
3165
|
+
})), new H(s, e, r));
|
|
3122
3166
|
}
|
|
3123
3167
|
}
|
|
3124
3168
|
/**
|
|
@@ -3325,7 +3369,7 @@ async function Bi(n, e = {}) {
|
|
|
3325
3369
|
* limitations under the License.
|
|
3326
3370
|
*/
|
|
3327
3371
|
const Fi = 6;
|
|
3328
|
-
class
|
|
3372
|
+
class Vi {
|
|
3329
3373
|
constructor(e) {
|
|
3330
3374
|
var t, r, i, s;
|
|
3331
3375
|
const o = e.customStrengthOptions;
|
|
@@ -3412,14 +3456,14 @@ class $i {
|
|
|
3412
3456
|
* See the License for the specific language governing permissions and
|
|
3413
3457
|
* limitations under the License.
|
|
3414
3458
|
*/
|
|
3415
|
-
class
|
|
3459
|
+
class $i {
|
|
3416
3460
|
constructor(e, t, r, i) {
|
|
3417
|
-
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 =
|
|
3461
|
+
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 = Vt, 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;
|
|
3418
3462
|
}
|
|
3419
3463
|
_initializeWithPersistence(e, t) {
|
|
3420
3464
|
return t && (this._popupRedirectResolver = w(t)), this._initializationPromise = this.queue(async () => {
|
|
3421
3465
|
var r, i;
|
|
3422
|
-
if (!this._deleted && (this.persistenceManager = await
|
|
3466
|
+
if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
|
|
3423
3467
|
if (!((r = this._popupRedirectResolver) === null || r === void 0) && r._shouldInitProactively)
|
|
3424
3468
|
try {
|
|
3425
3469
|
await this._popupRedirectResolver._initialize(this);
|
|
@@ -3450,7 +3494,7 @@ class Hi {
|
|
|
3450
3494
|
}
|
|
3451
3495
|
async initializeCurrentUserFromIdToken(e) {
|
|
3452
3496
|
try {
|
|
3453
|
-
const t = await Gt(this, { idToken: e }), r = await
|
|
3497
|
+
const t = await Gt(this, { idToken: e }), r = await I._fromGetAccountInfoResponse(this, t, e);
|
|
3454
3498
|
await this.directlySetCurrentUser(r);
|
|
3455
3499
|
} catch (t) {
|
|
3456
3500
|
console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
|
|
@@ -3559,7 +3603,7 @@ class Hi {
|
|
|
3559
3603
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
3560
3604
|
}
|
|
3561
3605
|
async _updatePasswordPolicy() {
|
|
3562
|
-
const e = await Bi(this), t = new
|
|
3606
|
+
const e = await Bi(this), t = new Vi(e);
|
|
3563
3607
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
3564
3608
|
}
|
|
3565
3609
|
_getPersistence() {
|
|
@@ -3623,7 +3667,7 @@ class Hi {
|
|
|
3623
3667
|
this,
|
|
3624
3668
|
"argument-error"
|
|
3625
3669
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
3626
|
-
), this.redirectPersistenceManager = await
|
|
3670
|
+
), this.redirectPersistenceManager = await H.create(
|
|
3627
3671
|
this,
|
|
3628
3672
|
[w(t._redirectPersistence)],
|
|
3629
3673
|
"redirectUser"
|
|
@@ -3742,7 +3786,7 @@ class Hi {
|
|
|
3742
3786
|
async _getAppCheckToken() {
|
|
3743
3787
|
var e;
|
|
3744
3788
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
3745
|
-
return t != null && t.error &&
|
|
3789
|
+
return t != null && t.error && bi(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
3746
3790
|
}
|
|
3747
3791
|
}
|
|
3748
3792
|
function ge(n) {
|
|
@@ -3785,7 +3829,7 @@ let ze = {
|
|
|
3785
3829
|
recaptchaEnterpriseScript: "",
|
|
3786
3830
|
gapiScript: ""
|
|
3787
3831
|
};
|
|
3788
|
-
function
|
|
3832
|
+
function Hi(n) {
|
|
3789
3833
|
ze = n;
|
|
3790
3834
|
}
|
|
3791
3835
|
function ji(n) {
|
|
@@ -3909,19 +3953,19 @@ class on {
|
|
|
3909
3953
|
* @returns a JSON-serializable representation of this object.
|
|
3910
3954
|
*/
|
|
3911
3955
|
toJSON() {
|
|
3912
|
-
return
|
|
3956
|
+
return b("not implemented");
|
|
3913
3957
|
}
|
|
3914
3958
|
/** @internal */
|
|
3915
3959
|
_getIdTokenResponse(e) {
|
|
3916
|
-
return
|
|
3960
|
+
return b("not implemented");
|
|
3917
3961
|
}
|
|
3918
3962
|
/** @internal */
|
|
3919
3963
|
_linkToIdToken(e, t) {
|
|
3920
|
-
return
|
|
3964
|
+
return b("not implemented");
|
|
3921
3965
|
}
|
|
3922
3966
|
/** @internal */
|
|
3923
3967
|
_getReauthenticationResolver(e) {
|
|
3924
|
-
return
|
|
3968
|
+
return b("not implemented");
|
|
3925
3969
|
}
|
|
3926
3970
|
}
|
|
3927
3971
|
/**
|
|
@@ -3994,7 +4038,7 @@ class U extends on {
|
|
|
3994
4038
|
* @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
|
|
3995
4039
|
*/
|
|
3996
4040
|
static fromJSON(e) {
|
|
3997
|
-
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s =
|
|
4041
|
+
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = Ve(t, ["providerId", "signInMethod"]);
|
|
3998
4042
|
if (!r || !i)
|
|
3999
4043
|
return null;
|
|
4000
4044
|
const o = new U(r, i);
|
|
@@ -4133,7 +4177,7 @@ class te extends an {
|
|
|
4133
4177
|
* See the License for the specific language governing permissions and
|
|
4134
4178
|
* limitations under the License.
|
|
4135
4179
|
*/
|
|
4136
|
-
class
|
|
4180
|
+
class P extends te {
|
|
4137
4181
|
constructor() {
|
|
4138
4182
|
super(
|
|
4139
4183
|
"facebook.com"
|
|
@@ -4154,8 +4198,8 @@ class k extends te {
|
|
|
4154
4198
|
*/
|
|
4155
4199
|
static credential(e) {
|
|
4156
4200
|
return U._fromParams({
|
|
4157
|
-
providerId:
|
|
4158
|
-
signInMethod:
|
|
4201
|
+
providerId: P.PROVIDER_ID,
|
|
4202
|
+
signInMethod: P.FACEBOOK_SIGN_IN_METHOD,
|
|
4159
4203
|
accessToken: e
|
|
4160
4204
|
});
|
|
4161
4205
|
}
|
|
@@ -4165,7 +4209,7 @@ class k extends te {
|
|
|
4165
4209
|
* @param userCredential - The user credential.
|
|
4166
4210
|
*/
|
|
4167
4211
|
static credentialFromResult(e) {
|
|
4168
|
-
return
|
|
4212
|
+
return P.credentialFromTaggedObject(e);
|
|
4169
4213
|
}
|
|
4170
4214
|
/**
|
|
4171
4215
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4174,20 +4218,20 @@ class k extends te {
|
|
|
4174
4218
|
* @param userCredential - The user credential.
|
|
4175
4219
|
*/
|
|
4176
4220
|
static credentialFromError(e) {
|
|
4177
|
-
return
|
|
4221
|
+
return P.credentialFromTaggedObject(e.customData || {});
|
|
4178
4222
|
}
|
|
4179
4223
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
4180
4224
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
4181
4225
|
return null;
|
|
4182
4226
|
try {
|
|
4183
|
-
return
|
|
4227
|
+
return P.credential(e.oauthAccessToken);
|
|
4184
4228
|
} catch {
|
|
4185
4229
|
return null;
|
|
4186
4230
|
}
|
|
4187
4231
|
}
|
|
4188
4232
|
}
|
|
4189
|
-
|
|
4190
|
-
|
|
4233
|
+
P.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
|
|
4234
|
+
P.PROVIDER_ID = "facebook.com";
|
|
4191
4235
|
/**
|
|
4192
4236
|
* @license
|
|
4193
4237
|
* Copyright 2020 Google LLC
|
|
@@ -4204,7 +4248,7 @@ k.PROVIDER_ID = "facebook.com";
|
|
|
4204
4248
|
* See the License for the specific language governing permissions and
|
|
4205
4249
|
* limitations under the License.
|
|
4206
4250
|
*/
|
|
4207
|
-
class
|
|
4251
|
+
class k extends te {
|
|
4208
4252
|
constructor() {
|
|
4209
4253
|
super(
|
|
4210
4254
|
"google.com"
|
|
@@ -4226,8 +4270,8 @@ class C extends te {
|
|
|
4226
4270
|
*/
|
|
4227
4271
|
static credential(e, t) {
|
|
4228
4272
|
return U._fromParams({
|
|
4229
|
-
providerId:
|
|
4230
|
-
signInMethod:
|
|
4273
|
+
providerId: k.PROVIDER_ID,
|
|
4274
|
+
signInMethod: k.GOOGLE_SIGN_IN_METHOD,
|
|
4231
4275
|
idToken: e,
|
|
4232
4276
|
accessToken: t
|
|
4233
4277
|
});
|
|
@@ -4238,7 +4282,7 @@ class C extends te {
|
|
|
4238
4282
|
* @param userCredential - The user credential.
|
|
4239
4283
|
*/
|
|
4240
4284
|
static credentialFromResult(e) {
|
|
4241
|
-
return
|
|
4285
|
+
return k.credentialFromTaggedObject(e);
|
|
4242
4286
|
}
|
|
4243
4287
|
/**
|
|
4244
4288
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4247,7 +4291,7 @@ class C extends te {
|
|
|
4247
4291
|
* @param userCredential - The user credential.
|
|
4248
4292
|
*/
|
|
4249
4293
|
static credentialFromError(e) {
|
|
4250
|
-
return
|
|
4294
|
+
return k.credentialFromTaggedObject(e.customData || {});
|
|
4251
4295
|
}
|
|
4252
4296
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
4253
4297
|
if (!e)
|
|
@@ -4256,14 +4300,14 @@ class C extends te {
|
|
|
4256
4300
|
if (!t && !r)
|
|
4257
4301
|
return null;
|
|
4258
4302
|
try {
|
|
4259
|
-
return
|
|
4303
|
+
return k.credential(t, r);
|
|
4260
4304
|
} catch {
|
|
4261
4305
|
return null;
|
|
4262
4306
|
}
|
|
4263
4307
|
}
|
|
4264
4308
|
}
|
|
4265
|
-
|
|
4266
|
-
|
|
4309
|
+
k.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
4310
|
+
k.PROVIDER_ID = "google.com";
|
|
4267
4311
|
/**
|
|
4268
4312
|
* @license
|
|
4269
4313
|
* Copyright 2020 Google LLC
|
|
@@ -4280,7 +4324,7 @@ C.PROVIDER_ID = "google.com";
|
|
|
4280
4324
|
* See the License for the specific language governing permissions and
|
|
4281
4325
|
* limitations under the License.
|
|
4282
4326
|
*/
|
|
4283
|
-
class
|
|
4327
|
+
class C extends te {
|
|
4284
4328
|
constructor() {
|
|
4285
4329
|
super(
|
|
4286
4330
|
"github.com"
|
|
@@ -4294,8 +4338,8 @@ class R extends te {
|
|
|
4294
4338
|
*/
|
|
4295
4339
|
static credential(e) {
|
|
4296
4340
|
return U._fromParams({
|
|
4297
|
-
providerId:
|
|
4298
|
-
signInMethod:
|
|
4341
|
+
providerId: C.PROVIDER_ID,
|
|
4342
|
+
signInMethod: C.GITHUB_SIGN_IN_METHOD,
|
|
4299
4343
|
accessToken: e
|
|
4300
4344
|
});
|
|
4301
4345
|
}
|
|
@@ -4305,7 +4349,7 @@ class R extends te {
|
|
|
4305
4349
|
* @param userCredential - The user credential.
|
|
4306
4350
|
*/
|
|
4307
4351
|
static credentialFromResult(e) {
|
|
4308
|
-
return
|
|
4352
|
+
return C.credentialFromTaggedObject(e);
|
|
4309
4353
|
}
|
|
4310
4354
|
/**
|
|
4311
4355
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4314,20 +4358,20 @@ class R extends te {
|
|
|
4314
4358
|
* @param userCredential - The user credential.
|
|
4315
4359
|
*/
|
|
4316
4360
|
static credentialFromError(e) {
|
|
4317
|
-
return
|
|
4361
|
+
return C.credentialFromTaggedObject(e.customData || {});
|
|
4318
4362
|
}
|
|
4319
4363
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
4320
4364
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
4321
4365
|
return null;
|
|
4322
4366
|
try {
|
|
4323
|
-
return
|
|
4367
|
+
return C.credential(e.oauthAccessToken);
|
|
4324
4368
|
} catch {
|
|
4325
4369
|
return null;
|
|
4326
4370
|
}
|
|
4327
4371
|
}
|
|
4328
4372
|
}
|
|
4329
|
-
|
|
4330
|
-
|
|
4373
|
+
C.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
4374
|
+
C.PROVIDER_ID = "github.com";
|
|
4331
4375
|
/**
|
|
4332
4376
|
* @license
|
|
4333
4377
|
* Copyright 2020 Google LLC
|
|
@@ -4344,7 +4388,7 @@ R.PROVIDER_ID = "github.com";
|
|
|
4344
4388
|
* See the License for the specific language governing permissions and
|
|
4345
4389
|
* limitations under the License.
|
|
4346
4390
|
*/
|
|
4347
|
-
class
|
|
4391
|
+
class R extends te {
|
|
4348
4392
|
constructor() {
|
|
4349
4393
|
super(
|
|
4350
4394
|
"twitter.com"
|
|
@@ -4359,8 +4403,8 @@ class P extends te {
|
|
|
4359
4403
|
*/
|
|
4360
4404
|
static credential(e, t) {
|
|
4361
4405
|
return U._fromParams({
|
|
4362
|
-
providerId:
|
|
4363
|
-
signInMethod:
|
|
4406
|
+
providerId: R.PROVIDER_ID,
|
|
4407
|
+
signInMethod: R.TWITTER_SIGN_IN_METHOD,
|
|
4364
4408
|
oauthToken: e,
|
|
4365
4409
|
oauthTokenSecret: t
|
|
4366
4410
|
});
|
|
@@ -4371,7 +4415,7 @@ class P extends te {
|
|
|
4371
4415
|
* @param userCredential - The user credential.
|
|
4372
4416
|
*/
|
|
4373
4417
|
static credentialFromResult(e) {
|
|
4374
|
-
return
|
|
4418
|
+
return R.credentialFromTaggedObject(e);
|
|
4375
4419
|
}
|
|
4376
4420
|
/**
|
|
4377
4421
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4380,7 +4424,7 @@ class P extends te {
|
|
|
4380
4424
|
* @param userCredential - The user credential.
|
|
4381
4425
|
*/
|
|
4382
4426
|
static credentialFromError(e) {
|
|
4383
|
-
return
|
|
4427
|
+
return R.credentialFromTaggedObject(e.customData || {});
|
|
4384
4428
|
}
|
|
4385
4429
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
4386
4430
|
if (!e)
|
|
@@ -4389,14 +4433,14 @@ class P extends te {
|
|
|
4389
4433
|
if (!t || !r)
|
|
4390
4434
|
return null;
|
|
4391
4435
|
try {
|
|
4392
|
-
return
|
|
4436
|
+
return R.credential(t, r);
|
|
4393
4437
|
} catch {
|
|
4394
4438
|
return null;
|
|
4395
4439
|
}
|
|
4396
4440
|
}
|
|
4397
4441
|
}
|
|
4398
|
-
|
|
4399
|
-
|
|
4442
|
+
R.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
|
4443
|
+
R.PROVIDER_ID = "twitter.com";
|
|
4400
4444
|
/**
|
|
4401
4445
|
* @license
|
|
4402
4446
|
* Copyright 2020 Google LLC
|
|
@@ -4418,7 +4462,7 @@ class x {
|
|
|
4418
4462
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
4419
4463
|
}
|
|
4420
4464
|
static async _fromIdTokenResponse(e, t, r, i = !1) {
|
|
4421
|
-
const s = await
|
|
4465
|
+
const s = await I._fromIdTokenResponse(e, r, i), o = gt(r);
|
|
4422
4466
|
return new x({
|
|
4423
4467
|
user: s,
|
|
4424
4468
|
providerId: o,
|
|
@@ -5308,7 +5352,7 @@ new ee(3e4, 6e4);
|
|
|
5308
5352
|
* See the License for the specific language governing permissions and
|
|
5309
5353
|
* limitations under the License.
|
|
5310
5354
|
*/
|
|
5311
|
-
function
|
|
5355
|
+
function bs(n, e) {
|
|
5312
5356
|
return e ? w(e) : (u(
|
|
5313
5357
|
n._popupRedirectResolver,
|
|
5314
5358
|
n,
|
|
@@ -5362,7 +5406,7 @@ class qe extends on {
|
|
|
5362
5406
|
return e && (t.idToken = e), t;
|
|
5363
5407
|
}
|
|
5364
5408
|
}
|
|
5365
|
-
function
|
|
5409
|
+
function Is(n) {
|
|
5366
5410
|
return es(n.auth, new qe(n), n.bypassAuthState);
|
|
5367
5411
|
}
|
|
5368
5412
|
function ws(n) {
|
|
@@ -5441,7 +5485,7 @@ class _n {
|
|
|
5441
5485
|
switch (e) {
|
|
5442
5486
|
case "signInViaPopup":
|
|
5443
5487
|
case "signInViaRedirect":
|
|
5444
|
-
return
|
|
5488
|
+
return Is;
|
|
5445
5489
|
case "linkViaPopup":
|
|
5446
5490
|
case "linkViaRedirect":
|
|
5447
5491
|
return Es;
|
|
@@ -5587,7 +5631,7 @@ class As extends _n {
|
|
|
5587
5631
|
let e = oe.get(this.auth._key());
|
|
5588
5632
|
if (!e) {
|
|
5589
5633
|
try {
|
|
5590
|
-
const r = await
|
|
5634
|
+
const r = await Ps(this.resolver, this.auth) ? await super.execute() : null;
|
|
5591
5635
|
e = () => Promise.resolve(r);
|
|
5592
5636
|
} catch (t) {
|
|
5593
5637
|
e = () => Promise.reject(t);
|
|
@@ -5615,26 +5659,26 @@ class As extends _n {
|
|
|
5615
5659
|
cleanUp() {
|
|
5616
5660
|
}
|
|
5617
5661
|
}
|
|
5618
|
-
async function
|
|
5619
|
-
const t =
|
|
5662
|
+
async function Ps(n, e) {
|
|
5663
|
+
const t = Rs(e), r = Cs(n);
|
|
5620
5664
|
if (!await r._isAvailable())
|
|
5621
5665
|
return !1;
|
|
5622
5666
|
const i = await r._get(t) === "true";
|
|
5623
5667
|
return await r._remove(t), i;
|
|
5624
5668
|
}
|
|
5625
|
-
function
|
|
5669
|
+
function ks(n, e) {
|
|
5626
5670
|
oe.set(n._key(), e);
|
|
5627
5671
|
}
|
|
5628
|
-
function
|
|
5672
|
+
function Cs(n) {
|
|
5629
5673
|
return w(n._redirectPersistence);
|
|
5630
5674
|
}
|
|
5631
|
-
function
|
|
5675
|
+
function Rs(n) {
|
|
5632
5676
|
return se(Ss, n.config.apiKey, n.name);
|
|
5633
5677
|
}
|
|
5634
5678
|
async function Os(n, e, t = !1) {
|
|
5635
5679
|
if (y(n.app))
|
|
5636
5680
|
return Promise.reject(D(n));
|
|
5637
|
-
const r = ge(n), i =
|
|
5681
|
+
const r = ge(n), i = bs(r, e), o = await new As(r, i, t).execute();
|
|
5638
5682
|
return o && !t && (delete o.user._redirectEventId, await r._persistUserIfCurrent(o.user), await r._setRedirectUser(null, e)), o;
|
|
5639
5683
|
}
|
|
5640
5684
|
/**
|
|
@@ -5790,8 +5834,8 @@ function Fs(n) {
|
|
|
5790
5834
|
* See the License for the specific language governing permissions and
|
|
5791
5835
|
* limitations under the License.
|
|
5792
5836
|
*/
|
|
5793
|
-
const
|
|
5794
|
-
function
|
|
5837
|
+
const Vs = new ee(3e4, 6e4);
|
|
5838
|
+
function bt() {
|
|
5795
5839
|
const n = _().___jsl;
|
|
5796
5840
|
if (n != null && n.H) {
|
|
5797
5841
|
for (const e of Object.keys(n.H))
|
|
@@ -5800,22 +5844,22 @@ function It() {
|
|
|
5800
5844
|
n.CP[t] = null;
|
|
5801
5845
|
}
|
|
5802
5846
|
}
|
|
5803
|
-
function
|
|
5847
|
+
function $s(n) {
|
|
5804
5848
|
return new Promise((e, t) => {
|
|
5805
5849
|
var r, i, s;
|
|
5806
5850
|
function o() {
|
|
5807
|
-
|
|
5851
|
+
bt(), gapi.load("gapi.iframes", {
|
|
5808
5852
|
callback: () => {
|
|
5809
5853
|
e(gapi.iframes.getContext());
|
|
5810
5854
|
},
|
|
5811
5855
|
ontimeout: () => {
|
|
5812
|
-
|
|
5856
|
+
bt(), t(g(
|
|
5813
5857
|
n,
|
|
5814
5858
|
"network-request-failed"
|
|
5815
5859
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
5816
5860
|
));
|
|
5817
5861
|
},
|
|
5818
|
-
timeout:
|
|
5862
|
+
timeout: Vs.get()
|
|
5819
5863
|
});
|
|
5820
5864
|
}
|
|
5821
5865
|
if (!((i = (r = _().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
|
|
@@ -5837,8 +5881,8 @@ function Hs(n) {
|
|
|
5837
5881
|
});
|
|
5838
5882
|
}
|
|
5839
5883
|
let ae = null;
|
|
5840
|
-
function
|
|
5841
|
-
return ae = ae ||
|
|
5884
|
+
function Hs(n) {
|
|
5885
|
+
return ae = ae || $s(n), ae;
|
|
5842
5886
|
}
|
|
5843
5887
|
/**
|
|
5844
5888
|
* @license
|
|
@@ -5879,7 +5923,7 @@ function Ks(n) {
|
|
|
5879
5923
|
"auth-domain-config-required"
|
|
5880
5924
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
5881
5925
|
);
|
|
5882
|
-
const t = e.emulator ?
|
|
5926
|
+
const t = e.emulator ? He(e, zs) : `https://${n.config.authDomain}/${Ws}`, r = {
|
|
5883
5927
|
apiKey: e.apiKey,
|
|
5884
5928
|
appName: n.name,
|
|
5885
5929
|
v: Z
|
|
@@ -5889,7 +5933,7 @@ function Ks(n) {
|
|
|
5889
5933
|
return s.length && (r.fw = s.join(",")), `${t}?${Q(r).slice(1)}`;
|
|
5890
5934
|
}
|
|
5891
5935
|
async function Js(n) {
|
|
5892
|
-
const e = await
|
|
5936
|
+
const e = await Hs(n), t = _().gapi;
|
|
5893
5937
|
return u(
|
|
5894
5938
|
t,
|
|
5895
5939
|
n,
|
|
@@ -5943,7 +5987,7 @@ const Ys = {
|
|
|
5943
5987
|
statusbar: "yes",
|
|
5944
5988
|
toolbar: "no"
|
|
5945
5989
|
}, Xs = 500, Qs = 600, Zs = "_blank", eo = "http://localhost";
|
|
5946
|
-
class
|
|
5990
|
+
class It {
|
|
5947
5991
|
constructor(e) {
|
|
5948
5992
|
this.window = e, this.associatedEvent = null;
|
|
5949
5993
|
}
|
|
@@ -5967,7 +6011,7 @@ function to(n, e, t, r = Xs, i = Qs) {
|
|
|
5967
6011
|
t && (c = Xt(l) ? Zs : t), Jt(l) && (e = e || eo, a.scrollbars = "yes");
|
|
5968
6012
|
const d = Object.entries(a).reduce((m, [v, B]) => `${m}${v}=${B},`, "");
|
|
5969
6013
|
if (Mi(l) && c !== "_self")
|
|
5970
|
-
return no(e || "", c), new
|
|
6014
|
+
return no(e || "", c), new It(null);
|
|
5971
6015
|
const f = window.open(e || "", c, d);
|
|
5972
6016
|
u(
|
|
5973
6017
|
f,
|
|
@@ -5979,7 +6023,7 @@ function to(n, e, t, r = Xs, i = Qs) {
|
|
|
5979
6023
|
f.focus();
|
|
5980
6024
|
} catch {
|
|
5981
6025
|
}
|
|
5982
|
-
return new
|
|
6026
|
+
return new It(f);
|
|
5983
6027
|
}
|
|
5984
6028
|
function no(n, e) {
|
|
5985
6029
|
const t = document.createElement("a");
|
|
@@ -6041,7 +6085,7 @@ async function wt(n, e, t, r, i, s) {
|
|
|
6041
6085
|
return `${oo(n)}?${Q(c).slice(1)}${l}`;
|
|
6042
6086
|
}
|
|
6043
6087
|
function oo({ config: n }) {
|
|
6044
|
-
return n.emulator ?
|
|
6088
|
+
return n.emulator ? He(n, io) : `https://${n.authDomain}/${ro}`;
|
|
6045
6089
|
}
|
|
6046
6090
|
/**
|
|
6047
6091
|
* @license
|
|
@@ -6059,10 +6103,10 @@ function oo({ config: n }) {
|
|
|
6059
6103
|
* See the License for the specific language governing permissions and
|
|
6060
6104
|
* limitations under the License.
|
|
6061
6105
|
*/
|
|
6062
|
-
const
|
|
6106
|
+
const Ce = "webStorageSupport";
|
|
6063
6107
|
class ao {
|
|
6064
6108
|
constructor() {
|
|
6065
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = hn, this._completeRedirectFn = Os, this._overrideRedirectResult =
|
|
6109
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = hn, this._completeRedirectFn = Os, this._overrideRedirectResult = ks;
|
|
6066
6110
|
}
|
|
6067
6111
|
// Wrapping in async even though we don't await anywhere in order
|
|
6068
6112
|
// to make sure errors are raised as promise rejections
|
|
@@ -6102,9 +6146,9 @@ class ao {
|
|
|
6102
6146
|
}), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
|
|
6103
6147
|
}
|
|
6104
6148
|
_isIframeWebStorageSupported(e, t) {
|
|
6105
|
-
this.iframes[e._key()].send(
|
|
6149
|
+
this.iframes[e._key()].send(Ce, { type: Ce }, (i) => {
|
|
6106
6150
|
var s;
|
|
6107
|
-
const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[
|
|
6151
|
+
const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Ce];
|
|
6108
6152
|
o !== void 0 && t(!!o), T(
|
|
6109
6153
|
e,
|
|
6110
6154
|
"internal-error"
|
|
@@ -6219,7 +6263,7 @@ function ho(n) {
|
|
|
6219
6263
|
tokenApiHost: "securetoken.googleapis.com",
|
|
6220
6264
|
apiScheme: "https",
|
|
6221
6265
|
sdkClientVersion: rn(n)
|
|
6222
|
-
}, l = new
|
|
6266
|
+
}, l = new $i(r, i, s, a);
|
|
6223
6267
|
return qi(l, t), l;
|
|
6224
6268
|
},
|
|
6225
6269
|
"PUBLIC"
|
|
@@ -6246,7 +6290,7 @@ function ho(n) {
|
|
|
6246
6290
|
).setInstantiationMode(
|
|
6247
6291
|
"EXPLICIT"
|
|
6248
6292
|
/* InstantiationMode.EXPLICIT */
|
|
6249
|
-
)),
|
|
6293
|
+
)), V(Et, Tt, uo(n)), V(Et, Tt, "esm2017");
|
|
6250
6294
|
}
|
|
6251
6295
|
/**
|
|
6252
6296
|
* @license
|
|
@@ -6304,7 +6348,7 @@ function _o() {
|
|
|
6304
6348
|
var n, e;
|
|
6305
6349
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
6306
6350
|
}
|
|
6307
|
-
|
|
6351
|
+
Hi({
|
|
6308
6352
|
loadJS(n) {
|
|
6309
6353
|
return new Promise((e, t) => {
|
|
6310
6354
|
const r = document.createElement("script");
|
|
@@ -6336,11 +6380,11 @@ const Eo = /* @__PURE__ */ Sn({
|
|
|
6336
6380
|
const c = await o.getCustomToken(), a = go(i);
|
|
6337
6381
|
await ns(a, c);
|
|
6338
6382
|
}
|
|
6339
|
-
return s(), An(e.sessionUser, s),
|
|
6383
|
+
return s(), An(e.sessionUser, s), Pn(() => {
|
|
6340
6384
|
t.isIframe && parent.postMessage({ event: "ready" }, "*");
|
|
6341
6385
|
}), (o, c) => {
|
|
6342
|
-
const a =
|
|
6343
|
-
return
|
|
6386
|
+
const a = kn("RouterView");
|
|
6387
|
+
return Cn(), Rn(a, {
|
|
6344
6388
|
key: On(r).path
|
|
6345
6389
|
});
|
|
6346
6390
|
};
|