231 lines
9.4 KiB
JavaScript
231 lines
9.4 KiB
JavaScript
/* Metro module 895; source: unknown; dependencies: [65, 832, 833, 857] */
|
|
import * as Module00065Module from './module-00065.js'; /* Metro dependency 65 */
|
|
import * as DEBUG_BUILDModule from './module-00832-DEBUG_BUILD.js'; /* Metro dependency 832 */
|
|
import * as Module00833Module from './module-00833.js'; /* Metro dependency 833 */
|
|
import * as Module00857Module from './module-00857.js'; /* Metro dependency 857 */
|
|
|
|
function _fun9673(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:6, offset: 0x00d6e9ad, size: 166 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const setupIntegration2 = setupIntegration;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.addIntegration = addIntegration;
|
|
exports.afterSetupIntegrations = function(a0, a1) {
|
|
var r6;
|
|
var value;
|
|
var afterAllSetup;
|
|
var error;
|
|
var iterator = a1[Symbol.iterator]();
|
|
var iterator2 = iterator.next;
|
|
var r2 = iterator;
|
|
var item2 = Reflect.apply(iterator2, r2, []);
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
reducibleJoin2: while (true) {
|
|
if (item2 === undefined) {
|
|
return undefined;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleLoop2: while (true) {
|
|
try {
|
|
value = item != null;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
reducibleJoin7: while (true) {
|
|
if (value) {
|
|
try {
|
|
afterAllSetup = item.afterAllSetup;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r6 = afterAllSetup;
|
|
break reducibleJoin7;
|
|
}
|
|
r6 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
reducibleJoin1: while (true) {
|
|
if (r6) {
|
|
try {
|
|
afterAllSetup = item.afterAllSetup;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(afterAllSetup, item, [a0]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin1;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin1;
|
|
}
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop2;
|
|
}
|
|
continue reducibleLoop2;
|
|
}
|
|
};
|
|
exports.defineIntegration = function(a0) {
|
|
return a0;
|
|
};
|
|
exports.getIntegrationsToSetup = getIntegrationsToSetup;
|
|
exports.installedIntegrations = [];
|
|
exports.setupIntegration = setupIntegration2;
|
|
exports.setupIntegrations = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
a1.forEach(_fun9685);
|
|
return {};
|
|
};
|
|
function setupIntegration(a0, a1, a2) { // fn#9674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:114, offset: 0x00d6ea53, size: 493 bytes, params: 4, frame: 17
|
|
var r3;
|
|
var binding;
|
|
var includes;
|
|
var Object;
|
|
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
|
|
const debug = (Module00833Module).debug;
|
|
const env0_0 = a0;
|
|
let name = a1.name;
|
|
if (a2[name]) {
|
|
if (DEBUG_BUILD) {
|
|
debug.log('Integration skipped because it was already installed: ' + a1.name);
|
|
}
|
|
} else {
|
|
name = a1.name;
|
|
a2[name] = a1;
|
|
binding = env0_3;
|
|
includes = binding.includes;
|
|
name = a1.name;
|
|
r3 = Reflect.apply(includes, binding, [name]) || typeof a1.setupOnce !== 'function';
|
|
if (!r3) {
|
|
a1.setupOnce();
|
|
binding = env0_3;
|
|
binding.push(a1.name);
|
|
}
|
|
r3 = a1.setup && typeof a1.setup === 'function';
|
|
if (r3) {
|
|
a1.setup(a0);
|
|
}
|
|
if (typeof a1.preprocessEvent === 'function') {
|
|
var env0_1 = a1.preprocessEvent.bind(a1);
|
|
a0.on('preprocessEvent', _fun9675);
|
|
}
|
|
if (typeof a1.processEvent === 'function') {
|
|
var env0_2 = a1.processEvent.bind(a1);
|
|
Object = global.Object;
|
|
a0.addEventProcessor(Object.assign(_fun9676, {id: a1.name}));
|
|
}
|
|
if (DEBUG_BUILD) {
|
|
debug.log('Integration installed: ' + a1.name);
|
|
}
|
|
}
|
|
function _fun9675(a0, a1) { // fn#9675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:511, offset: 0x00d6ec40, size: 28 bytes, params: 3, frame: 15
|
|
return env0_1(a0, a1, env0_0);
|
|
}
|
|
|
|
function _fun9676(a0, a1) { // fn#9676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:628, offset: 0x00d6ec5c, size: 28 bytes, params: 3, frame: 15
|
|
return env0_2(a0, a1, env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function addIntegration(a0) { // fn#9677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:789, offset: 0x00d6ec78, size: 157 bytes, params: 2, frame: 18
|
|
var debug;
|
|
const client = (Module00857Module).getClient();
|
|
if (client) {
|
|
client.addIntegration(a0);
|
|
} else if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
debug = (require(833) /* metro dependency 833 */).debug;
|
|
debug.warn('Cannot add integration "' + a0.name + '" because no SDK Client is available.');
|
|
}
|
|
}
|
|
|
|
function getIntegrationsToSetup({defaultIntegrations, integrations}) { // fn#9680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:1187, offset: 0x00d6ed64, size: 167 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var items2;
|
|
var value;
|
|
var concat;
|
|
var binding;
|
|
const r3 = defaultIntegrations || [];
|
|
r3.forEach(function(a0) {
|
|
a0.isDefaultInstance = true;
|
|
});
|
|
let Array = global.Array;
|
|
if (Array.isArray(integrations)) {
|
|
items2 = [];
|
|
concat = items2.concat;
|
|
binding = Module00065Module;
|
|
value = binding(r3);
|
|
value = Reflect.apply(concat, items2, [value, binding(integrations)]);
|
|
r2 = value;
|
|
} else if (typeof integrations !== 'function') {
|
|
r2 = r3;
|
|
} else {
|
|
value = integrations(r3);
|
|
Array = global.Array;
|
|
r2 = Array.isArray(value) ? value : [value];
|
|
}
|
|
return ((a0) => {
|
|
a0.forEach(_fun9683);
|
|
var Object = global.Object;
|
|
return Object.values({});
|
|
})(r2);
|
|
function filterDuplicates(a0) { // fn#9682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:1447, owner: getIntegrationsToSetup.filterDuplicates, offset: 0x00d6ee1a, size: 46 bytes, params: 2, frame: 12
|
|
a0.forEach(_fun9683);
|
|
const Object = global.Object;
|
|
return Object.values({});
|
|
function _fun9683(a0) { // fn#9683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:1503, offset: 0x00d6ee48, size: 58 bytes, params: 2, frame: 6
|
|
const name = a0.name;
|
|
const property = env0_0[name];
|
|
if (!(property && !property.isDefaultInstance && a0.isDefaultInstance)) {
|
|
env0_0[name] = a0;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function setupIntegrations(a0, a1) { // fn#9684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:1697, offset: 0x00d6ee82, size: 35 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
a1.forEach(_fun9685);
|
|
return {};
|
|
function _fun9685(a0) { // fn#9685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1022:1756, offset: 0x00d6eea5, size: 37 bytes, params: 2, frame: 15
|
|
var value;
|
|
if (a0) {
|
|
value = environment.__proto__;
|
|
setupIntegration(env0_0, a0, env0_1);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun9673, 895, [65, 832, 833, 857]) /* metro module 895, dependencies: [65, 832, 833, 857] */;
|