decord/beta/source/modules/auth/makeAuthenticated.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

71 lines
2 KiB
TypeScript

// Module ID: 16571
// Function ID: 16572
// Name: makeAuthenticated
// Dependencies: [19, 502, 1074, 21, 7081, 16572, 2]
// Exports: makeAuthenticated
// Module 16571 (makeAuthenticated)
import AuthenticationUtils from "AuthenticationUtils" /* 7081 */;
import RedirectUnauthenticatedDefault from "RedirectUnauthenticated" /* 16572 */;
import noop from "module_19" /* 19 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
require = fn;
const LoginStates = fn(1074).LoginStates;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/auth/makeAuthenticated.tsx");
export const makeAuthenticated = function makeAuthenticated(displayName, arg1) {
_require = displayName;
importDefault = arg1;
if (arg2 === undefined) {
let obj = { passProps: true };
}
let str = displayName.displayName;
if (str == null) {
str = displayName.name;
}
if (str == null) {
str = "<Unknown>";
}
class Authenticated {
constructor(arg0) {
tmp = closure_2;
obj = closure_0(closure_2[4]);
if (!obj.isAuthenticated()) {
obj2 = closure_3;
tmp2 = LoginStates;
if (closure_3.getLoginStatus() !== LoginStates.LOGGING_IN) {
if (obj2.allowLogoutRedirect()) {
tmp4 = null;
if (null != closure_1) {
tmp8 = jsx;
obj1 = { renderRedirect: null };
tmp9 = closure_1;
obj1.renderRedirect = jsx(closure_1(tmp[5]), {});
tmp10Result = jsx(tmp3, obj1);
} else {
tmp5 = jsx;
tmp6 = closure_1;
tmp10Result = jsx(closure_1(tmp[5]), {});
}
}
return tmp10Result;
}
}
tmp12 = null;
tmp10 = jsx;
tmp11 = closure_0;
if (closure_2.passProps) {
tmp12 = displayName;
}
obj5 = {};
merged = Object.assign(tmp12);
tmp10Result = tmp10(tmp11, obj5);
return;
}
}
Authenticated.displayName = "Authenticated(" + str + ")";
return Authenticated;
};