@laboratoria/sdk-js 7.1.2 → 7.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/laboratoria-sdk-es.js +286 -242
- package/dist/laboratoria-sdk-umd.js +74 -74
- package/package.json +4 -4
@@ -117,8 +117,8 @@ const Wt = function(n) {
|
|
117
117
|
const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
118
118
|
for (let i = 0; i < n.length; i += 3) {
|
119
119
|
const s = n[i], o = i + 1 < n.length, c = o ? n[i + 1] : 0, a = i + 2 < n.length, u = a ? n[i + 2] : 0, y = s >> 2, b = (s & 3) << 4 | c >> 4;
|
120
|
-
let
|
121
|
-
a || (
|
120
|
+
let S = (c & 15) << 2 | u >> 6, O = u & 63;
|
121
|
+
a || (O = 64, o || (S = 64)), r.push(t[y], t[b], t[S], t[O]);
|
122
122
|
}
|
123
123
|
return r.join("");
|
124
124
|
},
|
@@ -170,12 +170,12 @@ const Wt = function(n) {
|
|
170
170
|
const b = i < n.length ? t[n.charAt(i)] : 64;
|
171
171
|
if (++i, s == null || c == null || u == null || b == null)
|
172
172
|
throw new $n();
|
173
|
-
const
|
174
|
-
if (r.push(
|
175
|
-
const
|
176
|
-
if (r.push(
|
177
|
-
const
|
178
|
-
r.push(
|
173
|
+
const S = s << 2 | c >> 4;
|
174
|
+
if (r.push(S), u !== 64) {
|
175
|
+
const O = c << 4 & 240 | u >> 2;
|
176
|
+
if (r.push(O), b !== 64) {
|
177
|
+
const N = u << 6 & 192 | b;
|
178
|
+
r.push(N);
|
179
179
|
}
|
180
180
|
}
|
181
181
|
}
|
@@ -339,13 +339,13 @@ class Vn {
|
|
339
339
|
* See the License for the specific language governing permissions and
|
340
340
|
* limitations under the License.
|
341
341
|
*/
|
342
|
-
function
|
342
|
+
function P() {
|
343
343
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
344
344
|
}
|
345
345
|
function Wn() {
|
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
|
-
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(
|
348
|
+
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(P());
|
349
349
|
}
|
350
350
|
function xn() {
|
351
351
|
const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
@@ -355,7 +355,7 @@ function zn() {
|
|
355
355
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
356
356
|
}
|
357
357
|
function qn() {
|
358
|
-
const n =
|
358
|
+
const n = P();
|
359
359
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
360
360
|
}
|
361
361
|
function Gn() {
|
@@ -400,9 +400,9 @@ function Jn() {
|
|
400
400
|
* limitations under the License.
|
401
401
|
*/
|
402
402
|
const Kn = "FirebaseError";
|
403
|
-
class
|
403
|
+
class Y extends Error {
|
404
404
|
constructor(e, t, r) {
|
405
|
-
super(t), this.code = e, this.customData = r, this.name = Kn, Object.setPrototypeOf(this,
|
405
|
+
super(t), this.code = e, this.customData = r, this.name = Kn, Object.setPrototypeOf(this, Y.prototype), Error.captureStackTrace && Error.captureStackTrace(this, _e.prototype.create);
|
406
406
|
}
|
407
407
|
}
|
408
408
|
class _e {
|
@@ -411,7 +411,7 @@ class _e {
|
|
411
411
|
}
|
412
412
|
create(e, ...t) {
|
413
413
|
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], o = s ? Yn(s, r) : "Error", c = `${this.serviceName}: ${o} (${i}).`;
|
414
|
-
return new
|
414
|
+
return new Y(i, c, r);
|
415
415
|
}
|
416
416
|
}
|
417
417
|
function Yn(n, e) {
|
@@ -603,7 +603,7 @@ function He() {
|
|
603
603
|
* See the License for the specific language governing permissions and
|
604
604
|
* limitations under the License.
|
605
605
|
*/
|
606
|
-
function
|
606
|
+
function H(n) {
|
607
607
|
return n && n._delegate ? n._delegate : n;
|
608
608
|
}
|
609
609
|
class ae {
|
@@ -998,7 +998,7 @@ function fr(n) {
|
|
998
998
|
const i = () => {
|
999
999
|
n.removeEventListener("success", s), n.removeEventListener("error", o);
|
1000
1000
|
}, s = () => {
|
1001
|
-
t(
|
1001
|
+
t(J(n.result)), i();
|
1002
1002
|
}, o = () => {
|
1003
1003
|
r(n.error), i();
|
1004
1004
|
};
|
@@ -1034,7 +1034,7 @@ let Ke = {
|
|
1034
1034
|
if (e === "store")
|
1035
1035
|
return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
|
1036
1036
|
}
|
1037
|
-
return
|
1037
|
+
return J(n[e]);
|
1038
1038
|
},
|
1039
1039
|
set(n, e, t) {
|
1040
1040
|
return n[e] = t, !0;
|
@@ -1049,17 +1049,17 @@ function gr(n) {
|
|
1049
1049
|
function mr(n) {
|
1050
1050
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
1051
1051
|
const r = n.call(We(this), e, ...t);
|
1052
|
-
return Qt.set(r, e.sort ? e.sort() : [e]),
|
1052
|
+
return Qt.set(r, e.sort ? e.sort() : [e]), J(r);
|
1053
1053
|
} : hr().includes(n) ? function(...e) {
|
1054
|
-
return n.apply(We(this), e),
|
1054
|
+
return n.apply(We(this), e), J(Yt.get(this));
|
1055
1055
|
} : function(...e) {
|
1056
|
-
return
|
1056
|
+
return J(n.apply(We(this), e));
|
1057
1057
|
};
|
1058
1058
|
}
|
1059
1059
|
function yr(n) {
|
1060
1060
|
return typeof n == "function" ? mr(n) : (n instanceof IDBTransaction && pr(n), dr(n, ur()) ? new Proxy(n, Ke) : n);
|
1061
1061
|
}
|
1062
|
-
function
|
1062
|
+
function J(n) {
|
1063
1063
|
if (n instanceof IDBRequest)
|
1064
1064
|
return fr(n);
|
1065
1065
|
if (Ve.has(n))
|
@@ -1069,9 +1069,9 @@ function G(n) {
|
|
1069
1069
|
}
|
1070
1070
|
const We = (n) => rt.get(n);
|
1071
1071
|
function _r(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
1072
|
-
const o = indexedDB.open(n, e), c =
|
1072
|
+
const o = indexedDB.open(n, e), c = J(o);
|
1073
1073
|
return r && o.addEventListener("upgradeneeded", (a) => {
|
1074
|
-
r(
|
1074
|
+
r(J(o.result), a.oldVersion, a.newVersion, J(o.transaction), a);
|
1075
1075
|
}), t && o.addEventListener("blocked", (a) => t(
|
1076
1076
|
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
1077
1077
|
a.oldVersion,
|
@@ -1272,7 +1272,7 @@ const Yr = {
|
|
1272
1272
|
"idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
|
1273
1273
|
"idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
|
1274
1274
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."
|
1275
|
-
},
|
1275
|
+
}, K = new _e("app", "Firebase", Yr);
|
1276
1276
|
/**
|
1277
1277
|
* @license
|
1278
1278
|
* Copyright 2019 Google LLC
|
@@ -1328,7 +1328,7 @@ class Qr {
|
|
1328
1328
|
*/
|
1329
1329
|
checkDestroyed() {
|
1330
1330
|
if (this.isDeleted)
|
1331
|
-
throw
|
1331
|
+
throw K.create("app-deleted", { appName: this._name });
|
1332
1332
|
}
|
1333
1333
|
}
|
1334
1334
|
/**
|
@@ -1353,11 +1353,11 @@ function Zt(n, e = {}) {
|
|
1353
1353
|
typeof e != "object" && (e = { name: e });
|
1354
1354
|
const r = Object.assign({ name: Qe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
|
1355
1355
|
if (typeof i != "string" || !i)
|
1356
|
-
throw
|
1356
|
+
throw K.create("bad-app-name", {
|
1357
1357
|
appName: String(i)
|
1358
1358
|
});
|
1359
1359
|
if (t || (t = Gt()), !t)
|
1360
|
-
throw
|
1360
|
+
throw K.create(
|
1361
1361
|
"no-options"
|
1362
1362
|
/* AppError.NO_OPTIONS */
|
1363
1363
|
);
|
@@ -1365,7 +1365,7 @@ function Zt(n, e = {}) {
|
|
1365
1365
|
if (s) {
|
1366
1366
|
if (Pe(t, s.options) && Pe(r, s.config))
|
1367
1367
|
return s;
|
1368
|
-
throw
|
1368
|
+
throw K.create("duplicate-app", { appName: i });
|
1369
1369
|
}
|
1370
1370
|
const o = new sr(i);
|
1371
1371
|
for (const a of Xe.values())
|
@@ -1378,7 +1378,7 @@ function Xr(n = Qe) {
|
|
1378
1378
|
if (!e && n === Qe && Gt())
|
1379
1379
|
return Zt();
|
1380
1380
|
if (!e)
|
1381
|
-
throw
|
1381
|
+
throw K.create("no-app", { appName: n });
|
1382
1382
|
return e;
|
1383
1383
|
}
|
1384
1384
|
function ie(n, e, t) {
|
@@ -1431,7 +1431,7 @@ function en() {
|
|
1431
1431
|
}
|
1432
1432
|
}
|
1433
1433
|
}).catch((n) => {
|
1434
|
-
throw
|
1434
|
+
throw K.create("idb-open", {
|
1435
1435
|
originalErrorMessage: n.message
|
1436
1436
|
});
|
1437
1437
|
})), ze;
|
@@ -1440,10 +1440,10 @@ async function ti(n) {
|
|
1440
1440
|
try {
|
1441
1441
|
return await (await en()).transaction(pe).objectStore(pe).get(tn(n));
|
1442
1442
|
} catch (e) {
|
1443
|
-
if (e instanceof
|
1443
|
+
if (e instanceof Y)
|
1444
1444
|
ee.warn(e.message);
|
1445
1445
|
else {
|
1446
|
-
const t =
|
1446
|
+
const t = K.create("idb-get", {
|
1447
1447
|
originalErrorMessage: e == null ? void 0 : e.message
|
1448
1448
|
});
|
1449
1449
|
ee.warn(t.message);
|
@@ -1455,10 +1455,10 @@ async function vt(n, e) {
|
|
1455
1455
|
const r = (await en()).transaction(pe, "readwrite");
|
1456
1456
|
await r.objectStore(pe).put(e, tn(n)), await r.done;
|
1457
1457
|
} catch (t) {
|
1458
|
-
if (t instanceof
|
1458
|
+
if (t instanceof Y)
|
1459
1459
|
ee.warn(t.message);
|
1460
1460
|
else {
|
1461
|
-
const r =
|
1461
|
+
const r = K.create("idb-set", {
|
1462
1462
|
originalErrorMessage: t == null ? void 0 : t.message
|
1463
1463
|
});
|
1464
1464
|
ee.warn(r.message);
|
@@ -1702,10 +1702,10 @@ function Ae(n, ...e) {
|
|
1702
1702
|
* See the License for the specific language governing permissions and
|
1703
1703
|
* limitations under the License.
|
1704
1704
|
*/
|
1705
|
-
function
|
1705
|
+
function L(n, ...e) {
|
1706
1706
|
throw st(n, ...e);
|
1707
1707
|
}
|
1708
|
-
function
|
1708
|
+
function $(n, ...e) {
|
1709
1709
|
return st(n, ...e);
|
1710
1710
|
}
|
1711
1711
|
function hi(n, e, t) {
|
@@ -1725,12 +1725,12 @@ function _(n, e, ...t) {
|
|
1725
1725
|
if (!n)
|
1726
1726
|
throw st(e, ...t);
|
1727
1727
|
}
|
1728
|
-
function
|
1728
|
+
function j(n) {
|
1729
1729
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
1730
1730
|
throw Ae(e), new Error(e);
|
1731
1731
|
}
|
1732
|
-
function
|
1733
|
-
n ||
|
1732
|
+
function F(n, e) {
|
1733
|
+
n || j(e);
|
1734
1734
|
}
|
1735
1735
|
/**
|
1736
1736
|
* @license
|
@@ -1813,7 +1813,7 @@ function gi() {
|
|
1813
1813
|
*/
|
1814
1814
|
class Ie {
|
1815
1815
|
constructor(e, t) {
|
1816
|
-
this.shortDelay = e, this.longDelay = t,
|
1816
|
+
this.shortDelay = e, this.longDelay = t, F(t > e, "Short delay should be less than long delay!"), this.isMobile = Wn() || zn();
|
1817
1817
|
}
|
1818
1818
|
get() {
|
1819
1819
|
return pi() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
@@ -1836,7 +1836,7 @@ class Ie {
|
|
1836
1836
|
* limitations under the License.
|
1837
1837
|
*/
|
1838
1838
|
function ot(n, e) {
|
1839
|
-
|
1839
|
+
F(n.emulator, "Emulator should always be set here");
|
1840
1840
|
const { url: t } = n.emulator;
|
1841
1841
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
1842
1842
|
}
|
@@ -1869,7 +1869,7 @@ class sn {
|
|
1869
1869
|
return globalThis.fetch;
|
1870
1870
|
if (typeof fetch < "u")
|
1871
1871
|
return fetch;
|
1872
|
-
|
1872
|
+
j("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
1873
1873
|
}
|
1874
1874
|
static headers() {
|
1875
1875
|
if (this.headersImpl)
|
@@ -1880,7 +1880,7 @@ class sn {
|
|
1880
1880
|
return globalThis.Headers;
|
1881
1881
|
if (typeof Headers < "u")
|
1882
1882
|
return Headers;
|
1883
|
-
|
1883
|
+
j("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
1884
1884
|
}
|
1885
1885
|
static response() {
|
1886
1886
|
if (this.responseImpl)
|
@@ -1891,7 +1891,7 @@ class sn {
|
|
1891
1891
|
return globalThis.Response;
|
1892
1892
|
if (typeof Response < "u")
|
1893
1893
|
return Response;
|
1894
|
-
|
1894
|
+
j("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
1895
1895
|
}
|
1896
1896
|
}
|
1897
1897
|
/**
|
@@ -2002,10 +2002,10 @@ const mi = {
|
|
2002
2002
|
* limitations under the License.
|
2003
2003
|
*/
|
2004
2004
|
const yi = new Ie(3e4, 6e4);
|
2005
|
-
function
|
2005
|
+
function Q(n, e) {
|
2006
2006
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
2007
2007
|
}
|
2008
|
-
async function
|
2008
|
+
async function V(n, e, t, r, i = {}) {
|
2009
2009
|
return on(n, i, async () => {
|
2010
2010
|
let s = {}, o = {};
|
2011
2011
|
r && (e === "GET" ? o = r : s = {
|
@@ -2050,17 +2050,17 @@ async function on(n, e, t) {
|
|
2050
2050
|
const y = r[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
2051
2051
|
if (u)
|
2052
2052
|
throw hi(n, y, u);
|
2053
|
-
|
2053
|
+
L(n, y);
|
2054
2054
|
}
|
2055
2055
|
} catch (i) {
|
2056
|
-
if (i instanceof
|
2056
|
+
if (i instanceof Y)
|
2057
2057
|
throw i;
|
2058
|
-
|
2058
|
+
L(n, "network-request-failed", { message: String(i) });
|
2059
2059
|
}
|
2060
2060
|
}
|
2061
2061
|
async function Ue(n, e, t, r, i = {}) {
|
2062
|
-
const s = await
|
2063
|
-
return "mfaPendingCredential" in s &&
|
2062
|
+
const s = await V(n, e, t, r, i);
|
2063
|
+
return "mfaPendingCredential" in s && L(n, "multi-factor-auth-required", {
|
2064
2064
|
_serverResponse: s
|
2065
2065
|
}), s;
|
2066
2066
|
}
|
@@ -2083,7 +2083,7 @@ function _i(n) {
|
|
2083
2083
|
class vi {
|
2084
2084
|
constructor(e) {
|
2085
2085
|
this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
|
2086
|
-
this.timer = setTimeout(() => r(
|
2086
|
+
this.timer = setTimeout(() => r($(
|
2087
2087
|
this.auth,
|
2088
2088
|
"network-request-failed"
|
2089
2089
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
@@ -2099,7 +2099,7 @@ function Te(n, e, t) {
|
|
2099
2099
|
appName: n.name
|
2100
2100
|
};
|
2101
2101
|
t.email && (r.email = t.email), t.phoneNumber && (r.phoneNumber = t.phoneNumber);
|
2102
|
-
const i =
|
2102
|
+
const i = $(n, e, r);
|
2103
2103
|
return i.customData._tokenResponse = t, i;
|
2104
2104
|
}
|
2105
2105
|
function Et(n) {
|
@@ -2136,7 +2136,7 @@ class bi {
|
|
2136
2136
|
}
|
2137
2137
|
}
|
2138
2138
|
async function Ii(n, e) {
|
2139
|
-
return
|
2139
|
+
return V(n, "GET", "/v2/recaptchaConfig", Q(n, e));
|
2140
2140
|
}
|
2141
2141
|
/**
|
2142
2142
|
* @license
|
@@ -2155,10 +2155,10 @@ async function Ii(n, e) {
|
|
2155
2155
|
* limitations under the License.
|
2156
2156
|
*/
|
2157
2157
|
async function wi(n, e) {
|
2158
|
-
return
|
2158
|
+
return V(n, "POST", "/v1/accounts:delete", e);
|
2159
2159
|
}
|
2160
2160
|
async function Ei(n, e) {
|
2161
|
-
return
|
2161
|
+
return V(n, "POST", "/v1/accounts:lookup", e);
|
2162
2162
|
}
|
2163
2163
|
/**
|
2164
2164
|
* @license
|
@@ -2186,7 +2186,7 @@ function he(n) {
|
|
2186
2186
|
}
|
2187
2187
|
}
|
2188
2188
|
async function Ti(n, e = !1) {
|
2189
|
-
const t =
|
2189
|
+
const t = H(n), r = await t.getIdToken(e), i = at(r);
|
2190
2190
|
_(
|
2191
2191
|
i && i.exp && i.auth_time && i.iat,
|
2192
2192
|
t.auth,
|
@@ -2256,7 +2256,7 @@ async function ge(n, e, t = !1) {
|
|
2256
2256
|
try {
|
2257
2257
|
return await e;
|
2258
2258
|
} catch (r) {
|
2259
|
-
throw r instanceof
|
2259
|
+
throw r instanceof Y && Si(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
2260
2260
|
}
|
2261
2261
|
}
|
2262
2262
|
function Si({ code: n }) {
|
@@ -2399,7 +2399,7 @@ async function Ne(n) {
|
|
2399
2399
|
Object.assign(n, b);
|
2400
2400
|
}
|
2401
2401
|
async function Ri(n) {
|
2402
|
-
const e =
|
2402
|
+
const e = H(n);
|
2403
2403
|
await Ne(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
2404
2404
|
}
|
2405
2405
|
function Pi(n, e) {
|
@@ -2456,7 +2456,7 @@ async function ki(n, e) {
|
|
2456
2456
|
};
|
2457
2457
|
}
|
2458
2458
|
async function Ni(n, e) {
|
2459
|
-
return
|
2459
|
+
return V(n, "POST", "/v2/accounts:revokeToken", Q(n, e));
|
2460
2460
|
}
|
2461
2461
|
/**
|
2462
2462
|
* @license
|
@@ -2540,7 +2540,7 @@ class me {
|
|
2540
2540
|
return Object.assign(new me(), this.toJSON());
|
2541
2541
|
}
|
2542
2542
|
_performRefresh() {
|
2543
|
-
return
|
2543
|
+
return j("not implemented");
|
2544
2544
|
}
|
2545
2545
|
}
|
2546
2546
|
/**
|
@@ -2559,7 +2559,7 @@ class me {
|
|
2559
2559
|
* See the License for the specific language governing permissions and
|
2560
2560
|
* limitations under the License.
|
2561
2561
|
*/
|
2562
|
-
function
|
2562
|
+
function W(n, e) {
|
2563
2563
|
_(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
2564
2564
|
}
|
2565
2565
|
class Z {
|
@@ -2645,21 +2645,21 @@ class Z {
|
|
2645
2645
|
}
|
2646
2646
|
static _fromJSON(e, t) {
|
2647
2647
|
var r, i, s, o, c, a, u, y;
|
2648
|
-
const b = (r = t.displayName) !== null && r !== void 0 ? r : void 0,
|
2648
|
+
const b = (r = t.displayName) !== null && r !== void 0 ? r : void 0, S = (i = t.email) !== null && i !== void 0 ? i : void 0, O = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, N = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, v = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, I = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, k = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, C = (y = t.lastLoginAt) !== null && y !== void 0 ? y : void 0, { uid: U, emailVerified: D, isAnonymous: l, providerData: m, stsTokenManager: d } = t;
|
2649
2649
|
_(
|
2650
|
-
|
2650
|
+
U && d,
|
2651
2651
|
e,
|
2652
2652
|
"internal-error"
|
2653
2653
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2654
2654
|
);
|
2655
2655
|
const w = me.fromJSON(this.name, d);
|
2656
2656
|
_(
|
2657
|
-
typeof
|
2657
|
+
typeof U == "string",
|
2658
2658
|
e,
|
2659
2659
|
"internal-error"
|
2660
2660
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2661
|
-
),
|
2662
|
-
typeof
|
2661
|
+
), W(b, e.name), W(S, e.name), _(
|
2662
|
+
typeof D == "boolean",
|
2663
2663
|
e,
|
2664
2664
|
"internal-error"
|
2665
2665
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -2668,22 +2668,22 @@ class Z {
|
|
2668
2668
|
e,
|
2669
2669
|
"internal-error"
|
2670
2670
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2671
|
-
),
|
2671
|
+
), W(O, e.name), W(N, e.name), W(v, e.name), W(I, e.name), W(k, e.name), W(C, e.name);
|
2672
2672
|
const E = new Z({
|
2673
|
-
uid:
|
2673
|
+
uid: U,
|
2674
2674
|
auth: e,
|
2675
|
-
email:
|
2676
|
-
emailVerified:
|
2675
|
+
email: S,
|
2676
|
+
emailVerified: D,
|
2677
2677
|
displayName: b,
|
2678
2678
|
isAnonymous: l,
|
2679
|
-
photoURL:
|
2680
|
-
phoneNumber:
|
2679
|
+
photoURL: N,
|
2680
|
+
phoneNumber: O,
|
2681
2681
|
tenantId: v,
|
2682
2682
|
stsTokenManager: w,
|
2683
|
-
createdAt:
|
2683
|
+
createdAt: k,
|
2684
2684
|
lastLoginAt: C
|
2685
2685
|
});
|
2686
|
-
return m && Array.isArray(m) && (E.providerData = m.map((
|
2686
|
+
return m && Array.isArray(m) && (E.providerData = m.map((A) => Object.assign({}, A))), I && (E._redirectEventId = I), E;
|
2687
2687
|
}
|
2688
2688
|
/**
|
2689
2689
|
* Initialize a User from an idToken server response
|
@@ -2719,10 +2719,10 @@ class Z {
|
|
2719
2719
|
* limitations under the License.
|
2720
2720
|
*/
|
2721
2721
|
const Tt = /* @__PURE__ */ new Map();
|
2722
|
-
function
|
2723
|
-
|
2722
|
+
function B(n) {
|
2723
|
+
F(n instanceof Function, "Expected a class definition");
|
2724
2724
|
let e = Tt.get(n);
|
2725
|
-
return e ? (
|
2725
|
+
return e ? (F(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Tt.set(n, e), e);
|
2726
2726
|
}
|
2727
2727
|
/**
|
2728
2728
|
* @license
|
@@ -2814,12 +2814,12 @@ class se {
|
|
2814
2814
|
}
|
2815
2815
|
static async create(e, t, r = "authUser") {
|
2816
2816
|
if (!t.length)
|
2817
|
-
return new se(
|
2817
|
+
return new se(B(At), e, r);
|
2818
2818
|
const i = (await Promise.all(t.map(async (u) => {
|
2819
2819
|
if (await u._isAvailable())
|
2820
2820
|
return u;
|
2821
2821
|
}))).filter((u) => u);
|
2822
|
-
let s = i[0] ||
|
2822
|
+
let s = i[0] || B(At);
|
2823
2823
|
const o = Se(r, e.config.apiKey, e.name);
|
2824
2824
|
let c = null;
|
2825
2825
|
for (const u of t)
|
@@ -2889,39 +2889,39 @@ function St(n) {
|
|
2889
2889
|
}
|
2890
2890
|
return "Other";
|
2891
2891
|
}
|
2892
|
-
function dn(n =
|
2892
|
+
function dn(n = P()) {
|
2893
2893
|
return /firefox\//i.test(n);
|
2894
2894
|
}
|
2895
|
-
function ct(n =
|
2895
|
+
function ct(n = P()) {
|
2896
2896
|
const e = n.toLowerCase();
|
2897
2897
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
2898
2898
|
}
|
2899
|
-
function un(n =
|
2899
|
+
function un(n = P()) {
|
2900
2900
|
return /crios\//i.test(n);
|
2901
2901
|
}
|
2902
|
-
function hn(n =
|
2902
|
+
function hn(n = P()) {
|
2903
2903
|
return /iemobile/i.test(n);
|
2904
2904
|
}
|
2905
|
-
function fn(n =
|
2905
|
+
function fn(n = P()) {
|
2906
2906
|
return /android/i.test(n);
|
2907
2907
|
}
|
2908
|
-
function pn(n =
|
2908
|
+
function pn(n = P()) {
|
2909
2909
|
return /blackberry/i.test(n);
|
2910
2910
|
}
|
2911
|
-
function gn(n =
|
2911
|
+
function gn(n = P()) {
|
2912
2912
|
return /webos/i.test(n);
|
2913
2913
|
}
|
2914
|
-
function je(n =
|
2914
|
+
function je(n = P()) {
|
2915
2915
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
2916
2916
|
}
|
2917
|
-
function Di(n =
|
2917
|
+
function Di(n = P()) {
|
2918
2918
|
var e;
|
2919
2919
|
return je(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
2920
2920
|
}
|
2921
2921
|
function Li() {
|
2922
2922
|
return qn() && document.documentMode === 10;
|
2923
2923
|
}
|
2924
|
-
function mn(n =
|
2924
|
+
function mn(n = P()) {
|
2925
2925
|
return je(n) || fn(n) || gn(n) || pn(n) || /windows phone/i.test(n) || hn(n);
|
2926
2926
|
}
|
2927
2927
|
function $i() {
|
@@ -2951,10 +2951,10 @@ function yn(n, e = []) {
|
|
2951
2951
|
let t;
|
2952
2952
|
switch (n) {
|
2953
2953
|
case "Browser":
|
2954
|
-
t = St(
|
2954
|
+
t = St(P());
|
2955
2955
|
break;
|
2956
2956
|
case "Worker":
|
2957
|
-
t = `${St(
|
2957
|
+
t = `${St(P())}-${n}`;
|
2958
2958
|
break;
|
2959
2959
|
default:
|
2960
2960
|
t = n;
|
@@ -3034,7 +3034,7 @@ class Mi {
|
|
3034
3034
|
* limitations under the License.
|
3035
3035
|
*/
|
3036
3036
|
async function Ui(n, e = {}) {
|
3037
|
-
return
|
3037
|
+
return V(n, "GET", "/v2/passwordPolicy", Q(n, e));
|
3038
3038
|
}
|
3039
3039
|
/**
|
3040
3040
|
* @license
|
@@ -3145,7 +3145,7 @@ class Fi {
|
|
3145
3145
|
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 Ct(this), this.idTokenSubscription = new Ct(this), this.beforeStateQueue = new Mi(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 = rn, 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;
|
3146
3146
|
}
|
3147
3147
|
_initializeWithPersistence(e, t) {
|
3148
|
-
return t && (this._popupRedirectResolver =
|
3148
|
+
return t && (this._popupRedirectResolver = B(t)), this._initializationPromise = this.queue(async () => {
|
3149
3149
|
var r, i;
|
3150
3150
|
if (!this._deleted && (this.persistenceManager = await se.create(this, e), !this._deleted)) {
|
3151
3151
|
if (!((r = this._popupRedirectResolver) === null || r === void 0) && r._shouldInitProactively)
|
@@ -3228,7 +3228,7 @@ class Fi {
|
|
3228
3228
|
this._deleted = !0;
|
3229
3229
|
}
|
3230
3230
|
async updateCurrentUser(e) {
|
3231
|
-
const t = e ?
|
3231
|
+
const t = e ? H(e) : null;
|
3232
3232
|
return t && _(
|
3233
3233
|
t.auth.config.apiKey === this.config.apiKey,
|
3234
3234
|
this,
|
@@ -3256,7 +3256,7 @@ class Fi {
|
|
3256
3256
|
}
|
3257
3257
|
setPersistence(e) {
|
3258
3258
|
return this.queue(async () => {
|
3259
|
-
await this.assertedPersistence.setPersistence(
|
3259
|
+
await this.assertedPersistence.setPersistence(B(e));
|
3260
3260
|
});
|
3261
3261
|
}
|
3262
3262
|
_getRecaptchaConfig() {
|
@@ -3329,7 +3329,7 @@ class Fi {
|
|
3329
3329
|
}
|
3330
3330
|
async getOrInitRedirectPersistenceManager(e) {
|
3331
3331
|
if (!this.redirectPersistenceManager) {
|
3332
|
-
const t = e &&
|
3332
|
+
const t = e && B(e) || this._popupRedirectResolver;
|
3333
3333
|
_(
|
3334
3334
|
t,
|
3335
3335
|
this,
|
@@ -3337,7 +3337,7 @@ class Fi {
|
|
3337
3337
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
3338
3338
|
), this.redirectPersistenceManager = await se.create(
|
3339
3339
|
this,
|
3340
|
-
[
|
3340
|
+
[B(t._redirectPersistence)],
|
3341
3341
|
"redirectUser"
|
3342
3342
|
/* KeyName.REDIRECT_USER */
|
3343
3343
|
), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
|
@@ -3458,7 +3458,7 @@ class Fi {
|
|
3458
3458
|
}
|
3459
3459
|
}
|
3460
3460
|
function ne(n) {
|
3461
|
-
return
|
3461
|
+
return H(n);
|
3462
3462
|
}
|
3463
3463
|
class Ct {
|
3464
3464
|
constructor(e) {
|
@@ -3497,7 +3497,7 @@ function _n(n) {
|
|
3497
3497
|
return new Promise((e, t) => {
|
3498
3498
|
const r = document.createElement("script");
|
3499
3499
|
r.setAttribute("src", n), r.onload = e, r.onerror = (i) => {
|
3500
|
-
const s =
|
3500
|
+
const s = $(
|
3501
3501
|
"internal-error"
|
3502
3502
|
/* AuthErrorCode.INTERNAL_ERROR */
|
3503
3503
|
);
|
@@ -3648,7 +3648,7 @@ function Gi(n, e) {
|
|
3648
3648
|
const i = t.getImmediate(), s = t.getOptions();
|
3649
3649
|
if (Pe(s, e ?? {}))
|
3650
3650
|
return i;
|
3651
|
-
|
3651
|
+
L(
|
3652
3652
|
i,
|
3653
3653
|
"already-initialized"
|
3654
3654
|
/* AuthErrorCode.ALREADY_INITIALIZED */
|
@@ -3657,7 +3657,7 @@ function Gi(n, e) {
|
|
3657
3657
|
return t.initialize({ options: e });
|
3658
3658
|
}
|
3659
3659
|
function Ji(n, e) {
|
3660
|
-
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(
|
3660
|
+
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(B);
|
3661
3661
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
|
3662
3662
|
}
|
3663
3663
|
function Ki(n, e, t) {
|
@@ -3738,23 +3738,23 @@ class lt {
|
|
3738
3738
|
* @returns a JSON-serializable representation of this object.
|
3739
3739
|
*/
|
3740
3740
|
toJSON() {
|
3741
|
-
return
|
3741
|
+
return j("not implemented");
|
3742
3742
|
}
|
3743
3743
|
/** @internal */
|
3744
3744
|
_getIdTokenResponse(e) {
|
3745
|
-
return
|
3745
|
+
return j("not implemented");
|
3746
3746
|
}
|
3747
3747
|
/** @internal */
|
3748
3748
|
_linkToIdToken(e, t) {
|
3749
|
-
return
|
3749
|
+
return j("not implemented");
|
3750
3750
|
}
|
3751
3751
|
/** @internal */
|
3752
3752
|
_getReauthenticationResolver(e) {
|
3753
|
-
return
|
3753
|
+
return j("not implemented");
|
3754
3754
|
}
|
3755
3755
|
}
|
3756
3756
|
async function Xi(n, e) {
|
3757
|
-
return
|
3757
|
+
return V(n, "POST", "/v1/accounts:signUp", e);
|
3758
3758
|
}
|
3759
3759
|
/**
|
3760
3760
|
* @license
|
@@ -3773,10 +3773,10 @@ async function Xi(n, e) {
|
|
3773
3773
|
* limitations under the License.
|
3774
3774
|
*/
|
3775
3775
|
async function Zi(n, e) {
|
3776
|
-
return Ue(n, "POST", "/v1/accounts:signInWithPassword",
|
3776
|
+
return Ue(n, "POST", "/v1/accounts:signInWithPassword", Q(n, e));
|
3777
3777
|
}
|
3778
3778
|
async function es(n, e) {
|
3779
|
-
return
|
3779
|
+
return V(n, "POST", "/v1/accounts:sendOobCode", Q(n, e));
|
3780
3780
|
}
|
3781
3781
|
async function ts(n, e) {
|
3782
3782
|
return es(n, e);
|
@@ -3798,10 +3798,10 @@ async function ts(n, e) {
|
|
3798
3798
|
* limitations under the License.
|
3799
3799
|
*/
|
3800
3800
|
async function ns(n, e) {
|
3801
|
-
return Ue(n, "POST", "/v1/accounts:signInWithEmailLink",
|
3801
|
+
return Ue(n, "POST", "/v1/accounts:signInWithEmailLink", Q(n, e));
|
3802
3802
|
}
|
3803
3803
|
async function rs(n, e) {
|
3804
|
-
return Ue(n, "POST", "/v1/accounts:signInWithEmailLink",
|
3804
|
+
return Ue(n, "POST", "/v1/accounts:signInWithEmailLink", Q(n, e));
|
3805
3805
|
}
|
3806
3806
|
/**
|
3807
3807
|
* @license
|
@@ -3882,7 +3882,7 @@ class ye extends lt {
|
|
3882
3882
|
oobCode: this._password
|
3883
3883
|
});
|
3884
3884
|
default:
|
3885
|
-
|
3885
|
+
L(
|
3886
3886
|
e,
|
3887
3887
|
"internal-error"
|
3888
3888
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -3909,7 +3909,7 @@ class ye extends lt {
|
|
3909
3909
|
oobCode: this._password
|
3910
3910
|
});
|
3911
3911
|
default:
|
3912
|
-
|
3912
|
+
L(
|
3913
3913
|
e,
|
3914
3914
|
"internal-error"
|
3915
3915
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -3938,7 +3938,7 @@ class ye extends lt {
|
|
3938
3938
|
* limitations under the License.
|
3939
3939
|
*/
|
3940
3940
|
async function oe(n, e) {
|
3941
|
-
return Ue(n, "POST", "/v1/accounts:signInWithIdp",
|
3941
|
+
return Ue(n, "POST", "/v1/accounts:signInWithIdp", Q(n, e));
|
3942
3942
|
}
|
3943
3943
|
/**
|
3944
3944
|
* @license
|
@@ -3964,7 +3964,7 @@ class te extends lt {
|
|
3964
3964
|
/** @internal */
|
3965
3965
|
static _fromParams(e) {
|
3966
3966
|
const t = new te(e.providerId, e.signInMethod);
|
3967
|
-
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) :
|
3967
|
+
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : L(
|
3968
3968
|
"argument-error"
|
3969
3969
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
3970
3970
|
), t;
|
@@ -4277,7 +4277,7 @@ class we extends bn {
|
|
4277
4277
|
* See the License for the specific language governing permissions and
|
4278
4278
|
* limitations under the License.
|
4279
4279
|
*/
|
4280
|
-
class
|
4280
|
+
class x extends we {
|
4281
4281
|
constructor() {
|
4282
4282
|
super(
|
4283
4283
|
"facebook.com"
|
@@ -4298,8 +4298,8 @@ class W extends we {
|
|
4298
4298
|
*/
|
4299
4299
|
static credential(e) {
|
4300
4300
|
return te._fromParams({
|
4301
|
-
providerId:
|
4302
|
-
signInMethod:
|
4301
|
+
providerId: x.PROVIDER_ID,
|
4302
|
+
signInMethod: x.FACEBOOK_SIGN_IN_METHOD,
|
4303
4303
|
accessToken: e
|
4304
4304
|
});
|
4305
4305
|
}
|
@@ -4309,7 +4309,7 @@ class W extends we {
|
|
4309
4309
|
* @param userCredential - The user credential.
|
4310
4310
|
*/
|
4311
4311
|
static credentialFromResult(e) {
|
4312
|
-
return
|
4312
|
+
return x.credentialFromTaggedObject(e);
|
4313
4313
|
}
|
4314
4314
|
/**
|
4315
4315
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4318,20 +4318,20 @@ class W extends we {
|
|
4318
4318
|
* @param userCredential - The user credential.
|
4319
4319
|
*/
|
4320
4320
|
static credentialFromError(e) {
|
4321
|
-
return
|
4321
|
+
return x.credentialFromTaggedObject(e.customData || {});
|
4322
4322
|
}
|
4323
4323
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4324
4324
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
4325
4325
|
return null;
|
4326
4326
|
try {
|
4327
|
-
return
|
4327
|
+
return x.credential(e.oauthAccessToken);
|
4328
4328
|
} catch {
|
4329
4329
|
return null;
|
4330
4330
|
}
|
4331
4331
|
}
|
4332
4332
|
}
|
4333
|
-
|
4334
|
-
|
4333
|
+
x.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
|
4334
|
+
x.PROVIDER_ID = "facebook.com";
|
4335
4335
|
/**
|
4336
4336
|
* @license
|
4337
4337
|
* Copyright 2020 Google LLC
|
@@ -4348,7 +4348,7 @@ W.PROVIDER_ID = "facebook.com";
|
|
4348
4348
|
* See the License for the specific language governing permissions and
|
4349
4349
|
* limitations under the License.
|
4350
4350
|
*/
|
4351
|
-
class
|
4351
|
+
class z extends we {
|
4352
4352
|
constructor() {
|
4353
4353
|
super(
|
4354
4354
|
"google.com"
|
@@ -4370,8 +4370,8 @@ class x extends we {
|
|
4370
4370
|
*/
|
4371
4371
|
static credential(e, t) {
|
4372
4372
|
return te._fromParams({
|
4373
|
-
providerId:
|
4374
|
-
signInMethod:
|
4373
|
+
providerId: z.PROVIDER_ID,
|
4374
|
+
signInMethod: z.GOOGLE_SIGN_IN_METHOD,
|
4375
4375
|
idToken: e,
|
4376
4376
|
accessToken: t
|
4377
4377
|
});
|
@@ -4382,7 +4382,7 @@ class x extends we {
|
|
4382
4382
|
* @param userCredential - The user credential.
|
4383
4383
|
*/
|
4384
4384
|
static credentialFromResult(e) {
|
4385
|
-
return
|
4385
|
+
return z.credentialFromTaggedObject(e);
|
4386
4386
|
}
|
4387
4387
|
/**
|
4388
4388
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4391,7 +4391,7 @@ class x extends we {
|
|
4391
4391
|
* @param userCredential - The user credential.
|
4392
4392
|
*/
|
4393
4393
|
static credentialFromError(e) {
|
4394
|
-
return
|
4394
|
+
return z.credentialFromTaggedObject(e.customData || {});
|
4395
4395
|
}
|
4396
4396
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4397
4397
|
if (!e)
|
@@ -4400,14 +4400,14 @@ class x extends we {
|
|
4400
4400
|
if (!t && !r)
|
4401
4401
|
return null;
|
4402
4402
|
try {
|
4403
|
-
return
|
4403
|
+
return z.credential(t, r);
|
4404
4404
|
} catch {
|
4405
4405
|
return null;
|
4406
4406
|
}
|
4407
4407
|
}
|
4408
4408
|
}
|
4409
|
-
|
4410
|
-
|
4409
|
+
z.GOOGLE_SIGN_IN_METHOD = "google.com";
|
4410
|
+
z.PROVIDER_ID = "google.com";
|
4411
4411
|
/**
|
4412
4412
|
* @license
|
4413
4413
|
* Copyright 2020 Google LLC
|
@@ -4424,7 +4424,7 @@ x.PROVIDER_ID = "google.com";
|
|
4424
4424
|
* See the License for the specific language governing permissions and
|
4425
4425
|
* limitations under the License.
|
4426
4426
|
*/
|
4427
|
-
class
|
4427
|
+
class q extends we {
|
4428
4428
|
constructor() {
|
4429
4429
|
super(
|
4430
4430
|
"github.com"
|
@@ -4438,8 +4438,8 @@ class z extends we {
|
|
4438
4438
|
*/
|
4439
4439
|
static credential(e) {
|
4440
4440
|
return te._fromParams({
|
4441
|
-
providerId:
|
4442
|
-
signInMethod:
|
4441
|
+
providerId: q.PROVIDER_ID,
|
4442
|
+
signInMethod: q.GITHUB_SIGN_IN_METHOD,
|
4443
4443
|
accessToken: e
|
4444
4444
|
});
|
4445
4445
|
}
|
@@ -4449,7 +4449,7 @@ class z extends we {
|
|
4449
4449
|
* @param userCredential - The user credential.
|
4450
4450
|
*/
|
4451
4451
|
static credentialFromResult(e) {
|
4452
|
-
return
|
4452
|
+
return q.credentialFromTaggedObject(e);
|
4453
4453
|
}
|
4454
4454
|
/**
|
4455
4455
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4458,20 +4458,20 @@ class z extends we {
|
|
4458
4458
|
* @param userCredential - The user credential.
|
4459
4459
|
*/
|
4460
4460
|
static credentialFromError(e) {
|
4461
|
-
return
|
4461
|
+
return q.credentialFromTaggedObject(e.customData || {});
|
4462
4462
|
}
|
4463
4463
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4464
4464
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
4465
4465
|
return null;
|
4466
4466
|
try {
|
4467
|
-
return
|
4467
|
+
return q.credential(e.oauthAccessToken);
|
4468
4468
|
} catch {
|
4469
4469
|
return null;
|
4470
4470
|
}
|
4471
4471
|
}
|
4472
4472
|
}
|
4473
|
-
|
4474
|
-
|
4473
|
+
q.GITHUB_SIGN_IN_METHOD = "github.com";
|
4474
|
+
q.PROVIDER_ID = "github.com";
|
4475
4475
|
/**
|
4476
4476
|
* @license
|
4477
4477
|
* Copyright 2020 Google LLC
|
@@ -4488,7 +4488,7 @@ z.PROVIDER_ID = "github.com";
|
|
4488
4488
|
* See the License for the specific language governing permissions and
|
4489
4489
|
* limitations under the License.
|
4490
4490
|
*/
|
4491
|
-
class
|
4491
|
+
class G extends we {
|
4492
4492
|
constructor() {
|
4493
4493
|
super(
|
4494
4494
|
"twitter.com"
|
@@ -4503,8 +4503,8 @@ class q extends we {
|
|
4503
4503
|
*/
|
4504
4504
|
static credential(e, t) {
|
4505
4505
|
return te._fromParams({
|
4506
|
-
providerId:
|
4507
|
-
signInMethod:
|
4506
|
+
providerId: G.PROVIDER_ID,
|
4507
|
+
signInMethod: G.TWITTER_SIGN_IN_METHOD,
|
4508
4508
|
oauthToken: e,
|
4509
4509
|
oauthTokenSecret: t
|
4510
4510
|
});
|
@@ -4515,7 +4515,7 @@ class q extends we {
|
|
4515
4515
|
* @param userCredential - The user credential.
|
4516
4516
|
*/
|
4517
4517
|
static credentialFromResult(e) {
|
4518
|
-
return
|
4518
|
+
return G.credentialFromTaggedObject(e);
|
4519
4519
|
}
|
4520
4520
|
/**
|
4521
4521
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4524,7 +4524,7 @@ class q extends we {
|
|
4524
4524
|
* @param userCredential - The user credential.
|
4525
4525
|
*/
|
4526
4526
|
static credentialFromError(e) {
|
4527
|
-
return
|
4527
|
+
return G.credentialFromTaggedObject(e.customData || {});
|
4528
4528
|
}
|
4529
4529
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4530
4530
|
if (!e)
|
@@ -4533,14 +4533,14 @@ class q extends we {
|
|
4533
4533
|
if (!t || !r)
|
4534
4534
|
return null;
|
4535
4535
|
try {
|
4536
|
-
return
|
4536
|
+
return G.credential(t, r);
|
4537
4537
|
} catch {
|
4538
4538
|
return null;
|
4539
4539
|
}
|
4540
4540
|
}
|
4541
4541
|
}
|
4542
|
-
|
4543
|
-
|
4542
|
+
G.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
4543
|
+
G.PROVIDER_ID = "twitter.com";
|
4544
4544
|
/**
|
4545
4545
|
* @license
|
4546
4546
|
* Copyright 2020 Google LLC
|
@@ -4604,7 +4604,7 @@ function Ot(n) {
|
|
4604
4604
|
* See the License for the specific language governing permissions and
|
4605
4605
|
* limitations under the License.
|
4606
4606
|
*/
|
4607
|
-
class De extends
|
4607
|
+
class De extends Y {
|
4608
4608
|
constructor(e, t, r, i) {
|
4609
4609
|
var s;
|
4610
4610
|
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, De.prototype), this.customData = {
|
@@ -4668,7 +4668,7 @@ async function cs(n, e, t = !1) {
|
|
4668
4668
|
/* AuthErrorCode.USER_MISMATCH */
|
4669
4669
|
), ce._forOperation(n, i, s);
|
4670
4670
|
} catch (s) {
|
4671
|
-
throw (s == null ? void 0 : s.code) === "auth/user-not-found" &&
|
4671
|
+
throw (s == null ? void 0 : s.code) === "auth/user-not-found" && L(
|
4672
4672
|
r,
|
4673
4673
|
"user-mismatch"
|
4674
4674
|
/* AuthErrorCode.USER_MISMATCH */
|
@@ -4768,21 +4768,21 @@ async function hs(n, e, t) {
|
|
4768
4768
|
t && ds(r, i, t), await et(r, i, "getOobCode", ts);
|
4769
4769
|
}
|
4770
4770
|
function fs(n, e, t) {
|
4771
|
-
return ls(
|
4771
|
+
return ls(H(n), le.credential(e, t)).catch(async (r) => {
|
4772
4772
|
throw r.code === "auth/password-does-not-meet-requirements" && us(n), r;
|
4773
4773
|
});
|
4774
4774
|
}
|
4775
4775
|
function ps(n, e, t, r) {
|
4776
|
-
return
|
4776
|
+
return H(n).onIdTokenChanged(e, t, r);
|
4777
4777
|
}
|
4778
4778
|
function gs(n, e, t) {
|
4779
|
-
return
|
4779
|
+
return H(n).beforeAuthStateChanged(e, t);
|
4780
4780
|
}
|
4781
4781
|
function ms(n, e, t, r) {
|
4782
|
-
return
|
4782
|
+
return H(n).onAuthStateChanged(e, t, r);
|
4783
4783
|
}
|
4784
4784
|
function ys(n) {
|
4785
|
-
return
|
4785
|
+
return H(n).signOut();
|
4786
4786
|
}
|
4787
4787
|
const Le = "__sak";
|
4788
4788
|
/**
|
@@ -4843,7 +4843,7 @@ class En {
|
|
4843
4843
|
* limitations under the License.
|
4844
4844
|
*/
|
4845
4845
|
function _s() {
|
4846
|
-
const n =
|
4846
|
+
const n = P();
|
4847
4847
|
return ct(n) || je(n);
|
4848
4848
|
}
|
4849
4849
|
const vs = 1e3, bs = 10;
|
@@ -5163,9 +5163,9 @@ class Es {
|
|
5163
5163
|
o = {
|
5164
5164
|
messageChannel: i,
|
5165
5165
|
onMessage(b) {
|
5166
|
-
const
|
5167
|
-
if (
|
5168
|
-
switch (
|
5166
|
+
const S = b;
|
5167
|
+
if (S.data.eventId === u)
|
5168
|
+
switch (S.data.status) {
|
5169
5169
|
case "ack":
|
5170
5170
|
clearTimeout(y), s = setTimeout(
|
5171
5171
|
() => {
|
@@ -5179,7 +5179,7 @@ class Es {
|
|
5179
5179
|
);
|
5180
5180
|
break;
|
5181
5181
|
case "done":
|
5182
|
-
clearTimeout(s), c(
|
5182
|
+
clearTimeout(s), c(S.data.response);
|
5183
5183
|
break;
|
5184
5184
|
default:
|
5185
5185
|
clearTimeout(y), clearTimeout(s), a(new Error(
|
@@ -5215,11 +5215,11 @@ class Es {
|
|
5215
5215
|
* See the License for the specific language governing permissions and
|
5216
5216
|
* limitations under the License.
|
5217
5217
|
*/
|
5218
|
-
function
|
5218
|
+
function M() {
|
5219
5219
|
return window;
|
5220
5220
|
}
|
5221
5221
|
function Ts(n) {
|
5222
|
-
|
5222
|
+
M().location.href = n;
|
5223
5223
|
}
|
5224
5224
|
/**
|
5225
5225
|
* @license
|
@@ -5238,7 +5238,7 @@ function Ts(n) {
|
|
5238
5238
|
* limitations under the License.
|
5239
5239
|
*/
|
5240
5240
|
function Cn() {
|
5241
|
-
return typeof
|
5241
|
+
return typeof M().WorkerGlobalScope < "u" && typeof M().importScripts == "function";
|
5242
5242
|
}
|
5243
5243
|
async function As() {
|
5244
5244
|
if (!(navigator != null && navigator.serviceWorker))
|
@@ -5497,7 +5497,7 @@ new Ie(3e4, 6e4);
|
|
5497
5497
|
* limitations under the License.
|
5498
5498
|
*/
|
5499
5499
|
function Ls(n, e) {
|
5500
|
-
return e ?
|
5500
|
+
return e ? B(e) : (_(
|
5501
5501
|
n._popupRedirectResolver,
|
5502
5502
|
n,
|
5503
5503
|
"argument-error"
|
@@ -5637,7 +5637,7 @@ class kn {
|
|
5637
5637
|
case "reauthViaRedirect":
|
5638
5638
|
return Ms;
|
5639
5639
|
default:
|
5640
|
-
|
5640
|
+
L(
|
5641
5641
|
this.auth,
|
5642
5642
|
"internal-error"
|
5643
5643
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -5645,10 +5645,10 @@ class kn {
|
|
5645
5645
|
}
|
5646
5646
|
}
|
5647
5647
|
resolve(e) {
|
5648
|
-
|
5648
|
+
F(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
|
5649
5649
|
}
|
5650
5650
|
reject(e) {
|
5651
|
-
|
5651
|
+
F(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
|
5652
5652
|
}
|
5653
5653
|
unregisterAndCleanUp() {
|
5654
5654
|
this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
|
@@ -5685,7 +5685,7 @@ class re extends kn {
|
|
5685
5685
|
), e;
|
5686
5686
|
}
|
5687
5687
|
async onExecution() {
|
5688
|
-
|
5688
|
+
F(this.filter.length === 1, "Popup operations only handle one event");
|
5689
5689
|
const e = ut();
|
5690
5690
|
this.authWindow = await this.resolver._openPopup(
|
5691
5691
|
this.auth,
|
@@ -5696,7 +5696,7 @@ class re extends kn {
|
|
5696
5696
|
), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
|
5697
5697
|
this.reject(t);
|
5698
5698
|
}), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
|
5699
|
-
t || this.reject(
|
5699
|
+
t || this.reject($(
|
5700
5700
|
this.auth,
|
5701
5701
|
"web-storage-unsupported"
|
5702
5702
|
/* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
|
@@ -5708,7 +5708,7 @@ class re extends kn {
|
|
5708
5708
|
return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
|
5709
5709
|
}
|
5710
5710
|
cancel() {
|
5711
|
-
this.reject(
|
5711
|
+
this.reject($(
|
5712
5712
|
this.auth,
|
5713
5713
|
"cancelled-popup-request"
|
5714
5714
|
/* AuthErrorCode.EXPIRED_POPUP_REQUEST */
|
@@ -5723,7 +5723,7 @@ class re extends kn {
|
|
5723
5723
|
if (!((r = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || r === void 0) && r.closed) {
|
5724
5724
|
this.pollId = window.setTimeout(
|
5725
5725
|
() => {
|
5726
|
-
this.pollId = null, this.reject(
|
5726
|
+
this.pollId = null, this.reject($(
|
5727
5727
|
this.auth,
|
5728
5728
|
"popup-closed-by-user"
|
5729
5729
|
/* AuthErrorCode.POPUP_CLOSED_BY_USER */
|
@@ -5814,7 +5814,7 @@ function Vs(n, e) {
|
|
5814
5814
|
Ce.set(n._key(), e);
|
5815
5815
|
}
|
5816
5816
|
function Ws(n) {
|
5817
|
-
return
|
5817
|
+
return B(n._redirectPersistence);
|
5818
5818
|
}
|
5819
5819
|
function xs(n) {
|
5820
5820
|
return Se(Bs, n.config.apiKey, n.name);
|
@@ -5862,7 +5862,7 @@ class Gs {
|
|
5862
5862
|
var r;
|
5863
5863
|
if (e.error && !Nn(e)) {
|
5864
5864
|
const i = ((r = e.error.code) === null || r === void 0 ? void 0 : r.split("auth/")[1]) || "internal-error";
|
5865
|
-
t.onError(
|
5865
|
+
t.onError($(this.auth, i));
|
5866
5866
|
} else
|
5867
5867
|
t.onAuthEvent(e);
|
5868
5868
|
}
|
@@ -5912,7 +5912,7 @@ function Js(n) {
|
|
5912
5912
|
* limitations under the License.
|
5913
5913
|
*/
|
5914
5914
|
async function Ks(n, e = {}) {
|
5915
|
-
return
|
5915
|
+
return V(n, "GET", "/v1/projects", e);
|
5916
5916
|
}
|
5917
5917
|
/**
|
5918
5918
|
* @license
|
@@ -5941,7 +5941,7 @@ async function Xs(n) {
|
|
5941
5941
|
return;
|
5942
5942
|
} catch {
|
5943
5943
|
}
|
5944
|
-
|
5944
|
+
L(
|
5945
5945
|
n,
|
5946
5946
|
"unauthorized-domain"
|
5947
5947
|
/* AuthErrorCode.INVALID_ORIGIN */
|
@@ -5978,7 +5978,7 @@ function Zs(n) {
|
|
5978
5978
|
*/
|
5979
5979
|
const eo = new Ie(3e4, 6e4);
|
5980
5980
|
function Lt() {
|
5981
|
-
const n =
|
5981
|
+
const n = M().___jsl;
|
5982
5982
|
if (n != null && n.H) {
|
5983
5983
|
for (const e of Object.keys(n.H))
|
5984
5984
|
if (n.H[e].r = n.H[e].r || [], n.H[e].L = n.H[e].L || [], n.H[e].r = [...n.H[e].L], n.CP)
|
@@ -5995,7 +5995,7 @@ function to(n) {
|
|
5995
5995
|
e(gapi.iframes.getContext());
|
5996
5996
|
},
|
5997
5997
|
ontimeout: () => {
|
5998
|
-
Lt(), t(
|
5998
|
+
Lt(), t($(
|
5999
5999
|
n,
|
6000
6000
|
"network-request-failed"
|
6001
6001
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
@@ -6004,14 +6004,14 @@ function to(n) {
|
|
6004
6004
|
timeout: eo.get()
|
6005
6005
|
});
|
6006
6006
|
}
|
6007
|
-
if (!((i = (r =
|
6007
|
+
if (!((i = (r = M().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
|
6008
6008
|
e(gapi.iframes.getContext());
|
6009
|
-
else if (!((s =
|
6009
|
+
else if (!((s = M().gapi) === null || s === void 0) && s.load)
|
6010
6010
|
o();
|
6011
6011
|
else {
|
6012
6012
|
const c = Vi("iframefcb");
|
6013
|
-
return
|
6014
|
-
gapi.load ? o() : t(
|
6013
|
+
return M()[c] = () => {
|
6014
|
+
gapi.load ? o() : t($(
|
6015
6015
|
n,
|
6016
6016
|
"network-request-failed"
|
6017
6017
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
@@ -6075,7 +6075,7 @@ function co(n) {
|
|
6075
6075
|
return s.length && (r.fw = s.join(",")), `${t}?${ve(r).slice(1)}`;
|
6076
6076
|
}
|
6077
6077
|
async function lo(n) {
|
6078
|
-
const e = await no(n), t =
|
6078
|
+
const e = await no(n), t = M().gapi;
|
6079
6079
|
return _(
|
6080
6080
|
t,
|
6081
6081
|
n,
|
@@ -6092,15 +6092,15 @@ async function lo(n) {
|
|
6092
6092
|
// Prevent iframe from closing on mouse out.
|
6093
6093
|
setHideOnLeave: !1
|
6094
6094
|
});
|
6095
|
-
const o =
|
6095
|
+
const o = $(
|
6096
6096
|
n,
|
6097
6097
|
"network-request-failed"
|
6098
6098
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6099
|
-
), c =
|
6099
|
+
), c = M().setTimeout(() => {
|
6100
6100
|
s(o);
|
6101
6101
|
}, ro.get());
|
6102
6102
|
function a() {
|
6103
|
-
|
6103
|
+
M().clearTimeout(c), i(r);
|
6104
6104
|
}
|
6105
6105
|
r.ping(a).then(a, () => {
|
6106
6106
|
s(o);
|
@@ -6149,9 +6149,9 @@ function mo(n, e, t, r = ho, i = fo) {
|
|
6149
6149
|
height: i.toString(),
|
6150
6150
|
top: s,
|
6151
6151
|
left: o
|
6152
|
-
}), u =
|
6152
|
+
}), u = P().toLowerCase();
|
6153
6153
|
t && (c = un(u) ? po : t), dn(u) && (e = e || go, a.scrollbars = "yes");
|
6154
|
-
const y = Object.entries(a).reduce((
|
6154
|
+
const y = Object.entries(a).reduce((S, [O, N]) => `${S}${O}=${N},`, "");
|
6155
6155
|
if (Di(u) && c !== "_self")
|
6156
6156
|
return yo(e || "", c), new $t(null);
|
6157
6157
|
const b = window.open(e || "", c, y);
|
@@ -6254,7 +6254,7 @@ class wo {
|
|
6254
6254
|
// to make sure errors are raised as promise rejections
|
6255
6255
|
async _openPopup(e, t, r, i) {
|
6256
6256
|
var s;
|
6257
|
-
|
6257
|
+
F((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
6258
6258
|
const o = await Mt(e, t, r, Ze(), i);
|
6259
6259
|
return mo(e, o, ut());
|
6260
6260
|
}
|
@@ -6268,7 +6268,7 @@ class wo {
|
|
6268
6268
|
const t = e._key();
|
6269
6269
|
if (this.eventManagers[t]) {
|
6270
6270
|
const { manager: i, promise: s } = this.eventManagers[t];
|
6271
|
-
return i ? Promise.resolve(i) : (
|
6271
|
+
return i ? Promise.resolve(i) : (F(s, "If manager is not set, promise should be"), s);
|
6272
6272
|
}
|
6273
6273
|
const r = this.initAndGetManager(e);
|
6274
6274
|
return this.eventManagers[t] = { promise: r }, r.catch(() => {
|
@@ -6291,7 +6291,7 @@ class wo {
|
|
6291
6291
|
this.iframes[e._key()].send(Ge, { type: Ge }, (i) => {
|
6292
6292
|
var s;
|
6293
6293
|
const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Ge];
|
6294
|
-
o !== void 0 && t(!!o),
|
6294
|
+
o !== void 0 && t(!!o), L(
|
6295
6295
|
e,
|
6296
6296
|
"internal-error"
|
6297
6297
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -6499,26 +6499,26 @@ var Dn = { exports: {} };
|
|
6499
6499
|
function r(l, m) {
|
6500
6500
|
return l << m | l >>> 32 - m;
|
6501
6501
|
}
|
6502
|
-
function i(l, m, d, w, E,
|
6503
|
-
return t(r(t(t(m, l), t(w,
|
6502
|
+
function i(l, m, d, w, E, A) {
|
6503
|
+
return t(r(t(t(m, l), t(w, A)), E), d);
|
6504
6504
|
}
|
6505
|
-
function s(l, m, d, w, E,
|
6506
|
-
return i(m & d | ~m & w, l, m, E,
|
6505
|
+
function s(l, m, d, w, E, A, R) {
|
6506
|
+
return i(m & d | ~m & w, l, m, E, A, R);
|
6507
6507
|
}
|
6508
|
-
function o(l, m, d, w, E,
|
6509
|
-
return i(m & w | d & ~w, l, m, E,
|
6508
|
+
function o(l, m, d, w, E, A, R) {
|
6509
|
+
return i(m & w | d & ~w, l, m, E, A, R);
|
6510
6510
|
}
|
6511
|
-
function c(l, m, d, w, E,
|
6512
|
-
return i(m ^ d ^ w, l, m, E,
|
6511
|
+
function c(l, m, d, w, E, A, R) {
|
6512
|
+
return i(m ^ d ^ w, l, m, E, A, R);
|
6513
6513
|
}
|
6514
|
-
function a(l, m, d, w, E,
|
6515
|
-
return i(d ^ (m | ~w), l, m, E,
|
6514
|
+
function a(l, m, d, w, E, A, R) {
|
6515
|
+
return i(d ^ (m | ~w), l, m, E, A, R);
|
6516
6516
|
}
|
6517
6517
|
function u(l, m) {
|
6518
6518
|
l[m >> 5] |= 128 << m % 32, l[(m + 64 >>> 9 << 4) + 14] = m;
|
6519
|
-
var d, w, E,
|
6519
|
+
var d, w, E, A, R, h = 1732584193, f = -271733879, p = -1732584194, g = 271733878;
|
6520
6520
|
for (d = 0; d < l.length; d += 16)
|
6521
|
-
w = h, E = f,
|
6521
|
+
w = h, E = f, A = p, R = g, h = s(h, f, p, g, l[d], 7, -680876936), g = s(g, h, f, p, l[d + 1], 12, -389564586), p = s(p, g, h, f, l[d + 2], 17, 606105819), f = s(f, p, g, h, l[d + 3], 22, -1044525330), h = s(h, f, p, g, l[d + 4], 7, -176418897), g = s(g, h, f, p, l[d + 5], 12, 1200080426), p = s(p, g, h, f, l[d + 6], 17, -1473231341), f = s(f, p, g, h, l[d + 7], 22, -45705983), h = s(h, f, p, g, l[d + 8], 7, 1770035416), g = s(g, h, f, p, l[d + 9], 12, -1958414417), p = s(p, g, h, f, l[d + 10], 17, -42063), f = s(f, p, g, h, l[d + 11], 22, -1990404162), h = s(h, f, p, g, l[d + 12], 7, 1804603682), g = s(g, h, f, p, l[d + 13], 12, -40341101), p = s(p, g, h, f, l[d + 14], 17, -1502002290), f = s(f, p, g, h, l[d + 15], 22, 1236535329), h = o(h, f, p, g, l[d + 1], 5, -165796510), g = o(g, h, f, p, l[d + 6], 9, -1069501632), p = o(p, g, h, f, l[d + 11], 14, 643717713), f = o(f, p, g, h, l[d], 20, -373897302), h = o(h, f, p, g, l[d + 5], 5, -701558691), g = o(g, h, f, p, l[d + 10], 9, 38016083), p = o(p, g, h, f, l[d + 15], 14, -660478335), f = o(f, p, g, h, l[d + 4], 20, -405537848), h = o(h, f, p, g, l[d + 9], 5, 568446438), g = o(g, h, f, p, l[d + 14], 9, -1019803690), p = o(p, g, h, f, l[d + 3], 14, -187363961), f = o(f, p, g, h, l[d + 8], 20, 1163531501), h = o(h, f, p, g, l[d + 13], 5, -1444681467), g = o(g, h, f, p, l[d + 2], 9, -51403784), p = o(p, g, h, f, l[d + 7], 14, 1735328473), f = o(f, p, g, h, l[d + 12], 20, -1926607734), h = c(h, f, p, g, l[d + 5], 4, -378558), g = c(g, h, f, p, l[d + 8], 11, -2022574463), p = c(p, g, h, f, l[d + 11], 16, 1839030562), f = c(f, p, g, h, l[d + 14], 23, -35309556), h = c(h, f, p, g, l[d + 1], 4, -1530992060), g = c(g, h, f, p, l[d + 4], 11, 1272893353), p = c(p, g, h, f, l[d + 7], 16, -155497632), f = c(f, p, g, h, l[d + 10], 23, -1094730640), h = c(h, f, p, g, l[d + 13], 4, 681279174), g = c(g, h, f, p, l[d], 11, -358537222), p = c(p, g, h, f, l[d + 3], 16, -722521979), f = c(f, p, g, h, l[d + 6], 23, 76029189), h = c(h, f, p, g, l[d + 9], 4, -640364487), g = c(g, h, f, p, l[d + 12], 11, -421815835), p = c(p, g, h, f, l[d + 15], 16, 530742520), f = c(f, p, g, h, l[d + 2], 23, -995338651), h = a(h, f, p, g, l[d], 6, -198630844), g = a(g, h, f, p, l[d + 7], 10, 1126891415), p = a(p, g, h, f, l[d + 14], 15, -1416354905), f = a(f, p, g, h, l[d + 5], 21, -57434055), h = a(h, f, p, g, l[d + 12], 6, 1700485571), g = a(g, h, f, p, l[d + 3], 10, -1894986606), p = a(p, g, h, f, l[d + 10], 15, -1051523), f = a(f, p, g, h, l[d + 1], 21, -2054922799), h = a(h, f, p, g, l[d + 8], 6, 1873313359), g = a(g, h, f, p, l[d + 15], 10, -30611744), p = a(p, g, h, f, l[d + 6], 15, -1560198380), f = a(f, p, g, h, l[d + 13], 21, 1309151649), h = a(h, f, p, g, l[d + 4], 6, -145523070), g = a(g, h, f, p, l[d + 11], 10, -1120210379), p = a(p, g, h, f, l[d + 2], 15, 718787259), f = a(f, p, g, h, l[d + 9], 21, -343485551), h = t(h, w), f = t(f, E), p = t(p, A), g = t(g, R);
|
6522
6522
|
return [h, f, p, g];
|
6523
6523
|
}
|
6524
6524
|
function y(l) {
|
@@ -6536,16 +6536,16 @@ var Dn = { exports: {} };
|
|
6536
6536
|
d[m >> 5] |= (l.charCodeAt(m / 8) & 255) << m % 32;
|
6537
6537
|
return d;
|
6538
6538
|
}
|
6539
|
-
function
|
6539
|
+
function S(l) {
|
6540
6540
|
return y(u(b(l), l.length * 8));
|
6541
6541
|
}
|
6542
|
-
function
|
6543
|
-
var d, w = b(l), E = [],
|
6544
|
-
for (E[15] =
|
6545
|
-
E[d] = w[d] ^ 909522486,
|
6546
|
-
return
|
6542
|
+
function O(l, m) {
|
6543
|
+
var d, w = b(l), E = [], A = [], R;
|
6544
|
+
for (E[15] = A[15] = void 0, w.length > 16 && (w = u(w, l.length * 8)), d = 0; d < 16; d += 1)
|
6545
|
+
E[d] = w[d] ^ 909522486, A[d] = w[d] ^ 1549556828;
|
6546
|
+
return R = u(E.concat(b(m)), 512 + m.length * 8), y(u(A.concat(R), 640));
|
6547
6547
|
}
|
6548
|
-
function
|
6548
|
+
function N(l) {
|
6549
6549
|
var m = "0123456789abcdef", d = "", w, E;
|
6550
6550
|
for (E = 0; E < l.length; E += 1)
|
6551
6551
|
w = l.charCodeAt(E), d += m.charAt(w >>> 4 & 15) + m.charAt(w & 15);
|
@@ -6555,21 +6555,21 @@ var Dn = { exports: {} };
|
|
6555
6555
|
return unescape(encodeURIComponent(l));
|
6556
6556
|
}
|
6557
6557
|
function I(l) {
|
6558
|
-
return
|
6558
|
+
return S(v(l));
|
6559
6559
|
}
|
6560
|
-
function
|
6561
|
-
return
|
6560
|
+
function k(l) {
|
6561
|
+
return N(I(l));
|
6562
6562
|
}
|
6563
6563
|
function C(l, m) {
|
6564
|
-
return
|
6564
|
+
return O(v(l), v(m));
|
6565
6565
|
}
|
6566
|
-
function
|
6567
|
-
return
|
6566
|
+
function U(l, m) {
|
6567
|
+
return N(C(l, m));
|
6568
6568
|
}
|
6569
|
-
function
|
6570
|
-
return m ? d ? C(m, l) :
|
6569
|
+
function D(l, m, d) {
|
6570
|
+
return m ? d ? C(m, l) : U(m, l) : d ? I(l) : k(l);
|
6571
6571
|
}
|
6572
|
-
n.exports ? n.exports =
|
6572
|
+
n.exports ? n.exports = D : e.md5 = D;
|
6573
6573
|
})(ko);
|
6574
6574
|
})(Dn);
|
6575
6575
|
var Do = Dn.exports;
|
@@ -6652,8 +6652,8 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
|
|
6652
6652
|
primaryKey: n || "id",
|
6653
6653
|
properties: Object.keys(e || {}).reduce(
|
6654
6654
|
(r, i) => {
|
6655
|
-
var b,
|
6656
|
-
const s = e[i] || {}, { type: o, isScalar: c, isRequired: a, isRef: u = !1 } = typeof s.type == "string" ? s.type === "array" ? s.enum ? { type: "string", isScalar: !1, isRequired: !1 } : (b = s.items) != null && b.$ref ? { type: s.items.$ref.split("/").pop(), isScalar: !1, isRequired: !1, isRef: !0 } : { type: (
|
6655
|
+
var b, S;
|
6656
|
+
const s = e[i] || {}, { type: o, isScalar: c, isRequired: a, isRef: u = !1 } = typeof s.type == "string" ? s.type === "array" ? s.enum ? { type: "string", isScalar: !1, isRequired: !1 } : (b = s.items) != null && b.$ref ? { type: s.items.$ref.split("/").pop(), isScalar: !1, isRequired: !1, isRef: !0 } : { type: (S = s.items) == null ? void 0 : S.type, isScalar: !1, isRequired: !1 } : { type: s.format === "date-time" ? "date" : s.type, isScalar: !0, isRequired: !0 } : Array.isArray(s.type) ? s.type.length === 2 ? { type: s.format === "date-time" ? "date" : s.type[0], isScalar: !0, isRequired: !1 } : { type: "json", isScalar: !0, isRequired: s.type.includes("null") } : s.$ref ? { type: s.$ref.split("/").pop(), isScalar: !0, isRequired: !0, isRef: !0 } : { type: s.anyOf[0].$ref.split("/").pop(), isScalar: !0, isRequired: !1, isRef: !0 }, y = s.inputType || (o === "integer" ? "number" : o);
|
6657
6657
|
return {
|
6658
6658
|
...r,
|
6659
6659
|
[i]: {
|
@@ -6673,38 +6673,38 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
|
|
6673
6673
|
const s = Fo(r), { primaryKey: o, properties: c } = s, a = $o(s), u = Bo(t), y = (...v) => ft(n, e.authUser)(...v), b = ({ data: v, ...I }) => y(u(null, I), {
|
6674
6674
|
method: "POST",
|
6675
6675
|
body: Ft(v, s)
|
6676
|
-
}),
|
6677
|
-
const { where:
|
6678
|
-
return y(u(
|
6676
|
+
}), S = ({ data: v, ...I }) => {
|
6677
|
+
const { where: k, ...C } = I;
|
6678
|
+
return y(u(k[o], C), {
|
6679
6679
|
method: "PUT",
|
6680
6680
|
body: Ft(v, s)
|
6681
6681
|
});
|
6682
|
-
},
|
6682
|
+
}, O = (v) => {
|
6683
6683
|
if (!v)
|
6684
6684
|
return v;
|
6685
6685
|
const I = Object.keys(v).reduce(
|
6686
|
-
(
|
6686
|
+
(k, C) => {
|
6687
6687
|
var E;
|
6688
|
-
const
|
6688
|
+
const U = c[C] || {}, { type: D, isScalar: l, isRef: m, format: d, items: w } = U;
|
6689
6689
|
if (m) {
|
6690
|
-
const
|
6690
|
+
const A = jo(D);
|
6691
6691
|
return l ? {
|
6692
|
-
...
|
6693
|
-
[C]: i[
|
6692
|
+
...k,
|
6693
|
+
[C]: i[A].parse(v[C])
|
6694
6694
|
} : {
|
6695
|
-
...
|
6696
|
-
[C]: typeof ((E = i[
|
6695
|
+
...k,
|
6696
|
+
[C]: typeof ((E = i[A]) == null ? void 0 : E.parse) == "function" ? v[C].map((R) => i[A].parse(R)) : v[C]
|
6697
6697
|
};
|
6698
6698
|
}
|
6699
6699
|
return {
|
6700
|
-
...
|
6701
|
-
[C]:
|
6700
|
+
...k,
|
6701
|
+
[C]: D === "date" && v[C] ? new Date(v[C]) : v[C]
|
6702
6702
|
};
|
6703
6703
|
},
|
6704
6704
|
{}
|
6705
6705
|
);
|
6706
6706
|
return typeof s.parse == "function" ? s.parse(I) : I;
|
6707
|
-
},
|
6707
|
+
}, N = Object.keys(c || {}).reduce(
|
6708
6708
|
(v, I) => c[I].isRef && c[I].isScalar && c[I].isRequired ? Object.assign(v, {
|
6709
6709
|
all: v.all.concat(I),
|
6710
6710
|
oneToOne: v.oneToOne.concat(I),
|
@@ -6730,18 +6730,51 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
|
|
6730
6730
|
return s;
|
6731
6731
|
},
|
6732
6732
|
get relations() {
|
6733
|
-
return
|
6733
|
+
return N;
|
6734
6734
|
},
|
6735
|
-
parse:
|
6735
|
+
parse: O,
|
6736
6736
|
validateAttr: a.validateAttr,
|
6737
6737
|
validate: a.validate,
|
6738
|
-
findMany: (v) => y(u(null, v)).then((I) => I.map(
|
6739
|
-
findById: (v, I) => y(u(v, I)).then(
|
6738
|
+
findMany: (v) => y(u(null, v)).then((I) => I.map(O)),
|
6739
|
+
findById: (v, I) => y(u(v, I)).then(O),
|
6740
6740
|
create: b,
|
6741
|
-
update:
|
6742
|
-
upsert: (v) => v.where[o] ?
|
6741
|
+
update: S,
|
6742
|
+
upsert: (v) => v.where[o] ? S({ where: v.where, data: v.update }) : b({ data: v.create }),
|
6743
6743
|
delete: (v) => y(u(v), { method: "DELETE" }),
|
6744
|
-
stats: () => y(u("_stats"))
|
6744
|
+
stats: () => y(u("_stats")),
|
6745
|
+
search: (v, I = {}) => {
|
6746
|
+
var d;
|
6747
|
+
const { searchProps: k } = s, U = v.split(" ").reduce(
|
6748
|
+
(w, E) => [
|
6749
|
+
...w,
|
6750
|
+
{
|
6751
|
+
OR: k.reduce(
|
6752
|
+
(A, R) => {
|
6753
|
+
const h = R.split(".");
|
6754
|
+
return [
|
6755
|
+
...A,
|
6756
|
+
h.reduceRight(
|
6757
|
+
(f, p) => ({ [p]: f }),
|
6758
|
+
{ contains: E, mode: "insensitive" }
|
6759
|
+
)
|
6760
|
+
];
|
6761
|
+
},
|
6762
|
+
[]
|
6763
|
+
)
|
6764
|
+
}
|
6765
|
+
],
|
6766
|
+
[]
|
6767
|
+
), D = { ...I.select, ...I.include }, l = (d = s.defaultProps) != null && d.length ? Object.assign(...s.defaultProps.map((w) => ({ [w]: !0 }))) : null, m = Object.keys(D).length ? D : l;
|
6768
|
+
return y(u(null, {
|
6769
|
+
where: {
|
6770
|
+
...I.where,
|
6771
|
+
AND: U
|
6772
|
+
},
|
6773
|
+
...!!m && { select: m },
|
6774
|
+
...I.orderBy && { orderBy: I.orderBy },
|
6775
|
+
take: I.take || 100
|
6776
|
+
}));
|
6777
|
+
}
|
6745
6778
|
};
|
6746
6779
|
}, Vo = (n, e, t) => Object.keys(t.properties).reduce(
|
6747
6780
|
(r, i) => {
|
@@ -7985,7 +8018,8 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
|
|
7985
8018
|
"application_filter_bypass",
|
7986
8019
|
"application_cohort_change",
|
7987
8020
|
"project_assessment",
|
7988
|
-
"project_assessment_request"
|
8021
|
+
"project_assessment_request",
|
8022
|
+
"project_assessment_assignment"
|
7989
8023
|
]
|
7990
8024
|
},
|
7991
8025
|
data: {
|
@@ -9242,7 +9276,17 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
|
|
9242
9276
|
"cohort",
|
9243
9277
|
"user"
|
9244
9278
|
],
|
9245
|
-
searchProps: [
|
9279
|
+
searchProps: [
|
9280
|
+
"user.firstName",
|
9281
|
+
"user.lastName",
|
9282
|
+
"user.email"
|
9283
|
+
],
|
9284
|
+
defaultProps: [
|
9285
|
+
"id",
|
9286
|
+
"cohort",
|
9287
|
+
"user"
|
9288
|
+
],
|
9289
|
+
getOptionLabel: ({ user: n, cohort: e }) => `${n == null ? void 0 : n.firstName} ${(n == null ? void 0 : n.lastName) || ""} (${e == null ? void 0 : e.name})`
|
9246
9290
|
},
|
9247
9291
|
Dropout: {
|
9248
9292
|
inputProps: [
|