393 lines
11 KiB
TypeScript
393 lines
11 KiB
TypeScript
/* Metro module 4659; source: utils/AttachmentFile.native.tsx; dependencies: [5, 3, 44, 4650, 4660, 4651, 2] */
|
|
function _fun40259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:6, offset: 0x010fac82, size: 198 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
let value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('AttachmentFile');
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/AttachmentFile.native.tsx');
|
|
exports.getAttachmentFile = function() {
|
|
return _getAttachmentFile.apply(this, arguments);
|
|
};
|
|
exports.cancelGetAttachmentFile = function() {
|
|
return _cancelGetAttachmentFile.apply(this, arguments);
|
|
};
|
|
exports.fileIsInAppDir = fileIsInAppDir;
|
|
}
|
|
|
|
function _getAttachmentFile() { // fn#40260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:141, offset: 0x010fad48, size: 48 bytes, params: 1, frame: 14
|
|
return env0_3(_fun40262).apply(this, arguments);
|
|
}
|
|
|
|
function _cancelGetAttachmentFile() { // fn#40263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:617, offset: 0x010faedd, size: 48 bytes, params: 1, frame: 14
|
|
return env0_3(_fun40265).apply(this, arguments);
|
|
}
|
|
|
|
function fileIsInAppDir(a0) { // fn#40268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:1061, offset: 0x010faf57, size: 153 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var value2;
|
|
var property;
|
|
var moduleValue;
|
|
var appDir;
|
|
var value4;
|
|
var startsWith;
|
|
var moduleValue2;
|
|
var appDir2;
|
|
var error;
|
|
var binding;
|
|
let value = a0.replace(RegExp('^file:\\/\\/', ''), '');
|
|
try {
|
|
value2 = environment;
|
|
property = dependencyMap[4];
|
|
moduleValue = require(property);
|
|
appDir = moduleValue.getAppDir();
|
|
value4 = appDir !== '';
|
|
if (value4) {
|
|
startsWith = value.startsWith;
|
|
property = dependencyMap[4];
|
|
moduleValue2 = require(property);
|
|
appDir2 = moduleValue2.getAppDir();
|
|
value = Reflect.apply(startsWith, value, [appDir2]);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
} catch (error) {
|
|
binding = env0_4;
|
|
binding.error('Failed to get app dir', error);
|
|
return false;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function* _fun40262(a0, a1) { // fn#40262, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:200, offset: 0x010fad81, size: 348 bytes, params: 3, frame: 24
|
|
var r4;
|
|
var r5;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var binding2;
|
|
var value4;
|
|
var item;
|
|
var platform;
|
|
var UploadPlatform;
|
|
var REACT_NATIVE;
|
|
var binding3;
|
|
var property;
|
|
var value5;
|
|
var getFileInfo;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var binding4;
|
|
var value9;
|
|
var getAttachmentPayload;
|
|
var name;
|
|
var value10;
|
|
var binding5;
|
|
var value11;
|
|
var getFileSize;
|
|
var uri;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var error;
|
|
var object2;
|
|
var filename;
|
|
var value15;
|
|
var value16;
|
|
exceptionLanding51: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = undefined;
|
|
value3 = environment.__proto__.__proto__;
|
|
binding = env2_1;
|
|
binding2 = env2_2;
|
|
value4 = binding(binding2[2]);
|
|
item = a0.item;
|
|
platform = item.platform;
|
|
binding = env2_0;
|
|
UploadPlatform = binding(binding2[3]).UploadPlatform;
|
|
REACT_NATIVE = UploadPlatform.REACT_NATIVE;
|
|
value4(platform === REACT_NATIVE, 'Upload must be in the React Native format');
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
property = binding3[4];
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
getFileInfo = value5.getFileInfo;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(getFileInfo, value5, [a0, a1]);
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
binding4 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
property = binding4[5];
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
getAttachmentPayload = value9.getAttachmentPayload;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
name = value7.name;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
value10 = Reflect.apply(getAttachmentPayload, value9, [a0, a1, name]);
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
reducibleJoin24: while (true) {
|
|
reduciblePort38: while (true) {
|
|
exceptionLanding37: while (true) {
|
|
try {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
break reducibleJoin24;
|
|
}
|
|
r4 = value;
|
|
break reduciblePort38;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
object2.file = value7;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
uri = value7.uri;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
object2.uri = uri;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
filename = value10.filename;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
value15 = filename != null;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
value16 = '';
|
|
reducibleJoin47: while (true) {
|
|
if (value15) {
|
|
r5 = filename;
|
|
break reducibleJoin47;
|
|
}
|
|
r5 = value16;
|
|
break reducibleJoin47;
|
|
}
|
|
try {
|
|
object2.name = r5;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
object2.fileSize = r4;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
return object2;
|
|
}
|
|
try {
|
|
try {
|
|
binding5 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding5[4];
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
try {
|
|
value11 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
try {
|
|
getFileSize = value11.getFileSize;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
try {
|
|
uri = value7.uri;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
try {
|
|
value12 = Reflect.apply(getFileSize, value11, [uri]);
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
yield value12;
|
|
try {
|
|
try {
|
|
value13 = undefined;
|
|
value14 = false;
|
|
} catch (error) {
|
|
break exceptionLanding37;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
if (value14) {
|
|
return value13;
|
|
}
|
|
r4 = value13;
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
object2.file = value7;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
uri = value7.uri;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
object2.uri = uri;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
filename = value10.filename;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
value15 = filename != null;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
value16 = '';
|
|
reducibleJoin47: while (true) {
|
|
if (value15) {
|
|
r5 = filename;
|
|
break reducibleJoin47;
|
|
}
|
|
r5 = value16;
|
|
break reducibleJoin47;
|
|
}
|
|
try {
|
|
object2.name = r5;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
try {
|
|
object2.fileSize = r4;
|
|
} catch (error) {
|
|
break exceptionLanding51;
|
|
}
|
|
return object2;
|
|
}
|
|
env2_4.error('Failed to get attachment file', error);
|
|
return value;
|
|
}
|
|
|
|
function* _fun40265(a0) { // fn#40265, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:688, offset: 0x010faf16, size: 65 bytes, params: 2, frame: 13
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
value = env2_0(env2_2[4]);
|
|
yield value.cancelGetFileInfo(a0);
|
|
}
|
|
}
|
|
|