@laboratoria/sdk-js 7.6.0-beta.5 → 8.0.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/laboratoria-sdk-es.js +516 -685
- package/dist/laboratoria-sdk-umd.js +78 -78
- package/package.json +2 -2
@@ -30,7 +30,7 @@
|
|
30
30
|
* See the License for the specific language governing permissions and
|
31
31
|
* limitations under the License.
|
32
32
|
*/
|
33
|
-
const
|
33
|
+
const Qt = function(n) {
|
34
34
|
const e = [];
|
35
35
|
let t = 0;
|
36
36
|
for (let r = 0; r < n.length; r++) {
|
@@ -38,7 +38,7 @@ const Kt = function(n) {
|
|
38
38
|
i < 128 ? e[t++] = i : i < 2048 ? (e[t++] = i >> 6 | 192, e[t++] = i & 63 | 128) : (i & 64512) === 55296 && r + 1 < n.length && (n.charCodeAt(r + 1) & 64512) === 56320 ? (i = 65536 + ((i & 1023) << 10) + (n.charCodeAt(++r) & 1023), e[t++] = i >> 18 | 240, e[t++] = i >> 12 & 63 | 128, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128) : (e[t++] = i >> 12 | 224, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128);
|
39
39
|
}
|
40
40
|
return e;
|
41
|
-
},
|
41
|
+
}, Wn = function(n) {
|
42
42
|
const e = [];
|
43
43
|
let t = 0, r = 0;
|
44
44
|
for (; t < n.length; ) {
|
@@ -57,7 +57,7 @@ const Kt = function(n) {
|
|
57
57
|
}
|
58
58
|
}
|
59
59
|
return e.join("");
|
60
|
-
},
|
60
|
+
}, Xt = {
|
61
61
|
/**
|
62
62
|
* Maps bytes to characters.
|
63
63
|
*/
|
@@ -131,7 +131,7 @@ const Kt = function(n) {
|
|
131
131
|
* @return The base64 encoded string.
|
132
132
|
*/
|
133
133
|
encodeString(n, e) {
|
134
|
-
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(
|
134
|
+
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(Qt(n), e);
|
135
135
|
},
|
136
136
|
/**
|
137
137
|
* Base64-decode a string.
|
@@ -142,7 +142,7 @@ const Kt = function(n) {
|
|
142
142
|
* @return string representing the decoded value.
|
143
143
|
*/
|
144
144
|
decodeString(n, e) {
|
145
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
145
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Wn(this.decodeStringToByteArray(n, e));
|
146
146
|
},
|
147
147
|
/**
|
148
148
|
* Base64-decode a string.
|
@@ -169,7 +169,7 @@ const Kt = function(n) {
|
|
169
169
|
++i;
|
170
170
|
const b = i < n.length ? t[n.charAt(i)] : 64;
|
171
171
|
if (++i, s == null || a == null || u == null || b == null)
|
172
|
-
throw new
|
172
|
+
throw new zn();
|
173
173
|
const S = s << 2 | a >> 4;
|
174
174
|
if (r.push(S), u !== 64) {
|
175
175
|
const O = a << 4 & 240 | u >> 2;
|
@@ -194,19 +194,19 @@ const Kt = function(n) {
|
|
194
194
|
}
|
195
195
|
}
|
196
196
|
};
|
197
|
-
class
|
197
|
+
class zn extends Error {
|
198
198
|
constructor() {
|
199
199
|
super(...arguments), this.name = "DecodeBase64StringError";
|
200
200
|
}
|
201
201
|
}
|
202
|
-
const
|
203
|
-
const e =
|
204
|
-
return
|
205
|
-
},
|
206
|
-
return
|
207
|
-
},
|
202
|
+
const Jn = function(n) {
|
203
|
+
const e = Qt(n);
|
204
|
+
return Xt.encodeByteArray(e, !0);
|
205
|
+
}, Zt = function(n) {
|
206
|
+
return Jn(n).replace(/\./g, "");
|
207
|
+
}, en = function(n) {
|
208
208
|
try {
|
209
|
-
return
|
209
|
+
return Xt.decodeString(n, !0);
|
210
210
|
} catch (e) {
|
211
211
|
console.error("base64Decode failed: ", e);
|
212
212
|
}
|
@@ -228,7 +228,7 @@ const Wn = function(n) {
|
|
228
228
|
* See the License for the specific language governing permissions and
|
229
229
|
* limitations under the License.
|
230
230
|
*/
|
231
|
-
function
|
231
|
+
function qn() {
|
232
232
|
if (typeof self < "u")
|
233
233
|
return self;
|
234
234
|
if (typeof window < "u")
|
@@ -253,13 +253,13 @@ function zn() {
|
|
253
253
|
* See the License for the specific language governing permissions and
|
254
254
|
* limitations under the License.
|
255
255
|
*/
|
256
|
-
const
|
256
|
+
const Gn = () => qn().__FIREBASE_DEFAULTS__, Kn = () => {
|
257
257
|
if (typeof process > "u" || typeof process.env > "u")
|
258
258
|
return;
|
259
259
|
const n = process.env.__FIREBASE_DEFAULTS__;
|
260
260
|
if (n)
|
261
261
|
return JSON.parse(n);
|
262
|
-
},
|
262
|
+
}, Yn = () => {
|
263
263
|
if (typeof document > "u")
|
264
264
|
return;
|
265
265
|
let n;
|
@@ -268,22 +268,22 @@ const Jn = () => zn().__FIREBASE_DEFAULTS__, qn = () => {
|
|
268
268
|
} catch {
|
269
269
|
return;
|
270
270
|
}
|
271
|
-
const e = n &&
|
271
|
+
const e = n && en(n[1]);
|
272
272
|
return e && JSON.parse(e);
|
273
273
|
}, at = () => {
|
274
274
|
try {
|
275
|
-
return
|
275
|
+
return Gn() || Kn() || Yn();
|
276
276
|
} catch (n) {
|
277
277
|
console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);
|
278
278
|
return;
|
279
279
|
}
|
280
|
-
},
|
280
|
+
}, Qn = (n) => {
|
281
281
|
var e, t;
|
282
282
|
return (t = (e = at()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
|
283
|
-
},
|
283
|
+
}, tn = () => {
|
284
284
|
var n;
|
285
285
|
return (n = at()) === null || n === void 0 ? void 0 : n.config;
|
286
|
-
},
|
286
|
+
}, nn = (n) => {
|
287
287
|
var e;
|
288
288
|
return (e = at()) === null || e === void 0 ? void 0 : e[`_${n}`];
|
289
289
|
};
|
@@ -303,7 +303,7 @@ const Jn = () => zn().__FIREBASE_DEFAULTS__, qn = () => {
|
|
303
303
|
* See the License for the specific language governing permissions and
|
304
304
|
* limitations under the License.
|
305
305
|
*/
|
306
|
-
class
|
306
|
+
class Xn {
|
307
307
|
constructor() {
|
308
308
|
this.reject = () => {
|
309
309
|
}, this.resolve = () => {
|
@@ -342,30 +342,30 @@ class Yn {
|
|
342
342
|
function P() {
|
343
343
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
344
344
|
}
|
345
|
-
function
|
345
|
+
function Zn() {
|
346
346
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
347
347
|
// just to deal with this case would probably be a bad idea.
|
348
348
|
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(P());
|
349
349
|
}
|
350
|
-
function
|
350
|
+
function er() {
|
351
351
|
const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
352
352
|
return typeof n == "object" && n.id !== void 0;
|
353
353
|
}
|
354
|
-
function
|
354
|
+
function tr() {
|
355
355
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
356
356
|
}
|
357
|
-
function
|
357
|
+
function nr() {
|
358
358
|
const n = P();
|
359
359
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
360
360
|
}
|
361
|
-
function
|
361
|
+
function rr() {
|
362
362
|
try {
|
363
363
|
return typeof indexedDB == "object";
|
364
364
|
} catch {
|
365
365
|
return !1;
|
366
366
|
}
|
367
367
|
}
|
368
|
-
function
|
368
|
+
function ir() {
|
369
369
|
return new Promise((n, e) => {
|
370
370
|
try {
|
371
371
|
let t = !0;
|
@@ -399,10 +399,10 @@ function nr() {
|
|
399
399
|
* See the License for the specific language governing permissions and
|
400
400
|
* limitations under the License.
|
401
401
|
*/
|
402
|
-
const
|
402
|
+
const sr = "FirebaseError";
|
403
403
|
class Z extends Error {
|
404
404
|
constructor(e, t, r) {
|
405
|
-
super(t), this.code = e, this.customData = r, this.name =
|
405
|
+
super(t), this.code = e, this.customData = r, this.name = sr, Object.setPrototypeOf(this, Z.prototype), Error.captureStackTrace && Error.captureStackTrace(this, be.prototype.create);
|
406
406
|
}
|
407
407
|
}
|
408
408
|
class be {
|
@@ -410,18 +410,18 @@ class be {
|
|
410
410
|
this.service = e, this.serviceName = t, this.errors = r;
|
411
411
|
}
|
412
412
|
create(e, ...t) {
|
413
|
-
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], o = s ?
|
413
|
+
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], o = s ? or(s, r) : "Error", a = `${this.serviceName}: ${o} (${i}).`;
|
414
414
|
return new Z(i, a, r);
|
415
415
|
}
|
416
416
|
}
|
417
|
-
function
|
418
|
-
return n.replace(
|
417
|
+
function or(n, e) {
|
418
|
+
return n.replace(ar, (t, r) => {
|
419
419
|
const i = e[r];
|
420
420
|
return i != null ? String(i) : `<${r}?>`;
|
421
421
|
});
|
422
422
|
}
|
423
|
-
const
|
424
|
-
function
|
423
|
+
const ar = /\{\$([^}]+)}/g;
|
424
|
+
function cr(n) {
|
425
425
|
for (const e in n)
|
426
426
|
if (Object.prototype.hasOwnProperty.call(n, e))
|
427
427
|
return !1;
|
@@ -489,11 +489,11 @@ function pe(n) {
|
|
489
489
|
const t = n.indexOf("#", e);
|
490
490
|
return n.substring(e, t > 0 ? t : void 0);
|
491
491
|
}
|
492
|
-
function
|
493
|
-
const t = new
|
492
|
+
function lr(n, e) {
|
493
|
+
const t = new dr(n, e);
|
494
494
|
return t.subscribe.bind(t);
|
495
495
|
}
|
496
|
-
class
|
496
|
+
class dr {
|
497
497
|
/**
|
498
498
|
* @param executor Function which can make calls to a single Observer
|
499
499
|
* as a proxy.
|
@@ -531,7 +531,7 @@ class cr {
|
|
531
531
|
let i;
|
532
532
|
if (e === void 0 && t === void 0 && r === void 0)
|
533
533
|
throw new Error("Missing Observer.");
|
534
|
-
|
534
|
+
ur(e, [
|
535
535
|
"next",
|
536
536
|
"error",
|
537
537
|
"complete"
|
@@ -577,7 +577,7 @@ class cr {
|
|
577
577
|
}));
|
578
578
|
}
|
579
579
|
}
|
580
|
-
function
|
580
|
+
function ur(n, e) {
|
581
581
|
if (typeof n != "object" || n === null)
|
582
582
|
return !1;
|
583
583
|
for (const t of e)
|
@@ -662,7 +662,7 @@ const te = "[DEFAULT]";
|
|
662
662
|
* See the License for the specific language governing permissions and
|
663
663
|
* limitations under the License.
|
664
664
|
*/
|
665
|
-
class
|
665
|
+
class hr {
|
666
666
|
constructor(e, t) {
|
667
667
|
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();
|
668
668
|
}
|
@@ -673,7 +673,7 @@ class dr {
|
|
673
673
|
get(e) {
|
674
674
|
const t = this.normalizeInstanceIdentifier(e);
|
675
675
|
if (!this.instancesDeferred.has(t)) {
|
676
|
-
const r = new
|
676
|
+
const r = new Xn();
|
677
677
|
if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
|
678
678
|
try {
|
679
679
|
const i = this.getOrInitializeService({
|
@@ -713,7 +713,7 @@ class dr {
|
|
713
713
|
if (this.component)
|
714
714
|
throw Error(`Component for ${this.name} has already been provided`);
|
715
715
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
716
|
-
if (
|
716
|
+
if (pr(e))
|
717
717
|
try {
|
718
718
|
this.getOrInitializeService({ instanceIdentifier: te });
|
719
719
|
} catch {
|
@@ -800,7 +800,7 @@ class dr {
|
|
800
800
|
getOrInitializeService({ instanceIdentifier: e, options: t = {} }) {
|
801
801
|
let r = this.instances.get(e);
|
802
802
|
if (!r && this.component && (r = this.component.instanceFactory(this.container, {
|
803
|
-
instanceIdentifier:
|
803
|
+
instanceIdentifier: fr(e),
|
804
804
|
options: t
|
805
805
|
}), this.instances.set(e, r), this.instancesOptions.set(e, t), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
|
806
806
|
try {
|
@@ -816,10 +816,10 @@ class dr {
|
|
816
816
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
817
817
|
}
|
818
818
|
}
|
819
|
-
function
|
819
|
+
function fr(n) {
|
820
820
|
return n === te ? void 0 : n;
|
821
821
|
}
|
822
|
-
function
|
822
|
+
function pr(n) {
|
823
823
|
return n.instantiationMode === "EAGER";
|
824
824
|
}
|
825
825
|
/**
|
@@ -838,7 +838,7 @@ function hr(n) {
|
|
838
838
|
* See the License for the specific language governing permissions and
|
839
839
|
* limitations under the License.
|
840
840
|
*/
|
841
|
-
class
|
841
|
+
class gr {
|
842
842
|
constructor(e) {
|
843
843
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
844
844
|
}
|
@@ -870,7 +870,7 @@ class fr {
|
|
870
870
|
getProvider(e) {
|
871
871
|
if (this.providers.has(e))
|
872
872
|
return this.providers.get(e);
|
873
|
-
const t = new
|
873
|
+
const t = new hr(e, this);
|
874
874
|
return this.providers.set(e, t), t;
|
875
875
|
}
|
876
876
|
getProviders() {
|
@@ -897,29 +897,29 @@ var T;
|
|
897
897
|
(function(n) {
|
898
898
|
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";
|
899
899
|
})(T || (T = {}));
|
900
|
-
const
|
900
|
+
const mr = {
|
901
901
|
debug: T.DEBUG,
|
902
902
|
verbose: T.VERBOSE,
|
903
903
|
info: T.INFO,
|
904
904
|
warn: T.WARN,
|
905
905
|
error: T.ERROR,
|
906
906
|
silent: T.SILENT
|
907
|
-
},
|
907
|
+
}, yr = T.INFO, _r = {
|
908
908
|
[T.DEBUG]: "log",
|
909
909
|
[T.VERBOSE]: "log",
|
910
910
|
[T.INFO]: "info",
|
911
911
|
[T.WARN]: "warn",
|
912
912
|
[T.ERROR]: "error"
|
913
|
-
},
|
913
|
+
}, vr = (n, e, ...t) => {
|
914
914
|
if (e < n.logLevel)
|
915
915
|
return;
|
916
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), i =
|
916
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), i = _r[e];
|
917
917
|
if (i)
|
918
918
|
console[i](`[${r}] ${n.name}:`, ...t);
|
919
919
|
else
|
920
920
|
throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`);
|
921
921
|
};
|
922
|
-
class
|
922
|
+
class rn {
|
923
923
|
/**
|
924
924
|
* Gives you an instance of a Logger to capture messages according to
|
925
925
|
* Firebase's logging scheme.
|
@@ -927,7 +927,7 @@ class tn {
|
|
927
927
|
* @param name The name that the logs will be associated with
|
928
928
|
*/
|
929
929
|
constructor(e) {
|
930
|
-
this.name = e, this._logLevel =
|
930
|
+
this.name = e, this._logLevel = yr, this._logHandler = vr, this._userLogHandler = null;
|
931
931
|
}
|
932
932
|
get logLevel() {
|
933
933
|
return this._logLevel;
|
@@ -939,7 +939,7 @@ class tn {
|
|
939
939
|
}
|
940
940
|
// Workaround for setter/getter having to be the same type.
|
941
941
|
setLogLevel(e) {
|
942
|
-
this._logLevel = typeof e == "string" ?
|
942
|
+
this._logLevel = typeof e == "string" ? mr[e] : e;
|
943
943
|
}
|
944
944
|
get logHandler() {
|
945
945
|
return this._logHandler;
|
@@ -974,9 +974,9 @@ class tn {
|
|
974
974
|
this._userLogHandler && this._userLogHandler(this, T.ERROR, ...e), this._logHandler(this, T.ERROR, ...e);
|
975
975
|
}
|
976
976
|
}
|
977
|
-
const
|
977
|
+
const br = (n, e) => e.some((t) => n instanceof t);
|
978
978
|
let bt, It;
|
979
|
-
function
|
979
|
+
function Ir() {
|
980
980
|
return bt || (bt = [
|
981
981
|
IDBDatabase,
|
982
982
|
IDBObjectStore,
|
@@ -985,15 +985,15 @@ function vr() {
|
|
985
985
|
IDBTransaction
|
986
986
|
]);
|
987
987
|
}
|
988
|
-
function
|
988
|
+
function wr() {
|
989
989
|
return It || (It = [
|
990
990
|
IDBCursor.prototype.advance,
|
991
991
|
IDBCursor.prototype.continue,
|
992
992
|
IDBCursor.prototype.continuePrimaryKey
|
993
993
|
]);
|
994
994
|
}
|
995
|
-
const
|
996
|
-
function
|
995
|
+
const sn = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap();
|
996
|
+
function Er(n) {
|
997
997
|
const e = new Promise((t, r) => {
|
998
998
|
const i = () => {
|
999
999
|
n.removeEventListener("success", s), n.removeEventListener("error", o);
|
@@ -1005,11 +1005,11 @@ function Ir(n) {
|
|
1005
1005
|
n.addEventListener("success", s), n.addEventListener("error", o);
|
1006
1006
|
});
|
1007
1007
|
return e.then((t) => {
|
1008
|
-
t instanceof IDBCursor &&
|
1008
|
+
t instanceof IDBCursor && sn.set(t, n);
|
1009
1009
|
}).catch(() => {
|
1010
1010
|
}), ct.set(e, n), e;
|
1011
1011
|
}
|
1012
|
-
function
|
1012
|
+
function Tr(n) {
|
1013
1013
|
if (Qe.has(n))
|
1014
1014
|
return;
|
1015
1015
|
const e = new Promise((t, r) => {
|
@@ -1030,7 +1030,7 @@ let Xe = {
|
|
1030
1030
|
if (e === "done")
|
1031
1031
|
return Qe.get(n);
|
1032
1032
|
if (e === "objectStoreNames")
|
1033
|
-
return n.objectStoreNames ||
|
1033
|
+
return n.objectStoreNames || on.get(n);
|
1034
1034
|
if (e === "store")
|
1035
1035
|
return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
|
1036
1036
|
}
|
@@ -1043,32 +1043,32 @@ let Xe = {
|
|
1043
1043
|
return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
|
1044
1044
|
}
|
1045
1045
|
};
|
1046
|
-
function
|
1046
|
+
function Ar(n) {
|
1047
1047
|
Xe = n(Xe);
|
1048
1048
|
}
|
1049
|
-
function
|
1049
|
+
function Sr(n) {
|
1050
1050
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
1051
1051
|
const r = n.call(Je(this), e, ...t);
|
1052
|
-
return
|
1053
|
-
} :
|
1054
|
-
return n.apply(Je(this), e), Y(
|
1052
|
+
return on.set(r, e.sort ? e.sort() : [e]), Y(r);
|
1053
|
+
} : wr().includes(n) ? function(...e) {
|
1054
|
+
return n.apply(Je(this), e), Y(sn.get(this));
|
1055
1055
|
} : function(...e) {
|
1056
1056
|
return Y(n.apply(Je(this), e));
|
1057
1057
|
};
|
1058
1058
|
}
|
1059
|
-
function
|
1060
|
-
return typeof n == "function" ?
|
1059
|
+
function Cr(n) {
|
1060
|
+
return typeof n == "function" ? Sr(n) : (n instanceof IDBTransaction && Tr(n), br(n, Ir()) ? new Proxy(n, Xe) : n);
|
1061
1061
|
}
|
1062
1062
|
function Y(n) {
|
1063
1063
|
if (n instanceof IDBRequest)
|
1064
|
-
return
|
1064
|
+
return Er(n);
|
1065
1065
|
if (ze.has(n))
|
1066
1066
|
return ze.get(n);
|
1067
|
-
const e =
|
1067
|
+
const e = Cr(n);
|
1068
1068
|
return e !== n && (ze.set(n, e), ct.set(e, n)), e;
|
1069
1069
|
}
|
1070
1070
|
const Je = (n) => ct.get(n);
|
1071
|
-
function
|
1071
|
+
function Rr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
1072
1072
|
const o = indexedDB.open(n, e), a = Y(o);
|
1073
1073
|
return r && o.addEventListener("upgradeneeded", (c) => {
|
1074
1074
|
r(Y(o.result), c.oldVersion, c.newVersion, Y(o.transaction), c);
|
@@ -1082,16 +1082,16 @@ function Sr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
1082
1082
|
}).catch(() => {
|
1083
1083
|
}), a;
|
1084
1084
|
}
|
1085
|
-
const
|
1085
|
+
const Pr = ["get", "getKey", "getAll", "getAllKeys", "count"], Or = ["put", "add", "delete", "clear"], qe = /* @__PURE__ */ new Map();
|
1086
1086
|
function wt(n, e) {
|
1087
1087
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
1088
1088
|
return;
|
1089
1089
|
if (qe.get(e))
|
1090
1090
|
return qe.get(e);
|
1091
|
-
const t = e.replace(/FromIndex$/, ""), r = e !== t, i =
|
1091
|
+
const t = e.replace(/FromIndex$/, ""), r = e !== t, i = Or.includes(t);
|
1092
1092
|
if (
|
1093
1093
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
1094
|
-
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i ||
|
1094
|
+
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Pr.includes(t))
|
1095
1095
|
)
|
1096
1096
|
return;
|
1097
1097
|
const s = async function(o, ...a) {
|
@@ -1104,7 +1104,7 @@ function wt(n, e) {
|
|
1104
1104
|
};
|
1105
1105
|
return qe.set(e, s), s;
|
1106
1106
|
}
|
1107
|
-
|
1107
|
+
Ar((n) => ({
|
1108
1108
|
...n,
|
1109
1109
|
get: (e, t, r) => wt(e, t) || n.get(e, t, r),
|
1110
1110
|
has: (e, t) => !!wt(e, t) || n.has(e, t)
|
@@ -1125,7 +1125,7 @@ Er((n) => ({
|
|
1125
1125
|
* See the License for the specific language governing permissions and
|
1126
1126
|
* limitations under the License.
|
1127
1127
|
*/
|
1128
|
-
class
|
1128
|
+
class kr {
|
1129
1129
|
constructor(e) {
|
1130
1130
|
this.container = e;
|
1131
1131
|
}
|
@@ -1133,7 +1133,7 @@ class Pr {
|
|
1133
1133
|
// auth token refresh, and installations will send this string.
|
1134
1134
|
getPlatformInfoString() {
|
1135
1135
|
return this.container.getProviders().map((t) => {
|
1136
|
-
if (
|
1136
|
+
if (Nr(t)) {
|
1137
1137
|
const r = t.getImmediate();
|
1138
1138
|
return `${r.library}/${r.version}`;
|
1139
1139
|
} else
|
@@ -1141,7 +1141,7 @@ class Pr {
|
|
1141
1141
|
}).filter((t) => t).join(" ");
|
1142
1142
|
}
|
1143
1143
|
}
|
1144
|
-
function
|
1144
|
+
function Nr(n) {
|
1145
1145
|
const e = n.getComponent();
|
1146
1146
|
return (e == null ? void 0 : e.type) === "VERSION";
|
1147
1147
|
}
|
@@ -1162,7 +1162,7 @@ const Ze = "@firebase/app", Et = "0.10.2";
|
|
1162
1162
|
* See the License for the specific language governing permissions and
|
1163
1163
|
* limitations under the License.
|
1164
1164
|
*/
|
1165
|
-
const ne = new
|
1165
|
+
const ne = new rn("@firebase/app"), Dr = "@firebase/app-compat", Lr = "@firebase/analytics-compat", $r = "@firebase/analytics", Mr = "@firebase/app-check-compat", Ur = "@firebase/app-check", jr = "@firebase/auth", Fr = "@firebase/auth-compat", Br = "@firebase/database", Vr = "@firebase/database-compat", Hr = "@firebase/functions", xr = "@firebase/functions-compat", Wr = "@firebase/installations", zr = "@firebase/installations-compat", Jr = "@firebase/messaging", qr = "@firebase/messaging-compat", Gr = "@firebase/performance", Kr = "@firebase/performance-compat", Yr = "@firebase/remote-config", Qr = "@firebase/remote-config-compat", Xr = "@firebase/storage", Zr = "@firebase/storage-compat", ei = "@firebase/firestore", ti = "@firebase/firestore-compat", ni = "firebase", ri = "10.11.1";
|
1166
1166
|
/**
|
1167
1167
|
* @license
|
1168
1168
|
* Copyright 2019 Google LLC
|
@@ -1179,33 +1179,33 @@ const ne = new tn("@firebase/app"), kr = "@firebase/app-compat", Nr = "@firebase
|
|
1179
1179
|
* See the License for the specific language governing permissions and
|
1180
1180
|
* limitations under the License.
|
1181
1181
|
*/
|
1182
|
-
const et = "[DEFAULT]",
|
1182
|
+
const et = "[DEFAULT]", ii = {
|
1183
1183
|
[Ze]: "fire-core",
|
1184
|
-
[
|
1185
|
-
[
|
1186
|
-
[
|
1187
|
-
[
|
1188
|
-
[
|
1189
|
-
[
|
1190
|
-
[
|
1191
|
-
[
|
1192
|
-
[
|
1193
|
-
[
|
1194
|
-
[
|
1195
|
-
[
|
1196
|
-
[
|
1197
|
-
[
|
1198
|
-
[
|
1199
|
-
[
|
1200
|
-
[
|
1201
|
-
[
|
1202
|
-
[
|
1203
|
-
[
|
1204
|
-
[
|
1205
|
-
[
|
1206
|
-
[
|
1184
|
+
[Dr]: "fire-core-compat",
|
1185
|
+
[$r]: "fire-analytics",
|
1186
|
+
[Lr]: "fire-analytics-compat",
|
1187
|
+
[Ur]: "fire-app-check",
|
1188
|
+
[Mr]: "fire-app-check-compat",
|
1189
|
+
[jr]: "fire-auth",
|
1190
|
+
[Fr]: "fire-auth-compat",
|
1191
|
+
[Br]: "fire-rtdb",
|
1192
|
+
[Vr]: "fire-rtdb-compat",
|
1193
|
+
[Hr]: "fire-fn",
|
1194
|
+
[xr]: "fire-fn-compat",
|
1195
|
+
[Wr]: "fire-iid",
|
1196
|
+
[zr]: "fire-iid-compat",
|
1197
|
+
[Jr]: "fire-fcm",
|
1198
|
+
[qr]: "fire-fcm-compat",
|
1199
|
+
[Gr]: "fire-perf",
|
1200
|
+
[Kr]: "fire-perf-compat",
|
1201
|
+
[Yr]: "fire-rc",
|
1202
|
+
[Qr]: "fire-rc-compat",
|
1203
|
+
[Xr]: "fire-gcs",
|
1204
|
+
[Zr]: "fire-gcs-compat",
|
1205
|
+
[ei]: "fire-fst",
|
1206
|
+
[ti]: "fire-fst-compat",
|
1207
1207
|
"fire-js": "fire-js",
|
1208
|
-
[
|
1208
|
+
[ni]: "fire-js-all"
|
1209
1209
|
};
|
1210
1210
|
/**
|
1211
1211
|
* @license
|
@@ -1223,7 +1223,7 @@ const et = "[DEFAULT]", ni = {
|
|
1223
1223
|
* See the License for the specific language governing permissions and
|
1224
1224
|
* limitations under the License.
|
1225
1225
|
*/
|
1226
|
-
const Ne = /* @__PURE__ */ new Map(),
|
1226
|
+
const Ne = /* @__PURE__ */ new Map(), si = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map();
|
1227
1227
|
function Tt(n, e) {
|
1228
1228
|
try {
|
1229
1229
|
n.container.addComponent(e);
|
@@ -1238,11 +1238,11 @@ function me(n) {
|
|
1238
1238
|
tt.set(e, n);
|
1239
1239
|
for (const t of Ne.values())
|
1240
1240
|
Tt(t, n);
|
1241
|
-
for (const t of
|
1241
|
+
for (const t of si.values())
|
1242
1242
|
Tt(t, n);
|
1243
1243
|
return !0;
|
1244
1244
|
}
|
1245
|
-
function
|
1245
|
+
function an(n, e) {
|
1246
1246
|
const t = n.container.getProvider("heartbeat").getImmediate({ optional: !0 });
|
1247
1247
|
return t && t.triggerHeartbeat(), n.container.getProvider(e);
|
1248
1248
|
}
|
@@ -1265,7 +1265,7 @@ function j(n) {
|
|
1265
1265
|
* See the License for the specific language governing permissions and
|
1266
1266
|
* limitations under the License.
|
1267
1267
|
*/
|
1268
|
-
const
|
1268
|
+
const oi = {
|
1269
1269
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
1270
1270
|
"bad-app-name": "Illegal App name: '{$appName}'",
|
1271
1271
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
@@ -1280,7 +1280,7 @@ const ii = {
|
|
1280
1280
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
1281
1281
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
1282
1282
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
1283
|
-
}, Q = new be("app", "Firebase",
|
1283
|
+
}, Q = new be("app", "Firebase", oi);
|
1284
1284
|
/**
|
1285
1285
|
* @license
|
1286
1286
|
* Copyright 2019 Google LLC
|
@@ -1297,7 +1297,7 @@ const ii = {
|
|
1297
1297
|
* See the License for the specific language governing permissions and
|
1298
1298
|
* limitations under the License.
|
1299
1299
|
*/
|
1300
|
-
class
|
1300
|
+
class ai {
|
1301
1301
|
constructor(e, t, r) {
|
1302
1302
|
this._isDeleted = !1, this._options = Object.assign({}, e), this._config = Object.assign({}, t), this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new de(
|
1303
1303
|
"app",
|
@@ -1355,8 +1355,8 @@ class si {
|
|
1355
1355
|
* See the License for the specific language governing permissions and
|
1356
1356
|
* limitations under the License.
|
1357
1357
|
*/
|
1358
|
-
const we =
|
1359
|
-
function
|
1358
|
+
const we = ri;
|
1359
|
+
function cn(n, e = {}) {
|
1360
1360
|
let t = n;
|
1361
1361
|
typeof e != "object" && (e = { name: e });
|
1362
1362
|
const r = Object.assign({ name: et, automaticDataCollectionEnabled: !1 }, e), i = r.name;
|
@@ -1364,7 +1364,7 @@ function on(n, e = {}) {
|
|
1364
1364
|
throw Q.create("bad-app-name", {
|
1365
1365
|
appName: String(i)
|
1366
1366
|
});
|
1367
|
-
if (t || (t =
|
1367
|
+
if (t || (t = tn()), !t)
|
1368
1368
|
throw Q.create(
|
1369
1369
|
"no-options"
|
1370
1370
|
/* AppError.NO_OPTIONS */
|
@@ -1375,23 +1375,23 @@ function on(n, e = {}) {
|
|
1375
1375
|
return s;
|
1376
1376
|
throw Q.create("duplicate-app", { appName: i });
|
1377
1377
|
}
|
1378
|
-
const o = new
|
1378
|
+
const o = new gr(i);
|
1379
1379
|
for (const c of tt.values())
|
1380
1380
|
o.addComponent(c);
|
1381
|
-
const a = new
|
1381
|
+
const a = new ai(t, r, o);
|
1382
1382
|
return Ne.set(i, a), a;
|
1383
1383
|
}
|
1384
|
-
function
|
1384
|
+
function ci(n = et) {
|
1385
1385
|
const e = Ne.get(n);
|
1386
|
-
if (!e && n === et &&
|
1387
|
-
return
|
1386
|
+
if (!e && n === et && tn())
|
1387
|
+
return cn();
|
1388
1388
|
if (!e)
|
1389
1389
|
throw Q.create("no-app", { appName: n });
|
1390
1390
|
return e;
|
1391
1391
|
}
|
1392
1392
|
function oe(n, e, t) {
|
1393
1393
|
var r;
|
1394
|
-
let i = (r =
|
1394
|
+
let i = (r = ii[n]) !== null && r !== void 0 ? r : n;
|
1395
1395
|
t && (i += `-${t}`);
|
1396
1396
|
const s = i.match(/\s|\//), o = e.match(/\s|\//);
|
1397
1397
|
if (s || o) {
|
@@ -1424,10 +1424,10 @@ function oe(n, e, t) {
|
|
1424
1424
|
* See the License for the specific language governing permissions and
|
1425
1425
|
* limitations under the License.
|
1426
1426
|
*/
|
1427
|
-
const
|
1427
|
+
const li = "firebase-heartbeat-database", di = 1, ye = "firebase-heartbeat-store";
|
1428
1428
|
let Ge = null;
|
1429
|
-
function
|
1430
|
-
return Ge || (Ge =
|
1429
|
+
function ln() {
|
1430
|
+
return Ge || (Ge = Rr(li, di, {
|
1431
1431
|
upgrade: (n, e) => {
|
1432
1432
|
switch (e) {
|
1433
1433
|
case 0:
|
@@ -1444,9 +1444,9 @@ function an() {
|
|
1444
1444
|
});
|
1445
1445
|
})), Ge;
|
1446
1446
|
}
|
1447
|
-
async function
|
1447
|
+
async function ui(n) {
|
1448
1448
|
try {
|
1449
|
-
const t = (await
|
1449
|
+
const t = (await ln()).transaction(ye), r = await t.objectStore(ye).get(dn(n));
|
1450
1450
|
return await t.done, r;
|
1451
1451
|
} catch (e) {
|
1452
1452
|
if (e instanceof Z)
|
@@ -1461,8 +1461,8 @@ async function li(n) {
|
|
1461
1461
|
}
|
1462
1462
|
async function At(n, e) {
|
1463
1463
|
try {
|
1464
|
-
const r = (await
|
1465
|
-
await r.objectStore(ye).put(e,
|
1464
|
+
const r = (await ln()).transaction(ye, "readwrite");
|
1465
|
+
await r.objectStore(ye).put(e, dn(n)), await r.done;
|
1466
1466
|
} catch (t) {
|
1467
1467
|
if (t instanceof Z)
|
1468
1468
|
ne.warn(t.message);
|
@@ -1474,7 +1474,7 @@ async function At(n, e) {
|
|
1474
1474
|
}
|
1475
1475
|
}
|
1476
1476
|
}
|
1477
|
-
function
|
1477
|
+
function dn(n) {
|
1478
1478
|
return `${n.name}!${n.options.appId}`;
|
1479
1479
|
}
|
1480
1480
|
/**
|
@@ -1493,12 +1493,12 @@ function cn(n) {
|
|
1493
1493
|
* See the License for the specific language governing permissions and
|
1494
1494
|
* limitations under the License.
|
1495
1495
|
*/
|
1496
|
-
const
|
1497
|
-
class
|
1496
|
+
const hi = 1024, fi = 30 * 24 * 60 * 60 * 1e3;
|
1497
|
+
class pi {
|
1498
1498
|
constructor(e) {
|
1499
1499
|
this.container = e, this._heartbeatsCache = null;
|
1500
1500
|
const t = this.container.getProvider("app").getImmediate();
|
1501
|
-
this._storage = new
|
1501
|
+
this._storage = new mi(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
1502
1502
|
}
|
1503
1503
|
/**
|
1504
1504
|
* Called to report a heartbeat. The function will generate
|
@@ -1513,7 +1513,7 @@ class hi {
|
|
1513
1513
|
if (!(((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((t = this._heartbeatsCache) === null || t === void 0 ? void 0 : t.heartbeats) == null)) && !(this._heartbeatsCache.lastSentHeartbeatDate === s || this._heartbeatsCache.heartbeats.some((o) => o.date === s)))
|
1514
1514
|
return this._heartbeatsCache.heartbeats.push({ date: s, agent: i }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((o) => {
|
1515
1515
|
const a = new Date(o.date).valueOf();
|
1516
|
-
return Date.now() - a <=
|
1516
|
+
return Date.now() - a <= fi;
|
1517
1517
|
}), this._storage.overwrite(this._heartbeatsCache);
|
1518
1518
|
}
|
1519
1519
|
/**
|
@@ -1527,14 +1527,14 @@ class hi {
|
|
1527
1527
|
var e;
|
1528
1528
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
|
1529
1529
|
return "";
|
1530
|
-
const t = St(), { heartbeatsToSend: r, unsentEntries: i } =
|
1530
|
+
const t = St(), { heartbeatsToSend: r, unsentEntries: i } = gi(this._heartbeatsCache.heartbeats), s = Zt(JSON.stringify({ version: 2, heartbeats: r }));
|
1531
1531
|
return this._heartbeatsCache.lastSentHeartbeatDate = t, i.length > 0 ? (this._heartbeatsCache.heartbeats = i, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
|
1532
1532
|
}
|
1533
1533
|
}
|
1534
1534
|
function St() {
|
1535
1535
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
1536
1536
|
}
|
1537
|
-
function
|
1537
|
+
function gi(n, e = hi) {
|
1538
1538
|
const t = [];
|
1539
1539
|
let r = n.slice();
|
1540
1540
|
for (const i of n) {
|
@@ -1558,19 +1558,19 @@ function fi(n, e = di) {
|
|
1558
1558
|
unsentEntries: r
|
1559
1559
|
};
|
1560
1560
|
}
|
1561
|
-
class
|
1561
|
+
class mi {
|
1562
1562
|
constructor(e) {
|
1563
1563
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
1564
1564
|
}
|
1565
1565
|
async runIndexedDBEnvironmentCheck() {
|
1566
|
-
return
|
1566
|
+
return rr() ? ir().then(() => !0).catch(() => !1) : !1;
|
1567
1567
|
}
|
1568
1568
|
/**
|
1569
1569
|
* Read all heartbeats.
|
1570
1570
|
*/
|
1571
1571
|
async read() {
|
1572
1572
|
if (await this._canUseIndexedDBPromise) {
|
1573
|
-
const t = await
|
1573
|
+
const t = await ui(this.app);
|
1574
1574
|
return t != null && t.heartbeats ? t : { heartbeats: [] };
|
1575
1575
|
} else
|
1576
1576
|
return { heartbeats: [] };
|
@@ -1604,7 +1604,7 @@ class pi {
|
|
1604
1604
|
}
|
1605
1605
|
}
|
1606
1606
|
function Ct(n) {
|
1607
|
-
return
|
1607
|
+
return Zt(
|
1608
1608
|
// heartbeatsCache wrapper properties
|
1609
1609
|
JSON.stringify({ version: 2, heartbeats: n })
|
1610
1610
|
).length;
|
@@ -1625,21 +1625,21 @@ function Ct(n) {
|
|
1625
1625
|
* See the License for the specific language governing permissions and
|
1626
1626
|
* limitations under the License.
|
1627
1627
|
*/
|
1628
|
-
function
|
1628
|
+
function yi(n) {
|
1629
1629
|
me(new de(
|
1630
1630
|
"platform-logger",
|
1631
|
-
(e) => new
|
1631
|
+
(e) => new kr(e),
|
1632
1632
|
"PRIVATE"
|
1633
1633
|
/* ComponentType.PRIVATE */
|
1634
1634
|
)), me(new de(
|
1635
1635
|
"heartbeat",
|
1636
|
-
(e) => new
|
1636
|
+
(e) => new pi(e),
|
1637
1637
|
"PRIVATE"
|
1638
1638
|
/* ComponentType.PRIVATE */
|
1639
1639
|
)), oe(Ze, Et, n), oe(Ze, Et, "esm2017"), oe("fire-js", "");
|
1640
1640
|
}
|
1641
|
-
|
1642
|
-
var
|
1641
|
+
yi("");
|
1642
|
+
var _i = "firebase", vi = "10.11.1";
|
1643
1643
|
/**
|
1644
1644
|
* @license
|
1645
1645
|
* Copyright 2020 Google LLC
|
@@ -1656,7 +1656,7 @@ var mi = "firebase", yi = "10.11.1";
|
|
1656
1656
|
* See the License for the specific language governing permissions and
|
1657
1657
|
* limitations under the License.
|
1658
1658
|
*/
|
1659
|
-
oe(
|
1659
|
+
oe(_i, vi, "app");
|
1660
1660
|
function lt(n, e) {
|
1661
1661
|
var t = {};
|
1662
1662
|
for (var r in n)
|
@@ -1666,12 +1666,12 @@ function lt(n, e) {
|
|
1666
1666
|
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
|
1667
1667
|
return t;
|
1668
1668
|
}
|
1669
|
-
function
|
1669
|
+
function un() {
|
1670
1670
|
return {
|
1671
1671
|
"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."
|
1672
1672
|
};
|
1673
1673
|
}
|
1674
|
-
const
|
1674
|
+
const bi = un, hn = new be("auth", "Firebase", un());
|
1675
1675
|
/**
|
1676
1676
|
* @license
|
1677
1677
|
* Copyright 2020 Google LLC
|
@@ -1688,8 +1688,8 @@ const _i = ln, dn = new be("auth", "Firebase", ln());
|
|
1688
1688
|
* See the License for the specific language governing permissions and
|
1689
1689
|
* limitations under the License.
|
1690
1690
|
*/
|
1691
|
-
const De = new
|
1692
|
-
function
|
1691
|
+
const De = new rn("@firebase/auth");
|
1692
|
+
function Ii(n, ...e) {
|
1693
1693
|
De.logLevel <= T.WARN && De.warn(`Auth (${we}): ${n}`, ...e);
|
1694
1694
|
}
|
1695
1695
|
function Ce(n, ...e) {
|
@@ -1717,21 +1717,21 @@ function L(n, ...e) {
|
|
1717
1717
|
function $(n, ...e) {
|
1718
1718
|
return dt(n, ...e);
|
1719
1719
|
}
|
1720
|
-
function
|
1721
|
-
const r = Object.assign(Object.assign({},
|
1720
|
+
function fn(n, e, t) {
|
1721
|
+
const r = Object.assign(Object.assign({}, bi()), { [e]: t });
|
1722
1722
|
return new be("auth", "Firebase", r).create(e, {
|
1723
1723
|
appName: n.name
|
1724
1724
|
});
|
1725
1725
|
}
|
1726
1726
|
function X(n) {
|
1727
|
-
return
|
1727
|
+
return fn(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
1728
1728
|
}
|
1729
1729
|
function dt(n, ...e) {
|
1730
1730
|
if (typeof n != "string") {
|
1731
1731
|
const t = e[0], r = [...e.slice(1)];
|
1732
1732
|
return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
|
1733
1733
|
}
|
1734
|
-
return
|
1734
|
+
return hn.create(n, ...e);
|
1735
1735
|
}
|
1736
1736
|
function y(n, e, ...t) {
|
1737
1737
|
if (!n)
|
@@ -1764,7 +1764,7 @@ function nt() {
|
|
1764
1764
|
var n;
|
1765
1765
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
1766
1766
|
}
|
1767
|
-
function
|
1767
|
+
function wi() {
|
1768
1768
|
return Rt() === "http:" || Rt() === "https:";
|
1769
1769
|
}
|
1770
1770
|
function Rt() {
|
@@ -1787,15 +1787,15 @@ function Rt() {
|
|
1787
1787
|
* See the License for the specific language governing permissions and
|
1788
1788
|
* limitations under the License.
|
1789
1789
|
*/
|
1790
|
-
function
|
1790
|
+
function Ei() {
|
1791
1791
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
1792
1792
|
// This is especially true for Cordova apps which have unreliable
|
1793
1793
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
1794
1794
|
// installed which overwrites the native navigator.onLine value and
|
1795
1795
|
// defines navigator.connection.
|
1796
|
-
(
|
1796
|
+
(wi() || er() || "connection" in navigator) ? navigator.onLine : !0;
|
1797
1797
|
}
|
1798
|
-
function
|
1798
|
+
function Ti() {
|
1799
1799
|
if (typeof navigator > "u")
|
1800
1800
|
return null;
|
1801
1801
|
const n = navigator;
|
@@ -1825,10 +1825,10 @@ function wi() {
|
|
1825
1825
|
*/
|
1826
1826
|
class Ee {
|
1827
1827
|
constructor(e, t) {
|
1828
|
-
this.shortDelay = e, this.longDelay = t, H(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
1828
|
+
this.shortDelay = e, this.longDelay = t, H(t > e, "Short delay should be less than long delay!"), this.isMobile = Zn() || tr();
|
1829
1829
|
}
|
1830
1830
|
get() {
|
1831
|
-
return
|
1831
|
+
return Ei() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
1832
1832
|
}
|
1833
1833
|
}
|
1834
1834
|
/**
|
@@ -1868,7 +1868,7 @@ function ut(n, e) {
|
|
1868
1868
|
* See the License for the specific language governing permissions and
|
1869
1869
|
* limitations under the License.
|
1870
1870
|
*/
|
1871
|
-
class
|
1871
|
+
class pn {
|
1872
1872
|
static initialize(e, t, r) {
|
1873
1873
|
this.fetchImpl = e, t && (this.headersImpl = t), r && (this.responseImpl = r);
|
1874
1874
|
}
|
@@ -1922,7 +1922,7 @@ class hn {
|
|
1922
1922
|
* See the License for the specific language governing permissions and
|
1923
1923
|
* limitations under the License.
|
1924
1924
|
*/
|
1925
|
-
const
|
1925
|
+
const Ai = {
|
1926
1926
|
// Custom token errors.
|
1927
1927
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
1928
1928
|
// This can only happen if the SDK sends a bad request.
|
@@ -2013,12 +2013,12 @@ const Ei = {
|
|
2013
2013
|
* See the License for the specific language governing permissions and
|
2014
2014
|
* limitations under the License.
|
2015
2015
|
*/
|
2016
|
-
const
|
2016
|
+
const Si = new Ee(3e4, 6e4);
|
2017
2017
|
function ee(n, e) {
|
2018
2018
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
2019
2019
|
}
|
2020
2020
|
async function W(n, e, t, r, i = {}) {
|
2021
|
-
return
|
2021
|
+
return gn(n, i, async () => {
|
2022
2022
|
let s = {}, o = {};
|
2023
2023
|
r && (e === "GET" ? o = r : s = {
|
2024
2024
|
body: JSON.stringify(r)
|
@@ -2030,18 +2030,18 @@ async function W(n, e, t, r, i = {}) {
|
|
2030
2030
|
] = "application/json", n.languageCode && (c[
|
2031
2031
|
"X-Firebase-Locale"
|
2032
2032
|
/* HttpHeader.X_FIREBASE_LOCALE */
|
2033
|
-
] = n.languageCode),
|
2033
|
+
] = n.languageCode), pn.fetch()(mn(n, n.config.apiHost, t, a), Object.assign({
|
2034
2034
|
method: e,
|
2035
2035
|
headers: c,
|
2036
2036
|
referrerPolicy: "no-referrer"
|
2037
2037
|
}, s));
|
2038
2038
|
});
|
2039
2039
|
}
|
2040
|
-
async function
|
2040
|
+
async function gn(n, e, t) {
|
2041
2041
|
n._canInitEmulator = !1;
|
2042
|
-
const r = Object.assign(Object.assign({},
|
2042
|
+
const r = Object.assign(Object.assign({}, Ai), e);
|
2043
2043
|
try {
|
2044
|
-
const i = new
|
2044
|
+
const i = new Ri(n), s = await Promise.race([
|
2045
2045
|
t(),
|
2046
2046
|
i.promise
|
2047
2047
|
]);
|
@@ -2061,7 +2061,7 @@ async function fn(n, e, t) {
|
|
2061
2061
|
throw Se(n, "user-disabled", o);
|
2062
2062
|
const _ = r[c] || c.toLowerCase().replace(/[_\s]+/g, "-");
|
2063
2063
|
if (u)
|
2064
|
-
throw
|
2064
|
+
throw fn(n, _, u);
|
2065
2065
|
L(n, _);
|
2066
2066
|
}
|
2067
2067
|
} catch (i) {
|
@@ -2076,11 +2076,11 @@ async function Fe(n, e, t, r, i = {}) {
|
|
2076
2076
|
_serverResponse: s
|
2077
2077
|
}), s;
|
2078
2078
|
}
|
2079
|
-
function
|
2079
|
+
function mn(n, e, t, r) {
|
2080
2080
|
const i = `${e}${t}?${r}`;
|
2081
2081
|
return n.config.emulator ? ut(n.config, i) : `${n.config.apiScheme}://${i}`;
|
2082
2082
|
}
|
2083
|
-
function
|
2083
|
+
function Ci(n) {
|
2084
2084
|
switch (n) {
|
2085
2085
|
case "ENFORCE":
|
2086
2086
|
return "ENFORCE";
|
@@ -2092,14 +2092,14 @@ function Ai(n) {
|
|
2092
2092
|
return "ENFORCEMENT_STATE_UNSPECIFIED";
|
2093
2093
|
}
|
2094
2094
|
}
|
2095
|
-
class
|
2095
|
+
class Ri {
|
2096
2096
|
constructor(e) {
|
2097
2097
|
this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
|
2098
2098
|
this.timer = setTimeout(() => r($(
|
2099
2099
|
this.auth,
|
2100
2100
|
"network-request-failed"
|
2101
2101
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
2102
|
-
)),
|
2102
|
+
)), Si.get());
|
2103
2103
|
});
|
2104
2104
|
}
|
2105
2105
|
clearNetworkTimeout() {
|
@@ -2117,7 +2117,7 @@ function Se(n, e, t) {
|
|
2117
2117
|
function Pt(n) {
|
2118
2118
|
return n !== void 0 && n.enterprise !== void 0;
|
2119
2119
|
}
|
2120
|
-
class
|
2120
|
+
class Pi {
|
2121
2121
|
constructor(e) {
|
2122
2122
|
if (this.siteKey = "", this.recaptchaEnforcementState = [], e.recaptchaKey === void 0)
|
2123
2123
|
throw new Error("recaptchaKey undefined");
|
@@ -2134,7 +2134,7 @@ class Ci {
|
|
2134
2134
|
return null;
|
2135
2135
|
for (const t of this.recaptchaEnforcementState)
|
2136
2136
|
if (t.provider && t.provider === e)
|
2137
|
-
return
|
2137
|
+
return Ci(t.enforcementState);
|
2138
2138
|
return null;
|
2139
2139
|
}
|
2140
2140
|
/**
|
@@ -2147,7 +2147,7 @@ class Ci {
|
|
2147
2147
|
return this.getProviderEnforcementState(e) === "ENFORCE" || this.getProviderEnforcementState(e) === "AUDIT";
|
2148
2148
|
}
|
2149
2149
|
}
|
2150
|
-
async function
|
2150
|
+
async function Oi(n, e) {
|
2151
2151
|
return W(n, "GET", "/v2/recaptchaConfig", ee(n, e));
|
2152
2152
|
}
|
2153
2153
|
/**
|
@@ -2166,10 +2166,10 @@ async function Ri(n, e) {
|
|
2166
2166
|
* See the License for the specific language governing permissions and
|
2167
2167
|
* limitations under the License.
|
2168
2168
|
*/
|
2169
|
-
async function
|
2169
|
+
async function ki(n, e) {
|
2170
2170
|
return W(n, "POST", "/v1/accounts:delete", e);
|
2171
2171
|
}
|
2172
|
-
async function
|
2172
|
+
async function yn(n, e) {
|
2173
2173
|
return W(n, "POST", "/v1/accounts:lookup", e);
|
2174
2174
|
}
|
2175
2175
|
/**
|
@@ -2197,7 +2197,7 @@ function ge(n) {
|
|
2197
2197
|
} catch {
|
2198
2198
|
}
|
2199
2199
|
}
|
2200
|
-
async function
|
2200
|
+
async function Ni(n, e = !1) {
|
2201
2201
|
const t = x(n), r = await t.getIdToken(e), i = ht(r);
|
2202
2202
|
y(
|
2203
2203
|
i && i.exp && i.auth_time && i.iat,
|
@@ -2224,7 +2224,7 @@ function ht(n) {
|
|
2224
2224
|
if (e === void 0 || t === void 0 || r === void 0)
|
2225
2225
|
return Ce("JWT malformed, contained fewer than 3 sections"), null;
|
2226
2226
|
try {
|
2227
|
-
const i =
|
2227
|
+
const i = en(t);
|
2228
2228
|
return i ? JSON.parse(i) : (Ce("Failed to decode base64 JWT payload"), null);
|
2229
2229
|
} catch (i) {
|
2230
2230
|
return Ce("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
|
@@ -2268,10 +2268,10 @@ async function _e(n, e, t = !1) {
|
|
2268
2268
|
try {
|
2269
2269
|
return await e;
|
2270
2270
|
} catch (r) {
|
2271
|
-
throw r instanceof Z &&
|
2271
|
+
throw r instanceof Z && Di(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
2272
2272
|
}
|
2273
2273
|
}
|
2274
|
-
function
|
2274
|
+
function Di({ code: n }) {
|
2275
2275
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
2276
2276
|
}
|
2277
2277
|
/**
|
@@ -2290,7 +2290,7 @@ function ki({ code: n }) {
|
|
2290
2290
|
* See the License for the specific language governing permissions and
|
2291
2291
|
* limitations under the License.
|
2292
2292
|
*/
|
2293
|
-
class
|
2293
|
+
class Li {
|
2294
2294
|
constructor(e) {
|
2295
2295
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
2296
2296
|
}
|
@@ -2387,7 +2387,7 @@ class rt {
|
|
2387
2387
|
*/
|
2388
2388
|
async function Le(n) {
|
2389
2389
|
var e;
|
2390
|
-
const t = n.auth, r = await n.getIdToken(), i = await _e(n,
|
2390
|
+
const t = n.auth, r = await n.getIdToken(), i = await _e(n, yn(t, { idToken: r }));
|
2391
2391
|
y(
|
2392
2392
|
i == null ? void 0 : i.users.length,
|
2393
2393
|
t,
|
@@ -2396,7 +2396,7 @@ async function Le(n) {
|
|
2396
2396
|
);
|
2397
2397
|
const s = i.users[0];
|
2398
2398
|
n._notifyReloadListener(s);
|
2399
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ?
|
2399
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? _n(s.providerUserInfo) : [], a = Mi(n.providerData, o), c = n.isAnonymous, u = !(n.email && s.passwordHash) && !(a != null && a.length), _ = c ? u : !1, b = {
|
2400
2400
|
uid: s.localId,
|
2401
2401
|
displayName: s.displayName || null,
|
2402
2402
|
photoURL: s.photoUrl || null,
|
@@ -2410,14 +2410,14 @@ async function Le(n) {
|
|
2410
2410
|
};
|
2411
2411
|
Object.assign(n, b);
|
2412
2412
|
}
|
2413
|
-
async function
|
2413
|
+
async function $i(n) {
|
2414
2414
|
const e = x(n);
|
2415
2415
|
await Le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
2416
2416
|
}
|
2417
|
-
function
|
2417
|
+
function Mi(n, e) {
|
2418
2418
|
return [...n.filter((r) => !e.some((i) => i.providerId === r.providerId)), ...e];
|
2419
2419
|
}
|
2420
|
-
function
|
2420
|
+
function _n(n) {
|
2421
2421
|
return n.map((e) => {
|
2422
2422
|
var { providerId: t } = e, r = lt(e, ["providerId"]);
|
2423
2423
|
return {
|
@@ -2446,16 +2446,16 @@ function mn(n) {
|
|
2446
2446
|
* See the License for the specific language governing permissions and
|
2447
2447
|
* limitations under the License.
|
2448
2448
|
*/
|
2449
|
-
async function
|
2450
|
-
const t = await
|
2449
|
+
async function Ui(n, e) {
|
2450
|
+
const t = await gn(n, {}, async () => {
|
2451
2451
|
const r = Ie({
|
2452
2452
|
grant_type: "refresh_token",
|
2453
2453
|
refresh_token: e
|
2454
|
-
}).slice(1), { tokenApiHost: i, apiKey: s } = n.config, o =
|
2454
|
+
}).slice(1), { tokenApiHost: i, apiKey: s } = n.config, o = mn(n, i, "/v1/token", `key=${s}`), a = await n._getAdditionalHeaders();
|
2455
2455
|
return a[
|
2456
2456
|
"Content-Type"
|
2457
2457
|
/* HttpHeader.CONTENT_TYPE */
|
2458
|
-
] = "application/x-www-form-urlencoded",
|
2458
|
+
] = "application/x-www-form-urlencoded", pn.fetch()(o, {
|
2459
2459
|
method: "POST",
|
2460
2460
|
headers: a,
|
2461
2461
|
body: r
|
@@ -2467,7 +2467,7 @@ async function $i(n, e) {
|
|
2467
2467
|
refreshToken: t.refresh_token
|
2468
2468
|
};
|
2469
2469
|
}
|
2470
|
-
async function
|
2470
|
+
async function ji(n, e) {
|
2471
2471
|
return W(n, "POST", "/v2/accounts:revokeToken", ee(n, e));
|
2472
2472
|
}
|
2473
2473
|
/**
|
@@ -2531,7 +2531,7 @@ class ae {
|
|
2531
2531
|
this.refreshToken = null;
|
2532
2532
|
}
|
2533
2533
|
async refresh(e, t) {
|
2534
|
-
const { accessToken: r, refreshToken: i, expiresIn: s } = await
|
2534
|
+
const { accessToken: r, refreshToken: i, expiresIn: s } = await Ui(e, t);
|
2535
2535
|
this.updateTokensAndExpiration(r, i, Number(s));
|
2536
2536
|
}
|
2537
2537
|
updateTokensAndExpiration(e, t, r) {
|
@@ -2586,7 +2586,7 @@ function z(n, e) {
|
|
2586
2586
|
class B {
|
2587
2587
|
constructor(e) {
|
2588
2588
|
var { uid: t, auth: r, stsTokenManager: i } = e, s = lt(e, ["uid", "auth", "stsTokenManager"]);
|
2589
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
2589
|
+
this.providerId = "firebase", this.proactiveRefresh = new Li(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new rt(s.createdAt || void 0, s.lastLoginAt || void 0);
|
2590
2590
|
}
|
2591
2591
|
async getIdToken(e) {
|
2592
2592
|
const t = await _e(this, this.stsTokenManager.getToken(this.auth, e));
|
@@ -2598,10 +2598,10 @@ class B {
|
|
2598
2598
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
2599
2599
|
}
|
2600
2600
|
getIdTokenResult(e) {
|
2601
|
-
return
|
2601
|
+
return Ni(this, e);
|
2602
2602
|
}
|
2603
2603
|
reload() {
|
2604
|
-
return
|
2604
|
+
return $i(this);
|
2605
2605
|
}
|
2606
2606
|
_assign(e) {
|
2607
2607
|
this !== e && (y(
|
@@ -2640,7 +2640,7 @@ class B {
|
|
2640
2640
|
if (j(this.auth.app))
|
2641
2641
|
return Promise.reject(X(this.auth));
|
2642
2642
|
const e = await this.getIdToken();
|
2643
|
-
return await _e(this,
|
2643
|
+
return await _e(this, ki(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
2644
2644
|
}
|
2645
2645
|
toJSON() {
|
2646
2646
|
return Object.assign(Object.assign({
|
@@ -2736,7 +2736,7 @@ class B {
|
|
2736
2736
|
"internal-error"
|
2737
2737
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2738
2738
|
);
|
2739
|
-
const s = i.providerUserInfo !== void 0 ?
|
2739
|
+
const s = i.providerUserInfo !== void 0 ? _n(i.providerUserInfo) : [], o = !(i.email && i.passwordHash) && !(s != null && s.length), a = new ae();
|
2740
2740
|
a.updateFromIdToken(r);
|
2741
2741
|
const c = new B({
|
2742
2742
|
uid: i.localId,
|
@@ -2796,7 +2796,7 @@ function V(n) {
|
|
2796
2796
|
* See the License for the specific language governing permissions and
|
2797
2797
|
* limitations under the License.
|
2798
2798
|
*/
|
2799
|
-
class
|
2799
|
+
class vn {
|
2800
2800
|
constructor() {
|
2801
2801
|
this.type = "NONE", this.storage = {};
|
2802
2802
|
}
|
@@ -2818,8 +2818,8 @@ class yn {
|
|
2818
2818
|
_removeListener(e, t) {
|
2819
2819
|
}
|
2820
2820
|
}
|
2821
|
-
|
2822
|
-
const Nt =
|
2821
|
+
vn.type = "NONE";
|
2822
|
+
const Nt = vn;
|
2823
2823
|
/**
|
2824
2824
|
* @license
|
2825
2825
|
* Copyright 2019 Google LLC
|
@@ -2918,25 +2918,25 @@ function Dt(n) {
|
|
2918
2918
|
const e = n.toLowerCase();
|
2919
2919
|
if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
|
2920
2920
|
return "Opera";
|
2921
|
-
if (
|
2921
|
+
if (wn(e))
|
2922
2922
|
return "IEMobile";
|
2923
2923
|
if (e.includes("msie") || e.includes("trident/"))
|
2924
2924
|
return "IE";
|
2925
2925
|
if (e.includes("edge/"))
|
2926
2926
|
return "Edge";
|
2927
|
-
if (
|
2927
|
+
if (bn(e))
|
2928
2928
|
return "Firefox";
|
2929
2929
|
if (e.includes("silk/"))
|
2930
2930
|
return "Silk";
|
2931
|
-
if (
|
2931
|
+
if (Tn(e))
|
2932
2932
|
return "Blackberry";
|
2933
|
-
if (
|
2933
|
+
if (An(e))
|
2934
2934
|
return "Webos";
|
2935
2935
|
if (ft(e))
|
2936
2936
|
return "Safari";
|
2937
|
-
if ((e.includes("chrome/") ||
|
2937
|
+
if ((e.includes("chrome/") || In(e)) && !e.includes("edge/"))
|
2938
2938
|
return "Chrome";
|
2939
|
-
if (
|
2939
|
+
if (En(e))
|
2940
2940
|
return "Android";
|
2941
2941
|
{
|
2942
2942
|
const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, r = n.match(t);
|
@@ -2945,42 +2945,42 @@ function Dt(n) {
|
|
2945
2945
|
}
|
2946
2946
|
return "Other";
|
2947
2947
|
}
|
2948
|
-
function
|
2948
|
+
function bn(n = P()) {
|
2949
2949
|
return /firefox\//i.test(n);
|
2950
2950
|
}
|
2951
2951
|
function ft(n = P()) {
|
2952
2952
|
const e = n.toLowerCase();
|
2953
2953
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
2954
2954
|
}
|
2955
|
-
function
|
2955
|
+
function In(n = P()) {
|
2956
2956
|
return /crios\//i.test(n);
|
2957
2957
|
}
|
2958
|
-
function
|
2958
|
+
function wn(n = P()) {
|
2959
2959
|
return /iemobile/i.test(n);
|
2960
2960
|
}
|
2961
|
-
function
|
2961
|
+
function En(n = P()) {
|
2962
2962
|
return /android/i.test(n);
|
2963
2963
|
}
|
2964
|
-
function
|
2964
|
+
function Tn(n = P()) {
|
2965
2965
|
return /blackberry/i.test(n);
|
2966
2966
|
}
|
2967
|
-
function
|
2967
|
+
function An(n = P()) {
|
2968
2968
|
return /webos/i.test(n);
|
2969
2969
|
}
|
2970
2970
|
function Be(n = P()) {
|
2971
2971
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
2972
2972
|
}
|
2973
|
-
function
|
2973
|
+
function Fi(n = P()) {
|
2974
2974
|
var e;
|
2975
2975
|
return Be(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
2976
2976
|
}
|
2977
|
-
function
|
2978
|
-
return
|
2977
|
+
function Bi() {
|
2978
|
+
return nr() && document.documentMode === 10;
|
2979
2979
|
}
|
2980
|
-
function
|
2981
|
-
return Be(n) ||
|
2980
|
+
function Sn(n = P()) {
|
2981
|
+
return Be(n) || En(n) || An(n) || Tn(n) || /windows phone/i.test(n) || wn(n);
|
2982
2982
|
}
|
2983
|
-
function
|
2983
|
+
function Vi() {
|
2984
2984
|
try {
|
2985
2985
|
return !!(window && window !== window.top);
|
2986
2986
|
} catch {
|
@@ -3003,7 +3003,7 @@ function Fi() {
|
|
3003
3003
|
* See the License for the specific language governing permissions and
|
3004
3004
|
* limitations under the License.
|
3005
3005
|
*/
|
3006
|
-
function
|
3006
|
+
function Cn(n, e = []) {
|
3007
3007
|
let t;
|
3008
3008
|
switch (n) {
|
3009
3009
|
case "Browser":
|
@@ -3034,7 +3034,7 @@ function An(n, e = []) {
|
|
3034
3034
|
* See the License for the specific language governing permissions and
|
3035
3035
|
* limitations under the License.
|
3036
3036
|
*/
|
3037
|
-
class
|
3037
|
+
class Hi {
|
3038
3038
|
constructor(e) {
|
3039
3039
|
this.auth = e, this.queue = [];
|
3040
3040
|
}
|
@@ -3089,7 +3089,7 @@ class Bi {
|
|
3089
3089
|
* See the License for the specific language governing permissions and
|
3090
3090
|
* limitations under the License.
|
3091
3091
|
*/
|
3092
|
-
async function
|
3092
|
+
async function xi(n, e = {}) {
|
3093
3093
|
return W(n, "GET", "/v2/passwordPolicy", ee(n, e));
|
3094
3094
|
}
|
3095
3095
|
/**
|
@@ -3108,12 +3108,12 @@ async function Vi(n, e = {}) {
|
|
3108
3108
|
* See the License for the specific language governing permissions and
|
3109
3109
|
* limitations under the License.
|
3110
3110
|
*/
|
3111
|
-
const
|
3112
|
-
class
|
3111
|
+
const Wi = 6;
|
3112
|
+
class zi {
|
3113
3113
|
constructor(e) {
|
3114
3114
|
var t, r, i, s;
|
3115
3115
|
const o = e.customStrengthOptions;
|
3116
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
3116
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Wi, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (i = (r = e.allowedNonAlphanumericCharacters) === null || r === void 0 ? void 0 : r.join("")) !== null && i !== void 0 ? i : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
|
3117
3117
|
}
|
3118
3118
|
validatePassword(e) {
|
3119
3119
|
var t, r, i, s, o, a;
|
@@ -3196,9 +3196,9 @@ class xi {
|
|
3196
3196
|
* See the License for the specific language governing permissions and
|
3197
3197
|
* limitations under the License.
|
3198
3198
|
*/
|
3199
|
-
class
|
3199
|
+
class Ji {
|
3200
3200
|
constructor(e, t, r, i) {
|
3201
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Lt(this), this.idTokenSubscription = new Lt(this), this.beforeStateQueue = new
|
3201
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Lt(this), this.idTokenSubscription = new Lt(this), this.beforeStateQueue = new Hi(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 = hn, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
|
3202
3202
|
}
|
3203
3203
|
_initializeWithPersistence(e, t) {
|
3204
3204
|
return t && (this._popupRedirectResolver = V(t)), this._initializationPromise = this.queue(async () => {
|
@@ -3234,7 +3234,7 @@ class Wi {
|
|
3234
3234
|
}
|
3235
3235
|
async initializeCurrentUserFromIdToken(e) {
|
3236
3236
|
try {
|
3237
|
-
const t = await
|
3237
|
+
const t = await yn(this, { idToken: e }), r = await B._fromGetAccountInfoResponse(this, t, e);
|
3238
3238
|
await this.directlySetCurrentUser(r);
|
3239
3239
|
} catch (t) {
|
3240
3240
|
console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
|
@@ -3292,7 +3292,7 @@ class Wi {
|
|
3292
3292
|
return this.directlySetCurrentUser(e);
|
3293
3293
|
}
|
3294
3294
|
useDeviceLanguage() {
|
3295
|
-
this.languageCode =
|
3295
|
+
this.languageCode = Ti();
|
3296
3296
|
}
|
3297
3297
|
async _delete() {
|
3298
3298
|
this._deleted = !0;
|
@@ -3343,7 +3343,7 @@ class Wi {
|
|
3343
3343
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
3344
3344
|
}
|
3345
3345
|
async _updatePasswordPolicy() {
|
3346
|
-
const e = await
|
3346
|
+
const e = await xi(this), t = new zi(e);
|
3347
3347
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
3348
3348
|
}
|
3349
3349
|
_getPersistence() {
|
@@ -3383,7 +3383,7 @@ class Wi {
|
|
3383
3383
|
token: e,
|
3384
3384
|
idToken: t
|
3385
3385
|
};
|
3386
|
-
this.tenantId != null && (r.tenantId = this.tenantId), await
|
3386
|
+
this.tenantId != null && (r.tenantId = this.tenantId), await ji(this, r);
|
3387
3387
|
}
|
3388
3388
|
}
|
3389
3389
|
toJSON() {
|
@@ -3496,7 +3496,7 @@ class Wi {
|
|
3496
3496
|
), this.persistenceManager;
|
3497
3497
|
}
|
3498
3498
|
_logFramework(e) {
|
3499
|
-
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion =
|
3499
|
+
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Cn(this.config.clientPlatform, this._getFrameworks()));
|
3500
3500
|
}
|
3501
3501
|
_getFrameworks() {
|
3502
3502
|
return this.frameworks;
|
@@ -3526,7 +3526,7 @@ class Wi {
|
|
3526
3526
|
async _getAppCheckToken() {
|
3527
3527
|
var e;
|
3528
3528
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
3529
|
-
return t != null && t.error &&
|
3529
|
+
return t != null && t.error && Ii(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
3530
3530
|
}
|
3531
3531
|
}
|
3532
3532
|
function ie(n) {
|
@@ -3534,7 +3534,7 @@ function ie(n) {
|
|
3534
3534
|
}
|
3535
3535
|
class Lt {
|
3536
3536
|
constructor(e) {
|
3537
|
-
this.auth = e, this.observer = null, this.addObserver =
|
3537
|
+
this.auth = e, this.observer = null, this.addObserver = lr((t) => this.observer = t);
|
3538
3538
|
}
|
3539
3539
|
get next() {
|
3540
3540
|
return y(
|
@@ -3569,30 +3569,30 @@ let Ve = {
|
|
3569
3569
|
recaptchaEnterpriseScript: "",
|
3570
3570
|
gapiScript: ""
|
3571
3571
|
};
|
3572
|
-
function
|
3572
|
+
function qi(n) {
|
3573
3573
|
Ve = n;
|
3574
3574
|
}
|
3575
|
-
function
|
3575
|
+
function Rn(n) {
|
3576
3576
|
return Ve.loadJS(n);
|
3577
3577
|
}
|
3578
|
-
function
|
3578
|
+
function Gi() {
|
3579
3579
|
return Ve.recaptchaEnterpriseScript;
|
3580
3580
|
}
|
3581
|
-
function
|
3581
|
+
function Ki() {
|
3582
3582
|
return Ve.gapiScript;
|
3583
3583
|
}
|
3584
|
-
function
|
3584
|
+
function Yi(n) {
|
3585
3585
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
3586
3586
|
}
|
3587
|
-
const
|
3588
|
-
class
|
3587
|
+
const Qi = "recaptcha-enterprise", Xi = "NO_RECAPTCHA";
|
3588
|
+
class Zi {
|
3589
3589
|
/**
|
3590
3590
|
*
|
3591
3591
|
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
3592
3592
|
*
|
3593
3593
|
*/
|
3594
3594
|
constructor(e) {
|
3595
|
-
this.type =
|
3595
|
+
this.type = Qi, this.auth = ie(e);
|
3596
3596
|
}
|
3597
3597
|
/**
|
3598
3598
|
* Executes the verification process.
|
@@ -3608,7 +3608,7 @@ class Qi {
|
|
3608
3608
|
return s._tenantRecaptchaConfigs[s.tenantId].siteKey;
|
3609
3609
|
}
|
3610
3610
|
return new Promise(async (o, a) => {
|
3611
|
-
|
3611
|
+
Oi(s, {
|
3612
3612
|
clientType: "CLIENT_TYPE_WEB",
|
3613
3613
|
version: "RECAPTCHA_ENTERPRISE"
|
3614
3614
|
/* RecaptchaVersion.ENTERPRISE */
|
@@ -3616,7 +3616,7 @@ class Qi {
|
|
3616
3616
|
if (c.recaptchaKey === void 0)
|
3617
3617
|
a(new Error("recaptcha Enterprise site key undefined"));
|
3618
3618
|
else {
|
3619
|
-
const u = new
|
3619
|
+
const u = new Pi(c);
|
3620
3620
|
return s.tenantId == null ? s._agentRecaptchaConfig = u : s._tenantRecaptchaConfigs[s.tenantId] = u, o(u.siteKey);
|
3621
3621
|
}
|
3622
3622
|
}).catch((c) => {
|
@@ -3630,7 +3630,7 @@ class Qi {
|
|
3630
3630
|
c.enterprise.execute(s, { action: e }).then((u) => {
|
3631
3631
|
o(u);
|
3632
3632
|
}).catch(() => {
|
3633
|
-
o(
|
3633
|
+
o(Xi);
|
3634
3634
|
});
|
3635
3635
|
}) : a(Error("No reCAPTCHA enterprise script loaded."));
|
3636
3636
|
}
|
@@ -3643,8 +3643,8 @@ class Qi {
|
|
3643
3643
|
o(new Error("RecaptchaVerifier is only supported in browser"));
|
3644
3644
|
return;
|
3645
3645
|
}
|
3646
|
-
let c =
|
3647
|
-
c.length !== 0 && (c += a),
|
3646
|
+
let c = Gi();
|
3647
|
+
c.length !== 0 && (c += a), Rn(c).then(() => {
|
3648
3648
|
i(a, s, o);
|
3649
3649
|
}).catch((u) => {
|
3650
3650
|
o(u);
|
@@ -3657,7 +3657,7 @@ class Qi {
|
|
3657
3657
|
}
|
3658
3658
|
}
|
3659
3659
|
async function $t(n, e, t, r = !1) {
|
3660
|
-
const i = new
|
3660
|
+
const i = new Zi(n);
|
3661
3661
|
let s;
|
3662
3662
|
try {
|
3663
3663
|
s = await i.verify(t);
|
@@ -3719,8 +3719,8 @@ async function it(n, e, t, r) {
|
|
3719
3719
|
* See the License for the specific language governing permissions and
|
3720
3720
|
* limitations under the License.
|
3721
3721
|
*/
|
3722
|
-
function
|
3723
|
-
const t =
|
3722
|
+
function es(n, e) {
|
3723
|
+
const t = an(n, "auth");
|
3724
3724
|
if (t.isInitialized()) {
|
3725
3725
|
const i = t.getImmediate(), s = t.getOptions();
|
3726
3726
|
if (ke(s, e ?? {}))
|
@@ -3733,11 +3733,11 @@ function Xi(n, e) {
|
|
3733
3733
|
}
|
3734
3734
|
return t.initialize({ options: e });
|
3735
3735
|
}
|
3736
|
-
function
|
3736
|
+
function ts(n, e) {
|
3737
3737
|
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(V);
|
3738
3738
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
|
3739
3739
|
}
|
3740
|
-
function
|
3740
|
+
function ns(n, e, t) {
|
3741
3741
|
const r = ie(n);
|
3742
3742
|
y(
|
3743
3743
|
r._canInitEmulator,
|
@@ -3750,20 +3750,20 @@ function es(n, e, t) {
|
|
3750
3750
|
"invalid-emulator-scheme"
|
3751
3751
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
3752
3752
|
);
|
3753
|
-
const i = !!(t != null && t.disableWarnings), s =
|
3753
|
+
const i = !!(t != null && t.disableWarnings), s = Pn(e), { host: o, port: a } = rs(e), c = a === null ? "" : `:${a}`;
|
3754
3754
|
r.config.emulator = { url: `${s}//${o}${c}/` }, r.settings.appVerificationDisabledForTesting = !0, r.emulatorConfig = Object.freeze({
|
3755
3755
|
host: o,
|
3756
3756
|
port: a,
|
3757
3757
|
protocol: s.replace(":", ""),
|
3758
3758
|
options: Object.freeze({ disableWarnings: i })
|
3759
|
-
}), i ||
|
3759
|
+
}), i || is();
|
3760
3760
|
}
|
3761
|
-
function
|
3761
|
+
function Pn(n) {
|
3762
3762
|
const e = n.indexOf(":");
|
3763
3763
|
return e < 0 ? "" : n.substr(0, e + 1);
|
3764
3764
|
}
|
3765
|
-
function
|
3766
|
-
const e =
|
3765
|
+
function rs(n) {
|
3766
|
+
const e = Pn(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
3767
3767
|
if (!t)
|
3768
3768
|
return { host: "", port: null };
|
3769
3769
|
const r = t[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r);
|
@@ -3781,7 +3781,7 @@ function Mt(n) {
|
|
3781
3781
|
const e = Number(n);
|
3782
3782
|
return isNaN(e) ? null : e;
|
3783
3783
|
}
|
3784
|
-
function
|
3784
|
+
function is() {
|
3785
3785
|
function n() {
|
3786
3786
|
const e = document.createElement("p"), t = e.style;
|
3787
3787
|
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);
|
@@ -3830,7 +3830,7 @@ class pt {
|
|
3830
3830
|
return F("not implemented");
|
3831
3831
|
}
|
3832
3832
|
}
|
3833
|
-
async function
|
3833
|
+
async function ss(n, e) {
|
3834
3834
|
return W(n, "POST", "/v1/accounts:signUp", e);
|
3835
3835
|
}
|
3836
3836
|
/**
|
@@ -3849,14 +3849,14 @@ async function rs(n, e) {
|
|
3849
3849
|
* See the License for the specific language governing permissions and
|
3850
3850
|
* limitations under the License.
|
3851
3851
|
*/
|
3852
|
-
async function
|
3852
|
+
async function os(n, e) {
|
3853
3853
|
return Fe(n, "POST", "/v1/accounts:signInWithPassword", ee(n, e));
|
3854
3854
|
}
|
3855
|
-
async function
|
3855
|
+
async function as(n, e) {
|
3856
3856
|
return W(n, "POST", "/v1/accounts:sendOobCode", ee(n, e));
|
3857
3857
|
}
|
3858
|
-
async function
|
3859
|
-
return
|
3858
|
+
async function cs(n, e) {
|
3859
|
+
return as(n, e);
|
3860
3860
|
}
|
3861
3861
|
/**
|
3862
3862
|
* @license
|
@@ -3874,10 +3874,10 @@ async function os(n, e) {
|
|
3874
3874
|
* See the License for the specific language governing permissions and
|
3875
3875
|
* limitations under the License.
|
3876
3876
|
*/
|
3877
|
-
async function
|
3877
|
+
async function ls(n, e) {
|
3878
3878
|
return Fe(n, "POST", "/v1/accounts:signInWithEmailLink", ee(n, e));
|
3879
3879
|
}
|
3880
|
-
async function
|
3880
|
+
async function ds(n, e) {
|
3881
3881
|
return Fe(n, "POST", "/v1/accounts:signInWithEmailLink", ee(n, e));
|
3882
3882
|
}
|
3883
3883
|
/**
|
@@ -3952,9 +3952,9 @@ class ve extends pt {
|
|
3952
3952
|
clientType: "CLIENT_TYPE_WEB"
|
3953
3953
|
/* RecaptchaClientType.WEB */
|
3954
3954
|
};
|
3955
|
-
return it(e, t, "signInWithPassword",
|
3955
|
+
return it(e, t, "signInWithPassword", os);
|
3956
3956
|
case "emailLink":
|
3957
|
-
return
|
3957
|
+
return ls(e, {
|
3958
3958
|
email: this._email,
|
3959
3959
|
oobCode: this._password
|
3960
3960
|
});
|
@@ -3978,9 +3978,9 @@ class ve extends pt {
|
|
3978
3978
|
clientType: "CLIENT_TYPE_WEB"
|
3979
3979
|
/* RecaptchaClientType.WEB */
|
3980
3980
|
};
|
3981
|
-
return it(e, r, "signUpPassword",
|
3981
|
+
return it(e, r, "signUpPassword", ss);
|
3982
3982
|
case "emailLink":
|
3983
|
-
return
|
3983
|
+
return ds(e, {
|
3984
3984
|
idToken: t,
|
3985
3985
|
email: this._email,
|
3986
3986
|
oobCode: this._password
|
@@ -4033,7 +4033,7 @@ async function le(n, e) {
|
|
4033
4033
|
* See the License for the specific language governing permissions and
|
4034
4034
|
* limitations under the License.
|
4035
4035
|
*/
|
4036
|
-
const
|
4036
|
+
const us = "http://localhost";
|
4037
4037
|
class re extends pt {
|
4038
4038
|
constructor() {
|
4039
4039
|
super(...arguments), this.pendingToken = null;
|
@@ -4091,7 +4091,7 @@ class re extends pt {
|
|
4091
4091
|
}
|
4092
4092
|
buildRequest() {
|
4093
4093
|
const e = {
|
4094
|
-
requestUri:
|
4094
|
+
requestUri: us,
|
4095
4095
|
returnSecureToken: !0
|
4096
4096
|
};
|
4097
4097
|
if (this.pendingToken)
|
@@ -4119,7 +4119,7 @@ class re extends pt {
|
|
4119
4119
|
* See the License for the specific language governing permissions and
|
4120
4120
|
* limitations under the License.
|
4121
4121
|
*/
|
4122
|
-
function
|
4122
|
+
function hs(n) {
|
4123
4123
|
switch (n) {
|
4124
4124
|
case "recoverEmail":
|
4125
4125
|
return "RECOVER_EMAIL";
|
@@ -4137,7 +4137,7 @@ function ds(n) {
|
|
4137
4137
|
return null;
|
4138
4138
|
}
|
4139
4139
|
}
|
4140
|
-
function
|
4140
|
+
function fs(n) {
|
4141
4141
|
const e = fe(pe(n)).link, t = e ? fe(pe(e)).deep_link_id : null, r = fe(pe(n)).deep_link_id;
|
4142
4142
|
return (r ? fe(pe(r)).link : null) || r || t || e || n;
|
4143
4143
|
}
|
@@ -4150,7 +4150,7 @@ class gt {
|
|
4150
4150
|
*/
|
4151
4151
|
constructor(e) {
|
4152
4152
|
var t, r, i, s, o, a;
|
4153
|
-
const c = fe(pe(e)), u = (t = c.apiKey) !== null && t !== void 0 ? t : null, _ = (r = c.oobCode) !== null && r !== void 0 ? r : null, b =
|
4153
|
+
const c = fe(pe(e)), u = (t = c.apiKey) !== null && t !== void 0 ? t : null, _ = (r = c.oobCode) !== null && r !== void 0 ? r : null, b = hs((i = c.mode) !== null && i !== void 0 ? i : null);
|
4154
4154
|
y(
|
4155
4155
|
u && _ && b,
|
4156
4156
|
"argument-error"
|
@@ -4167,7 +4167,7 @@ class gt {
|
|
4167
4167
|
* @public
|
4168
4168
|
*/
|
4169
4169
|
static parseLink(e) {
|
4170
|
-
const t =
|
4170
|
+
const t = fs(e);
|
4171
4171
|
try {
|
4172
4172
|
return new gt(t);
|
4173
4173
|
} catch {
|
@@ -4266,7 +4266,7 @@ he.EMAIL_LINK_SIGN_IN_METHOD = "emailLink";
|
|
4266
4266
|
* See the License for the specific language governing permissions and
|
4267
4267
|
* limitations under the License.
|
4268
4268
|
*/
|
4269
|
-
class
|
4269
|
+
class On {
|
4270
4270
|
/**
|
4271
4271
|
* Constructor for generic OAuth providers.
|
4272
4272
|
*
|
@@ -4319,7 +4319,7 @@ class Rn {
|
|
4319
4319
|
* See the License for the specific language governing permissions and
|
4320
4320
|
* limitations under the License.
|
4321
4321
|
*/
|
4322
|
-
class Te extends
|
4322
|
+
class Te extends On {
|
4323
4323
|
constructor() {
|
4324
4324
|
super(...arguments), this.scopes = [];
|
4325
4325
|
}
|
@@ -4695,12 +4695,12 @@ class $e extends Z {
|
|
4695
4695
|
return new $e(e, t, r, i);
|
4696
4696
|
}
|
4697
4697
|
}
|
4698
|
-
function
|
4698
|
+
function kn(n, e, t, r) {
|
4699
4699
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
4700
4700
|
throw s.code === "auth/multi-factor-auth-required" ? $e._fromErrorAndOperation(n, s, e, r) : s;
|
4701
4701
|
});
|
4702
4702
|
}
|
4703
|
-
async function
|
4703
|
+
async function ps(n, e, t = !1) {
|
4704
4704
|
const r = await _e(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
4705
4705
|
return ue._forOperation(n, "link", r);
|
4706
4706
|
}
|
@@ -4720,13 +4720,13 @@ async function hs(n, e, t = !1) {
|
|
4720
4720
|
* See the License for the specific language governing permissions and
|
4721
4721
|
* limitations under the License.
|
4722
4722
|
*/
|
4723
|
-
async function
|
4723
|
+
async function gs(n, e, t = !1) {
|
4724
4724
|
const { auth: r } = n;
|
4725
4725
|
if (j(r.app))
|
4726
4726
|
return Promise.reject(X(r));
|
4727
4727
|
const i = "reauthenticate";
|
4728
4728
|
try {
|
4729
|
-
const s = await _e(n,
|
4729
|
+
const s = await _e(n, kn(r, i, e, n), t);
|
4730
4730
|
y(
|
4731
4731
|
s.idToken,
|
4732
4732
|
r,
|
@@ -4771,14 +4771,14 @@ async function fs(n, e, t = !1) {
|
|
4771
4771
|
* See the License for the specific language governing permissions and
|
4772
4772
|
* limitations under the License.
|
4773
4773
|
*/
|
4774
|
-
async function
|
4774
|
+
async function Nn(n, e, t = !1) {
|
4775
4775
|
if (j(n.app))
|
4776
4776
|
return Promise.reject(X(n));
|
4777
|
-
const r = "signIn", i = await
|
4777
|
+
const r = "signIn", i = await kn(n, r, e), s = await ue._fromIdTokenResponse(n, r, i);
|
4778
4778
|
return t || await n._updateCurrentUser(s.user), s;
|
4779
4779
|
}
|
4780
|
-
async function
|
4781
|
-
return
|
4780
|
+
async function ms(n, e) {
|
4781
|
+
return Nn(ie(n), e);
|
4782
4782
|
}
|
4783
4783
|
/**
|
4784
4784
|
* @license
|
@@ -4796,7 +4796,7 @@ async function ps(n, e) {
|
|
4796
4796
|
* See the License for the specific language governing permissions and
|
4797
4797
|
* limitations under the License.
|
4798
4798
|
*/
|
4799
|
-
function
|
4799
|
+
function ys(n, e, t) {
|
4800
4800
|
var r;
|
4801
4801
|
y(
|
4802
4802
|
((r = t.url) === null || r === void 0 ? void 0 : r.length) > 0,
|
@@ -4836,34 +4836,34 @@ function gs(n, e, t) {
|
|
4836
4836
|
* See the License for the specific language governing permissions and
|
4837
4837
|
* limitations under the License.
|
4838
4838
|
*/
|
4839
|
-
async function
|
4839
|
+
async function _s(n) {
|
4840
4840
|
const e = ie(n);
|
4841
4841
|
e._getPasswordPolicyInternal() && await e._updatePasswordPolicy();
|
4842
4842
|
}
|
4843
|
-
async function
|
4843
|
+
async function vs(n, e, t) {
|
4844
4844
|
const r = ie(n), i = {
|
4845
4845
|
requestType: "PASSWORD_RESET",
|
4846
4846
|
email: e,
|
4847
4847
|
clientType: "CLIENT_TYPE_WEB"
|
4848
4848
|
/* RecaptchaClientType.WEB */
|
4849
4849
|
};
|
4850
|
-
t &&
|
4850
|
+
t && ys(r, i, t), await it(r, i, "getOobCode", cs);
|
4851
4851
|
}
|
4852
|
-
function
|
4853
|
-
return j(n.app) ? Promise.reject(X(n)) :
|
4854
|
-
throw r.code === "auth/password-does-not-meet-requirements" &&
|
4852
|
+
function bs(n, e, t) {
|
4853
|
+
return j(n.app) ? Promise.reject(X(n)) : ms(x(n), he.credential(e, t)).catch(async (r) => {
|
4854
|
+
throw r.code === "auth/password-does-not-meet-requirements" && _s(n), r;
|
4855
4855
|
});
|
4856
4856
|
}
|
4857
|
-
function
|
4857
|
+
function Is(n, e, t, r) {
|
4858
4858
|
return x(n).onIdTokenChanged(e, t, r);
|
4859
4859
|
}
|
4860
|
-
function
|
4860
|
+
function ws(n, e, t) {
|
4861
4861
|
return x(n).beforeAuthStateChanged(e, t);
|
4862
4862
|
}
|
4863
|
-
function
|
4863
|
+
function Es(n, e, t, r) {
|
4864
4864
|
return x(n).onAuthStateChanged(e, t, r);
|
4865
4865
|
}
|
4866
|
-
function
|
4866
|
+
function Ts(n) {
|
4867
4867
|
return x(n).signOut();
|
4868
4868
|
}
|
4869
4869
|
const Me = "__sak";
|
@@ -4883,7 +4883,7 @@ const Me = "__sak";
|
|
4883
4883
|
* See the License for the specific language governing permissions and
|
4884
4884
|
* limitations under the License.
|
4885
4885
|
*/
|
4886
|
-
class
|
4886
|
+
class Dn {
|
4887
4887
|
constructor(e, t) {
|
4888
4888
|
this.storageRetriever = e, this.type = t;
|
4889
4889
|
}
|
@@ -4924,18 +4924,18 @@ class kn {
|
|
4924
4924
|
* See the License for the specific language governing permissions and
|
4925
4925
|
* limitations under the License.
|
4926
4926
|
*/
|
4927
|
-
function
|
4927
|
+
function As() {
|
4928
4928
|
const n = P();
|
4929
4929
|
return ft(n) || Be(n);
|
4930
4930
|
}
|
4931
|
-
const
|
4932
|
-
class
|
4931
|
+
const Ss = 1e3, Cs = 10;
|
4932
|
+
class Ln extends Dn {
|
4933
4933
|
constructor() {
|
4934
4934
|
super(
|
4935
4935
|
() => window.localStorage,
|
4936
4936
|
"LOCAL"
|
4937
4937
|
/* PersistenceType.LOCAL */
|
4938
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
4938
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = As() && Vi(), this.fallbackToPolling = Sn(), this._shouldAllowMigration = !0;
|
4939
4939
|
}
|
4940
4940
|
forAllChangedKeys(e) {
|
4941
4941
|
for (const t of Object.keys(this.listeners)) {
|
@@ -4962,7 +4962,7 @@ class Nn extends kn {
|
|
4962
4962
|
const o = this.storage.getItem(r);
|
4963
4963
|
!t && this.localCache[r] === o || this.notifyListeners(r, o);
|
4964
4964
|
}, s = this.storage.getItem(r);
|
4965
|
-
|
4965
|
+
Bi() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, Cs) : i();
|
4966
4966
|
}
|
4967
4967
|
notifyListeners(e, t) {
|
4968
4968
|
this.localCache[e] = t;
|
@@ -4984,7 +4984,7 @@ class Nn extends kn {
|
|
4984
4984
|
!0
|
4985
4985
|
);
|
4986
4986
|
});
|
4987
|
-
},
|
4987
|
+
}, Ss);
|
4988
4988
|
}
|
4989
4989
|
stopPolling() {
|
4990
4990
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
@@ -5013,8 +5013,8 @@ class Nn extends kn {
|
|
5013
5013
|
await super._remove(e), delete this.localCache[e];
|
5014
5014
|
}
|
5015
5015
|
}
|
5016
|
-
|
5017
|
-
const
|
5016
|
+
Ln.type = "LOCAL";
|
5017
|
+
const Rs = Ln;
|
5018
5018
|
/**
|
5019
5019
|
* @license
|
5020
5020
|
* Copyright 2020 Google LLC
|
@@ -5031,7 +5031,7 @@ const Ss = Nn;
|
|
5031
5031
|
* See the License for the specific language governing permissions and
|
5032
5032
|
* limitations under the License.
|
5033
5033
|
*/
|
5034
|
-
class
|
5034
|
+
class $n extends Dn {
|
5035
5035
|
constructor() {
|
5036
5036
|
super(
|
5037
5037
|
() => window.sessionStorage,
|
@@ -5044,8 +5044,8 @@ class Dn extends kn {
|
|
5044
5044
|
_removeListener(e, t) {
|
5045
5045
|
}
|
5046
5046
|
}
|
5047
|
-
|
5048
|
-
const
|
5047
|
+
$n.type = "SESSION";
|
5048
|
+
const Mn = $n;
|
5049
5049
|
/**
|
5050
5050
|
* @license
|
5051
5051
|
* Copyright 2019 Google LLC
|
@@ -5062,7 +5062,7 @@ const Ln = Dn;
|
|
5062
5062
|
* See the License for the specific language governing permissions and
|
5063
5063
|
* limitations under the License.
|
5064
5064
|
*/
|
5065
|
-
function
|
5065
|
+
function Ps(n) {
|
5066
5066
|
return Promise.all(n.map(async (e) => {
|
5067
5067
|
try {
|
5068
5068
|
return {
|
@@ -5132,7 +5132,7 @@ class He {
|
|
5132
5132
|
eventId: r,
|
5133
5133
|
eventType: i
|
5134
5134
|
});
|
5135
|
-
const a = Array.from(o).map(async (u) => u(t.origin, s)), c = await
|
5135
|
+
const a = Array.from(o).map(async (u) => u(t.origin, s)), c = await Ps(a);
|
5136
5136
|
t.ports[0].postMessage({
|
5137
5137
|
status: "done",
|
5138
5138
|
eventId: r,
|
@@ -5200,7 +5200,7 @@ function mt(n = "", e = 10) {
|
|
5200
5200
|
* See the License for the specific language governing permissions and
|
5201
5201
|
* limitations under the License.
|
5202
5202
|
*/
|
5203
|
-
class
|
5203
|
+
class Os {
|
5204
5204
|
constructor(e) {
|
5205
5205
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
5206
5206
|
}
|
@@ -5300,7 +5300,7 @@ class Rs {
|
|
5300
5300
|
function M() {
|
5301
5301
|
return window;
|
5302
5302
|
}
|
5303
|
-
function
|
5303
|
+
function ks(n) {
|
5304
5304
|
M().location.href = n;
|
5305
5305
|
}
|
5306
5306
|
/**
|
@@ -5319,10 +5319,10 @@ function Ps(n) {
|
|
5319
5319
|
* See the License for the specific language governing permissions and
|
5320
5320
|
* limitations under the License.
|
5321
5321
|
*/
|
5322
|
-
function
|
5322
|
+
function Un() {
|
5323
5323
|
return typeof M().WorkerGlobalScope < "u" && typeof M().importScripts == "function";
|
5324
5324
|
}
|
5325
|
-
async function
|
5325
|
+
async function Ns() {
|
5326
5326
|
if (!(navigator != null && navigator.serviceWorker))
|
5327
5327
|
return null;
|
5328
5328
|
try {
|
@@ -5331,12 +5331,12 @@ async function Os() {
|
|
5331
5331
|
return null;
|
5332
5332
|
}
|
5333
5333
|
}
|
5334
|
-
function
|
5334
|
+
function Ds() {
|
5335
5335
|
var n;
|
5336
5336
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
5337
5337
|
}
|
5338
|
-
function
|
5339
|
-
return
|
5338
|
+
function Ls() {
|
5339
|
+
return Un() ? self : null;
|
5340
5340
|
}
|
5341
5341
|
/**
|
5342
5342
|
* @license
|
@@ -5354,7 +5354,7 @@ function Ns() {
|
|
5354
5354
|
* See the License for the specific language governing permissions and
|
5355
5355
|
* limitations under the License.
|
5356
5356
|
*/
|
5357
|
-
const
|
5357
|
+
const jn = "firebaseLocalStorageDb", $s = 1, Ue = "firebaseLocalStorage", Fn = "fbase_key";
|
5358
5358
|
class Ae {
|
5359
5359
|
constructor(e) {
|
5360
5360
|
this.request = e;
|
@@ -5372,36 +5372,36 @@ class Ae {
|
|
5372
5372
|
function xe(n, e) {
|
5373
5373
|
return n.transaction([Ue], e ? "readwrite" : "readonly").objectStore(Ue);
|
5374
5374
|
}
|
5375
|
-
function
|
5376
|
-
const n = indexedDB.deleteDatabase(
|
5375
|
+
function Ms() {
|
5376
|
+
const n = indexedDB.deleteDatabase(jn);
|
5377
5377
|
return new Ae(n).toPromise();
|
5378
5378
|
}
|
5379
5379
|
function st() {
|
5380
|
-
const n = indexedDB.open(
|
5380
|
+
const n = indexedDB.open(jn, $s);
|
5381
5381
|
return new Promise((e, t) => {
|
5382
5382
|
n.addEventListener("error", () => {
|
5383
5383
|
t(n.error);
|
5384
5384
|
}), n.addEventListener("upgradeneeded", () => {
|
5385
5385
|
const r = n.result;
|
5386
5386
|
try {
|
5387
|
-
r.createObjectStore(Ue, { keyPath:
|
5387
|
+
r.createObjectStore(Ue, { keyPath: Fn });
|
5388
5388
|
} catch (i) {
|
5389
5389
|
t(i);
|
5390
5390
|
}
|
5391
5391
|
}), n.addEventListener("success", async () => {
|
5392
5392
|
const r = n.result;
|
5393
|
-
r.objectStoreNames.contains(Ue) ? e(r) : (r.close(), await
|
5393
|
+
r.objectStoreNames.contains(Ue) ? e(r) : (r.close(), await Ms(), e(await st()));
|
5394
5394
|
});
|
5395
5395
|
});
|
5396
5396
|
}
|
5397
5397
|
async function jt(n, e, t) {
|
5398
5398
|
const r = xe(n, !0).put({
|
5399
|
-
[
|
5399
|
+
[Fn]: e,
|
5400
5400
|
value: t
|
5401
5401
|
});
|
5402
5402
|
return new Ae(r).toPromise();
|
5403
5403
|
}
|
5404
|
-
async function
|
5404
|
+
async function Us(n, e) {
|
5405
5405
|
const t = xe(n, !1).get(e), r = await new Ae(t).toPromise();
|
5406
5406
|
return r === void 0 ? null : r.value;
|
5407
5407
|
}
|
@@ -5409,8 +5409,8 @@ function Ft(n, e) {
|
|
5409
5409
|
const t = xe(n, !0).delete(e);
|
5410
5410
|
return new Ae(t).toPromise();
|
5411
5411
|
}
|
5412
|
-
const
|
5413
|
-
class
|
5412
|
+
const js = 800, Fs = 3;
|
5413
|
+
class Bn {
|
5414
5414
|
constructor() {
|
5415
5415
|
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(() => {
|
5416
5416
|
}, () => {
|
@@ -5426,7 +5426,7 @@ class jn {
|
|
5426
5426
|
const r = await this._openDb();
|
5427
5427
|
return await e(r);
|
5428
5428
|
} catch (r) {
|
5429
|
-
if (t++ >
|
5429
|
+
if (t++ > Fs)
|
5430
5430
|
throw r;
|
5431
5431
|
this.db && (this.db.close(), this.db = void 0);
|
5432
5432
|
}
|
@@ -5436,13 +5436,13 @@ class jn {
|
|
5436
5436
|
* postMessage interface to send these events to the worker ourselves.
|
5437
5437
|
*/
|
5438
5438
|
async initializeServiceWorkerMessaging() {
|
5439
|
-
return
|
5439
|
+
return Un() ? this.initializeReceiver() : this.initializeSender();
|
5440
5440
|
}
|
5441
5441
|
/**
|
5442
5442
|
* As the worker we should listen to events from the main window.
|
5443
5443
|
*/
|
5444
5444
|
async initializeReceiver() {
|
5445
|
-
this.receiver = He._getInstance(
|
5445
|
+
this.receiver = He._getInstance(Ls()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
5446
5446
|
keyProcessed: (await this._poll()).includes(t.key)
|
5447
5447
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
5448
5448
|
"keyChanged"
|
@@ -5458,9 +5458,9 @@ class jn {
|
|
5458
5458
|
*/
|
5459
5459
|
async initializeSender() {
|
5460
5460
|
var e, t;
|
5461
|
-
if (this.activeServiceWorker = await
|
5461
|
+
if (this.activeServiceWorker = await Ns(), !this.activeServiceWorker)
|
5462
5462
|
return;
|
5463
|
-
this.sender = new
|
5463
|
+
this.sender = new Os(this.activeServiceWorker);
|
5464
5464
|
const r = await this.sender._send(
|
5465
5465
|
"ping",
|
5466
5466
|
{},
|
@@ -5482,7 +5482,7 @@ class jn {
|
|
5482
5482
|
* @param key - Storage key which changed.
|
5483
5483
|
*/
|
5484
5484
|
async notifyServiceWorker(e) {
|
5485
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
5485
|
+
if (!(!this.sender || !this.activeServiceWorker || Ds() !== this.activeServiceWorker))
|
5486
5486
|
try {
|
5487
5487
|
await this.sender._send(
|
5488
5488
|
"keyChanged",
|
@@ -5516,7 +5516,7 @@ class jn {
|
|
5516
5516
|
return this._withPendingWrite(async () => (await this._withRetries((r) => jt(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
5517
5517
|
}
|
5518
5518
|
async _get(e) {
|
5519
|
-
const t = await this._withRetries((r) =>
|
5519
|
+
const t = await this._withRetries((r) => Us(r, e));
|
5520
5520
|
return this.localCache[e] = t, t;
|
5521
5521
|
}
|
5522
5522
|
async _remove(e) {
|
@@ -5547,7 +5547,7 @@ class jn {
|
|
5547
5547
|
i(t);
|
5548
5548
|
}
|
5549
5549
|
startPolling() {
|
5550
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
5550
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), js);
|
5551
5551
|
}
|
5552
5552
|
stopPolling() {
|
5553
5553
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
@@ -5559,8 +5559,8 @@ class jn {
|
|
5559
5559
|
this.listeners[e] && (this.listeners[e].delete(t), this.listeners[e].size === 0 && delete this.listeners[e]), Object.keys(this.listeners).length === 0 && this.stopPolling();
|
5560
5560
|
}
|
5561
5561
|
}
|
5562
|
-
|
5563
|
-
const
|
5562
|
+
Bn.type = "LOCAL";
|
5563
|
+
const Bs = Bn;
|
5564
5564
|
new Ee(3e4, 6e4);
|
5565
5565
|
/**
|
5566
5566
|
* @license
|
@@ -5578,7 +5578,7 @@ new Ee(3e4, 6e4);
|
|
5578
5578
|
* See the License for the specific language governing permissions and
|
5579
5579
|
* limitations under the License.
|
5580
5580
|
*/
|
5581
|
-
function
|
5581
|
+
function Vs(n, e) {
|
5582
5582
|
return e ? V(e) : (y(
|
5583
5583
|
n._popupRedirectResolver,
|
5584
5584
|
n,
|
@@ -5632,26 +5632,26 @@ class yt extends pt {
|
|
5632
5632
|
return e && (t.idToken = e), t;
|
5633
5633
|
}
|
5634
5634
|
}
|
5635
|
-
function
|
5636
|
-
return
|
5635
|
+
function Hs(n) {
|
5636
|
+
return Nn(n.auth, new yt(n), n.bypassAuthState);
|
5637
5637
|
}
|
5638
|
-
function
|
5638
|
+
function xs(n) {
|
5639
5639
|
const { auth: e, user: t } = n;
|
5640
5640
|
return y(
|
5641
5641
|
t,
|
5642
5642
|
e,
|
5643
5643
|
"internal-error"
|
5644
5644
|
/* AuthErrorCode.INTERNAL_ERROR */
|
5645
|
-
),
|
5645
|
+
), gs(t, new yt(n), n.bypassAuthState);
|
5646
5646
|
}
|
5647
|
-
async function
|
5647
|
+
async function Ws(n) {
|
5648
5648
|
const { auth: e, user: t } = n;
|
5649
5649
|
return y(
|
5650
5650
|
t,
|
5651
5651
|
e,
|
5652
5652
|
"internal-error"
|
5653
5653
|
/* AuthErrorCode.INTERNAL_ERROR */
|
5654
|
-
),
|
5654
|
+
), ps(t, new yt(n), n.bypassAuthState);
|
5655
5655
|
}
|
5656
5656
|
/**
|
5657
5657
|
* @license
|
@@ -5669,7 +5669,7 @@ async function Hs(n) {
|
|
5669
5669
|
* See the License for the specific language governing permissions and
|
5670
5670
|
* limitations under the License.
|
5671
5671
|
*/
|
5672
|
-
class
|
5672
|
+
class Vn {
|
5673
5673
|
constructor(e, t, r, i, s = !1) {
|
5674
5674
|
this.auth = e, this.resolver = r, this.user = i, this.bypassAuthState = s, this.pendingPromise = null, this.eventManager = null, this.filter = Array.isArray(t) ? t : [t];
|
5675
5675
|
}
|
@@ -5711,13 +5711,13 @@ class Fn {
|
|
5711
5711
|
switch (e) {
|
5712
5712
|
case "signInViaPopup":
|
5713
5713
|
case "signInViaRedirect":
|
5714
|
-
return
|
5714
|
+
return Hs;
|
5715
5715
|
case "linkViaPopup":
|
5716
5716
|
case "linkViaRedirect":
|
5717
|
-
return
|
5717
|
+
return Ws;
|
5718
5718
|
case "reauthViaPopup":
|
5719
5719
|
case "reauthViaRedirect":
|
5720
|
-
return
|
5720
|
+
return xs;
|
5721
5721
|
default:
|
5722
5722
|
L(
|
5723
5723
|
this.auth,
|
@@ -5752,8 +5752,8 @@ class Fn {
|
|
5752
5752
|
* See the License for the specific language governing permissions and
|
5753
5753
|
* limitations under the License.
|
5754
5754
|
*/
|
5755
|
-
const
|
5756
|
-
class se extends
|
5755
|
+
const zs = new Ee(2e3, 1e4);
|
5756
|
+
class se extends Vn {
|
5757
5757
|
constructor(e, t, r, i, s) {
|
5758
5758
|
super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null, se.currentPopupAction && se.currentPopupAction.cancel(), se.currentPopupAction = this;
|
5759
5759
|
}
|
@@ -5816,7 +5816,7 @@ class se extends Fn {
|
|
5816
5816
|
);
|
5817
5817
|
return;
|
5818
5818
|
}
|
5819
|
-
this.pollId = window.setTimeout(e,
|
5819
|
+
this.pollId = window.setTimeout(e, zs.get());
|
5820
5820
|
};
|
5821
5821
|
e();
|
5822
5822
|
}
|
@@ -5838,8 +5838,8 @@ se.currentPopupAction = null;
|
|
5838
5838
|
* See the License for the specific language governing permissions and
|
5839
5839
|
* limitations under the License.
|
5840
5840
|
*/
|
5841
|
-
const
|
5842
|
-
class
|
5841
|
+
const Js = "pendingRedirect", Pe = /* @__PURE__ */ new Map();
|
5842
|
+
class qs extends Vn {
|
5843
5843
|
constructor(e, t, r = !1) {
|
5844
5844
|
super(e, [
|
5845
5845
|
"signInViaRedirect",
|
@@ -5857,7 +5857,7 @@ class zs extends Fn {
|
|
5857
5857
|
let e = Pe.get(this.auth._key());
|
5858
5858
|
if (!e) {
|
5859
5859
|
try {
|
5860
|
-
const r = await
|
5860
|
+
const r = await Gs(this.resolver, this.auth) ? await super.execute() : null;
|
5861
5861
|
e = () => Promise.resolve(r);
|
5862
5862
|
} catch (t) {
|
5863
5863
|
e = () => Promise.reject(t);
|
@@ -5885,26 +5885,26 @@ class zs extends Fn {
|
|
5885
5885
|
cleanUp() {
|
5886
5886
|
}
|
5887
5887
|
}
|
5888
|
-
async function
|
5889
|
-
const t =
|
5888
|
+
async function Gs(n, e) {
|
5889
|
+
const t = Qs(e), r = Ys(n);
|
5890
5890
|
if (!await r._isAvailable())
|
5891
5891
|
return !1;
|
5892
5892
|
const i = await r._get(t) === "true";
|
5893
5893
|
return await r._remove(t), i;
|
5894
5894
|
}
|
5895
|
-
function
|
5895
|
+
function Ks(n, e) {
|
5896
5896
|
Pe.set(n._key(), e);
|
5897
5897
|
}
|
5898
|
-
function
|
5898
|
+
function Ys(n) {
|
5899
5899
|
return V(n._redirectPersistence);
|
5900
5900
|
}
|
5901
|
-
function
|
5902
|
-
return Re(
|
5901
|
+
function Qs(n) {
|
5902
|
+
return Re(Js, n.config.apiKey, n.name);
|
5903
5903
|
}
|
5904
|
-
async function
|
5904
|
+
async function Xs(n, e, t = !1) {
|
5905
5905
|
if (j(n.app))
|
5906
5906
|
return Promise.reject(X(n));
|
5907
|
-
const r = ie(n), i =
|
5907
|
+
const r = ie(n), i = Vs(r, e), o = await new qs(r, i, t).execute();
|
5908
5908
|
return o && !t && (delete o.user._redirectEventId, await r._persistUserIfCurrent(o.user), await r._setRedirectUser(null, e)), o;
|
5909
5909
|
}
|
5910
5910
|
/**
|
@@ -5923,8 +5923,8 @@ async function Ys(n, e, t = !1) {
|
|
5923
5923
|
* See the License for the specific language governing permissions and
|
5924
5924
|
* limitations under the License.
|
5925
5925
|
*/
|
5926
|
-
const
|
5927
|
-
class
|
5926
|
+
const Zs = 10 * 60 * 1e3;
|
5927
|
+
class eo {
|
5928
5928
|
constructor(e) {
|
5929
5929
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
5930
5930
|
}
|
@@ -5940,11 +5940,11 @@ class Xs {
|
|
5940
5940
|
let t = !1;
|
5941
5941
|
return this.consumers.forEach((r) => {
|
5942
5942
|
this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
|
5943
|
-
}), this.hasHandledPotentialRedirect || !
|
5943
|
+
}), this.hasHandledPotentialRedirect || !to(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
5944
5944
|
}
|
5945
5945
|
sendToConsumer(e, t) {
|
5946
5946
|
var r;
|
5947
|
-
if (e.error && !
|
5947
|
+
if (e.error && !Hn(e)) {
|
5948
5948
|
const i = ((r = e.error.code) === null || r === void 0 ? void 0 : r.split("auth/")[1]) || "internal-error";
|
5949
5949
|
t.onError($(this.auth, i));
|
5950
5950
|
} else
|
@@ -5955,7 +5955,7 @@ class Xs {
|
|
5955
5955
|
return t.filter.includes(e.type) && r;
|
5956
5956
|
}
|
5957
5957
|
hasEventBeenHandled(e) {
|
5958
|
-
return Date.now() - this.lastProcessedEventTime >=
|
5958
|
+
return Date.now() - this.lastProcessedEventTime >= Zs && this.cachedEventUids.clear(), this.cachedEventUids.has(Bt(e));
|
5959
5959
|
}
|
5960
5960
|
saveEventToCache(e) {
|
5961
5961
|
this.cachedEventUids.add(Bt(e)), this.lastProcessedEventTime = Date.now();
|
@@ -5964,17 +5964,17 @@ class Xs {
|
|
5964
5964
|
function Bt(n) {
|
5965
5965
|
return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
|
5966
5966
|
}
|
5967
|
-
function
|
5967
|
+
function Hn({ type: n, error: e }) {
|
5968
5968
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
5969
5969
|
}
|
5970
|
-
function
|
5970
|
+
function to(n) {
|
5971
5971
|
switch (n.type) {
|
5972
5972
|
case "signInViaRedirect":
|
5973
5973
|
case "linkViaRedirect":
|
5974
5974
|
case "reauthViaRedirect":
|
5975
5975
|
return !0;
|
5976
5976
|
case "unknown":
|
5977
|
-
return
|
5977
|
+
return Hn(n);
|
5978
5978
|
default:
|
5979
5979
|
return !1;
|
5980
5980
|
}
|
@@ -5995,7 +5995,7 @@ function Zs(n) {
|
|
5995
5995
|
* See the License for the specific language governing permissions and
|
5996
5996
|
* limitations under the License.
|
5997
5997
|
*/
|
5998
|
-
async function
|
5998
|
+
async function no(n, e = {}) {
|
5999
5999
|
return W(n, "GET", "/v1/projects", e);
|
6000
6000
|
}
|
6001
6001
|
/**
|
@@ -6014,14 +6014,14 @@ async function eo(n, e = {}) {
|
|
6014
6014
|
* See the License for the specific language governing permissions and
|
6015
6015
|
* limitations under the License.
|
6016
6016
|
*/
|
6017
|
-
const
|
6018
|
-
async function
|
6017
|
+
const ro = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, io = /^https?/;
|
6018
|
+
async function so(n) {
|
6019
6019
|
if (n.config.emulator)
|
6020
6020
|
return;
|
6021
|
-
const { authorizedDomains: e } = await
|
6021
|
+
const { authorizedDomains: e } = await no(n);
|
6022
6022
|
for (const t of e)
|
6023
6023
|
try {
|
6024
|
-
if (
|
6024
|
+
if (oo(t))
|
6025
6025
|
return;
|
6026
6026
|
} catch {
|
6027
6027
|
}
|
@@ -6031,15 +6031,15 @@ async function ro(n) {
|
|
6031
6031
|
/* AuthErrorCode.INVALID_ORIGIN */
|
6032
6032
|
);
|
6033
6033
|
}
|
6034
|
-
function
|
6034
|
+
function oo(n) {
|
6035
6035
|
const e = nt(), { protocol: t, hostname: r } = new URL(e);
|
6036
6036
|
if (n.startsWith("chrome-extension://")) {
|
6037
6037
|
const o = new URL(n);
|
6038
6038
|
return o.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === r;
|
6039
6039
|
}
|
6040
|
-
if (!
|
6040
|
+
if (!io.test(t))
|
6041
6041
|
return !1;
|
6042
|
-
if (
|
6042
|
+
if (ro.test(n))
|
6043
6043
|
return r === n;
|
6044
6044
|
const i = n.replace(/\./g, "\\.");
|
6045
6045
|
return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r);
|
@@ -6060,7 +6060,7 @@ function io(n) {
|
|
6060
6060
|
* See the License for the specific language governing permissions and
|
6061
6061
|
* limitations under the License.
|
6062
6062
|
*/
|
6063
|
-
const
|
6063
|
+
const ao = new Ee(3e4, 6e4);
|
6064
6064
|
function Vt() {
|
6065
6065
|
const n = M().___jsl;
|
6066
6066
|
if (n != null && n.H) {
|
@@ -6070,7 +6070,7 @@ function Vt() {
|
|
6070
6070
|
n.CP[t] = null;
|
6071
6071
|
}
|
6072
6072
|
}
|
6073
|
-
function
|
6073
|
+
function co(n) {
|
6074
6074
|
return new Promise((e, t) => {
|
6075
6075
|
var r, i, s;
|
6076
6076
|
function o() {
|
@@ -6085,7 +6085,7 @@ function oo(n) {
|
|
6085
6085
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6086
6086
|
));
|
6087
6087
|
},
|
6088
|
-
timeout:
|
6088
|
+
timeout: ao.get()
|
6089
6089
|
});
|
6090
6090
|
}
|
6091
6091
|
if (!((i = (r = M().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
|
@@ -6093,22 +6093,22 @@ function oo(n) {
|
|
6093
6093
|
else if (!((s = M().gapi) === null || s === void 0) && s.load)
|
6094
6094
|
o();
|
6095
6095
|
else {
|
6096
|
-
const a =
|
6096
|
+
const a = Yi("iframefcb");
|
6097
6097
|
return M()[a] = () => {
|
6098
6098
|
gapi.load ? o() : t($(
|
6099
6099
|
n,
|
6100
6100
|
"network-request-failed"
|
6101
6101
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6102
6102
|
));
|
6103
|
-
},
|
6103
|
+
}, Rn(`${Ki()}?onload=${a}`).catch((c) => t(c));
|
6104
6104
|
}
|
6105
6105
|
}).catch((e) => {
|
6106
6106
|
throw Oe = null, e;
|
6107
6107
|
});
|
6108
6108
|
}
|
6109
6109
|
let Oe = null;
|
6110
|
-
function
|
6111
|
-
return Oe = Oe ||
|
6110
|
+
function lo(n) {
|
6111
|
+
return Oe = Oe || co(n), Oe;
|
6112
6112
|
}
|
6113
6113
|
/**
|
6114
6114
|
* @license
|
@@ -6126,7 +6126,7 @@ function ao(n) {
|
|
6126
6126
|
* See the License for the specific language governing permissions and
|
6127
6127
|
* limitations under the License.
|
6128
6128
|
*/
|
6129
|
-
const
|
6129
|
+
const uo = new Ee(5e3, 15e3), ho = "__/auth/iframe", fo = "emulator/auth/iframe", po = {
|
6130
6130
|
style: {
|
6131
6131
|
position: "absolute",
|
6132
6132
|
top: "-100px",
|
@@ -6135,13 +6135,13 @@ const co = new Ee(5e3, 15e3), lo = "__/auth/iframe", uo = "emulator/auth/iframe"
|
|
6135
6135
|
},
|
6136
6136
|
"aria-hidden": "true",
|
6137
6137
|
tabindex: "-1"
|
6138
|
-
},
|
6138
|
+
}, go = /* @__PURE__ */ new Map([
|
6139
6139
|
["identitytoolkit.googleapis.com", "p"],
|
6140
6140
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
6141
6141
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
6142
6142
|
// test
|
6143
6143
|
]);
|
6144
|
-
function
|
6144
|
+
function mo(n) {
|
6145
6145
|
const e = n.config;
|
6146
6146
|
y(
|
6147
6147
|
e.authDomain,
|
@@ -6149,17 +6149,17 @@ function po(n) {
|
|
6149
6149
|
"auth-domain-config-required"
|
6150
6150
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
6151
6151
|
);
|
6152
|
-
const t = e.emulator ? ut(e,
|
6152
|
+
const t = e.emulator ? ut(e, fo) : `https://${n.config.authDomain}/${ho}`, r = {
|
6153
6153
|
apiKey: e.apiKey,
|
6154
6154
|
appName: n.name,
|
6155
6155
|
v: we
|
6156
|
-
}, i =
|
6156
|
+
}, i = go.get(n.config.apiHost);
|
6157
6157
|
i && (r.eid = i);
|
6158
6158
|
const s = n._getFrameworks();
|
6159
6159
|
return s.length && (r.fw = s.join(",")), `${t}?${Ie(r).slice(1)}`;
|
6160
6160
|
}
|
6161
|
-
async function
|
6162
|
-
const e = await
|
6161
|
+
async function yo(n) {
|
6162
|
+
const e = await lo(n), t = M().gapi;
|
6163
6163
|
return y(
|
6164
6164
|
t,
|
6165
6165
|
n,
|
@@ -6167,9 +6167,9 @@ async function go(n) {
|
|
6167
6167
|
/* AuthErrorCode.INTERNAL_ERROR */
|
6168
6168
|
), e.open({
|
6169
6169
|
where: document.body,
|
6170
|
-
url:
|
6170
|
+
url: mo(n),
|
6171
6171
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
6172
|
-
attributes:
|
6172
|
+
attributes: po,
|
6173
6173
|
dontclear: !0
|
6174
6174
|
}, (r) => new Promise(async (i, s) => {
|
6175
6175
|
await r.restyle({
|
@@ -6182,7 +6182,7 @@ async function go(n) {
|
|
6182
6182
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6183
6183
|
), a = M().setTimeout(() => {
|
6184
6184
|
s(o);
|
6185
|
-
},
|
6185
|
+
}, uo.get());
|
6186
6186
|
function c() {
|
6187
6187
|
M().clearTimeout(a), i(r);
|
6188
6188
|
}
|
@@ -6207,12 +6207,12 @@ async function go(n) {
|
|
6207
6207
|
* See the License for the specific language governing permissions and
|
6208
6208
|
* limitations under the License.
|
6209
6209
|
*/
|
6210
|
-
const
|
6210
|
+
const _o = {
|
6211
6211
|
location: "yes",
|
6212
6212
|
resizable: "yes",
|
6213
6213
|
statusbar: "yes",
|
6214
6214
|
toolbar: "no"
|
6215
|
-
},
|
6215
|
+
}, vo = 500, bo = 600, Io = "_blank", wo = "http://localhost";
|
6216
6216
|
class Ht {
|
6217
6217
|
constructor(e) {
|
6218
6218
|
this.window = e, this.associatedEvent = null;
|
@@ -6225,19 +6225,19 @@ class Ht {
|
|
6225
6225
|
}
|
6226
6226
|
}
|
6227
6227
|
}
|
6228
|
-
function
|
6228
|
+
function Eo(n, e, t, r = vo, i = bo) {
|
6229
6229
|
const s = Math.max((window.screen.availHeight - i) / 2, 0).toString(), o = Math.max((window.screen.availWidth - r) / 2, 0).toString();
|
6230
6230
|
let a = "";
|
6231
|
-
const c = Object.assign(Object.assign({},
|
6231
|
+
const c = Object.assign(Object.assign({}, _o), {
|
6232
6232
|
width: r.toString(),
|
6233
6233
|
height: i.toString(),
|
6234
6234
|
top: s,
|
6235
6235
|
left: o
|
6236
6236
|
}), u = P().toLowerCase();
|
6237
|
-
t && (a =
|
6237
|
+
t && (a = In(u) ? Io : t), bn(u) && (e = e || wo, c.scrollbars = "yes");
|
6238
6238
|
const _ = Object.entries(c).reduce((S, [O, N]) => `${S}${O}=${N},`, "");
|
6239
|
-
if (
|
6240
|
-
return
|
6239
|
+
if (Fi(u) && a !== "_self")
|
6240
|
+
return To(e || "", a), new Ht(null);
|
6241
6241
|
const b = window.open(e || "", a, _);
|
6242
6242
|
y(
|
6243
6243
|
b,
|
@@ -6251,7 +6251,7 @@ function Io(n, e, t, r = yo, i = _o) {
|
|
6251
6251
|
}
|
6252
6252
|
return new Ht(b);
|
6253
6253
|
}
|
6254
|
-
function
|
6254
|
+
function To(n, e) {
|
6255
6255
|
const t = document.createElement("a");
|
6256
6256
|
t.href = n, t.target = e;
|
6257
6257
|
const r = document.createEvent("MouseEvent");
|
@@ -6273,7 +6273,7 @@ function wo(n, e) {
|
|
6273
6273
|
* See the License for the specific language governing permissions and
|
6274
6274
|
* limitations under the License.
|
6275
6275
|
*/
|
6276
|
-
const
|
6276
|
+
const Ao = "__/auth/handler", So = "emulator/auth/handler", Co = encodeURIComponent("fac");
|
6277
6277
|
async function xt(n, e, t, r, i, s) {
|
6278
6278
|
y(
|
6279
6279
|
n.config.authDomain,
|
@@ -6294,8 +6294,8 @@ async function xt(n, e, t, r, i, s) {
|
|
6294
6294
|
v: we,
|
6295
6295
|
eventId: i
|
6296
6296
|
};
|
6297
|
-
if (e instanceof
|
6298
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
6297
|
+
if (e instanceof On) {
|
6298
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", cr(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
6299
6299
|
for (const [_, b] of Object.entries(s || {}))
|
6300
6300
|
o[_] = b;
|
6301
6301
|
}
|
@@ -6307,11 +6307,11 @@ async function xt(n, e, t, r, i, s) {
|
|
6307
6307
|
const a = o;
|
6308
6308
|
for (const _ of Object.keys(a))
|
6309
6309
|
a[_] === void 0 && delete a[_];
|
6310
|
-
const c = await n._getAppCheckToken(), u = c ? `#${
|
6311
|
-
return `${
|
6310
|
+
const c = await n._getAppCheckToken(), u = c ? `#${Co}=${encodeURIComponent(c)}` : "";
|
6311
|
+
return `${Ro(n)}?${Ie(a).slice(1)}${u}`;
|
6312
6312
|
}
|
6313
|
-
function
|
6314
|
-
return n.emulator ? ut(n,
|
6313
|
+
function Ro({ config: n }) {
|
6314
|
+
return n.emulator ? ut(n, So) : `https://${n.authDomain}/${Ao}`;
|
6315
6315
|
}
|
6316
6316
|
/**
|
6317
6317
|
* @license
|
@@ -6330,9 +6330,9 @@ function So({ config: n }) {
|
|
6330
6330
|
* limitations under the License.
|
6331
6331
|
*/
|
6332
6332
|
const Ye = "webStorageSupport";
|
6333
|
-
class
|
6333
|
+
class Po {
|
6334
6334
|
constructor() {
|
6335
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence =
|
6335
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Mn, this._completeRedirectFn = Xs, this._overrideRedirectResult = Ks;
|
6336
6336
|
}
|
6337
6337
|
// Wrapping in async even though we don't await anywhere in order
|
6338
6338
|
// to make sure errors are raised as promise rejections
|
@@ -6340,12 +6340,12 @@ class Co {
|
|
6340
6340
|
var s;
|
6341
6341
|
H((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
6342
6342
|
const o = await xt(e, t, r, nt(), i);
|
6343
|
-
return
|
6343
|
+
return Eo(e, o, mt());
|
6344
6344
|
}
|
6345
6345
|
async _openRedirect(e, t, r, i) {
|
6346
6346
|
await this._originValidation(e);
|
6347
6347
|
const s = await xt(e, t, r, nt(), i);
|
6348
|
-
return
|
6348
|
+
return ks(s), new Promise(() => {
|
6349
6349
|
});
|
6350
6350
|
}
|
6351
6351
|
_initialize(e) {
|
@@ -6360,7 +6360,7 @@ class Co {
|
|
6360
6360
|
}), r;
|
6361
6361
|
}
|
6362
6362
|
async initAndGetManager(e) {
|
6363
|
-
const t = await
|
6363
|
+
const t = await yo(e), r = new eo(e);
|
6364
6364
|
return t.register("authEvent", (i) => (y(
|
6365
6365
|
i == null ? void 0 : i.authEvent,
|
6366
6366
|
e,
|
@@ -6384,13 +6384,13 @@ class Co {
|
|
6384
6384
|
}
|
6385
6385
|
_originValidation(e) {
|
6386
6386
|
const t = e._key();
|
6387
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
6387
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = so(e)), this.originValidationPromises[t];
|
6388
6388
|
}
|
6389
6389
|
get _shouldInitProactively() {
|
6390
|
-
return
|
6390
|
+
return Sn() || ft() || Be();
|
6391
6391
|
}
|
6392
6392
|
}
|
6393
|
-
const
|
6393
|
+
const Oo = Po;
|
6394
6394
|
var Wt = "@firebase/auth", zt = "1.7.2";
|
6395
6395
|
/**
|
6396
6396
|
* @license
|
@@ -6408,7 +6408,7 @@ var Wt = "@firebase/auth", zt = "1.7.2";
|
|
6408
6408
|
* See the License for the specific language governing permissions and
|
6409
6409
|
* limitations under the License.
|
6410
6410
|
*/
|
6411
|
-
class
|
6411
|
+
class ko {
|
6412
6412
|
constructor(e) {
|
6413
6413
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
6414
6414
|
}
|
@@ -6459,7 +6459,7 @@ class Po {
|
|
6459
6459
|
* See the License for the specific language governing permissions and
|
6460
6460
|
* limitations under the License.
|
6461
6461
|
*/
|
6462
|
-
function
|
6462
|
+
function No(n) {
|
6463
6463
|
switch (n) {
|
6464
6464
|
case "Node":
|
6465
6465
|
return "node";
|
@@ -6475,7 +6475,7 @@ function Oo(n) {
|
|
6475
6475
|
return;
|
6476
6476
|
}
|
6477
6477
|
}
|
6478
|
-
function
|
6478
|
+
function Do(n) {
|
6479
6479
|
me(new de(
|
6480
6480
|
"auth",
|
6481
6481
|
(e, { options: t }) => {
|
@@ -6488,9 +6488,9 @@ function ko(n) {
|
|
6488
6488
|
apiHost: "identitytoolkit.googleapis.com",
|
6489
6489
|
tokenApiHost: "securetoken.googleapis.com",
|
6490
6490
|
apiScheme: "https",
|
6491
|
-
sdkClientVersion:
|
6492
|
-
}, u = new
|
6493
|
-
return
|
6491
|
+
sdkClientVersion: Cn(n)
|
6492
|
+
}, u = new Ji(r, i, s, c);
|
6493
|
+
return ts(u, t), u;
|
6494
6494
|
},
|
6495
6495
|
"PUBLIC"
|
6496
6496
|
/* ComponentType.PUBLIC */
|
@@ -6509,14 +6509,14 @@ function ko(n) {
|
|
6509
6509
|
"auth"
|
6510
6510
|
/* _ComponentName.AUTH */
|
6511
6511
|
).getImmediate());
|
6512
|
-
return ((r) => new
|
6512
|
+
return ((r) => new ko(r))(t);
|
6513
6513
|
},
|
6514
6514
|
"PRIVATE"
|
6515
6515
|
/* ComponentType.PRIVATE */
|
6516
6516
|
).setInstantiationMode(
|
6517
6517
|
"EXPLICIT"
|
6518
6518
|
/* InstantiationMode.EXPLICIT */
|
6519
|
-
)), oe(Wt, zt,
|
6519
|
+
)), oe(Wt, zt, No(n)), oe(Wt, zt, "esm2017");
|
6520
6520
|
}
|
6521
6521
|
/**
|
6522
6522
|
* @license
|
@@ -6534,11 +6534,11 @@ function ko(n) {
|
|
6534
6534
|
* See the License for the specific language governing permissions and
|
6535
6535
|
* limitations under the License.
|
6536
6536
|
*/
|
6537
|
-
const
|
6537
|
+
const Lo = 5 * 60, $o = nn("authIdTokenMaxAge") || Lo;
|
6538
6538
|
let Jt = null;
|
6539
|
-
const
|
6539
|
+
const Mo = (n) => async (e) => {
|
6540
6540
|
const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
6541
|
-
if (r && r >
|
6541
|
+
if (r && r > $o)
|
6542
6542
|
return;
|
6543
6543
|
const i = t == null ? void 0 : t.token;
|
6544
6544
|
Jt !== i && (Jt = i, await fetch(n, {
|
@@ -6548,33 +6548,33 @@ const Lo = (n) => async (e) => {
|
|
6548
6548
|
} : {}
|
6549
6549
|
}));
|
6550
6550
|
};
|
6551
|
-
function
|
6552
|
-
const e =
|
6551
|
+
function Uo(n = ci()) {
|
6552
|
+
const e = an(n, "auth");
|
6553
6553
|
if (e.isInitialized())
|
6554
6554
|
return e.getImmediate();
|
6555
|
-
const t =
|
6556
|
-
popupRedirectResolver:
|
6555
|
+
const t = es(n, {
|
6556
|
+
popupRedirectResolver: Oo,
|
6557
6557
|
persistence: [
|
6558
|
-
|
6559
|
-
|
6560
|
-
|
6558
|
+
Bs,
|
6559
|
+
Rs,
|
6560
|
+
Mn
|
6561
6561
|
]
|
6562
|
-
}), r =
|
6562
|
+
}), r = nn("authTokenSyncURL");
|
6563
6563
|
if (r && typeof isSecureContext == "boolean" && isSecureContext) {
|
6564
6564
|
const s = new URL(r, location.origin);
|
6565
6565
|
if (location.origin === s.origin) {
|
6566
|
-
const o =
|
6567
|
-
|
6566
|
+
const o = Mo(s.toString());
|
6567
|
+
ws(t, o, () => o(t.currentUser)), Is(t, (a) => o(a));
|
6568
6568
|
}
|
6569
6569
|
}
|
6570
|
-
const i =
|
6571
|
-
return i &&
|
6570
|
+
const i = Qn("auth");
|
6571
|
+
return i && ns(t, `http://${i}`), t;
|
6572
6572
|
}
|
6573
|
-
function
|
6573
|
+
function jo() {
|
6574
6574
|
var n, e;
|
6575
6575
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
6576
6576
|
}
|
6577
|
-
|
6577
|
+
qi({
|
6578
6578
|
loadJS(n) {
|
6579
6579
|
return new Promise((e, t) => {
|
6580
6580
|
const r = document.createElement("script");
|
@@ -6584,22 +6584,22 @@ zi({
|
|
6584
6584
|
/* AuthErrorCode.INTERNAL_ERROR */
|
6585
6585
|
);
|
6586
6586
|
s.customData = i, t(s);
|
6587
|
-
}, r.type = "text/javascript", r.charset = "UTF-8",
|
6587
|
+
}, r.type = "text/javascript", r.charset = "UTF-8", jo().appendChild(r);
|
6588
6588
|
});
|
6589
6589
|
},
|
6590
6590
|
gapiScript: "https://apis.google.com/js/api.js",
|
6591
6591
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
6592
6592
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
6593
6593
|
});
|
6594
|
-
|
6594
|
+
Do(
|
6595
6595
|
"Browser"
|
6596
6596
|
/* ClientPlatform.BROWSER */
|
6597
6597
|
);
|
6598
|
-
var
|
6599
|
-
function
|
6598
|
+
var Fo = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
6599
|
+
function Bo(n) {
|
6600
6600
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
6601
6601
|
}
|
6602
|
-
var
|
6602
|
+
var xn = { exports: {} };
|
6603
6603
|
(function(n) {
|
6604
6604
|
(function(e) {
|
6605
6605
|
function t(l, m) {
|
@@ -6680,10 +6680,10 @@ var Vn = { exports: {} };
|
|
6680
6680
|
return m ? d ? C(m, l) : U(m, l) : d ? I(l) : k(l);
|
6681
6681
|
}
|
6682
6682
|
n.exports ? n.exports = D : e.md5 = D;
|
6683
|
-
})(
|
6684
|
-
})(
|
6685
|
-
var
|
6686
|
-
const
|
6683
|
+
})(Fo);
|
6684
|
+
})(xn);
|
6685
|
+
var Vo = xn.exports;
|
6686
|
+
const Ho = /* @__PURE__ */ Bo(Vo), _t = (n, e) => async (t, r = {}) => {
|
6687
6687
|
const i = e ? await e.getIdToken() : null, s = await fetch(`${n}${t}`, {
|
6688
6688
|
mode: "cors",
|
6689
6689
|
...r,
|
@@ -6701,7 +6701,7 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6701
6701
|
body: o
|
6702
6702
|
});
|
6703
6703
|
return o;
|
6704
|
-
},
|
6704
|
+
}, xo = (n) => {
|
6705
6705
|
const e = n.properties || {}, t = n.inputProps || Object.keys(e), r = (i, s) => {
|
6706
6706
|
const o = e[i] || {};
|
6707
6707
|
if ([null, void 0].includes(s))
|
@@ -6738,12 +6738,12 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6738
6738
|
),
|
6739
6739
|
validateAttr: r
|
6740
6740
|
};
|
6741
|
-
},
|
6741
|
+
}, Wo = (n = {}) => Object.keys(n).length ? `?q=${JSON.stringify(n)}` : "", zo = (n) => [...n].reduce(
|
6742
6742
|
(e, t) => t === t.toUpperCase() ? `${e}-${t.toLowerCase()}` : `${e}${t}`,
|
6743
6743
|
""
|
6744
|
-
),
|
6745
|
-
const e =
|
6746
|
-
return (t, r) => `/${e}${t ? `/${encodeURIComponent(t)}` : ""}${
|
6744
|
+
), Jo = (n) => `${n[0].toLowerCase()}${n.slice(1)}`, qo = (n) => {
|
6745
|
+
const e = zo(n);
|
6746
|
+
return (t, r) => `/${e}${t ? `/${encodeURIComponent(t)}` : ""}${Wo(r)}`;
|
6747
6747
|
}, qt = (n, e) => {
|
6748
6748
|
const t = Array.isArray(e.inputProps);
|
6749
6749
|
return Object.keys(n).reduce(
|
@@ -6758,7 +6758,7 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6758
6758
|
},
|
6759
6759
|
{}
|
6760
6760
|
);
|
6761
|
-
},
|
6761
|
+
}, Go = ({ primaryKey: n, properties: e, ...t }) => ({
|
6762
6762
|
primaryKey: n || "id",
|
6763
6763
|
properties: Object.keys(e || {}).reduce(
|
6764
6764
|
(r, i) => {
|
@@ -6779,8 +6779,8 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6779
6779
|
{}
|
6780
6780
|
),
|
6781
6781
|
...t
|
6782
|
-
}),
|
6783
|
-
const s =
|
6782
|
+
}), Ko = (n, e, t, r = {}, i = {}) => {
|
6783
|
+
const s = Go(r), { primaryKey: o, properties: a } = s, c = xo(s), u = qo(t), _ = (...v) => _t(n, e.authUser)(...v), b = ({ data: v, ...I }) => _(u(null, I), {
|
6784
6784
|
method: "POST",
|
6785
6785
|
body: qt(v, s)
|
6786
6786
|
}), S = ({ data: v, ...I }) => {
|
@@ -6797,7 +6797,7 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6797
6797
|
var E;
|
6798
6798
|
const U = a[C] || {}, { type: D, isScalar: l, isRef: m, format: d, items: w } = U;
|
6799
6799
|
if (m) {
|
6800
|
-
const A =
|
6800
|
+
const A = Jo(D);
|
6801
6801
|
return l ? {
|
6802
6802
|
...k,
|
6803
6803
|
[C]: i[A].parse(v[C])
|
@@ -6886,11 +6886,11 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6886
6886
|
}));
|
6887
6887
|
}
|
6888
6888
|
};
|
6889
|
-
},
|
6889
|
+
}, Yo = (n, e, t) => Object.keys(t.properties).reduce(
|
6890
6890
|
(r, i) => {
|
6891
6891
|
const s = t.properties[i].$ref.split("/").pop();
|
6892
6892
|
return Object.assign(r, {
|
6893
|
-
[i]:
|
6893
|
+
[i]: Ko(
|
6894
6894
|
n,
|
6895
6895
|
e,
|
6896
6896
|
t.definitions[s].plural || `${i}s`,
|
@@ -6900,7 +6900,7 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6900
6900
|
});
|
6901
6901
|
},
|
6902
6902
|
{}
|
6903
|
-
),
|
6903
|
+
), Qo = (n, e) => Object.keys(n.definitions).reduce(
|
6904
6904
|
(t, r) => ({
|
6905
6905
|
...t,
|
6906
6906
|
[r]: e[r] ? {
|
@@ -6919,7 +6919,7 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
6919
6919
|
} : n.definitions[r]
|
6920
6920
|
}),
|
6921
6921
|
{}
|
6922
|
-
),
|
6922
|
+
), Xo = "http://json-schema.org/draft-07/schema#", Zo = {
|
6923
6923
|
Country: {
|
6924
6924
|
type: "object",
|
6925
6925
|
properties: {
|
@@ -7246,12 +7246,6 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
7246
7246
|
items: {
|
7247
7247
|
$ref: "#/definitions/JobApplication"
|
7248
7248
|
}
|
7249
|
-
},
|
7250
|
-
eventRsvps: {
|
7251
|
-
type: "array",
|
7252
|
-
items: {
|
7253
|
-
$ref: "#/definitions/EventRsvp"
|
7254
|
-
}
|
7255
7249
|
}
|
7256
7250
|
}
|
7257
7251
|
},
|
@@ -9237,153 +9231,8 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
9237
9231
|
$ref: "#/definitions/Track"
|
9238
9232
|
}
|
9239
9233
|
}
|
9240
|
-
},
|
9241
|
-
Event: {
|
9242
|
-
type: "object",
|
9243
|
-
properties: {
|
9244
|
-
id: {
|
9245
|
-
type: "integer"
|
9246
|
-
},
|
9247
|
-
createdAt: {
|
9248
|
-
type: "string",
|
9249
|
-
format: "date-time"
|
9250
|
-
},
|
9251
|
-
updatedAt: {
|
9252
|
-
type: "string",
|
9253
|
-
format: "date-time"
|
9254
|
-
},
|
9255
|
-
createdBy: {
|
9256
|
-
type: [
|
9257
|
-
"string",
|
9258
|
-
"null"
|
9259
|
-
]
|
9260
|
-
},
|
9261
|
-
status: {
|
9262
|
-
type: "string",
|
9263
|
-
enum: [
|
9264
|
-
"draft",
|
9265
|
-
"published",
|
9266
|
-
"cancelled",
|
9267
|
-
"archived"
|
9268
|
-
]
|
9269
|
-
},
|
9270
|
-
title: {
|
9271
|
-
type: "string"
|
9272
|
-
},
|
9273
|
-
start: {
|
9274
|
-
type: "string",
|
9275
|
-
format: "date-time"
|
9276
|
-
},
|
9277
|
-
end: {
|
9278
|
-
type: "string",
|
9279
|
-
format: "date-time"
|
9280
|
-
},
|
9281
|
-
timezone: {
|
9282
|
-
type: [
|
9283
|
-
"string",
|
9284
|
-
"null"
|
9285
|
-
]
|
9286
|
-
},
|
9287
|
-
lang: {
|
9288
|
-
type: "string",
|
9289
|
-
enum: [
|
9290
|
-
"en",
|
9291
|
-
"es",
|
9292
|
-
"pt"
|
9293
|
-
]
|
9294
|
-
},
|
9295
|
-
cover: {
|
9296
|
-
type: "string"
|
9297
|
-
},
|
9298
|
-
shortDescription: {
|
9299
|
-
type: "string"
|
9300
|
-
},
|
9301
|
-
description: {
|
9302
|
-
type: [
|
9303
|
-
"string",
|
9304
|
-
"null"
|
9305
|
-
]
|
9306
|
-
},
|
9307
|
-
maxTickets: {
|
9308
|
-
type: "integer"
|
9309
|
-
},
|
9310
|
-
isOnline: {
|
9311
|
-
type: "boolean"
|
9312
|
-
},
|
9313
|
-
venue: {
|
9314
|
-
type: [
|
9315
|
-
"number",
|
9316
|
-
"string",
|
9317
|
-
"boolean",
|
9318
|
-
"object",
|
9319
|
-
"array",
|
9320
|
-
"null"
|
9321
|
-
]
|
9322
|
-
},
|
9323
|
-
onlineVenue: {
|
9324
|
-
type: [
|
9325
|
-
"string",
|
9326
|
-
"null"
|
9327
|
-
]
|
9328
|
-
},
|
9329
|
-
zoomMeetingId: {
|
9330
|
-
type: [
|
9331
|
-
"string",
|
9332
|
-
"null"
|
9333
|
-
]
|
9334
|
-
},
|
9335
|
-
videoUrl: {
|
9336
|
-
type: [
|
9337
|
-
"string",
|
9338
|
-
"null"
|
9339
|
-
]
|
9340
|
-
},
|
9341
|
-
rsvps: {
|
9342
|
-
type: "array",
|
9343
|
-
items: {
|
9344
|
-
$ref: "#/definitions/EventRsvp"
|
9345
|
-
}
|
9346
|
-
}
|
9347
|
-
}
|
9348
|
-
},
|
9349
|
-
EventRsvp: {
|
9350
|
-
type: "object",
|
9351
|
-
properties: {
|
9352
|
-
id: {
|
9353
|
-
type: "integer"
|
9354
|
-
},
|
9355
|
-
createdAt: {
|
9356
|
-
type: "string",
|
9357
|
-
format: "date-time"
|
9358
|
-
},
|
9359
|
-
updatedAt: {
|
9360
|
-
type: "string",
|
9361
|
-
format: "date-time"
|
9362
|
-
},
|
9363
|
-
createdBy: {
|
9364
|
-
type: [
|
9365
|
-
"string",
|
9366
|
-
"null"
|
9367
|
-
]
|
9368
|
-
},
|
9369
|
-
status: {
|
9370
|
-
type: "string",
|
9371
|
-
enum: [
|
9372
|
-
"yes",
|
9373
|
-
"no",
|
9374
|
-
"waitlist",
|
9375
|
-
"maybe"
|
9376
|
-
]
|
9377
|
-
},
|
9378
|
-
event: {
|
9379
|
-
$ref: "#/definitions/Event"
|
9380
|
-
},
|
9381
|
-
user: {
|
9382
|
-
$ref: "#/definitions/User"
|
9383
|
-
}
|
9384
|
-
}
|
9385
9234
|
}
|
9386
|
-
},
|
9235
|
+
}, ea = "object", ta = {
|
9387
9236
|
country: {
|
9388
9237
|
$ref: "#/definitions/Country"
|
9389
9238
|
},
|
@@ -9497,19 +9346,13 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
9497
9346
|
},
|
9498
9347
|
jobReviewTrack: {
|
9499
9348
|
$ref: "#/definitions/JobReviewTrack"
|
9500
|
-
},
|
9501
|
-
event: {
|
9502
|
-
$ref: "#/definitions/Event"
|
9503
|
-
},
|
9504
|
-
eventRsvp: {
|
9505
|
-
$ref: "#/definitions/EventRsvp"
|
9506
9349
|
}
|
9507
9350
|
}, ot = {
|
9508
|
-
$schema:
|
9509
|
-
definitions:
|
9510
|
-
type:
|
9511
|
-
properties:
|
9512
|
-
},
|
9351
|
+
$schema: Xo,
|
9352
|
+
definitions: Zo,
|
9353
|
+
type: ea,
|
9354
|
+
properties: ta
|
9355
|
+
}, na = 60 * 60 * 1e3, Gt = 24 * na, ra = {
|
9513
9356
|
Country: {
|
9514
9357
|
primaryKey: "code",
|
9515
9358
|
plural: "countries",
|
@@ -9571,7 +9414,7 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
9571
9414
|
}
|
9572
9415
|
},
|
9573
9416
|
parse: (n) => {
|
9574
|
-
const e = n.github ? `https://github.com/${n.github}.png?size=` : `https://www.gravatar.com/avatar/${
|
9417
|
+
const e = n.github ? `https://github.com/${n.github}.png?size=` : `https://www.gravatar.com/avatar/${Ho(n.email)}?s=`;
|
9575
9418
|
return {
|
9576
9419
|
...n,
|
9577
9420
|
fullName: `${n.firstName || ""}${n.lastName ? ` ${n.lastName}` : ""}`,
|
@@ -9816,47 +9659,35 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
9816
9659
|
},
|
9817
9660
|
JobCrawlerQuery: {
|
9818
9661
|
plural: "jobCrawlerQueries"
|
9819
|
-
},
|
9820
|
-
Event: {
|
9821
|
-
inputProps: [
|
9822
|
-
"status",
|
9823
|
-
"title",
|
9824
|
-
"start",
|
9825
|
-
"end",
|
9826
|
-
"timezone",
|
9827
|
-
"lang",
|
9828
|
-
"cover",
|
9829
|
-
"shortDescription",
|
9830
|
-
"description",
|
9831
|
-
"maxTickets",
|
9832
|
-
"isOnline",
|
9833
|
-
"venue",
|
9834
|
-
"onlineVenue",
|
9835
|
-
"zoomMeetingId",
|
9836
|
-
"videoUrl"
|
9837
|
-
],
|
9838
|
-
searchProps: ["title"],
|
9839
|
-
defaultProps: ["title", "date", "lang", "cover", "shortDescription"],
|
9840
|
-
properties: {
|
9841
|
-
description: {
|
9842
|
-
inputType: "textarea"
|
9843
|
-
}
|
9844
|
-
}
|
9845
9662
|
}
|
9846
|
-
},
|
9847
|
-
...
|
9663
|
+
}, ia = (n, e) => ({
|
9664
|
+
...Yo(n, e, {
|
9848
9665
|
...ot,
|
9849
|
-
definitions:
|
9666
|
+
definitions: Qo(ot, ra)
|
9850
9667
|
}),
|
9851
9668
|
gcpLog: {
|
9852
9669
|
getEntries: async (t) => await _t(n, e.authUser)(`/gcp-logs?q=${JSON.stringify(t)}`)
|
9853
9670
|
}
|
9854
|
-
}),
|
9671
|
+
}), Kt = (n) => typeof n == "string" ? { id: n } : n, Yt = (n) => {
|
9672
|
+
var e;
|
9673
|
+
return {
|
9674
|
+
...n,
|
9675
|
+
...!!n.learningObjectives && {
|
9676
|
+
learningObjectives: n.learningObjectives.map(Kt)
|
9677
|
+
},
|
9678
|
+
...!!((e = n.variants) != null && e.length) && {
|
9679
|
+
variants: n.variants.map((t) => ({
|
9680
|
+
...t,
|
9681
|
+
learningObjectives: t.learningObjectives.map(Kt)
|
9682
|
+
}))
|
9683
|
+
}
|
9684
|
+
};
|
9685
|
+
}, sa = (n, e) => {
|
9855
9686
|
const t = _t(n, e.authUser);
|
9856
9687
|
return {
|
9857
9688
|
project: {
|
9858
|
-
findMany: (r = {}) => t(`/projects?q=${JSON.stringify(r)}`),
|
9859
|
-
findBySlug: (r, i = {}) => t(`/projects/${r}?q=${JSON.stringify(i)}`)
|
9689
|
+
findMany: (r = {}) => t(`/projects?q=${JSON.stringify(r)}`).then((i) => i.map(Yt)),
|
9690
|
+
findBySlug: (r, i = {}) => t(`/projects/${r}?q=${JSON.stringify(i)}`).then(Yt)
|
9860
9691
|
},
|
9861
9692
|
topic: {
|
9862
9693
|
findMany: (r = {}) => t(`/topics?q=${JSON.stringify(r)}`),
|
@@ -9866,52 +9697,52 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
9866
9697
|
findMany: (r = {}) => t(`/learning-objectives?q=${JSON.stringify(r)}`)
|
9867
9698
|
}
|
9868
9699
|
};
|
9869
|
-
}, je = (n) => n > 9 ? `${n}` : `0${n}`,
|
9700
|
+
}, je = (n) => n > 9 ? `${n}` : `0${n}`, oa = (n) => `${je(n.getUTCDate())}/${je(n.getUTCMonth() + 1)}/${n.getUTCFullYear()}`, aa = (n) => `${je(n.getUTCHours())}:${je(n.getUTCMinutes())}:${n.getUTCSeconds()} UTC`, da = (n) => `${oa(n)} ${aa(n)}`, ca = {
|
9870
9701
|
es: "es-ES",
|
9871
9702
|
pt: "pt-BR"
|
9872
|
-
},
|
9703
|
+
}, ua = (n, e = "es", t = !1) => new Intl.DateTimeFormat(ca[e], {
|
9873
9704
|
...t && {
|
9874
9705
|
year: "numeric"
|
9875
9706
|
},
|
9876
9707
|
month: "long",
|
9877
9708
|
day: "numeric",
|
9878
9709
|
timeZone: "UTC"
|
9879
|
-
}).format(new Date(n)),
|
9710
|
+
}).format(new Date(n)), ha = (n, e) => {
|
9880
9711
|
let t = e.getFullYear() - n.getFullYear();
|
9881
9712
|
const r = e.getMonth() - n.getMonth();
|
9882
9713
|
return (r < 0 || r === 0 && e.getDate() < n.getDate()) && t--, t;
|
9883
|
-
},
|
9714
|
+
}, la = (n, e, t) => {
|
9884
9715
|
const r = (i) => new Intl.NumberFormat(
|
9885
9716
|
`${i}-${e}`,
|
9886
9717
|
{ currency: t }
|
9887
9718
|
);
|
9888
9719
|
return r(e === "CR" ? "en" : n);
|
9889
|
-
},
|
9720
|
+
}, fa = (n, e, t, r) => la(
|
9890
9721
|
e,
|
9891
9722
|
t,
|
9892
9723
|
r
|
9893
|
-
).format(n),
|
9724
|
+
).format(n), pa = (n) => parseInt(n.replace(/[,\.]/g, ""), 10), ga = (n) => {
|
9894
9725
|
try {
|
9895
9726
|
return JSON.parse(window.localStorage.getItem(n));
|
9896
9727
|
} catch {
|
9897
9728
|
return null;
|
9898
9729
|
}
|
9899
|
-
},
|
9730
|
+
}, ma = ({
|
9900
9731
|
firebaseApiKey: n = "AIzaSyAXbaEbpq8NOfn0r8mIrcoHvoGRkJThwdc",
|
9901
9732
|
firebaseProject: e = "laboratoria-la",
|
9902
9733
|
coreApiUrl: t = "https://us-central1-outpost-272720.cloudfunctions.net/core-api"
|
9903
9734
|
} = {}) => {
|
9904
|
-
const r =
|
9735
|
+
const r = cn({
|
9905
9736
|
apiKey: n,
|
9906
9737
|
authDomain: `${e}.firebaseapp.com`,
|
9907
9738
|
databaseURL: `https://${e}.firebaseio.com`,
|
9908
9739
|
projectId: e
|
9909
|
-
}), i =
|
9740
|
+
}), i = Uo(r), s = { authUser: void 0, user: void 0 }, o = ia(t, s);
|
9910
9741
|
return {
|
9911
|
-
...
|
9742
|
+
...sa(t, s),
|
9912
9743
|
...o,
|
9913
9744
|
auth: {
|
9914
|
-
onChange: (u) =>
|
9745
|
+
onChange: (u) => Es(i, (_) => {
|
9915
9746
|
if (!_)
|
9916
9747
|
return Object.assign(s, { authUser: null, user: null }), u(s);
|
9917
9748
|
Object.assign(s, { authUser: _ }), o.user.findById(_.uid).then((b) => {
|
@@ -9920,25 +9751,25 @@ const Bo = /* @__PURE__ */ jo(Fo), _t = (n, e) => async (t, r = {}) => {
|
|
9920
9751
|
console.error(b), Object.assign(s, { authUser: null, user: null }), u(s);
|
9921
9752
|
});
|
9922
9753
|
}),
|
9923
|
-
signIn: (u, _) =>
|
9754
|
+
signIn: (u, _) => bs(
|
9924
9755
|
i,
|
9925
9756
|
u,
|
9926
9757
|
_
|
9927
9758
|
),
|
9928
|
-
signOut: () =>
|
9929
|
-
sendPasswordResetEmail: (u) =>
|
9759
|
+
signOut: () => Ts(i),
|
9760
|
+
sendPasswordResetEmail: (u) => vs(i, u)
|
9930
9761
|
},
|
9931
9762
|
firebaseApp: r
|
9932
9763
|
};
|
9933
9764
|
};
|
9934
9765
|
export {
|
9935
|
-
|
9936
|
-
|
9937
|
-
|
9938
|
-
|
9939
|
-
|
9940
|
-
|
9941
|
-
|
9942
|
-
|
9943
|
-
|
9766
|
+
ma as createApp,
|
9767
|
+
fa as formatCurrency,
|
9768
|
+
oa as formatDate,
|
9769
|
+
da as formatDateTime,
|
9770
|
+
ua as formatMonth,
|
9771
|
+
aa as formatTime,
|
9772
|
+
ha as getAgeAt,
|
9773
|
+
ga as loadFromLocalStorage,
|
9774
|
+
pa as parseCurrency
|
9944
9775
|
};
|