137 lines
7.2 KiB
TypeScript
137 lines
7.2 KiB
TypeScript
/* Metro module 1372; source: modules/auth/LoginRequiredActionStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun15811(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:6, offset: 0x00e401c8, size: 337 bytes, params: 8, frame: 19
|
|
const closure = function(a0) {
|
|
env0_7 = a0.user.id;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_5 = {};
|
|
const PersistedStore = (Flux).PersistedStore;
|
|
let value = _fun15817(PersistedStore);
|
|
value.displayName = 'LoginRequiredActionStore';
|
|
value.persistKey = 'LoginRequiredActionStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{LOGIN_ATTEMPTED: function({required_actions, user_id}) {
|
|
var updateRequiredActionsBinding = updateRequiredActions;
|
|
env0_6 = user_id;
|
|
updateRequiredActionsBinding(user_id, required_actions);
|
|
}, CONNECTION_OPEN: closure, CURRENT_USER_UPDATE: closure, LOGOUT: LOGOUT_15826,
|
|
PASSWORD_UPDATED: function({userId}) {
|
|
updateRequiredActions(userId, null);
|
|
}, MULTI_ACCOUNT_REMOVE_ACCOUNT: function({userId}) {
|
|
updateRequiredActions(userId, null);
|
|
}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/auth/LoginRequiredActionStore.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_15812() { // fn#15812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:148, offset: 0x00e40319, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_15812_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function updateRequiredActions(a0, a1) { // fn#15815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:364, offset: 0x00e40377, size: 55 bytes, params: 3, frame: 4
|
|
if (a1 == null) {
|
|
if (a0 in env0_5) {
|
|
delete env0_5[a0];
|
|
}
|
|
} else if (a0 != null) {
|
|
env0_5[a0] = a1;
|
|
}
|
|
}
|
|
|
|
function _fun15817(a0) { // fn#15817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:495, offset: 0x00e403c6, size: 164 bytes, params: 2, frame: 16
|
|
const LoginRequiredActionStore2 = LoginRequiredActionStore;
|
|
Inherits(LoginRequiredActionStore2, a0);
|
|
return CreateClass(LoginRequiredActionStore2, [{key: 'initialize', value: value_15819}, {key: 'requiredActions',
|
|
value: value_15820}, {key: 'requiredActionsIncludes', value: function(a0, a1) {
|
|
var value = this.requiredActions(a0);
|
|
var env0_0 = value;
|
|
value = value != null;
|
|
return value && a1.reduce(_fun15822, false);
|
|
}}, {key: 'wasLoginAttemptedInSession', value: value_15823}, {key: 'getState', value: value_15824}]);
|
|
function LoginRequiredActionStore() { // fn#15818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:507, offset: 0x00e4046a, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_0(this, LoginRequiredActionStore);
|
|
const value3 = env1_3(LoginRequiredActionStore);
|
|
return env1_2(this, _isNativeReflectConstruct_15812() ? global.Reflect.construct(value3, arguments,
|
|
env1_3(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_15819(a0) { // fn#15819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:845, offset: 0x00e404db, size: 20 bytes, params: 2, frame: 2
|
|
var value;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
env1_5 = a0;
|
|
}
|
|
}
|
|
|
|
function value_15820(a0) { // fn#15820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:903, offset: 0x00e404ef, size: 28 bytes, params: 2, frame: 3
|
|
let value = environment.__proto__;
|
|
const property = env1_5[a0];
|
|
value = null;
|
|
return value != property ? property : value;
|
|
}
|
|
|
|
function value_15821(a0, a1) { // fn#15821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:989, offset: 0x00e4050b, size: 58 bytes, params: 3, frame: 14
|
|
let value = this.requiredActions(a0);
|
|
value = value != null;
|
|
return value && a1.reduce(_fun15822, false);
|
|
function _fun15822(a0, a1) { // fn#15822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:1059, offset: 0x00e40545, size: 28 bytes, params: 3, frame: 12
|
|
return a0 || ClassCallCheck.includes(a1);
|
|
}
|
|
|
|
}
|
|
|
|
function value_15823(a0) { // fn#15823, offset: 0x00e40561, size: 16 bytes, params: 2, frame: 2
|
|
return env1_6 === a0;
|
|
}
|
|
|
|
function value_15824() { // fn#15824, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
|
|
return env1_5;
|
|
}
|
|
|
|
}
|
|
|
|
function LOGOUT_15826({isSwitchingAccount}) { // fn#15826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:1515, offset: 0x00e4059e, size: 53 bytes, params: 2, frame: 13
|
|
if (!(isSwitchingAccount || env0_7 == null)) {
|
|
updateRequiredActions(env0_7, null);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun15811, 1372, [6, 7, 15, 17, 18, 566, 694,
|
|
2]) /* metro module 1372, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
|