61 lines
3.3 KiB
TypeScript
61 lines
3.3 KiB
TypeScript
/* Metro module 4094; source: modules/mobile_native_updater/MobileNativeUpdateConstants.tsx; dependencies: [3738, 477, 1471, 1582, 2] */
|
|
import Module03738 from '../../by-id/module-03738.js'; /* Metro dependency 3738 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ClientInfoUtilsModule from '../../utils/native/ClientInfoUtils.tsx'; /* Metro dependency 1582 */
|
|
|
|
function _fun33545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4252:6, offset: 0x01033693, size: 140 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Module03738;
|
|
value = value.duration(6, 'hours');
|
|
const value2 = currentUpdateConfig();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/mobile_native_updater/MobileNativeUpdateConstants.tsx');
|
|
exports.UPDATE_CHECK_INTERVAL = value;
|
|
exports.UPDATE_CONFIG = value2;
|
|
function currentUpdateConfig() { // fn#33546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4252:132, offset: 0x0103371f, size: 390 bytes, params: 1, frame: 18
|
|
var r2;
|
|
var r4;
|
|
var moduleValue;
|
|
var moduleValue2;
|
|
var defaultImport;
|
|
const INTERNAL_UPDATE_URL = global.process.env.INTERNAL_UPDATE_URL;
|
|
const value = null;
|
|
const value2 = undefined;
|
|
if (value2 === INTERNAL_UPDATE_URL) {
|
|
r4 = value;
|
|
} else if (global.process.env.INTERNAL_UPDATE_URL === '') {
|
|
r4 = value;
|
|
} else {
|
|
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (moduleValue.isIOS()) {
|
|
defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
|
r2 = defaultImport.toURLSafe(global.process.env.INTERNAL_UPDATE_URL);
|
|
} else {
|
|
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (moduleValue2.isAndroid()) {
|
|
defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
|
r2 = defaultImport.toURLSafe(global.process.env.INTERNAL_UPDATE_URL);
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
}
|
|
r4 = r2;
|
|
}
|
|
const constants = (ClientInfoUtilsModule).getConstants();
|
|
const parseInt = global.parseInt;
|
|
const Build = value == constants ? value2 : constants.Build;
|
|
const int = parseInt(Build);
|
|
const Number = global.Number;
|
|
const r3 = Number.isNaN(int) || int === 0 || (int === 123456 || int === 1234567890) ? value : int;
|
|
const constants2 = (ClientInfoUtilsModule).getConstants();
|
|
const Version = value == constants2 ? value2 : constants2.Version;
|
|
r2 = value != Version ? Version : value;
|
|
return value === r4 || value === r3 || value === r2 ? value : {url: r4, currentBuild: r3, currentVersion: r2};
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun33545, 4094, [3738, 477, 1471, 1582,
|
|
2]) /* metro module 4094, dependencies: [3738, 477, 1471, 1582, 2] */;
|