Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,102 @@
|
||||
/* Metro module 4696; source: modules/media_uploads/DetectedFileSize.tsx; dependencies: [5, 2] */
|
||||
function _fun40599(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:6, offset: 0x01105a03, size: 115 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(5) /* metro dependency 5 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/DetectedFileSize.tsx');
|
||||
exports.getDetectedFileSize = function() {
|
||||
return _getDetectedFileSize.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _getDetectedFileSize() { // fn#40600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:106, offset: 0x01105a76, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_0(_fun40602).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun40602(a0) { // fn#40602, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:169, offset: 0x01105aaf, size: 92 bytes, params: 2, frame: 14
|
||||
var Promise;
|
||||
var prototype;
|
||||
var closure;
|
||||
var promise;
|
||||
var value3;
|
||||
var error;
|
||||
let value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
const env0_0 = a0;
|
||||
if (a0.size > 0) {
|
||||
return a0.size;
|
||||
}
|
||||
try {
|
||||
Promise = global.Promise;
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
prototype = Promise.prototype;
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
closure = _fun40603;
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
promise = new Promise();
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
value = promise instanceof Object ? promise : value;
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value3 = false;
|
||||
} catch (error) {
|
||||
return 0;
|
||||
}
|
||||
return value3 ? value : value;
|
||||
}
|
||||
|
||||
function _fun40603(a0, a1) { // fn#40603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:238, offset: 0x01105b0b, size: 115 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const FileReader = global.FileReader;
|
||||
const fileReader = new FileReader();
|
||||
const env0_2 = global.setTimeout(_fun40604, 10000);
|
||||
fileReader.onload = onload_40605;
|
||||
fileReader.onerror = onerror_40606;
|
||||
fileReader.readAsArrayBuffer(env0_0);
|
||||
}
|
||||
|
||||
function _fun40604() { // fn#40604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:281, offset: 0x01105b7e, size: 50 bytes, params: 1, frame: 12
|
||||
const Error = global.Error;
|
||||
require(new Error('File read timeout'));
|
||||
}
|
||||
|
||||
function onload_40605({target}) { // fn#40605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:336, offset: 0x01105bb0, size: 121 bytes, params: 2, frame: 15
|
||||
global.clearTimeout(env0_2);
|
||||
const result = target?.result;
|
||||
const ArrayBuffer = global.ArrayBuffer;
|
||||
if (result instanceof ArrayBuffer) {
|
||||
env0_0(result.byteLength);
|
||||
} else {
|
||||
require(new global.Error('Unexpected FileReader result type'));
|
||||
}
|
||||
}
|
||||
|
||||
function onerror_40606() { // fn#40606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4874:505, offset: 0x01105c29, size: 65 bytes, params: 1, frame: 13
|
||||
global.clearTimeout(env0_2);
|
||||
const Error = global.Error;
|
||||
require(new Error('Could not read file'));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 4685; source: modules/media_uploads/ImageEncodingLadder.tsx; dependencies: [6, 7, 661, 2] */
|
||||
function _fun40550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4863:6, offset: 0x01104934, size: 211 bytes, params: 8, frame: 20
|
||||
const closure = getAdaptiveImageCompressionQuality;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).CompressionQuality;
|
||||
const value = _fun40552();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/ImageEncodingLadder.tsx');
|
||||
exports.IMAGE_COMPRESSION_THRESHOLDS = {'SMALL': 921600, 'MEDIUM': 2073600, 'LARGE': 3686400, 'VERY_LARGE': 8294400};
|
||||
exports.ADAPTIVE_COMPRESSION_CONFIG = {'useAdaptiveCompression': true, 'veryHighQuality': 0.8, 'highQuality': 0.7,
|
||||
'mediumQuality': 0.6, 'lowQuality': 0.5, 'veryLowQuality': 0.4, 'useOriginalIfSmaller': true};
|
||||
exports.getAdaptiveImageCompressionQuality = closure;
|
||||
exports.ImageEncodingLadder = value;
|
||||
}
|
||||
|
||||
function getAdaptiveImageCompressionQuality(a0, a1) { // fn#40551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4863:347, offset: 0x01104a07, size: 269 bytes, params: 3, frame: 6
|
||||
var value;
|
||||
var width;
|
||||
var height;
|
||||
if (a1.useAdaptiveCompression) {
|
||||
width = a0.width;
|
||||
if (width == null) {
|
||||
return CompressionQuality.HIGH;
|
||||
}
|
||||
height = a0.height;
|
||||
if (height == null) {
|
||||
return CompressionQuality.HIGH;
|
||||
}
|
||||
width = a0.width;
|
||||
height = a0.height;
|
||||
value = width * height;
|
||||
return value <= env0_3.SMALL ? a1.veryHighQuality ?? CompressionQuality.HIGH : value <= env0_3.MEDIUM ? a1.highQuality ?? CompressionQuality.HIGH : value <= env0_3.LARGE ? a1.mediumQuality ?? CompressionQuality.HIGH : value <= env0_3.VERY_LARGE ? a1.lowQuality ?? CompressionQuality.HIGH : a1.veryLowQuality ?? CompressionQuality.HIGH;
|
||||
}
|
||||
return CompressionQuality.HIGH;
|
||||
}
|
||||
|
||||
function _fun40552() { // fn#40552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4863:755, offset: 0x01104b14, size: 85 bytes, params: 1, frame: 16
|
||||
return env0_1(ImageEncodingLadder, null, [{key: 'selectEncodingConfig', value: value_40554},
|
||||
{key: 'clampDimensions', value: value_40555}]);
|
||||
}
|
||||
|
||||
function value_40554(a0) { // fn#40554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4863:894, offset: 0x01104b69, size: 196 bytes, params: 2, frame: 19
|
||||
var object;
|
||||
var lowQuality;
|
||||
let value = ImageEncodingLadder.clampDimensions(a0.width, a0.height, 3840, 2160);
|
||||
const targetWidth = value.targetWidth;
|
||||
const targetHeight = value.targetHeight;
|
||||
if (a0.width !== targetWidth) {
|
||||
value = environment.__proto__;
|
||||
lowQuality = env1_4.lowQuality;
|
||||
value = 0.5;
|
||||
object = {compressionQuality: 100 * (lowQuality ?? value), targetWidth: targetWidth,
|
||||
targetHeight: targetHeight};
|
||||
} else if (a0.height === targetHeight) {
|
||||
value = environment.__proto__;
|
||||
value = getAdaptiveImageCompressionQuality({width: targetWidth, height: targetHeight}, env1_4);
|
||||
object = {compressionQuality: 100 * value, targetWidth: targetWidth, targetHeight: targetHeight};
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
lowQuality = env1_4.lowQuality;
|
||||
value = 0.5;
|
||||
object = {compressionQuality: 100 * (lowQuality ?? value), targetWidth: targetWidth,
|
||||
targetHeight: targetHeight};
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
function value_40555(a0, a1, a2, a3) { // fn#40555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4863:1278, offset: 0x01104c2d, size: 220 bytes, params: 5, frame: 19
|
||||
var object2;
|
||||
let Math = global.Math;
|
||||
let max = Math.max;
|
||||
let value = Reflect.apply(max, Math, [a0, a1]);
|
||||
Math = global.Math;
|
||||
let min = Math.min;
|
||||
const value2 = Reflect.apply(min, Math, [a0, a1]);
|
||||
Math = global.Math;
|
||||
const value3 = Math.max(a2, a3);
|
||||
Math = global.Math;
|
||||
const value4 = Math.min(a2, a3);
|
||||
if (value <= value3) {
|
||||
if (value2 <= value4) {
|
||||
return {targetWidth: a0, targetHeight: a1};
|
||||
}
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value = value3 / value;
|
||||
value = Reflect.apply(min, Math, [value, value4 / value2]);
|
||||
object2 = {};
|
||||
Math = global.Math;
|
||||
object2.targetWidth = Math.max(1, global.Math.round(a0 * value));
|
||||
} else {
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value = value3 / value;
|
||||
value = Reflect.apply(min, Math, [value, value4 / value2]);
|
||||
object2 = {};
|
||||
Math = global.Math;
|
||||
object2.targetWidth = Math.max(1, global.Math.round(a0 * value));
|
||||
}
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
const Math3 = global.Math;
|
||||
object2.targetHeight = Reflect.apply(max, Math, [1, Math3.round(a1 * value)]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 8429; source: modules/media_uploads/experiments/AndroidExoPlayerHttpEngineExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun66914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8614:6, offset: 0x01c0f796, size: 183 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2026-02-android-exoplayer-http-engine', 'kind': 'user',
|
||||
defaultConfig: {httpEngine: 'default'}, variations: {[0]: {httpEngine: 'default'}, [1]: {httpEngine: 'okhttp'},
|
||||
[2]: {httpEngine: 'cronet'}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/AndroidExoPlayerHttpEngineExperiment.tsx');
|
||||
exports.AndroidExoPlayerHttpEngineExperiment = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 9564; source: modules/media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx; dependencies: [1220, 1226, 1854, 477, 2] */
|
||||
function _fun74691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9750:6, offset: 0x01d96b78, size: 260 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2026-05-android-rnv-http-engine', 'kind': 'user',
|
||||
defaultConfig: {httpEngine: 'default'}, variations: {[0]: {httpEngine: 'default'}, [1]: {httpEngine: 'okhttp'},
|
||||
[2]: {httpEngine: 'cronet'}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx');
|
||||
exports.AndroidRNVHttpEngineExperiment = value;
|
||||
exports.useRnvHttpEngine = useRnvHttpEngine;
|
||||
exports.getMuxExperimentDimension = getMuxExperimentDimension;
|
||||
}
|
||||
|
||||
function useRnvHttpEngine() { // fn#74692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9750:484, offset: 0x01d96c7c, size: 75 bytes, params: 1, frame: 13
|
||||
const value2 = env0_4.useConfig({location: 'android_rnv_http_engine'});
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
return value ? value2.httpEngine : null;
|
||||
}
|
||||
|
||||
function getMuxExperimentDimension() { // fn#74693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9750:642, offset: 0x01d96cc7, size: 122 bytes, params: 1, frame: 16
|
||||
const assignment = ApexExperimentStore.getAssignment('user', AuthenticationStore.getId(),
|
||||
'2026-05-android-rnv-http-engine');
|
||||
const value3 = null;
|
||||
const value4 = undefined;
|
||||
const trackedVariantId = value3 == assignment ? value4 : assignment.trackedVariantId;
|
||||
const r4 = value3 != trackedVariantId ? trackedVariantId : value3 == assignment ? value4 : assignment.variantId;
|
||||
return value3 == r4 ? value3 : '' + '2026-05-android-rnv-http-engine' + ':' + r4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 4687; source: modules/media_uploads/experiments/AttachmentQualityMetricsExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun40558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4865:6, offset: 0x01104daf, size: 177 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2026-04-attachment-quality-metrics', 'kind': 'user',
|
||||
defaultConfig: {'enableQualityMetrics': false, 'enableOriginDetection': false},
|
||||
variations: {[0]: {'enableQualityMetrics': false, 'enableOriginDetection': false},
|
||||
[1]: {'enableQualityMetrics': true, 'enableOriginDetection': true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/AttachmentQualityMetricsExperiment.tsx');
|
||||
exports.AttachmentQualityMetricsExperiment = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 4698; source: modules/media_uploads/experiments/ImageAttachmentMezzanineV2Experiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun40612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4876:6, offset: 0x01105ded, size: 192 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2025-09-image-attachment-mezzanine-v2',
|
||||
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {'enabled': true,
|
||||
'maxFileSizeBytes': 524288}, [2]: {'enabled': true, 'maxFileSizeBytes': 262144}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/ImageAttachmentMezzanineV2Experiment.tsx');
|
||||
exports.getImageAttachmentMezzanineV2Config = getImageAttachmentMezzanineV2Config;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 4688; source: modules/media_uploads/experiments/IosJpegliExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun40559(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4866:6, offset: 0x01104e60, size: 169 bytes, params: 8, frame: 22
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2025-11-enhanced-jpeg-encoding-on-ios',
|
||||
'kind': 'user', defaultConfig: {useJpegliEncoder: false}, variations: {[0]: {useJpegliEncoder: false},
|
||||
[1]: {useJpegliEncoder: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/IosJpegliExperiment.tsx');
|
||||
exports.getIosJpegliConfig = getIosJpegliConfig;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 4697; source: modules/media_uploads/experiments/KestrelExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun40608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4875:6, offset: 0x01105c6a, size: 246 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-04-kestrel',
|
||||
'kind': 'user', defaultConfig: {'enabled': false, 'threshold': 0}, variations: {[0]: {'enabled': false,
|
||||
'threshold': 0}, [1]: {'enabled': true, 'threshold': 15}, [2]: {'enabled': true, 'threshold': 20},
|
||||
[3]: {'enabled': true, 'threshold': 25}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/KestrelExperiment.tsx');
|
||||
exports.getKestrelConfig = getKestrelConfig;
|
||||
exports.getEffectiveKestrelLimit = function(a0, a1) {
|
||||
var r0;
|
||||
var value = a1;
|
||||
if (a0.enabled) {
|
||||
value = global.Math.max(1048576 * a0.threshold, value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.getKestrelVariantName = function(a0) {
|
||||
return a0.enabled ? a0.threshold === 15 ? 'kestrel_a' : a0.threshold === 20 ? 'kestrel_b' : a0.threshold !== 25 ? 'unknown' : 'kestrel_c' : 'control';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 4689; source: modules/media_uploads/experiments/MobileImageEncodingLadderExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun40561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4867:6, offset: 0x01104f09, size: 169 bytes, params: 8, frame: 22
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-01-image-optimized-encoding-ladder',
|
||||
'kind': 'user', defaultConfig: {useImageEncodingLadder: false},
|
||||
variations: {[0]: {useImageEncodingLadder: false}, [1]: {useImageEncodingLadder: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/MobileImageEncodingLadderExperiment.tsx');
|
||||
exports.getMobileImageEncodingLadderConfig = getMobileImageEncodingLadderConfig;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 4684; source: modules/media_uploads/experiments/VideoFrameRateValidationExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun40548(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4862:6, offset: 0x0110488b, size: 169 bytes, params: 8, frame: 22
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2025-10-video-frame-rate-validation',
|
||||
'kind': 'user', defaultConfig: {enableFrameRateValidation: false},
|
||||
variations: {[0]: {enableFrameRateValidation: false}, [1]: {enableFrameRateValidation: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/experiments/VideoFrameRateValidationExperiment.tsx');
|
||||
exports.getVideoFrameRateValidationExperimentConfig = getVideoFrameRateValidationExperimentConfig;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Metro module 8003; source: modules/media_uploads/getAttachmentUploadAbortAlert.tsx; dependencies: [661, 1244, 4651, 2] */
|
||||
function _fun63587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8181:6, offset: 0x01b86ae3, size: 115 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/getAttachmentUploadAbortAlert.tsx');
|
||||
exports.getAttachmentUploadAbortAlertContent = getAttachmentUploadAbortAlertContent;
|
||||
}
|
||||
|
||||
function getAttachmentUploadAbortAlertContent(a0) { // fn#63588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8181:245, offset: 0x01b86b56, size: 330 bytes, params: 2, frame: 18
|
||||
var object3;
|
||||
var formatToPlainString;
|
||||
var DYFPg2;
|
||||
var object4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const B3vFdU = t.B3vFdU;
|
||||
const value2 = Reflect.apply(string, intl, [B3vFdU]);
|
||||
const TOTAL_ATTACHMENT_SIZE_TOO_LARGE = AbortCodes.TOTAL_ATTACHMENT_SIZE_TOO_LARGE;
|
||||
if (TOTAL_ATTACHMENT_SIZE_TOO_LARGE === a0) {
|
||||
object3 = {title: value2};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
DYFPg2 = t.DYFPg2;
|
||||
object4 = {};
|
||||
object4.maxSizeMb = (require(4651) /* metro dependency 4651: UploadUtils */).MAX_TOTAL_ATTACHMENT_SIZE_MB;
|
||||
object3.body = Reflect.apply(formatToPlainString, intl, [DYFPg2, object4]);
|
||||
return object3;
|
||||
}
|
||||
const CLOUD_UPLOAD_NOT_FOUND = AbortCodes.CLOUD_UPLOAD_NOT_FOUND;
|
||||
if (CLOUD_UPLOAD_NOT_FOUND === a0) {
|
||||
return {title: value2, body: intl.string(t.bQldfH)};
|
||||
}
|
||||
const INVALID_PERMISSIONS = AbortCodes.INVALID_PERMISSIONS;
|
||||
if (INVALID_PERMISSIONS === a0) {
|
||||
return {title: value2, body: intl.string(t.zl4Weq)};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/* Metro module 7880; source: modules/media_uploads/handleUploadAttachmentErrors.native.tsx; dependencies: [661, 4697, 7881, 4655, 4647, 1244, 8003, 2] */
|
||||
function _fun63181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8058:6, offset: 0x01b737fc, size: 132 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.AbortCodes;
|
||||
const env0_4 = constantsModule.MAX_UPLOAD_COUNT;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/handleUploadAttachmentErrors.native.tsx');
|
||||
exports.handleUploadMessageAttachmentsErrors = handleUploadMessageAttachmentsErrors;
|
||||
}
|
||||
|
||||
function handleUploadMessageAttachmentsErrors({file, guildId, analyticsLocations, code, reason}) { // fn#63182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8058:276, offset: 0x01b73880, size: 768 bytes, params: 2, frame: 24
|
||||
var r1;
|
||||
var show;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var defaultImport2;
|
||||
var defaultImport3;
|
||||
var kestrelConfig;
|
||||
var defaultImport4;
|
||||
var moduleValue3;
|
||||
var getEffectiveKestrelLimit;
|
||||
var moduleValue4;
|
||||
let value = undefined;
|
||||
if (value === code) {
|
||||
return false;
|
||||
}
|
||||
const ENTITY_TOO_LARGE = AbortCodes.ENTITY_TOO_LARGE;
|
||||
if (code === ENTITY_TOO_LARGE) {
|
||||
kestrelConfig = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.handleUploadMessageAttachmentsErrors'});
|
||||
defaultImport4 = importDefault(7881) /* metro dependency 7881: showUploadFileSizeError */;
|
||||
object2 = {file: file};
|
||||
moduleValue3 = require(4697) /* metro dependency 4697: KestrelExperiment */;
|
||||
getEffectiveKestrelLimit = moduleValue3.getEffectiveKestrelLimit;
|
||||
moduleValue4 = require(4655) /* metro dependency 4655: FileUtils */;
|
||||
object2.maxSize = Reflect.apply(getEffectiveKestrelLimit, moduleValue3, [kestrelConfig,
|
||||
moduleValue4.maxFileSize(guildId)]);
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
object2.errorReason = reason == null ? value : reason.type;
|
||||
defaultImport4(object2);
|
||||
return true;
|
||||
}
|
||||
const TOO_MANY_ATTACHMENTS = AbortCodes.TOO_MANY_ATTACHMENTS;
|
||||
if (code === TOO_MANY_ATTACHMENTS) {
|
||||
defaultImport3 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
defaultImport3.show({title: intl.string(t.wOr6hB), body: intl.formatToPlainString(t['qqyp/e'],
|
||||
{limit: MAX_UPLOAD_COUNT})});
|
||||
return true;
|
||||
}
|
||||
const ENTITY_EMPTY = AbortCodes.ENTITY_EMPTY;
|
||||
if (code === ENTITY_EMPTY) {
|
||||
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport2.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t.B3vFdU);
|
||||
object2.body = intl.string(t['9ZpT2C']);
|
||||
Reflect.apply(show, defaultImport2, [object2]);
|
||||
return true;
|
||||
}
|
||||
const INVALID_FILE_ASSET = AbortCodes.INVALID_FILE_ASSET;
|
||||
if (code === INVALID_FILE_ASSET) {
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t.B3vFdU);
|
||||
object2.body = intl.string(t.zMEjJg);
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
return true;
|
||||
}
|
||||
const attachmentUploadAbortAlertContent = (require(8003) /* metro dependency 8003: getAttachmentUploadAbortAlert */).getAttachmentUploadAbortAlertContent(code);
|
||||
const value4 = attachmentUploadAbortAlertContent != null;
|
||||
if (value4) {
|
||||
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
value.show(attachmentUploadAbortAlertContent);
|
||||
value = true;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,361 @@
|
||||
/* Metro module 11094; source: modules/media_uploads/native/UploadPreviewActionSheet.tsx; dependencies: [57, 31, 27, 4645, 6276, 33, 4501, 697, 44, 4650, 1478, 1585, 4594, 4080, 4673, 11095, 3857, 7684, 4660, 11133, 11134, 6275, 6277, 4572, 4573, 477, 9543, 8509, 6231, 6238, 11135, 11137, 1244, 8950, 11139, 7879, 6697, 11141, 4578, 4071, 2] */
|
||||
function _fun84935(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:6, offset: 0x01f5d433, size: 442 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Image;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const env0_8 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.contentContainer = {padding: 16};
|
||||
const object4 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.padding = PX_8;
|
||||
let md = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object4.borderRadius = md;
|
||||
object4.width = '100%';
|
||||
object2.imageWrap = object4;
|
||||
md = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.imageContainer = {'overflow': 'hidden', 'alignSelf': 'center', borderRadius: md - PX_4};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/native/UploadPreviewActionSheet.tsx');
|
||||
exports.default = UploadPreviewActionSheet;
|
||||
}
|
||||
|
||||
function UploadPreviewActionSheet({onAdd, onEdit, onRemove, channelId, onClose, disableAddDescription, disableSpoiler, upload}) { // fn#84936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:529, offset: 0x01f5d5ed, size: 2198 bytes, params: 2, frame: 47
|
||||
var r4;
|
||||
var r23;
|
||||
var r21;
|
||||
var r15;
|
||||
var r10;
|
||||
var value18;
|
||||
var space;
|
||||
var value19;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items4;
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const env0_3 = channelId;
|
||||
disableAddDescription = !(disableAddDescription === undefined) && disableAddDescription;
|
||||
const styles = useStyles();
|
||||
const id = upload.id;
|
||||
const isVideo = upload.isVideo;
|
||||
const isImage = upload.isImage;
|
||||
const isThumbnail = upload.isThumbnail;
|
||||
const r28 = isThumbnail !== undefined && isThumbnail;
|
||||
const item = upload.item;
|
||||
const spoiler = upload.spoiler;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
const platform = item.platform;
|
||||
const UploadPlatform = (require(4650) /* metro dependency 4650: Upload */).UploadPlatform;
|
||||
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
|
||||
defaultImport(platform === REACT_NATIVE, 'Upload must be a React Native upload item.');
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
return _fun84938;
|
||||
});
|
||||
const binding = onClose;
|
||||
const value5 = binding.useMemo(_fun84939, [width, item, styles]);
|
||||
const value6 = binding.useCallback(_fun84940, [onRemove, id]);
|
||||
const value7 = binding.useCallback(_fun84941, [onAdd]);
|
||||
const value8 = binding.useCallback(_fun84942, [onEdit, item]);
|
||||
const value9 = binding.useMemo(_fun84945, [isVideo, item]);
|
||||
const r20 = isImage && !disableAddDescription;
|
||||
const r24 = !r28 && !disableSpoiler;
|
||||
const value13 = (importDefault(11133) /* metro dependency 11133: useCanSetThumbnail */)(channelId, upload);
|
||||
const value14 = (importDefault(11134) /* metro dependency 11134: useSetMediaPostThumbnail */)(channelId, upload);
|
||||
const [property, env0_11] = env0_3(onClose.useState(undefined), 2);
|
||||
if (property != null) {
|
||||
value18 = property + bottom;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
value19 = value18 + space.PX_32;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
r4 = value19 + space.PX_16;
|
||||
} else {
|
||||
r4 = undefined;
|
||||
}
|
||||
const r22 = isImage && onEdit != null;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const object = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.padding = PX_16;
|
||||
object.paddingBottom = bottom;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const object2 = {spacing: 16, onLayout: onLayout_84946};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items5 = [<Text variant="text-md/semibold">{item.filename}</Text>];
|
||||
const items2 = [styles.imageContainer];
|
||||
items2[1] = {width: value5.width, height: value5.height};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const items3 = [platformUtilsModule.isIOS() && isVideo && item.uri.startsWith('file://') ? ((VideoComponent) => <VideoComponent style={{width: value5.width,
|
||||
height: value5.height}} source={{uri: item.uri}} muted paused preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent) : <Image style={{width: value5.width,
|
||||
height: value5.height}} source={item} />];
|
||||
items3[1] = value9 != null && value9 !== '' && ((Caption) => <Caption label={value9} />)((require(8509) /* metro dependency 8509: Caption */).Caption);
|
||||
items5[1] = <View style={styles.imageWrap}><View style={items2}>{items3}</View></View>;
|
||||
if (r20) {
|
||||
if (r20) {
|
||||
r23 = <TableRow icon={((ImageFileIcon) => <ImageFileIcon />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)} onPress={onPress_84947} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5S2AK+'])} arrow />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4 = [r23];
|
||||
if (r24) {
|
||||
r23 = <TableCheckboxRow icon={((SpoilerIcon) => <SpoilerIcon />)((require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon)} onPress={function() {
|
||||
importDefault(dependencyMap[13]).hideActionSheet();
|
||||
var defaultImport2 = importDefault(dependencyMap[35]);
|
||||
var channelIdBinding = channelId;
|
||||
var idBinding = id;
|
||||
var ChannelMessage = DraftType.ChannelMessage;
|
||||
defaultImport2.update(channelIdBinding, idBinding, ChannelMessage, {spoiler: !spoiler});
|
||||
}} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gsI+xC'])} checked={spoiler} />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4[1] = r23;
|
||||
if (value13) {
|
||||
r21 = <TableCheckboxRow icon={((ImageIcon) => <ImageIcon />)((require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ews2pj)} onPress={value14} checked={r28} />;
|
||||
} else {
|
||||
r21 = value13;
|
||||
}
|
||||
items4[2] = r21;
|
||||
if (r22) {
|
||||
r21 = <TableRow icon={((PencilSparkleIcon) => <PencilSparkleIcon />)((require(11141) /* metro dependency 11141: PencilSparkleIcon */).PencilSparkleIcon)} onPress={value8} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b0y3DL)} arrow />;
|
||||
} else {
|
||||
r21 = null;
|
||||
}
|
||||
items4[3] = r21;
|
||||
r15 = <TableRowGroup hasIcons>{items4}</TableRowGroup>;
|
||||
} else if (r24) {
|
||||
if (r20) {
|
||||
r23 = <TableRow icon={((ImageFileIcon) => <ImageFileIcon />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)} onPress={onPress_84947} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5S2AK+'])} arrow />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4 = [r23];
|
||||
if (r24) {
|
||||
r23 = <TableCheckboxRow icon={((SpoilerIcon) => <SpoilerIcon />)((require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon)} onPress={onPress_84948} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gsI+xC'])} checked={spoiler} />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4[1] = r23;
|
||||
if (value13) {
|
||||
r21 = <TableCheckboxRow icon={((ImageIcon) => <ImageIcon />)((require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ews2pj)} onPress={value14} checked={r28} />;
|
||||
} else {
|
||||
r21 = value13;
|
||||
}
|
||||
items4[2] = r21;
|
||||
if (r22) {
|
||||
r21 = <TableRow icon={((PencilSparkleIcon) => <PencilSparkleIcon />)((require(11141) /* metro dependency 11141: PencilSparkleIcon */).PencilSparkleIcon)} onPress={value8} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b0y3DL)} arrow />;
|
||||
} else {
|
||||
r21 = null;
|
||||
}
|
||||
items4[3] = r21;
|
||||
r15 = <TableRowGroup hasIcons>{items4}</TableRowGroup>;
|
||||
} else if (value13) {
|
||||
if (r20) {
|
||||
r23 = <TableRow icon={((ImageFileIcon) => <ImageFileIcon />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)} onPress={onPress_84947} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5S2AK+'])} arrow />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4 = [r23];
|
||||
if (r24) {
|
||||
r23 = <TableCheckboxRow icon={((SpoilerIcon) => <SpoilerIcon />)((require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon)} onPress={onPress_84948} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gsI+xC'])} checked={spoiler} />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4[1] = r23;
|
||||
if (value13) {
|
||||
r21 = <TableCheckboxRow icon={((ImageIcon) => <ImageIcon />)((require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ews2pj)} onPress={value14} checked={r28} />;
|
||||
} else {
|
||||
r21 = value13;
|
||||
}
|
||||
items4[2] = r21;
|
||||
if (r22) {
|
||||
r21 = <TableRow icon={((PencilSparkleIcon) => <PencilSparkleIcon />)((require(11141) /* metro dependency 11141: PencilSparkleIcon */).PencilSparkleIcon)} onPress={value8} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b0y3DL)} arrow />;
|
||||
} else {
|
||||
r21 = null;
|
||||
}
|
||||
items4[3] = r21;
|
||||
r15 = <TableRowGroup hasIcons>{items4}</TableRowGroup>;
|
||||
} else if (r22) {
|
||||
if (r20) {
|
||||
r23 = <TableRow icon={((ImageFileIcon) => <ImageFileIcon />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)} onPress={onPress_84947} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5S2AK+'])} arrow />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4 = [r23];
|
||||
if (r24) {
|
||||
r23 = <TableCheckboxRow icon={((SpoilerIcon) => <SpoilerIcon />)((require(11139) /* metro dependency 11139: SpoilerIcon */).SpoilerIcon)} onPress={onPress_84948} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gsI+xC'])} checked={spoiler} />;
|
||||
} else {
|
||||
r23 = null;
|
||||
}
|
||||
items4[1] = r23;
|
||||
if (value13) {
|
||||
r21 = <TableCheckboxRow icon={((ImageIcon) => <ImageIcon />)((require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ews2pj)} onPress={value14} checked={r28} />;
|
||||
} else {
|
||||
r21 = value13;
|
||||
}
|
||||
items4[2] = r21;
|
||||
if (r22) {
|
||||
r21 = <TableRow icon={((PencilSparkleIcon) => <PencilSparkleIcon />)((require(11141) /* metro dependency 11141: PencilSparkleIcon */).PencilSparkleIcon)} onPress={value8} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.b0y3DL)} arrow />;
|
||||
} else {
|
||||
r21 = null;
|
||||
}
|
||||
items4[3] = r21;
|
||||
r15 = <TableRowGroup hasIcons>{items4}</TableRowGroup>;
|
||||
} else {
|
||||
r15 = null;
|
||||
}
|
||||
items5[2] = r15;
|
||||
if (onRemove != null) {
|
||||
r10 = <Button icon={((TrashIcon) => <TrashIcon size="sm" color="control-primary-text-default" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['40jBO/'])} onPress={value6} variant="destructive" />;
|
||||
} else if (onAdd != null) {
|
||||
r10 = <Button icon={((ImageFileIcon) => <ImageFileIcon size="sm" color="control-primary-text-default" />)((require(11135) /* metro dependency 11135: ImageFileIcon */).ImageFileIcon)} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.s7oPyG)} onPress={value7} />;
|
||||
} else {
|
||||
r10 = null;
|
||||
}
|
||||
items5[3] = r10;
|
||||
return (
|
||||
<BottomSheet scrollable startHeight={r4}>
|
||||
<BottomSheetScrollView contentContainerStyle={object}>
|
||||
<Stack {...object2}>
|
||||
{items5}
|
||||
</Stack>
|
||||
</BottomSheetScrollView>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84937() { // fn#84937, offset: 0x01f5de83, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function _fun84939() { // fn#84939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:961, offset: 0x01f5dea9, size: 189 bytes, params: 1, frame: 17
|
||||
const height = item.height;
|
||||
const width2 = item.width;
|
||||
let Math = global.Math;
|
||||
let value = Math.min(width,
|
||||
ACTION_SHEET_MAX_WIDTH) - 2 * styles.contentContainer.padding - 2 * styles.imageWrap.padding;
|
||||
if (height != null) {
|
||||
if (width2 != null) {
|
||||
if (height === 0) {
|
||||
return {'width': 300, 'height': 300};
|
||||
}
|
||||
if (width2 === 0) {
|
||||
return {'width': 300, 'height': 300};
|
||||
}
|
||||
Math = global.Math;
|
||||
value /= Math.max(width2, height);
|
||||
return {width: width2 * value, height: height * value};
|
||||
}
|
||||
}
|
||||
return {width: value, height: value};
|
||||
}
|
||||
|
||||
function _fun84940() { // fn#84940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:1228, offset: 0x01f5df66, size: 63 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
if (onRemove != null) {
|
||||
onRemove(id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84941() { // fn#84941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:1300, offset: 0x01f5dfa5, size: 58 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
if (onAdd != null) {
|
||||
onAdd();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84942() { // fn#84942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:1369, offset: 0x01f5dfdf, size: 168 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const uri = item.uri;
|
||||
const width = item.width;
|
||||
const height = item.height;
|
||||
const defaultImport2 = importDefault(4673) /* metro dependency 4673: ImagePicker */;
|
||||
defaultImport2.launchCropper({uri: uri, freeStyleCropEnabled: true, width: width === 0 ? value : width,
|
||||
height: height === 0 ? value : height}).then(_fun84943).catch(_fun84944);
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun84945() { // fn#84945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:1751, offset: 0x01f5e131, size: 80 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(4660) /* metro dependency 4660: UploadUtils */;
|
||||
const getCaptionLabel = value.getCaptionLabel;
|
||||
const uploadUtilsModule = require(4660) /* metro dependency 4660: UploadUtils */;
|
||||
const getType = uploadUtilsModule.getType;
|
||||
return Reflect.apply(getCaptionLabel, value, [Reflect.apply(getType, uploadUtilsModule, [item.uri]), isVideo, item]);
|
||||
}
|
||||
|
||||
function UploadPreviewActionSheetOnLayout({nativeEvent}) { // fn#84946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:2201, owner: UploadPreviewActionSheet.onLayout, offset: 0x01f5e181, size: 36 bytes, params: 2, frame: 11
|
||||
env0_11(nativeEvent.layout.height);
|
||||
}
|
||||
|
||||
function UploadPreviewActionSheetOnPress() { // fn#84947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:2844, owner: UploadPreviewActionSheet.onPress, offset: 0x01f5e1a5, size: 67 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(11137) /* metro dependency 11137: AddImageDescriptionModalActionCreators */).open({source: item,
|
||||
channelId: channelId, id: id});
|
||||
}
|
||||
|
||||
function UploadPreviewActionSheetOnPress_84948() { // fn#84948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:3027, owner: UploadPreviewActionSheet.onPress, offset: 0x01f5e1e8, size: 100 bytes, params: 1, frame: 19
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const defaultImport2 = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
|
||||
const update = defaultImport2.update;
|
||||
const channelIdBinding = channelId;
|
||||
const idBinding = id;
|
||||
const ChannelMessage = DraftType.ChannelMessage;
|
||||
Reflect.apply(update, defaultImport2, [channelIdBinding, idBinding, ChannelMessage, {spoiler: !spoiler}]);
|
||||
}
|
||||
|
||||
function _fun84943(a0) { // fn#84943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:1539, offset: 0x01f5e087, size: 65 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__;
|
||||
let onEditBinding = onEdit;
|
||||
if (onEditBinding != null) {
|
||||
onEditBinding = onEdit;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
|
||||
onEditBinding(value.cropResultToUploadItem(a0));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84944(a0) { // fn#84944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11280:1600, offset: 0x01f5e0c8, size: 105 bytes, params: 2, frame: 16
|
||||
var value;
|
||||
var defaultImport;
|
||||
var open;
|
||||
var object2;
|
||||
if (a0.code !== 'E_PICKER_CANCELLED') {
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
open = defaultImport.open;
|
||||
object2 = {key: 'CROP_ERROR'};
|
||||
object2.IconComponent = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
|
||||
object2.content = a0.message;
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
/* Metro module 4683; source: modules/media_uploads/native/VideoUploadUtils.tsx; dependencies: [6, 7, 1312, 3, 2] */
|
||||
function _fun40537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:6, offset: 0x01103edc, size: 542 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const closure = calculateTargetDimensions;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_1 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_3 = (require(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */).VideoCompressionQuality;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('VideoUploadUtils.tsx');
|
||||
value = _fun40539();
|
||||
const value3 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
const value4 = new value('very_low', 360, 800000);
|
||||
value.VERY_LOW = value4 instanceof Object ? value4 : value3;
|
||||
const value6 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
const value7 = new value('low', 360, 1200000);
|
||||
value.LOW = value7 instanceof Object ? value7 : value6;
|
||||
const value9 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
const value10 = new value('medium', 480, 1800000);
|
||||
value.MEDIUM = value10 instanceof Object ? value10 : value9;
|
||||
const value12 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
const value13 = new value('high', 720, 2250000);
|
||||
value.HIGH = value13 instanceof Object ? value13 : value12;
|
||||
const value15 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
const value16 = new value('very_high', 1080, 7000000);
|
||||
value.VERY_HIGH = value16 instanceof Object ? value16 : value15;
|
||||
value.fromCompressionQuality = fromCompressionQuality;
|
||||
object2 = {'bitrateFloor': 300000, 'createHDR': false, 'frameRate': 30, 'keyFrameIntervalSeconds': 2,
|
||||
'rotationDegrees': 0, 'skipVideoTranscode': false, 'targetBitrate': null, 'targetHeight': 480,
|
||||
'targetWidth': 640, 'useHEVC': false, 'videoQuality': null, 'hevcIsSupported': false,
|
||||
'useTranscodedVideoForMovSources': true, 'transmuxLivePhotos': true, 'progressUpdateGranularity': 10};
|
||||
let MEDIUM = value.MEDIUM;
|
||||
object2.targetBitrate = MEDIUM.targetBitrate;
|
||||
MEDIUM = value.MEDIUM;
|
||||
object2.videoQuality = MEDIUM;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/native/VideoUploadUtils.tsx');
|
||||
exports.VideoQualityTarget = value;
|
||||
exports.DEFAULT_VIDEO_ENCODING_CONFIG = object2;
|
||||
exports.calculateTargetDimensions = closure;
|
||||
exports.canSkipVideoTranscode = canSkipVideoTranscode;
|
||||
exports.logSourceMetadata = logSourceMetadata;
|
||||
exports.logEncoderSettings = logEncoderSettings;
|
||||
exports.calculateOptimalBitrate = function({bitRate}, a1, a2) {
|
||||
var Math = global.Math;
|
||||
return global.Math.min(Math.max(bitRate, a2), a1.targetBitrate);
|
||||
};
|
||||
exports.shouldUseHEVC = function(a0, a1, a2, a3, a4) {
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value = a3;
|
||||
r2 = a1 ? !a2 : !a1;
|
||||
if (r2) {
|
||||
r0 = !r2;
|
||||
} else {
|
||||
r1 = value && a0.rotationDegrees !== 0;
|
||||
r1 = r1 && !a4;
|
||||
value = !r1;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
}
|
||||
|
||||
function calculateTargetDimensions(a0, a1) { // fn#40538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:1177, offset: 0x011040fa, size: 186 bytes, params: 3, frame: 17
|
||||
var r3;
|
||||
var r6;
|
||||
var Math;
|
||||
var value2;
|
||||
var value3;
|
||||
let value = a0.width / a0.height;
|
||||
if (a0.width > a0.height) {
|
||||
Math = global.Math;
|
||||
value3 = Math.min(a1, a0.height);
|
||||
Math = global.Math;
|
||||
value = Math.round(value3 * value);
|
||||
r3 = value3;
|
||||
r6 = value;
|
||||
} else {
|
||||
Math = global.Math;
|
||||
value2 = Math.min(a1, a0.width);
|
||||
Math = global.Math;
|
||||
value = Math.round(value2 / value);
|
||||
r3 = value;
|
||||
r6 = value2;
|
||||
}
|
||||
return {width: r6 % 2 === 0 ? r6 : r6 + 1, height: r3 % 2 === 0 ? r3 : r3 + 1};
|
||||
}
|
||||
|
||||
function _fun40539() { // fn#40539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:197, offset: 0x011041b4, size: 55 bytes, params: 1, frame: 14
|
||||
return env0_2(VideoQualityTarget, [{key: 'toString', value: function() {
|
||||
return this.value;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function fromCompressionQuality(a0) { // fn#40542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:598, offset: 0x01104221, size: 194 bytes, params: 2, frame: 13
|
||||
const VERY_LOW = VideoCompressionQuality.VERY_LOW;
|
||||
if (VERY_LOW === a0) {
|
||||
return env0_0.VERY_LOW;
|
||||
}
|
||||
const LOW = VideoCompressionQuality.LOW;
|
||||
if (LOW === a0) {
|
||||
return env0_0.LOW;
|
||||
}
|
||||
const MEDIUM = VideoCompressionQuality.MEDIUM;
|
||||
if (MEDIUM === a0) {
|
||||
return env0_0.MEDIUM;
|
||||
}
|
||||
const HIGH = VideoCompressionQuality.HIGH;
|
||||
if (HIGH === a0) {
|
||||
return env0_0.HIGH;
|
||||
}
|
||||
const VERY_HIGH = VideoCompressionQuality.VERY_HIGH;
|
||||
if (VERY_HIGH === a0) {
|
||||
return env0_0.VERY_HIGH;
|
||||
}
|
||||
const Error = global.Error;
|
||||
const value = 'Unknown compression quality: ' + a0;
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
function canSkipVideoTranscode(a0, a1, a2, a3) { // fn#40543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:1616, offset: 0x011042e3, size: 198 bytes, params: 5, frame: 17
|
||||
var r4;
|
||||
var r0;
|
||||
var value;
|
||||
var Math;
|
||||
var round;
|
||||
var width;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
if (a2 == null) {
|
||||
value = calculateTargetDimensions(a1, a0.targetResolution);
|
||||
Math = global.Math;
|
||||
round = Math.round;
|
||||
width = a1.width;
|
||||
value2 = Reflect.apply(round, Math, [width]);
|
||||
Math = global.Math;
|
||||
value3 = Math.round(a1.height);
|
||||
width = value.width;
|
||||
value4 = value2 <= width;
|
||||
} else {
|
||||
if (a3 == null) {
|
||||
value = calculateTargetDimensions(a1, a0.targetResolution);
|
||||
Math = global.Math;
|
||||
round = Math.round;
|
||||
width = a1.width;
|
||||
value2 = Reflect.apply(round, Math, [width]);
|
||||
Math = global.Math;
|
||||
value3 = Math.round(a1.height);
|
||||
width = value.width;
|
||||
r4 = value2 <= width && value3 <= value.height;
|
||||
value = a1.bitRate <= a0.targetBitrate;
|
||||
r0 = r4 ? !value : !r4;
|
||||
r0 = !r0 ? a1.format == null : r0;
|
||||
r0 = !r0 ? a1.format.match(RegExp('(avc1|hvc1|video\\/(avc|hevc))', 'i')) === null : r0;
|
||||
return !r0;
|
||||
}
|
||||
if (a2 > a3) {
|
||||
return false;
|
||||
}
|
||||
value = calculateTargetDimensions(a1, a0.targetResolution);
|
||||
Math = global.Math;
|
||||
value2 = Math.round(a1.width);
|
||||
Math = global.Math;
|
||||
value3 = Math.round(a1.height);
|
||||
value4 = value2 <= value.width;
|
||||
}
|
||||
r4 = value4 && value3 <= value.height;
|
||||
r0 = r4 ? !(a1.bitRate <= a0.targetBitrate) : !r4;
|
||||
r0 = !r0 ? a1.format == null : r0;
|
||||
r0 = !r0 ? a1.format.match(RegExp('(avc1|hvc1|video\\/(avc|hevc))', 'i')) === null : r0;
|
||||
return !r0;
|
||||
}
|
||||
|
||||
function logSourceMetadata(a0) { // fn#40544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:1954, offset: 0x011043a9, size: 469 bytes, params: 2, frame: 20
|
||||
const r7 = a0.format != null ? ({'hvc1': 'hvc1 (HEVC)', 'avc1': 'avc1 (H.264)'})[a0.format] ?? a0.format : 'unknown';
|
||||
let binding = env0_4;
|
||||
binding.info('Video Source Metadata:');
|
||||
binding.info('- Codec: ' + r7);
|
||||
binding.info('- Dimensions: ' + a0.width + 'x' + a0.height);
|
||||
binding.info('- Bitrate: ' + a0.bitRate + ' bps');
|
||||
binding.info('- Frame Rate: ' + a0.frameRate + ' fps');
|
||||
binding.info('- HDR: ' + (a0.isHDRContent ? 'Yes' : 'No'));
|
||||
binding = env0_4;
|
||||
binding.info('- Rotation Degrees: ' + a0.rotationDegrees);
|
||||
binding.info('- Profile: ' + a0.sourceProfile);
|
||||
binding.info('- Level: ' + a0.sourceLevel);
|
||||
binding.info('- Duration: ' + a0.durationMs + ' ms');
|
||||
}
|
||||
|
||||
function logEncoderSettings(a0) { // fn#40545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:2510, offset: 0x0110457e, size: 666 bytes, params: 2, frame: 24
|
||||
var createHDR;
|
||||
var value6;
|
||||
let binding = env0_4;
|
||||
let info = binding.info;
|
||||
Reflect.apply(info, binding, ['Encoder Video Quality Settings:']);
|
||||
info = binding.info;
|
||||
let videoQuality = a0.videoQuality;
|
||||
const value2 = undefined;
|
||||
Reflect.apply(info, binding,
|
||||
['- Compression Quality: ' + (videoQuality == null ? value2 : videoQuality.toString())]);
|
||||
binding = env0_4;
|
||||
info = binding.info;
|
||||
videoQuality = a0.videoQuality;
|
||||
Reflect.apply(info, binding,
|
||||
['- Compression Quality Target Resolution: ' + (videoQuality == null ? value2 : videoQuality.targetResolution) + 'p']);
|
||||
binding = env0_4;
|
||||
info = binding.info;
|
||||
videoQuality = a0.videoQuality;
|
||||
Reflect.apply(info, binding,
|
||||
['- Compression Quality Max Bitrate: ' + (videoQuality == null ? value2 : videoQuality.targetBitrate) + ' bps']);
|
||||
env0_4.info('Encoder Video Transcoding Settings:');
|
||||
const skipVideoTranscode = a0.skipVideoTranscode;
|
||||
info = env0_4.info;
|
||||
if (skipVideoTranscode) {
|
||||
Reflect.apply(info, binding, ['- Skip Video Transcode: Yes']);
|
||||
} else {
|
||||
Reflect.apply(info, binding, ['- Codec: ' + (a0.useHEVC ? 'hvc1 (HEVC)' : 'avc1 (H.264)')]);
|
||||
binding = env0_4;
|
||||
binding.info('- Dimensions: ' + a0.targetWidth + 'x' + a0.targetHeight);
|
||||
binding.info('- Bitrate: ' + a0.targetBitrate + ' bps');
|
||||
binding.info('- Frame Rate: ' + a0.frameRate + ' fps');
|
||||
binding.info('- Key Frame Interval: ' + a0.keyFrameIntervalSeconds + ' seconds');
|
||||
info = binding.info;
|
||||
createHDR = a0.createHDR;
|
||||
value6 = 'No';
|
||||
Reflect.apply(info, binding, ['- Create HDR: ' + (createHDR ? 'Yes' : value6)]);
|
||||
binding = env0_4;
|
||||
binding.info('- Rotation Degrees: ' + a0.rotationDegrees);
|
||||
binding.info('- HEVC Supported: ' + (a0.hevcIsSupported ? 'Yes' : value6));
|
||||
binding = env0_4;
|
||||
binding.info('- Progress Update Granularity: ' + a0.progressUpdateGranularity);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function VideoQualityTarget(a0, a1, a2) { // fn#40540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4861:218, offset: 0x011041eb, size: 54 bytes, params: 4, frame: 13
|
||||
env1_1(this, VideoQualityTarget);
|
||||
this.value = a0;
|
||||
this.targetResolution = a1;
|
||||
this.targetBitrate = a2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/* Metro module 7881; source: modules/media_uploads/native/showUploadFileSizeError.tsx; dependencies: [1312, 1878, 661, 4503, 1880, 1900, 7228, 4697, 4863, 4651, 4660, 7882, 676, 6789, 1244, 4136, 4647, 2] */
|
||||
function _fun63183(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8059:6, offset: 0x01b73b80, size: 258 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.AnalyticEvents;
|
||||
const env0_6 = value.AnalyticsSections;
|
||||
const env0_7 = (require(4503) /* metro dependency 4503: MessageConstants */).FileUploadErrorTypes;
|
||||
value = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_8 = value.PremiumTypes;
|
||||
const env0_9 = value.PremiumUserLimits;
|
||||
const env0_10 = value.PremiumUpsellTypes;
|
||||
object = {NITRO_UPSELL: 'Nitro Upsell', OVER_MAX_SIZE: 'Over Max Size'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/native/showUploadFileSizeError.tsx');
|
||||
exports.default = showUploadFileSizeError;
|
||||
}
|
||||
|
||||
function showUploadFileSizeError({file, maxSize, analyticsLocations, errorReason}) { // fn#63184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8059:464, offset: 0x01b73c82, size: 1417 bytes, params: 2, frame: 29
|
||||
var r16;
|
||||
var r13;
|
||||
var r3;
|
||||
var r8;
|
||||
var r5;
|
||||
var moduleValue2;
|
||||
var Math;
|
||||
var max;
|
||||
const MAX_TOTAL_ATTACHMENT_SIZE = (require(4651) /* metro dependency 4651: UploadUtils */).MAX_TOTAL_ATTACHMENT_SIZE;
|
||||
var defaultImport;
|
||||
var handleShowUpsellAlert;
|
||||
var FILE_UPLOAD_POPOUT;
|
||||
var items3;
|
||||
var value12;
|
||||
var enabled;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var formatToPlainString;
|
||||
var fxEKdS;
|
||||
var moduleValue8;
|
||||
const BYTE_IN_KB = (require(4136) /* metro dependency 4136: FileSizeUtils */).BYTE_IN_KB;
|
||||
var tUOJdH;
|
||||
var moduleValue9;
|
||||
var value19;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const premiumTypeUtilsModule = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
|
||||
const isPremiumExactly = premiumTypeUtilsModule.isPremiumExactly;
|
||||
const TIER_2 = PremiumTypes.TIER_2;
|
||||
const isPremiumExactly2 = Reflect.apply(isPremiumExactly, premiumTypeUtilsModule, [currentUser, TIER_2]);
|
||||
if (file.items != null) {
|
||||
moduleValue2 = require(7228) /* metro dependency 7228: logMessageSendFailure */;
|
||||
r16 = moduleValue2.getAttachmentMimeTypes(file.items);
|
||||
} else {
|
||||
r16 = [];
|
||||
}
|
||||
let object = [];
|
||||
const items2 = [];
|
||||
if (file.items != null) {
|
||||
file.items.forEach(_fun63185);
|
||||
}
|
||||
const kestrelConfig = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.showUploadFileSizeError'});
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
let trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const FILE_SIZE_LIMIT_EXCEEDED = AnalyticEvents.FILE_SIZE_LIMIT_EXCEEDED;
|
||||
const object2 = {user_individual_file_size_limit: maxSize};
|
||||
object2.num_attachments = file.attachmentsCount;
|
||||
object2.pre_compression_file_sizes = items2;
|
||||
object2.pre_compression_aggregate_file_size = file.totalPreCompressionSize;
|
||||
object2.post_compression_file_sizes = object;
|
||||
object2.post_compression_aggregate_file_size = file.totalPostCompressionSize;
|
||||
object2.attachment_mimetypes = r16;
|
||||
object2.error_type = errorReason ?? FileUploadErrorTypes.ERROR_SOURCE_UNKNOWN;
|
||||
object2.kestrel_variant = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelVariantName(kestrelConfig);
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [FILE_SIZE_LIMIT_EXCEEDED, object2]);
|
||||
if (isPremiumExactly2) {
|
||||
r8 = 0;
|
||||
} else {
|
||||
if (file.items == null) {
|
||||
r3 = maxSize;
|
||||
} else if (errorReason === FileUploadErrorTypes.ERROR_SOURCE_UNKNOWN) {
|
||||
r3 = maxSize;
|
||||
} else {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
r13 = errorReason !== FileUploadErrorTypes.POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE ? items2 : object;
|
||||
object = [];
|
||||
arraySpread(object, r13, 0, 7);
|
||||
r3 = apply(max, object, Math, 7);
|
||||
}
|
||||
r8 = r3;
|
||||
}
|
||||
const POSTCOMPRESSION_SUM_TOO_LARGE = FileUploadErrorTypes.POSTCOMPRESSION_SUM_TOO_LARGE;
|
||||
r3 = errorReason === POSTCOMPRESSION_SUM_TOO_LARGE || errorReason === FileUploadErrorTypes.PRECOMPRESSION_SUM_TOO_LARGE;
|
||||
let r4 = isPremiumExactly2 || r8 > PremiumUserLimits[PremiumTypes.TIER_2].fileSize;
|
||||
r4 = !r4 ? r8 > MAX_TOTAL_ATTACHMENT_SIZE : r4;
|
||||
r4 = !r4 ? r3 : r4;
|
||||
r4 = !r4 ? errorReason === FileUploadErrorTypes.ERROR_SOURCE_UNKNOWN : r4;
|
||||
const moduleValue6 = appAnalyticsUtilsModule;
|
||||
trackWithMetadata = moduleValue6.trackWithMetadata;
|
||||
const FILE_UPLOAD_ALERT_VIEWED = AnalyticEvents.FILE_UPLOAD_ALERT_VIEWED;
|
||||
object = {};
|
||||
const binding = env0_11;
|
||||
object.alert_type = r4 ? binding.OVER_MAX_SIZE : binding.NITRO_UPSELL;
|
||||
object.num_attachments = file.attachmentsCount;
|
||||
object.total_attachment_size = file.currentSize;
|
||||
object.has_image = file.hasImage;
|
||||
object.has_video = file.hasVideo;
|
||||
object.is_premium = isPremiumExactly2;
|
||||
object.image_compression_quality = (require(4660) /* metro dependency 4660: UploadUtils */).getImageCompressionQuality();
|
||||
object.image_compression_setting_enabled = UnsyncedUserSettingsStore.dataSavingMode;
|
||||
Reflect.apply(trackWithMetadata, moduleValue6, [FILE_UPLOAD_ALERT_VIEWED, object]);
|
||||
if (r4) {
|
||||
if (errorReason === FileUploadErrorTypes.ERROR_SOURCE_UNKNOWN) {
|
||||
value19 = intl.string(t.B3vFdU);
|
||||
r4 = intl.string(t.zMEjJg);
|
||||
r5 = value19;
|
||||
} else {
|
||||
enabled = kestrelConfig.enabled;
|
||||
string = intl.string;
|
||||
r5 = enabled ? Reflect.apply(string, intl, [t.bRYgjH]) : Reflect.apply(string, intl, [t['/tGlcj']]);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
if (r3) {
|
||||
tUOJdH = t.tUOJdH;
|
||||
moduleValue9 = require(4136) /* metro dependency 4136: FileSizeUtils */;
|
||||
r4 = Reflect.apply(formatToPlainString, intl, [tUOJdH,
|
||||
{maxSize: moduleValue9.formatSize(MAX_TOTAL_ATTACHMENT_SIZE / BYTE_IN_KB, {useKibibytes: true})}]);
|
||||
} else {
|
||||
fxEKdS = t.fxEKdS;
|
||||
moduleValue8 = require(4136) /* metro dependency 4136: FileSizeUtils */;
|
||||
r4 = Reflect.apply(formatToPlainString, intl, [fxEKdS,
|
||||
{maxSize: moduleValue8.formatSize(maxSize / BYTE_IN_KB, {useKibibytes: true})}]);
|
||||
}
|
||||
}
|
||||
(importDefault(4647) /* metro dependency 4647: AlertActionCreators */).show({title: r5, body: r4});
|
||||
} else {
|
||||
defaultImport = importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */;
|
||||
handleShowUpsellAlert = defaultImport.handleShowUpsellAlert;
|
||||
object = {};
|
||||
object.initialUpsellKey = (require(676) /* metro dependency 676: ConstantsIOS */).UpsellTypes.UPLOAD;
|
||||
FILE_UPLOAD_POPOUT = AnalyticsSections.FILE_UPLOAD_POPOUT;
|
||||
object.analyticsLocation = {section: FILE_UPLOAD_POPOUT};
|
||||
items3 = [];
|
||||
value12 = arraySpread(items3, analyticsLocations, 0, 7);
|
||||
FILE_UPLOAD_POPOUT = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FILE_UPLOAD_POPOUT;
|
||||
items3[value12] = FILE_UPLOAD_POPOUT;
|
||||
value12 + 1;
|
||||
object.analyticsLocations = items3;
|
||||
object.analyticsProperties = {type: PremiumUpsellTypes.UPLOAD_ERROR_UPSELL};
|
||||
object.largestFileSize = r8;
|
||||
Reflect.apply(handleShowUpsellAlert, defaultImport, [object]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun63185({postCompressionSize, preCompressionSize}) { // fn#63185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8059:717, offset: 0x01b7420b, size: 64 bytes, params: 2, frame: 15
|
||||
const binding = env0_0;
|
||||
binding.push(postCompressionSize ?? 0);
|
||||
env0_1.push(preCompressionSize);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Metro module 11093; source: modules/media_uploads/native/showUploadPreviewActionSheet.tsx; dependencies: [4080, 11094, 1962, 2] */
|
||||
function _fun84933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11279:6, offset: 0x01f5d37a, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/native/showUploadPreviewActionSheet.tsx');
|
||||
exports.default = showUploadPreviewActionSheet;
|
||||
}
|
||||
|
||||
function showUploadPreviewActionSheet(a0) { // fn#84934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11279:197, offset: 0x01f5d3e1, size: 82 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'UploadPreviewActionSheet', a0]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/* Metro module 7222; source: modules/media_uploads/uploadMessageAttachments.native.tsx; dependencies: [5, 7223, 7224, 4625, 694, 2] */
|
||||
function _fun57764(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:6, offset: 0x016b5961, size: 171 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const uploadStore = importDefault(7223) /* metro dependency 7223: UploadStore */;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_uploads/uploadMessageAttachments.native.tsx');
|
||||
exports.uploadMessageAttachments = function() {
|
||||
return _uploadMessageAttachments.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _uploadMessageAttachments() { // fn#57765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:126, offset: 0x016b5a0c, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun57767).apply(this, arguments);
|
||||
}
|
||||
|
||||
async function _fun57767({channelId, message, nonce, items, shouldUploadFailureSendNotification}) { // fn#57767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:199, offset: 0x016b5a4e, size: 410 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_5;
|
||||
if (binding.has(nonce)) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_1;
|
||||
const binding2 = env2_2;
|
||||
const value6 = new binding(binding2[2])();
|
||||
const id = value6._file.id;
|
||||
const value8 = 'pending-upload-' + id;
|
||||
value = env2_0(binding2[3]);
|
||||
const createMessageRecord = value.createMessageRecord;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, message, id);
|
||||
object2['key'] = value8;
|
||||
const env0_4 = Reflect.apply(createMessageRecord, value, [object2]);
|
||||
value6.on('start', _fun57768);
|
||||
value6.on('compression-progress', _fun57769);
|
||||
value6.on('progress', _fun57770);
|
||||
value6.on('error', _fun57771);
|
||||
value6.on('complete', _fun57772);
|
||||
value6.on('cancel-upload-item', _fun57774);
|
||||
await value6.uploadFiles(items);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return {attachments: value, uploader: value6};
|
||||
}
|
||||
|
||||
function _fun57768(a0) { // fn#57768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:419, offset: 0x016b5be8, size: 101 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const binding = env3_5;
|
||||
binding.add(nonce);
|
||||
env3_1(env3_2[4]).dispatch({type: 'UPLOAD_START', channelId: channelId, file: a0, uploader: env0_3,
|
||||
message: env0_4});
|
||||
}
|
||||
|
||||
function _fun57769(a0) { // fn#57769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:544, offset: 0x016b5c4d, size: 68 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
env3_1(env3_2[4]).dispatch({type: 'UPLOAD_COMPRESSION_PROGRESS', channelId: channelId, file: a0});
|
||||
}
|
||||
|
||||
function _fun57770(a0) { // fn#57770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:642, offset: 0x016b5c91, size: 68 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
env3_1(env3_2[4]).dispatch({type: 'UPLOAD_PROGRESS', channelId: channelId, file: a0});
|
||||
}
|
||||
|
||||
function _fun57771(a0) { // fn#57771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:725, offset: 0x016b5cd5, size: 120 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
env3_5.delete(nonce);
|
||||
env0_3.cancel();
|
||||
env3_1(env3_2[4]).dispatch({type: 'UPLOAD_FAIL', channelId: channelId, file: a0, messageId: env0_4.id,
|
||||
shouldSendNotification: shouldUploadFailureSendNotification});
|
||||
}
|
||||
|
||||
function _fun57772(a0) { // fn#57772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:870, offset: 0x016b5d4d, size: 201 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
env3_5.delete(nonce);
|
||||
const messageForFile = env3_4.getMessageForFile(a0.id);
|
||||
if (messageForFile != null && messageForFile.content === '' && env0_3._aborted) {
|
||||
value = env3_1(env3_2[4]);
|
||||
value.dispatch({type: 'MESSAGE_DELETE', id: messageForFile.nonce ?? messageForFile.id,
|
||||
channelId: messageForFile.channel_id});
|
||||
}
|
||||
if (env0_3._aborted) {
|
||||
global.setTimeout(_fun57773, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun57774(a0) { // fn#57774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:1187, offset: 0x016b5e65, size: 68 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
env3_1(env3_2[4]).dispatch({type: 'UPLOAD_FILE_UPDATE', file: a0, channelId: channelId});
|
||||
}
|
||||
|
||||
function _fun57773() { // fn#57773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7400:1074, offset: 0x016b5e16, size: 79 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
env4_1(env4_2[4]).dispatch({type: 'UPLOAD_COMPLETE', channelId: channelId, file: env0_0, aborted: true});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user