616 lines
18 KiB
React
616 lines
18 KiB
React
/* Metro module 4762; source: unknown; dependencies: [4763, 4764] */
|
|
function _fun41110(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4940:6, offset: 0x01114fe1, size: 136 bytes, params: 8, frame: 16
|
|
const isNaaResourceBlock = function(a0) {
|
|
return a0.type === 1028;
|
|
};
|
|
const getBlockPadding = function(a0) {
|
|
var value = 0;
|
|
return a0.size % 2 === value ? value : 1;
|
|
};
|
|
const getTagName_41116 = function(a0, a1, a2) {
|
|
var r2;
|
|
var r1;
|
|
var r0;
|
|
var value = a0;
|
|
if (value) {
|
|
if (typeof value === 'string') {
|
|
r1 = value;
|
|
} else {
|
|
if (typeof value.name === 'function') {
|
|
value = value.name(a2);
|
|
r2 = value;
|
|
} else {
|
|
r2 = value.name;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = 'undefined-' + a1;
|
|
}
|
|
return r0;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.default = {read: read_41118};
|
|
}
|
|
|
|
function getResourceBlock(a0, a1) { // fn#41111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4940:553, offset: 0x01115069, size: 184 bytes, params: 3, frame: 17
|
|
var r2;
|
|
if (a0.getUint32(a1, false) !== 943868237) {
|
|
throw new global.Error('Not an IPTC resource block.');
|
|
}
|
|
value = a0.getUint8(a1 + 4 + 2);
|
|
if (value % 2 !== 0) {
|
|
r2 = value;
|
|
} else {
|
|
value += 1;
|
|
r2 = value;
|
|
}
|
|
value = r2 + 1;
|
|
const object2 = {headerSize: 6 + value + 4};
|
|
object2.type = a0.getUint16(a1 + 4);
|
|
object2.size = a0.getUint32(a1 + 4 + 2 + value);
|
|
return object2;
|
|
}
|
|
|
|
function parseTags(a0, {size}, a2, a3) { // fn#41114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4940:883, offset: 0x0111514f, size: 380 bytes, params: 5, frame: 32
|
|
var r2;
|
|
var r11;
|
|
var r14;
|
|
var byteLength;
|
|
var value3;
|
|
var value4;
|
|
var tag;
|
|
var tagSize;
|
|
var encoding;
|
|
var name;
|
|
var repeatable;
|
|
var property;
|
|
var Array;
|
|
var name2;
|
|
var id;
|
|
var name3;
|
|
var name4;
|
|
var description;
|
|
var push;
|
|
let value = a2;
|
|
const object2 = {};
|
|
const value2 = value + size;
|
|
reducibleJoin14: while (true) {
|
|
if (!(value < value2)) {
|
|
break reducibleJoin14;
|
|
}
|
|
byteLength = a0.byteLength;
|
|
value3 = undefined;
|
|
value4 = environment;
|
|
if (!(value < byteLength)) {
|
|
break reducibleJoin14;
|
|
}
|
|
r2 = value3;
|
|
r11 = value;
|
|
reducibleLoop2: while (true) {
|
|
value = readTag_41115(a0, r11, object2, r2, a3);
|
|
tag = value.tag;
|
|
tagSize = value.tagSize;
|
|
if (tag === null) {
|
|
break reducibleJoin14;
|
|
}
|
|
reducibleJoin12: while (true) {
|
|
if (tag) {
|
|
reducibleJoin6: while (true) {
|
|
if ('encoding' in tag) {
|
|
encoding = tag.encoding;
|
|
r14 = encoding;
|
|
break reducibleJoin6;
|
|
}
|
|
r14 = r2;
|
|
break reducibleJoin6;
|
|
}
|
|
name = tag.name;
|
|
if (value3 !== object2[name]) {
|
|
repeatable = tag.repeatable;
|
|
if (value3 !== repeatable) {
|
|
name = tag.name;
|
|
property = object2[name];
|
|
Array = global.Array;
|
|
reducibleJoin10: while (true) {
|
|
if (property instanceof Array) {
|
|
break reducibleJoin10;
|
|
}
|
|
name = tag.name;
|
|
name2 = tag.name;
|
|
id = object2[name2].id;
|
|
name3 = tag.name;
|
|
value = object2[name3].value;
|
|
name4 = tag.name;
|
|
description = object2[name4].description;
|
|
object2[name] = [{id: id, value: value, description: description}];
|
|
break reducibleJoin10;
|
|
}
|
|
name = tag.name;
|
|
property = object2[name];
|
|
push = property.push;
|
|
id = tag.id;
|
|
value = tag.value;
|
|
description = tag.description;
|
|
Reflect.apply(push, property, [{id: id, value: value, description: description}]);
|
|
r2 = r14;
|
|
break reducibleJoin12;
|
|
}
|
|
}
|
|
name = tag.name;
|
|
id = tag.id;
|
|
value = tag.value;
|
|
description = tag.description;
|
|
object2[name] = {id: id, value: value, description: description};
|
|
r2 = r14;
|
|
break reducibleJoin12;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
value = r11 + (5 + tagSize);
|
|
if (value < value2) {
|
|
byteLength = a0.byteLength;
|
|
if (value < byteLength) {
|
|
r11 = value;
|
|
continue reducibleLoop2;
|
|
}
|
|
break reducibleJoin14;
|
|
}
|
|
break reducibleJoin14;
|
|
}
|
|
}
|
|
return object2;
|
|
}
|
|
|
|
function readTag_41115(a0, a1, a2, a3, a4) { // fn#41115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4940:1366, offset: 0x011152cb, size: 481 bytes, params: 6, frame: 24
|
|
var r0;
|
|
var r5;
|
|
var iptc;
|
|
var push;
|
|
var value6;
|
|
var repeatable;
|
|
var encoding_name;
|
|
var value8;
|
|
if (a0.getUint8(a1) !== 28) {
|
|
return {'tag': null, 'tagSize': 0};
|
|
}
|
|
uint16 = a0.getUint16(a1 + 1);
|
|
const uint162 = a0.getUint16(a1 + 3);
|
|
if (!a4) {
|
|
reducibleJoin4: while (true) {
|
|
if (!(importDefault(4763) /* metro dependency 4763 */).iptc[uint16]) {
|
|
return {tag: undefined, tagSize: uint162};
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
}
|
|
const value4 = a1 + 5;
|
|
const items = [];
|
|
const value5 = 0;
|
|
if (value5 < uint162) {
|
|
r0 = value5;
|
|
reducibleLoop5: while (true) {
|
|
push = items.push;
|
|
getUint8 = a0.getUint8;
|
|
Reflect.apply(push, items, [Reflect.apply(getUint8, a0, [value4 + r0])]);
|
|
value6 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
|
if (value6 < uint162) {
|
|
r0 = value6;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
const object3 = {id: uint16};
|
|
object3.name = getTagName_41116(importDefault(dependencyMap[value5]).iptc[uint16], uint16, items);
|
|
object3.value = items;
|
|
object3.description = getTagDescription(importDefault(dependencyMap[value5]).iptc[uint16], items, a2, a3);
|
|
let property = importDefault(dependencyMap[value5]).iptc[uint16];
|
|
reducibleJoin8: while (true) {
|
|
if (property) {
|
|
iptc = importDefault(dependencyMap[value5]).iptc;
|
|
repeatable = iptc[uint16].repeatable;
|
|
r5 = repeatable;
|
|
break reducibleJoin8;
|
|
}
|
|
r5 = property;
|
|
break reducibleJoin8;
|
|
}
|
|
reducibleJoin10: while (true) {
|
|
if (r5) {
|
|
object3.repeatable = true;
|
|
break reducibleJoin10;
|
|
}
|
|
break reducibleJoin10;
|
|
}
|
|
property = importDefault(dependencyMap[value5]).iptc[uint16];
|
|
reducibleJoin12: while (true) {
|
|
if (property) {
|
|
iptc = importDefault(dependencyMap[value5]).iptc;
|
|
encoding_name = iptc[uint16].encoding_name;
|
|
value8 = encoding_name !== undefined;
|
|
r5 = value8;
|
|
break reducibleJoin12;
|
|
}
|
|
r5 = property;
|
|
break reducibleJoin12;
|
|
}
|
|
reducibleJoin14: while (true) {
|
|
if (r5) {
|
|
iptc = importDefault(dependencyMap[value5]).iptc;
|
|
property = iptc[uint16];
|
|
encoding_name = property.encoding_name;
|
|
object3.encoding = Reflect.apply(encoding_name, property, [items]);
|
|
break reducibleJoin14;
|
|
}
|
|
break reducibleJoin14;
|
|
}
|
|
return {tag: object3, tagSize: uint162};
|
|
}
|
|
|
|
function getTagDescription(a0, a1, a2, a3) { // fn#41117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4940:2259, offset: 0x01115509, size: 124 bytes, params: 5, frame: 15
|
|
var r0;
|
|
var value4;
|
|
var error;
|
|
var Array;
|
|
let value = a0;
|
|
const value2 = a1;
|
|
if (value && value.description !== undefined) {
|
|
try {
|
|
value4 = value.description(value2, a2);
|
|
} catch (error) {
|
|
if (value) {
|
|
Array = global.Array;
|
|
value = value2 instanceof Array;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
value = environment;
|
|
value = importDefault(4764) /* metro dependency 4764 */;
|
|
value = value.decode(a3, value2);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
return value4;
|
|
}
|
|
r0 = value && value2 instanceof global.Array;
|
|
if (r0) {
|
|
value = importDefault(4764) /* metro dependency 4764 */;
|
|
value = value.decode(a3, value2);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function read_41118(a0, a1, a2) { // fn#41118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4940:104, offset: 0x01115585, size: 309 bytes, params: 4, frame: 23
|
|
var r11;
|
|
var Array;
|
|
var isArray;
|
|
var isArray2;
|
|
var value2;
|
|
var byteLength;
|
|
var value4;
|
|
var getResourceBlockBinding;
|
|
var isNaaResourceBlockBinding;
|
|
var isNaaResourceBlock2;
|
|
var headerSize;
|
|
var size;
|
|
var value5;
|
|
var getBlockPaddingBinding;
|
|
var value6;
|
|
var value7;
|
|
var Error;
|
|
var prototype;
|
|
var error;
|
|
var object2;
|
|
var parseTagsBinding;
|
|
var naaBlock;
|
|
var dataOffset;
|
|
var DataView;
|
|
var Uint8Array;
|
|
var from;
|
|
var buffer;
|
|
var dataView;
|
|
var length;
|
|
let value = a1;
|
|
try {
|
|
Array = global.Array;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
isArray = Array.isArray;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
isArray2 = Reflect.apply(isArray, Array, [a0]);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
if (isArray2) {
|
|
try {
|
|
parseTagsBinding = parseTags;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
DataView = global.DataView;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
Uint8Array = global.Uint8Array;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
from = Uint8Array.from;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = Reflect.apply(from, Uint8Array, [a0]);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
buffer = value.buffer;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
prototype = DataView.prototype;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
dataView = new DataView();
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = dataView instanceof Object ? dataView : value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
length = a0.length;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
object2.size = length;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = parseTagsBinding(value, object2, 0, a2);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
value2 = value + 12;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
byteLength = a0.byteLength;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value4 = value2 <= byteLength;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
if (value4) {
|
|
r11 = value;
|
|
while (true) {
|
|
try {
|
|
getResourceBlockBinding = getResourceBlock;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = getResourceBlockBinding(a0, r11);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
isNaaResourceBlockBinding = isNaaResourceBlock;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
isNaaResourceBlock2 = isNaaResourceBlockBinding(value);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
if (isNaaResourceBlock2) {
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
object2.naaBlock = value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
headerSize = value.headerSize;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = r11 + headerSize;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
object2.dataOffset = value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
parseTagsBinding = parseTags;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
naaBlock = object2.naaBlock;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
dataOffset = object2.dataOffset;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = parseTagsBinding(a0, naaBlock, dataOffset, a2);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
headerSize = value.headerSize;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
size = value.size;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value5 = headerSize + size;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
getBlockPaddingBinding = getBlockPadding;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = getBlockPaddingBinding(value);
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = value5 + value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = r11 + value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
byteLength = a0.byteLength;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value6 = value + 12;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value7 = value6 <= byteLength;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
if (value7) {
|
|
r11 = value;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
try {
|
|
Error = global.Error;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
prototype = Error.prototype;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
error = new Error('No IPTC NAA resource block.');
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = error instanceof Object ? error : value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
throw value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
} else {
|
|
try {
|
|
Error = global.Error;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
prototype = Error.prototype;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
error = new Error('No IPTC NAA resource block.');
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
value = error instanceof Object ? error : value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
try {
|
|
throw value;
|
|
} catch (error) {
|
|
return {};
|
|
}
|
|
}
|
|
}
|
|
|