327 lines
16 KiB
JavaScript
327 lines
16 KiB
JavaScript
/* Metro module 1040; source: unknown; dependencies: [5, 1041, 826] */
|
|
import * as Module00005Module from './module-00005.js'; /* Metro dependency 5 */
|
|
|
|
function _fun11043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1167:6, offset: 0x00d9f854, size: 93 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.makeFetchTransport = makeFetchTransport;
|
|
function makeFetchTransport(a0) { // fn#11044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1167:129, offset: 0x00d9f8b1, size: 170 bytes, params: 2, frame: 18
|
|
var value;
|
|
const env0_0 = a0;
|
|
if (arguments.length > 1) {
|
|
if (arguments[1] !== undefined) {
|
|
value = arguments[1];
|
|
} else {
|
|
value = require(1041) /* metro dependency 1041 */;
|
|
value = value.getNativeImplementation('fetch');
|
|
}
|
|
} else {
|
|
value = require(1041) /* metro dependency 1041 */;
|
|
value = value.getNativeImplementation('fetch');
|
|
}
|
|
value = require(826) /* metro dependency 826 */;
|
|
const createTransport = value.createTransport;
|
|
const moduleValue = require(826) /* metro dependency 826 */;
|
|
const makePromiseBuffer = moduleValue.makePromiseBuffer;
|
|
let bufferSize = a0.bufferSize;
|
|
bufferSize = !bufferSize ? 40 : bufferSize;
|
|
return Reflect.apply(createTransport, value, [a0, function(a0) {
|
|
return _makeRequest.apply(this, arguments);
|
|
}, Reflect.apply(makePromiseBuffer, moduleValue, [bufferSize])]);
|
|
function _makeRequest() { // fn#11045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1167:270, owner: makeFetchTransport._makeRequest, offset: 0x00d9f95b, size: 50 bytes, params: 1, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
return env1_2(_fun11047).apply(this, arguments);
|
|
function* _fun11047(a0) { // fn#11047, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1167:317, offset: 0x00d9f996, size: 395 bytes, params: 2, frame: 20
|
|
var r4;
|
|
var value;
|
|
var value2;
|
|
var body;
|
|
var length;
|
|
var binding;
|
|
var Object;
|
|
var assign;
|
|
var object;
|
|
var headers;
|
|
var value3;
|
|
var value4;
|
|
var fetchOptions;
|
|
var value5;
|
|
var url;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var status;
|
|
var object2;
|
|
var get;
|
|
var value9;
|
|
var value10;
|
|
var error;
|
|
var value11;
|
|
var binding2;
|
|
var property;
|
|
var value12;
|
|
var clearCachedImplementation;
|
|
exceptionSkip39: while (true) {
|
|
exceptionLanding39: while (true) {
|
|
exceptionSkip28: while (true) {
|
|
exceptionLanding28: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
body = a0.body;
|
|
length = body.length;
|
|
value = environment.__proto__.__proto__;
|
|
env2_2 += length;
|
|
binding = env2_3;
|
|
env2_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
body = a0.body;
|
|
headers = require.headers;
|
|
value3 = env2_2 <= 60000;
|
|
if (value3) {
|
|
value4 = env2_3 < 15;
|
|
r4 = value4;
|
|
} else {
|
|
r4 = value3;
|
|
}
|
|
fetchOptions = require.fetchOptions;
|
|
value5 = Reflect.apply(assign, Object, [{'body': null, 'method': 'POST',
|
|
'referrerPolicy': 'strict-origin',
|
|
body: body, headers: headers, keepalive: r4}, fetchOptions]);
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
url = require.url;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = dependencyMap(url, value5);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
yield value6;
|
|
try {
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
if (value8) {
|
|
env2_2 -= length;
|
|
binding = env2_3;
|
|
env2_3 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
|
|
return value7;
|
|
}
|
|
try {
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
status = value7.status;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
object.statusCode = status;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
headers = value7.headers;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
get = headers.get;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
value9 = Reflect.apply(get, headers, ['X-Sentry-Rate-Limits']);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
object2['x-sentry-rate-limits'] = value9;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
headers = value7.headers;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
get = headers.get;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
value10 = Reflect.apply(get, headers, ['Retry-After']);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
object2['retry-after'] = value10;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
try {
|
|
object.headers = object2;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
env2_2 -= length;
|
|
binding = env2_3;
|
|
env2_3 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
|
|
return object;
|
|
break exceptionSkip28;
|
|
}
|
|
value11 = environment.__proto__.__proto__.__proto__;
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
binding2 = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
property = binding2[1];
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
value12 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
clearCachedImplementation = value12.clearCachedImplementation;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
Reflect.apply(clearCachedImplementation, value12, ['fetch']);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
try {
|
|
throw error;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
break exceptionSkip28;
|
|
}
|
|
break exceptionSkip39;
|
|
}
|
|
env2_2 -= length;
|
|
binding = env2_3;
|
|
env2_3 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
|
|
throw error;
|
|
break exceptionSkip39;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun11043, 1040, [5, 1041, 826]) /* metro module 1040, dependencies: [5, 1041, 826] */;
|