zudoku 0.0.0-fix-firebase-export.2e421fda → 0.0.0-fix-firebase-export.f8270825
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/config/validators/validate.d.ts +0 -2
- package/dist/config/validators/validate.js +0 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +1 -1
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +5 -1
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
- package/lib/{firebase-Cax7HPzn.js → firebase-qUdSEL1p.js} +526 -520
- package/lib/{firebase-Cax7HPzn.js.map → firebase-qUdSEL1p.js.map} +1 -1
- package/lib/{index.esm-DDENMN4y.js → index.esm-kW-Utcsi.js} +2 -2
- package/lib/index.esm-kW-Utcsi.js.map +1 -0
- package/lib/zudoku.auth-firebase.js +1 -1
- package/package.json +1 -1
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +11 -1
- package/lib/index.esm-DDENMN4y.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { C as
|
|
3
|
-
import { S as
|
|
1
|
+
import { j as d } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { C as ir, A as we } from "./errors-Bs4duWDy.js";
|
|
3
|
+
import { S as or } from "./SignUp-BjS4ozA7.js";
|
|
4
4
|
import { u as K } from "./ZudokuContext-BXldanA8.js";
|
|
5
5
|
import { u as Se } from "./useMutation-C6RqWmTS.js";
|
|
6
|
-
import
|
|
6
|
+
import ar from "react";
|
|
7
7
|
import { a as Jt } from "./index.esm-BYObtETB.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { A as
|
|
8
|
+
import { u as cr, b as lr, L as Yt } from "./chunk-PVWAREVJ-dLIqswPy.js";
|
|
9
|
+
import { A as ur } from "./ActionButton-DUgvSylL.js";
|
|
10
10
|
import { A as Xt, a as Zt, b as Qt } from "./Mermaid-D_VSX7_Q.js";
|
|
11
|
-
import { B as
|
|
12
|
-
import { a as en, b as tn, c as nn, d as rn, C as
|
|
13
|
-
import { c as
|
|
14
|
-
import { S as
|
|
15
|
-
import { Form as
|
|
16
|
-
import { c as
|
|
11
|
+
import { B as dr } from "./Button-CynVW1JV.js";
|
|
12
|
+
import { a as en, b as tn, c as nn, d as rn, C as hr } from "./Card-KFniaZn5.js";
|
|
13
|
+
import { c as fr, I as ht } from "./createVariantComponent-B9_dVBvu.js";
|
|
14
|
+
import { S as pr } from "./Separator-CTPSeW1S.js";
|
|
15
|
+
import { Form as mr, FormItem as ft, FormLabel as pt, FormControl as mt, FormMessage as gt } from "./ui/Form.js";
|
|
16
|
+
import { c as gr } from "./cn-dYga0KKN.js";
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2025 Google LLC
|
|
@@ -30,7 +30,7 @@ import { c as mr } from "./cn-dYga0KKN.js";
|
|
|
30
30
|
* See the License for the specific language governing permissions and
|
|
31
31
|
* limitations under the License.
|
|
32
32
|
*/
|
|
33
|
-
const
|
|
33
|
+
const _r = () => {
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
@@ -56,7 +56,7 @@ const sn = function(n) {
|
|
|
56
56
|
s < 128 ? e[t++] = s : s < 2048 ? (e[t++] = s >> 6 | 192, e[t++] = s & 63 | 128) : (s & 64512) === 55296 && r + 1 < n.length && (n.charCodeAt(r + 1) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (n.charCodeAt(++r) & 1023), e[t++] = s >> 18 | 240, e[t++] = s >> 12 & 63 | 128, e[t++] = s >> 6 & 63 | 128, e[t++] = s & 63 | 128) : (e[t++] = s >> 12 | 224, e[t++] = s >> 6 & 63 | 128, e[t++] = s & 63 | 128);
|
|
57
57
|
}
|
|
58
58
|
return e;
|
|
59
|
-
},
|
|
59
|
+
}, Ir = function(n) {
|
|
60
60
|
const e = [];
|
|
61
61
|
let t = 0, r = 0;
|
|
62
62
|
for (; t < n.length; ) {
|
|
@@ -135,8 +135,8 @@ const sn = function(n) {
|
|
|
135
135
|
const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
|
136
136
|
for (let s = 0; s < n.length; s += 3) {
|
|
137
137
|
const i = n[s], o = s + 1 < n.length, a = o ? n[s + 1] : 0, c = s + 2 < n.length, l = c ? n[s + 2] : 0, f = i >> 2, p = (i & 3) << 4 | a >> 4;
|
|
138
|
-
let
|
|
139
|
-
c || (g = 64, o || (
|
|
138
|
+
let u = (a & 15) << 2 | l >> 6, g = l & 63;
|
|
139
|
+
c || (g = 64, o || (u = 64)), r.push(t[f], t[p], t[u], t[g]);
|
|
140
140
|
}
|
|
141
141
|
return r.join("");
|
|
142
142
|
},
|
|
@@ -160,7 +160,7 @@ const sn = function(n) {
|
|
|
160
160
|
* @return string representing the decoded value.
|
|
161
161
|
*/
|
|
162
162
|
decodeString(n, e) {
|
|
163
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
|
163
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Ir(this.decodeStringToByteArray(n, e));
|
|
164
164
|
},
|
|
165
165
|
/**
|
|
166
166
|
* Base64-decode a string.
|
|
@@ -187,9 +187,9 @@ const sn = function(n) {
|
|
|
187
187
|
++s;
|
|
188
188
|
const p = s < n.length ? t[n.charAt(s)] : 64;
|
|
189
189
|
if (++s, i == null || a == null || l == null || p == null)
|
|
190
|
-
throw new
|
|
191
|
-
const
|
|
192
|
-
if (r.push(
|
|
190
|
+
throw new wr();
|
|
191
|
+
const u = i << 2 | a >> 4;
|
|
192
|
+
if (r.push(u), l !== 64) {
|
|
193
193
|
const g = a << 4 & 240 | l >> 2;
|
|
194
194
|
if (r.push(g), p !== 64) {
|
|
195
195
|
const I = l << 6 & 192 | p;
|
|
@@ -212,16 +212,16 @@ const sn = function(n) {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
|
-
class
|
|
215
|
+
class wr extends Error {
|
|
216
216
|
constructor() {
|
|
217
217
|
super(...arguments), this.name = "DecodeBase64StringError";
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const yr = function(n) {
|
|
221
221
|
const e = sn(n);
|
|
222
222
|
return on.encodeByteArray(e, !0);
|
|
223
223
|
}, an = function(n) {
|
|
224
|
-
return
|
|
224
|
+
return yr(n).replace(/\./g, "");
|
|
225
225
|
}, cn = function(n) {
|
|
226
226
|
try {
|
|
227
227
|
return on.decodeString(n, !0);
|
|
@@ -246,7 +246,7 @@ const wr = function(n) {
|
|
|
246
246
|
* See the License for the specific language governing permissions and
|
|
247
247
|
* limitations under the License.
|
|
248
248
|
*/
|
|
249
|
-
function
|
|
249
|
+
function Er() {
|
|
250
250
|
if (typeof self < "u")
|
|
251
251
|
return self;
|
|
252
252
|
if (typeof window < "u")
|
|
@@ -271,13 +271,13 @@ function yr() {
|
|
|
271
271
|
* See the License for the specific language governing permissions and
|
|
272
272
|
* limitations under the License.
|
|
273
273
|
*/
|
|
274
|
-
const
|
|
274
|
+
const vr = () => Er().__FIREBASE_DEFAULTS__, br = () => {
|
|
275
275
|
if (typeof process > "u" || typeof process.env > "u")
|
|
276
276
|
return;
|
|
277
277
|
const n = process.env.__FIREBASE_DEFAULTS__;
|
|
278
278
|
if (n)
|
|
279
279
|
return JSON.parse(n);
|
|
280
|
-
},
|
|
280
|
+
}, Tr = () => {
|
|
281
281
|
if (typeof document > "u")
|
|
282
282
|
return;
|
|
283
283
|
let n;
|
|
@@ -290,12 +290,12 @@ const Er = () => yr().__FIREBASE_DEFAULTS__, vr = () => {
|
|
|
290
290
|
return e && JSON.parse(e);
|
|
291
291
|
}, et = () => {
|
|
292
292
|
try {
|
|
293
|
-
return
|
|
293
|
+
return _r() || vr() || br() || Tr();
|
|
294
294
|
} catch (n) {
|
|
295
295
|
console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
},
|
|
298
|
+
}, Sr = (n) => et()?.emulatorHosts?.[n], ln = () => et()?.config, un = (n) => et()?.[`_${n}`];
|
|
299
299
|
/**
|
|
300
300
|
* @license
|
|
301
301
|
* Copyright 2017 Google LLC
|
|
@@ -312,7 +312,7 @@ const Er = () => yr().__FIREBASE_DEFAULTS__, vr = () => {
|
|
|
312
312
|
* See the License for the specific language governing permissions and
|
|
313
313
|
* limitations under the License.
|
|
314
314
|
*/
|
|
315
|
-
class
|
|
315
|
+
class Cr {
|
|
316
316
|
constructor() {
|
|
317
317
|
this.reject = () => {
|
|
318
318
|
}, this.resolve = () => {
|
|
@@ -355,13 +355,13 @@ function De(n) {
|
|
|
355
355
|
return !1;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
async function
|
|
358
|
+
async function Ar(n) {
|
|
359
359
|
return (await fetch(n, {
|
|
360
360
|
credentials: "include"
|
|
361
361
|
})).ok;
|
|
362
362
|
}
|
|
363
363
|
const ie = {};
|
|
364
|
-
function
|
|
364
|
+
function Pr() {
|
|
365
365
|
const n = {
|
|
366
366
|
prod: [],
|
|
367
367
|
emulator: []
|
|
@@ -370,46 +370,46 @@ function Ar() {
|
|
|
370
370
|
ie[e] ? n.emulator.push(e) : n.prod.push(e);
|
|
371
371
|
return n;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function kr(n) {
|
|
374
374
|
let e = document.getElementById(n), t = !1;
|
|
375
375
|
return e || (e = document.createElement("div"), e.setAttribute("id", n), t = !0), { created: t, element: e };
|
|
376
376
|
}
|
|
377
377
|
let _t = !1;
|
|
378
|
-
function
|
|
378
|
+
function Rr(n, e) {
|
|
379
379
|
if (typeof window > "u" || typeof document > "u" || !De(window.location.host) || ie[n] === e || ie[n] || // If already set to use emulator, can't go back to prod.
|
|
380
380
|
_t)
|
|
381
381
|
return;
|
|
382
382
|
ie[n] = e;
|
|
383
|
-
function t(
|
|
384
|
-
return `__firebase__banner__${
|
|
383
|
+
function t(u) {
|
|
384
|
+
return `__firebase__banner__${u}`;
|
|
385
385
|
}
|
|
386
|
-
const r = "__firebase__banner", i =
|
|
386
|
+
const r = "__firebase__banner", i = Pr().prod.length > 0;
|
|
387
387
|
function o() {
|
|
388
|
-
const
|
|
389
|
-
|
|
388
|
+
const u = document.getElementById(r);
|
|
389
|
+
u && u.remove();
|
|
390
390
|
}
|
|
391
|
-
function a(
|
|
392
|
-
|
|
391
|
+
function a(u) {
|
|
392
|
+
u.style.display = "flex", u.style.background = "#7faaf0", u.style.position = "fixed", u.style.bottom = "5px", u.style.left = "5px", u.style.padding = ".5em", u.style.borderRadius = "5px", u.style.alignItems = "center";
|
|
393
393
|
}
|
|
394
|
-
function c(
|
|
395
|
-
|
|
394
|
+
function c(u, g) {
|
|
395
|
+
u.setAttribute("width", "24"), u.setAttribute("id", g), u.setAttribute("height", "24"), u.setAttribute("viewBox", "0 0 24 24"), u.setAttribute("fill", "none"), u.style.marginLeft = "-6px";
|
|
396
396
|
}
|
|
397
397
|
function l() {
|
|
398
|
-
const
|
|
399
|
-
return
|
|
398
|
+
const u = document.createElement("span");
|
|
399
|
+
return u.style.cursor = "pointer", u.style.marginLeft = "16px", u.style.fontSize = "24px", u.innerHTML = " ×", u.onclick = () => {
|
|
400
400
|
_t = !0, o();
|
|
401
|
-
},
|
|
401
|
+
}, u;
|
|
402
402
|
}
|
|
403
|
-
function f(
|
|
404
|
-
|
|
403
|
+
function f(u, g) {
|
|
404
|
+
u.setAttribute("id", g), u.innerText = "Learn more", u.href = "https://firebase.google.com/docs/studio/preview-apps#preview-backend", u.setAttribute("target", "__blank"), u.style.paddingLeft = "5px", u.style.textDecoration = "underline";
|
|
405
405
|
}
|
|
406
406
|
function p() {
|
|
407
|
-
const
|
|
408
|
-
if (
|
|
409
|
-
const Ue =
|
|
407
|
+
const u = kr(r), g = t("text"), I = document.getElementById(g) || document.createElement("span"), ne = t("learnmore"), _e = document.getElementById(ne) || document.createElement("a"), z = t("preprendIcon"), G = document.getElementById(z) || document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
408
|
+
if (u.created) {
|
|
409
|
+
const Ue = u.element;
|
|
410
410
|
a(Ue), f(_e, ne);
|
|
411
|
-
const
|
|
412
|
-
c(G, z), Ue.append(G, I, _e,
|
|
411
|
+
const sr = l();
|
|
412
|
+
c(G, z), Ue.append(G, I, _e, sr), document.body.appendChild(Ue);
|
|
413
413
|
}
|
|
414
414
|
i ? (I.innerText = "Preview backend disconnected.", G.innerHTML = `<g clip-path="url(#clip0_6013_33858)">
|
|
415
415
|
<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
|
|
@@ -448,33 +448,33 @@ function kr(n, e) {
|
|
|
448
448
|
function _() {
|
|
449
449
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Or() {
|
|
452
452
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
|
453
453
|
// just to deal with this case would probably be a bad idea.
|
|
454
454
|
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(_());
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Nr() {
|
|
457
457
|
return typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers";
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Dr() {
|
|
460
460
|
const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
|
461
461
|
return typeof n == "object" && n.id !== void 0;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Lr() {
|
|
464
464
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function Mr() {
|
|
467
467
|
const n = _();
|
|
468
468
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function xr() {
|
|
471
471
|
try {
|
|
472
472
|
return typeof indexedDB == "object";
|
|
473
473
|
} catch {
|
|
474
474
|
return !1;
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function Ur() {
|
|
478
478
|
return new Promise((n, e) => {
|
|
479
479
|
try {
|
|
480
480
|
let t = !0;
|
|
@@ -507,10 +507,10 @@ function xr() {
|
|
|
507
507
|
* See the License for the specific language governing permissions and
|
|
508
508
|
* limitations under the License.
|
|
509
509
|
*/
|
|
510
|
-
const
|
|
510
|
+
const Fr = "FirebaseError";
|
|
511
511
|
class U extends Error {
|
|
512
512
|
constructor(e, t, r) {
|
|
513
|
-
super(t), this.code = e, this.customData = r, this.name =
|
|
513
|
+
super(t), this.code = e, this.customData = r, this.name = Fr, Object.setPrototypeOf(this, U.prototype), Error.captureStackTrace && Error.captureStackTrace(this, de.prototype.create);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
class de {
|
|
@@ -518,18 +518,18 @@ class de {
|
|
|
518
518
|
this.service = e, this.serviceName = t, this.errors = r;
|
|
519
519
|
}
|
|
520
520
|
create(e, ...t) {
|
|
521
|
-
const r = t[0] || {}, s = `${this.service}/${e}`, i = this.errors[e], o = i ?
|
|
521
|
+
const r = t[0] || {}, s = `${this.service}/${e}`, i = this.errors[e], o = i ? Br(i, r) : "Error", a = `${this.serviceName}: ${o} (${s}).`;
|
|
522
522
|
return new U(s, a, r);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
return n.replace(
|
|
525
|
+
function Br(n, e) {
|
|
526
|
+
return n.replace(jr, (t, r) => {
|
|
527
527
|
const s = e[r];
|
|
528
528
|
return s != null ? String(s) : `<${r}?>`;
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
function
|
|
531
|
+
const jr = /\{\$([^}]+)}/g;
|
|
532
|
+
function Hr(n) {
|
|
533
533
|
for (const e in n)
|
|
534
534
|
if (Object.prototype.hasOwnProperty.call(n, e))
|
|
535
535
|
return !1;
|
|
@@ -597,11 +597,11 @@ function se(n) {
|
|
|
597
597
|
const t = n.indexOf("#", e);
|
|
598
598
|
return n.substring(e, t > 0 ? t : void 0);
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
const t = new
|
|
600
|
+
function Vr(n, e) {
|
|
601
|
+
const t = new $r(n, e);
|
|
602
602
|
return t.subscribe.bind(t);
|
|
603
603
|
}
|
|
604
|
-
class
|
|
604
|
+
class $r {
|
|
605
605
|
/**
|
|
606
606
|
* @param executor Function which can make calls to a single Observer
|
|
607
607
|
* as a proxy.
|
|
@@ -639,7 +639,7 @@ class Vr {
|
|
|
639
639
|
let s;
|
|
640
640
|
if (e === void 0 && t === void 0 && r === void 0)
|
|
641
641
|
throw new Error("Missing Observer.");
|
|
642
|
-
|
|
642
|
+
Wr(e, [
|
|
643
643
|
"next",
|
|
644
644
|
"error",
|
|
645
645
|
"complete"
|
|
@@ -685,7 +685,7 @@ class Vr {
|
|
|
685
685
|
}));
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Wr(n, e) {
|
|
689
689
|
if (typeof n != "object" || n === null)
|
|
690
690
|
return !1;
|
|
691
691
|
for (const t of e)
|
|
@@ -770,7 +770,7 @@ const V = "[DEFAULT]";
|
|
|
770
770
|
* See the License for the specific language governing permissions and
|
|
771
771
|
* limitations under the License.
|
|
772
772
|
*/
|
|
773
|
-
class
|
|
773
|
+
class zr {
|
|
774
774
|
constructor(e, t) {
|
|
775
775
|
this.name = e, this.container = t, this.component = null, this.instances = /* @__PURE__ */ new Map(), this.instancesDeferred = /* @__PURE__ */ new Map(), this.instancesOptions = /* @__PURE__ */ new Map(), this.onInitCallbacks = /* @__PURE__ */ new Map();
|
|
776
776
|
}
|
|
@@ -781,7 +781,7 @@ class Wr {
|
|
|
781
781
|
get(e) {
|
|
782
782
|
const t = this.normalizeInstanceIdentifier(e);
|
|
783
783
|
if (!this.instancesDeferred.has(t)) {
|
|
784
|
-
const r = new
|
|
784
|
+
const r = new Cr();
|
|
785
785
|
if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
|
|
786
786
|
try {
|
|
787
787
|
const s = this.getOrInitializeService({
|
|
@@ -820,7 +820,7 @@ class Wr {
|
|
|
820
820
|
if (this.component)
|
|
821
821
|
throw Error(`Component for ${this.name} has already been provided`);
|
|
822
822
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
|
823
|
-
if (
|
|
823
|
+
if (Kr(e))
|
|
824
824
|
try {
|
|
825
825
|
this.getOrInitializeService({ instanceIdentifier: V });
|
|
826
826
|
} catch {
|
|
@@ -906,7 +906,7 @@ class Wr {
|
|
|
906
906
|
getOrInitializeService({ instanceIdentifier: e, options: t = {} }) {
|
|
907
907
|
let r = this.instances.get(e);
|
|
908
908
|
if (!r && this.component && (r = this.component.instanceFactory(this.container, {
|
|
909
|
-
instanceIdentifier:
|
|
909
|
+
instanceIdentifier: Gr(e),
|
|
910
910
|
options: t
|
|
911
911
|
}), this.instances.set(e, r), this.instancesOptions.set(e, t), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
|
|
912
912
|
try {
|
|
@@ -922,10 +922,10 @@ class Wr {
|
|
|
922
922
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function Gr(n) {
|
|
926
926
|
return n === V ? void 0 : n;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function Kr(n) {
|
|
929
929
|
return n.instantiationMode === "EAGER";
|
|
930
930
|
}
|
|
931
931
|
/**
|
|
@@ -944,7 +944,7 @@ function Gr(n) {
|
|
|
944
944
|
* See the License for the specific language governing permissions and
|
|
945
945
|
* limitations under the License.
|
|
946
946
|
*/
|
|
947
|
-
class
|
|
947
|
+
class qr {
|
|
948
948
|
constructor(e) {
|
|
949
949
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
|
950
950
|
}
|
|
@@ -976,7 +976,7 @@ class Kr {
|
|
|
976
976
|
getProvider(e) {
|
|
977
977
|
if (this.providers.has(e))
|
|
978
978
|
return this.providers.get(e);
|
|
979
|
-
const t = new
|
|
979
|
+
const t = new zr(e, this);
|
|
980
980
|
return this.providers.set(e, t), t;
|
|
981
981
|
}
|
|
982
982
|
getProviders() {
|
|
@@ -1003,23 +1003,23 @@ var m;
|
|
|
1003
1003
|
(function(n) {
|
|
1004
1004
|
n[n.DEBUG = 0] = "DEBUG", n[n.VERBOSE = 1] = "VERBOSE", n[n.INFO = 2] = "INFO", n[n.WARN = 3] = "WARN", n[n.ERROR = 4] = "ERROR", n[n.SILENT = 5] = "SILENT";
|
|
1005
1005
|
})(m || (m = {}));
|
|
1006
|
-
const
|
|
1006
|
+
const Jr = {
|
|
1007
1007
|
debug: m.DEBUG,
|
|
1008
1008
|
verbose: m.VERBOSE,
|
|
1009
1009
|
info: m.INFO,
|
|
1010
1010
|
warn: m.WARN,
|
|
1011
1011
|
error: m.ERROR,
|
|
1012
1012
|
silent: m.SILENT
|
|
1013
|
-
},
|
|
1013
|
+
}, Yr = m.INFO, Xr = {
|
|
1014
1014
|
[m.DEBUG]: "log",
|
|
1015
1015
|
[m.VERBOSE]: "log",
|
|
1016
1016
|
[m.INFO]: "info",
|
|
1017
1017
|
[m.WARN]: "warn",
|
|
1018
1018
|
[m.ERROR]: "error"
|
|
1019
|
-
},
|
|
1019
|
+
}, Zr = (n, e, ...t) => {
|
|
1020
1020
|
if (e < n.logLevel)
|
|
1021
1021
|
return;
|
|
1022
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), s =
|
|
1022
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), s = Xr[e];
|
|
1023
1023
|
if (s)
|
|
1024
1024
|
console[s](`[${r}] ${n.name}:`, ...t);
|
|
1025
1025
|
else
|
|
@@ -1033,7 +1033,7 @@ class dn {
|
|
|
1033
1033
|
* @param name The name that the logs will be associated with
|
|
1034
1034
|
*/
|
|
1035
1035
|
constructor(e) {
|
|
1036
|
-
this.name = e, this._logLevel =
|
|
1036
|
+
this.name = e, this._logLevel = Yr, this._logHandler = Zr, this._userLogHandler = null;
|
|
1037
1037
|
}
|
|
1038
1038
|
get logLevel() {
|
|
1039
1039
|
return this._logLevel;
|
|
@@ -1045,7 +1045,7 @@ class dn {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
// Workaround for setter/getter having to be the same type.
|
|
1047
1047
|
setLogLevel(e) {
|
|
1048
|
-
this._logLevel = typeof e == "string" ?
|
|
1048
|
+
this._logLevel = typeof e == "string" ? Jr[e] : e;
|
|
1049
1049
|
}
|
|
1050
1050
|
get logHandler() {
|
|
1051
1051
|
return this._logHandler;
|
|
@@ -1080,9 +1080,9 @@ class dn {
|
|
|
1080
1080
|
this._userLogHandler && this._userLogHandler(this, m.ERROR, ...e), this._logHandler(this, m.ERROR, ...e);
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
|
-
const
|
|
1083
|
+
const Qr = (n, e) => e.some((t) => n instanceof t);
|
|
1084
1084
|
let wt, yt;
|
|
1085
|
-
function
|
|
1085
|
+
function es() {
|
|
1086
1086
|
return wt || (wt = [
|
|
1087
1087
|
IDBDatabase,
|
|
1088
1088
|
IDBObjectStore,
|
|
@@ -1091,7 +1091,7 @@ function Qr() {
|
|
|
1091
1091
|
IDBTransaction
|
|
1092
1092
|
]);
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function ts() {
|
|
1095
1095
|
return yt || (yt = [
|
|
1096
1096
|
IDBCursor.prototype.advance,
|
|
1097
1097
|
IDBCursor.prototype.continue,
|
|
@@ -1099,7 +1099,7 @@ function es() {
|
|
|
1099
1099
|
]);
|
|
1100
1100
|
}
|
|
1101
1101
|
const hn = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap();
|
|
1102
|
-
function
|
|
1102
|
+
function ns(n) {
|
|
1103
1103
|
const e = new Promise((t, r) => {
|
|
1104
1104
|
const s = () => {
|
|
1105
1105
|
n.removeEventListener("success", i), n.removeEventListener("error", o);
|
|
@@ -1115,7 +1115,7 @@ function ts(n) {
|
|
|
1115
1115
|
}).catch(() => {
|
|
1116
1116
|
}), tt.set(e, n), e;
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function rs(n) {
|
|
1119
1119
|
if (ze.has(n))
|
|
1120
1120
|
return;
|
|
1121
1121
|
const e = new Promise((t, r) => {
|
|
@@ -1149,32 +1149,32 @@ let Ge = {
|
|
|
1149
1149
|
return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
|
|
1150
1150
|
}
|
|
1151
1151
|
};
|
|
1152
|
-
function
|
|
1152
|
+
function ss(n) {
|
|
1153
1153
|
Ge = n(Ge);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function is(n) {
|
|
1156
1156
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
|
1157
1157
|
const r = n.call(je(this), e, ...t);
|
|
1158
1158
|
return fn.set(r, e.sort ? e.sort() : [e]), M(r);
|
|
1159
|
-
} :
|
|
1159
|
+
} : ts().includes(n) ? function(...e) {
|
|
1160
1160
|
return n.apply(je(this), e), M(hn.get(this));
|
|
1161
1161
|
} : function(...e) {
|
|
1162
1162
|
return M(n.apply(je(this), e));
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
return typeof n == "function" ?
|
|
1165
|
+
function os(n) {
|
|
1166
|
+
return typeof n == "function" ? is(n) : (n instanceof IDBTransaction && rs(n), Qr(n, es()) ? new Proxy(n, Ge) : n);
|
|
1167
1167
|
}
|
|
1168
1168
|
function M(n) {
|
|
1169
1169
|
if (n instanceof IDBRequest)
|
|
1170
|
-
return
|
|
1170
|
+
return ns(n);
|
|
1171
1171
|
if (Be.has(n))
|
|
1172
1172
|
return Be.get(n);
|
|
1173
|
-
const e =
|
|
1173
|
+
const e = os(n);
|
|
1174
1174
|
return e !== n && (Be.set(n, e), tt.set(e, n)), e;
|
|
1175
1175
|
}
|
|
1176
1176
|
const je = (n) => tt.get(n);
|
|
1177
|
-
function
|
|
1177
|
+
function as(n, e, { blocked: t, upgrade: r, blocking: s, terminated: i } = {}) {
|
|
1178
1178
|
const o = indexedDB.open(n, e), a = M(o);
|
|
1179
1179
|
return r && o.addEventListener("upgradeneeded", (c) => {
|
|
1180
1180
|
r(M(o.result), c.oldVersion, c.newVersion, M(o.transaction), c);
|
|
@@ -1188,16 +1188,16 @@ function os(n, e, { blocked: t, upgrade: r, blocking: s, terminated: i } = {}) {
|
|
|
1188
1188
|
}).catch(() => {
|
|
1189
1189
|
}), a;
|
|
1190
1190
|
}
|
|
1191
|
-
const
|
|
1191
|
+
const cs = ["get", "getKey", "getAll", "getAllKeys", "count"], ls = ["put", "add", "delete", "clear"], He = /* @__PURE__ */ new Map();
|
|
1192
1192
|
function Et(n, e) {
|
|
1193
1193
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
|
1194
1194
|
return;
|
|
1195
1195
|
if (He.get(e))
|
|
1196
1196
|
return He.get(e);
|
|
1197
|
-
const t = e.replace(/FromIndex$/, ""), r = e !== t, s =
|
|
1197
|
+
const t = e.replace(/FromIndex$/, ""), r = e !== t, s = ls.includes(t);
|
|
1198
1198
|
if (
|
|
1199
1199
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
|
1200
|
-
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(s ||
|
|
1200
|
+
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(s || cs.includes(t))
|
|
1201
1201
|
)
|
|
1202
1202
|
return;
|
|
1203
1203
|
const i = async function(o, ...a) {
|
|
@@ -1210,7 +1210,7 @@ function Et(n, e) {
|
|
|
1210
1210
|
};
|
|
1211
1211
|
return He.set(e, i), i;
|
|
1212
1212
|
}
|
|
1213
|
-
|
|
1213
|
+
ss((n) => ({
|
|
1214
1214
|
...n,
|
|
1215
1215
|
get: (e, t, r) => Et(e, t) || n.get(e, t, r),
|
|
1216
1216
|
has: (e, t) => !!Et(e, t) || n.has(e, t)
|
|
@@ -1231,7 +1231,7 @@ rs((n) => ({
|
|
|
1231
1231
|
* See the License for the specific language governing permissions and
|
|
1232
1232
|
* limitations under the License.
|
|
1233
1233
|
*/
|
|
1234
|
-
class
|
|
1234
|
+
class us {
|
|
1235
1235
|
constructor(e) {
|
|
1236
1236
|
this.container = e;
|
|
1237
1237
|
}
|
|
@@ -1239,7 +1239,7 @@ class ls {
|
|
|
1239
1239
|
// auth token refresh, and installations will send this string.
|
|
1240
1240
|
getPlatformInfoString() {
|
|
1241
1241
|
return this.container.getProviders().map((t) => {
|
|
1242
|
-
if (
|
|
1242
|
+
if (ds(t)) {
|
|
1243
1243
|
const r = t.getImmediate();
|
|
1244
1244
|
return `${r.library}/${r.version}`;
|
|
1245
1245
|
} else
|
|
@@ -1247,7 +1247,7 @@ class ls {
|
|
|
1247
1247
|
}).filter((t) => t).join(" ");
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function ds(n) {
|
|
1251
1251
|
return n.getComponent()?.type === "VERSION";
|
|
1252
1252
|
}
|
|
1253
1253
|
const Ke = "@firebase/app", vt = "0.14.6";
|
|
@@ -1267,7 +1267,7 @@ const Ke = "@firebase/app", vt = "0.14.6";
|
|
|
1267
1267
|
* See the License for the specific language governing permissions and
|
|
1268
1268
|
* limitations under the License.
|
|
1269
1269
|
*/
|
|
1270
|
-
const A = new dn("@firebase/app"),
|
|
1270
|
+
const A = new dn("@firebase/app"), hs = "@firebase/app-compat", fs = "@firebase/analytics-compat", ps = "@firebase/analytics", ms = "@firebase/app-check-compat", gs = "@firebase/app-check", _s = "@firebase/auth", Is = "@firebase/auth-compat", ws = "@firebase/database", ys = "@firebase/data-connect", Es = "@firebase/database-compat", vs = "@firebase/functions", bs = "@firebase/functions-compat", Ts = "@firebase/installations", Ss = "@firebase/installations-compat", Cs = "@firebase/messaging", As = "@firebase/messaging-compat", Ps = "@firebase/performance", ks = "@firebase/performance-compat", Rs = "@firebase/remote-config", Os = "@firebase/remote-config-compat", Ns = "@firebase/storage", Ds = "@firebase/storage-compat", Ls = "@firebase/firestore", Ms = "@firebase/ai", xs = "@firebase/firestore-compat", Us = "firebase", Fs = "12.6.0";
|
|
1271
1271
|
/**
|
|
1272
1272
|
* @license
|
|
1273
1273
|
* Copyright 2019 Google LLC
|
|
@@ -1284,36 +1284,36 @@ const A = new dn("@firebase/app"), ds = "@firebase/app-compat", hs = "@firebase/
|
|
|
1284
1284
|
* See the License for the specific language governing permissions and
|
|
1285
1285
|
* limitations under the License.
|
|
1286
1286
|
*/
|
|
1287
|
-
const qe = "[DEFAULT]",
|
|
1287
|
+
const qe = "[DEFAULT]", Bs = {
|
|
1288
1288
|
[Ke]: "fire-core",
|
|
1289
|
-
[
|
|
1290
|
-
[
|
|
1291
|
-
[
|
|
1292
|
-
[
|
|
1293
|
-
[
|
|
1294
|
-
[
|
|
1295
|
-
[
|
|
1296
|
-
[
|
|
1297
|
-
[
|
|
1298
|
-
[
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1302
|
-
[
|
|
1303
|
-
[
|
|
1304
|
-
[
|
|
1305
|
-
[
|
|
1306
|
-
[
|
|
1307
|
-
[
|
|
1308
|
-
[
|
|
1309
|
-
[
|
|
1310
|
-
[
|
|
1311
|
-
[
|
|
1312
|
-
[
|
|
1313
|
-
[
|
|
1289
|
+
[hs]: "fire-core-compat",
|
|
1290
|
+
[ps]: "fire-analytics",
|
|
1291
|
+
[fs]: "fire-analytics-compat",
|
|
1292
|
+
[gs]: "fire-app-check",
|
|
1293
|
+
[ms]: "fire-app-check-compat",
|
|
1294
|
+
[_s]: "fire-auth",
|
|
1295
|
+
[Is]: "fire-auth-compat",
|
|
1296
|
+
[ws]: "fire-rtdb",
|
|
1297
|
+
[ys]: "fire-data-connect",
|
|
1298
|
+
[Es]: "fire-rtdb-compat",
|
|
1299
|
+
[vs]: "fire-fn",
|
|
1300
|
+
[bs]: "fire-fn-compat",
|
|
1301
|
+
[Ts]: "fire-iid",
|
|
1302
|
+
[Ss]: "fire-iid-compat",
|
|
1303
|
+
[Cs]: "fire-fcm",
|
|
1304
|
+
[As]: "fire-fcm-compat",
|
|
1305
|
+
[Ps]: "fire-perf",
|
|
1306
|
+
[ks]: "fire-perf-compat",
|
|
1307
|
+
[Rs]: "fire-rc",
|
|
1308
|
+
[Os]: "fire-rc-compat",
|
|
1309
|
+
[Ns]: "fire-gcs",
|
|
1310
|
+
[Ds]: "fire-gcs-compat",
|
|
1311
|
+
[Ls]: "fire-fst",
|
|
1312
|
+
[xs]: "fire-fst-compat",
|
|
1313
|
+
[Ms]: "fire-vertex",
|
|
1314
1314
|
"fire-js": "fire-js",
|
|
1315
1315
|
// Platform identifier for JS SDK.
|
|
1316
|
-
[
|
|
1316
|
+
[Us]: "fire-js-all"
|
|
1317
1317
|
};
|
|
1318
1318
|
/**
|
|
1319
1319
|
* @license
|
|
@@ -1331,7 +1331,7 @@ const qe = "[DEFAULT]", Fs = {
|
|
|
1331
1331
|
* See the License for the specific language governing permissions and
|
|
1332
1332
|
* limitations under the License.
|
|
1333
1333
|
*/
|
|
1334
|
-
const Ce = /* @__PURE__ */ new Map(),
|
|
1334
|
+
const Ce = /* @__PURE__ */ new Map(), js = /* @__PURE__ */ new Map(), Je = /* @__PURE__ */ new Map();
|
|
1335
1335
|
function bt(n, e) {
|
|
1336
1336
|
try {
|
|
1337
1337
|
n.container.addComponent(e);
|
|
@@ -1346,7 +1346,7 @@ function ae(n) {
|
|
|
1346
1346
|
Je.set(e, n);
|
|
1347
1347
|
for (const t of Ce.values())
|
|
1348
1348
|
bt(t, n);
|
|
1349
|
-
for (const t of
|
|
1349
|
+
for (const t of js.values())
|
|
1350
1350
|
bt(t, n);
|
|
1351
1351
|
return !0;
|
|
1352
1352
|
}
|
|
@@ -1373,7 +1373,7 @@ function w(n) {
|
|
|
1373
1373
|
* See the License for the specific language governing permissions and
|
|
1374
1374
|
* limitations under the License.
|
|
1375
1375
|
*/
|
|
1376
|
-
const
|
|
1376
|
+
const Hs = {
|
|
1377
1377
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
|
1378
1378
|
"bad-app-name": "Illegal App name: '{$appName}'",
|
|
1379
1379
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
|
@@ -1388,7 +1388,7 @@ const js = {
|
|
|
1388
1388
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1389
1389
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
|
1390
1390
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
|
1391
|
-
}, x = new de("app", "Firebase",
|
|
1391
|
+
}, x = new de("app", "Firebase", Hs);
|
|
1392
1392
|
/**
|
|
1393
1393
|
* @license
|
|
1394
1394
|
* Copyright 2019 Google LLC
|
|
@@ -1405,7 +1405,7 @@ const js = {
|
|
|
1405
1405
|
* See the License for the specific language governing permissions and
|
|
1406
1406
|
* limitations under the License.
|
|
1407
1407
|
*/
|
|
1408
|
-
class
|
|
1408
|
+
class Vs {
|
|
1409
1409
|
constructor(e, t, r) {
|
|
1410
1410
|
this._isDeleted = !1, this._options = { ...e }, this._config = { ...t }, this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new Q(
|
|
1411
1411
|
"app",
|
|
@@ -1463,7 +1463,7 @@ class Hs {
|
|
|
1463
1463
|
* See the License for the specific language governing permissions and
|
|
1464
1464
|
* limitations under the License.
|
|
1465
1465
|
*/
|
|
1466
|
-
const fe =
|
|
1466
|
+
const fe = Fs;
|
|
1467
1467
|
function mn(n, e = {}) {
|
|
1468
1468
|
let t = n;
|
|
1469
1469
|
typeof e != "object" && (e = { name: e });
|
|
@@ -1487,13 +1487,13 @@ function mn(n, e = {}) {
|
|
|
1487
1487
|
return i;
|
|
1488
1488
|
throw x.create("duplicate-app", { appName: s });
|
|
1489
1489
|
}
|
|
1490
|
-
const o = new
|
|
1490
|
+
const o = new qr(s);
|
|
1491
1491
|
for (const c of Je.values())
|
|
1492
1492
|
o.addComponent(c);
|
|
1493
|
-
const a = new
|
|
1493
|
+
const a = new Vs(t, r, o);
|
|
1494
1494
|
return Ce.set(s, a), a;
|
|
1495
1495
|
}
|
|
1496
|
-
function
|
|
1496
|
+
function $s(n = qe) {
|
|
1497
1497
|
const e = Ce.get(n);
|
|
1498
1498
|
if (!e && n === qe && ln())
|
|
1499
1499
|
return mn();
|
|
@@ -1502,7 +1502,7 @@ function Vs(n = qe) {
|
|
|
1502
1502
|
return e;
|
|
1503
1503
|
}
|
|
1504
1504
|
function q(n, e, t) {
|
|
1505
|
-
let r =
|
|
1505
|
+
let r = Bs[n] ?? n;
|
|
1506
1506
|
t && (r += `-${t}`);
|
|
1507
1507
|
const s = r.match(/\s|\//), i = e.match(/\s|\//);
|
|
1508
1508
|
if (s || i) {
|
|
@@ -1535,10 +1535,10 @@ function q(n, e, t) {
|
|
|
1535
1535
|
* See the License for the specific language governing permissions and
|
|
1536
1536
|
* limitations under the License.
|
|
1537
1537
|
*/
|
|
1538
|
-
const
|
|
1538
|
+
const Ws = "firebase-heartbeat-database", zs = 1, ce = "firebase-heartbeat-store";
|
|
1539
1539
|
let Ve = null;
|
|
1540
1540
|
function gn() {
|
|
1541
|
-
return Ve || (Ve =
|
|
1541
|
+
return Ve || (Ve = as(Ws, zs, {
|
|
1542
1542
|
upgrade: (n, e) => {
|
|
1543
1543
|
switch (e) {
|
|
1544
1544
|
case 0:
|
|
@@ -1555,7 +1555,7 @@ function gn() {
|
|
|
1555
1555
|
});
|
|
1556
1556
|
})), Ve;
|
|
1557
1557
|
}
|
|
1558
|
-
async function
|
|
1558
|
+
async function Gs(n) {
|
|
1559
1559
|
try {
|
|
1560
1560
|
const t = (await gn()).transaction(ce), r = await t.objectStore(ce).get(_n(n));
|
|
1561
1561
|
return await t.done, r;
|
|
@@ -1604,12 +1604,12 @@ function _n(n) {
|
|
|
1604
1604
|
* See the License for the specific language governing permissions and
|
|
1605
1605
|
* limitations under the License.
|
|
1606
1606
|
*/
|
|
1607
|
-
const
|
|
1608
|
-
class
|
|
1607
|
+
const Ks = 1024, qs = 30;
|
|
1608
|
+
class Js {
|
|
1609
1609
|
constructor(e) {
|
|
1610
1610
|
this.container = e, this._heartbeatsCache = null;
|
|
1611
1611
|
const t = this.container.getProvider("app").getImmediate();
|
|
1612
|
-
this._storage = new
|
|
1612
|
+
this._storage = new Xs(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
|
1613
1613
|
}
|
|
1614
1614
|
/**
|
|
1615
1615
|
* Called to report a heartbeat. The function will generate
|
|
@@ -1623,8 +1623,8 @@ class qs {
|
|
|
1623
1623
|
const t = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), r = St();
|
|
1624
1624
|
if (this._heartbeatsCache?.heartbeats == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, this._heartbeatsCache?.heartbeats == null) || this._heartbeatsCache.lastSentHeartbeatDate === r || this._heartbeatsCache.heartbeats.some((s) => s.date === r))
|
|
1625
1625
|
return;
|
|
1626
|
-
if (this._heartbeatsCache.heartbeats.push({ date: r, agent: t }), this._heartbeatsCache.heartbeats.length >
|
|
1627
|
-
const s =
|
|
1626
|
+
if (this._heartbeatsCache.heartbeats.push({ date: r, agent: t }), this._heartbeatsCache.heartbeats.length > qs) {
|
|
1627
|
+
const s = Zs(this._heartbeatsCache.heartbeats);
|
|
1628
1628
|
this._heartbeatsCache.heartbeats.splice(s, 1);
|
|
1629
1629
|
}
|
|
1630
1630
|
return this._storage.overwrite(this._heartbeatsCache);
|
|
@@ -1643,7 +1643,7 @@ class qs {
|
|
|
1643
1643
|
try {
|
|
1644
1644
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, this._heartbeatsCache?.heartbeats == null || this._heartbeatsCache.heartbeats.length === 0)
|
|
1645
1645
|
return "";
|
|
1646
|
-
const e = St(), { heartbeatsToSend: t, unsentEntries: r } =
|
|
1646
|
+
const e = St(), { heartbeatsToSend: t, unsentEntries: r } = Ys(this._heartbeatsCache.heartbeats), s = an(JSON.stringify({ version: 2, heartbeats: t }));
|
|
1647
1647
|
return this._heartbeatsCache.lastSentHeartbeatDate = e, r.length > 0 ? (this._heartbeatsCache.heartbeats = r, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
|
|
1648
1648
|
} catch (e) {
|
|
1649
1649
|
return A.warn(e), "";
|
|
@@ -1653,7 +1653,7 @@ class qs {
|
|
|
1653
1653
|
function St() {
|
|
1654
1654
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function Ys(n, e = Ks) {
|
|
1657
1657
|
const t = [];
|
|
1658
1658
|
let r = n.slice();
|
|
1659
1659
|
for (const s of n) {
|
|
@@ -1677,19 +1677,19 @@ function Js(n, e = Gs) {
|
|
|
1677
1677
|
unsentEntries: r
|
|
1678
1678
|
};
|
|
1679
1679
|
}
|
|
1680
|
-
class
|
|
1680
|
+
class Xs {
|
|
1681
1681
|
constructor(e) {
|
|
1682
1682
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
|
1683
1683
|
}
|
|
1684
1684
|
async runIndexedDBEnvironmentCheck() {
|
|
1685
|
-
return
|
|
1685
|
+
return xr() ? Ur().then(() => !0).catch(() => !1) : !1;
|
|
1686
1686
|
}
|
|
1687
1687
|
/**
|
|
1688
1688
|
* Read all heartbeats.
|
|
1689
1689
|
*/
|
|
1690
1690
|
async read() {
|
|
1691
1691
|
if (await this._canUseIndexedDBPromise) {
|
|
1692
|
-
const t = await
|
|
1692
|
+
const t = await Gs(this.app);
|
|
1693
1693
|
return t?.heartbeats ? t : { heartbeats: [] };
|
|
1694
1694
|
} else
|
|
1695
1695
|
return { heartbeats: [] };
|
|
@@ -1726,7 +1726,7 @@ function Ct(n) {
|
|
|
1726
1726
|
JSON.stringify({ version: 2, heartbeats: n })
|
|
1727
1727
|
).length;
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function Zs(n) {
|
|
1730
1730
|
if (n.length === 0)
|
|
1731
1731
|
return -1;
|
|
1732
1732
|
let e = 0, t = n[0].date;
|
|
@@ -1750,21 +1750,21 @@ function Xs(n) {
|
|
|
1750
1750
|
* See the License for the specific language governing permissions and
|
|
1751
1751
|
* limitations under the License.
|
|
1752
1752
|
*/
|
|
1753
|
-
function
|
|
1753
|
+
function Qs(n) {
|
|
1754
1754
|
ae(new Q(
|
|
1755
1755
|
"platform-logger",
|
|
1756
|
-
(e) => new
|
|
1756
|
+
(e) => new us(e),
|
|
1757
1757
|
"PRIVATE"
|
|
1758
1758
|
/* ComponentType.PRIVATE */
|
|
1759
1759
|
)), ae(new Q(
|
|
1760
1760
|
"heartbeat",
|
|
1761
|
-
(e) => new
|
|
1761
|
+
(e) => new Js(e),
|
|
1762
1762
|
"PRIVATE"
|
|
1763
1763
|
/* ComponentType.PRIVATE */
|
|
1764
1764
|
)), q(Ke, vt, n), q(Ke, vt, "esm2020"), q("fire-js", "");
|
|
1765
1765
|
}
|
|
1766
|
-
|
|
1767
|
-
var
|
|
1766
|
+
Qs("");
|
|
1767
|
+
var ei = "firebase", ti = "12.6.0";
|
|
1768
1768
|
/**
|
|
1769
1769
|
* @license
|
|
1770
1770
|
* Copyright 2020 Google LLC
|
|
@@ -1781,13 +1781,13 @@ var Qs = "firebase", ei = "12.6.0";
|
|
|
1781
1781
|
* See the License for the specific language governing permissions and
|
|
1782
1782
|
* limitations under the License.
|
|
1783
1783
|
*/
|
|
1784
|
-
q(
|
|
1784
|
+
q(ei, ti, "app");
|
|
1785
1785
|
function In() {
|
|
1786
1786
|
return {
|
|
1787
1787
|
"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."
|
|
1788
1788
|
};
|
|
1789
1789
|
}
|
|
1790
|
-
const
|
|
1790
|
+
const ni = In, wn = new de("auth", "Firebase", In());
|
|
1791
1791
|
/**
|
|
1792
1792
|
* @license
|
|
1793
1793
|
* Copyright 2020 Google LLC
|
|
@@ -1805,7 +1805,7 @@ const ti = In, wn = new de("auth", "Firebase", In());
|
|
|
1805
1805
|
* limitations under the License.
|
|
1806
1806
|
*/
|
|
1807
1807
|
const Ae = new dn("@firebase/auth");
|
|
1808
|
-
function
|
|
1808
|
+
function ri(n, ...e) {
|
|
1809
1809
|
Ae.logLevel <= m.WARN && Ae.warn(`Auth (${fe}): ${n}`, ...e);
|
|
1810
1810
|
}
|
|
1811
1811
|
function ye(n, ...e) {
|
|
@@ -1835,7 +1835,7 @@ function v(n, ...e) {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
function nt(n, e, t) {
|
|
1837
1837
|
const r = {
|
|
1838
|
-
...
|
|
1838
|
+
...ni(),
|
|
1839
1839
|
[e]: t
|
|
1840
1840
|
};
|
|
1841
1841
|
return new de("auth", "Firebase", r).create(e, {
|
|
@@ -1845,7 +1845,7 @@ function nt(n, e, t) {
|
|
|
1845
1845
|
function C(n) {
|
|
1846
1846
|
return nt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function si(n, e, t) {
|
|
1849
1849
|
const r = t;
|
|
1850
1850
|
if (!(e instanceof r))
|
|
1851
1851
|
throw r.name !== e.constructor.name && y(
|
|
@@ -1891,7 +1891,7 @@ function P(n, e) {
|
|
|
1891
1891
|
function Ye() {
|
|
1892
1892
|
return typeof self < "u" && self.location?.href || "";
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1894
|
+
function ii() {
|
|
1895
1895
|
return At() === "http:" || At() === "https:";
|
|
1896
1896
|
}
|
|
1897
1897
|
function At() {
|
|
@@ -1913,15 +1913,15 @@ function At() {
|
|
|
1913
1913
|
* See the License for the specific language governing permissions and
|
|
1914
1914
|
* limitations under the License.
|
|
1915
1915
|
*/
|
|
1916
|
-
function
|
|
1916
|
+
function oi() {
|
|
1917
1917
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
1918
1918
|
// This is especially true for Cordova apps which have unreliable
|
|
1919
1919
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
1920
1920
|
// installed which overwrites the native navigator.onLine value and
|
|
1921
1921
|
// defines navigator.connection.
|
|
1922
|
-
(
|
|
1922
|
+
(ii() || Dr() || "connection" in navigator) ? navigator.onLine : !0;
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function ai() {
|
|
1925
1925
|
if (typeof navigator > "u")
|
|
1926
1926
|
return null;
|
|
1927
1927
|
const n = navigator;
|
|
@@ -1951,10 +1951,10 @@ function oi() {
|
|
|
1951
1951
|
*/
|
|
1952
1952
|
class pe {
|
|
1953
1953
|
constructor(e, t) {
|
|
1954
|
-
this.shortDelay = e, this.longDelay = t, P(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
1954
|
+
this.shortDelay = e, this.longDelay = t, P(t > e, "Short delay should be less than long delay!"), this.isMobile = Or() || Lr();
|
|
1955
1955
|
}
|
|
1956
1956
|
get() {
|
|
1957
|
-
return
|
|
1957
|
+
return oi() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
1960
1960
|
/**
|
|
@@ -2048,7 +2048,7 @@ class yn {
|
|
|
2048
2048
|
* See the License for the specific language governing permissions and
|
|
2049
2049
|
* limitations under the License.
|
|
2050
2050
|
*/
|
|
2051
|
-
const
|
|
2051
|
+
const ci = {
|
|
2052
2052
|
// Custom token errors.
|
|
2053
2053
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
2054
2054
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -2139,7 +2139,7 @@ const ai = {
|
|
|
2139
2139
|
* See the License for the specific language governing permissions and
|
|
2140
2140
|
* limitations under the License.
|
|
2141
2141
|
*/
|
|
2142
|
-
const
|
|
2142
|
+
const li = [
|
|
2143
2143
|
"/v1/accounts:signInWithCustomToken",
|
|
2144
2144
|
"/v1/accounts:signInWithEmailLink",
|
|
2145
2145
|
"/v1/accounts:signInWithIdp",
|
|
@@ -2147,7 +2147,7 @@ const ci = [
|
|
|
2147
2147
|
"/v1/accounts:signInWithPhoneNumber",
|
|
2148
2148
|
"/v1/token"
|
|
2149
2149
|
/* Endpoint.TOKEN */
|
|
2150
|
-
],
|
|
2150
|
+
], ui = new pe(3e4, 6e4);
|
|
2151
2151
|
function B(n, e) {
|
|
2152
2152
|
return n.tenantId && !e.tenantId ? {
|
|
2153
2153
|
...e,
|
|
@@ -2176,14 +2176,14 @@ async function j(n, e, t, r, s = {}) {
|
|
|
2176
2176
|
headers: c,
|
|
2177
2177
|
...i
|
|
2178
2178
|
};
|
|
2179
|
-
return
|
|
2179
|
+
return Nr() || (l.referrerPolicy = "no-referrer"), n.emulatorConfig && De(n.emulatorConfig.host) && (l.credentials = "include"), yn.fetch()(await vn(n, n.config.apiHost, t, a), l);
|
|
2180
2180
|
});
|
|
2181
2181
|
}
|
|
2182
2182
|
async function En(n, e, t) {
|
|
2183
2183
|
n._canInitEmulator = !1;
|
|
2184
|
-
const r = { ...
|
|
2184
|
+
const r = { ...ci, ...e };
|
|
2185
2185
|
try {
|
|
2186
|
-
const s = new
|
|
2186
|
+
const s = new hi(n), i = await Promise.race([
|
|
2187
2187
|
t(),
|
|
2188
2188
|
s.promise
|
|
2189
2189
|
]);
|
|
@@ -2220,9 +2220,9 @@ async function me(n, e, t, r, s = {}) {
|
|
|
2220
2220
|
}
|
|
2221
2221
|
async function vn(n, e, t, r) {
|
|
2222
2222
|
const s = `${e}${t}?${r}`, i = n, o = i.config.emulator ? st(n.config, s) : `${n.config.apiScheme}://${s}`;
|
|
2223
|
-
return
|
|
2223
|
+
return li.includes(t) && (await i._persistenceManagerAvailable, i._getPersistenceType() === "COOKIE") ? i._getPersistence()._getFinalTarget(o).toString() : o;
|
|
2224
2224
|
}
|
|
2225
|
-
function
|
|
2225
|
+
function di(n) {
|
|
2226
2226
|
switch (n) {
|
|
2227
2227
|
case "ENFORCE":
|
|
2228
2228
|
return "ENFORCE";
|
|
@@ -2234,7 +2234,7 @@ function ui(n) {
|
|
|
2234
2234
|
return "ENFORCEMENT_STATE_UNSPECIFIED";
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
|
-
class
|
|
2237
|
+
class hi {
|
|
2238
2238
|
clearNetworkTimeout() {
|
|
2239
2239
|
clearTimeout(this.timer);
|
|
2240
2240
|
}
|
|
@@ -2244,7 +2244,7 @@ class di {
|
|
|
2244
2244
|
this.auth,
|
|
2245
2245
|
"network-request-failed"
|
|
2246
2246
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
2247
|
-
)),
|
|
2247
|
+
)), ui.get());
|
|
2248
2248
|
});
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
@@ -2259,7 +2259,7 @@ function Ie(n, e, t) {
|
|
|
2259
2259
|
function Pt(n) {
|
|
2260
2260
|
return n !== void 0 && n.enterprise !== void 0;
|
|
2261
2261
|
}
|
|
2262
|
-
class
|
|
2262
|
+
class fi {
|
|
2263
2263
|
constructor(e) {
|
|
2264
2264
|
if (this.siteKey = "", this.recaptchaEnforcementState = [], e.recaptchaKey === void 0)
|
|
2265
2265
|
throw new Error("recaptchaKey undefined");
|
|
@@ -2276,7 +2276,7 @@ class hi {
|
|
|
2276
2276
|
return null;
|
|
2277
2277
|
for (const t of this.recaptchaEnforcementState)
|
|
2278
2278
|
if (t.provider && t.provider === e)
|
|
2279
|
-
return
|
|
2279
|
+
return di(t.enforcementState);
|
|
2280
2280
|
return null;
|
|
2281
2281
|
}
|
|
2282
2282
|
/**
|
|
@@ -2304,7 +2304,7 @@ class hi {
|
|
|
2304
2304
|
);
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
async function
|
|
2307
|
+
async function pi(n, e) {
|
|
2308
2308
|
return j(n, "GET", "/v2/recaptchaConfig", B(n, e));
|
|
2309
2309
|
}
|
|
2310
2310
|
/**
|
|
@@ -2323,7 +2323,7 @@ async function fi(n, e) {
|
|
|
2323
2323
|
* See the License for the specific language governing permissions and
|
|
2324
2324
|
* limitations under the License.
|
|
2325
2325
|
*/
|
|
2326
|
-
async function
|
|
2326
|
+
async function mi(n, e) {
|
|
2327
2327
|
return j(n, "POST", "/v1/accounts:delete", e);
|
|
2328
2328
|
}
|
|
2329
2329
|
async function Pe(n, e) {
|
|
@@ -2354,7 +2354,7 @@ function oe(n) {
|
|
|
2354
2354
|
} catch {
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
|
-
async function
|
|
2357
|
+
async function gi(n, e = !1) {
|
|
2358
2358
|
const t = F(n), r = await t.getIdToken(e), s = it(r);
|
|
2359
2359
|
h(
|
|
2360
2360
|
s && s.exp && s.auth_time && s.iat,
|
|
@@ -2425,10 +2425,10 @@ async function le(n, e, t = !1) {
|
|
|
2425
2425
|
try {
|
|
2426
2426
|
return await e;
|
|
2427
2427
|
} catch (r) {
|
|
2428
|
-
throw r instanceof U &&
|
|
2428
|
+
throw r instanceof U && _i(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
|
-
function
|
|
2431
|
+
function _i({ code: n }) {
|
|
2432
2432
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
2433
2433
|
}
|
|
2434
2434
|
/**
|
|
@@ -2447,7 +2447,7 @@ function gi({ code: n }) {
|
|
|
2447
2447
|
* See the License for the specific language governing permissions and
|
|
2448
2448
|
* limitations under the License.
|
|
2449
2449
|
*/
|
|
2450
|
-
class
|
|
2450
|
+
class Ii {
|
|
2451
2451
|
constructor(e) {
|
|
2452
2452
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
2453
2453
|
}
|
|
@@ -2551,7 +2551,7 @@ async function ke(n) {
|
|
|
2551
2551
|
);
|
|
2552
2552
|
const s = r.users[0];
|
|
2553
2553
|
n._notifyReloadListener(s);
|
|
2554
|
-
const i = s.providerUserInfo?.length ? bn(s.providerUserInfo) : [], o =
|
|
2554
|
+
const i = s.providerUserInfo?.length ? bn(s.providerUserInfo) : [], o = yi(n.providerData, i), a = n.isAnonymous, c = !(n.email && s.passwordHash) && !o?.length, l = a ? c : !1, f = {
|
|
2555
2555
|
uid: s.localId,
|
|
2556
2556
|
displayName: s.displayName || null,
|
|
2557
2557
|
photoURL: s.photoUrl || null,
|
|
@@ -2565,11 +2565,11 @@ async function ke(n) {
|
|
|
2565
2565
|
};
|
|
2566
2566
|
Object.assign(n, f);
|
|
2567
2567
|
}
|
|
2568
|
-
async function
|
|
2568
|
+
async function wi(n) {
|
|
2569
2569
|
const e = F(n);
|
|
2570
2570
|
await ke(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function yi(n, e) {
|
|
2573
2573
|
return [...n.filter((r) => !e.some((s) => s.providerId === r.providerId)), ...e];
|
|
2574
2574
|
}
|
|
2575
2575
|
function bn(n) {
|
|
@@ -2598,7 +2598,7 @@ function bn(n) {
|
|
|
2598
2598
|
* See the License for the specific language governing permissions and
|
|
2599
2599
|
* limitations under the License.
|
|
2600
2600
|
*/
|
|
2601
|
-
async function
|
|
2601
|
+
async function Ei(n, e) {
|
|
2602
2602
|
const t = await En(n, {}, async () => {
|
|
2603
2603
|
const r = he({
|
|
2604
2604
|
grant_type: "refresh_token",
|
|
@@ -2621,7 +2621,7 @@ async function yi(n, e) {
|
|
|
2621
2621
|
refreshToken: t.refresh_token
|
|
2622
2622
|
};
|
|
2623
2623
|
}
|
|
2624
|
-
async function
|
|
2624
|
+
async function vi(n, e) {
|
|
2625
2625
|
return j(n, "POST", "/v2/accounts:revokeToken", B(n, e));
|
|
2626
2626
|
}
|
|
2627
2627
|
/**
|
|
@@ -2685,7 +2685,7 @@ class J {
|
|
|
2685
2685
|
this.refreshToken = null;
|
|
2686
2686
|
}
|
|
2687
2687
|
async refresh(e, t) {
|
|
2688
|
-
const { accessToken: r, refreshToken: s, expiresIn: i } = await
|
|
2688
|
+
const { accessToken: r, refreshToken: s, expiresIn: i } = await Ei(e, t);
|
|
2689
2689
|
this.updateTokensAndExpiration(r, s, Number(i));
|
|
2690
2690
|
}
|
|
2691
2691
|
updateTokensAndExpiration(e, t, r) {
|
|
@@ -2739,7 +2739,7 @@ function R(n, e) {
|
|
|
2739
2739
|
}
|
|
2740
2740
|
class E {
|
|
2741
2741
|
constructor({ uid: e, auth: t, stsTokenManager: r, ...s }) {
|
|
2742
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
2742
|
+
this.providerId = "firebase", this.proactiveRefresh = new Ii(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = e, this.auth = t, this.stsTokenManager = r, this.accessToken = r.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 Xe(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
2743
2743
|
}
|
|
2744
2744
|
async getIdToken(e) {
|
|
2745
2745
|
const t = await le(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -2751,10 +2751,10 @@ class E {
|
|
|
2751
2751
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
2752
2752
|
}
|
|
2753
2753
|
getIdTokenResult(e) {
|
|
2754
|
-
return
|
|
2754
|
+
return gi(this, e);
|
|
2755
2755
|
}
|
|
2756
2756
|
reload() {
|
|
2757
|
-
return
|
|
2757
|
+
return wi(this);
|
|
2758
2758
|
}
|
|
2759
2759
|
_assign(e) {
|
|
2760
2760
|
this !== e && (h(
|
|
@@ -2797,7 +2797,7 @@ class E {
|
|
|
2797
2797
|
if (w(this.auth.app))
|
|
2798
2798
|
return Promise.reject(C(this.auth));
|
|
2799
2799
|
const e = await this.getIdToken();
|
|
2800
|
-
return await le(this,
|
|
2800
|
+
return await le(this, mi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
2801
2801
|
}
|
|
2802
2802
|
toJSON() {
|
|
2803
2803
|
return {
|
|
@@ -2826,7 +2826,7 @@ class E {
|
|
|
2826
2826
|
return this.stsTokenManager.refreshToken || "";
|
|
2827
2827
|
}
|
|
2828
2828
|
static _fromJSON(e, t) {
|
|
2829
|
-
const r = t.displayName ?? void 0, s = t.email ?? void 0, i = t.phoneNumber ?? void 0, o = t.photoURL ?? void 0, a = t.tenantId ?? void 0, c = t._redirectEventId ?? void 0, l = t.createdAt ?? void 0, f = t.lastLoginAt ?? void 0, { uid: p, emailVerified:
|
|
2829
|
+
const r = t.displayName ?? void 0, s = t.email ?? void 0, i = t.phoneNumber ?? void 0, o = t.photoURL ?? void 0, a = t.tenantId ?? void 0, c = t._redirectEventId ?? void 0, l = t.createdAt ?? void 0, f = t.lastLoginAt ?? void 0, { uid: p, emailVerified: u, isAnonymous: g, providerData: I, stsTokenManager: ne } = t;
|
|
2830
2830
|
h(
|
|
2831
2831
|
p && ne,
|
|
2832
2832
|
e,
|
|
@@ -2840,7 +2840,7 @@ class E {
|
|
|
2840
2840
|
"internal-error"
|
|
2841
2841
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
2842
2842
|
), R(r, e.name), R(s, e.name), h(
|
|
2843
|
-
typeof
|
|
2843
|
+
typeof u == "boolean",
|
|
2844
2844
|
e,
|
|
2845
2845
|
"internal-error"
|
|
2846
2846
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -2854,7 +2854,7 @@ class E {
|
|
|
2854
2854
|
uid: p,
|
|
2855
2855
|
auth: e,
|
|
2856
2856
|
email: s,
|
|
2857
|
-
emailVerified:
|
|
2857
|
+
emailVerified: u,
|
|
2858
2858
|
displayName: r,
|
|
2859
2859
|
isAnonymous: g,
|
|
2860
2860
|
photoURL: o,
|
|
@@ -3049,13 +3049,13 @@ class Y {
|
|
|
3049
3049
|
if (f) {
|
|
3050
3050
|
let p;
|
|
3051
3051
|
if (typeof f == "string") {
|
|
3052
|
-
const
|
|
3052
|
+
const u = await Pe(e, {
|
|
3053
3053
|
idToken: f
|
|
3054
3054
|
}).catch(() => {
|
|
3055
3055
|
});
|
|
3056
|
-
if (!
|
|
3056
|
+
if (!u)
|
|
3057
3057
|
break;
|
|
3058
|
-
p = await E._fromGetAccountInfoResponse(e,
|
|
3058
|
+
p = await E._fromGetAccountInfoResponse(e, u, f);
|
|
3059
3059
|
} else
|
|
3060
3060
|
p = E._fromJSON(e, f);
|
|
3061
3061
|
l !== i && (a = p), i = l;
|
|
@@ -3145,11 +3145,11 @@ function On(n = _()) {
|
|
|
3145
3145
|
function ot(n = _()) {
|
|
3146
3146
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
3147
3147
|
}
|
|
3148
|
-
function
|
|
3148
|
+
function bi(n = _()) {
|
|
3149
3149
|
return ot(n) && !!window.navigator?.standalone;
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3152
|
-
return
|
|
3151
|
+
function Ti() {
|
|
3152
|
+
return Mr() && document.documentMode === 10;
|
|
3153
3153
|
}
|
|
3154
3154
|
function Nn(n = _()) {
|
|
3155
3155
|
return ot(n) || kn(n) || On(n) || Rn(n) || /windows phone/i.test(n) || Pn(n);
|
|
@@ -3201,7 +3201,7 @@ function Dn(n, e = []) {
|
|
|
3201
3201
|
* See the License for the specific language governing permissions and
|
|
3202
3202
|
* limitations under the License.
|
|
3203
3203
|
*/
|
|
3204
|
-
class
|
|
3204
|
+
class Si {
|
|
3205
3205
|
constructor(e) {
|
|
3206
3206
|
this.auth = e, this.queue = [];
|
|
3207
3207
|
}
|
|
@@ -3256,7 +3256,7 @@ class Ti {
|
|
|
3256
3256
|
* See the License for the specific language governing permissions and
|
|
3257
3257
|
* limitations under the License.
|
|
3258
3258
|
*/
|
|
3259
|
-
async function
|
|
3259
|
+
async function Ci(n, e = {}) {
|
|
3260
3260
|
return j(n, "GET", "/v2/passwordPolicy", B(n, e));
|
|
3261
3261
|
}
|
|
3262
3262
|
/**
|
|
@@ -3275,11 +3275,11 @@ async function Si(n, e = {}) {
|
|
|
3275
3275
|
* See the License for the specific language governing permissions and
|
|
3276
3276
|
* limitations under the License.
|
|
3277
3277
|
*/
|
|
3278
|
-
const
|
|
3279
|
-
class
|
|
3278
|
+
const Ai = 6;
|
|
3279
|
+
class Pi {
|
|
3280
3280
|
constructor(e) {
|
|
3281
3281
|
const t = e.customStrengthOptions;
|
|
3282
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = t.minPasswordLength ??
|
|
3282
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = t.minPasswordLength ?? Ai, t.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = t.maxPasswordLength), t.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = t.containsLowercaseCharacter), t.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = t.containsUppercaseCharacter), t.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = t.containsNumericCharacter), t.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = t.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = e.allowedNonAlphanumericCharacters?.join("") ?? "", this.forceUpgradeOnSignin = e.forceUpgradeOnSignin ?? !1, this.schemaVersion = e.schemaVersion;
|
|
3283
3283
|
}
|
|
3284
3284
|
validatePassword(e) {
|
|
3285
3285
|
const t = {
|
|
@@ -3361,9 +3361,9 @@ class Ai {
|
|
|
3361
3361
|
* See the License for the specific language governing permissions and
|
|
3362
3362
|
* limitations under the License.
|
|
3363
3363
|
*/
|
|
3364
|
-
class
|
|
3364
|
+
class ki {
|
|
3365
3365
|
constructor(e, t, r, s) {
|
|
3366
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = s, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Dt(this), this.idTokenSubscription = new Dt(this), this.beforeStateQueue = new
|
|
3366
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = s, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Dt(this), this.idTokenSubscription = new Dt(this), this.beforeStateQueue = new Si(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 = wn, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this._resolvePersistenceManagerAvailable = void 0, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = s.sdkClientVersion, this._persistenceManagerAvailable = new Promise((i) => this._resolvePersistenceManagerAvailable = i);
|
|
3367
3367
|
}
|
|
3368
3368
|
_initializeWithPersistence(e, t) {
|
|
3369
3369
|
return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -3455,7 +3455,7 @@ class Pi {
|
|
|
3455
3455
|
return this.directlySetCurrentUser(e);
|
|
3456
3456
|
}
|
|
3457
3457
|
useDeviceLanguage() {
|
|
3458
|
-
this.languageCode =
|
|
3458
|
+
this.languageCode = ai();
|
|
3459
3459
|
}
|
|
3460
3460
|
async _delete() {
|
|
3461
3461
|
this._deleted = !0;
|
|
@@ -3506,7 +3506,7 @@ class Pi {
|
|
|
3506
3506
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
3507
3507
|
}
|
|
3508
3508
|
async _updatePasswordPolicy() {
|
|
3509
|
-
const e = await
|
|
3509
|
+
const e = await Ci(this), t = new Pi(e);
|
|
3510
3510
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
3511
3511
|
}
|
|
3512
3512
|
_getPersistenceType() {
|
|
@@ -3549,7 +3549,7 @@ class Pi {
|
|
|
3549
3549
|
token: e,
|
|
3550
3550
|
idToken: t
|
|
3551
3551
|
};
|
|
3552
|
-
this.tenantId != null && (r.tenantId = this.tenantId), await
|
|
3552
|
+
this.tenantId != null && (r.tenantId = this.tenantId), await vi(this, r);
|
|
3553
3553
|
}
|
|
3554
3554
|
}
|
|
3555
3555
|
toJSON() {
|
|
@@ -3689,7 +3689,7 @@ class Pi {
|
|
|
3689
3689
|
if (w(this.app) && this.app.settings.appCheckToken)
|
|
3690
3690
|
return this.app.settings.appCheckToken;
|
|
3691
3691
|
const e = await this.appCheckServiceProvider.getImmediate({ optional: !0 })?.getToken();
|
|
3692
|
-
return e?.error &&
|
|
3692
|
+
return e?.error && ri(`Error while retrieving App Check token: ${e.error}`), e?.token;
|
|
3693
3693
|
}
|
|
3694
3694
|
}
|
|
3695
3695
|
function H(n) {
|
|
@@ -3697,7 +3697,7 @@ function H(n) {
|
|
|
3697
3697
|
}
|
|
3698
3698
|
class Dt {
|
|
3699
3699
|
constructor(e) {
|
|
3700
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
3700
|
+
this.auth = e, this.observer = null, this.addObserver = Vr((t) => this.observer = t);
|
|
3701
3701
|
}
|
|
3702
3702
|
get next() {
|
|
3703
3703
|
return h(
|
|
@@ -3732,24 +3732,24 @@ let Le = {
|
|
|
3732
3732
|
recaptchaEnterpriseScript: "",
|
|
3733
3733
|
gapiScript: ""
|
|
3734
3734
|
};
|
|
3735
|
-
function
|
|
3735
|
+
function Ri(n) {
|
|
3736
3736
|
Le = n;
|
|
3737
3737
|
}
|
|
3738
3738
|
function Ln(n) {
|
|
3739
3739
|
return Le.loadJS(n);
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3741
|
+
function Oi() {
|
|
3742
3742
|
return Le.recaptchaEnterpriseScript;
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3744
|
+
function Ni() {
|
|
3745
3745
|
return Le.gapiScript;
|
|
3746
3746
|
}
|
|
3747
|
-
function
|
|
3747
|
+
function Di(n) {
|
|
3748
3748
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
3749
3749
|
}
|
|
3750
|
-
class
|
|
3750
|
+
class Li {
|
|
3751
3751
|
constructor() {
|
|
3752
|
-
this.enterprise = new
|
|
3752
|
+
this.enterprise = new Mi();
|
|
3753
3753
|
}
|
|
3754
3754
|
ready(e) {
|
|
3755
3755
|
e();
|
|
@@ -3761,7 +3761,7 @@ class Di {
|
|
|
3761
3761
|
return "";
|
|
3762
3762
|
}
|
|
3763
3763
|
}
|
|
3764
|
-
class
|
|
3764
|
+
class Mi {
|
|
3765
3765
|
ready(e) {
|
|
3766
3766
|
e();
|
|
3767
3767
|
}
|
|
@@ -3772,15 +3772,15 @@ class Li {
|
|
|
3772
3772
|
return "";
|
|
3773
3773
|
}
|
|
3774
3774
|
}
|
|
3775
|
-
const
|
|
3776
|
-
class
|
|
3775
|
+
const xi = "recaptcha-enterprise", Mn = "NO_RECAPTCHA";
|
|
3776
|
+
class Ui {
|
|
3777
3777
|
/**
|
|
3778
3778
|
*
|
|
3779
3779
|
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
3780
3780
|
*
|
|
3781
3781
|
*/
|
|
3782
3782
|
constructor(e) {
|
|
3783
|
-
this.type =
|
|
3783
|
+
this.type = xi, this.auth = H(e);
|
|
3784
3784
|
}
|
|
3785
3785
|
/**
|
|
3786
3786
|
* Executes the verification process.
|
|
@@ -3796,7 +3796,7 @@ class xi {
|
|
|
3796
3796
|
return i._tenantRecaptchaConfigs[i.tenantId].siteKey;
|
|
3797
3797
|
}
|
|
3798
3798
|
return new Promise(async (o, a) => {
|
|
3799
|
-
|
|
3799
|
+
pi(i, {
|
|
3800
3800
|
clientType: "CLIENT_TYPE_WEB",
|
|
3801
3801
|
version: "RECAPTCHA_ENTERPRISE"
|
|
3802
3802
|
/* RecaptchaVersion.ENTERPRISE */
|
|
@@ -3804,7 +3804,7 @@ class xi {
|
|
|
3804
3804
|
if (c.recaptchaKey === void 0)
|
|
3805
3805
|
a(new Error("recaptcha Enterprise site key undefined"));
|
|
3806
3806
|
else {
|
|
3807
|
-
const l = new
|
|
3807
|
+
const l = new fi(c);
|
|
3808
3808
|
return i.tenantId == null ? i._agentRecaptchaConfig = l : i._tenantRecaptchaConfigs[i.tenantId] = l, o(l.siteKey);
|
|
3809
3809
|
}
|
|
3810
3810
|
}).catch((c) => {
|
|
@@ -3822,7 +3822,7 @@ class xi {
|
|
|
3822
3822
|
});
|
|
3823
3823
|
}) : a(Error("No reCAPTCHA enterprise script loaded."));
|
|
3824
3824
|
}
|
|
3825
|
-
return this.auth.settings.appVerificationDisabledForTesting ? new
|
|
3825
|
+
return this.auth.settings.appVerificationDisabledForTesting ? new Li().execute("siteKey", { action: "verify" }) : new Promise((i, o) => {
|
|
3826
3826
|
r(this.auth).then((a) => {
|
|
3827
3827
|
if (!t && Pt(window.grecaptcha))
|
|
3828
3828
|
s(a, i, o);
|
|
@@ -3831,7 +3831,7 @@ class xi {
|
|
|
3831
3831
|
o(new Error("RecaptchaVerifier is only supported in browser"));
|
|
3832
3832
|
return;
|
|
3833
3833
|
}
|
|
3834
|
-
let c =
|
|
3834
|
+
let c = Oi();
|
|
3835
3835
|
c.length !== 0 && (c += a), Ln(c).then(() => {
|
|
3836
3836
|
s(a, i, o);
|
|
3837
3837
|
}).catch((l) => {
|
|
@@ -3845,7 +3845,7 @@ class xi {
|
|
|
3845
3845
|
}
|
|
3846
3846
|
}
|
|
3847
3847
|
async function Lt(n, e, t, r = !1, s = !1) {
|
|
3848
|
-
const i = new
|
|
3848
|
+
const i = new Ui(n);
|
|
3849
3849
|
let o;
|
|
3850
3850
|
if (s)
|
|
3851
3851
|
o = Mn;
|
|
@@ -3936,7 +3936,7 @@ async function Ze(n, e, t, r, s) {
|
|
|
3936
3936
|
* See the License for the specific language governing permissions and
|
|
3937
3937
|
* limitations under the License.
|
|
3938
3938
|
*/
|
|
3939
|
-
function
|
|
3939
|
+
function Fi(n, e) {
|
|
3940
3940
|
const t = pn(n, "auth");
|
|
3941
3941
|
if (t.isInitialized()) {
|
|
3942
3942
|
const s = t.getImmediate(), i = t.getOptions();
|
|
@@ -3950,11 +3950,11 @@ function Ui(n, e) {
|
|
|
3950
3950
|
}
|
|
3951
3951
|
return t.initialize({ options: e });
|
|
3952
3952
|
}
|
|
3953
|
-
function
|
|
3953
|
+
function Bi(n, e) {
|
|
3954
3954
|
const t = e?.persistence || [], r = (Array.isArray(t) ? t : [t]).map(S);
|
|
3955
3955
|
e?.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e?.popupRedirectResolver);
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function ji(n, e, t) {
|
|
3958
3958
|
const r = H(n);
|
|
3959
3959
|
h(
|
|
3960
3960
|
/^https?:\/\//.test(e),
|
|
@@ -3962,7 +3962,7 @@ function Bi(n, e, t) {
|
|
|
3962
3962
|
"invalid-emulator-scheme"
|
|
3963
3963
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
3964
3964
|
);
|
|
3965
|
-
const s = !1, i = xn(e), { host: o, port: a } =
|
|
3965
|
+
const s = !1, i = xn(e), { host: o, port: a } = Hi(e), c = a === null ? "" : `:${a}`, l = { url: `${i}//${o}${c}/` }, f = Object.freeze({
|
|
3966
3966
|
host: o,
|
|
3967
3967
|
port: a,
|
|
3968
3968
|
protocol: i.replace(":", ""),
|
|
@@ -3982,13 +3982,13 @@ function Bi(n, e, t) {
|
|
|
3982
3982
|
);
|
|
3983
3983
|
return;
|
|
3984
3984
|
}
|
|
3985
|
-
r.config.emulator = l, r.emulatorConfig = f, r.settings.appVerificationDisabledForTesting = !0, De(o) ? (
|
|
3985
|
+
r.config.emulator = l, r.emulatorConfig = f, r.settings.appVerificationDisabledForTesting = !0, De(o) ? (Ar(`${i}//${o}${c}`), Rr("Auth", !0)) : Vi();
|
|
3986
3986
|
}
|
|
3987
3987
|
function xn(n) {
|
|
3988
3988
|
const e = n.indexOf(":");
|
|
3989
3989
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
3990
3990
|
}
|
|
3991
|
-
function
|
|
3991
|
+
function Hi(n) {
|
|
3992
3992
|
const e = xn(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
3993
3993
|
if (!t)
|
|
3994
3994
|
return { host: "", port: null };
|
|
@@ -4007,7 +4007,7 @@ function Mt(n) {
|
|
|
4007
4007
|
const e = Number(n);
|
|
4008
4008
|
return isNaN(e) ? null : e;
|
|
4009
4009
|
}
|
|
4010
|
-
function
|
|
4010
|
+
function Vi() {
|
|
4011
4011
|
function n() {
|
|
4012
4012
|
const e = document.createElement("p"), t = e.style;
|
|
4013
4013
|
e.innerText = "Running in emulator mode. Do not use with production credentials.", t.position = "fixed", t.width = "100%", t.backgroundColor = "#ffffff", t.border = ".1em solid #000000", t.color = "#b50000", t.bottom = "0px", t.left = "0px", t.margin = "0px", t.zIndex = "10000", t.textAlign = "center", e.classList.add("firebase-emulator-warning"), document.body.appendChild(e);
|
|
@@ -4056,7 +4056,7 @@ class at {
|
|
|
4056
4056
|
return T("not implemented");
|
|
4057
4057
|
}
|
|
4058
4058
|
}
|
|
4059
|
-
async function
|
|
4059
|
+
async function $i(n, e) {
|
|
4060
4060
|
return j(n, "POST", "/v1/accounts:signUp", e);
|
|
4061
4061
|
}
|
|
4062
4062
|
/**
|
|
@@ -4075,7 +4075,7 @@ async function Vi(n, e) {
|
|
|
4075
4075
|
* See the License for the specific language governing permissions and
|
|
4076
4076
|
* limitations under the License.
|
|
4077
4077
|
*/
|
|
4078
|
-
async function
|
|
4078
|
+
async function Wi(n, e) {
|
|
4079
4079
|
return me(n, "POST", "/v1/accounts:signInWithPassword", B(n, e));
|
|
4080
4080
|
}
|
|
4081
4081
|
/**
|
|
@@ -4094,10 +4094,10 @@ async function $i(n, e) {
|
|
|
4094
4094
|
* See the License for the specific language governing permissions and
|
|
4095
4095
|
* limitations under the License.
|
|
4096
4096
|
*/
|
|
4097
|
-
async function
|
|
4097
|
+
async function zi(n, e) {
|
|
4098
4098
|
return me(n, "POST", "/v1/accounts:signInWithEmailLink", B(n, e));
|
|
4099
4099
|
}
|
|
4100
|
-
async function
|
|
4100
|
+
async function Gi(n, e) {
|
|
4101
4101
|
return me(n, "POST", "/v1/accounts:signInWithEmailLink", B(n, e));
|
|
4102
4102
|
}
|
|
4103
4103
|
/**
|
|
@@ -4172,9 +4172,9 @@ class ue extends at {
|
|
|
4172
4172
|
clientType: "CLIENT_TYPE_WEB"
|
|
4173
4173
|
/* RecaptchaClientType.WEB */
|
|
4174
4174
|
};
|
|
4175
|
-
return Ze(e, t, "signInWithPassword",
|
|
4175
|
+
return Ze(e, t, "signInWithPassword", Wi);
|
|
4176
4176
|
case "emailLink":
|
|
4177
|
-
return
|
|
4177
|
+
return zi(e, {
|
|
4178
4178
|
email: this._email,
|
|
4179
4179
|
oobCode: this._password
|
|
4180
4180
|
});
|
|
@@ -4198,9 +4198,9 @@ class ue extends at {
|
|
|
4198
4198
|
clientType: "CLIENT_TYPE_WEB"
|
|
4199
4199
|
/* RecaptchaClientType.WEB */
|
|
4200
4200
|
};
|
|
4201
|
-
return Ze(e, r, "signUpPassword",
|
|
4201
|
+
return Ze(e, r, "signUpPassword", $i);
|
|
4202
4202
|
case "emailLink":
|
|
4203
|
-
return
|
|
4203
|
+
return Gi(e, {
|
|
4204
4204
|
idToken: t,
|
|
4205
4205
|
email: this._email,
|
|
4206
4206
|
oobCode: this._password
|
|
@@ -4253,7 +4253,7 @@ async function X(n, e) {
|
|
|
4253
4253
|
* See the License for the specific language governing permissions and
|
|
4254
4254
|
* limitations under the License.
|
|
4255
4255
|
*/
|
|
4256
|
-
const
|
|
4256
|
+
const Ki = "http://localhost";
|
|
4257
4257
|
class k extends at {
|
|
4258
4258
|
constructor() {
|
|
4259
4259
|
super(...arguments), this.pendingToken = null;
|
|
@@ -4311,7 +4311,7 @@ class k extends at {
|
|
|
4311
4311
|
}
|
|
4312
4312
|
buildRequest() {
|
|
4313
4313
|
const e = {
|
|
4314
|
-
requestUri:
|
|
4314
|
+
requestUri: Ki,
|
|
4315
4315
|
returnSecureToken: !0
|
|
4316
4316
|
};
|
|
4317
4317
|
if (this.pendingToken)
|
|
@@ -4339,7 +4339,7 @@ class k extends at {
|
|
|
4339
4339
|
* See the License for the specific language governing permissions and
|
|
4340
4340
|
* limitations under the License.
|
|
4341
4341
|
*/
|
|
4342
|
-
function
|
|
4342
|
+
function qi(n) {
|
|
4343
4343
|
switch (n) {
|
|
4344
4344
|
case "recoverEmail":
|
|
4345
4345
|
return "RECOVER_EMAIL";
|
|
@@ -4357,7 +4357,7 @@ function Ki(n) {
|
|
|
4357
4357
|
return null;
|
|
4358
4358
|
}
|
|
4359
4359
|
}
|
|
4360
|
-
function
|
|
4360
|
+
function Ji(n) {
|
|
4361
4361
|
const e = re(se(n)).link, t = e ? re(se(e)).deep_link_id : null, r = re(se(n)).deep_link_id;
|
|
4362
4362
|
return (r ? re(se(r)).link : null) || r || t || e || n;
|
|
4363
4363
|
}
|
|
@@ -4369,7 +4369,7 @@ class ct {
|
|
|
4369
4369
|
* @internal
|
|
4370
4370
|
*/
|
|
4371
4371
|
constructor(e) {
|
|
4372
|
-
const t = re(se(e)), r = t.apiKey ?? null, s = t.oobCode ?? null, i =
|
|
4372
|
+
const t = re(se(e)), r = t.apiKey ?? null, s = t.oobCode ?? null, i = qi(t.mode ?? null);
|
|
4373
4373
|
h(
|
|
4374
4374
|
r && s && i,
|
|
4375
4375
|
"argument-error"
|
|
@@ -4386,7 +4386,7 @@ class ct {
|
|
|
4386
4386
|
* @public
|
|
4387
4387
|
*/
|
|
4388
4388
|
static parseLink(e) {
|
|
4389
|
-
const t =
|
|
4389
|
+
const t = Ji(e);
|
|
4390
4390
|
try {
|
|
4391
4391
|
return new ct(t);
|
|
4392
4392
|
} catch {
|
|
@@ -4937,7 +4937,7 @@ L.PROVIDER_ID = "twitter.com";
|
|
|
4937
4937
|
* See the License for the specific language governing permissions and
|
|
4938
4938
|
* limitations under the License.
|
|
4939
4939
|
*/
|
|
4940
|
-
async function
|
|
4940
|
+
async function Yi(n, e) {
|
|
4941
4941
|
return me(n, "POST", "/v1/accounts:signUp", B(n, e));
|
|
4942
4942
|
}
|
|
4943
4943
|
/**
|
|
@@ -5021,7 +5021,7 @@ function Un(n, e, t, r) {
|
|
|
5021
5021
|
throw i.code === "auth/multi-factor-auth-required" ? Re._fromErrorAndOperation(n, i, e, r) : i;
|
|
5022
5022
|
});
|
|
5023
5023
|
}
|
|
5024
|
-
async function
|
|
5024
|
+
async function Xi(n, e, t = !1) {
|
|
5025
5025
|
const r = await le(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
5026
5026
|
return W._forOperation(n, "link", r);
|
|
5027
5027
|
}
|
|
@@ -5041,7 +5041,7 @@ async function Yi(n, e, t = !1) {
|
|
|
5041
5041
|
* See the License for the specific language governing permissions and
|
|
5042
5042
|
* limitations under the License.
|
|
5043
5043
|
*/
|
|
5044
|
-
async function
|
|
5044
|
+
async function Zi(n, e, t = !1) {
|
|
5045
5045
|
const { auth: r } = n;
|
|
5046
5046
|
if (w(r.app))
|
|
5047
5047
|
return Promise.reject(C(r));
|
|
@@ -5098,7 +5098,7 @@ async function Fn(n, e, t = !1) {
|
|
|
5098
5098
|
const r = "signIn", s = await Un(n, r, e), i = await W._fromIdTokenResponse(n, r, s);
|
|
5099
5099
|
return t || await n._updateCurrentUser(i.user), i;
|
|
5100
5100
|
}
|
|
5101
|
-
async function
|
|
5101
|
+
async function Qi(n, e) {
|
|
5102
5102
|
return Fn(H(n), e);
|
|
5103
5103
|
}
|
|
5104
5104
|
/**
|
|
@@ -5121,7 +5121,7 @@ async function Bn(n) {
|
|
|
5121
5121
|
const e = H(n);
|
|
5122
5122
|
e._getPasswordPolicyInternal() && await e._updatePasswordPolicy();
|
|
5123
5123
|
}
|
|
5124
|
-
async function
|
|
5124
|
+
async function eo(n, e, t) {
|
|
5125
5125
|
if (w(n.app))
|
|
5126
5126
|
return Promise.reject(C(n));
|
|
5127
5127
|
const r = H(n), o = await Ze(r, {
|
|
@@ -5130,23 +5130,23 @@ async function Qi(n, e, t) {
|
|
|
5130
5130
|
password: t,
|
|
5131
5131
|
clientType: "CLIENT_TYPE_WEB"
|
|
5132
5132
|
/* RecaptchaClientType.WEB */
|
|
5133
|
-
}, "signUpPassword",
|
|
5133
|
+
}, "signUpPassword", Yi).catch((c) => {
|
|
5134
5134
|
throw c.code === "auth/password-does-not-meet-requirements" && Bn(n), c;
|
|
5135
5135
|
}), a = await W._fromIdTokenResponse(r, "signIn", o);
|
|
5136
5136
|
return await r._updateCurrentUser(a.user), a;
|
|
5137
5137
|
}
|
|
5138
|
-
function
|
|
5139
|
-
return w(n.app) ? Promise.reject(C(n)) :
|
|
5138
|
+
function to(n, e, t) {
|
|
5139
|
+
return w(n.app) ? Promise.reject(C(n)) : Qi(F(n), ee.credential(e, t)).catch(async (r) => {
|
|
5140
5140
|
throw r.code === "auth/password-does-not-meet-requirements" && Bn(n), r;
|
|
5141
5141
|
});
|
|
5142
5142
|
}
|
|
5143
|
-
function
|
|
5143
|
+
function no(n, e, t, r) {
|
|
5144
5144
|
return F(n).onIdTokenChanged(e, t, r);
|
|
5145
5145
|
}
|
|
5146
|
-
function
|
|
5146
|
+
function ro(n, e, t) {
|
|
5147
5147
|
return F(n).beforeAuthStateChanged(e, t);
|
|
5148
5148
|
}
|
|
5149
|
-
function
|
|
5149
|
+
function so(n) {
|
|
5150
5150
|
return F(n).signOut();
|
|
5151
5151
|
}
|
|
5152
5152
|
const Oe = "__sak";
|
|
@@ -5207,7 +5207,7 @@ class jn {
|
|
|
5207
5207
|
* See the License for the specific language governing permissions and
|
|
5208
5208
|
* limitations under the License.
|
|
5209
5209
|
*/
|
|
5210
|
-
const
|
|
5210
|
+
const io = 1e3, oo = 10;
|
|
5211
5211
|
class Hn extends jn {
|
|
5212
5212
|
constructor() {
|
|
5213
5213
|
super(
|
|
@@ -5235,7 +5235,7 @@ class Hn extends jn {
|
|
|
5235
5235
|
const o = this.storage.getItem(r);
|
|
5236
5236
|
!t && this.localCache[r] === o || this.notifyListeners(r, o);
|
|
5237
5237
|
}, i = this.storage.getItem(r);
|
|
5238
|
-
|
|
5238
|
+
Ti() && i !== e.newValue && e.newValue !== e.oldValue ? setTimeout(s, oo) : s();
|
|
5239
5239
|
}
|
|
5240
5240
|
notifyListeners(e, t) {
|
|
5241
5241
|
this.localCache[e] = t;
|
|
@@ -5257,7 +5257,7 @@ class Hn extends jn {
|
|
|
5257
5257
|
!0
|
|
5258
5258
|
);
|
|
5259
5259
|
});
|
|
5260
|
-
},
|
|
5260
|
+
}, io);
|
|
5261
5261
|
}
|
|
5262
5262
|
stopPolling() {
|
|
5263
5263
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -5287,7 +5287,7 @@ class Hn extends jn {
|
|
|
5287
5287
|
}
|
|
5288
5288
|
}
|
|
5289
5289
|
Hn.type = "LOCAL";
|
|
5290
|
-
const
|
|
5290
|
+
const ao = Hn;
|
|
5291
5291
|
/**
|
|
5292
5292
|
* @license
|
|
5293
5293
|
* Copyright 2020 Google LLC
|
|
@@ -5335,7 +5335,7 @@ const $n = Vn;
|
|
|
5335
5335
|
* See the License for the specific language governing permissions and
|
|
5336
5336
|
* limitations under the License.
|
|
5337
5337
|
*/
|
|
5338
|
-
function
|
|
5338
|
+
function co(n) {
|
|
5339
5339
|
return Promise.all(n.map(async (e) => {
|
|
5340
5340
|
try {
|
|
5341
5341
|
return {
|
|
@@ -5405,7 +5405,7 @@ class Me {
|
|
|
5405
5405
|
eventId: r,
|
|
5406
5406
|
eventType: s
|
|
5407
5407
|
});
|
|
5408
|
-
const a = Array.from(o).map(async (l) => l(t.origin, i)), c = await
|
|
5408
|
+
const a = Array.from(o).map(async (l) => l(t.origin, i)), c = await co(a);
|
|
5409
5409
|
t.ports[0].postMessage({
|
|
5410
5410
|
status: "done",
|
|
5411
5411
|
eventId: r,
|
|
@@ -5473,7 +5473,7 @@ function ut(n = "", e = 10) {
|
|
|
5473
5473
|
* See the License for the specific language governing permissions and
|
|
5474
5474
|
* limitations under the License.
|
|
5475
5475
|
*/
|
|
5476
|
-
class
|
|
5476
|
+
class lo {
|
|
5477
5477
|
constructor(e) {
|
|
5478
5478
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
5479
5479
|
}
|
|
@@ -5518,9 +5518,9 @@ class co {
|
|
|
5518
5518
|
o = {
|
|
5519
5519
|
messageChannel: s,
|
|
5520
5520
|
onMessage(p) {
|
|
5521
|
-
const
|
|
5522
|
-
if (
|
|
5523
|
-
switch (
|
|
5521
|
+
const u = p;
|
|
5522
|
+
if (u.data.eventId === l)
|
|
5523
|
+
switch (u.data.status) {
|
|
5524
5524
|
case "ack":
|
|
5525
5525
|
clearTimeout(f), i = setTimeout(
|
|
5526
5526
|
() => {
|
|
@@ -5534,7 +5534,7 @@ class co {
|
|
|
5534
5534
|
);
|
|
5535
5535
|
break;
|
|
5536
5536
|
case "done":
|
|
5537
|
-
clearTimeout(i), a(
|
|
5537
|
+
clearTimeout(i), a(u.data.response);
|
|
5538
5538
|
break;
|
|
5539
5539
|
default:
|
|
5540
5540
|
clearTimeout(f), clearTimeout(i), c(new Error(
|
|
@@ -5573,7 +5573,7 @@ class co {
|
|
|
5573
5573
|
function b() {
|
|
5574
5574
|
return window;
|
|
5575
5575
|
}
|
|
5576
|
-
function
|
|
5576
|
+
function uo(n) {
|
|
5577
5577
|
b().location.href = n;
|
|
5578
5578
|
}
|
|
5579
5579
|
/**
|
|
@@ -5595,7 +5595,7 @@ function lo(n) {
|
|
|
5595
5595
|
function Wn() {
|
|
5596
5596
|
return typeof b().WorkerGlobalScope < "u" && typeof b().importScripts == "function";
|
|
5597
5597
|
}
|
|
5598
|
-
async function
|
|
5598
|
+
async function ho() {
|
|
5599
5599
|
if (!navigator?.serviceWorker)
|
|
5600
5600
|
return null;
|
|
5601
5601
|
try {
|
|
@@ -5604,10 +5604,10 @@ async function uo() {
|
|
|
5604
5604
|
return null;
|
|
5605
5605
|
}
|
|
5606
5606
|
}
|
|
5607
|
-
function
|
|
5607
|
+
function fo() {
|
|
5608
5608
|
return navigator?.serviceWorker?.controller || null;
|
|
5609
5609
|
}
|
|
5610
|
-
function
|
|
5610
|
+
function po() {
|
|
5611
5611
|
return Wn() ? self : null;
|
|
5612
5612
|
}
|
|
5613
5613
|
/**
|
|
@@ -5626,7 +5626,7 @@ function fo() {
|
|
|
5626
5626
|
* See the License for the specific language governing permissions and
|
|
5627
5627
|
* limitations under the License.
|
|
5628
5628
|
*/
|
|
5629
|
-
const zn = "firebaseLocalStorageDb",
|
|
5629
|
+
const zn = "firebaseLocalStorageDb", mo = 1, Ne = "firebaseLocalStorage", Gn = "fbase_key";
|
|
5630
5630
|
class ge {
|
|
5631
5631
|
constructor(e) {
|
|
5632
5632
|
this.request = e;
|
|
@@ -5644,12 +5644,12 @@ class ge {
|
|
|
5644
5644
|
function xe(n, e) {
|
|
5645
5645
|
return n.transaction([Ne], e ? "readwrite" : "readonly").objectStore(Ne);
|
|
5646
5646
|
}
|
|
5647
|
-
function
|
|
5647
|
+
function go() {
|
|
5648
5648
|
const n = indexedDB.deleteDatabase(zn);
|
|
5649
5649
|
return new ge(n).toPromise();
|
|
5650
5650
|
}
|
|
5651
5651
|
function Qe() {
|
|
5652
|
-
const n = indexedDB.open(zn,
|
|
5652
|
+
const n = indexedDB.open(zn, mo);
|
|
5653
5653
|
return new Promise((e, t) => {
|
|
5654
5654
|
n.addEventListener("error", () => {
|
|
5655
5655
|
t(n.error);
|
|
@@ -5662,7 +5662,7 @@ function Qe() {
|
|
|
5662
5662
|
}
|
|
5663
5663
|
}), n.addEventListener("success", async () => {
|
|
5664
5664
|
const r = n.result;
|
|
5665
|
-
r.objectStoreNames.contains(Ne) ? e(r) : (r.close(), await
|
|
5665
|
+
r.objectStoreNames.contains(Ne) ? e(r) : (r.close(), await go(), e(await Qe()));
|
|
5666
5666
|
});
|
|
5667
5667
|
});
|
|
5668
5668
|
}
|
|
@@ -5673,7 +5673,7 @@ async function Ut(n, e, t) {
|
|
|
5673
5673
|
});
|
|
5674
5674
|
return new ge(r).toPromise();
|
|
5675
5675
|
}
|
|
5676
|
-
async function
|
|
5676
|
+
async function _o(n, e) {
|
|
5677
5677
|
const t = xe(n, !1).get(e), r = await new ge(t).toPromise();
|
|
5678
5678
|
return r === void 0 ? null : r.value;
|
|
5679
5679
|
}
|
|
@@ -5681,7 +5681,7 @@ function Ft(n, e) {
|
|
|
5681
5681
|
const t = xe(n, !0).delete(e);
|
|
5682
5682
|
return new ge(t).toPromise();
|
|
5683
5683
|
}
|
|
5684
|
-
const
|
|
5684
|
+
const Io = 800, wo = 3;
|
|
5685
5685
|
class Kn {
|
|
5686
5686
|
constructor() {
|
|
5687
5687
|
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(() => {
|
|
@@ -5698,7 +5698,7 @@ class Kn {
|
|
|
5698
5698
|
const r = await this._openDb();
|
|
5699
5699
|
return await e(r);
|
|
5700
5700
|
} catch (r) {
|
|
5701
|
-
if (t++ >
|
|
5701
|
+
if (t++ > wo)
|
|
5702
5702
|
throw r;
|
|
5703
5703
|
this.db && (this.db.close(), this.db = void 0);
|
|
5704
5704
|
}
|
|
@@ -5714,7 +5714,7 @@ class Kn {
|
|
|
5714
5714
|
* As the worker we should listen to events from the main window.
|
|
5715
5715
|
*/
|
|
5716
5716
|
async initializeReceiver() {
|
|
5717
|
-
this.receiver = Me._getInstance(
|
|
5717
|
+
this.receiver = Me._getInstance(po()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
5718
5718
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
5719
5719
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
5720
5720
|
"keyChanged"
|
|
@@ -5729,9 +5729,9 @@ class Kn {
|
|
|
5729
5729
|
* may not resolve.
|
|
5730
5730
|
*/
|
|
5731
5731
|
async initializeSender() {
|
|
5732
|
-
if (this.activeServiceWorker = await
|
|
5732
|
+
if (this.activeServiceWorker = await ho(), !this.activeServiceWorker)
|
|
5733
5733
|
return;
|
|
5734
|
-
this.sender = new
|
|
5734
|
+
this.sender = new lo(this.activeServiceWorker);
|
|
5735
5735
|
const e = await this.sender._send(
|
|
5736
5736
|
"ping",
|
|
5737
5737
|
{},
|
|
@@ -5753,7 +5753,7 @@ class Kn {
|
|
|
5753
5753
|
* @param key - Storage key which changed.
|
|
5754
5754
|
*/
|
|
5755
5755
|
async notifyServiceWorker(e) {
|
|
5756
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
5756
|
+
if (!(!this.sender || !this.activeServiceWorker || fo() !== this.activeServiceWorker))
|
|
5757
5757
|
try {
|
|
5758
5758
|
await this.sender._send(
|
|
5759
5759
|
"keyChanged",
|
|
@@ -5787,7 +5787,7 @@ class Kn {
|
|
|
5787
5787
|
return this._withPendingWrite(async () => (await this._withRetries((r) => Ut(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
5788
5788
|
}
|
|
5789
5789
|
async _get(e) {
|
|
5790
|
-
const t = await this._withRetries((r) =>
|
|
5790
|
+
const t = await this._withRetries((r) => _o(r, e));
|
|
5791
5791
|
return this.localCache[e] = t, t;
|
|
5792
5792
|
}
|
|
5793
5793
|
async _remove(e) {
|
|
@@ -5818,7 +5818,7 @@ class Kn {
|
|
|
5818
5818
|
s(t);
|
|
5819
5819
|
}
|
|
5820
5820
|
startPolling() {
|
|
5821
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
5821
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Io);
|
|
5822
5822
|
}
|
|
5823
5823
|
stopPolling() {
|
|
5824
5824
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -5831,7 +5831,7 @@ class Kn {
|
|
|
5831
5831
|
}
|
|
5832
5832
|
}
|
|
5833
5833
|
Kn.type = "LOCAL";
|
|
5834
|
-
const
|
|
5834
|
+
const yo = Kn;
|
|
5835
5835
|
new pe(3e4, 6e4);
|
|
5836
5836
|
/**
|
|
5837
5837
|
* @license
|
|
@@ -5903,26 +5903,26 @@ class dt extends at {
|
|
|
5903
5903
|
return e && (t.idToken = e), t;
|
|
5904
5904
|
}
|
|
5905
5905
|
}
|
|
5906
|
-
function
|
|
5906
|
+
function Eo(n) {
|
|
5907
5907
|
return Fn(n.auth, new dt(n), n.bypassAuthState);
|
|
5908
5908
|
}
|
|
5909
|
-
function
|
|
5909
|
+
function vo(n) {
|
|
5910
5910
|
const { auth: e, user: t } = n;
|
|
5911
5911
|
return h(
|
|
5912
5912
|
t,
|
|
5913
5913
|
e,
|
|
5914
5914
|
"internal-error"
|
|
5915
5915
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5916
|
-
),
|
|
5916
|
+
), Zi(t, new dt(n), n.bypassAuthState);
|
|
5917
5917
|
}
|
|
5918
|
-
async function
|
|
5918
|
+
async function bo(n) {
|
|
5919
5919
|
const { auth: e, user: t } = n;
|
|
5920
5920
|
return h(
|
|
5921
5921
|
t,
|
|
5922
5922
|
e,
|
|
5923
5923
|
"internal-error"
|
|
5924
5924
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5925
|
-
),
|
|
5925
|
+
), Xi(t, new dt(n), n.bypassAuthState);
|
|
5926
5926
|
}
|
|
5927
5927
|
/**
|
|
5928
5928
|
* @license
|
|
@@ -5982,13 +5982,13 @@ class Jn {
|
|
|
5982
5982
|
switch (e) {
|
|
5983
5983
|
case "signInViaPopup":
|
|
5984
5984
|
case "signInViaRedirect":
|
|
5985
|
-
return
|
|
5985
|
+
return Eo;
|
|
5986
5986
|
case "linkViaPopup":
|
|
5987
5987
|
case "linkViaRedirect":
|
|
5988
|
-
return
|
|
5988
|
+
return bo;
|
|
5989
5989
|
case "reauthViaPopup":
|
|
5990
5990
|
case "reauthViaRedirect":
|
|
5991
|
-
return
|
|
5991
|
+
return vo;
|
|
5992
5992
|
default:
|
|
5993
5993
|
y(
|
|
5994
5994
|
this.auth,
|
|
@@ -6023,7 +6023,7 @@ class Jn {
|
|
|
6023
6023
|
* See the License for the specific language governing permissions and
|
|
6024
6024
|
* limitations under the License.
|
|
6025
6025
|
*/
|
|
6026
|
-
const
|
|
6026
|
+
const To = new pe(2e3, 1e4);
|
|
6027
6027
|
async function Bt(n, e, t) {
|
|
6028
6028
|
if (w(n.app))
|
|
6029
6029
|
return Promise.reject(v(
|
|
@@ -6032,7 +6032,7 @@ async function Bt(n, e, t) {
|
|
|
6032
6032
|
/* AuthErrorCode.OPERATION_NOT_SUPPORTED */
|
|
6033
6033
|
));
|
|
6034
6034
|
const r = H(n);
|
|
6035
|
-
|
|
6035
|
+
si(n, e, lt);
|
|
6036
6036
|
const s = qn(r, t);
|
|
6037
6037
|
return new $(r, "signInViaPopup", e, s).executeNotNull();
|
|
6038
6038
|
}
|
|
@@ -6097,7 +6097,7 @@ class $ extends Jn {
|
|
|
6097
6097
|
);
|
|
6098
6098
|
return;
|
|
6099
6099
|
}
|
|
6100
|
-
this.pollId = window.setTimeout(e,
|
|
6100
|
+
this.pollId = window.setTimeout(e, To.get());
|
|
6101
6101
|
};
|
|
6102
6102
|
e();
|
|
6103
6103
|
}
|
|
@@ -6119,8 +6119,8 @@ $.currentPopupAction = null;
|
|
|
6119
6119
|
* See the License for the specific language governing permissions and
|
|
6120
6120
|
* limitations under the License.
|
|
6121
6121
|
*/
|
|
6122
|
-
const
|
|
6123
|
-
class
|
|
6122
|
+
const So = "pendingRedirect", be = /* @__PURE__ */ new Map();
|
|
6123
|
+
class Co extends Jn {
|
|
6124
6124
|
constructor(e, t, r = !1) {
|
|
6125
6125
|
super(e, [
|
|
6126
6126
|
"signInViaRedirect",
|
|
@@ -6138,7 +6138,7 @@ class So extends Jn {
|
|
|
6138
6138
|
let e = be.get(this.auth._key());
|
|
6139
6139
|
if (!e) {
|
|
6140
6140
|
try {
|
|
6141
|
-
const r = await
|
|
6141
|
+
const r = await Ao(this.resolver, this.auth) ? await super.execute() : null;
|
|
6142
6142
|
e = () => Promise.resolve(r);
|
|
6143
6143
|
} catch (t) {
|
|
6144
6144
|
e = () => Promise.reject(t);
|
|
@@ -6166,26 +6166,26 @@ class So extends Jn {
|
|
|
6166
6166
|
cleanUp() {
|
|
6167
6167
|
}
|
|
6168
6168
|
}
|
|
6169
|
-
async function
|
|
6170
|
-
const t =
|
|
6169
|
+
async function Ao(n, e) {
|
|
6170
|
+
const t = Ro(e), r = ko(n);
|
|
6171
6171
|
if (!await r._isAvailable())
|
|
6172
6172
|
return !1;
|
|
6173
6173
|
const s = await r._get(t) === "true";
|
|
6174
6174
|
return await r._remove(t), s;
|
|
6175
6175
|
}
|
|
6176
|
-
function
|
|
6176
|
+
function Po(n, e) {
|
|
6177
6177
|
be.set(n._key(), e);
|
|
6178
6178
|
}
|
|
6179
|
-
function
|
|
6179
|
+
function ko(n) {
|
|
6180
6180
|
return S(n._redirectPersistence);
|
|
6181
6181
|
}
|
|
6182
|
-
function
|
|
6183
|
-
return Ee(
|
|
6182
|
+
function Ro(n) {
|
|
6183
|
+
return Ee(So, n.config.apiKey, n.name);
|
|
6184
6184
|
}
|
|
6185
|
-
async function
|
|
6185
|
+
async function Oo(n, e, t = !1) {
|
|
6186
6186
|
if (w(n.app))
|
|
6187
6187
|
return Promise.reject(C(n));
|
|
6188
|
-
const r = H(n), s = qn(r, e), o = await new
|
|
6188
|
+
const r = H(n), s = qn(r, e), o = await new Co(r, s, t).execute();
|
|
6189
6189
|
return o && !t && (delete o.user._redirectEventId, await r._persistUserIfCurrent(o.user), await r._setRedirectUser(null, e)), o;
|
|
6190
6190
|
}
|
|
6191
6191
|
/**
|
|
@@ -6204,8 +6204,8 @@ async function Ro(n, e, t = !1) {
|
|
|
6204
6204
|
* See the License for the specific language governing permissions and
|
|
6205
6205
|
* limitations under the License.
|
|
6206
6206
|
*/
|
|
6207
|
-
const
|
|
6208
|
-
class
|
|
6207
|
+
const No = 600 * 1e3;
|
|
6208
|
+
class Do {
|
|
6209
6209
|
constructor(e) {
|
|
6210
6210
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
6211
6211
|
}
|
|
@@ -6221,7 +6221,7 @@ class No {
|
|
|
6221
6221
|
let t = !1;
|
|
6222
6222
|
return this.consumers.forEach((r) => {
|
|
6223
6223
|
this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
|
|
6224
|
-
}), this.hasHandledPotentialRedirect || !
|
|
6224
|
+
}), this.hasHandledPotentialRedirect || !Lo(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
6225
6225
|
}
|
|
6226
6226
|
sendToConsumer(e, t) {
|
|
6227
6227
|
if (e.error && !Yn(e)) {
|
|
@@ -6235,7 +6235,7 @@ class No {
|
|
|
6235
6235
|
return t.filter.includes(e.type) && r;
|
|
6236
6236
|
}
|
|
6237
6237
|
hasEventBeenHandled(e) {
|
|
6238
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
6238
|
+
return Date.now() - this.lastProcessedEventTime >= No && this.cachedEventUids.clear(), this.cachedEventUids.has(jt(e));
|
|
6239
6239
|
}
|
|
6240
6240
|
saveEventToCache(e) {
|
|
6241
6241
|
this.cachedEventUids.add(jt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -6247,7 +6247,7 @@ function jt(n) {
|
|
|
6247
6247
|
function Yn({ type: n, error: e }) {
|
|
6248
6248
|
return n === "unknown" && e?.code === "auth/no-auth-event";
|
|
6249
6249
|
}
|
|
6250
|
-
function
|
|
6250
|
+
function Lo(n) {
|
|
6251
6251
|
switch (n.type) {
|
|
6252
6252
|
case "signInViaRedirect":
|
|
6253
6253
|
case "linkViaRedirect":
|
|
@@ -6275,7 +6275,7 @@ function Do(n) {
|
|
|
6275
6275
|
* See the License for the specific language governing permissions and
|
|
6276
6276
|
* limitations under the License.
|
|
6277
6277
|
*/
|
|
6278
|
-
async function
|
|
6278
|
+
async function Mo(n, e = {}) {
|
|
6279
6279
|
return j(n, "GET", "/v1/projects", e);
|
|
6280
6280
|
}
|
|
6281
6281
|
/**
|
|
@@ -6294,14 +6294,14 @@ async function Lo(n, e = {}) {
|
|
|
6294
6294
|
* See the License for the specific language governing permissions and
|
|
6295
6295
|
* limitations under the License.
|
|
6296
6296
|
*/
|
|
6297
|
-
const
|
|
6298
|
-
async function
|
|
6297
|
+
const xo = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Uo = /^https?/;
|
|
6298
|
+
async function Fo(n) {
|
|
6299
6299
|
if (n.config.emulator)
|
|
6300
6300
|
return;
|
|
6301
|
-
const { authorizedDomains: e } = await
|
|
6301
|
+
const { authorizedDomains: e } = await Mo(n);
|
|
6302
6302
|
for (const t of e)
|
|
6303
6303
|
try {
|
|
6304
|
-
if (
|
|
6304
|
+
if (Bo(t))
|
|
6305
6305
|
return;
|
|
6306
6306
|
} catch {
|
|
6307
6307
|
}
|
|
@@ -6311,15 +6311,15 @@ async function Uo(n) {
|
|
|
6311
6311
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
6312
6312
|
);
|
|
6313
6313
|
}
|
|
6314
|
-
function
|
|
6314
|
+
function Bo(n) {
|
|
6315
6315
|
const e = Ye(), { protocol: t, hostname: r } = new URL(e);
|
|
6316
6316
|
if (n.startsWith("chrome-extension://")) {
|
|
6317
6317
|
const o = new URL(n);
|
|
6318
6318
|
return o.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === r;
|
|
6319
6319
|
}
|
|
6320
|
-
if (!
|
|
6320
|
+
if (!Uo.test(t))
|
|
6321
6321
|
return !1;
|
|
6322
|
-
if (
|
|
6322
|
+
if (xo.test(n))
|
|
6323
6323
|
return r === n;
|
|
6324
6324
|
const s = n.replace(/\./g, "\\.");
|
|
6325
6325
|
return new RegExp("^(.+\\." + s + "|" + s + ")$", "i").test(r);
|
|
@@ -6340,7 +6340,7 @@ function Fo(n) {
|
|
|
6340
6340
|
* See the License for the specific language governing permissions and
|
|
6341
6341
|
* limitations under the License.
|
|
6342
6342
|
*/
|
|
6343
|
-
const
|
|
6343
|
+
const jo = new pe(3e4, 6e4);
|
|
6344
6344
|
function Ht() {
|
|
6345
6345
|
const n = b().___jsl;
|
|
6346
6346
|
if (n?.H) {
|
|
@@ -6350,7 +6350,7 @@ function Ht() {
|
|
|
6350
6350
|
n.CP[t] = null;
|
|
6351
6351
|
}
|
|
6352
6352
|
}
|
|
6353
|
-
function
|
|
6353
|
+
function Ho(n) {
|
|
6354
6354
|
return new Promise((e, t) => {
|
|
6355
6355
|
function r() {
|
|
6356
6356
|
Ht(), gapi.load("gapi.iframes", {
|
|
@@ -6364,7 +6364,7 @@ function jo(n) {
|
|
|
6364
6364
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6365
6365
|
));
|
|
6366
6366
|
},
|
|
6367
|
-
timeout:
|
|
6367
|
+
timeout: jo.get()
|
|
6368
6368
|
});
|
|
6369
6369
|
}
|
|
6370
6370
|
if (b().gapi?.iframes?.Iframe)
|
|
@@ -6372,22 +6372,22 @@ function jo(n) {
|
|
|
6372
6372
|
else if (b().gapi?.load)
|
|
6373
6373
|
r();
|
|
6374
6374
|
else {
|
|
6375
|
-
const s =
|
|
6375
|
+
const s = Di("iframefcb");
|
|
6376
6376
|
return b()[s] = () => {
|
|
6377
6377
|
gapi.load ? r() : t(v(
|
|
6378
6378
|
n,
|
|
6379
6379
|
"network-request-failed"
|
|
6380
6380
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6381
6381
|
));
|
|
6382
|
-
}, Ln(`${
|
|
6382
|
+
}, Ln(`${Ni()}?onload=${s}`).catch((i) => t(i));
|
|
6383
6383
|
}
|
|
6384
6384
|
}).catch((e) => {
|
|
6385
6385
|
throw Te = null, e;
|
|
6386
6386
|
});
|
|
6387
6387
|
}
|
|
6388
6388
|
let Te = null;
|
|
6389
|
-
function
|
|
6390
|
-
return Te = Te ||
|
|
6389
|
+
function Vo(n) {
|
|
6390
|
+
return Te = Te || Ho(n), Te;
|
|
6391
6391
|
}
|
|
6392
6392
|
/**
|
|
6393
6393
|
* @license
|
|
@@ -6405,7 +6405,7 @@ function Ho(n) {
|
|
|
6405
6405
|
* See the License for the specific language governing permissions and
|
|
6406
6406
|
* limitations under the License.
|
|
6407
6407
|
*/
|
|
6408
|
-
const
|
|
6408
|
+
const $o = new pe(5e3, 15e3), Wo = "__/auth/iframe", zo = "emulator/auth/iframe", Go = {
|
|
6409
6409
|
style: {
|
|
6410
6410
|
position: "absolute",
|
|
6411
6411
|
top: "-100px",
|
|
@@ -6414,7 +6414,7 @@ const Vo = new pe(5e3, 15e3), $o = "__/auth/iframe", Wo = "emulator/auth/iframe"
|
|
|
6414
6414
|
},
|
|
6415
6415
|
"aria-hidden": "true",
|
|
6416
6416
|
tabindex: "-1"
|
|
6417
|
-
},
|
|
6417
|
+
}, Ko = /* @__PURE__ */ new Map([
|
|
6418
6418
|
["identitytoolkit.googleapis.com", "p"],
|
|
6419
6419
|
// production
|
|
6420
6420
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
@@ -6422,7 +6422,7 @@ const Vo = new pe(5e3, 15e3), $o = "__/auth/iframe", Wo = "emulator/auth/iframe"
|
|
|
6422
6422
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
6423
6423
|
// test
|
|
6424
6424
|
]);
|
|
6425
|
-
function
|
|
6425
|
+
function qo(n) {
|
|
6426
6426
|
const e = n.config;
|
|
6427
6427
|
h(
|
|
6428
6428
|
e.authDomain,
|
|
@@ -6430,17 +6430,17 @@ function Ko(n) {
|
|
|
6430
6430
|
"auth-domain-config-required"
|
|
6431
6431
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
6432
6432
|
);
|
|
6433
|
-
const t = e.emulator ? st(e,
|
|
6433
|
+
const t = e.emulator ? st(e, zo) : `https://${n.config.authDomain}/${Wo}`, r = {
|
|
6434
6434
|
apiKey: e.apiKey,
|
|
6435
6435
|
appName: n.name,
|
|
6436
6436
|
v: fe
|
|
6437
|
-
}, s =
|
|
6437
|
+
}, s = Ko.get(n.config.apiHost);
|
|
6438
6438
|
s && (r.eid = s);
|
|
6439
6439
|
const i = n._getFrameworks();
|
|
6440
6440
|
return i.length && (r.fw = i.join(",")), `${t}?${he(r).slice(1)}`;
|
|
6441
6441
|
}
|
|
6442
|
-
async function
|
|
6443
|
-
const e = await
|
|
6442
|
+
async function Jo(n) {
|
|
6443
|
+
const e = await Vo(n), t = b().gapi;
|
|
6444
6444
|
return h(
|
|
6445
6445
|
t,
|
|
6446
6446
|
n,
|
|
@@ -6448,9 +6448,9 @@ async function qo(n) {
|
|
|
6448
6448
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6449
6449
|
), e.open({
|
|
6450
6450
|
where: document.body,
|
|
6451
|
-
url:
|
|
6451
|
+
url: qo(n),
|
|
6452
6452
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
6453
|
-
attributes:
|
|
6453
|
+
attributes: Go,
|
|
6454
6454
|
dontclear: !0
|
|
6455
6455
|
}, (r) => new Promise(async (s, i) => {
|
|
6456
6456
|
await r.restyle({
|
|
@@ -6463,7 +6463,7 @@ async function qo(n) {
|
|
|
6463
6463
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6464
6464
|
), a = b().setTimeout(() => {
|
|
6465
6465
|
i(o);
|
|
6466
|
-
},
|
|
6466
|
+
}, $o.get());
|
|
6467
6467
|
function c() {
|
|
6468
6468
|
b().clearTimeout(a), s(r);
|
|
6469
6469
|
}
|
|
@@ -6488,12 +6488,12 @@ async function qo(n) {
|
|
|
6488
6488
|
* See the License for the specific language governing permissions and
|
|
6489
6489
|
* limitations under the License.
|
|
6490
6490
|
*/
|
|
6491
|
-
const
|
|
6491
|
+
const Yo = {
|
|
6492
6492
|
location: "yes",
|
|
6493
6493
|
resizable: "yes",
|
|
6494
6494
|
statusbar: "yes",
|
|
6495
6495
|
toolbar: "no"
|
|
6496
|
-
},
|
|
6496
|
+
}, Xo = 500, Zo = 600, Qo = "_blank", ea = "http://localhost";
|
|
6497
6497
|
class Vt {
|
|
6498
6498
|
constructor(e) {
|
|
6499
6499
|
this.window = e, this.associatedEvent = null;
|
|
@@ -6506,20 +6506,20 @@ class Vt {
|
|
|
6506
6506
|
}
|
|
6507
6507
|
}
|
|
6508
6508
|
}
|
|
6509
|
-
function
|
|
6509
|
+
function ta(n, e, t, r = Xo, s = Zo) {
|
|
6510
6510
|
const i = Math.max((window.screen.availHeight - s) / 2, 0).toString(), o = Math.max((window.screen.availWidth - r) / 2, 0).toString();
|
|
6511
6511
|
let a = "";
|
|
6512
6512
|
const c = {
|
|
6513
|
-
...
|
|
6513
|
+
...Yo,
|
|
6514
6514
|
width: r.toString(),
|
|
6515
6515
|
height: s.toString(),
|
|
6516
6516
|
top: i,
|
|
6517
6517
|
left: o
|
|
6518
6518
|
}, l = _().toLowerCase();
|
|
6519
|
-
t && (a = An(l) ?
|
|
6520
|
-
const f = Object.entries(c).reduce((
|
|
6521
|
-
if (
|
|
6522
|
-
return
|
|
6519
|
+
t && (a = An(l) ? Qo : t), Sn(l) && (e = e || ea, c.scrollbars = "yes");
|
|
6520
|
+
const f = Object.entries(c).reduce((u, [g, I]) => `${u}${g}=${I},`, "");
|
|
6521
|
+
if (bi(l) && a !== "_self")
|
|
6522
|
+
return na(e || "", a), new Vt(null);
|
|
6523
6523
|
const p = window.open(e || "", a, f);
|
|
6524
6524
|
h(
|
|
6525
6525
|
p,
|
|
@@ -6533,7 +6533,7 @@ function ea(n, e, t, r = Yo, s = Xo) {
|
|
|
6533
6533
|
}
|
|
6534
6534
|
return new Vt(p);
|
|
6535
6535
|
}
|
|
6536
|
-
function
|
|
6536
|
+
function na(n, e) {
|
|
6537
6537
|
const t = document.createElement("a");
|
|
6538
6538
|
t.href = n, t.target = e;
|
|
6539
6539
|
const r = document.createEvent("MouseEvent");
|
|
@@ -6555,7 +6555,7 @@ function ta(n, e) {
|
|
|
6555
6555
|
* See the License for the specific language governing permissions and
|
|
6556
6556
|
* limitations under the License.
|
|
6557
6557
|
*/
|
|
6558
|
-
const
|
|
6558
|
+
const ra = "__/auth/handler", sa = "emulator/auth/handler", ia = encodeURIComponent("fac");
|
|
6559
6559
|
async function $t(n, e, t, r, s, i) {
|
|
6560
6560
|
h(
|
|
6561
6561
|
n.config.authDomain,
|
|
@@ -6577,7 +6577,7 @@ async function $t(n, e, t, r, s, i) {
|
|
|
6577
6577
|
eventId: s
|
|
6578
6578
|
};
|
|
6579
6579
|
if (e instanceof lt) {
|
|
6580
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
|
6580
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Hr(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
6581
6581
|
for (const [f, p] of Object.entries({}))
|
|
6582
6582
|
o[f] = p;
|
|
6583
6583
|
}
|
|
@@ -6589,11 +6589,11 @@ async function $t(n, e, t, r, s, i) {
|
|
|
6589
6589
|
const a = o;
|
|
6590
6590
|
for (const f of Object.keys(a))
|
|
6591
6591
|
a[f] === void 0 && delete a[f];
|
|
6592
|
-
const c = await n._getAppCheckToken(), l = c ? `#${
|
|
6593
|
-
return `${
|
|
6592
|
+
const c = await n._getAppCheckToken(), l = c ? `#${ia}=${encodeURIComponent(c)}` : "";
|
|
6593
|
+
return `${oa(n)}?${he(a).slice(1)}${l}`;
|
|
6594
6594
|
}
|
|
6595
|
-
function
|
|
6596
|
-
return n.emulator ? st(n,
|
|
6595
|
+
function oa({ config: n }) {
|
|
6596
|
+
return n.emulator ? st(n, sa) : `https://${n.authDomain}/${ra}`;
|
|
6597
6597
|
}
|
|
6598
6598
|
/**
|
|
6599
6599
|
* @license
|
|
@@ -6612,21 +6612,21 @@ function ia({ config: n }) {
|
|
|
6612
6612
|
* limitations under the License.
|
|
6613
6613
|
*/
|
|
6614
6614
|
const We = "webStorageSupport";
|
|
6615
|
-
class
|
|
6615
|
+
class aa {
|
|
6616
6616
|
constructor() {
|
|
6617
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $n, this._completeRedirectFn =
|
|
6617
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $n, this._completeRedirectFn = Oo, this._overrideRedirectResult = Po;
|
|
6618
6618
|
}
|
|
6619
6619
|
// Wrapping in async even though we don't await anywhere in order
|
|
6620
6620
|
// to make sure errors are raised as promise rejections
|
|
6621
6621
|
async _openPopup(e, t, r, s) {
|
|
6622
6622
|
P(this.eventManagers[e._key()]?.manager, "_initialize() not called before _openPopup()");
|
|
6623
6623
|
const i = await $t(e, t, r, Ye(), s);
|
|
6624
|
-
return
|
|
6624
|
+
return ta(e, i, ut());
|
|
6625
6625
|
}
|
|
6626
6626
|
async _openRedirect(e, t, r, s) {
|
|
6627
6627
|
await this._originValidation(e);
|
|
6628
6628
|
const i = await $t(e, t, r, Ye(), s);
|
|
6629
|
-
return
|
|
6629
|
+
return uo(i), new Promise(() => {
|
|
6630
6630
|
});
|
|
6631
6631
|
}
|
|
6632
6632
|
_initialize(e) {
|
|
@@ -6641,7 +6641,7 @@ class oa {
|
|
|
6641
6641
|
}), r;
|
|
6642
6642
|
}
|
|
6643
6643
|
async initAndGetManager(e) {
|
|
6644
|
-
const t = await
|
|
6644
|
+
const t = await Jo(e), r = new Do(e);
|
|
6645
6645
|
return t.register("authEvent", (s) => (h(
|
|
6646
6646
|
s?.authEvent,
|
|
6647
6647
|
e,
|
|
@@ -6664,13 +6664,13 @@ class oa {
|
|
|
6664
6664
|
}
|
|
6665
6665
|
_originValidation(e) {
|
|
6666
6666
|
const t = e._key();
|
|
6667
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
6667
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Fo(e)), this.originValidationPromises[t];
|
|
6668
6668
|
}
|
|
6669
6669
|
get _shouldInitProactively() {
|
|
6670
6670
|
return Nn() || Cn() || ot();
|
|
6671
6671
|
}
|
|
6672
6672
|
}
|
|
6673
|
-
const
|
|
6673
|
+
const ca = aa;
|
|
6674
6674
|
var Wt = "@firebase/auth", zt = "1.11.1";
|
|
6675
6675
|
/**
|
|
6676
6676
|
* @license
|
|
@@ -6688,7 +6688,7 @@ var Wt = "@firebase/auth", zt = "1.11.1";
|
|
|
6688
6688
|
* See the License for the specific language governing permissions and
|
|
6689
6689
|
* limitations under the License.
|
|
6690
6690
|
*/
|
|
6691
|
-
class
|
|
6691
|
+
class la {
|
|
6692
6692
|
constructor(e) {
|
|
6693
6693
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
6694
6694
|
}
|
|
@@ -6738,7 +6738,7 @@ class ca {
|
|
|
6738
6738
|
* See the License for the specific language governing permissions and
|
|
6739
6739
|
* limitations under the License.
|
|
6740
6740
|
*/
|
|
6741
|
-
function
|
|
6741
|
+
function ua(n) {
|
|
6742
6742
|
switch (n) {
|
|
6743
6743
|
case "Node":
|
|
6744
6744
|
return "node";
|
|
@@ -6754,7 +6754,7 @@ function la(n) {
|
|
|
6754
6754
|
return;
|
|
6755
6755
|
}
|
|
6756
6756
|
}
|
|
6757
|
-
function
|
|
6757
|
+
function da(n) {
|
|
6758
6758
|
ae(new Q(
|
|
6759
6759
|
"auth",
|
|
6760
6760
|
(e, { options: t }) => {
|
|
@@ -6768,8 +6768,8 @@ function ua(n) {
|
|
|
6768
6768
|
tokenApiHost: "securetoken.googleapis.com",
|
|
6769
6769
|
apiScheme: "https",
|
|
6770
6770
|
sdkClientVersion: Dn(n)
|
|
6771
|
-
}, l = new
|
|
6772
|
-
return
|
|
6771
|
+
}, l = new ki(r, s, i, c);
|
|
6772
|
+
return Bi(l, t), l;
|
|
6773
6773
|
},
|
|
6774
6774
|
"PUBLIC"
|
|
6775
6775
|
/* ComponentType.PUBLIC */
|
|
@@ -6788,14 +6788,14 @@ function ua(n) {
|
|
|
6788
6788
|
"auth"
|
|
6789
6789
|
/* _ComponentName.AUTH */
|
|
6790
6790
|
).getImmediate());
|
|
6791
|
-
return ((r) => new
|
|
6791
|
+
return ((r) => new la(r))(t);
|
|
6792
6792
|
},
|
|
6793
6793
|
"PRIVATE"
|
|
6794
6794
|
/* ComponentType.PRIVATE */
|
|
6795
6795
|
).setInstantiationMode(
|
|
6796
6796
|
"EXPLICIT"
|
|
6797
6797
|
/* InstantiationMode.EXPLICIT */
|
|
6798
|
-
)), q(Wt, zt,
|
|
6798
|
+
)), q(Wt, zt, ua(n)), q(Wt, zt, "esm2020");
|
|
6799
6799
|
}
|
|
6800
6800
|
/**
|
|
6801
6801
|
* @license
|
|
@@ -6813,11 +6813,11 @@ function ua(n) {
|
|
|
6813
6813
|
* See the License for the specific language governing permissions and
|
|
6814
6814
|
* limitations under the License.
|
|
6815
6815
|
*/
|
|
6816
|
-
const
|
|
6816
|
+
const ha = 300, fa = un("authIdTokenMaxAge") || ha;
|
|
6817
6817
|
let Gt = null;
|
|
6818
|
-
const
|
|
6818
|
+
const pa = (n) => async (e) => {
|
|
6819
6819
|
const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
6820
|
-
if (r && r >
|
|
6820
|
+
if (r && r > fa)
|
|
6821
6821
|
return;
|
|
6822
6822
|
const s = t?.token;
|
|
6823
6823
|
Gt !== s && (Gt = s, await fetch(n, {
|
|
@@ -6827,32 +6827,32 @@ const fa = (n) => async (e) => {
|
|
|
6827
6827
|
} : {}
|
|
6828
6828
|
}));
|
|
6829
6829
|
};
|
|
6830
|
-
function
|
|
6830
|
+
function ma(n = $s()) {
|
|
6831
6831
|
const e = pn(n, "auth");
|
|
6832
6832
|
if (e.isInitialized())
|
|
6833
6833
|
return e.getImmediate();
|
|
6834
|
-
const t =
|
|
6835
|
-
popupRedirectResolver:
|
|
6834
|
+
const t = Fi(n, {
|
|
6835
|
+
popupRedirectResolver: ca,
|
|
6836
6836
|
persistence: [
|
|
6837
|
-
|
|
6838
|
-
|
|
6837
|
+
yo,
|
|
6838
|
+
ao,
|
|
6839
6839
|
$n
|
|
6840
6840
|
]
|
|
6841
6841
|
}), r = un("authTokenSyncURL");
|
|
6842
6842
|
if (r && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
6843
6843
|
const i = new URL(r, location.origin);
|
|
6844
6844
|
if (location.origin === i.origin) {
|
|
6845
|
-
const o =
|
|
6846
|
-
|
|
6845
|
+
const o = pa(i.toString());
|
|
6846
|
+
ro(t, o, () => o(t.currentUser)), no(t, (a) => o(a));
|
|
6847
6847
|
}
|
|
6848
6848
|
}
|
|
6849
|
-
const s =
|
|
6850
|
-
return s &&
|
|
6849
|
+
const s = Sr("auth");
|
|
6850
|
+
return s && ji(t, `http://${s}`), t;
|
|
6851
6851
|
}
|
|
6852
|
-
function
|
|
6852
|
+
function ga() {
|
|
6853
6853
|
return document.getElementsByTagName("head")?.[0] ?? document;
|
|
6854
6854
|
}
|
|
6855
|
-
|
|
6855
|
+
Ri({
|
|
6856
6856
|
loadJS(n) {
|
|
6857
6857
|
return new Promise((e, t) => {
|
|
6858
6858
|
const r = document.createElement("script");
|
|
@@ -6862,21 +6862,21 @@ ki({
|
|
|
6862
6862
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6863
6863
|
);
|
|
6864
6864
|
i.customData = s, t(i);
|
|
6865
|
-
}, r.type = "text/javascript", r.charset = "UTF-8",
|
|
6865
|
+
}, r.type = "text/javascript", r.charset = "UTF-8", ga().appendChild(r);
|
|
6866
6866
|
});
|
|
6867
6867
|
},
|
|
6868
6868
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
6869
6869
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
6870
6870
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
6871
6871
|
});
|
|
6872
|
-
|
|
6872
|
+
da(
|
|
6873
6873
|
"Browser"
|
|
6874
6874
|
/* ClientPlatform.BROWSER */
|
|
6875
6875
|
);
|
|
6876
|
-
const
|
|
6877
|
-
/* @__PURE__ */
|
|
6878
|
-
/* @__PURE__ */
|
|
6879
|
-
] }),
|
|
6876
|
+
const _a = (n) => /* @__PURE__ */ d.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...n, children: [
|
|
6877
|
+
/* @__PURE__ */ d.jsx("title", { children: "Apple" }),
|
|
6878
|
+
/* @__PURE__ */ d.jsx("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" })
|
|
6879
|
+
] }), Ia = (n) => /* @__PURE__ */ d.jsxs(
|
|
6880
6880
|
"svg",
|
|
6881
6881
|
{
|
|
6882
6882
|
fill: "#0866FF",
|
|
@@ -6884,11 +6884,11 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
6884
6884
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6885
6885
|
...n,
|
|
6886
6886
|
children: [
|
|
6887
|
-
/* @__PURE__ */
|
|
6888
|
-
/* @__PURE__ */
|
|
6887
|
+
/* @__PURE__ */ d.jsx("title", { children: "Facebook" }),
|
|
6888
|
+
/* @__PURE__ */ d.jsx("path", { d: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" })
|
|
6889
6889
|
]
|
|
6890
6890
|
}
|
|
6891
|
-
),
|
|
6891
|
+
), wa = (n) => /* @__PURE__ */ d.jsxs(
|
|
6892
6892
|
"svg",
|
|
6893
6893
|
{
|
|
6894
6894
|
viewBox: "0 0 24 24",
|
|
@@ -6897,11 +6897,11 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
6897
6897
|
height: "1em",
|
|
6898
6898
|
...n,
|
|
6899
6899
|
children: [
|
|
6900
|
-
/* @__PURE__ */
|
|
6901
|
-
/* @__PURE__ */
|
|
6900
|
+
/* @__PURE__ */ d.jsx("title", { children: "GitHub" }),
|
|
6901
|
+
/* @__PURE__ */ d.jsx("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
|
|
6902
6902
|
]
|
|
6903
6903
|
}
|
|
6904
|
-
),
|
|
6904
|
+
), ya = (n) => /* @__PURE__ */ d.jsxs(
|
|
6905
6905
|
"svg",
|
|
6906
6906
|
{
|
|
6907
6907
|
viewBox: "0 0 24 24",
|
|
@@ -6910,19 +6910,19 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
6910
6910
|
height: "1em",
|
|
6911
6911
|
...n,
|
|
6912
6912
|
children: [
|
|
6913
|
-
/* @__PURE__ */
|
|
6914
|
-
/* @__PURE__ */
|
|
6913
|
+
/* @__PURE__ */ d.jsx("title", { children: "Google" }),
|
|
6914
|
+
/* @__PURE__ */ d.jsx("path", { d: "M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" })
|
|
6915
6915
|
]
|
|
6916
6916
|
}
|
|
6917
|
-
),
|
|
6918
|
-
/* @__PURE__ */
|
|
6919
|
-
/* @__PURE__ */
|
|
6920
|
-
/* @__PURE__ */
|
|
6921
|
-
/* @__PURE__ */
|
|
6922
|
-
] }), Kt = (n) => /* @__PURE__ */
|
|
6923
|
-
/* @__PURE__ */
|
|
6924
|
-
/* @__PURE__ */
|
|
6925
|
-
] }),
|
|
6917
|
+
), Ea = (n) => /* @__PURE__ */ d.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...n, children: [
|
|
6918
|
+
/* @__PURE__ */ d.jsx("path", { fill: "#f25022", d: "M1 1h9v9H1z" }),
|
|
6919
|
+
/* @__PURE__ */ d.jsx("path", { fill: "#00a4ef", d: "M1 11h9v9H1z" }),
|
|
6920
|
+
/* @__PURE__ */ d.jsx("path", { fill: "#7fba00", d: "M11 1h9v9h-9z" }),
|
|
6921
|
+
/* @__PURE__ */ d.jsx("path", { fill: "#ffb900", d: "M11 11h9v9h-9z" })
|
|
6922
|
+
] }), Kt = (n) => /* @__PURE__ */ d.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...n, children: [
|
|
6923
|
+
/* @__PURE__ */ d.jsx("title", { children: "X" }),
|
|
6924
|
+
/* @__PURE__ */ d.jsx("path", { d: "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z" })
|
|
6925
|
+
] }), va = {
|
|
6926
6926
|
google: "Google",
|
|
6927
6927
|
github: "GitHub",
|
|
6928
6928
|
facebook: "Facebook",
|
|
@@ -6932,52 +6932,52 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
6932
6932
|
apple: "Apple",
|
|
6933
6933
|
yahoo: "Yahoo"
|
|
6934
6934
|
}, Xn = {
|
|
6935
|
-
google:
|
|
6936
|
-
github:
|
|
6937
|
-
facebook:
|
|
6935
|
+
google: ya,
|
|
6936
|
+
github: wa,
|
|
6937
|
+
facebook: Ia,
|
|
6938
6938
|
twitter: Kt,
|
|
6939
6939
|
x: Kt,
|
|
6940
|
-
apple:
|
|
6941
|
-
microsoft:
|
|
6942
|
-
yahoo:
|
|
6943
|
-
},
|
|
6940
|
+
apple: _a,
|
|
6941
|
+
microsoft: Ea,
|
|
6942
|
+
yahoo: ar.Fragment
|
|
6943
|
+
}, Zn = (n) => n in Xn, Qn = (n) => n.every(Zn), ba = ({
|
|
6944
6944
|
providerId: n,
|
|
6945
6945
|
onClick: e,
|
|
6946
6946
|
...t
|
|
6947
6947
|
}) => {
|
|
6948
6948
|
const r = Xn[n];
|
|
6949
|
-
return /* @__PURE__ */
|
|
6950
|
-
|
|
6949
|
+
return /* @__PURE__ */ d.jsxs(
|
|
6950
|
+
dr,
|
|
6951
6951
|
{
|
|
6952
6952
|
variant: "outline",
|
|
6953
6953
|
className: "gap-2",
|
|
6954
6954
|
onClick: e,
|
|
6955
6955
|
...t,
|
|
6956
6956
|
children: [
|
|
6957
|
-
/* @__PURE__ */
|
|
6958
|
-
|
|
6957
|
+
/* @__PURE__ */ d.jsx(r, { className: "w-4 h-4 fill-foreground" }),
|
|
6958
|
+
va[n]
|
|
6959
6959
|
]
|
|
6960
6960
|
}
|
|
6961
6961
|
);
|
|
6962
|
-
},
|
|
6962
|
+
}, er = ({
|
|
6963
6963
|
form: n,
|
|
6964
6964
|
onSubmit: e,
|
|
6965
6965
|
submitLabel: t,
|
|
6966
6966
|
isPending: r
|
|
6967
|
-
}) => /* @__PURE__ */
|
|
6967
|
+
}) => /* @__PURE__ */ d.jsx(mr, { ...n, children: /* @__PURE__ */ d.jsxs(
|
|
6968
6968
|
"form",
|
|
6969
6969
|
{
|
|
6970
6970
|
onSubmit: n.handleSubmit(e),
|
|
6971
6971
|
className: "flex flex-col gap-2",
|
|
6972
6972
|
children: [
|
|
6973
|
-
/* @__PURE__ */
|
|
6974
|
-
/* @__PURE__ */
|
|
6975
|
-
/* @__PURE__ */
|
|
6976
|
-
/* @__PURE__ */
|
|
6973
|
+
/* @__PURE__ */ d.jsxs(ft, { children: [
|
|
6974
|
+
/* @__PURE__ */ d.jsx(pt, { children: "E-Mail" }),
|
|
6975
|
+
/* @__PURE__ */ d.jsx(mt, { children: /* @__PURE__ */ d.jsx(ht, { placeholder: "Email", ...n.register("email") }) }),
|
|
6976
|
+
/* @__PURE__ */ d.jsx(gt, {})
|
|
6977
6977
|
] }),
|
|
6978
|
-
/* @__PURE__ */
|
|
6979
|
-
/* @__PURE__ */
|
|
6980
|
-
/* @__PURE__ */
|
|
6978
|
+
/* @__PURE__ */ d.jsxs(ft, { children: [
|
|
6979
|
+
/* @__PURE__ */ d.jsx(pt, { children: "Password" }),
|
|
6980
|
+
/* @__PURE__ */ d.jsx(mt, { children: /* @__PURE__ */ d.jsx(
|
|
6981
6981
|
ht,
|
|
6982
6982
|
{
|
|
6983
6983
|
placeholder: "Password",
|
|
@@ -6985,9 +6985,9 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
6985
6985
|
type: "password"
|
|
6986
6986
|
}
|
|
6987
6987
|
) }),
|
|
6988
|
-
/* @__PURE__ */
|
|
6988
|
+
/* @__PURE__ */ d.jsx(gt, {})
|
|
6989
6989
|
] }),
|
|
6990
|
-
/* @__PURE__ */
|
|
6990
|
+
/* @__PURE__ */ d.jsx(ur, { type: "submit", isPending: r, children: t })
|
|
6991
6991
|
]
|
|
6992
6992
|
}
|
|
6993
6993
|
) }), Ta = ({
|
|
@@ -6995,60 +6995,66 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
6995
6995
|
onOAuthSignIn: e,
|
|
6996
6996
|
onUsernamePasswordSignIn: t
|
|
6997
6997
|
}) => {
|
|
6998
|
-
const r =
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
6998
|
+
const r = cr(), [s] = lr(), i = s.get("redirectTo"), o = n.filter(
|
|
6999
|
+
(u) => !Zn(u)
|
|
7000
|
+
);
|
|
7001
|
+
if (o.length > 0)
|
|
7002
|
+
throw new Error(
|
|
7003
|
+
`Unsupported auth provider: ${o.join(", ")}`
|
|
7004
|
+
);
|
|
7005
|
+
if (!Qn(n))
|
|
7006
|
+
throw new Error(`Unsupported auth provider: ${n.join(", ")}`);
|
|
7007
|
+
const a = Se({
|
|
7008
|
+
mutationFn: async ({ email: u, password: g }) => {
|
|
7009
|
+
await t(u, g);
|
|
7004
7010
|
},
|
|
7005
7011
|
onSuccess: () => {
|
|
7006
7012
|
r(i ?? "/");
|
|
7007
7013
|
}
|
|
7008
|
-
}),
|
|
7009
|
-
mutationFn: async ({ providerId:
|
|
7010
|
-
await e(
|
|
7014
|
+
}), c = Se({
|
|
7015
|
+
mutationFn: async ({ providerId: u }) => {
|
|
7016
|
+
await e(u);
|
|
7011
7017
|
},
|
|
7012
7018
|
onSuccess: () => {
|
|
7013
7019
|
r(i ?? "/");
|
|
7014
7020
|
}
|
|
7015
|
-
}),
|
|
7021
|
+
}), l = Jt({
|
|
7016
7022
|
defaultValues: {
|
|
7017
7023
|
email: "",
|
|
7018
7024
|
password: ""
|
|
7019
7025
|
}
|
|
7020
|
-
}),
|
|
7021
|
-
return /* @__PURE__ */
|
|
7022
|
-
/* @__PURE__ */
|
|
7023
|
-
/* @__PURE__ */
|
|
7024
|
-
/* @__PURE__ */
|
|
7026
|
+
}), f = a.isPending || c.isPending, p = a.error ?? c.error;
|
|
7027
|
+
return /* @__PURE__ */ d.jsxs(tr, { children: [
|
|
7028
|
+
/* @__PURE__ */ d.jsxs(en, { children: [
|
|
7029
|
+
/* @__PURE__ */ d.jsx(tn, { children: "Sign in" }),
|
|
7030
|
+
/* @__PURE__ */ d.jsx(nn, { children: "Sign in to your account to continue." })
|
|
7025
7031
|
] }),
|
|
7026
|
-
/* @__PURE__ */
|
|
7027
|
-
|
|
7028
|
-
/* @__PURE__ */
|
|
7029
|
-
/* @__PURE__ */
|
|
7032
|
+
/* @__PURE__ */ d.jsxs(rn, { className: "flex flex-col gap-4", children: [
|
|
7033
|
+
p && /* @__PURE__ */ d.jsxs(Xt, { variant: "destructive", children: [
|
|
7034
|
+
/* @__PURE__ */ d.jsx(Zt, { children: "Error" }),
|
|
7035
|
+
/* @__PURE__ */ d.jsx(Qt, { children: p?.message })
|
|
7030
7036
|
] }),
|
|
7031
|
-
/* @__PURE__ */
|
|
7032
|
-
|
|
7037
|
+
/* @__PURE__ */ d.jsx(
|
|
7038
|
+
er,
|
|
7033
7039
|
{
|
|
7034
|
-
form:
|
|
7035
|
-
onSubmit: (
|
|
7036
|
-
email:
|
|
7037
|
-
password:
|
|
7040
|
+
form: l,
|
|
7041
|
+
onSubmit: (u) => void a.mutate({
|
|
7042
|
+
email: u.email,
|
|
7043
|
+
password: u.password
|
|
7038
7044
|
}),
|
|
7039
7045
|
submitLabel: "Sign in",
|
|
7040
|
-
isPending:
|
|
7046
|
+
isPending: f
|
|
7041
7047
|
}
|
|
7042
7048
|
),
|
|
7043
|
-
/* @__PURE__ */
|
|
7044
|
-
/* @__PURE__ */
|
|
7045
|
-
|
|
7049
|
+
/* @__PURE__ */ d.jsx(rr, { providers: n }),
|
|
7050
|
+
/* @__PURE__ */ d.jsx(
|
|
7051
|
+
nr,
|
|
7046
7052
|
{
|
|
7047
7053
|
providers: n,
|
|
7048
|
-
onClick: (
|
|
7054
|
+
onClick: (u) => c.mutate({ providerId: u })
|
|
7049
7055
|
}
|
|
7050
7056
|
),
|
|
7051
|
-
/* @__PURE__ */
|
|
7057
|
+
/* @__PURE__ */ d.jsx(Yt, { to: "/signup", className: "text-sm text-muted-foreground", children: "Don't have an account? Sign up." })
|
|
7052
7058
|
] })
|
|
7053
7059
|
] });
|
|
7054
7060
|
}, Sa = ({
|
|
@@ -7056,7 +7062,7 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
7056
7062
|
onOAuthSignUp: e,
|
|
7057
7063
|
onUsernamePasswordSignUp: t
|
|
7058
7064
|
}) => {
|
|
7059
|
-
if (!
|
|
7065
|
+
if (!Qn(n))
|
|
7060
7066
|
throw new Error("Invalid auth provider IDs");
|
|
7061
7067
|
const r = Se({
|
|
7062
7068
|
mutationFn: async ({ email: c, password: l }) => {
|
|
@@ -7072,18 +7078,18 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
7072
7078
|
password: ""
|
|
7073
7079
|
}
|
|
7074
7080
|
}), o = r.isPending || s.isPending, a = r.error ?? s.error;
|
|
7075
|
-
return /* @__PURE__ */
|
|
7076
|
-
/* @__PURE__ */
|
|
7077
|
-
/* @__PURE__ */
|
|
7078
|
-
/* @__PURE__ */
|
|
7081
|
+
return /* @__PURE__ */ d.jsxs(tr, { children: [
|
|
7082
|
+
/* @__PURE__ */ d.jsxs(en, { children: [
|
|
7083
|
+
/* @__PURE__ */ d.jsx(tn, { children: "Sign up" }),
|
|
7084
|
+
/* @__PURE__ */ d.jsx(nn, { children: "Sign up to your account to continue." })
|
|
7079
7085
|
] }),
|
|
7080
|
-
/* @__PURE__ */
|
|
7081
|
-
a && /* @__PURE__ */
|
|
7082
|
-
/* @__PURE__ */
|
|
7083
|
-
/* @__PURE__ */
|
|
7086
|
+
/* @__PURE__ */ d.jsxs(rn, { className: "flex flex-col gap-4", children: [
|
|
7087
|
+
a && /* @__PURE__ */ d.jsxs(Xt, { variant: "destructive", children: [
|
|
7088
|
+
/* @__PURE__ */ d.jsx(Zt, { children: "Error" }),
|
|
7089
|
+
/* @__PURE__ */ d.jsx(Qt, { children: a?.message })
|
|
7084
7090
|
] }),
|
|
7085
|
-
/* @__PURE__ */
|
|
7086
|
-
|
|
7091
|
+
/* @__PURE__ */ d.jsx(
|
|
7092
|
+
er,
|
|
7087
7093
|
{
|
|
7088
7094
|
form: i,
|
|
7089
7095
|
onSubmit: (c) => void r.mutate({
|
|
@@ -7094,28 +7100,28 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
7094
7100
|
isPending: o
|
|
7095
7101
|
}
|
|
7096
7102
|
),
|
|
7097
|
-
/* @__PURE__ */
|
|
7098
|
-
/* @__PURE__ */
|
|
7099
|
-
|
|
7103
|
+
/* @__PURE__ */ d.jsx(rr, { providers: n }),
|
|
7104
|
+
/* @__PURE__ */ d.jsx(
|
|
7105
|
+
nr,
|
|
7100
7106
|
{
|
|
7101
7107
|
providers: n,
|
|
7102
7108
|
onClick: (c) => s.mutate({ providerId: c })
|
|
7103
7109
|
}
|
|
7104
7110
|
),
|
|
7105
|
-
/* @__PURE__ */
|
|
7111
|
+
/* @__PURE__ */ d.jsx(Yt, { to: "/signin", className: "text-sm text-muted-foreground", children: "Already have an account? Sign in." })
|
|
7106
7112
|
] })
|
|
7107
7113
|
] });
|
|
7108
|
-
},
|
|
7114
|
+
}, tr = fr(hr, "max-w-md w-full mt-10 mx-auto"), nr = ({
|
|
7109
7115
|
providers: n,
|
|
7110
7116
|
onClick: e
|
|
7111
|
-
}) => /* @__PURE__ */
|
|
7117
|
+
}) => /* @__PURE__ */ d.jsx(
|
|
7112
7118
|
"div",
|
|
7113
7119
|
{
|
|
7114
|
-
className:
|
|
7120
|
+
className: gr(
|
|
7115
7121
|
"grid grid-cols-2 gap-2",
|
|
7116
7122
|
n.length % 2 === 0 ? "grid-cols-2" : "grid-cols-1"
|
|
7117
7123
|
),
|
|
7118
|
-
children: n.map((t) => /* @__PURE__ */
|
|
7124
|
+
children: n.map((t) => /* @__PURE__ */ d.jsx(
|
|
7119
7125
|
ba,
|
|
7120
7126
|
{
|
|
7121
7127
|
providerId: t,
|
|
@@ -7124,8 +7130,8 @@ const ga = (n) => /* @__PURE__ */ u.jsxs("svg", { viewBox: "0 0 24 24", xmlns: "
|
|
|
7124
7130
|
t
|
|
7125
7131
|
))
|
|
7126
7132
|
}
|
|
7127
|
-
),
|
|
7128
|
-
class Ca extends
|
|
7133
|
+
), rr = ({ providers: n }) => n.length > 0 && /* @__PURE__ */ d.jsx(pr, { className: "my-3 relative", children: /* @__PURE__ */ d.jsx("span", { className: "bg-card text-muted-foreground text-sm px-2 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2", children: "or continue with" }) });
|
|
7134
|
+
class Ca extends ir {
|
|
7129
7135
|
app;
|
|
7130
7136
|
auth;
|
|
7131
7137
|
providers;
|
|
@@ -7138,7 +7144,7 @@ class Ca extends sr {
|
|
|
7138
7144
|
messagingSenderId: e.messagingSenderId,
|
|
7139
7145
|
appId: e.appId,
|
|
7140
7146
|
measurementId: e.measurementId
|
|
7141
|
-
}), this.auth =
|
|
7147
|
+
}), this.auth = ma(this.app), this.providers = e.providers ?? [];
|
|
7142
7148
|
}
|
|
7143
7149
|
async signRequest(e) {
|
|
7144
7150
|
const t = await this.auth.currentUser?.getIdToken();
|
|
@@ -7159,7 +7165,7 @@ class Ca extends sr {
|
|
|
7159
7165
|
getRoutes = () => [
|
|
7160
7166
|
{
|
|
7161
7167
|
path: "/signin",
|
|
7162
|
-
element: /* @__PURE__ */
|
|
7168
|
+
element: /* @__PURE__ */ d.jsx(
|
|
7163
7169
|
Ta,
|
|
7164
7170
|
{
|
|
7165
7171
|
providers: this.providers,
|
|
@@ -7184,7 +7190,7 @@ class Ca extends sr {
|
|
|
7184
7190
|
},
|
|
7185
7191
|
onUsernamePasswordSignIn: async (e, t) => {
|
|
7186
7192
|
try {
|
|
7187
|
-
await
|
|
7193
|
+
await to(this.auth, e, t);
|
|
7188
7194
|
} catch (r) {
|
|
7189
7195
|
throw Error(Aa(r), { cause: r });
|
|
7190
7196
|
}
|
|
@@ -7194,7 +7200,7 @@ class Ca extends sr {
|
|
|
7194
7200
|
},
|
|
7195
7201
|
{
|
|
7196
7202
|
path: "/signup",
|
|
7197
|
-
element: /* @__PURE__ */
|
|
7203
|
+
element: /* @__PURE__ */ d.jsx(
|
|
7198
7204
|
Sa,
|
|
7199
7205
|
{
|
|
7200
7206
|
providers: this.providers,
|
|
@@ -7207,18 +7213,18 @@ class Ca extends sr {
|
|
|
7207
7213
|
await Bt(this.auth, t);
|
|
7208
7214
|
},
|
|
7209
7215
|
onUsernamePasswordSignUp: async (e, t) => {
|
|
7210
|
-
await
|
|
7216
|
+
await eo(this.auth, e, t);
|
|
7211
7217
|
}
|
|
7212
7218
|
}
|
|
7213
7219
|
)
|
|
7214
7220
|
},
|
|
7215
7221
|
{
|
|
7216
7222
|
path: "/signout",
|
|
7217
|
-
element: /* @__PURE__ */
|
|
7223
|
+
element: /* @__PURE__ */ d.jsx(or, {})
|
|
7218
7224
|
}
|
|
7219
7225
|
];
|
|
7220
7226
|
signOut = async () => {
|
|
7221
|
-
await
|
|
7227
|
+
await so(this.auth), K.setState({
|
|
7222
7228
|
isAuthenticated: !1,
|
|
7223
7229
|
isPending: !1,
|
|
7224
7230
|
profile: void 0,
|
|
@@ -7245,31 +7251,31 @@ class Ca extends sr {
|
|
|
7245
7251
|
const Wa = (n) => new Ca(n), qt = async (n) => {
|
|
7246
7252
|
switch (n) {
|
|
7247
7253
|
case "google": {
|
|
7248
|
-
const { GoogleAuthProvider: e } = await import("./index.esm-
|
|
7254
|
+
const { GoogleAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7249
7255
|
return new e();
|
|
7250
7256
|
}
|
|
7251
7257
|
case "github": {
|
|
7252
|
-
const { GithubAuthProvider: e } = await import("./index.esm-
|
|
7258
|
+
const { GithubAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7253
7259
|
return new e();
|
|
7254
7260
|
}
|
|
7255
7261
|
case "facebook": {
|
|
7256
|
-
const { FacebookAuthProvider: e } = await import("./index.esm-
|
|
7262
|
+
const { FacebookAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7257
7263
|
return new e();
|
|
7258
7264
|
}
|
|
7259
7265
|
case "twitter": {
|
|
7260
|
-
const { TwitterAuthProvider: e } = await import("./index.esm-
|
|
7266
|
+
const { TwitterAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7261
7267
|
return new e();
|
|
7262
7268
|
}
|
|
7263
7269
|
case "microsoft": {
|
|
7264
|
-
const { OAuthProvider: e } = await import("./index.esm-
|
|
7270
|
+
const { OAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7265
7271
|
return new e("microsoft.com");
|
|
7266
7272
|
}
|
|
7267
7273
|
case "apple": {
|
|
7268
|
-
const { OAuthProvider: e } = await import("./index.esm-
|
|
7274
|
+
const { OAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7269
7275
|
return new e("apple.com");
|
|
7270
7276
|
}
|
|
7271
7277
|
case "yahoo": {
|
|
7272
|
-
const { OAuthProvider: e } = await import("./index.esm-
|
|
7278
|
+
const { OAuthProvider: e } = await import("./index.esm-kW-Utcsi.js");
|
|
7273
7279
|
return new e("yahoo.com");
|
|
7274
7280
|
}
|
|
7275
7281
|
}
|
|
@@ -7337,24 +7343,24 @@ export {
|
|
|
7337
7343
|
ee as b,
|
|
7338
7344
|
N as c,
|
|
7339
7345
|
ve as d,
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7346
|
+
ro as e,
|
|
7347
|
+
ao as f,
|
|
7348
|
+
ca as g,
|
|
7343
7349
|
$n as h,
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7350
|
+
ji as i,
|
|
7351
|
+
eo as j,
|
|
7352
|
+
ma as k,
|
|
7353
|
+
gi as l,
|
|
7348
7354
|
Ot as m,
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7355
|
+
yo as n,
|
|
7356
|
+
Fi as o,
|
|
7357
|
+
no as p,
|
|
7358
|
+
ni as q,
|
|
7359
|
+
wi as r,
|
|
7360
|
+
Qi as s,
|
|
7361
|
+
to as t,
|
|
7356
7362
|
Bt as u,
|
|
7357
|
-
|
|
7363
|
+
so as v,
|
|
7358
7364
|
Wa as w
|
|
7359
7365
|
};
|
|
7360
|
-
//# sourceMappingURL=firebase-
|
|
7366
|
+
//# sourceMappingURL=firebase-qUdSEL1p.js.map
|