Files
2026-07-28 01:06:53 +03:00

166 lines
7.1 KiB
TypeScript

/* Metro module 1929; source: modules/app_database/app/TryLoad.tsx; dependencies: [5, 3, 694, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun21330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:6, offset: 0x00eede9b, size: 207 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = Logger;
value = new value('TryLoad');
(FileImportTrackerModule).fileFinishedImporting('modules/app_database/app/TryLoad.tsx');
exports.tryLoad = tryLoad;
exports.tryLoadAsync = function() {
return _tryLoadAsync.apply(this, arguments);
};
exports.tryLoadOrResetCacheGateway = tryLoadOrResetCacheGateway;
exports.tryLoadOrResetCacheGatewayAsync = function() {
return _tryLoadOrResetCacheGatewayAsync.apply(this, arguments);
};
function _tryLoadAsync() { // fn#21331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:134, offset: 0x00eedf6a, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun21333).apply(this, arguments);
function* _fun21333(a0) { // fn#21333, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:183, offset: 0x00eedfa3, size: 70 bytes, params: 2, frame: 14
var value3;
var error;
var binding;
let value = undefined;
if (false) {
return value;
}
try {
value = a0();
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_3;
binding.log('database load failed.', error);
return null;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_3;
binding.log('database load failed.', error);
return null;
}
return value3 ? value : value;
}
}
function _tryLoadOrResetCacheGatewayAsync() { // fn#21334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:298, offset: 0x00eedfe9, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun21336).apply(this, arguments);
function* _fun21336(a0, a1, a2) { // fn#21336, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:385, offset: 0x00eee022, size: 232 bytes, params: 4, frame: 22
var r7;
var value4;
var value5;
var value6;
var error;
var value7;
var binding;
var log;
var value8;
var stack;
var value9;
var dispatch;
if (false) {
return undefined;
}
value = a0;
const value3 = a2;
try {
value4 = a1();
} catch (error) {
value7 = environment.__proto__.__proto__;
binding = env2_3;
log = binding.log;
value8 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value8, error, stack]);
binding = env2_0;
value9 = binding(env2_1[2]);
dispatch = value9.dispatch;
r7 = value3 ?? value;
Reflect.apply(dispatch, value9, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGatewayAsync (' + value + ')',
metricAction: 'tryLoadOrResetCacheGatewayAsync (' + r7 + ')'}}]);
return null;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value7 = environment.__proto__.__proto__;
binding = env2_3;
log = binding.log;
value8 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value8, error, stack]);
binding = env2_0;
value9 = binding(env2_1[2]);
dispatch = value9.dispatch;
r7 = value3 ?? value;
Reflect.apply(dispatch, value9, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGatewayAsync (' + value + ')',
metricAction: 'tryLoadOrResetCacheGatewayAsync (' + r7 + ')'}}]);
return null;
}
return value6 ? value5 : value5;
}
}
function tryLoad(a0) { // fn#21337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:780, offset: 0x00eee10a, size: 45 bytes, params: 2, frame: 13
var value;
var error;
var binding;
try {
value = a0();
} catch (error) {
value = environment;
binding = env0_3;
binding.log('database load failed.', error);
return null;
}
return value;
}
function tryLoadOrResetCacheGateway(a0, a1, a2) { // fn#21339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2056:985, offset: 0x00eee137, size: 204 bytes, params: 4, frame: 21
var r6;
var value3;
var error;
var value4;
var binding;
var log;
var value5;
var stack;
var defaultImport;
var dispatch;
const value = a0;
try {
value3 = a1();
} catch (error) {
value4 = environment;
binding = env0_3;
log = binding.log;
value5 = '' + value + ': exception thrown, resetting socket.';
stack = error.stack;
Reflect.apply(log, binding, [value5, error, stack]);
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = defaultImport.dispatch;
r6 = a2 ?? value;
Reflect.apply(dispatch, defaultImport, [{type: 'RESET_SOCKET', args: {error: error,
action: 'tryLoadOrResetCacheGateway (' + value + ')',
metricAction: 'tryLoadOrResetCacheGateway (' + r6 + ')'}}]);
return null;
}
return value3;
}
}
global.__d(_fun21330, 1929, [5, 3, 694, 2]) /* metro module 1929, dependencies: [5, 3, 694, 2] */;