137 lines
6.6 KiB
TypeScript
137 lines
6.6 KiB
TypeScript
/* Metro module 4296; source: stores/SessionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 22, 566, 694, 2] */
|
|
function _fun36505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:6, offset: 0x0108d57d, size: 319 bytes, params: 8, frame: 20
|
|
const closure = function(a0) {
|
|
env0_9 = {};
|
|
a0.sessions.forEach(_fun36510);
|
|
};
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
Object = global.Object;
|
|
const env0_8 = Object.freeze([]);
|
|
let env0_9 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun36511(Store);
|
|
value.displayName = 'SessionsStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
|
|
SESSIONS_REPLACE: closure});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/SessionsStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_36506() { // fn#36506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:158, offset: 0x0108d6bc, 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_36506_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function CONNECTION_OPEN_36509({sessions}) { // fn#36509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:380, offset: 0x0108d71a, size: 39 bytes, params: 2, frame: 11
|
|
env0_9 = {};
|
|
sessions.forEach(_fun36510);
|
|
}
|
|
|
|
function _fun36511(a0) { // fn#36511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:460, offset: 0x0108d759, size: 233 bytes, params: 2, frame: 16
|
|
const closure = SessionsStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(AuthenticationStore);
|
|
}}, {key: 'getSessions', value: value_36514}, {key: 'getSession', value: value_36515}, {key: 'getRemoteActivities',
|
|
value: value_36516}, {key: 'getHiddenActivities', value: value_36518}, {key: 'getSessionById',
|
|
value: value_36520}, {key: 'getActiveSession', value: value_36521}, {key: 'getRemoteApplicationActivity',
|
|
value: value_36523}]);
|
|
}
|
|
|
|
function _fun36510(a0) { // fn#36510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:430, offset: 0x0108d741, size: 24 bytes, params: 2, frame: 3
|
|
env1_9[a0.sessionId] = a0;
|
|
}
|
|
|
|
function value_36515() { // fn#36515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:855, offset: 0x0108d842, size: 42 bytes, params: 1, frame: 12
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
value = AuthenticationStore.getSessionId();
|
|
const value2 = null;
|
|
if (value2 != value) {
|
|
value = this.getSessionById(value);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_36516() { // fn#36516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:967, offset: 0x0108d86c, size: 86 bytes, params: 1, frame: 14
|
|
const env0_0 = AuthenticationStore.getSessionId();
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
const value2 = defaultImport.find(env1_9, _fun36517);
|
|
return value2 != null ? value2.activities : env1_8;
|
|
}
|
|
|
|
function value_36518() { // fn#36518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1115, offset: 0x0108d8e1, size: 96 bytes, params: 1, frame: 14
|
|
const env0_0 = AuthenticationStore.getSessionId();
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
const value2 = defaultImport.find(env1_9, _fun36519);
|
|
return value2 == null ? env1_8 : value2.hiddenActivities ?? env1_8;
|
|
}
|
|
|
|
function value_36521() { // fn#36521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1346, offset: 0x0108d941, size: 50 bytes, params: 1, frame: 13
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
return defaultImport.find(env1_9, function(a0) {
|
|
return a0.active;
|
|
});
|
|
}
|
|
|
|
function value_36523(a0) { // fn#36523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1442, offset: 0x0108d97e, size: 152 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_0 = a0;
|
|
if (a0 == null) {
|
|
return null;
|
|
}
|
|
let value = environment.__proto__;
|
|
const env0_1 = AuthenticationStore.getSessionId();
|
|
const value2 = undefined;
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
value = defaultImport.find(env1_9, _fun36524);
|
|
if (value == null) {
|
|
return null;
|
|
}
|
|
return value.activities.find(_fun36525) ?? (value.hiddenActivities == null ? value2 : value.hiddenActivities.find(_fun36526));
|
|
}
|
|
|
|
function _fun36517(a0) { // fn#36517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1019, offset: 0x0108d8c2, size: 31 bytes, params: 2, frame: 3
|
|
return a0.active && a0.sessionId !== env0_0;
|
|
}
|
|
|
|
function _fun36524(a0) { // fn#36524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4468:1524, offset: 0x0108da16, size: 31 bytes, params: 2, frame: 3
|
|
return a0.active && a0.sessionId !== env0_1;
|
|
}
|
|
|