Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,155 @@
|
||||
/* Metro module 4860; source: lib/AutomaticLifecycleManager.tsx; dependencies: [6, 7, 694, 2] */
|
||||
function _fun42445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:6, offset: 0x011399e0, size: 132 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const value = _fun42446();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/AutomaticLifecycleManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun42446() { // fn#42446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:118, offset: 0x01139a64, size: 124 bytes, params: 1, frame: 15
|
||||
return env0_3(AutomaticLifecycleManager, [{key: 'initialize', value: function() {
|
||||
var property = this.initializedCount;
|
||||
this.initializedCount = typeof property === 'bigint' ? property + 1n : +property + 1;
|
||||
if (!(this.initializedCount > 1)) {
|
||||
this._initialize();
|
||||
property = global.Object;
|
||||
property.entries(this.actions).forEach(_fun42449);
|
||||
property = this.stores;
|
||||
property.forEach(_fun42450);
|
||||
}
|
||||
}}, {key: 'terminate', value: value_42451}, {key: '_initialize', value: function() {
|
||||
}}, {key: '_terminate', value: function() {
|
||||
}}]);
|
||||
}
|
||||
|
||||
function AutomaticLifecycleManager() { // fn#42447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:139, offset: 0x01139ae0, size: 77 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, AutomaticLifecycleManager);
|
||||
this.initializedCount = 0;
|
||||
this.actions = {};
|
||||
const Map = global.Map;
|
||||
this.stores = new Map();
|
||||
}
|
||||
|
||||
function value_42448() { // fn#42448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:297, offset: 0x01139b2d, size: 108 bytes, params: 1, frame: 13
|
||||
var Object;
|
||||
const initializedCount = this.initializedCount;
|
||||
this.initializedCount = typeof initializedCount === 'bigint' ? initializedCount + 1n : +initializedCount + 1;
|
||||
if (!(this.initializedCount > 1)) {
|
||||
this._initialize();
|
||||
Object = global.Object;
|
||||
Object.entries(this.actions).forEach(function(a0) {
|
||||
var r1;
|
||||
var r2;
|
||||
var r5;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r4 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r5 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r5 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r5 = item;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
var defaultImport = importDefault(dependencyMap[2]);
|
||||
defaultImport.subscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
|
||||
return value;
|
||||
});
|
||||
this.stores.forEach(_fun42450);
|
||||
}
|
||||
}
|
||||
|
||||
function value_42451(a0) { // fn#42451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:568, offset: 0x01139c2a, size: 131 bytes, params: 2, frame: 13
|
||||
var Object;
|
||||
let initializedCount = this.initializedCount;
|
||||
if (!(initializedCount <= 0)) {
|
||||
if (a0) {
|
||||
this.initializedCount = 0;
|
||||
} else {
|
||||
initializedCount = this.initializedCount;
|
||||
this.initializedCount = typeof initializedCount === 'bigint' ? initializedCount - 1n : +initializedCount - 1;
|
||||
}
|
||||
initializedCount = this.initializedCount;
|
||||
if (initializedCount === 0) {
|
||||
this._terminate();
|
||||
Object = global.Object;
|
||||
Object.entries(this.actions).forEach(function(a0) {
|
||||
var r1;
|
||||
var r2;
|
||||
var r5;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r4 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r5 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r5 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r5 = item;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
var defaultImport = importDefault(dependencyMap[2]);
|
||||
defaultImport.unsubscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
|
||||
return value;
|
||||
});
|
||||
this.stores.forEach(_fun42453);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun42450(a0, a1) { // fn#42450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:504, offset: 0x01139c11, size: 25 bytes, params: 3, frame: 11
|
||||
a1.addChangeListener(a0);
|
||||
a0();
|
||||
}
|
||||
|
||||
function _fun42453(a0, a1) { // fn#42453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:832, offset: 0x01139d25, size: 21 bytes, params: 3, frame: 11
|
||||
a1.removeChangeListener(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 4268; source: lib/CachedEntriesMap.tsx; dependencies: [6, 7, 1944, 2] */
|
||||
function _fun36126(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:6, offset: 0x01083718, size: 132 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const value = _fun36127();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/CachedEntriesMap.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun36127() { // fn#36127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:118, offset: 0x0108379c, size: 216 bytes, params: 1, frame: 15
|
||||
return env0_3(CachedEntriesMap, [{key: 'keys', value: function() {
|
||||
return this.cachedKeys(this.version);
|
||||
}}, {key: 'values', value: function() {
|
||||
return this.cachedValues(this.version);
|
||||
}}, {key: 'entries', value: function() {
|
||||
return this.cachedEntries(this.version);
|
||||
}}, {key: 'size', value: function() {
|
||||
return this.data.size;
|
||||
}}, {key: 'get', value: function(a0) {
|
||||
return this.data.get(a0);
|
||||
}}, {key: 'set', value: function(a0, a1) {
|
||||
var property = this.data;
|
||||
if (property.get(a0) !== a1) {
|
||||
property = this.data;
|
||||
property.set(a0, a1);
|
||||
property = this.version;
|
||||
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
|
||||
}
|
||||
}}, {key: 'delete', value: function(a0) {
|
||||
var property = this.data;
|
||||
var value = property.delete(a0);
|
||||
if (value) {
|
||||
property = this.version;
|
||||
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
|
||||
}
|
||||
return value;
|
||||
}}, {key: 'clear', value: function() {
|
||||
var property;
|
||||
if (this.data.size !== 0) {
|
||||
property = this.data;
|
||||
property.clear();
|
||||
property = this.version;
|
||||
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function CachedEntriesMap() { // fn#36128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:139, offset: 0x01083874, size: 179 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
env1_2(this, CachedEntriesMap);
|
||||
this.version = 0;
|
||||
const Map = global.Map;
|
||||
const value3 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
const map = new Map();
|
||||
this.data = map instanceof Object ? map : value3;
|
||||
value = require(1944) /* metro dependency 1944: FunctionUtils */;
|
||||
this.cachedValues = value.cachedFunction(_fun36129);
|
||||
value = require(1944) /* metro dependency 1944: FunctionUtils */;
|
||||
this.cachedKeys = value.cachedFunction(_fun36130);
|
||||
value = require(1944) /* metro dependency 1944: FunctionUtils */;
|
||||
this.cachedEntries = value.cachedFunction(_fun36131);
|
||||
}
|
||||
|
||||
function _fun36129() { // fn#36129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:267, offset: 0x01083927, size: 41 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const data = env0_0.data;
|
||||
return Reflect.apply(from, Array, [data.values()]);
|
||||
}
|
||||
|
||||
function _fun36130() { // fn#36130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:344, offset: 0x01083950, size: 41 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const data = env0_0.data;
|
||||
return Reflect.apply(from, Array, [data.keys()]);
|
||||
}
|
||||
|
||||
function _fun36131() { // fn#36131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:422, offset: 0x01083979, size: 42 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const data = env0_0.data;
|
||||
return Reflect.apply(from, Array, [data.entries()]);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
/* Metro module 3767; source: lib/DiscordNative.tsx; dependencies: [2] */
|
||||
function _fun28554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3894:6, offset: 0x00f7d535, size: 90 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const DiscordNative = global.window.DiscordNative;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/DiscordNative.tsx');
|
||||
exports.default = DiscordNative;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 4817; source: lib/EnsureReceivedMessagesAddedInOrderExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun42030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4995:6, offset: 0x0112e59b, size: 145 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-04-ensure-received-messages-added-in-order', 'kind': 'user',
|
||||
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/EnsureReceivedMessagesAddedInOrderExperiment.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
/* Metro module 4393; source: lib/Frecency.tsx; dependencies: [6, 7, 22, 3738, 2] */
|
||||
function _fun37159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:6, offset: 0x0109d4e2, size: 150 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const DEFAULT_FRECENCY = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
return Math.ceil(a0 * (a1 / a2.numOfRecentUses));
|
||||
};
|
||||
const DEFAULT_WEIGHT = function(a0) {
|
||||
return a0 <= 3 ? 100 : a0 <= 15 ? 70 : a0 <= 30 ? 50 : a0 <= 45 ? 30 : a0 <= 80 ? 10 : 1;
|
||||
};
|
||||
const value = _fun37162();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Frecency.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun37162() { // fn#37162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:277, offset: 0x0109d5ed, size: 250 bytes, params: 1, frame: 15
|
||||
return env0_3(Frecency, [{key: 'overwriteHistory', value: function(a0, a1) {
|
||||
var value = a0;
|
||||
var env0_0 = this;
|
||||
var defaultImport = importDefault(dependencyMap[2]);
|
||||
this.usageHistory = defaultImport.mapValues(value ?? ({}), _fun37165);
|
||||
if (a1 != null) {
|
||||
a1.forEach(_fun37166);
|
||||
}
|
||||
this.markDirty();
|
||||
}}, {key: 'markDirty', value: function() {
|
||||
this.dirty = true;
|
||||
var version = this.version;
|
||||
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
|
||||
}}, {key: 'isDirty', value: function() {
|
||||
return this.dirty;
|
||||
}}, {key: 'track', value: value_37169}, {key: 'getEntry', value: function(a0) {
|
||||
var r0;
|
||||
var value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if (this.dirty) {
|
||||
this.compute();
|
||||
}
|
||||
r0 = global.Object.prototype.hasOwnProperty.call(this.usageHistory, a0) ? this.usageHistory[a0] : undefined;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'getScore', value: function(a0) {
|
||||
var value = this.getEntry(a0);
|
||||
var value2 = null;
|
||||
return value2 != value ? value.score : value2;
|
||||
}}, {key: 'getFrecency', value: function(a0) {
|
||||
var value = this.getEntry(a0);
|
||||
var value2 = null;
|
||||
return value2 != value ? value.frecency : value2;
|
||||
}}, {key: 'compute', value: value_37173}, {key: 'frequently', get: function() {
|
||||
if (this.dirty) {
|
||||
this.compute();
|
||||
}
|
||||
return this._frequently;
|
||||
}, set: function(a0) {
|
||||
this._frequently = a0;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function Frecency({computeBonus, computeWeight = DEFAULT_WEIGHT, computeFrecency, calculateMaxTotalUse, lookupKey, afterCompute, numFrequentlyItems, maxSamples}) { // fn#37163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:298, offset: 0x0109d6e7, size: 202 bytes, params: 2, frame: 21
|
||||
const r7 = computeFrecency !== undefined ? computeFrecency : DEFAULT_FRECENCY;
|
||||
calculateMaxTotalUse = !(calculateMaxTotalUse === undefined) && calculateMaxTotalUse;
|
||||
numFrequentlyItems = numFrequentlyItems === undefined ? 32 : numFrequentlyItems;
|
||||
maxSamples = maxSamples === undefined ? 10 : maxSamples;
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, Frecency);
|
||||
this.computeBonus = computeBonus;
|
||||
this.computeWeight = computeWeight;
|
||||
this.computeFrecency = r7;
|
||||
this.calculateMaxTotalUse = calculateMaxTotalUse;
|
||||
this.afterCompute = afterCompute;
|
||||
this.lookupKey = lookupKey;
|
||||
this.usageHistory = {};
|
||||
this.frequently = [];
|
||||
this.maxSamples = maxSamples;
|
||||
this.numFrequentlyItems = numFrequentlyItems;
|
||||
this.dirty = false;
|
||||
this.version = 0;
|
||||
}
|
||||
|
||||
function value_37164(a0, a1) { // fn#37164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:785, offset: 0x0109d7b1, size: 102 bytes, params: 3, frame: 18
|
||||
const value = a0;
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
this.usageHistory = defaultImport.mapValues(value ?? ({}), function(a0) {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r2);
|
||||
object['frecency'] = -1;
|
||||
return object;
|
||||
});
|
||||
if (a1 != null) {
|
||||
a1.forEach(_fun37166);
|
||||
}
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
function value_37169(a0) { // fn#37169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:1104, offset: 0x0109d886, size: 357 bytes, params: 2, frame: 21
|
||||
var r1;
|
||||
var r10;
|
||||
var r8;
|
||||
var r6;
|
||||
var r3;
|
||||
var object2;
|
||||
var Object;
|
||||
var hasOwn;
|
||||
var usageHistory;
|
||||
var property;
|
||||
var totalUses;
|
||||
var recentUses;
|
||||
var push;
|
||||
var sort;
|
||||
var Date;
|
||||
var now;
|
||||
var length;
|
||||
var maxSamples;
|
||||
var shift;
|
||||
var markDirty;
|
||||
let value = a1;
|
||||
const value2 = undefined;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value !== value2) {
|
||||
r1 = value;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
r1 = {};
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const timestamp = r1.timestamp;
|
||||
const usesSinceLastTrack = r1.usesSinceLastTrack;
|
||||
reducibleJoin17: while (true) {
|
||||
if (a0 == null) {
|
||||
break reducibleJoin17;
|
||||
}
|
||||
Object = global.Object;
|
||||
hasOwn = Object.hasOwn;
|
||||
usageHistory = this.usageHistory;
|
||||
reducibleJoin5: while (true) {
|
||||
if (Reflect.apply(hasOwn, Object, [usageHistory, a0])) {
|
||||
usageHistory = this.usageHistory;
|
||||
property = usageHistory[a0];
|
||||
r10 = property;
|
||||
break reducibleJoin5;
|
||||
}
|
||||
r10 = value2;
|
||||
break reducibleJoin5;
|
||||
}
|
||||
if (r10 == null) {
|
||||
object2 = {};
|
||||
value = 1;
|
||||
r8 = usesSinceLastTrack ?? value;
|
||||
object2.totalUses = r8;
|
||||
reducibleJoin15: while (true) {
|
||||
if (timestamp != null) {
|
||||
r6 = timestamp;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value = Reflect.apply(now, Date, []);
|
||||
r6 = value;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
object2.recentUses = [r6];
|
||||
object2.frecency = -1;
|
||||
object2.score = 0;
|
||||
r3 = object2;
|
||||
} else {
|
||||
r10.frecency = -1;
|
||||
totalUses = r10.totalUses;
|
||||
value = 1;
|
||||
r1 = usesSinceLastTrack ?? value;
|
||||
r10.totalUses = totalUses + r1;
|
||||
if (timestamp == null) {
|
||||
recentUses = r10.recentUses;
|
||||
push = recentUses.push;
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
Reflect.apply(push, recentUses, [Reflect.apply(now, Date, [])]);
|
||||
} else {
|
||||
recentUses = r10.recentUses;
|
||||
push = recentUses.push;
|
||||
Reflect.apply(push, recentUses, [timestamp]);
|
||||
recentUses = r10.recentUses;
|
||||
sort = recentUses.sort;
|
||||
Reflect.apply(sort, recentUses, []);
|
||||
}
|
||||
recentUses = r10.recentUses;
|
||||
length = recentUses.length;
|
||||
maxSamples = this.maxSamples;
|
||||
if (length > maxSamples) {
|
||||
reducibleLoop11: while (true) {
|
||||
recentUses = r10.recentUses;
|
||||
shift = recentUses.shift;
|
||||
Reflect.apply(shift, recentUses, []);
|
||||
recentUses = r10.recentUses;
|
||||
length = recentUses.length;
|
||||
maxSamples = this.maxSamples;
|
||||
if (length > maxSamples) {
|
||||
continue reducibleLoop11;
|
||||
}
|
||||
r3 = r10;
|
||||
break reducibleLoop11;
|
||||
}
|
||||
} else {
|
||||
r3 = r10;
|
||||
}
|
||||
}
|
||||
usageHistory = this.usageHistory;
|
||||
usageHistory[a0] = r3;
|
||||
markDirty = this.markDirty;
|
||||
Reflect.apply(markDirty, this, []);
|
||||
break reducibleJoin17;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_37173() { // fn#37173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:1928, offset: 0x0109da89, size: 307 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var defaultImport;
|
||||
var maxBy;
|
||||
var Object;
|
||||
var value4;
|
||||
let value = environment.__proto__;
|
||||
const env0_1 = (importDefault(3738) /* metro dependency 3738 */)();
|
||||
if (this.calculateMaxTotalUse) {
|
||||
defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
maxBy = defaultImport.maxBy;
|
||||
Object = global.Object;
|
||||
value4 = Reflect.apply(maxBy, defaultImport, [Object.values(this.usageHistory), function(a0) {
|
||||
return a0.totalUses;
|
||||
}]);
|
||||
}
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(this.usageHistory, _fun37175);
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value(this.usageHistory);
|
||||
value = value.map(_fun37177);
|
||||
value = value.filter(function(a0) {
|
||||
return a0 !== null;
|
||||
});
|
||||
value = value.sortBy(function(a0) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
if (value2) {
|
||||
r0 = value;
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = value;
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
} else {
|
||||
r0 = item;
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
return -r0;
|
||||
});
|
||||
value = value.map(function(a0) {
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var item2 = iterator.next();
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r0 = value2 ? value : item;
|
||||
if (!value2) {
|
||||
item2.return();
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
value = value.take(this.numFrequentlyItems);
|
||||
this.frequently = value.value();
|
||||
this.dirty = false;
|
||||
this.afterCompute(this.usageHistory, this._frequently);
|
||||
}
|
||||
|
||||
function _fun37166({key, timestamp}) { // fn#37166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:896, offset: 0x0109d834, size: 41 bytes, params: 2, frame: 14
|
||||
const binding = env0_0;
|
||||
return binding.track(key, {timestamp: timestamp});
|
||||
}
|
||||
|
||||
function _fun37175(a0, a1) { // fn#37175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2091, offset: 0x0109dbc7, size: 251 bytes, params: 3, frame: 21
|
||||
var environment;
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
const env0_0 = a0;
|
||||
const totalUses2 = a0.totalUses;
|
||||
const recentUses = a0.recentUses;
|
||||
if (a0.frecency === -1) {
|
||||
binding = env0_0;
|
||||
var env0_1 = binding.computeBonus(a1) / 100;
|
||||
a0.score = 0;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
value3 = undefined;
|
||||
(importDefault(22) /* metro dependency 22 */).forEach(recentUses, _fun37176);
|
||||
if (a0.score > 0) {
|
||||
if (a0.recentUses.length > 0) {
|
||||
binding = env0_0;
|
||||
a0.frecency = binding.computeFrecency(totalUses2, a0.score, {numOfRecentUses: recentUses.length,
|
||||
maxTotalUse: env0_2 == null ? value3 : env0_2.totalUses});
|
||||
}
|
||||
env0_0.usageHistory[a1] = a0;
|
||||
} else {
|
||||
delete env0_0.usageHistory[a1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun37177(a0, a1) { // fn#37177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2571, offset: 0x0109dd3f, size: 56 bytes, params: 3, frame: 11
|
||||
const value = env0_0.lookupKey(a1);
|
||||
const value2 = null;
|
||||
return value2 == value ? value2 : [value, a0.frecency];
|
||||
}
|
||||
|
||||
function _fun37176(a0, a1) { // fn#37176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2213, offset: 0x0109dcc2, size: 125 bytes, params: 3, frame: 16
|
||||
let value = environment.__proto__;
|
||||
if (a1 >= env1_0.maxSamples) {
|
||||
return false;
|
||||
}
|
||||
let binding = env1_0;
|
||||
const computeWeight = binding.computeWeight;
|
||||
const binding2 = env1_1;
|
||||
const diff = binding2.diff;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(3738) /* metro dependency 3738 */;
|
||||
value = value(a0);
|
||||
value = Reflect.apply(computeWeight, binding, [Reflect.apply(diff, binding2, [value, 'days'])]);
|
||||
binding = env0_0;
|
||||
binding.score = binding.score + env0_1 * value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
/* Metro module 7131; source: lib/Histogram.tsx; dependencies: [6, 7, 7132, 2] */
|
||||
function _fun57033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:6, offset: 0x013da7e7, size: 150 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_57036 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = _fun57037();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Histogram.tsx');
|
||||
exports.Histogram = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_57034(a0, a1) { // fn#57034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:120, offset: 0x013da87d, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun57035;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_57036(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_57036(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_57036(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun57035;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun57037() { // fn#57037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1036, offset: 0x013da9ef, size: 147 bytes, params: 1, frame: 15
|
||||
return env0_3(Histogram, [{key: 'getSamples', value: function() {
|
||||
return this.samples;
|
||||
}}, {key: 'addSample', value: value_57040}, {key: 'addSamples', value: value_57041}, {key: 'getReport',
|
||||
value: value_57043}, {key: 'getPercentile', value: function(a0) {
|
||||
return this.digest.percentile(a0 / 100) ?? 0;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function Histogram() { // fn#57038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1057, offset: 0x013daa82, size: 99 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, Histogram);
|
||||
const Digest = (require(7132) /* metro dependency 7132 */).Digest;
|
||||
this.digest = new Digest();
|
||||
this.total = 0;
|
||||
this.samples = 0;
|
||||
this.totalWeight = 0;
|
||||
}
|
||||
|
||||
function value_57040(a0) { // fn#57040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1259, offset: 0x013daaf0, size: 144 bytes, params: 2, frame: 17
|
||||
let value = a1;
|
||||
const r5 = value !== undefined ? value : 1;
|
||||
this.total = this.total + a0 * r5;
|
||||
this.totalWeight = this.totalWeight + r5;
|
||||
const samples = this.samples;
|
||||
this.samples = typeof samples === 'bigint' ? samples + 1n : +samples + 1;
|
||||
value = environment.__proto__;
|
||||
const TDigest = (require(7132) /* metro dependency 7132 */).TDigest;
|
||||
const push = TDigest.prototype.push;
|
||||
push.call(this.digest, a0, r5);
|
||||
this.digest.check_continuous();
|
||||
}
|
||||
|
||||
function value_57041(a0) { // fn#57041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1437, offset: 0x013dab80, size: 180 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
let value = a1;
|
||||
const r5 = value !== undefined ? value : 1;
|
||||
this.total = this.total + a0.reduce(_fun57042, 0);
|
||||
this.totalWeight = this.totalWeight + r5 * a0.length;
|
||||
this.samples = this.samples + a0.length;
|
||||
value = environment.__proto__;
|
||||
const TDigest = (require(7132) /* metro dependency 7132 */).TDigest;
|
||||
const push = TDigest.prototype.push;
|
||||
push.call(this.digest, a0, r5);
|
||||
this.digest.check_continuous();
|
||||
}
|
||||
|
||||
function value_57043() { // fn#57043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1654, offset: 0x013dac4b, size: 268 bytes, params: 1, frame: 20
|
||||
var r5;
|
||||
var r0;
|
||||
var value4;
|
||||
var digest;
|
||||
var value5;
|
||||
var value6;
|
||||
let value = a0;
|
||||
const r2 = value !== undefined ? value : [25, 50, 75, 90, 95];
|
||||
const object3 = {};
|
||||
value = environment.__proto__;
|
||||
value = _createForOfIteratorHelperLoose_57034(r2);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
const value3 = 0;
|
||||
if (!done) {
|
||||
r5 = value2;
|
||||
while (true) {
|
||||
value4 = r5.value;
|
||||
digest = this.digest;
|
||||
value5 = digest.percentile(value4 / 100);
|
||||
r0 = value5 ?? value3;
|
||||
object3[value4] = r0;
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r5 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const object4 = {};
|
||||
object4.min = this.digest.percentile(value3) ?? value3;
|
||||
object4.max = this.digest.percentile(1) ?? value3;
|
||||
object4.count = this.digest.size() ?? value3;
|
||||
object4.percentiles = object3;
|
||||
object4.mean = this.totalWeight > value3 ? this.total / this.totalWeight : value3;
|
||||
object4.samples = this.samples;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun57042(a0, a1) { // fn#57042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1475, offset: 0x013dac34, size: 23 bytes, params: 3, frame: 2
|
||||
return a0 + a1 * env0_0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 15629; source: lib/IdGenerator.tsx; dependencies: [2, 487] */
|
||||
function _fun119713(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15837:6, offset: 0x02516d01, size: 96 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/IdGenerator.tsx');
|
||||
const IdGenerator = (require(487) /* metro dependency 487: IdGenerator */).IdGenerator;
|
||||
exports.IdGenerator = IdGenerator;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/* Metro module 9209; source: lib/InviteQueue.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 672, 3, 7067, 4603, 5258, 2] */
|
||||
function _fun72057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:6, offset: 0x01d385ae, size: 332 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
const env0_8 = 1 * SECOND + 10;
|
||||
object2 = {GROUP_DM: 0};
|
||||
object2[0] = 'GROUP_DM';
|
||||
object2.USER = 1;
|
||||
object2[1] = 'USER';
|
||||
object2.CHANNEL = 2;
|
||||
object2[2] = 'CHANNEL';
|
||||
let value = importDefault(5258) /* metro dependency 5258: Queue */;
|
||||
value = _fun72061(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/InviteQueue.tsx');
|
||||
exports.default = value;
|
||||
exports.InvitePropertiesType = object2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_72058() { // fn#72058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:158, offset: 0x01d386fa, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_72058_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun72061(a0) { // fn#72061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:489, offset: 0x01d3875c, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = InviteQueue;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: '_sendInvite', value: value_72063}, {key: 'drain', value: value_72066}]);
|
||||
}
|
||||
|
||||
function InviteQueue() { // fn#72062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:501, offset: 0x01d387bd, size: 166 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, InviteQueue);
|
||||
const defaultImport = importDefault(3) /* metro dependency 3: Logger */;
|
||||
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
const defaultImport2 = new defaultImport('InviteQueue');
|
||||
const items2 = [defaultImport2 instanceof Object ? defaultImport2 : value3, env1_8];
|
||||
const value6 = env1_5(InviteQueue);
|
||||
return env1_4(this, _isNativeReflectConstruct_72058() ? global.Reflect.construct(value6, items2,
|
||||
env1_5(this).constructor) : value6.apply(this, items2));
|
||||
}
|
||||
|
||||
function value_72063({id}, a1, a2, a3, a4) { // fn#72063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:797, offset: 0x01d38863, size: 91 bytes, params: 6, frame: 19
|
||||
var environment;
|
||||
const env0_0 = a4;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
value = value.sendInvite(id, a1, a2, a3);
|
||||
value.then(_fun72064, _fun72065);
|
||||
}
|
||||
|
||||
function value_72066(a0, a1) { // fn#72066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:909, offset: 0x01d388e8, size: 199 bytes, params: 3, frame: 21
|
||||
var environment;
|
||||
const env0_1 = a0;
|
||||
const env0_2 = a1;
|
||||
const location = a0.location;
|
||||
const inviteAnalyticsMetadata = a0.inviteAnalyticsMetadata;
|
||||
const type = a0.type;
|
||||
let value = environment.__proto__;
|
||||
const GROUP_DM = env1_9.GROUP_DM;
|
||||
if (GROUP_DM === type) {
|
||||
this._sendInvite(a0.channel, a0.inviteKey, location, inviteAnalyticsMetadata, a1);
|
||||
} else if (env1_9.CHANNEL === type) {
|
||||
this._sendInvite(a0.channel, a0.inviteKey, location, inviteAnalyticsMetadata, a1);
|
||||
} else if (env1_9.USER === type) {
|
||||
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
value = value.ensurePrivateChannel(a0.user.id);
|
||||
value.then(_fun72067, function() {
|
||||
return require(null, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun72064() { // fn#72064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:854, offset: 0x01d388be, size: 21 bytes, params: 1, frame: 13
|
||||
return env0_0(null, true);
|
||||
}
|
||||
|
||||
function _fun72065() { // fn#72065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:871, offset: 0x01d388d3, size: 21 bytes, params: 1, frame: 13
|
||||
return env0_0(null, false);
|
||||
}
|
||||
|
||||
function _fun72067(a0) { // fn#72067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:1124, offset: 0x01d389af, size: 94 bytes, params: 2, frame: 19
|
||||
var binding;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = ChannelStore.getChannel(a0);
|
||||
if (value != null) {
|
||||
binding = env0_0;
|
||||
binding._sendInvite(value, env0_1.inviteKey, location, inviteAnalyticsMetadata, require);
|
||||
} else {
|
||||
require(null, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 12481; source: lib/KeybindModKeys.tsx; dependencies: [477, 2] */
|
||||
function _fun95017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12671:6, offset: 0x0212eccb, size: 251 bytes, params: 8, frame: 19
|
||||
var r4;
|
||||
var r3;
|
||||
var r1;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isMac()) {
|
||||
r4 = 'cmd';
|
||||
} else {
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isMacWeb();
|
||||
r4 = value ? 'cmd' : 'ctrl';
|
||||
}
|
||||
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isMac, value, [])) {
|
||||
r3 = 'opt';
|
||||
} else {
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isMacWeb();
|
||||
r3 = value ? 'opt' : 'alt';
|
||||
}
|
||||
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isMac, value, [])) {
|
||||
r1 = 'return';
|
||||
} else {
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isMacWeb();
|
||||
r1 = value ? 'return' : 'enter';
|
||||
}
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/KeybindModKeys.tsx');
|
||||
exports.modKey = r4;
|
||||
exports.altKey = r3;
|
||||
exports.returnKey = r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 4561; source: lib/LifecycleManager.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun38780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:6, offset: 0x010ca1de, size: 124 bytes, params: 8, frame: 18
|
||||
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 value = _fun38781();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/LifecycleManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun38781() { // fn#38781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:118, offset: 0x010ca25a, size: 78 bytes, params: 1, frame: 15
|
||||
return env0_1(LifecycleManager, [{key: 'initialize', value: function(a0) {
|
||||
var r4;
|
||||
var r6;
|
||||
var _initialize;
|
||||
var items;
|
||||
if (!this.isInitialized) {
|
||||
this.isInitialized = true;
|
||||
_initialize = this._initialize;
|
||||
items = [];
|
||||
arraySpread(items, copyRestArgs(0, r6), 0, r4);
|
||||
apply(_initialize, items, this, r4);
|
||||
}
|
||||
}}, {key: 'terminate', value: function() {
|
||||
if (this.isInitialized) {
|
||||
this.isInitialized = false;
|
||||
this._terminate();
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function LifecycleManager() { // fn#38782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:139, offset: 0x010ca2a8, size: 35 bytes, params: 1, frame: 13
|
||||
env1_0(this, LifecycleManager);
|
||||
this.isInitialized = false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/* Metro module 8359; source: lib/LimitedMap.tsx; dependencies: [6, 7, 15, 17, 102, 18, 162, 2] */
|
||||
function _fun66575(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:6, offset: 0x01c01092, size: 225 bytes, params: 8, frame: 19
|
||||
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 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(102) /* metro dependency 102 */;
|
||||
const env0_5 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(162) /* metro dependency 162 */;
|
||||
const Map = global.Map;
|
||||
value = value(Map);
|
||||
value = _fun66579(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/LimitedMap.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_66576() { // fn#66576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:159, offset: 0x01c01173, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_66576_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun66579(a0) { // fn#66579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:358, offset: 0x01c011d5, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = LimitedMap;
|
||||
env0_5(closure, a0);
|
||||
return env0_1(closure, [{key: 'set', value: value_66581}]);
|
||||
}
|
||||
|
||||
function LimitedMap(a0) { // fn#66580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:370, offset: 0x01c0121d, size: 117 bytes, params: 2, frame: 19
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, LimitedMap);
|
||||
const value3 = env1_3(LimitedMap);
|
||||
value = env1_2(this, _isNativeReflectConstruct_66576() ? global.Reflect.construct(value3, [],
|
||||
env1_3(this).constructor) : value3.apply(this, undefined));
|
||||
value.maxSize = a0;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_66581(a0, a1) { // fn#66581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:644, offset: 0x01c01292, size: 110 bytes, params: 3, frame: 17
|
||||
var value;
|
||||
if (this.size >= this.maxSize) {
|
||||
value = this.keys();
|
||||
value = value.next().value;
|
||||
this.delete(value);
|
||||
}
|
||||
return value_66581_superPropGet(LimitedMap, 'set', this, 3)([a0, a1]);
|
||||
}
|
||||
|
||||
function value_66581_superPropGet(a0, a1, a2, a3) { // fn#66582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:728, owner: value_66581._superPropGet, offset: 0x01c01300, size: 102 bytes, params: 5, frame: 18
|
||||
let value = a0;
|
||||
const env0_0 = a2;
|
||||
const binding = env2_4;
|
||||
value = env2_3(1 & 3 ? value.prototype : value);
|
||||
value = binding(value, 'set', a2);
|
||||
return 2 & 3 ? typeof value !== 'function' ? value : _fun66583 : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,523 @@
|
||||
/* Metro module 4862; source: lib/MessageQueue.tsx; dependencies: [29, 6, 7, 15, 17, 102, 18, 4649, 1226, 4401, 661, 4503, 672, 3, 507, 4863, 4872, 4873, 1909, 44, 4648, 4651, 4655, 5258, 2] */
|
||||
function _fun42457(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:6, offset: 0x01139e28, size: 591 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = isMessageDataSend;
|
||||
const closure2 = isMessageDataEdit;
|
||||
const env0_3 = ['channelId', 'analyticsLocation'];
|
||||
const env0_4 = ['channelId', 'analyticsLocation'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_5 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_8 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_9 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_10 = importDefault(102) /* metro dependency 102 */;
|
||||
const env0_11 = importDefault(18) /* metro dependency 18 */;
|
||||
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_15 = value.AbortCodes;
|
||||
const env0_16 = value.Endpoints;
|
||||
const env0_17 = value.AnalyticEvents;
|
||||
const env0_18 = (require(4503) /* metro dependency 4503: MessageConstants */).MESSAGE_HTTP_TIMEOUT_RETRY_OPTIONS;
|
||||
object2 = {SEND: 0};
|
||||
object2[0] = 'SEND';
|
||||
object2.EDIT = 1;
|
||||
object2[1] = 'EDIT';
|
||||
object2.COMMAND = 2;
|
||||
object2[2] = 'COMMAND';
|
||||
object2.SEND_ANNOUNCEMENT = 3;
|
||||
object2[3] = 'SEND_ANNOUNCEMENT';
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
let MINUTE = Millis.MINUTE;
|
||||
const items2 = [1 * MINUTE];
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
MINUTE = Millis.MINUTE;
|
||||
items2[1] = 5 * MINUTE;
|
||||
value = importDefault(5258) /* metro dependency 5258: Queue */;
|
||||
value = _fun42463(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/MessageQueue.tsx');
|
||||
exports.default = value;
|
||||
exports.MessageDataType = object2;
|
||||
exports.isMessageDataSend = closure;
|
||||
exports.isMessageDataEdit = closure2;
|
||||
exports.isMessageDataCommand = isMessageDataCommand;
|
||||
exports.getFailedMessageId = getFailedMessageId;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_42458() { // fn#42458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:382, offset: 0x0113a077, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_42458_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function isMessageDataSend(a0) { // fn#42461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:715, offset: 0x0113a0d5, size: 49 bytes, params: 2, frame: 4
|
||||
const type = a0.type;
|
||||
const SEND = env0_19.SEND;
|
||||
return type === SEND || a0.type === env0_19.SEND_ANNOUNCEMENT;
|
||||
}
|
||||
|
||||
function isMessageDataEdit({type}) { // fn#42462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:798, offset: 0x0113a106, size: 27 bytes, params: 2, frame: 2
|
||||
const EDIT = env0_19.EDIT;
|
||||
return type === EDIT;
|
||||
}
|
||||
|
||||
function _fun42463(a0) { // fn#42463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:915, offset: 0x0113a121, size: 306 bytes, params: 2, frame: 16
|
||||
const closure = MessageQueue_42464;
|
||||
env0_11(closure, a0);
|
||||
return env0_7(closure, [{key: 'isFull', value: function() {
|
||||
return this.queue.length >= this.maxSize;
|
||||
}}, {key: 'drain', value: value_42468}, {key: 'cancelRequest', value: function(a0) {
|
||||
this.logger.log('Cancel message send: ', a0);
|
||||
var value = this.requests.get(a0);
|
||||
if (value != null) {
|
||||
value.abort();
|
||||
}
|
||||
this.requests.delete(a0);
|
||||
this.cancelQueueMetricTimers(a0);
|
||||
}}, {key: 'cancelPendingSendRequests', value: value_42470}, {key: 'clear', value: value_42471},
|
||||
{key: 'startQueueMetricTimers', value: value_42476}, {key: 'cancelQueueMetricTimers', value: function(a0) {
|
||||
var value = this.analyticsTimeouts.get(a0);
|
||||
if (value != null) {
|
||||
value.forEach(global.clearTimeout);
|
||||
}
|
||||
this.analyticsTimeouts.delete(a0);
|
||||
}}, {key: 'createResponseHandler', value: function(a0, a1) {
|
||||
var env0_0 = this;
|
||||
var env0_1 = a0;
|
||||
var env0_2 = a1;
|
||||
return _fun42481;
|
||||
}}, {key: 'handleSend', value: value_42482}, {key: 'handleSendAnnouncement', value: value_42484},
|
||||
{key: 'handleCommand', value: value_42486}]);
|
||||
}
|
||||
|
||||
function isMessageDataCommand({type}) { // fn#42490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:6135, offset: 0x0113afab, size: 27 bytes, params: 2, frame: 2
|
||||
const COMMAND = env0_19.COMMAND;
|
||||
return type === COMMAND;
|
||||
}
|
||||
|
||||
function getFailedMessageId(a0) { // fn#42491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:6217, offset: 0x0113afc6, size: 69 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var message;
|
||||
var isMessageDataEdit2;
|
||||
if (isMessageDataSend(a0)) {
|
||||
r0 = a0.message.nonce;
|
||||
} else {
|
||||
isMessageDataEdit2 = isMessageDataEdit(a0);
|
||||
message = a0.message;
|
||||
r0 = isMessageDataEdit2 ? message.messageId : message.data.id;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MessageQueue_42464() { // fn#42464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:927, offset: 0x0113a253, size: 261 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
let value = a0;
|
||||
const r2 = value !== undefined ? value : 5;
|
||||
value = environment.__proto__;
|
||||
env1_6(this, MessageQueue_42464);
|
||||
const defaultImport = importDefault(3) /* metro dependency 3: Logger */;
|
||||
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
const defaultImport2 = new defaultImport('MessageQueue');
|
||||
const items2 = [defaultImport2 instanceof Object ? defaultImport2 : value3];
|
||||
const value6 = env1_9(MessageQueue_42464);
|
||||
value = env1_8(this, _isNativeReflectConstruct_42458() ? global.Reflect.construct(value6, items2,
|
||||
env1_9(this).constructor) : value6.apply(this, items2));
|
||||
value.maxSize = r2;
|
||||
let Map = global.Map;
|
||||
const value7 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
let map = new Map();
|
||||
value.requests = map instanceof Object ? map : value7;
|
||||
Map = global.Map;
|
||||
const value9 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
value.analyticsTimeouts = map instanceof Object ? map : value9;
|
||||
value.handleEdit = handleEdit_42465;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_42468(a0, a1) { // fn#42468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:1692, offset: 0x0113a482, size: 184 bytes, params: 3, frame: 16
|
||||
const logger = this.logger;
|
||||
const log = logger.log;
|
||||
let type = a0.type;
|
||||
Reflect.apply(log, logger, ['Draining Message Queue with: ', type]);
|
||||
type = a0.type;
|
||||
const SEND = env1_19.SEND;
|
||||
if (SEND === type) {
|
||||
this.handleSend(a0.message, a1);
|
||||
} else if (env1_19.SEND_ANNOUNCEMENT === type) {
|
||||
this.handleSendAnnouncement(a0.message, a1);
|
||||
} else if (env1_19.EDIT === type) {
|
||||
this.handleEdit(a0.message, a1);
|
||||
} else if (env1_19.COMMAND === type) {
|
||||
this.handleCommand(a0.message, a1);
|
||||
}
|
||||
}
|
||||
|
||||
function value_42470(a0) { // fn#42470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2220, offset: 0x0113a597, size: 201 bytes, params: 2, frame: 20
|
||||
var r9;
|
||||
var shift;
|
||||
var value2;
|
||||
var message;
|
||||
var type;
|
||||
var SEND;
|
||||
var message2;
|
||||
var channelId;
|
||||
var push;
|
||||
const items4 = [];
|
||||
const items2 = [];
|
||||
let queue = this.queue;
|
||||
let length = queue.length;
|
||||
if (length > 0) {
|
||||
reducibleLoop1: while (true) {
|
||||
queue = this.queue;
|
||||
shift = queue.shift;
|
||||
value2 = Reflect.apply(shift, queue, []);
|
||||
message = value2.message;
|
||||
type = message.type;
|
||||
SEND = env1_19.SEND;
|
||||
reducibleJoin5: while (true) {
|
||||
reducibleJoin3: while (true) {
|
||||
if (type !== SEND) {
|
||||
break reducibleJoin3;
|
||||
}
|
||||
message2 = message.message;
|
||||
channelId = message2.channelId;
|
||||
if (channelId === a0) {
|
||||
push = items4.push;
|
||||
message = message.message;
|
||||
Reflect.apply(push, items4, [message]);
|
||||
break reducibleJoin5;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
push = items2.push;
|
||||
Reflect.apply(push, items2, [value2]);
|
||||
break reducibleJoin5;
|
||||
}
|
||||
queue = this.queue;
|
||||
length = queue.length;
|
||||
if (length > 0) {
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
r9 = type;
|
||||
break reducibleLoop1;
|
||||
}
|
||||
}
|
||||
queue = this.queue;
|
||||
push = queue.push;
|
||||
const items3 = [];
|
||||
arraySpread(items3, items2, 0, r9);
|
||||
apply(push, items3, queue, r9);
|
||||
const logger = this.logger;
|
||||
logger.log('Cancel pending send requests', items4.length);
|
||||
return items4;
|
||||
}
|
||||
|
||||
function value_42471() { // fn#42471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2487, offset: 0x0113a660, size: 108 bytes, params: 1, frame: 17
|
||||
this.requests.forEach(function(a0) {
|
||||
return a0.abort();
|
||||
});
|
||||
this.requests.clear();
|
||||
this.analyticsTimeouts.forEach(_fun42473);
|
||||
value_42471_superPropGet(MessageQueue_42464, 'clear', this, 3)([]);
|
||||
}
|
||||
|
||||
function value_42476(a0) { // fn#42476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2837, offset: 0x0113a756, size: 51 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
this.analyticsTimeouts.set(a0, env1_20.map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return global.setTimeout(_fun42478, a0);
|
||||
}));
|
||||
}
|
||||
|
||||
function value_42480(a0, a1) { // fn#42480, offset: 0x0113a82c, size: 30 bytes, params: 3, frame: 2
|
||||
const env0_1 = a0;
|
||||
const env0_2 = a1;
|
||||
return _fun42481;
|
||||
}
|
||||
|
||||
function value_42482(a0, a1) { // fn#42482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:3593, offset: 0x0113a96d, size: 460 bytes, params: 3, frame: 25
|
||||
const env0_1 = a0;
|
||||
const channelId = a0.channelId;
|
||||
const analyticsLocation = a0.analyticsLocation;
|
||||
const binding = env1_5;
|
||||
const value2 = undefined;
|
||||
const value3 = binding(a0, env1_3);
|
||||
const r7 = (importDefault(4872) /* metro dependency 4872: getOverlayMessageAnaylticsLocationNative */)() ?? analyticsLocation;
|
||||
const r10 = r7 != null ? {location: r7} : value2;
|
||||
const signalStrength = (require(4873) /* metro dependency 4873: NetStatsAndroid */).getSignalStrength();
|
||||
const object2 = {};
|
||||
object2.mobile_network_type = NetworkStore.getType();
|
||||
copyDataProperties(object2, value3, channelId);
|
||||
copyDataProperties(object2, signalStrength != null && ({signal_strength: signalStrength}), channelId);
|
||||
const get = DevSettingsStore.get;
|
||||
if (Reflect.apply(get, DevSettingsStore, ['send_fail_100'])) {
|
||||
this.logger.log('Skipping message send because send_fail_100 is enabled');
|
||||
a1(null, {'ok': false, 'hasErr': false, 'status': 500, 'headers': null, 'body': '{}',
|
||||
'text': 'Simulated failure',
|
||||
headers: {}});
|
||||
} else {
|
||||
var responseHandler = this.createResponseHandler(a0.nonce, a1);
|
||||
var AbortController = global.AbortController;
|
||||
var abortController = new AbortController();
|
||||
this.startQueueMetricTimers(a0.nonce);
|
||||
var HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
var post = HTTP.post;
|
||||
var object4 = {};
|
||||
object4.url = Endpoints.MESSAGES(channelId);
|
||||
object4.body = object2;
|
||||
object4.context = r10;
|
||||
object4.oldFormErrors = true;
|
||||
copyDataProperties(object4, MESSAGE_HTTP_TIMEOUT_RETRY_OPTIONS, channelId);
|
||||
object4['signal'] = abortController.signal;
|
||||
object4['rejectWithError'] = true;
|
||||
object4['onRequestCreated'] = value_42482OnRequestCreated;
|
||||
Reflect.apply(post, HTTP, [object4, responseHandler]);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_42484(a0, a1) { // fn#42484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:4340, offset: 0x0113ab73, size: 460 bytes, params: 3, frame: 25
|
||||
const env0_1 = a0;
|
||||
const channelId = a0.channelId;
|
||||
const analyticsLocation = a0.analyticsLocation;
|
||||
const binding = env1_5;
|
||||
const value2 = undefined;
|
||||
const value3 = binding(a0, env1_4);
|
||||
const r7 = (importDefault(4872) /* metro dependency 4872: getOverlayMessageAnaylticsLocationNative */)() ?? analyticsLocation;
|
||||
const r10 = r7 != null ? {location: r7} : value2;
|
||||
const signalStrength = (require(4873) /* metro dependency 4873: NetStatsAndroid */).getSignalStrength();
|
||||
const object2 = {};
|
||||
object2.mobile_network_type = NetworkStore.getType();
|
||||
copyDataProperties(object2, value3, channelId);
|
||||
copyDataProperties(object2, signalStrength != null && ({signal_strength: signalStrength}), channelId);
|
||||
const get = DevSettingsStore.get;
|
||||
if (Reflect.apply(get, DevSettingsStore, ['send_fail_100'])) {
|
||||
this.logger.log('Skipping message send because send_fail_100 is enabled');
|
||||
a1(null, {'ok': false, 'hasErr': false, 'status': 500, 'headers': null, 'body': '{}',
|
||||
'text': 'Simulated failure',
|
||||
headers: {}});
|
||||
} else {
|
||||
var responseHandler = this.createResponseHandler(a0.nonce, a1);
|
||||
var AbortController = global.AbortController;
|
||||
var abortController = new AbortController();
|
||||
this.startQueueMetricTimers(a0.nonce);
|
||||
var HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
var post = HTTP.post;
|
||||
var object4 = {};
|
||||
object4.url = Endpoints.MESSAGES_ANNOUNCEMENT(channelId);
|
||||
object4.body = object2;
|
||||
object4.context = r10;
|
||||
object4.oldFormErrors = true;
|
||||
copyDataProperties(object4, MESSAGE_HTTP_TIMEOUT_RETRY_OPTIONS, channelId);
|
||||
object4['signal'] = abortController.signal;
|
||||
object4['rejectWithError'] = true;
|
||||
object4['onRequestCreated'] = value_42484OnRequestCreated;
|
||||
Reflect.apply(post, HTTP, [object4, responseHandler]);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_42486({applicationId, guildId, channelId, data, nonce, attachments, maxSizeCallback, analytics_location, sectionName, source}, a1) { // fn#42486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:5091, offset: 0x0113ad3f, size: 346 bytes, params: 3, frame: 26
|
||||
const object2 = {};
|
||||
const InteractionTypes = (require(1909) /* metro dependency 1909: Server */).InteractionTypes;
|
||||
const APPLICATION_COMMAND = InteractionTypes.APPLICATION_COMMAND;
|
||||
object2.type = APPLICATION_COMMAND;
|
||||
object2.application_id = applicationId;
|
||||
object2.guild_id = guildId;
|
||||
object2.channel_id = channelId;
|
||||
object2.session_id = AuthenticationStore.getSessionId();
|
||||
object2.data = data;
|
||||
object2.nonce = nonce;
|
||||
object2.analytics_location = analytics_location;
|
||||
object2.section_name = sectionName;
|
||||
object2.source = source;
|
||||
if (attachments != null) {
|
||||
object2.data.attachments = attachments.map(_fun42487);
|
||||
}
|
||||
const AbortController = global.AbortController;
|
||||
const abortController = new AbortController();
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const post = HTTP.post;
|
||||
const INTERACTIONS = Endpoints.INTERACTIONS;
|
||||
Reflect.apply(post, HTTP, [{url: INTERACTIONS, body: object2, signal: abortController.signal, rejectWithError: true,
|
||||
onRequestCreated: onRequestCreated}, this.createResponseHandler(nonce, a1)]);
|
||||
}
|
||||
|
||||
function MessageQueue_42464HandleEdit(a0, a1) { // fn#42465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:1245, owner: MessageQueue_42464.handleEdit, offset: 0x0113a358, size: 233 bytes, params: 3, frame: 21
|
||||
const channelId = a0.channelId;
|
||||
const messageId = a0.messageId;
|
||||
const env0_0 = messageId;
|
||||
const isCrossposted = a0.isCrossposted;
|
||||
let object2 = {'channelId': 0, 'messageId': 0, 'isCrossposted': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, channelId);
|
||||
const AbortController = global.AbortController;
|
||||
const abortController = new AbortController();
|
||||
const responseHandler = env0_0.createResponseHandler(messageId, a1);
|
||||
object2 = {'url': null, 'body': null, 'retries': 1, 'oldFormErrors': true, 'signal': null, 'rejectWithError': true};
|
||||
object2.url = Endpoints.MESSAGE(channelId, messageId);
|
||||
object2.body = value;
|
||||
object2.signal = abortController.signal;
|
||||
object2.onRequestCreated = onRequestCreated;
|
||||
if (isCrossposted) {
|
||||
object2.failImmediatelyWhenRateLimited = true;
|
||||
}
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
HTTP.patch(object2, responseHandler);
|
||||
}
|
||||
|
||||
function _fun42473(a0, a1) { // fn#42473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2590, offset: 0x0113a6db, size: 23 bytes, params: 3, frame: 11
|
||||
return env0_0.cancelQueueMetricTimers(a1);
|
||||
}
|
||||
|
||||
function value_42471_superPropGet(a0, a1, a2, a3) { // fn#42474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2631, owner: value_42471._superPropGet, offset: 0x0113a6f2, size: 100 bytes, params: 5, frame: 18
|
||||
let value = a0;
|
||||
const env0_0 = a2;
|
||||
const binding = env2_10;
|
||||
value = env2_9(1 & 3 ? value.prototype : value);
|
||||
value = binding(value, 'clear', a2);
|
||||
return 2 & 3 ? typeof value !== 'function' ? value : _fun42475 : value;
|
||||
}
|
||||
|
||||
function _fun42477(a0) { // fn#42477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2862, offset: 0x0113a789, size: 32 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
return global.setTimeout(_fun42478, a0);
|
||||
}
|
||||
|
||||
function _fun42481(a0) { // fn#42481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:3208, offset: 0x0113a84a, size: 291 bytes, params: 2, frame: 19
|
||||
var binding;
|
||||
var requests;
|
||||
var binding2;
|
||||
var code;
|
||||
var value2;
|
||||
var int;
|
||||
var object2;
|
||||
if (env0_1 != null) {
|
||||
binding = env0_0;
|
||||
requests = binding.requests;
|
||||
binding2 = env0_1;
|
||||
requests.delete(binding2);
|
||||
binding.cancelQueueMetricTimers(binding2);
|
||||
}
|
||||
if (a0.hasErr) {
|
||||
return require(null, a0);
|
||||
}
|
||||
if (a0.body == null) {
|
||||
if (a0.status === 429) {
|
||||
int = global.parseInt(a0.headers['retry-after']);
|
||||
if (global.isNaN(int)) {
|
||||
require(null, a0);
|
||||
} else {
|
||||
object2 = {};
|
||||
value = environment.__proto__.__proto__;
|
||||
object2.retryAfter = int * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
|
||||
require(object2);
|
||||
}
|
||||
} else {
|
||||
require(null, a0);
|
||||
}
|
||||
} else {
|
||||
code = a0.body.code;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
if (code === AbortCodes.SLOWMODE_RATE_LIMITED) {
|
||||
require(null, a0);
|
||||
} else if (a0.body.code !== AbortCodes.CHANNEL_FOLLOWING_EDIT_RATE_LIMITED) {
|
||||
if (a0.status === 429) {
|
||||
int = global.parseInt(a0.headers['retry-after']);
|
||||
if (global.isNaN(int)) {
|
||||
require(null, a0);
|
||||
} else {
|
||||
object2 = {};
|
||||
value = environment.__proto__.__proto__;
|
||||
object2.retryAfter = int * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
|
||||
require(object2);
|
||||
}
|
||||
} else {
|
||||
require(null, a0);
|
||||
}
|
||||
} else {
|
||||
require(null, a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_42482OnRequestCreated() { // fn#42483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:4248, owner: value_42482.onRequestCreated, offset: 0x0113ab39, size: 58 bytes, params: 1, frame: 13
|
||||
var requests;
|
||||
if (env0_1.nonce != null) {
|
||||
requests = env0_0.requests;
|
||||
requests.set(env0_1.nonce, env0_2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun42487(a0, a1) { // fn#42487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:5459, offset: 0x0113ae99, size: 106 bytes, params: 3, frame: 16
|
||||
const value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
const status = a0.status;
|
||||
const CloudUploadStatus = (require(4648) /* metro dependency 4648: CloudUpload */).CloudUploadStatus;
|
||||
const COMPLETED = CloudUploadStatus.COMPLETED;
|
||||
defaultImport(status === COMPLETED, 'Uploads must be staged before trying to send a message');
|
||||
return (require(4651) /* metro dependency 4651: UploadUtils */).getAttachmentPayload(a0, a1);
|
||||
}
|
||||
|
||||
function value_42486OnRequestCreated(a0) { // fn#42488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:5748, owner: value_42486.onRequestCreated, offset: 0x0113af03, size: 62 bytes, params: 2, frame: 14
|
||||
const requests = env0_0.requests;
|
||||
requests.set(nonce, env0_4);
|
||||
a0.on('progress', _fun42489);
|
||||
}
|
||||
|
||||
function handleEditOnRequestCreated() { // fn#42466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:1463, owner: MessageQueue_42464.handleEdit.onRequestCreated, offset: 0x0113a441, size: 39 bytes, params: 1, frame: 13
|
||||
const requests = env1_0.requests;
|
||||
requests.set(messageId, env0_1);
|
||||
}
|
||||
|
||||
function _fun42478() { // fn#42478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:2877, offset: 0x0113a7a9, size: 65 bytes, params: 1, frame: 15
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const SEND_MESSAGE_QUEUED = AnalyticEvents.SEND_MESSAGE_QUEUED;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [SEND_MESSAGE_QUEUED, {queued_duration_ms: env0_0}]);
|
||||
}
|
||||
|
||||
function _fun42489({total}) { // fn#42489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5040:5792, offset: 0x0113af41, size: 106 bytes, params: 2, frame: 15
|
||||
var binding;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = Reflect.apply((require(4655) /* metro dependency 4655: FileUtils */).maxFileSize, value, [guildId]);
|
||||
if (total != null && total > value) {
|
||||
binding = env1_0;
|
||||
binding.cancelRequest(nonce);
|
||||
if (maxSizeCallback != null) {
|
||||
maxSizeCallback(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/* Metro module 15269; source: lib/ModalRegistry.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun116753(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:6, offset: 0x02495c4e, size: 148 bytes, params: 8, frame: 18
|
||||
const _arrayLikeToArray_116756 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
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 */;
|
||||
let value = _fun116757();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/ModalRegistry.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_116754(a0, a1) { // fn#116754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:120, offset: 0x02495ce2, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun116755;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_116756(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_116756(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_116756(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun116755;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun116757() { // fn#116757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1036, offset: 0x02495e56, size: 88 bytes, params: 1, frame: 15
|
||||
return env0_1(ModalRegistry, [{key: 'getStores', value: function() {
|
||||
return this.stores;
|
||||
}}, {key: 'getOpenModal', value: value_116760}]);
|
||||
}
|
||||
|
||||
function ModalRegistry(a0) { // fn#116758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1057, offset: 0x02495eae, size: 184 bytes, params: 2, frame: 20
|
||||
var r5;
|
||||
var r8;
|
||||
var value7;
|
||||
var stores;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var add;
|
||||
var value11;
|
||||
var value12;
|
||||
env1_0(this, ModalRegistry);
|
||||
this.modals = a0;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const value5 = _createForOfIteratorHelperLoose_116754(a0);
|
||||
const value6 = value5();
|
||||
let done = value6.done;
|
||||
if (!done) {
|
||||
r5 = value6;
|
||||
reducibleLoop1: while (true) {
|
||||
_createForOfIteratorHelperLoose_116754Binding = _createForOfIteratorHelperLoose_116754;
|
||||
value7 = r5.value;
|
||||
stores = value7.stores;
|
||||
value8 = _createForOfIteratorHelperLoose_116754Binding(stores);
|
||||
value9 = value8();
|
||||
done = value9.done;
|
||||
if (!done) {
|
||||
r8 = value9;
|
||||
reducibleLoop2: while (true) {
|
||||
value10 = r8.value;
|
||||
add = set.add;
|
||||
Reflect.apply(add, set, [value10]);
|
||||
value11 = value8();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break reducibleLoop2;
|
||||
}
|
||||
r8 = value11;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
value12 = value5();
|
||||
done = value12.done;
|
||||
if (done) {
|
||||
break reducibleLoop1;
|
||||
}
|
||||
r5 = value12;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
const Array = global.Array;
|
||||
this.stores = Array.from(set);
|
||||
}
|
||||
|
||||
function value_116760() { // fn#116760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1439, offset: 0x02495f71, size: 199 bytes, params: 1, frame: 13
|
||||
const index = this.modals.findIndex(function(a0) {
|
||||
return a0.isOpen();
|
||||
});
|
||||
if (index === -1) {
|
||||
return null;
|
||||
}
|
||||
const property = this.modals[index];
|
||||
const getProps = property.getProps;
|
||||
let r1 = getProps == null ? undefined : property.getProps();
|
||||
r1 = r1 ?? ({});
|
||||
const object2 = {key: index};
|
||||
object2.component = property.getComponent();
|
||||
object2.props = r1;
|
||||
object2.closable = property.closable == null || property.closable;
|
||||
object2.backdropInstant = property.backdropInstant != null && property.backdropInstant;
|
||||
object2.backdropStyle = property.backdropStyle;
|
||||
object2.disableAnimation = property.disableAnimation != null && property.disableAnimation;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* Metro module 3787; source: lib/MuteTimers.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun28791(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:6, offset: 0x00f8288a, size: 146 bytes, params: 8, frame: 18
|
||||
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 value = _fun28792();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/MuteTimers.tsx');
|
||||
exports.default = value;
|
||||
exports.computeIsMuted = function({muted, mute_config}) {
|
||||
var r1;
|
||||
var r0;
|
||||
var end_time;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
if (muted) {
|
||||
r1 = mute_config == null || mute_config.end_time == null;
|
||||
if (!r1) {
|
||||
muted = global.Date;
|
||||
end_time = mute_config.end_time;
|
||||
value2 = new muted();
|
||||
muted = global.Date;
|
||||
value3 = Object.create(muted.prototype, {constructor: {value: muted}});
|
||||
value4 = new muted();
|
||||
value2 = value2 >= (value4 instanceof Object ? value4 : value3);
|
||||
r1 = value2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = !!muted;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.isTemporarilyMuted = function({muted, mute_config}) {
|
||||
var r0;
|
||||
var end_time;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
r0 = (muted ? mute_config != null : !!muted) && mute_config.end_time != null;
|
||||
if (r0) {
|
||||
muted = global.Date;
|
||||
end_time = mute_config.end_time;
|
||||
value2 = new muted();
|
||||
muted = global.Date;
|
||||
value3 = Object.create(muted.prototype, {constructor: {value: muted}});
|
||||
value4 = new muted();
|
||||
value2 = value2 >= (value4 instanceof Object ? value4 : value3);
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
}
|
||||
|
||||
function _fun28792() { // fn#28792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:122, offset: 0x00f8291c, size: 101 bytes, params: 1, frame: 15
|
||||
return env0_1(MuteTimers, [{key: 'reset', value: function() {
|
||||
var Object = global.Object;
|
||||
Object.values(this.timers).forEach(_fun28795);
|
||||
this.timers = {};
|
||||
}}, {key: 'setTimer', value: value_28796}, {key: 'clearTimer', value: function(a0) {
|
||||
if (a0 != null && a0 in this.timers) {
|
||||
global.clearTimeout(this.timers[a0]);
|
||||
delete this.timers[a0];
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function MuteTimers() { // fn#28793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:143, offset: 0x00f82981, size: 35 bytes, params: 1, frame: 13
|
||||
env1_0(this, MuteTimers);
|
||||
this.timers = {};
|
||||
}
|
||||
|
||||
function value_28794() { // fn#28794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:221, offset: 0x00f829a4, size: 56 bytes, params: 1, frame: 12
|
||||
const Object = global.Object;
|
||||
Object.values(this.timers).forEach(function(a0) {
|
||||
return (0, global.clearTimeout)(a0);
|
||||
});
|
||||
this.timers = {};
|
||||
}
|
||||
|
||||
function value_28796(a0, a1, a2) { // fn#28796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:328, offset: 0x00f829dc, size: 180 bytes, params: 4, frame: 18
|
||||
var r8;
|
||||
var r1;
|
||||
var r0;
|
||||
var Date;
|
||||
var value2;
|
||||
var date;
|
||||
var time;
|
||||
var timers;
|
||||
var setTimeout;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
return false;
|
||||
}
|
||||
if (value == a1) {
|
||||
return false;
|
||||
}
|
||||
let end_time = a1.end_time;
|
||||
if (value == end_time) {
|
||||
r8 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
end_time = a1.end_time;
|
||||
value2 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date(end_time);
|
||||
time = (date instanceof Object ? date : value2).getTime();
|
||||
Date = global.Date;
|
||||
r8 = time - Date.now();
|
||||
}
|
||||
value = value != r8;
|
||||
if (value) {
|
||||
value = r8 <= 0;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
timers = this.timers;
|
||||
setTimeout = global.setTimeout;
|
||||
value = global.Math.max(0, r8);
|
||||
timers[a0] = setTimeout(a2, value);
|
||||
value = false;
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* Metro module 12403; source: lib/NetworkQuality.tsx; dependencies: [6, 7, 4401, 661, 4303, 2] */
|
||||
function _fun94557(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:6, offset: 0x0211d49b, size: 193 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const round_94558 = function(a0) {
|
||||
var r0;
|
||||
var value = a1;
|
||||
r0 = value !== undefined ? value : 0;
|
||||
r0 = a0 != null ? global.Math.round(a0) : r0;
|
||||
return r0;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.NetworkConnectionTypes;
|
||||
const env0_6 = value.NetworkConnectionSpeeds;
|
||||
value = _fun94559();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/NetworkQuality.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun94559() { // fn#94559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:250, offset: 0x0211d55c, size: 111 bytes, params: 1, frame: 15
|
||||
return env0_3(NetworkQuality, [{key: '_initStats', value: value_94561}, {key: 'getStats', value: value_94564},
|
||||
{key: 'incrementNetworkStats', value: value_94565}]);
|
||||
}
|
||||
|
||||
function NetworkQuality() { // fn#94560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:271, offset: 0x0211d5cb, size: 80 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
env1_2(this, NetworkQuality);
|
||||
this._networkStats = this._initStats();
|
||||
value = require(4303) /* metro dependency 4303: TimeUtils */;
|
||||
this._lastSampleTimestamp = value.now();
|
||||
}
|
||||
|
||||
function value_94561() { // fn#94561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:424, offset: 0x0211d61b, size: 103 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
let Object = global.Object;
|
||||
const values = Object.values;
|
||||
const value = environment.__proto__;
|
||||
Reflect.apply(values, Object, [NetworkConnectionTypes]).forEach(_fun94562);
|
||||
Object = global.Object;
|
||||
Object.values(NetworkConnectionSpeeds).forEach(_fun94563);
|
||||
return {effectiveConnectionSpeedBuckets: {}, connectionTypeBuckets: {}};
|
||||
}
|
||||
|
||||
function value_94564() { // fn#94564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:670, offset: 0x0211d6b6, size: 366 bytes, params: 1, frame: 16
|
||||
const _networkStats = this._networkStats;
|
||||
const object2 = {};
|
||||
const round_94558Binding = round_94558;
|
||||
let connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
const WIFI = NetworkConnectionTypes.WIFI;
|
||||
object2.duration_connection_type_wifi = round_94558Binding(connectionTypeBuckets[WIFI]);
|
||||
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
const CELLULAR = NetworkConnectionTypes.CELLULAR;
|
||||
object2.duration_connection_type_cellular = round_94558Binding(connectionTypeBuckets[CELLULAR]);
|
||||
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
const ETHERNET = NetworkConnectionTypes.ETHERNET;
|
||||
object2.duration_connection_type_ethernet = round_94558Binding(connectionTypeBuckets[ETHERNET]);
|
||||
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
const BLUETOOTH = NetworkConnectionTypes.BLUETOOTH;
|
||||
object2.duration_connection_type_bluetooth = round_94558Binding(connectionTypeBuckets[BLUETOOTH]);
|
||||
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
const OTHER = NetworkConnectionTypes.OTHER;
|
||||
object2.duration_connection_type_other = round_94558Binding(connectionTypeBuckets[OTHER]);
|
||||
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
let UNKNOWN = NetworkConnectionTypes.UNKNOWN;
|
||||
object2.duration_connection_type_unknown = round_94558Binding(connectionTypeBuckets[UNKNOWN]);
|
||||
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
|
||||
const NONE = NetworkConnectionTypes.NONE;
|
||||
object2.duration_connection_type_none = round_94558Binding(connectionTypeBuckets[NONE]);
|
||||
let effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
|
||||
const TWO_G = NetworkConnectionSpeeds.TWO_G;
|
||||
object2.duration_effective_connection_speed_2g = round_94558Binding(effectiveConnectionSpeedBuckets[TWO_G]);
|
||||
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
|
||||
const THREE_G = NetworkConnectionSpeeds.THREE_G;
|
||||
object2.duration_effective_connection_speed_3g = round_94558Binding(effectiveConnectionSpeedBuckets[THREE_G]);
|
||||
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
|
||||
const FOUR_G = NetworkConnectionSpeeds.FOUR_G;
|
||||
object2.duration_effective_connection_speed_4g = round_94558Binding(effectiveConnectionSpeedBuckets[FOUR_G]);
|
||||
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
|
||||
const FIVE_G = NetworkConnectionSpeeds.FIVE_G;
|
||||
object2.duration_effective_connection_speed_5g = round_94558Binding(effectiveConnectionSpeedBuckets[FIVE_G]);
|
||||
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
|
||||
UNKNOWN = NetworkConnectionSpeeds.UNKNOWN;
|
||||
object2.duration_effective_connection_speed_unknown = round_94558Binding(effectiveConnectionSpeedBuckets[UNKNOWN]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_94565(a0) { // fn#94565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:1724, offset: 0x0211d824, size: 163 bytes, params: 2, frame: 14
|
||||
const value = (a0 - this._lastSampleTimestamp) / 1000;
|
||||
const effectiveConnectionSpeed = NetworkStore.getEffectiveConnectionSpeed();
|
||||
const SLOW_TWO_G = NetworkConnectionSpeeds.SLOW_TWO_G;
|
||||
const r6 = effectiveConnectionSpeed !== SLOW_TWO_G ? effectiveConnectionSpeed : NetworkConnectionSpeeds.TWO_G;
|
||||
const type = NetworkStore.getType();
|
||||
const WIMAX = NetworkConnectionTypes.WIMAX;
|
||||
const r4 = type !== WIMAX ? type : NetworkConnectionTypes.WIFI;
|
||||
this._networkStats.effectiveConnectionSpeedBuckets[r6] += value;
|
||||
this._networkStats.connectionTypeBuckets[r4] += value;
|
||||
this._lastSampleTimestamp = a0;
|
||||
}
|
||||
|
||||
function _fun94562(a0) { // fn#94562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:536, offset: 0x0211d682, size: 26 bytes, params: 2, frame: 3
|
||||
env0_0.connectionTypeBuckets[a0] = 0;
|
||||
}
|
||||
|
||||
function _fun94563(a0) { // fn#94563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:598, offset: 0x0211d69c, size: 26 bytes, params: 2, frame: 3
|
||||
env0_0.effectiveConnectionSpeedBuckets[a0] = 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
/* Metro module 12569; source: lib/NetworkTtlCache.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun96300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:6, offset: 0x0215a2d5, size: 224 bytes, params: 8, frame: 19
|
||||
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 */;
|
||||
object = {IDLE: 'idle', LOADING: 'loading', SUCCESS: 'success', ERROR: 'error'};
|
||||
const value = _fun96301();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/NetworkTtlCache.tsx');
|
||||
exports.NetworkTtlCacheStatus = {IDLE: 'idle', LOADING: 'loading', VALID: 'valid', STALE: 'stale', ERROR: 'error'};
|
||||
exports.NetworkTtlCache = value;
|
||||
}
|
||||
|
||||
function _fun96301() { // fn#96301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:329, offset: 0x0215a3b5, size: 492 bytes, params: 1, frame: 15
|
||||
return env0_1(NetworkTtlCache, [{key: 'setTtl', value: function(a0) {
|
||||
this.ttlMs = a0;
|
||||
}}, {key: 'setLoading', value: value_96304}, {key: 'setValue', value: value_96305}, {key: 'setError',
|
||||
value: value_96306}, {key: 'clear', value: value_96307}, {key: 'getValue', value: function() {
|
||||
return this.value;
|
||||
}}, {key: 'getFetchState', value: function() {
|
||||
return this.fetchState;
|
||||
}}, {key: 'getFetchedAt', value: function() {
|
||||
return this.fetchedAt;
|
||||
}}, {key: 'forceExpire', value: function() {
|
||||
this.fetchedAt = null;
|
||||
}}, {key: 'isExpired', value: function() {
|
||||
var r1;
|
||||
var r0;
|
||||
var value = this.ttlMs != null;
|
||||
if (value) {
|
||||
value = this.fetchedAt == null;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
value = global.Date.now();
|
||||
value -= this.fetchedAt;
|
||||
value = value >= this.ttlMs;
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'shouldFetch', value: value_96313}, {key: 'isLoading', value: value_96314}, {key: 'isValid',
|
||||
value: value_96315}, {key: 'isError', value: value_96316}, {key: 'getStatus', value: value_96317},
|
||||
{key: 'getValueWithStatus', value: function() {
|
||||
return {value: this.value, status: this.getStatus()};
|
||||
}}, {key: 'serialize', value: function() {
|
||||
var value = null;
|
||||
return value == this.value || value == this.fetchedAt ? value : {value: this.value, fetchedAt: this.fetchedAt};
|
||||
}}, {key: 'restore', value: value_96320}]);
|
||||
}
|
||||
|
||||
function NetworkTtlCache() { // fn#96302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:350, offset: 0x0215a5a1, size: 88 bytes, params: 1, frame: 15
|
||||
let value = a0;
|
||||
const r3 = value !== undefined ? value : {};
|
||||
value = environment.__proto__;
|
||||
env1_0(this, NetworkTtlCache);
|
||||
const value3 = null;
|
||||
this.value = value3;
|
||||
const IDLE = env1_2.IDLE;
|
||||
this.fetchState = IDLE;
|
||||
this.fetchedAt = value3;
|
||||
const ttlMs = r3.ttlMs;
|
||||
this.ttlMs = value3 != ttlMs ? ttlMs : value3;
|
||||
}
|
||||
|
||||
function value_96304() { // fn#96304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:580, offset: 0x0215a609, size: 26 bytes, params: 1, frame: 2
|
||||
const LOADING = env1_2.LOADING;
|
||||
this.fetchState = LOADING;
|
||||
}
|
||||
|
||||
function value_96305(a0) { // fn#96305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:641, offset: 0x0215a623, size: 58 bytes, params: 2, frame: 10
|
||||
this.value = a0;
|
||||
const SUCCESS = env1_2.SUCCESS;
|
||||
this.fetchState = SUCCESS;
|
||||
const Date = global.Date;
|
||||
this.fetchedAt = Date.now();
|
||||
}
|
||||
|
||||
function value_96306() { // fn#96306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:742, offset: 0x0215a65d, size: 26 bytes, params: 1, frame: 2
|
||||
const ERROR = env1_2.ERROR;
|
||||
this.fetchState = ERROR;
|
||||
}
|
||||
|
||||
function value_96307() { // fn#96307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:798, offset: 0x0215a677, size: 40 bytes, params: 1, frame: 3
|
||||
this.value = null;
|
||||
const IDLE = env1_2.IDLE;
|
||||
this.fetchState = IDLE;
|
||||
this.fetchedAt = null;
|
||||
}
|
||||
|
||||
function value_96313() { // fn#96313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1253, offset: 0x0215a70d, size: 67 bytes, params: 1, frame: 11
|
||||
const fetchState = this.fetchState;
|
||||
const value = environment.__proto__;
|
||||
const LOADING = env1_2.LOADING;
|
||||
return fetchState !== LOADING && (this.fetchState === env1_2.IDLE || this.isExpired());
|
||||
}
|
||||
|
||||
function value_96314() { // fn#96314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1370, offset: 0x0215a750, size: 28 bytes, params: 1, frame: 2
|
||||
const fetchState = this.fetchState;
|
||||
const LOADING = env1_2.LOADING;
|
||||
return fetchState === LOADING;
|
||||
}
|
||||
|
||||
function value_96315() { // fn#96315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1439, offset: 0x0215a76c, size: 44 bytes, params: 1, frame: 10
|
||||
const fetchState = this.fetchState;
|
||||
const value = environment.__proto__;
|
||||
const SUCCESS = env1_2.SUCCESS;
|
||||
return fetchState === SUCCESS && !this.isExpired();
|
||||
}
|
||||
|
||||
function value_96316() { // fn#96316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1527, offset: 0x0215a798, size: 28 bytes, params: 1, frame: 2
|
||||
const fetchState = this.fetchState;
|
||||
const ERROR = env1_2.ERROR;
|
||||
return fetchState === ERROR;
|
||||
}
|
||||
|
||||
function value_96317() { // fn#96317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1596, offset: 0x0215a7b4, size: 141 bytes, params: 1, frame: 11
|
||||
var isExpired2;
|
||||
var binding;
|
||||
const fetchState = this.fetchState;
|
||||
const IDLE = env1_2.IDLE;
|
||||
if (IDLE === fetchState) {
|
||||
return env1_3.IDLE;
|
||||
}
|
||||
const LOADING = env1_2.LOADING;
|
||||
if (LOADING === fetchState) {
|
||||
return env1_3.LOADING;
|
||||
}
|
||||
const ERROR = env1_2.ERROR;
|
||||
if (ERROR === fetchState) {
|
||||
return env1_3.ERROR;
|
||||
}
|
||||
const SUCCESS = env1_2.SUCCESS;
|
||||
if (SUCCESS === fetchState) {
|
||||
isExpired2 = this.isExpired();
|
||||
binding = env1_3;
|
||||
return isExpired2 ? binding.STALE : binding.VALID;
|
||||
}
|
||||
}
|
||||
|
||||
function value_96320(a0) { // fn#96320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:2021, offset: 0x0215a89c, size: 58 bytes, params: 2, frame: 3
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = a0.value;
|
||||
this.value = value;
|
||||
this.fetchedAt = a0.fetchedAt;
|
||||
value = environment.__proto__;
|
||||
this.fetchState = env1_2.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
/* Metro module 1419; source: lib/PlainRecord.tsx; dependencies: [1420, 44, 1421, 628, 2] */
|
||||
function _fun16575(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:6, offset: 0x00e53f8a, size: 238 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = function(a0, a1) {
|
||||
a1[TypeTag] = a0;
|
||||
return a1;
|
||||
};
|
||||
const closure2 = isValueEqual;
|
||||
const closure3 = function(a0, a1) {
|
||||
var r3;
|
||||
var isValueEqualBinding;
|
||||
var property2;
|
||||
var value4;
|
||||
if (a0 !== a1) {
|
||||
var property = global.Object;
|
||||
var value = property.keys(a0);
|
||||
var value2 = 0;
|
||||
if (value2 < value.length) {
|
||||
r3 = value2;
|
||||
loopExit2: while (true) {
|
||||
property = value[r3];
|
||||
isValueEqualBinding = isValueEqual;
|
||||
property2 = a0[property];
|
||||
if (isValueEqualBinding(property2, a1[property])) {
|
||||
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
if (!(value4 < value.length)) {
|
||||
return true;
|
||||
}
|
||||
r3 = value4;
|
||||
continue;
|
||||
}
|
||||
break loopExit2;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const plainRecord = importDefault(1420) /* metro dependency 1420: PlainRecord */;
|
||||
const TypeTag = (require(1420) /* metro dependency 1420: PlainRecord */).TypeTag;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/PlainRecord.tsx');
|
||||
exports.default = plainRecord;
|
||||
exports.TypeTag = TypeTag;
|
||||
exports.set = function(a0, a1, a2) {
|
||||
var r0;
|
||||
var object;
|
||||
var value = a0;
|
||||
var isValueEqualBinding = isValueEqual;
|
||||
if (isValueEqualBinding(value[a1], a2)) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {};
|
||||
copyDataProperties(object, value, isValueEqualBinding);
|
||||
object[a1] = a2;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.merge = function(a0, a1) {
|
||||
var r3;
|
||||
var r8;
|
||||
var r13;
|
||||
var r12;
|
||||
var r1;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var property;
|
||||
var property2;
|
||||
var value4;
|
||||
var isValueEqual2;
|
||||
var object;
|
||||
var value = a0;
|
||||
var value2 = null;
|
||||
var properties = Object.keys(a1);
|
||||
var properties2 = 0;
|
||||
var properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
r3 = value2;
|
||||
r8 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r8];
|
||||
propertyName2 = r8 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r1 = r3;
|
||||
break;
|
||||
}
|
||||
property = value[propertyName];
|
||||
property2 = a1[propertyName];
|
||||
value4 = property2 === undefined;
|
||||
if (value4) {
|
||||
r13 = value4;
|
||||
continue;
|
||||
}
|
||||
isValueEqual2 = isValueEqual(property, property2);
|
||||
r13 = isValueEqual2;
|
||||
if (r13) {
|
||||
r8 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
if (value2 == r3) {
|
||||
object = {};
|
||||
copyDataProperties(object, value, property);
|
||||
object[propertyName] = property2;
|
||||
r12 = object;
|
||||
} else {
|
||||
r3[propertyName] = property2;
|
||||
r12 = r3;
|
||||
}
|
||||
r3 = r12;
|
||||
r8 = propertyName2;
|
||||
}
|
||||
}
|
||||
return value2 == r1 ? value : r1;
|
||||
};
|
||||
exports.tryReuseExistingInPlacePlainRecord = function(a0, a1, a2) {
|
||||
var r0;
|
||||
var value = a1;
|
||||
var value2 = a2;
|
||||
importDefault(dependencyMap[1])(value == null || value[TypeTag] === a0,
|
||||
'Existing record type does not match the expected type');
|
||||
if (value == null) {
|
||||
constructInPlace(a0, value2);
|
||||
r0 = value2;
|
||||
} else if (isPlainRecordDataEqual(value, value2)) {
|
||||
r0 = value;
|
||||
} else {
|
||||
constructInPlace(a0, value2);
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.objectIsPlainRecordOfType = objectIsPlainRecordOfType;
|
||||
exports.constructInPlace = closure;
|
||||
exports.copyConstruct = function(a0, a1) {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, a1, r2);
|
||||
object[TypeTag] = a0;
|
||||
return object;
|
||||
};
|
||||
exports.isValueEqual = closure2;
|
||||
exports.isPlainRecordDataEqual = closure3;
|
||||
}
|
||||
|
||||
function isValueEqual(a0, a1) { // fn#16577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:176, offset: 0x00e5408b, size: 300 bytes, params: 3, frame: 16
|
||||
var r3;
|
||||
var r0;
|
||||
var value;
|
||||
var Array;
|
||||
if (a0 == null) {
|
||||
r0 = a0 === a1;
|
||||
} else if (a1 == null) {
|
||||
r0 = a0 === a1;
|
||||
} else {
|
||||
value = a0 === a1;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if (a0 instanceof global.Date) {
|
||||
if (a1 instanceof global.Date) {
|
||||
value = a0.getTime();
|
||||
value = value === a1.getTime();
|
||||
r3 = value;
|
||||
} else if (a0 instanceof global.Set) {
|
||||
if (a1 instanceof global.Set) {
|
||||
value = require(1421) /* metro dependency 1421: SetUtils */;
|
||||
value = value.areSetsEqual(a0, a1);
|
||||
r3 = value;
|
||||
} else {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a1)) {
|
||||
value = require(628) /* metro dependency 628: shallowEqual */;
|
||||
value = value.areArraysShallowEqual(a0, a1);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a1)) {
|
||||
value = require(628) /* metro dependency 628: shallowEqual */;
|
||||
value = value.areArraysShallowEqual(a0, a1);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
}
|
||||
} else if (a0 instanceof global.Set) {
|
||||
if (a1 instanceof global.Set) {
|
||||
value = require(1421) /* metro dependency 1421: SetUtils */;
|
||||
value = value.areSetsEqual(a0, a1);
|
||||
r3 = value;
|
||||
} else {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a1)) {
|
||||
value = require(628) /* metro dependency 628: shallowEqual */;
|
||||
value = value.areArraysShallowEqual(a0, a1);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a1)) {
|
||||
value = require(628) /* metro dependency 628: shallowEqual */;
|
||||
value = value.areArraysShallowEqual(a0, a1);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
} else {
|
||||
r3 = typeof a0 === 'object' && typeof a1 === 'object';
|
||||
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
|
||||
}
|
||||
}
|
||||
r0 = r3;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function objectIsPlainRecordOfType(a0, a1) { // fn#16582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:1217, offset: 0x00e5432b, size: 57 bytes, params: 3, frame: 5
|
||||
return typeof a1 === 'object' && a1 != null && (TypeTag in a1 && a1[TypeTag]) === a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
/* Metro module 4915; source: lib/Platforms.tsx; dependencies: [661, 4916, 696, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 22, 1471, 2] */
|
||||
function _fun43433(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:6, offset: 0x01153251, size: 5089 bytes, params: 8, frame: 30
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const PlatformTypes = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
|
||||
const ApplicationIdentityConnections = (require(4916) /* metro dependency 4916: UserApplicationIdentityConstants */).ApplicationIdentityConnections;
|
||||
object2 = {};
|
||||
const TWITCH = PlatformTypes.TWITCH;
|
||||
object2.type = TWITCH;
|
||||
object2.name = 'Twitch';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITCH');
|
||||
object2.icon = {lightPNG: require(4917) /* metro dependency 4917 */,
|
||||
darkPNG: require(4917) /* metro dependency 4917 */, whitePNG: require(4918) /* metro dependency 4918 */,
|
||||
lightSVG: require(4919) /* metro dependency 4919 */, darkSVG: require(4919) /* metro dependency 4919 */,
|
||||
whiteSVG: require(4920) /* metro dependency 4920 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://www.twitch.tv/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
object2.domains = ['twitch.tv', 'twitch.com'];
|
||||
const items2 = [object2];
|
||||
object2 = {};
|
||||
const YOUTUBE = PlatformTypes.YOUTUBE;
|
||||
object2.type = YOUTUBE;
|
||||
object2.name = 'YouTube';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_YOUTUBE');
|
||||
object2.icon = {lightPNG: require(4921) /* metro dependency 4921 */,
|
||||
darkPNG: require(4921) /* metro dependency 4921 */, whitePNG: require(4922) /* metro dependency 4922 */,
|
||||
lightSVG: require(4923) /* metro dependency 4923 */, darkSVG: require(4923) /* metro dependency 4923 */,
|
||||
whiteSVG: require(4924) /* metro dependency 4924 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
return 'https://www.youtube.com/channel/' + (0, global.encodeURIComponent)(id);
|
||||
};
|
||||
object2.domains = ['youtube.com', 'youtu.be'];
|
||||
items2[1] = object2;
|
||||
object2 = {};
|
||||
const BATTLENET = PlatformTypes.BATTLENET;
|
||||
object2.type = BATTLENET;
|
||||
object2.name = 'Battle.net';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_BATTLENET');
|
||||
object2.icon = {lightPNG: require(4925) /* metro dependency 4925 */,
|
||||
darkPNG: require(4925) /* metro dependency 4925 */, whitePNG: require(4926) /* metro dependency 4926 */,
|
||||
lightSVG: require(4927) /* metro dependency 4927 */, darkSVG: require(4927) /* metro dependency 4927 */,
|
||||
whiteSVG: require(4928) /* metro dependency 4928 */};
|
||||
object2.enabled = true;
|
||||
items2[2] = object2;
|
||||
object2 = {'type': null, 'name': 'Bluesky', 'icon': null, 'enabled': true, 'getPlatformUserUrl': null,
|
||||
'isFederated': true, 'hasMetadata': true};
|
||||
const BLUESKY = PlatformTypes.BLUESKY;
|
||||
object2.type = BLUESKY;
|
||||
object2.icon = {lightPNG: require(4929) /* metro dependency 4929 */,
|
||||
darkPNG: require(4929) /* metro dependency 4929 */, whitePNG: require(4930) /* metro dependency 4930 */,
|
||||
lightSVG: require(4931) /* metro dependency 4931 */, darkSVG: require(4931) /* metro dependency 4931 */,
|
||||
whiteSVG: require(4932) /* metro dependency 4932 */};
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
var value = (0, global.encodeURIComponent)(id);
|
||||
value = value.replaceAll('%3A', ':');
|
||||
return 'https://bsky.app/profile/' + value;
|
||||
};
|
||||
items2[3] = object2;
|
||||
object2 = {};
|
||||
const BUNGIE = PlatformTypes.BUNGIE;
|
||||
object2.type = BUNGIE;
|
||||
object2.name = 'Bungie.net';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_BUNGIE');
|
||||
object2.icon = {lightPNG: require(4933) /* metro dependency 4933 */,
|
||||
darkPNG: require(4934) /* metro dependency 4934 */, whitePNG: require(4935) /* metro dependency 4935 */,
|
||||
lightSVG: require(4936) /* metro dependency 4936 */, darkSVG: require(4937) /* metro dependency 4937 */,
|
||||
whiteSVG: require(4938) /* metro dependency 4938 */};
|
||||
object2.enabled = true;
|
||||
items2[4] = object2;
|
||||
object2 = {};
|
||||
const SKYPE = PlatformTypes.SKYPE;
|
||||
object2.type = SKYPE;
|
||||
object2.name = 'Skype';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SKYPE');
|
||||
object2.icon = {lightPNG: require(4939) /* metro dependency 4939 */,
|
||||
darkPNG: require(4939) /* metro dependency 4939 */, whitePNG: require(4940) /* metro dependency 4940 */,
|
||||
lightSVG: require(4941) /* metro dependency 4941 */, darkSVG: require(4941) /* metro dependency 4941 */,
|
||||
whiteSVG: require(4942) /* metro dependency 4942 */};
|
||||
object2.enabled = false;
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
return 'skype:' + (0, global.encodeURIComponent)(id) + '?userinfo';
|
||||
};
|
||||
items2[5] = object2;
|
||||
object2 = {};
|
||||
const LEAGUE_OF_LEGENDS = PlatformTypes.LEAGUE_OF_LEGENDS;
|
||||
object2.type = LEAGUE_OF_LEGENDS;
|
||||
object2.name = 'League of Legends';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_LOL');
|
||||
object2.icon = {lightPNG: require(4943) /* metro dependency 4943 */,
|
||||
darkPNG: require(4943) /* metro dependency 4943 */, whitePNG: require(4944) /* metro dependency 4944 */,
|
||||
lightSVG: require(4945) /* metro dependency 4945 */, darkSVG: require(4945) /* metro dependency 4945 */,
|
||||
whiteSVG: require(4946) /* metro dependency 4946 */};
|
||||
object2.enabled = true;
|
||||
let RIOT_GAMES = ApplicationIdentityConnections.RIOT_GAMES;
|
||||
object2.replacedBy = RIOT_GAMES;
|
||||
items2[6] = object2;
|
||||
object2 = {};
|
||||
const STEAM = PlatformTypes.STEAM;
|
||||
object2.type = STEAM;
|
||||
object2.name = 'Steam';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_STEAM');
|
||||
object2.icon = {lightPNG: require(4947) /* metro dependency 4947 */,
|
||||
darkPNG: require(4948) /* metro dependency 4948 */, whitePNG: require(4948) /* metro dependency 4948 */,
|
||||
lightSVG: require(4949) /* metro dependency 4949 */, darkSVG: require(4950) /* metro dependency 4950 */,
|
||||
whiteSVG: require(4950) /* metro dependency 4950 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
return 'https://steamcommunity.com/profiles/' + (0, global.encodeURIComponent)(id);
|
||||
};
|
||||
object2.hasMetadata = true;
|
||||
items2[7] = object2;
|
||||
object2 = {};
|
||||
const REDDIT = PlatformTypes.REDDIT;
|
||||
object2.type = REDDIT;
|
||||
object2.name = 'Reddit';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_REDDIT');
|
||||
object2.icon = {lightPNG: require(4951) /* metro dependency 4951 */,
|
||||
darkPNG: require(4951) /* metro dependency 4951 */, whitePNG: require(4952) /* metro dependency 4952 */,
|
||||
lightSVG: require(4953) /* metro dependency 4953 */, darkSVG: require(4953) /* metro dependency 4953 */,
|
||||
whiteSVG: require(4954) /* metro dependency 4954 */};
|
||||
object2.enabled = true;
|
||||
object2.domains = ['reddit.com'];
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://www.reddit.com/u/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
object2.hasMetadata = true;
|
||||
items2[8] = object2;
|
||||
object2 = {};
|
||||
const FACEBOOK = PlatformTypes.FACEBOOK;
|
||||
object2.type = FACEBOOK;
|
||||
object2.name = 'Facebook';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_FACEBOOK');
|
||||
object2.icon = {lightPNG: require(4955) /* metro dependency 4955 */,
|
||||
darkPNG: require(4955) /* metro dependency 4955 */, whitePNG: require(4956) /* metro dependency 4956 */,
|
||||
lightSVG: require(4957) /* metro dependency 4957 */, darkSVG: require(4957) /* metro dependency 4957 */,
|
||||
whiteSVG: require(4958) /* metro dependency 4958 */};
|
||||
object2.domains = ['facebook.com'];
|
||||
object2.enabled = true;
|
||||
items2[9] = object2;
|
||||
object2 = {};
|
||||
const TWITTER_LEGACY = PlatformTypes.TWITTER_LEGACY;
|
||||
object2.type = TWITTER_LEGACY;
|
||||
object2.name = 'Twitter';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITTER');
|
||||
object2.icon = {lightPNG: require(4959) /* metro dependency 4959 */,
|
||||
darkPNG: require(4959) /* metro dependency 4959 */, whitePNG: require(4960) /* metro dependency 4960 */,
|
||||
lightSVG: require(4961) /* metro dependency 4961 */, darkSVG: require(4961) /* metro dependency 4961 */,
|
||||
whiteSVG: require(4962) /* metro dependency 4962 */};
|
||||
object2.enabled = false;
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://twitter.com/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
object2.domains = ['twitter.com'];
|
||||
object2.hasMetadata = true;
|
||||
items2[10] = object2;
|
||||
object2 = {};
|
||||
const TWITTER = PlatformTypes.TWITTER;
|
||||
object2.type = TWITTER;
|
||||
object2.name = 'X';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITTER');
|
||||
object2.icon = {lightPNG: require(4963) /* metro dependency 4963 */,
|
||||
darkPNG: require(4964) /* metro dependency 4964 */, whitePNG: require(4965) /* metro dependency 4965 */,
|
||||
lightSVG: require(4966) /* metro dependency 4966 */, darkSVG: require(4967) /* metro dependency 4967 */,
|
||||
whiteSVG: require(4968) /* metro dependency 4968 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://x.com/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
object2.domains = ['x.com'];
|
||||
object2.hasMetadata = true;
|
||||
items2[11] = object2;
|
||||
object2 = {};
|
||||
const SPOTIFY = PlatformTypes.SPOTIFY;
|
||||
object2.type = SPOTIFY;
|
||||
object2.name = 'Spotify';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SPOTIFY');
|
||||
object2.icon = {lightPNG: require(4969) /* metro dependency 4969 */,
|
||||
darkPNG: require(4969) /* metro dependency 4969 */, whitePNG: require(4970) /* metro dependency 4970 */,
|
||||
lightSVG: require(4971) /* metro dependency 4971 */, darkSVG: require(4971) /* metro dependency 4971 */,
|
||||
whiteSVG: require(4972) /* metro dependency 4972 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
return 'https://open.spotify.com/user/' + (0, global.encodeURIComponent)(id);
|
||||
};
|
||||
items2[12] = object2;
|
||||
object2 = {};
|
||||
const XBOX = PlatformTypes.XBOX;
|
||||
object2.type = XBOX;
|
||||
object2.name = 'Xbox';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_XBOX');
|
||||
object2.icon = {lightPNG: require(4973) /* metro dependency 4973 */,
|
||||
darkPNG: require(4974) /* metro dependency 4974 */, whitePNG: require(4974) /* metro dependency 4974 */,
|
||||
lightSVG: require(4975) /* metro dependency 4975 */, darkSVG: require(4976) /* metro dependency 4976 */,
|
||||
whiteSVG: require(4976) /* metro dependency 4976 */, customPNG: require(4977) /* metro dependency 4977 */};
|
||||
object2.enabled = true;
|
||||
items2[13] = object2;
|
||||
object2 = {};
|
||||
const SAMSUNG = PlatformTypes.SAMSUNG;
|
||||
object2.type = SAMSUNG;
|
||||
object2.name = 'Samsung Galaxy';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SAMSUNG');
|
||||
object2.icon = {lightPNG: require(4978) /* metro dependency 4978 */,
|
||||
darkPNG: require(4978) /* metro dependency 4978 */, whitePNG: require(4979) /* metro dependency 4979 */,
|
||||
lightSVG: require(4980) /* metro dependency 4980 */, darkSVG: require(4980) /* metro dependency 4980 */,
|
||||
whiteSVG: require(4981) /* metro dependency 4981 */};
|
||||
object2.enabled = false;
|
||||
items2[14] = object2;
|
||||
object2 = {};
|
||||
const GITHUB = PlatformTypes.GITHUB;
|
||||
object2.type = GITHUB;
|
||||
object2.name = 'GitHub';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_GITHUB');
|
||||
object2.icon = {lightPNG: require(4982) /* metro dependency 4982 */,
|
||||
darkPNG: require(4983) /* metro dependency 4983 */, whitePNG: require(4983) /* metro dependency 4983 */,
|
||||
lightSVG: require(4984) /* metro dependency 4984 */, darkSVG: require(4985) /* metro dependency 4985 */,
|
||||
whiteSVG: require(4985) /* metro dependency 4985 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://github.com/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
object2.domains = ['github.com'];
|
||||
items2[15] = object2;
|
||||
object2 = {};
|
||||
const PLAYSTATION = PlatformTypes.PLAYSTATION;
|
||||
object2.type = PLAYSTATION;
|
||||
object2.name = 'PlayStation Network';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_PLAYSTATION');
|
||||
object2.icon = {lightPNG: require(4986) /* metro dependency 4986 */,
|
||||
darkPNG: require(4987) /* metro dependency 4987 */, whitePNG: require(4987) /* metro dependency 4987 */,
|
||||
lightSVG: require(4988) /* metro dependency 4988 */, darkSVG: require(4989) /* metro dependency 4989 */,
|
||||
whiteSVG: require(4989) /* metro dependency 4989 */};
|
||||
object2.enabled = true;
|
||||
items2[16] = object2;
|
||||
object2 = {};
|
||||
const PLAYSTATION_STAGING = PlatformTypes.PLAYSTATION_STAGING;
|
||||
object2.type = PLAYSTATION_STAGING;
|
||||
object2.name = 'PlayStation Network (Staging)';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_PLAYSTATION');
|
||||
object2.icon = {lightPNG: require(4987) /* metro dependency 4987 */,
|
||||
darkPNG: require(4986) /* metro dependency 4986 */, whitePNG: require(4986) /* metro dependency 4986 */,
|
||||
lightSVG: require(4989) /* metro dependency 4989 */, darkSVG: require(4988) /* metro dependency 4988 */,
|
||||
whiteSVG: require(4988) /* metro dependency 4988 */};
|
||||
object2.enabled = false;
|
||||
items2[17] = object2;
|
||||
object2 = {};
|
||||
const EPIC_GAMES = PlatformTypes.EPIC_GAMES;
|
||||
object2.type = EPIC_GAMES;
|
||||
object2.name = 'Epic Games';
|
||||
object2.icon = {lightPNG: require(4990) /* metro dependency 4990 */,
|
||||
darkPNG: require(4991) /* metro dependency 4991 */, whitePNG: require(4991) /* metro dependency 4991 */,
|
||||
lightSVG: require(4992) /* metro dependency 4992 */, darkSVG: require(4993) /* metro dependency 4993 */,
|
||||
whiteSVG: require(4993) /* metro dependency 4993 */};
|
||||
object2.enabled = true;
|
||||
items2[18] = object2;
|
||||
object2 = {};
|
||||
RIOT_GAMES = PlatformTypes.RIOT_GAMES;
|
||||
object2.type = RIOT_GAMES;
|
||||
object2.name = 'Riot Games';
|
||||
object2.icon = {lightPNG: require(4994) /* metro dependency 4994 */,
|
||||
darkPNG: require(4994) /* metro dependency 4994 */, whitePNG: require(4995) /* metro dependency 4995 */,
|
||||
lightSVG: require(4996) /* metro dependency 4996 */, darkSVG: require(4996) /* metro dependency 4996 */,
|
||||
whiteSVG: require(4997) /* metro dependency 4997 */, blackSVG: require(4998) /* metro dependency 4998 */};
|
||||
object2.enabled = true;
|
||||
RIOT_GAMES = ApplicationIdentityConnections.RIOT_GAMES;
|
||||
object2.replacedBy = RIOT_GAMES;
|
||||
items2[19] = object2;
|
||||
object2 = {};
|
||||
const ROBLOX = PlatformTypes.ROBLOX;
|
||||
object2.type = ROBLOX;
|
||||
object2.name = 'Roblox';
|
||||
object2.icon = {lightPNG: require(4999) /* metro dependency 4999 */,
|
||||
darkPNG: require(5000) /* metro dependency 5000 */, whitePNG: require(5001) /* metro dependency 5001 */,
|
||||
lightSVG: require(5002) /* metro dependency 5002 */, darkSVG: require(5003) /* metro dependency 5003 */,
|
||||
whiteSVG: require(5004) /* metro dependency 5004 */};
|
||||
object2.enabled = true;
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
return 'https://roblox.com/users/' + (0, global.encodeURIComponent)(id) + '/profile';
|
||||
};
|
||||
items2[20] = object2;
|
||||
object2 = {'type': null, 'name': 'PayPal', 'icon': null, 'enabled': true, 'hasMetadata': true};
|
||||
const PAYPAL = PlatformTypes.PAYPAL;
|
||||
object2.type = PAYPAL;
|
||||
object2.icon = {lightPNG: require(5005) /* metro dependency 5005 */,
|
||||
darkPNG: require(5005) /* metro dependency 5005 */, whitePNG: require(5006) /* metro dependency 5006 */,
|
||||
lightSVG: require(5007) /* metro dependency 5007 */, darkSVG: require(5007) /* metro dependency 5007 */,
|
||||
whiteSVG: require(5008) /* metro dependency 5008 */};
|
||||
items2[21] = object2;
|
||||
object2 = {'type': null, 'name': 'eBay', 'icon': null, 'enabled': true, 'hasMetadata': true};
|
||||
const EBAY = PlatformTypes.EBAY;
|
||||
object2.type = EBAY;
|
||||
object2.icon = {lightPNG: require(5009) /* metro dependency 5009 */,
|
||||
darkPNG: require(5009) /* metro dependency 5009 */, whitePNG: require(5010) /* metro dependency 5010 */,
|
||||
lightSVG: require(5011) /* metro dependency 5011 */, darkSVG: require(5011) /* metro dependency 5011 */,
|
||||
whiteSVG: require(5012) /* metro dependency 5012 */};
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://www.ebay.com/usr/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
items2[22] = object2;
|
||||
object2 = {'type': null, 'name': 'TikTok', 'icon': null, 'enabled': true, 'hasMetadata': true};
|
||||
const TIKTOK = PlatformTypes.TIKTOK;
|
||||
object2.type = TIKTOK;
|
||||
object2.icon = {lightPNG: require(5013) /* metro dependency 5013 */,
|
||||
darkPNG: require(5014) /* metro dependency 5014 */, whitePNG: require(5014) /* metro dependency 5014 */,
|
||||
lightSVG: require(5015) /* metro dependency 5015 */, darkSVG: require(5016) /* metro dependency 5016 */,
|
||||
whiteSVG: require(5016) /* metro dependency 5016 */};
|
||||
object2.domains = ['tiktok.com'];
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://www.tiktok.com/@' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
items2[23] = object2;
|
||||
object2 = {};
|
||||
const INSTAGRAM = PlatformTypes.INSTAGRAM;
|
||||
object2.type = INSTAGRAM;
|
||||
object2.name = 'Instagram';
|
||||
object2.icon = {lightPNG: require(5017) /* metro dependency 5017 */,
|
||||
darkPNG: require(5017) /* metro dependency 5017 */, whitePNG: require(5018) /* metro dependency 5018 */,
|
||||
lightSVG: require(5019) /* metro dependency 5019 */, darkSVG: require(5019) /* metro dependency 5019 */,
|
||||
whiteSVG: require(5020) /* metro dependency 5020 */};
|
||||
object2.enabled = false;
|
||||
object2.domains = ['instagram.com'];
|
||||
object2.getPlatformUserUrl = function({name}) {
|
||||
return 'https://www.instagram.com/' + (0, global.encodeURIComponent)(name);
|
||||
};
|
||||
items2[24] = object2;
|
||||
object2 = {'type': null, 'name': 'Mastodon', 'icon': null, 'enabled': false, 'getPlatformUserUrl': null,
|
||||
'isFederated': true, 'hasMetadata': true};
|
||||
const MASTODON = PlatformTypes.MASTODON;
|
||||
object2.type = MASTODON;
|
||||
object2.icon = {lightPNG: require(5021) /* metro dependency 5021 */,
|
||||
darkPNG: require(5021) /* metro dependency 5021 */, whitePNG: require(5022) /* metro dependency 5022 */,
|
||||
lightSVG: require(5023) /* metro dependency 5023 */, darkSVG: require(5023) /* metro dependency 5023 */,
|
||||
whiteSVG: require(5024) /* metro dependency 5024 */};
|
||||
object2.getPlatformUserUrl = function(a0) {
|
||||
return a0.id;
|
||||
};
|
||||
items2[25] = object2;
|
||||
object2 = {};
|
||||
const CRUNCHYROLL = PlatformTypes.CRUNCHYROLL;
|
||||
object2.type = CRUNCHYROLL;
|
||||
object2.name = 'Crunchyroll';
|
||||
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_CRUNCHYROLL');
|
||||
object2.icon = {lightPNG: require(5025) /* metro dependency 5025 */,
|
||||
darkPNG: require(5025) /* metro dependency 5025 */, whitePNG: require(5025) /* metro dependency 5025 */,
|
||||
lightSVG: require(5026) /* metro dependency 5026 */, darkSVG: require(5026) /* metro dependency 5026 */,
|
||||
whiteSVG: require(5027) /* metro dependency 5027 */};
|
||||
object2.enabled = true;
|
||||
items2[26] = object2;
|
||||
object2 = {};
|
||||
const DOMAIN = PlatformTypes.DOMAIN;
|
||||
object2.type = DOMAIN;
|
||||
object2.name = 'Domain';
|
||||
object2.icon = {lightPNG: require(5028) /* metro dependency 5028 */,
|
||||
darkPNG: require(5029) /* metro dependency 5029 */, whitePNG: require(5029) /* metro dependency 5029 */,
|
||||
lightSVG: require(5030) /* metro dependency 5030 */, darkSVG: require(5031) /* metro dependency 5031 */,
|
||||
whiteSVG: require(5031) /* metro dependency 5031 */};
|
||||
object2.getPlatformUserUrl = function({id}) {
|
||||
return 'https://' + id + '/';
|
||||
};
|
||||
object2.enabled = true;
|
||||
items2[27] = object2;
|
||||
object2 = {};
|
||||
const AMAZON_MUSIC = PlatformTypes.AMAZON_MUSIC;
|
||||
object2.type = AMAZON_MUSIC;
|
||||
object2.name = 'Amazon Music';
|
||||
object2.icon = {lightPNG: require(5032) /* metro dependency 5032 */,
|
||||
darkPNG: require(5032) /* metro dependency 5032 */, whitePNG: require(5032) /* metro dependency 5032 */,
|
||||
lightSVG: require(5033) /* metro dependency 5033 */, darkSVG: require(5033) /* metro dependency 5033 */,
|
||||
whiteSVG: require(5033) /* metro dependency 5033 */};
|
||||
object2.enabled = true;
|
||||
items2[28] = object2;
|
||||
object2 = {};
|
||||
const META_QUEST_OR_HORIZON = PlatformTypes.META_QUEST_OR_HORIZON;
|
||||
object2.type = META_QUEST_OR_HORIZON;
|
||||
object2.name = 'Meta Quest';
|
||||
object2.icon = {lightPNG: require(5034) /* metro dependency 5034 */,
|
||||
darkPNG: require(5035) /* metro dependency 5035 */, whitePNG: require(5036) /* metro dependency 5036 */,
|
||||
lightSVG: require(5037) /* metro dependency 5037 */, darkSVG: require(5038) /* metro dependency 5038 */,
|
||||
whiteSVG: require(5038) /* metro dependency 5038 */};
|
||||
object2.enabled = false;
|
||||
items2[29] = object2;
|
||||
const env0_3 = (importDefault(22) /* metro dependency 22 */).keyBy(items2, 'type');
|
||||
const env0_4 = {};
|
||||
items2.forEach(function(a0) {
|
||||
var env0_0 = a0;
|
||||
var domains = a0.domains;
|
||||
if (domains != null) {
|
||||
domains.forEach(_fun43451);
|
||||
}
|
||||
});
|
||||
object2 = {get: get_43452, getByUrl: getByUrl, isSupported: isSupported_43454, map: map_43455, filter: filter,
|
||||
find: find_43458};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Platforms.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function _fun43450(a0) { // fn#43450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7705, offset: 0x0115490f, size: 40 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
const domains = a0.domains;
|
||||
if (domains != null) {
|
||||
domains.forEach(_fun43451);
|
||||
}
|
||||
}
|
||||
|
||||
function get_43452(a0) { // fn#43452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7771, offset: 0x01154950, size: 28 bytes, params: 2, frame: 3
|
||||
const property = env0_3[a0];
|
||||
const value = null;
|
||||
return value != property ? property : value;
|
||||
}
|
||||
|
||||
function getByUrl(a0) { // fn#43453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7814, offset: 0x0115496c, size: 99 bytes, params: 2, frame: 13
|
||||
var hostname;
|
||||
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
|
||||
if (value2 != null) {
|
||||
hostname = value2.hostname;
|
||||
return env0_4[hostname.startsWith('www.') ? hostname.slice(4) : hostname];
|
||||
}
|
||||
}
|
||||
|
||||
function isSupported_43454(a0) { // fn#43454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7946, offset: 0x011549cf, size: 42 bytes, params: 2, frame: 13
|
||||
const Object = global.Object;
|
||||
return Object.prototype.hasOwnProperty.call(env0_3, a0);
|
||||
}
|
||||
|
||||
function map_43455(a0) { // fn#43455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7995, offset: 0x011549f9, size: 22 bytes, params: 2, frame: 11
|
||||
return env0_2.map(a0);
|
||||
}
|
||||
|
||||
function filter(a0) { // fn#43456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:8007, offset: 0x01154a0f, size: 40 bytes, params: 2, frame: 11
|
||||
const value = env0_2.filter(a0);
|
||||
value.sort(function({name}, {name}) {
|
||||
return name.localeCompare(name);
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
||||
function find_43458(a0) { // fn#43458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:8100, offset: 0x01154a54, size: 23 bytes, params: 2, frame: 11
|
||||
return env0_2.find(a0);
|
||||
}
|
||||
|
||||
function _fun43451(a0) { // fn#43451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7747, offset: 0x01154937, size: 25 bytes, params: 2, frame: 3
|
||||
env1_4[a0] = env0_0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,422 @@
|
||||
/* Metro module 9681; source: lib/QueryTokenizer.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun76045(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:6, offset: 0x01dc26e3, size: 219 bytes, params: 8, frame: 18
|
||||
const fixMatchIndex = function(a0, a1) {
|
||||
if (a0 == null) {
|
||||
return null;
|
||||
}
|
||||
var items = [];
|
||||
arraySpread(items, a0, 0, a0);
|
||||
items.index = a1;
|
||||
return items;
|
||||
};
|
||||
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 = RegExp('.+', 'g');
|
||||
const value = _fun76048();
|
||||
const value2 = _fun76059();
|
||||
value.NON_TOKEN_TYPE = 'NON_TOKEN';
|
||||
value.Token = value2;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/QueryTokenizer.tsx');
|
||||
exports.default = value;
|
||||
exports.NON_TOKEN_TYPE = 'NON_TOKEN';
|
||||
exports.QueryTokenizer = value;
|
||||
exports.Token = value2;
|
||||
}
|
||||
|
||||
function getMatch(a0, a1, a2) { // fn#76046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:141, offset: 0x01dc27be, size: 307 bytes, params: 4, frame: 25
|
||||
var r8;
|
||||
var r2;
|
||||
var r15;
|
||||
var r1;
|
||||
var r7;
|
||||
var r4;
|
||||
var property;
|
||||
var fixMatchIndexBinding;
|
||||
var match;
|
||||
var regex;
|
||||
var value4;
|
||||
var cache;
|
||||
var value5;
|
||||
var get;
|
||||
var value6;
|
||||
var value7;
|
||||
var binding;
|
||||
var prototype;
|
||||
var value8;
|
||||
var binding2;
|
||||
var value10;
|
||||
var index;
|
||||
var type;
|
||||
var value11;
|
||||
var binding3;
|
||||
var value13;
|
||||
var validator;
|
||||
var value14;
|
||||
var value15;
|
||||
var value16;
|
||||
var has;
|
||||
var value17;
|
||||
var set;
|
||||
if (a1 != null) {
|
||||
var length = a1.length;
|
||||
var value = 0;
|
||||
if (value < length) {
|
||||
r8 = value;
|
||||
reducibleLoop2: while (true) {
|
||||
property = a1[r8];
|
||||
fixMatchIndexBinding = fixMatchIndex;
|
||||
match = a0.match;
|
||||
regex = property.regex;
|
||||
value4 = fixMatchIndexBinding(Reflect.apply(match, a0, [regex]), a2);
|
||||
if (value4 != null) {
|
||||
cache = property.cache;
|
||||
value5 = cache != null;
|
||||
reducibleJoin5: while (true) {
|
||||
if (value5) {
|
||||
get = cache.get;
|
||||
value6 = Reflect.apply(get, cache, [value4[value]]);
|
||||
value7 = value6 != null;
|
||||
r2 = value7;
|
||||
r15 = value6;
|
||||
break reducibleJoin5;
|
||||
}
|
||||
r2 = value5;
|
||||
r15 = undefined;
|
||||
break reducibleJoin5;
|
||||
}
|
||||
reducibleJoin7: while (true) {
|
||||
if (r2) {
|
||||
binding = env0_3;
|
||||
prototype = binding.prototype;
|
||||
value8 = Object.create(prototype, {constructor: {value: binding}});
|
||||
binding2 = new binding();
|
||||
value10 = binding2 instanceof Object ? binding2 : value8;
|
||||
index = value4.index;
|
||||
value10.start = index;
|
||||
r1 = value10;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
r1 = r15;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
reducibleJoin10: while (true) {
|
||||
reducibleJoin18: while (true) {
|
||||
if (r1 != null) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
binding = env0_3;
|
||||
type = property.type;
|
||||
prototype = binding.prototype;
|
||||
value11 = Object.create(prototype, {constructor: {value: binding}});
|
||||
binding3 = new binding();
|
||||
value13 = binding3 instanceof Object ? binding3 : value11;
|
||||
validator = property.validator;
|
||||
if (validator == null) {
|
||||
break reducibleLoop2;
|
||||
}
|
||||
validator = property.validator;
|
||||
if (Reflect.apply(validator, property, [value13])) {
|
||||
break reducibleLoop2;
|
||||
}
|
||||
break reducibleJoin10;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
}
|
||||
value14 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
|
||||
length = a1.length;
|
||||
if (!(value14 < length)) {
|
||||
return null;
|
||||
}
|
||||
r8 = value14;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
value15 = cache == null;
|
||||
reducibleJoin16: while (true) {
|
||||
if (value15) {
|
||||
r4 = value15;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
value16 = cache != null;
|
||||
reducibleJoin15: while (true) {
|
||||
if (value16) {
|
||||
has = cache.has;
|
||||
value17 = Reflect.apply(has, cache, [value4[value]]);
|
||||
r7 = value17;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
r7 = value16;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
r4 = r7;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
reducibleJoin18: while (true) {
|
||||
if (r4) {
|
||||
r1 = value13;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
set = cache.set;
|
||||
Reflect.apply(set, cache, [value4[value], value13]);
|
||||
r1 = value13;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun76048() { // fn#76048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:593, offset: 0x01dc2917, size: 161 bytes, params: 1, frame: 15
|
||||
return env0_1(QueryTokenizer, [{key: 'reset', value: function() {
|
||||
this._rules = [];
|
||||
this._followers = {};
|
||||
this._nonTokenType = 'NON_TOKEN';
|
||||
}}, {key: 'addRule', value: value_76052}, {key: 'tokenize', value: value_76054}, {key: 'clearCache',
|
||||
value: function() {
|
||||
var propertyName;
|
||||
var property2;
|
||||
this._rules.forEach(_fun76056);
|
||||
for (propertyName in this._followers) {
|
||||
property2 = this._followers[propertyName];
|
||||
property2.forEach(_fun76057);
|
||||
}
|
||||
}}, {key: '_getMatch', value: value_76058}]);
|
||||
}
|
||||
|
||||
function _fun76059() { // fn#76059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:2027, offset: 0x01dc2dfe, size: 209 bytes, params: 1, frame: 15
|
||||
return env0_1(Token, [{key: 'end', get: function() {
|
||||
return this.start + this.length;
|
||||
}}, {key: 'length', get: function() {
|
||||
return this.match[0].length;
|
||||
}}, {key: 'valueOf', value: function() {
|
||||
return this.match[0];
|
||||
}}, {key: 'getFullMatch', value: function() {
|
||||
return this.match[0];
|
||||
}}, {key: 'getMatch', value: function() {
|
||||
var value = a0;
|
||||
return this.match[value !== undefined ? value : 0];
|
||||
}}, {key: 'setData', value: function(a0, a1) {
|
||||
if (this._data == null) {
|
||||
this._data = new global.Map();
|
||||
}
|
||||
this._data.set(a0, a1);
|
||||
}}, {key: 'getData', value: function(a0) {
|
||||
if (this._data != null) {
|
||||
return this._data.get(a0);
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function QueryTokenizer() { // fn#76049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:614, offset: 0x01dc29b8, size: 101 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
let value = a0;
|
||||
const r3 = value !== undefined ? value : [];
|
||||
value = environment.__proto__;
|
||||
env1_0(this, QueryTokenizer);
|
||||
this._rules = [];
|
||||
this._followers = {};
|
||||
this._nonTokenType = 'NON_TOKEN';
|
||||
this.reset();
|
||||
r3.forEach(_fun76050);
|
||||
}
|
||||
|
||||
function value_76052({type, follows, validator, regex}) { // fn#76052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:878, offset: 0x01dc2a59, size: 247 bytes, params: 2, frame: 20
|
||||
var r6;
|
||||
var map;
|
||||
var _rules;
|
||||
const r9 = regex.source.charAt(0) === '^' ? regex : new global.RegExp('^' + regex.source);
|
||||
value = undefined;
|
||||
if (validator != null) {
|
||||
map = new global.Map();
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
if (follows != null) {
|
||||
follows.forEach(_fun76053);
|
||||
} else {
|
||||
_rules = this._rules;
|
||||
_rules.push({regex: r9, type: type, validator: validator, cache: r6});
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_76054(a0) { // fn#76054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1244, offset: 0x01dc2bbd, size: 345 bytes, params: 2, frame: 33
|
||||
var r8;
|
||||
var r10;
|
||||
var r11;
|
||||
var r14;
|
||||
var r5;
|
||||
var r15;
|
||||
var r16;
|
||||
var r6;
|
||||
var r9;
|
||||
var _getMatch;
|
||||
var substring;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var push;
|
||||
var binding;
|
||||
var fixMatchIndexBinding;
|
||||
var match;
|
||||
var value9;
|
||||
var _nonTokenType;
|
||||
var prototype;
|
||||
var value10;
|
||||
var binding2;
|
||||
var value12;
|
||||
var length2;
|
||||
var value13;
|
||||
var value14;
|
||||
let value = a0;
|
||||
const items2 = [];
|
||||
let length = value.length;
|
||||
const value2 = 0;
|
||||
const value3 = undefined;
|
||||
const value4 = '';
|
||||
if (length > value2) {
|
||||
r8 = value2;
|
||||
r10 = value4;
|
||||
r11 = value3;
|
||||
r14 = value;
|
||||
while (true) {
|
||||
_getMatch = this._getMatch;
|
||||
length = r10.length;
|
||||
value = Reflect.apply(_getMatch, this, [r14, r11, r8 + length]);
|
||||
if (value != null) {
|
||||
value7 = r10 != null;
|
||||
if (!value7) {
|
||||
r5 = value7;
|
||||
continue;
|
||||
}
|
||||
value8 = value4 !== r10;
|
||||
r5 = value8;
|
||||
if (!r5) {
|
||||
continue;
|
||||
}
|
||||
push = items2.push;
|
||||
binding = env1_3;
|
||||
fixMatchIndexBinding = fixMatchIndex;
|
||||
match = r10.match;
|
||||
value9 = fixMatchIndexBinding(Reflect.apply(match, r10, [env1_2]), r8);
|
||||
_nonTokenType = this._nonTokenType;
|
||||
prototype = binding.prototype;
|
||||
value10 = Object.create(prototype, {constructor: {value: binding}});
|
||||
binding2 = new binding();
|
||||
value12 = binding2 instanceof Object ? binding2 : value10;
|
||||
Reflect.apply(push, items2, [value12]);
|
||||
items2.push(value);
|
||||
length = value.length;
|
||||
length2 = r10.length;
|
||||
value13 = r8 + (length + length2);
|
||||
substring = r14.substring;
|
||||
length = value.length;
|
||||
value14 = Reflect.apply(substring, r14, [length]);
|
||||
r11 = value;
|
||||
r14 = value14;
|
||||
r15 = value13;
|
||||
r16 = value4;
|
||||
} else {
|
||||
value = r10 + r14[value2];
|
||||
value6 = r14.substring(1);
|
||||
r14 = value6;
|
||||
r15 = r8;
|
||||
r16 = value;
|
||||
}
|
||||
length = r14.length;
|
||||
if (length > value2) {
|
||||
r8 = r15;
|
||||
r10 = r16;
|
||||
continue;
|
||||
}
|
||||
r6 = r15;
|
||||
r9 = r16;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r6 = value2;
|
||||
r9 = value4;
|
||||
}
|
||||
if (r9 != null && value4 !== r9) {
|
||||
push = items2.push;
|
||||
binding = env1_3;
|
||||
value = fixMatchIndex(r9.match(env1_2), r6);
|
||||
_nonTokenType = this._nonTokenType;
|
||||
value = new binding(value);
|
||||
Reflect.apply(push, items2, [value]);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function value_76055() { // fn#76055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1628, offset: 0x01dc2d16, size: 87 bytes, params: 1, frame: 18
|
||||
var propertyName;
|
||||
var _followers2;
|
||||
var property;
|
||||
this._rules.forEach(function({cache}) {
|
||||
return cache?.clear();
|
||||
});
|
||||
for (propertyName in this._followers) {
|
||||
_followers2 = this._followers;
|
||||
property = _followers2[propertyName];
|
||||
property.forEach(function({cache}) {
|
||||
return cache?.clear();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function value_76058(a0, a1, a2) { // fn#76058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1854, offset: 0x01dc2d8d, size: 113 bytes, params: 4, frame: 20
|
||||
let value = null;
|
||||
const type = value != a1 ? a1.type : value;
|
||||
const value2 = undefined;
|
||||
let r0 = (value == a1 ? value2 : a1.end) !== a2 ? value2 : getMatch(a0, this._followers[global.String(type)], a2);
|
||||
if (value == r0) {
|
||||
value = environment.__proto__;
|
||||
value = getMatch(a0, this._rules, a2);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function Token(a0, a1) { // fn#76060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:2048, offset: 0x01dc2ecf, size: 215 bytes, params: 3, frame: 19
|
||||
var items2;
|
||||
var match;
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, Token);
|
||||
if (a0 instanceof Token) {
|
||||
match = a0.match;
|
||||
items2 = [];
|
||||
arraySpread(items2, match, 0, undefined);
|
||||
this.match = items2;
|
||||
this.start = a0.start;
|
||||
this.type = a0.type;
|
||||
if (a0._data != null) {
|
||||
this._data = a0._data;
|
||||
}
|
||||
} else if (a0 != null) {
|
||||
items2 = [];
|
||||
value = 0;
|
||||
arraySpread(items2, a0, value, undefined);
|
||||
this.match = items2;
|
||||
this.start = typeof a0 === 'string' ? value : a0.index ?? value;
|
||||
this.type = a1;
|
||||
} else {
|
||||
this.match = [];
|
||||
this.start = 0;
|
||||
this.type = a1;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76050(a0) { // fn#76050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:746, offset: 0x01dc2a1d, size: 23 bytes, params: 2, frame: 11
|
||||
return env0_0.addRule(a0);
|
||||
}
|
||||
|
||||
function _fun76053(a0) { // fn#76053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1046, offset: 0x01dc2b50, size: 109 bytes, params: 2, frame: 13
|
||||
if (env0_0._followers[a0] == null) {
|
||||
env0_0._followers[a0] = [];
|
||||
}
|
||||
env0_0._followers[a0].push({regex: regex, type: type, validator: validator, cache: env0_1});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
/* Metro module 4883; source: lib/RTCBandwidthMonitor.tsx; dependencies: [6, 7, 22, 2] */
|
||||
function _fun42790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:6, offset: 0x01142287, size: 169 bytes, params: 8, frame: 18
|
||||
const _arrayLikeToArray_42793 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = [];
|
||||
let value = _fun42794();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCBandwidthMonitor.tsx');
|
||||
exports.default = value;
|
||||
exports.getRTCTotalBytes = getRTCTotalBytes;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_42791(a0, a1) { // fn#42791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:120, offset: 0x01142330, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun42792;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_42793(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_42793(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_42793(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun42792;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun42794() { // fn#42794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1041, offset: 0x011424a2, size: 85 bytes, params: 1, frame: 16
|
||||
return env0_3(RTCBandwidthMonitor, [{key: 'getTotalBytes', value: value_42797}], [{key: 'create',
|
||||
value: value_42798}]);
|
||||
}
|
||||
|
||||
function getRTCTotalBytes() { // fn#42799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1848, offset: 0x011426fe, size: 59 bytes, params: 1, frame: 13
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
const sum = defaultImport.sum;
|
||||
const binding = env0_4;
|
||||
return Reflect.apply(sum, defaultImport, [binding.map(function(a0) {
|
||||
return a0.getTotalBytes();
|
||||
})]);
|
||||
}
|
||||
|
||||
function RTCBandwidthMonitor() { // fn#42795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1052, offset: 0x011424f7, size: 52 bytes, params: 1, frame: 14
|
||||
env1_2(this, RTCBandwidthMonitor);
|
||||
this.bytes = {};
|
||||
this.record = record_42796;
|
||||
}
|
||||
|
||||
function value_42797() { // fn#42797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1598, offset: 0x01142689, size: 65 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
const sum = value.sum;
|
||||
const Object = global.Object;
|
||||
return Reflect.apply(sum, value, [Object.values(this.bytes)]);
|
||||
}
|
||||
|
||||
function value_42798() { // fn#42798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1679, offset: 0x011426ca, size: 52 bytes, params: 1, frame: 11
|
||||
const rTCBandwidthMonitor = new RTCBandwidthMonitor();
|
||||
env1_4.push(rTCBandwidthMonitor);
|
||||
return rTCBandwidthMonitor.record;
|
||||
}
|
||||
|
||||
function RTCBandwidthMonitorRecord(a0) { // fn#42796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1137, owner: RTCBandwidthMonitor.record, offset: 0x0114252b, size: 350 bytes, params: 2, frame: 31
|
||||
var r16;
|
||||
var r3;
|
||||
var r1;
|
||||
var rtp;
|
||||
var inbound;
|
||||
var value;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var _createForOfIteratorHelperLoose_42791Binding;
|
||||
var inbound2;
|
||||
var value3;
|
||||
var value4;
|
||||
var done;
|
||||
var value5;
|
||||
var type;
|
||||
var value6;
|
||||
var bytes;
|
||||
var bytesReceived;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var bytesSent;
|
||||
var value11;
|
||||
if (a0 != null) {
|
||||
rtp = a0.rtp;
|
||||
inbound = rtp.inbound;
|
||||
value = environment.__proto__.__proto__;
|
||||
for (propertyName in inbound) {
|
||||
_createForOfIteratorHelperLoose_42791Binding = _createForOfIteratorHelperLoose_42791;
|
||||
rtp = a0.rtp;
|
||||
inbound2 = rtp.inbound;
|
||||
value3 = _createForOfIteratorHelperLoose_42791Binding(inbound2[propertyName]);
|
||||
value4 = value3();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
r16 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
r3 = value4;
|
||||
while (true) {
|
||||
value5 = r3.value;
|
||||
type = value5.type;
|
||||
value6 = 'inbound-' + propertyName + '-' + type;
|
||||
bytes = env0_0.bytes;
|
||||
if (!(value6 in bytes)) {
|
||||
env0_0.bytes[value6] = 0;
|
||||
}
|
||||
bytes = env0_0.bytes;
|
||||
bytesReceived = value5.bytesReceived;
|
||||
bytes[value6] = bytesReceived;
|
||||
value7 = value3();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
r16 = propertyName2;
|
||||
break;
|
||||
}
|
||||
r3 = value7;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
_createForOfIteratorHelperLoose_42791Binding = _createForOfIteratorHelperLoose_42791;
|
||||
rtp = a0.rtp;
|
||||
value = _createForOfIteratorHelperLoose_42791Binding(rtp.outbound);
|
||||
value8 = value();
|
||||
done = value8.done;
|
||||
if (!done) {
|
||||
r1 = value8;
|
||||
while (true) {
|
||||
value9 = r1.value;
|
||||
type = value9.type;
|
||||
value10 = 'outbound-' + type;
|
||||
bytes = env0_0.bytes;
|
||||
if (!(value10 in bytes)) {
|
||||
env0_0.bytes[value10] = 0;
|
||||
}
|
||||
bytes = env0_0.bytes;
|
||||
bytesSent = value9.bytesSent;
|
||||
bytes[value10] = bytesSent;
|
||||
value11 = value();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r1 = value11;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,12 @@
|
||||
/* Metro module 4405; source: lib/RTCConnectionEvent.tsx; dependencies: [2] */
|
||||
function _fun37439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4577:6, offset: 0x010a529e, size: 224 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCConnectionEvent.tsx');
|
||||
exports.RTCConnectionEvent = {State: 'state', Speaking: 'speaking',
|
||||
VideoSourceQualityChanged: 'video-source-quality-changed', Video: 'video', Flags: 'flags', Platform: 'platform',
|
||||
Ping: 'ping', ClientConnect: 'client-connect', ClientDisconnect: 'client-disconnect',
|
||||
OutboundLossRate: 'outboundlossrate', SecureFramesUpdate: 'secure-frames-update',
|
||||
RosterMapUpdate: 'roster-map-update', UsersMerged: 'users-merged'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Metro module 12387; source: lib/RTCConnectionStats.tsx; dependencies: [6, 7, 661, 4303, 22, 12388, 2] */
|
||||
function _fun94355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:6, offset: 0x02114f1f, size: 160 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
|
||||
const value = _fun94356();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCConnectionStats.tsx');
|
||||
exports.StateHistory = value;
|
||||
}
|
||||
|
||||
function _fun94356() { // fn#94356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:149, offset: 0x02114fbf, size: 138 bytes, params: 1, frame: 15
|
||||
return env0_4(StateHistory, [{key: 'reset', value: function(a0) {
|
||||
this.current = null;
|
||||
this.history = [];
|
||||
if (a0 != null) {
|
||||
this.update(a0);
|
||||
}
|
||||
}}, {key: 'update', value: value_94359}, {key: 'getVoiceConnectionSuccessStats', value: value_94360},
|
||||
{key: 'getStateDurations', value: value_94363}]);
|
||||
}
|
||||
|
||||
function StateHistory(a0) { // fn#94357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:170, offset: 0x02115049, size: 63 bytes, params: 2, frame: 14
|
||||
env1_3(this, StateHistory);
|
||||
this.current = null;
|
||||
this.history = [];
|
||||
if (a0 != null) {
|
||||
this.update(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function value_94359(a0) { // fn#94359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:388, offset: 0x021150b3, size: 86 bytes, params: 2, frame: 14
|
||||
var history;
|
||||
var push;
|
||||
var object2;
|
||||
var value;
|
||||
if (this.current !== a0) {
|
||||
this.current = a0;
|
||||
history = this.history;
|
||||
push = history.push;
|
||||
object2 = {state: a0};
|
||||
value = environment.__proto__;
|
||||
value = require(4303) /* metro dependency 4303: TimeUtils */;
|
||||
object2.startTime = value.now();
|
||||
Reflect.apply(push, history, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function value_94360() { // fn#94360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:534, offset: 0x02115109, size: 229 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var r5;
|
||||
let value = a0;
|
||||
if (value !== undefined) {
|
||||
r5 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = require(4303) /* metro dependency 4303: TimeUtils */;
|
||||
value = value.now();
|
||||
r5 = value;
|
||||
}
|
||||
const closure = totalDuration;
|
||||
const env0_0 = this.getStateDurations(r5);
|
||||
const object2 = {};
|
||||
value = environment.__proto__;
|
||||
const AWAITING_ENDPOINT = RTCConnectionStates.AWAITING_ENDPOINT;
|
||||
object2.state_awaiting_endpoint_ms = closure(AWAITING_ENDPOINT);
|
||||
const AUTHENTICATING = RTCConnectionStates.AUTHENTICATING;
|
||||
object2.state_authenticating_ms = closure(AUTHENTICATING);
|
||||
const CONNECTING = RTCConnectionStates.CONNECTING;
|
||||
object2.state_connecting_ms = closure(CONNECTING);
|
||||
const DISCONNECTED = RTCConnectionStates.DISCONNECTED;
|
||||
object2.state_disconnected_ms = closure(DISCONNECTED);
|
||||
const ICE_CHECKING = RTCConnectionStates.ICE_CHECKING;
|
||||
object2.state_ice_checking_ms = closure(ICE_CHECKING);
|
||||
const NO_ROUTE = RTCConnectionStates.NO_ROUTE;
|
||||
object2.state_no_route_ms = closure(NO_ROUTE);
|
||||
const RTC_CONNECTING = RTCConnectionStates.RTC_CONNECTING;
|
||||
object2.state_rtc_connecting_ms = closure(RTC_CONNECTING);
|
||||
const RTC_DISCONNECTED = RTCConnectionStates.RTC_DISCONNECTED;
|
||||
object2.state_rtc_disconnected_ms = closure(RTC_DISCONNECTED);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_94363(a0) { // fn#94363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:1145, offset: 0x02115249, size: 142 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
if (this.history.length === 0) {
|
||||
return [];
|
||||
}
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(12388) /* metro dependency 12388: zipWithNext */;
|
||||
value = value(this.history, function(a0, a1) {
|
||||
return {state: a0.state, durationMs: a1.startTime - a0.startTime};
|
||||
});
|
||||
const push = value.push;
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
const value2 = defaultImport.last(this.history);
|
||||
Reflect.apply(push, value, [{state: value2.state, durationMs: a0 - value2.startTime}]);
|
||||
return value;
|
||||
}
|
||||
|
||||
function totalDuration(a0) { // fn#94361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:592, owner: value_94360.totalDuration, offset: 0x021151ee, size: 62 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
return value.sumBy(env0_0, _fun94362);
|
||||
}
|
||||
|
||||
function _fun94362(a0) { // fn#94362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:642, offset: 0x0211522c, size: 29 bytes, params: 2, frame: 4
|
||||
return a0.state !== env0_0 ? 0 : a0.durationMs;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,288 @@
|
||||
/* Metro module 1886; source: lib/Record.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun20494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:6, offset: 0x00eca79a, size: 145 bytes, params: 8, frame: 18
|
||||
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 value = _fun20495();
|
||||
const value2 = _fun20501();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Record.tsx');
|
||||
exports.default = value;
|
||||
exports.TypedRecord = value2;
|
||||
}
|
||||
|
||||
function _fun20495() { // fn#20495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:118, offset: 0x00eca82b, size: 124 bytes, params: 1, frame: 15
|
||||
return env0_1(Record_20496, [{key: 'toJS', value: function() {
|
||||
var r1;
|
||||
var object = {};
|
||||
copyDataProperties(object, this, r1);
|
||||
return object;
|
||||
}}, {key: 'set', value: function(a0, a1) {
|
||||
var r1;
|
||||
var r0;
|
||||
var object;
|
||||
var value = this;
|
||||
var property = value[a0];
|
||||
if (a1 instanceof global.Date) {
|
||||
if (property instanceof global.Date) {
|
||||
if (a1.getTime() === property.getTime()) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if (property === a1) {
|
||||
r1 = value;
|
||||
} else {
|
||||
property = value.constructor;
|
||||
object = {};
|
||||
copyDataProperties(object, value, value);
|
||||
object[a0] = a1;
|
||||
r1 = new property();
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
if (property === a1) {
|
||||
r1 = value;
|
||||
} else {
|
||||
property = value.constructor;
|
||||
object = {};
|
||||
copyDataProperties(object, value, value);
|
||||
object[a0] = a1;
|
||||
r1 = new property();
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
if (property === a1) {
|
||||
r1 = value;
|
||||
} else {
|
||||
property = value.constructor;
|
||||
object = {};
|
||||
copyDataProperties(object, value, value);
|
||||
object[a0] = a1;
|
||||
r1 = new property();
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'merge', value: value_20499}, {key: 'update', value: value_20500}]);
|
||||
}
|
||||
|
||||
function _fun20501() { // fn#20501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:861, offset: 0x00ecaa98, size: 124 bytes, params: 1, frame: 15
|
||||
return env0_1(TypedRecord, [{key: 'toJS', value: function() {
|
||||
var r1;
|
||||
var object = {};
|
||||
copyDataProperties(object, this, r1);
|
||||
return object;
|
||||
}}, {key: 'set', value: function(a0, a1) {
|
||||
return this.merge({[a0]: a1});
|
||||
}}, {key: 'merge', value: value_20505}, {key: 'update', value: value_20506}]);
|
||||
}
|
||||
|
||||
function value_20499(a0) { // fn#20499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:417, offset: 0x00eca924, size: 228 bytes, params: 2, frame: 29
|
||||
var r19;
|
||||
var r5;
|
||||
var r9;
|
||||
var r15;
|
||||
var r3;
|
||||
var r0;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var hasOwnProperty;
|
||||
var property;
|
||||
var property2;
|
||||
var Date;
|
||||
var value3;
|
||||
var value4;
|
||||
var getTime;
|
||||
var time;
|
||||
var value6;
|
||||
var object2;
|
||||
var constructor;
|
||||
const value = this;
|
||||
const value2 = null;
|
||||
const properties = Object.keys(a0);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r3 = value2;
|
||||
} else {
|
||||
r5 = value2;
|
||||
r9 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r9];
|
||||
propertyName2 = r9 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r3 = r5;
|
||||
break;
|
||||
}
|
||||
hasOwnProperty = a0.hasOwnProperty;
|
||||
if (!Reflect.apply(hasOwnProperty, a0, [propertyName])) {
|
||||
r9 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
property = value[propertyName];
|
||||
property2 = a0[propertyName];
|
||||
Date = global.Date;
|
||||
value3 = property2 instanceof Date;
|
||||
if (!value3) {
|
||||
r15 = value3;
|
||||
continue;
|
||||
}
|
||||
Date = global.Date;
|
||||
value4 = property instanceof Date;
|
||||
r15 = value4;
|
||||
if (!r15) {
|
||||
continue;
|
||||
}
|
||||
time = property2.getTime();
|
||||
getTime = property.getTime;
|
||||
value6 = time === Reflect.apply(getTime, property, []);
|
||||
r15 = value6;
|
||||
r19 = time;
|
||||
if (r15) {
|
||||
r9 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
if (property === property2) {
|
||||
continue;
|
||||
}
|
||||
if (value2 != r5) {
|
||||
r15 = r5;
|
||||
continue;
|
||||
}
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, r19);
|
||||
r15 = object2;
|
||||
r15[propertyName] = a0[propertyName];
|
||||
r5 = r15;
|
||||
r9 = propertyName2;
|
||||
}
|
||||
}
|
||||
if (value2 == r3) {
|
||||
r0 = value;
|
||||
} else {
|
||||
constructor = value.constructor;
|
||||
constructor = new constructor();
|
||||
r0 = constructor;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_20500(a0, a1, a2) { // fn#20500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:673, offset: 0x00ecaa08, size: 144 bytes, params: 4, frame: 19
|
||||
var r1;
|
||||
var r5;
|
||||
var r0;
|
||||
var r4;
|
||||
var object;
|
||||
const value = a1;
|
||||
const value2 = a2;
|
||||
if (value2 != null) {
|
||||
r1 = value;
|
||||
r5 = value2;
|
||||
} else {
|
||||
r1 = undefined;
|
||||
r5 = value;
|
||||
}
|
||||
const property = this[a0];
|
||||
if (property instanceof Record_20496) {
|
||||
r4 = property;
|
||||
} else {
|
||||
if (property instanceof global.Array) {
|
||||
object = [];
|
||||
arraySpread(object, property, 0, property);
|
||||
r0 = object;
|
||||
} else if (property instanceof global.Object) {
|
||||
object = {};
|
||||
copyDataProperties(object, property, undefined);
|
||||
r0 = object;
|
||||
} else {
|
||||
r0 = property;
|
||||
}
|
||||
r4 = r0;
|
||||
}
|
||||
r4 = r4 === undefined ? r1 : r4;
|
||||
return this.set(a0, r5(r4));
|
||||
}
|
||||
|
||||
function value_20505(a0) { // fn#20505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:1054, offset: 0x00ecab31, size: 137 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var r6;
|
||||
var r3;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var hasOwnProperty;
|
||||
var property;
|
||||
var value3;
|
||||
var constructor;
|
||||
const value = this;
|
||||
const value2 = null;
|
||||
const properties = Object.keys(a0);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r3 = value2;
|
||||
} else {
|
||||
r0 = value2;
|
||||
r6 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r6];
|
||||
propertyName2 = r6 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r3 = r0;
|
||||
break;
|
||||
}
|
||||
hasOwnProperty = a0.hasOwnProperty;
|
||||
if (!Reflect.apply(hasOwnProperty, a0, [propertyName])) {
|
||||
r6 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
property = a0[propertyName];
|
||||
if (value[propertyName] === property) {
|
||||
r6 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
if (value2 != r0) {
|
||||
continue;
|
||||
}
|
||||
value3 = value.toJS();
|
||||
r0 = value3;
|
||||
r0[propertyName] = a0[propertyName];
|
||||
r6 = propertyName2;
|
||||
}
|
||||
}
|
||||
if (value2 == r3) {
|
||||
r0 = value;
|
||||
} else {
|
||||
constructor = value.constructor;
|
||||
constructor = new constructor();
|
||||
r0 = constructor;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_20506(a0, a1, a2) { // fn#20506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:1243, offset: 0x00ecabba, size: 130 bytes, params: 4, frame: 18
|
||||
var r1;
|
||||
var r5;
|
||||
var object;
|
||||
const value = a1;
|
||||
const property = this[a0];
|
||||
if (property instanceof env1_2) {
|
||||
r5 = property;
|
||||
} else {
|
||||
if (property instanceof global.Array) {
|
||||
object = [];
|
||||
arraySpread(object, property, 0, property);
|
||||
r1 = object;
|
||||
} else if (property instanceof global.Object) {
|
||||
object = {};
|
||||
copyDataProperties(object, property, undefined);
|
||||
r1 = object;
|
||||
} else {
|
||||
r1 = property;
|
||||
}
|
||||
r5 = r1;
|
||||
}
|
||||
r5 = r5 === undefined ? value : r5;
|
||||
return this.set(a0, a2(r5));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 4403; source: lib/SoundshareStatsAggregator.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun37422(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:6, offset: 0x010a4ac6, size: 124 bytes, params: 8, frame: 18
|
||||
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 value = _fun37423();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SoundshareStatsAggregator.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun37423() { // fn#37423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:118, offset: 0x010a4b42, size: 80 bytes, params: 1, frame: 15
|
||||
return env0_1(SoundshareStatsAggregator, [{key: 'traceEvent', value: value_37425}, {key: 'getStats',
|
||||
value: function() {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, this._report, r2);
|
||||
object['soundshare_unique_pids'] = this._pids.size;
|
||||
return object;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function SoundshareStatsAggregator() { // fn#37424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:139, offset: 0x010a4b92, size: 81 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
env1_0(this, SoundshareStatsAggregator);
|
||||
this._report = {'soundshare_attach_requested_count': 0, 'soundshare_capturing_count': 0,
|
||||
'soundshare_capture_stopped_count': 0, 'soundshare_hooked_count': 0, 'soundshare_recv_connect_count': 0,
|
||||
'soundshare_recv_disconnect_count': 0, 'soundshare_recv_started_count': 0, 'soundshare_recv_stopped_count': 0,
|
||||
'soundshare_recv_failed_count': 0, 'soundshare_recv_format_count': 0, 'soundshare_send_announce_count': 0,
|
||||
'soundshare_send_start_count': 0, 'soundshare_send_stop_count': 0, 'soundshare_malformed_trace_count': 0,
|
||||
'soundshare_audio_detected_count': 0, 'soundshare_state_transition_detached_count': 0,
|
||||
'soundshare_state_transition_waiting_count': 0, 'soundshare_state_transition_attached_count': 0,
|
||||
'soundshare_state_transition_started_count': 0, 'soundshare_state_transition_playing_count': 0,
|
||||
'soundshare_state_transition_silence_count': 0, 'soundshare_unknown_event_count': 0, 'soundshare_first_pid': 0,
|
||||
'soundshare_last_pid': 0, 'soundshare_unique_pids': 0, 'soundshare_first_session': null,
|
||||
'soundshare_last_session': null};
|
||||
const Set = global.Set;
|
||||
this._pids = new Set();
|
||||
}
|
||||
|
||||
function value_37425(a0, a1) { // fn#37425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:1179, offset: 0x010a4be3, size: 264 bytes, params: 3, frame: 18
|
||||
var property;
|
||||
var soundshare_unknown_event_count;
|
||||
var pid;
|
||||
var _pids;
|
||||
var add;
|
||||
const _report = this._report;
|
||||
const r6 = a1.type === 'soundshare_state_transition' ? 'soundshare_state_transition_' + ['detached', 'waiting',
|
||||
'attached', 'started', 'playing', 'silence'][a1.newState] + '_count' : '' + a1.type + '_count';
|
||||
if (_report[r6] !== undefined) {
|
||||
if (_report[r6] < 32767) {
|
||||
property = _report[r6];
|
||||
_report[r6] = typeof property === 'bigint' ? property + 1n : +property + 1;
|
||||
}
|
||||
} else {
|
||||
soundshare_unknown_event_count = _report.soundshare_unknown_event_count;
|
||||
_report.soundshare_unknown_event_count = typeof soundshare_unknown_event_count === 'bigint' ? soundshare_unknown_event_count + 1n : +soundshare_unknown_event_count + 1;
|
||||
}
|
||||
if ('pid' in a1) {
|
||||
if (_report.soundshare_first_pid === 0) {
|
||||
_report.soundshare_first_pid = a1.pid;
|
||||
}
|
||||
pid = a1.pid;
|
||||
_report.soundshare_last_pid = pid;
|
||||
_pids = this._pids;
|
||||
add = _pids.add;
|
||||
pid = a1.pid;
|
||||
Reflect.apply(add, _pids, [pid]);
|
||||
}
|
||||
if (a0 != null) {
|
||||
if (_report.soundshare_first_session == null) {
|
||||
_report.soundshare_first_session = a0;
|
||||
}
|
||||
_report.soundshare_last_session = a0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/* Metro module 12530; source: lib/StateManager.tsx; dependencies: [6, 7, 644, 2] */
|
||||
function _fun95468(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:6, offset: 0x0214705e, size: 134 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const value = _fun95469();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/StateManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun95469() { // fn#95469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:118, offset: 0x021470e4, size: 186 bytes, params: 1, frame: 15
|
||||
return env0_3(StateManager, [{key: 'shouldCommit', value: function() {
|
||||
return true;
|
||||
}}, {key: 'setState', value: function(a0) {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, copyDataProperties(object, this.state, r2));
|
||||
this.state = object;
|
||||
}}, {key: 'getState', value: function() {
|
||||
return this.state;
|
||||
}}, {key: 'reset', value: function() {
|
||||
this.dirty = false;
|
||||
this.state = this.getInitialState();
|
||||
}}, {key: 'update', value: value_95475}, {key: 'forceUpdate', value: function() {
|
||||
this.dirty = false;
|
||||
this.didCommit(this.state);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function StateManager() { // fn#95470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:139, offset: 0x0214719e, size: 66 bytes, params: 1, frame: 14
|
||||
let value = a0;
|
||||
const r1 = !(value !== undefined) || value;
|
||||
value = environment.__proto__;
|
||||
env1_2(this, StateManager);
|
||||
this.alwaysUpdateState = r1;
|
||||
this.dirty = false;
|
||||
const getInitialState = this.getInitialState;
|
||||
this.state = Reflect.apply(getInitialState, this, []);
|
||||
}
|
||||
|
||||
function value_95475() { // fn#95475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:533, offset: 0x02147224, size: 300 bytes, params: 1, frame: 20
|
||||
var r6;
|
||||
var value3;
|
||||
var length;
|
||||
var value4;
|
||||
var value5;
|
||||
var property;
|
||||
var dirty;
|
||||
var defaultImport;
|
||||
var property2;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
let value = a0;
|
||||
const value2 = a1;
|
||||
const r5 = value !== undefined ? value : {};
|
||||
let r0 = value2 !== undefined ? value2 : false;
|
||||
const getNextState = this.getNextState;
|
||||
const object2 = {};
|
||||
let state = this.state;
|
||||
copyDataProperties(object2, state, undefined);
|
||||
copyDataProperties(object2, r5, undefined);
|
||||
value = Reflect.apply(getNextState, this, [object2]);
|
||||
if (r0) {
|
||||
value8 = environment.__proto__;
|
||||
this.dirty = !(importDefault(644) /* metro dependency 644 */)(value, this.getInitialState());
|
||||
} else {
|
||||
value3 = global.Object.keys(value);
|
||||
length = value3.length;
|
||||
value4 = 0;
|
||||
value5 = environment.__proto__;
|
||||
if (value4 < length) {
|
||||
r6 = value4;
|
||||
while (true) {
|
||||
property = value3[r6];
|
||||
dirty = this.dirty;
|
||||
if (dirty) {
|
||||
r0 = dirty;
|
||||
} else {
|
||||
defaultImport = importDefault(644) /* metro dependency 644 */;
|
||||
state = this.state;
|
||||
property2 = state[property];
|
||||
value6 = !defaultImport(property2, value[property]);
|
||||
r0 = value6;
|
||||
}
|
||||
this.dirty = r0;
|
||||
value7 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
|
||||
length = value3.length;
|
||||
if (value7 < length) {
|
||||
r6 = value7;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.dirty && this.shouldCommit() || this.alwaysUpdateState) {
|
||||
this.state = value;
|
||||
}
|
||||
if (r0) {
|
||||
this.dirty = false;
|
||||
this.didCommit(this.state);
|
||||
r0 = true;
|
||||
} else {
|
||||
r0 = !!r0;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,234 @@
|
||||
/* Metro module 7137; source: lib/SystemResources.tsx; dependencies: [5, 6, 7, 7131, 5256, 7138, 2] */
|
||||
function _fun57111(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:6, offset: 0x013dcbb5, size: 152 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 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const value = _fun57112();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SystemResources.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun57112() { // fn#57112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:128, offset: 0x013dcc4d, size: 197 bytes, params: 1, frame: 17
|
||||
const binding = env0_5;
|
||||
const closure = SystemResources;
|
||||
const items2 = [{key: 'getStats', value: value_57114}];
|
||||
items2[1] = {key: 'takeSample', value: value_57115};
|
||||
const binding2 = env0_3;
|
||||
const env0_2 = binding2(_fun57117);
|
||||
items2[2] = {key: 'getCurrentBattery', value: value_57118};
|
||||
const env0_1 = binding2(_fun57120);
|
||||
items2[3] = {key: 'setLastBattery', value: value_57121};
|
||||
const env0_0 = binding2(_fun57123);
|
||||
items2[4] = {key: 'getBatteryLevelStats', value: value_57124};
|
||||
return binding(closure, items2);
|
||||
}
|
||||
|
||||
function SystemResources() { // fn#57113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:149, offset: 0x013dcd12, size: 172 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
env1_4(this, SystemResources);
|
||||
const Histogram = (require(7131) /* metro dependency 7131: Histogram */).Histogram;
|
||||
const value3 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
|
||||
let histogram = new Histogram();
|
||||
this.cpuHistogram = histogram instanceof Object ? histogram : value3;
|
||||
const value5 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
|
||||
histogram = new Histogram();
|
||||
this.memoryHistogram = histogram instanceof Object ? histogram : value5;
|
||||
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
|
||||
const getCumulativeCPUUsage = value.getCumulativeCPUUsage;
|
||||
this.startCPU = Reflect.apply(getCumulativeCPUUsage, value, []);
|
||||
this.lastCPU = this.startCPU;
|
||||
this.lastBattery = null;
|
||||
}
|
||||
|
||||
function value_57114() { // fn#57114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:405, offset: 0x013dcdbe, size: 404 bytes, params: 1, frame: 19
|
||||
var r2;
|
||||
var usage;
|
||||
var value6;
|
||||
var sampleTime;
|
||||
const report = this.cpuHistogram.getReport();
|
||||
const report2 = this.memoryHistogram.getReport();
|
||||
const value4 = undefined;
|
||||
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
|
||||
let startCPU = this.startCPU;
|
||||
if (startCPU == null) {
|
||||
r2 = value4;
|
||||
} else if (cumulativeCPUUsage == null) {
|
||||
r2 = value4;
|
||||
} else {
|
||||
usage = cumulativeCPUUsage.usage;
|
||||
startCPU = this.startCPU;
|
||||
value6 = 100 * (usage - startCPU.usage);
|
||||
sampleTime = cumulativeCPUUsage.sampleTime;
|
||||
startCPU = this.startCPU;
|
||||
r2 = value6 / ((sampleTime - startCPU.sampleTime) / 1000);
|
||||
}
|
||||
r2 = r2 ?? report.mean;
|
||||
return {client_performance_cpu_percentile25: report.percentiles[25],
|
||||
client_performance_cpu_percentile50: report.percentiles[50],
|
||||
client_performance_cpu_percentile75: report.percentiles[75],
|
||||
client_performance_cpu_percentile90: report.percentiles[90],
|
||||
client_performance_cpu_percentile95: report.percentiles[95], client_performance_cpu_mean: r2,
|
||||
client_performance_memory_percentile25: report2.percentiles[25],
|
||||
client_performance_memory_percentile50: report2.percentiles[50],
|
||||
client_performance_memory_percentile75: report2.percentiles[75],
|
||||
client_performance_memory_percentile90: report2.percentiles[90],
|
||||
client_performance_memory_percentile95: report2.percentiles[95], client_performance_memory_min: report2.min,
|
||||
client_performance_memory_max: report2.max, client_performance_memory_mean: report2.mean};
|
||||
}
|
||||
|
||||
function value_57115() { // fn#57115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1383, offset: 0x013dcf52, size: 257 bytes, params: 1, frame: 21
|
||||
var r5;
|
||||
var lastCPU;
|
||||
var value4;
|
||||
let value = environment.__proto__;
|
||||
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
|
||||
const currentMemoryUsageKB = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentMemoryUsageKB();
|
||||
if (cumulativeCPUUsage != null) {
|
||||
lastCPU = this.lastCPU;
|
||||
value = true;
|
||||
if (lastCPU != null) {
|
||||
value4 = cumulativeCPUUsage.sampleTime - this.lastCPU.sampleTime;
|
||||
if (value4 >= 1) {
|
||||
this.cpuHistogram.addSample((cumulativeCPUUsage.usage - this.lastCPU.usage) / (value4 / 1000) * 100,
|
||||
value4);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = false;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
this.lastCPU = cumulativeCPUUsage;
|
||||
}
|
||||
} else {
|
||||
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
|
||||
value = value.getCurrentCPUUsagePercent();
|
||||
if (value != null) {
|
||||
this.cpuHistogram.addSample(value);
|
||||
}
|
||||
}
|
||||
if (currentMemoryUsageKB != null) {
|
||||
this.memoryHistogram.addSample(currentMemoryUsageKB);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun57117() { // fn#57117, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1841, offset: 0x013dd05c, size: 84 bytes, params: 1, frame: 13
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var getDeviceState;
|
||||
var object2;
|
||||
var value3;
|
||||
var batteryLevel;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property = binding2[5];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
getDeviceState = value.getDeviceState;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
object2.fallback = false;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(getDeviceState, value, [object2]);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value3 = false;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
if (value3) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
batteryLevel = value.batteryLevel;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
return batteryLevel;
|
||||
}
|
||||
|
||||
function* _fun57120() { // fn#57120, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2044, offset: 0x013dd0b9, size: 47 bytes, params: 1, frame: 11
|
||||
if (true) {
|
||||
var getCurrentBattery = this.getCurrentBattery;
|
||||
yield Reflect.apply(getCurrentBattery, this, []);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
this.lastBattery = value;
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun57123() { // fn#57123, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2207, offset: 0x013dd0f1, size: 151 bytes, params: 1, frame: 17
|
||||
var r2;
|
||||
var object2;
|
||||
var Math;
|
||||
var round;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const getCurrentBattery = this.getCurrentBattery;
|
||||
yield Reflect.apply(getCurrentBattery, this, []);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
let lastBattery = this.lastBattery;
|
||||
if (lastBattery == null) {
|
||||
r2 = {startBattery: this.lastBattery, currentBattery: value, batteryUsageRounded: null};
|
||||
} else if (value == null) {
|
||||
r2 = {startBattery: this.lastBattery, currentBattery: value, batteryUsageRounded: null};
|
||||
} else {
|
||||
object2 = {};
|
||||
lastBattery = this.lastBattery;
|
||||
object2.startBattery = lastBattery;
|
||||
object2.currentBattery = value;
|
||||
Math = global.Math;
|
||||
round = Math.round;
|
||||
lastBattery = this.lastBattery;
|
||||
object2.batteryUsageRounded = Reflect.apply(round, Math, [1000 * (value - lastBattery)]) / 1000;
|
||||
r2 = object2;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
/* Metro module 12404; source: lib/SystemResponsiveness.tsx; dependencies: [6, 7, 22, 7131, 4406, 2] */
|
||||
function _fun94566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:6, offset: 0x0211d8c7, size: 160 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_94569 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = _fun94570();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SystemResponsiveness.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_94567(a0, a1) { // fn#94567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:120, offset: 0x0211d967, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun94568;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_94569(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_94569(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_94569(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun94568;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun94570() { // fn#94570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1036, offset: 0x0211dadb, size: 111 bytes, params: 1, frame: 15
|
||||
return env0_4(SystemResponsiveness, [{key: 'start', value: function() {
|
||||
var connection = this.connection;
|
||||
var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats;
|
||||
connection.on(Stats, this.sampleStats);
|
||||
}}, {key: 'stop', value: function() {
|
||||
var connection = this.connection;
|
||||
var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats;
|
||||
connection.off(Stats, this.sampleStats);
|
||||
}}, {key: 'getPttQueueLatencyStats', value: function() {
|
||||
var value = this.pttQueueLatencyHistogram.getReport([50, 95]);
|
||||
return {ptt_queue_latency_max: value.max, ptt_queue_latency_mean: value.mean,
|
||||
ptt_queue_latency_p50: value.percentiles[50], ptt_queue_latency_p95: value.percentiles[95],
|
||||
ptt_queue_latency_samples: value.samples};
|
||||
}}]);
|
||||
}
|
||||
|
||||
function SystemResponsiveness(a0) { // fn#94571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1057, offset: 0x0211db4a, size: 107 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, SystemResponsiveness);
|
||||
this.connection = a0;
|
||||
this.sampleStats = sampleStats;
|
||||
const Histogram = (require(7131) /* metro dependency 7131: Histogram */).Histogram;
|
||||
this.pttQueueLatencyHistogram = new Histogram();
|
||||
}
|
||||
|
||||
function SystemResponsivenessSampleStats(a0) { // fn#94572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1154, owner: SystemResponsiveness.sampleStats, offset: 0x0211dbb5, size: 70 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(a0.rtp.outbound, _fun94573);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun94573(a0) { // fn#94573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1199, offset: 0x0211dbfb, size: 116 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var r1;
|
||||
var value;
|
||||
var _createForOfIteratorHelperLoose_94567Binding;
|
||||
var pttQueueLatencyMicrosSamples;
|
||||
var value2;
|
||||
var done;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var pttQueueLatencyHistogram;
|
||||
var addSample;
|
||||
var value6;
|
||||
reducibleJoin5: while (true) {
|
||||
if (a0.type !== 'audio') {
|
||||
break reducibleJoin5;
|
||||
}
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
_createForOfIteratorHelperLoose_94567Binding = _createForOfIteratorHelperLoose_94567;
|
||||
pttQueueLatencyMicrosSamples = a0.pttQueueLatencyMicrosSamples;
|
||||
reducibleJoin3: while (true) {
|
||||
if (pttQueueLatencyMicrosSamples != null) {
|
||||
r0 = pttQueueLatencyMicrosSamples;
|
||||
break reducibleJoin3;
|
||||
}
|
||||
r0 = [];
|
||||
break reducibleJoin3;
|
||||
}
|
||||
value = _createForOfIteratorHelperLoose_94567Binding(r0);
|
||||
value2 = value();
|
||||
done = value2.done;
|
||||
value3 = environment.__proto__;
|
||||
if (done) {
|
||||
break reducibleJoin5;
|
||||
}
|
||||
r1 = value2;
|
||||
reducibleLoop4: while (true) {
|
||||
value4 = r1.value;
|
||||
value5 = value4 / 1000;
|
||||
pttQueueLatencyHistogram = env1_0.pttQueueLatencyHistogram;
|
||||
addSample = pttQueueLatencyHistogram.addSample;
|
||||
Reflect.apply(addSample, pttQueueLatencyHistogram, [value5]);
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break reducibleJoin5;
|
||||
}
|
||||
r1 = value6;
|
||||
continue reducibleLoop4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/* Metro module 14953; source: lib/TapSequencer.tsx; dependencies: [57, 6, 7, 31, 2] */
|
||||
function _fun113090(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:6, offset: 0x023e88e1, size: 243 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(57) /* metro dependency 57 */;
|
||||
let env0_1 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_3 = value.useState;
|
||||
const env0_4 = value.useEffect;
|
||||
const env0_6 = {'long': 1250, 'short': 500};
|
||||
value = _fun113091();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/TapSequencer.tsx');
|
||||
exports.TapSequencerPressType = {SHORT: 'short', LONG: 'long'};
|
||||
exports.TapSequencer = value;
|
||||
exports.useTapSequencer = function(a0) {
|
||||
var property = a0(useState(_fun113100), 1)[0];
|
||||
var env0_1 = property;
|
||||
useEffect(_fun113101);
|
||||
return property;
|
||||
};
|
||||
}
|
||||
|
||||
function _fun113091() { // fn#113091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:247, offset: 0x023e89d4, size: 138 bytes, params: 1, frame: 15
|
||||
return env0_2(TapSequencer, [{key: 'setTapSequenceHandlers', value: function(a0) {
|
||||
this.tapSequenceHandlers = a0;
|
||||
}}, {key: 'getState', value: value_113096}, {key: 'progressState', value: function(a0) {
|
||||
var r1;
|
||||
var object;
|
||||
var value = null;
|
||||
if (value == a0) {
|
||||
r1 = value;
|
||||
} else {
|
||||
object = {handlers: a0};
|
||||
object.timestamp = global.Date.now();
|
||||
r1 = object;
|
||||
}
|
||||
this._state = r1;
|
||||
}}, {key: 'handlePress', value: function(a0) {
|
||||
var r4;
|
||||
var value = this.getState(a0);
|
||||
var progressState = this.progressState;
|
||||
var property = value[a0];
|
||||
var value2 = undefined;
|
||||
if (property == null) {
|
||||
r4 = value2;
|
||||
} else {
|
||||
value = property.call(value);
|
||||
r4 = value;
|
||||
}
|
||||
Reflect.apply(progressState, this, [r4 ?? value2]);
|
||||
return value2;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function useTapSequencer(a0) { // fn#113099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1095, offset: 0x023e8bea, size: 71 bytes, params: 2, frame: 15
|
||||
const property = a0(useState(_fun113100), 1)[0];
|
||||
useEffect(_fun113101);
|
||||
return property;
|
||||
}
|
||||
|
||||
function TapSequencer(a0) { // fn#113092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:268, offset: 0x023e8a5e, size: 76 bytes, params: 2, frame: 14
|
||||
env1_1(this, TapSequencer);
|
||||
this.tapSequenceHandlers = a0;
|
||||
this._state = null;
|
||||
this.handleShortPress = handleShortPress;
|
||||
this.handleLongPress = handleLongPress;
|
||||
}
|
||||
|
||||
function value_113096(a0) { // fn#113096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:562, offset: 0x023e8afc, size: 110 bytes, params: 2, frame: 12
|
||||
const Date = global.Date;
|
||||
const value = Date.now();
|
||||
if (this._state === null || this._state.timestamp + env1_6[a0] < value) {
|
||||
this._state = {handlers: this.tapSequenceHandlers, timestamp: value};
|
||||
}
|
||||
return this._state.handlers;
|
||||
}
|
||||
|
||||
function _fun113100() { // fn#113100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1132, offset: 0x023e8c31, size: 66 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_7;
|
||||
const r0 = typeof env0_0 === 'function' ? env0_0() : env0_0;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
const binding2 = new binding();
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
|
||||
function _fun113101() { // fn#113101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1194, offset: 0x023e8c73, size: 55 bytes, params: 1, frame: 13
|
||||
const binding = env0_1;
|
||||
binding.setTapSequenceHandlers(typeof env0_0 === 'function' ? env0_0() : env0_0);
|
||||
}
|
||||
|
||||
function handleShortPress() { // fn#113093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:380, owner: TapSequencer.handleShortPress, offset: 0x023e8aaa, size: 33 bytes, params: 1, frame: 11
|
||||
const binding = env0_0;
|
||||
const handlePress = binding.handlePress;
|
||||
const SHORT = env2_5.SHORT;
|
||||
return Reflect.apply(handlePress, binding, [SHORT]);
|
||||
}
|
||||
|
||||
function TapSequencerHandleLongPress() { // fn#113094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:431, owner: TapSequencer.handleLongPress, offset: 0x023e8acb, size: 33 bytes, params: 1, frame: 11
|
||||
const binding = env0_0;
|
||||
const handlePress = binding.handlePress;
|
||||
const LONG = env2_5.LONG;
|
||||
return Reflect.apply(handlePress, binding, [LONG]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,319 @@
|
||||
/* Metro module 12407; source: lib/VideoHealthManager.tsx; dependencies: [6, 7, 661, 3, 12408, 4303, 672, 4140, 2] */
|
||||
function _fun94656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:6, offset: 0x0212289e, size: 204 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
|
||||
const value = _fun94657();
|
||||
object2 = {'featureEnabled': null, 'windowLength': 5, 'allowedPoorFpsRatio': 1, 'fpsThreshold': 5,
|
||||
'backoffTimeSec': 15};
|
||||
object2.featureEnabled = (require(4140) /* metro dependency 4140: PlatformUtils */).isMobile;
|
||||
value.defaultConfig = object2;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VideoHealthManager.tsx');
|
||||
exports.VideoHealthManager = value;
|
||||
}
|
||||
|
||||
function _fun94657() { // fn#94657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:145, offset: 0x0212296a, size: 346 bytes, params: 1, frame: 15
|
||||
return env0_4(VideoHealthManager, [{key: 'calculateFps', value: value_94659}, {key: 'updateFps',
|
||||
value: value_94660}, {key: 'startReenableBackoffTimer', value: value_94662}, {key: 'queueReenable',
|
||||
value: function(a0) {
|
||||
this.enableQueue.push(a0);
|
||||
this.tryReenableQueue();
|
||||
}}, {key: 'tryReenableQueue', value: function() {
|
||||
var property;
|
||||
var value;
|
||||
reducibleJoin7: while (true) {
|
||||
if (this.disabled) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
if (this.probingUserId != null) {
|
||||
if (this.probingUserId in this.perUserFpsWindow) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
}
|
||||
property = this.enableQueue;
|
||||
value = property.shift();
|
||||
if (value == null) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
if (this.reenableVideo(value)) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
reducibleLoop5: while (true) {
|
||||
if (value == null) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
if (this.reenableVideo(value)) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
}
|
||||
}}, {key: 'reenableVideo', value: value_94666}, {key: 'elapsedSeconds', value: function(a0, a1) {
|
||||
return (a0 - a1) / 1000;
|
||||
}}, {key: 'stateCleanupBeforeEnable', value: function(a0) {
|
||||
this.logger.info('VideoHealthManager::stateCleanupBeforeEnable');
|
||||
this.perUserFpsWindow[a0] = [];
|
||||
this.prevFramesCodec[a0] = -1;
|
||||
this.streamDisabledUsers.delete(a0);
|
||||
}}, {key: 'getCurrentVideoToggleState', value: function(a0) {
|
||||
return this.currentVideoAutoToggleState[a0];
|
||||
}}, {key: 'createUser', value: value_94670}, {key: 'deleteUser', value: value_94671}, {key: 'disable',
|
||||
value: function() {
|
||||
var propertyName;
|
||||
this.disabled = true;
|
||||
for (propertyName in this.perUserFpsWindow) {
|
||||
this.deleteUser(propertyName);
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function VideoHealthManager(a0, a1, a2, a3) { // fn#94658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:166, offset: 0x02122ac4, size: 330 bytes, params: 5, frame: 26
|
||||
let value = environment.__proto__;
|
||||
env1_3(this, VideoHealthManager);
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('VideoHealthManager');
|
||||
this.logger = value;
|
||||
this.disabled = false;
|
||||
this.perUserFpsWindow = {};
|
||||
this.prevFramesCodec = {};
|
||||
this.prevTimestamp = {};
|
||||
const Set = global.Set;
|
||||
this.streamDisabledUsers = new Set();
|
||||
this.retryBackoffCache = {};
|
||||
this.timeoutIdCache = {};
|
||||
this.currentVideoAutoToggleState = {};
|
||||
this.enableQueue = [];
|
||||
this.windowLength = a0;
|
||||
this.fpsThreshold = a2;
|
||||
const Math = global.Math;
|
||||
this.fpsWindowBorderlineCount = Math.ceil(a0 * a1);
|
||||
this.backoffTimeSec = a3;
|
||||
let logger = this.logger;
|
||||
logger.enableNativeLogger(true);
|
||||
logger = this.logger;
|
||||
logger.info('constructor with windowLength = ' + this.windowLength + ',\n fpsWindowBorderlineCount = ' + this.fpsWindowBorderlineCount + ',\n fpsThreshold = ' + this.fpsThreshold + ',\n backoffTimeSec = ' + a3);
|
||||
}
|
||||
|
||||
function value_94659(a0, a1, a2) { // fn#94659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:889, offset: 0x02122c0e, size: 243 bytes, params: 4, frame: 16
|
||||
if (this.prevFramesCodec[a0] === -1) {
|
||||
this.prevFramesCodec[a0] = a1;
|
||||
this.prevTimestamp[a0] = a2;
|
||||
this.perUserFpsWindow[a0] = [];
|
||||
return global.NaN;
|
||||
}
|
||||
if (a1 < this.prevFramesCodec[a0]) {
|
||||
this.prevFramesCodec[a0] = a1;
|
||||
this.prevTimestamp[a0] = a2;
|
||||
this.perUserFpsWindow[a0] = [];
|
||||
return global.NaN;
|
||||
}
|
||||
if (a2 < this.prevTimestamp[a0]) {
|
||||
this.prevFramesCodec[a0] = a1;
|
||||
this.prevTimestamp[a0] = a2;
|
||||
this.perUserFpsWindow[a0] = [];
|
||||
return global.NaN;
|
||||
}
|
||||
if (a2 > this.prevTimestamp[a0] + 1000 * this.windowLength) {
|
||||
this.prevFramesCodec[a0] = a1;
|
||||
this.prevTimestamp[a0] = a2;
|
||||
this.perUserFpsWindow[a0] = [];
|
||||
return global.NaN;
|
||||
}
|
||||
if (a2 < this.prevTimestamp[a0] + 900) {
|
||||
return global.NaN;
|
||||
}
|
||||
let value = this.elapsedSeconds(a2, this.prevTimestamp[a0]);
|
||||
this.prevTimestamp[a0] = a2;
|
||||
value = (a1 - this.prevFramesCodec[a0]) / value;
|
||||
this.prevFramesCodec[a0] = a1;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_94660(a0, a1, a2) { // fn#94660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:1338, offset: 0x02122d01, size: 538 bytes, params: 4, frame: 19
|
||||
var environment;
|
||||
var perUserFpsWindow;
|
||||
var property;
|
||||
var length;
|
||||
var windowLength;
|
||||
var currentVideoAutoToggleState;
|
||||
var AUTO_ENABLED;
|
||||
var DISABLED;
|
||||
if (!this.disabled) {
|
||||
var streamDisabledUsers = this.streamDisabledUsers;
|
||||
if (streamDisabledUsers.has(a0)) {
|
||||
return undefined;
|
||||
}
|
||||
var value = this.calculateFps(a0, a1, a2);
|
||||
if (value < 0) {
|
||||
return undefined;
|
||||
}
|
||||
var Number = global.Number;
|
||||
if (Number.isFinite(value)) {
|
||||
perUserFpsWindow = this.perUserFpsWindow;
|
||||
property = perUserFpsWindow[a0];
|
||||
property.push(value);
|
||||
perUserFpsWindow = this.perUserFpsWindow;
|
||||
length = perUserFpsWindow[a0].length;
|
||||
windowLength = this.windowLength;
|
||||
if (length < windowLength) {
|
||||
return undefined;
|
||||
}
|
||||
perUserFpsWindow = this.perUserFpsWindow;
|
||||
length = perUserFpsWindow[a0].length;
|
||||
windowLength = this.windowLength;
|
||||
if (length > windowLength) {
|
||||
this.perUserFpsWindow[a0].shift();
|
||||
}
|
||||
perUserFpsWindow = this.perUserFpsWindow;
|
||||
property = perUserFpsWindow[a0];
|
||||
length = property.filter(_fun94661).length;
|
||||
if (length >= this.fpsWindowBorderlineCount) {
|
||||
this.logger.info('' + a0 + ': detected poor network quality, turning off video');
|
||||
this.streamDisabledUsers.add(a0);
|
||||
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
|
||||
value = environment.__proto__;
|
||||
DISABLED = VideoToggleState.DISABLED;
|
||||
currentVideoAutoToggleState[a0] = DISABLED;
|
||||
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
|
||||
DISABLED = VideoToggleState.DISABLED;
|
||||
value(a0, DISABLED);
|
||||
this.startReenableBackoffTimer(a0);
|
||||
} else {
|
||||
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
|
||||
property = currentVideoAutoToggleState[a0];
|
||||
value = environment.__proto__;
|
||||
if (property === VideoToggleState.AUTO_PROBING) {
|
||||
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
|
||||
AUTO_ENABLED = VideoToggleState.AUTO_ENABLED;
|
||||
currentVideoAutoToggleState[a0] = AUTO_ENABLED;
|
||||
this.logger.info('acceptable conditions reached, will reset and send a AUTO_ENABLED for user ' + a0);
|
||||
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
|
||||
AUTO_ENABLED = VideoToggleState.AUTO_ENABLED;
|
||||
value(a0, AUTO_ENABLED);
|
||||
}
|
||||
}
|
||||
if (this.probingUserId === a0) {
|
||||
this.probingUserId = undefined;
|
||||
this.tryReenableQueue();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_94662(a0) { // fn#94662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:2309, offset: 0x02122f31, size: 361 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
var r7;
|
||||
var logger;
|
||||
var retryBackoffCache;
|
||||
var property;
|
||||
var lastBackoffTime;
|
||||
var expBackoffFactor;
|
||||
var value;
|
||||
var elapsedSeconds;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var object2;
|
||||
const env0_1 = a0;
|
||||
if (!this.disabled) {
|
||||
logger = this.logger;
|
||||
logger.info('startReenableBackoffTimer for user ' + a0);
|
||||
retryBackoffCache = this.retryBackoffCache;
|
||||
property = retryBackoffCache[a0];
|
||||
lastBackoffTime = property.lastBackoffTime;
|
||||
expBackoffFactor = property.expBackoffFactor;
|
||||
value = 1;
|
||||
if (lastBackoffTime === null) {
|
||||
r7 = value;
|
||||
} else if (expBackoffFactor > 16) {
|
||||
r7 = value;
|
||||
} else {
|
||||
elapsedSeconds = this.elapsedSeconds;
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4303) /* metro dependency 4303: TimeUtils */;
|
||||
r7 = Reflect.apply(elapsedSeconds, this, [moduleValue.now(),
|
||||
lastBackoffTime]) > 600 ? value : expBackoffFactor * 2;
|
||||
}
|
||||
retryBackoffCache = this.retryBackoffCache;
|
||||
object2 = {};
|
||||
value = environment.__proto__;
|
||||
object2.lastBackoffTime = (require(4303) /* metro dependency 4303: TimeUtils */).now();
|
||||
object2.expBackoffFactor = r7;
|
||||
retryBackoffCache[a0] = object2;
|
||||
value = r7 * this.backoffTimeSec * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
|
||||
logger = this.logger;
|
||||
logger.info('starting backoff timer with time = ' + value + ' milliseconds');
|
||||
this.timeoutIdCache[a0] = global.setTimeout(_fun94663, value);
|
||||
}
|
||||
}
|
||||
|
||||
function value_94666(a0) { // fn#94666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:3130, offset: 0x0212313c, size: 176 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var logger;
|
||||
var info;
|
||||
var currentVideoAutoToggleState;
|
||||
var AUTO_PROBING;
|
||||
let value = a0 in this.perUserFpsWindow;
|
||||
if (value) {
|
||||
logger = this.logger;
|
||||
info = logger.info;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(info, logger,
|
||||
['reenableVideo called for user ' + a0 + ' - time = ' + (require(4303) /* metro dependency 4303: TimeUtils */).now()]);
|
||||
this.stateCleanupBeforeEnable(a0);
|
||||
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
|
||||
AUTO_PROBING = VideoToggleState.AUTO_PROBING;
|
||||
currentVideoAutoToggleState[a0] = AUTO_PROBING;
|
||||
this.probingUserId = a0;
|
||||
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
|
||||
AUTO_PROBING = VideoToggleState.AUTO_PROBING;
|
||||
value(a0, AUTO_PROBING);
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_94670(a0) { // fn#94670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:3784, offset: 0x02123263, size: 141 bytes, params: 2, frame: 14
|
||||
var currentVideoAutoToggleState;
|
||||
var value;
|
||||
this.logger.info('VideoHealthManager::createUser ' + a0);
|
||||
if (!(a0 in this.perUserFpsWindow)) {
|
||||
this.perUserFpsWindow[a0] = [];
|
||||
this.prevFramesCodec[a0] = -1;
|
||||
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
|
||||
value = environment.__proto__;
|
||||
currentVideoAutoToggleState[a0] = VideoToggleState.NONE;
|
||||
this.retryBackoffCache[a0] = {'lastBackoffTime': null, 'expBackoffFactor': 1};
|
||||
}
|
||||
}
|
||||
|
||||
function value_94671(a0) { // fn#94671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:4074, offset: 0x021232f0, size: 166 bytes, params: 2, frame: 15
|
||||
this.logger.info('VideoHealthManager::deleteUser ' + a0);
|
||||
delete this.perUserFpsWindow[a0];
|
||||
delete this.prevFramesCodec[a0];
|
||||
delete this.retryBackoffCache[a0];
|
||||
delete this.currentVideoAutoToggleState[a0];
|
||||
this.streamDisabledUsers.delete(a0);
|
||||
if (a0 === this.probingUserId) {
|
||||
this.probingUserId = undefined;
|
||||
this.tryReenableQueue();
|
||||
}
|
||||
global.clearTimeout(this.timeoutIdCache[a0]);
|
||||
delete this.timeoutIdCache[a0];
|
||||
}
|
||||
|
||||
function _fun94661(a0) { // fn#94661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:1683, offset: 0x02122f1b, size: 22 bytes, params: 2, frame: 2
|
||||
return a0 < env0_0.fpsThreshold;
|
||||
}
|
||||
|
||||
function _fun94663() { // fn#94663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:2774, offset: 0x0212309a, size: 28 bytes, params: 1, frame: 11
|
||||
env0_0.queueReenable(env0_1);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,99 @@
|
||||
/* Metro module 10680; source: lib/VideoSpinnerTimer.tsx; dependencies: [6, 7, 1226, 1379, 4401, 4294, 4297, 661, 3, 4303, 683, 2] */
|
||||
function _fun82116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:6, offset: 0x01eebbcd, size: 350 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
map = _fun82117();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VideoSpinnerTimer.tsx');
|
||||
exports.VideoSpinnerContext = {SELF_VIDEO: 'self_video', SELF_STREAM: 'self_stream', REMOTE_VIDEO: 'remote_video',
|
||||
REMOTE_STREAM: 'remote_stream', CHANGE_VIDEO_BACKGROUND: 'change_video_background',
|
||||
REPLAY_VIDEO_STREAM: 'replay_video_stream'};
|
||||
exports.VideoSpinnerTimer = map;
|
||||
}
|
||||
|
||||
function _fun82117() { // fn#82117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:447, offset: 0x01eebd2b, size: 88 bytes, params: 1, frame: 15
|
||||
return env0_4(VideoSpinnerTimer, [{key: 'onSpinnerStarted', value: value_82119}, {key: 'trackSpinnerDuration',
|
||||
value: value_82120}]);
|
||||
}
|
||||
|
||||
function VideoSpinnerTimer(a0) { // fn#82118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:468, offset: 0x01eebd83, size: 84 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
env1_3(this, VideoSpinnerTimer);
|
||||
this.spinnerVisibleStart = null;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value(a0);
|
||||
this.logger = value;
|
||||
}
|
||||
|
||||
function value_82119() { // fn#82119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:615, offset: 0x01eebdd7, size: 59 bytes, params: 1, frame: 12
|
||||
var value;
|
||||
if (this.spinnerVisibleStart == null) {
|
||||
value = environment.__proto__;
|
||||
value = require(4303) /* metro dependency 4303: TimeUtils */;
|
||||
this.spinnerVisibleStart = value.now();
|
||||
}
|
||||
}
|
||||
|
||||
function value_82120(a0, a1, a2) { // fn#82120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:735, offset: 0x01eebe12, size: 575 bytes, params: 4, frame: 27
|
||||
var r6;
|
||||
var value2;
|
||||
var binding;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var value7;
|
||||
var guildId;
|
||||
var value9;
|
||||
var channel;
|
||||
var track;
|
||||
var VIDEO_SPINNER_SHOWN_V2;
|
||||
var object2;
|
||||
const spinnerVisibleStart = this.spinnerVisibleStart;
|
||||
let value = null;
|
||||
if (value != spinnerVisibleStart) {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_11;
|
||||
value3 = binding.get(a2);
|
||||
value4 = 0;
|
||||
value5 = (value != value3 ? value3 : value4) + 1;
|
||||
binding = env1_11;
|
||||
binding.set(a2, value5);
|
||||
value7 = (require(4303) /* metro dependency 4303: TimeUtils */).now() - this.spinnerVisibleStart;
|
||||
this.spinnerVisibleStart = value;
|
||||
if (value7 < value4) {
|
||||
this.logger.warn('spinner duration is negative: ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
|
||||
} else {
|
||||
this.logger.info('spinner visible for ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
|
||||
guildId = RTCConnectionStore.getGuildId();
|
||||
value9 = VoiceStateStore.getUserVoiceChannelId(guildId, AuthenticationStore.getId());
|
||||
channel = ChannelStore.getChannel(value9);
|
||||
r6 = value != channel ? channel.isGuildVoice() ? 'guild_voice' : channel.isGuildStageVoice() ? 'is_stage_channel' : channel.isDM() ? 'dm' : channel.isGroupDM() ? 'group_dm' : value : value;
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = value.track;
|
||||
VIDEO_SPINNER_SHOWN_V2 = AnalyticEvents.VIDEO_SPINNER_SHOWN_V2;
|
||||
object2 = {video_spinner_context: a0, duration_video_spinner_visible_ms: value7};
|
||||
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
|
||||
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
|
||||
object2.event_count_for_stream = value5;
|
||||
object2.guild_id = guildId;
|
||||
object2.channel_id = value9;
|
||||
object2.channel_type = r6;
|
||||
object2.spinning_user_id = a1;
|
||||
object2.connection_type = NetworkStore.getType();
|
||||
object2.effective_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
|
||||
object2.service_provider = NetworkStore.getServiceProvider();
|
||||
Reflect.apply(track, value, [VIDEO_SPINNER_SHOWN_V2, object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,315 @@
|
||||
/* Metro module 12405; source: lib/VoiceDuration.tsx; dependencies: [6, 7, 4303, 4464, 2] */
|
||||
function _fun94577(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:6, offset: 0x0211dd63, size: 162 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = [1, 100, 1000, 10000];
|
||||
const env0_5 = [100, 500, 1000, 5000];
|
||||
const value = _fun94578();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VoiceDuration.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun94578() { // fn#94578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:156, offset: 0x0211de05, size: 313 bytes, params: 1, frame: 15
|
||||
return env0_3(VoiceDuration, [{key: 'start', value: value_94580}, {key: 'onSpeaking', value: value_94584},
|
||||
{key: 'onListening', value: value_94585}, {key: 'onMuted', value: function(a0) {
|
||||
var muted = this.muted;
|
||||
if (a0) {
|
||||
muted.start();
|
||||
} else {
|
||||
muted.stop();
|
||||
}
|
||||
}}, {key: 'onDeafened', value: function(a0) {
|
||||
var deafened = this.deafened;
|
||||
if (a0) {
|
||||
deafened.start();
|
||||
} else {
|
||||
deafened.stop();
|
||||
}
|
||||
}}, {key: 'computeSpeakingDurationMilestones', value: value_94588}, {key: 'addSpeechChunk', value: value_94592},
|
||||
{key: 'setNoiseCancellationEnabled', value: function(a0) {
|
||||
this.noiseCancellation.value = a0;
|
||||
}}, {key: 'setSpatialAudioEnabled', value: function(a0) {
|
||||
this.spatialAudio.value = a0;
|
||||
}}, {key: 'stop', value: value_94597}, {key: 'getDurationStats', value: value_94598}]);
|
||||
}
|
||||
|
||||
function VoiceDuration(a0, a1) { // fn#94579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:177, offset: 0x0211df3e, size: 634 bytes, params: 3, frame: 19
|
||||
let value = a2;
|
||||
const r4 = value !== undefined ? value : (require(4303) /* metro dependency 4303: TimeUtils */).TimeStampProducer;
|
||||
value = environment.__proto__;
|
||||
env1_2(this, VoiceDuration);
|
||||
this.userId = a0;
|
||||
this.connection = a1;
|
||||
this.timestampProducer = r4;
|
||||
const Set = global.Set;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set();
|
||||
this.listeningUsers = set instanceof Object ? set : value3;
|
||||
let Map = global.Map;
|
||||
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
let map = new Map();
|
||||
this.timesUntilSpeakingDurationMilestonesMs = map instanceof Object ? map : value5;
|
||||
Map = global.Map;
|
||||
const value7 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
this.speakingMinimumChunks = map instanceof Object ? map : value7;
|
||||
Map = global.Map;
|
||||
const value9 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
this.speakingMinimumChunkCounts = map instanceof Object ? map : value9;
|
||||
this.speechEventCount = 0;
|
||||
const StopWatch = (require(4303) /* metro dependency 4303: TimeUtils */).StopWatch;
|
||||
let timestampProducer = this.timestampProducer;
|
||||
let stopWatch = new StopWatch(timestampProducer);
|
||||
this.listening = stopWatch;
|
||||
this.speaking = new StopWatch(this.timestampProducer);
|
||||
this.participation = new StopWatch(this.timestampProducer);
|
||||
this.connected = new StopWatch(this.timestampProducer);
|
||||
this.muted = new StopWatch(this.timestampProducer);
|
||||
this.deafened = new StopWatch(this.timestampProducer);
|
||||
const DurationEnabled = (require(4303) /* metro dependency 4303: TimeUtils */).DurationEnabled;
|
||||
stopWatch = a1.getNoiseCancellation();
|
||||
timestampProducer = this.timestampProducer;
|
||||
const value11 = Object.create(DurationEnabled.prototype, {constructor: {value: DurationEnabled}});
|
||||
let durationEnabled = new DurationEnabled(stopWatch, timestampProducer);
|
||||
this.noiseCancellation = durationEnabled instanceof Object ? durationEnabled : value11;
|
||||
stopWatch = a1.getSpatialAudioEnabled();
|
||||
timestampProducer = this.timestampProducer;
|
||||
const value12 = Object.create(DurationEnabled.prototype, {constructor: {value: DurationEnabled}});
|
||||
durationEnabled = new DurationEnabled(stopWatch, timestampProducer);
|
||||
this.spatialAudio = durationEnabled instanceof Object ? durationEnabled : value12;
|
||||
}
|
||||
|
||||
function value_94580() { // fn#94580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1082, offset: 0x0211e1b8, size: 420 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
let value = a0;
|
||||
const value2 = a1;
|
||||
const r8 = value !== undefined ? value : false;
|
||||
const r7 = value2 !== undefined ? value2 : false;
|
||||
this.listeningUsers.clear();
|
||||
this.listening.reset();
|
||||
this.speaking.reset();
|
||||
this.participation.reset();
|
||||
this.muted.reset();
|
||||
this.deafened.reset();
|
||||
this.connected.reset();
|
||||
this.noiseCancellation.reset();
|
||||
this.spatialAudio.reset();
|
||||
this.timesUntilSpeakingDurationMilestonesMs.clear();
|
||||
this.speakingMinimumChunks.clear();
|
||||
this.speakingMinimumChunkCounts.clear();
|
||||
this.speechEventCount = 0;
|
||||
this.connected.start();
|
||||
let connection = this.connection;
|
||||
let on = connection.on;
|
||||
value = environment.__proto__;
|
||||
const BaseConnectionEvent = (require(4464) /* metro dependency 4464: BaseConnectionEvent */).BaseConnectionEvent;
|
||||
const Speaking = BaseConnectionEvent.Speaking;
|
||||
Reflect.apply(on, connection, [Speaking, _fun94581]);
|
||||
this.onMuted(r8);
|
||||
this.onDeafened(r7);
|
||||
connection = this.connection;
|
||||
on = connection.on;
|
||||
const Mute = BaseConnectionEvent.Mute;
|
||||
Reflect.apply(on, connection, [Mute, _fun94582]);
|
||||
connection = this.connection;
|
||||
on = connection.on;
|
||||
const Deafen = BaseConnectionEvent.Deafen;
|
||||
Reflect.apply(on, connection, [Deafen, _fun94583]);
|
||||
}
|
||||
|
||||
function value_94584(a0) { // fn#94584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1848, offset: 0x0211e3d9, size: 170 bytes, params: 2, frame: 16
|
||||
var lastStartTime;
|
||||
var speaking;
|
||||
var lastStartTime2;
|
||||
var lastElapsed;
|
||||
var listening;
|
||||
var speechEventCount;
|
||||
if (a0) {
|
||||
this.speaking.start();
|
||||
this.participation.start();
|
||||
speechEventCount = this.speechEventCount;
|
||||
this.speechEventCount = typeof speechEventCount === 'bigint' ? speechEventCount + 1n : +speechEventCount + 1;
|
||||
} else {
|
||||
lastStartTime = this.connected.lastStartTime;
|
||||
speaking = this.speaking;
|
||||
lastStartTime2 = speaking.lastStartTime;
|
||||
speaking = this.speaking;
|
||||
lastElapsed = speaking.lastElapsed;
|
||||
this.addSpeechChunk();
|
||||
speaking = this.speaking;
|
||||
speaking.stop();
|
||||
listening = this.listening;
|
||||
if (!listening.isRunning()) {
|
||||
this.participation.stop();
|
||||
}
|
||||
this.computeSpeakingDurationMilestones(lastStartTime, lastStartTime2, lastElapsed);
|
||||
}
|
||||
}
|
||||
|
||||
function value_94585(a0, a1) { // fn#94585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2207, offset: 0x0211e483, size: 148 bytes, params: 3, frame: 14
|
||||
var speaking;
|
||||
const listeningUsers = this.listeningUsers;
|
||||
if (a0) {
|
||||
listeningUsers.add(a1);
|
||||
this.listening.start();
|
||||
this.participation.start();
|
||||
} else if (listeningUsers.delete(a1) && this.listeningUsers.size === 0) {
|
||||
this.listening.stop();
|
||||
speaking = this.speaking;
|
||||
if (!speaking.isRunning()) {
|
||||
this.participation.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_94588(a0, a1, a2) { // fn#94588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2646, offset: 0x0211e567, size: 132 bytes, params: 4, frame: 13
|
||||
var environment;
|
||||
var value;
|
||||
const env0_1 = a0;
|
||||
const env0_2 = a1;
|
||||
const env0_3 = a2;
|
||||
if (a0 != null) {
|
||||
if (a1 != null) {
|
||||
value = this.speaking.elapsed();
|
||||
var env0_4 = value.asMilliseconds();
|
||||
value = environment.__proto__;
|
||||
value = env1_4.filter(_fun94589);
|
||||
value = value.filter(_fun94590);
|
||||
value.forEach(_fun94591);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_94592() { // fn#94592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2921, offset: 0x0211e651, size: 95 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var timestampProducer;
|
||||
var value;
|
||||
const lastStartTime = this.speaking.lastStartTime;
|
||||
if (lastStartTime != null) {
|
||||
timestampProducer = this.timestampProducer;
|
||||
var env0_1 = timestampProducer.now() - lastStartTime;
|
||||
value = environment.__proto__;
|
||||
value = env1_5.filter(_fun94593);
|
||||
value.forEach(_fun94594);
|
||||
}
|
||||
}
|
||||
|
||||
function value_94597() { // fn#94597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3432, offset: 0x0211e76d, size: 172 bytes, params: 1, frame: 16
|
||||
this.addSpeechChunk();
|
||||
const lastStartTime = this.connected.lastStartTime;
|
||||
const lastStartTime2 = this.speaking.lastStartTime;
|
||||
const lastElapsed = this.speaking.lastElapsed;
|
||||
this.speaking.stop();
|
||||
this.listening.stop();
|
||||
this.participation.stop();
|
||||
this.connected.stop();
|
||||
this.muted.stop();
|
||||
this.noiseCancellation.value = false;
|
||||
this.spatialAudio.value = false;
|
||||
this.computeSpeakingDurationMilestones(lastStartTime, lastStartTime2, lastElapsed);
|
||||
}
|
||||
|
||||
function value_94598() { // fn#94598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3804, offset: 0x0211e819, size: 464 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
const lastStartTime = this.speaking.lastStartTime;
|
||||
let value = this.timestampProducer.now();
|
||||
if (lastStartTime != null) {
|
||||
value -= lastStartTime;
|
||||
}
|
||||
this.computeSpeakingDurationMilestones(this.connected.lastStartTime, this.speaking.lastStartTime,
|
||||
this.speaking.lastElapsed);
|
||||
const object2 = {};
|
||||
object2.duration_listening_ms = this.listening.elapsed().asMilliseconds();
|
||||
object2.duration_speaking_ms = this.speaking.elapsed().asMilliseconds();
|
||||
object2.duration_participation_ms = this.participation.elapsed().asMilliseconds();
|
||||
object2.duration_connected_ms = this.connected.elapsed().asMilliseconds();
|
||||
object2.duration_muted_ms = this.muted.elapsed().asMilliseconds();
|
||||
object2.duration_deafened_ms = this.deafened.elapsed().asMilliseconds();
|
||||
object2.duration_noise_cancellation_enabled_ms = this.noiseCancellation.totalDuration();
|
||||
object2.duration_spatial_ms = this.spatialAudio.totalDuration();
|
||||
object2.speech_event_count = this.speechEventCount;
|
||||
value = environment.__proto__;
|
||||
const value3 = env1_4.filter(_fun94599);
|
||||
copyDataProperties(object2, value3.reduce(_fun94600, {}), undefined);
|
||||
value = env1_5.filter(_fun94601);
|
||||
copyDataProperties(object2, value.reduce(_fun94602, {}), undefined);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun94581(a0, a1) { // fn#94581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1554, offset: 0x0211e35c, size: 75 bytes, params: 3, frame: 15
|
||||
const userId = env0_0.userId;
|
||||
if (userId === a0) {
|
||||
env0_0.onSpeaking(a1 !== 0);
|
||||
} else {
|
||||
env0_0.onListening(a1 !== 0, a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun94582(a0) { // fn#94582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1718, offset: 0x0211e3a7, size: 25 bytes, params: 2, frame: 11
|
||||
env0_0.onMuted(a0);
|
||||
}
|
||||
|
||||
function _fun94583(a0) { // fn#94583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1796, offset: 0x0211e3c0, size: 25 bytes, params: 2, frame: 11
|
||||
env0_0.onDeafened(a0);
|
||||
}
|
||||
|
||||
function _fun94589(a0) { // fn#94589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2740, offset: 0x0211e5eb, size: 31 bytes, params: 2, frame: 11
|
||||
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
|
||||
return !timesUntilSpeakingDurationMilestonesMs.has(a0);
|
||||
}
|
||||
|
||||
function _fun94590(a0) { // fn#94590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2805, offset: 0x0211e60a, size: 16 bytes, params: 2, frame: 2
|
||||
return env0_4 >= a0;
|
||||
}
|
||||
|
||||
function _fun94591(a0) { // fn#94591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2824, offset: 0x0211e61a, size: 55 bytes, params: 2, frame: 15
|
||||
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
|
||||
timesUntilSpeakingDurationMilestonesMs.set(a0, require - env0_1 + a0 - importDefault);
|
||||
}
|
||||
|
||||
function _fun94593(a0) { // fn#94593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3025, offset: 0x0211e6b0, size: 16 bytes, params: 2, frame: 2
|
||||
return env0_1 >= a0;
|
||||
}
|
||||
|
||||
function _fun94594(a0) { // fn#94594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3044, offset: 0x0211e6c0, size: 129 bytes, params: 2, frame: 18
|
||||
const value2 = env0_0.speakingMinimumChunks.get(a0);
|
||||
const value3 = 0;
|
||||
const r8 = value2 ?? value3;
|
||||
const binding = env0_0;
|
||||
binding.speakingMinimumChunks.set(a0, r8 + env0_1);
|
||||
env0_0.speakingMinimumChunkCounts.set(a0, (binding.speakingMinimumChunkCounts.get(a0) ?? value3) + 1);
|
||||
}
|
||||
|
||||
function _fun94599(a0) { // fn#94599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4593, offset: 0x0211e9e9, size: 28 bytes, params: 2, frame: 11
|
||||
return env0_0.timesUntilSpeakingDurationMilestonesMs.has(a0);
|
||||
}
|
||||
|
||||
function _fun94600(a0, a1) { // fn#94600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4657, offset: 0x0211ea05, size: 76 bytes, params: 3, frame: 14
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, a1);
|
||||
const value = 'time_to_first_' + a1 + 'ms_speech_ms';
|
||||
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
|
||||
const get = timesUntilSpeakingDurationMilestonesMs.get;
|
||||
object2[value] = Reflect.apply(get, timesUntilSpeakingDurationMilestonesMs, [a1]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun94601(a0) { // fn#94601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4777, offset: 0x0211ea51, size: 39 bytes, params: 2, frame: 12
|
||||
return env0_0.speakingMinimumChunks.has(a0) || env0_1 >= a0;
|
||||
}
|
||||
|
||||
function _fun94602(a0, a1) { // fn#94602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4830, offset: 0x0211ea78, size: 195 bytes, params: 3, frame: 19
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
const value = 'duration_speaking_gte_' + a1 + 'ms_ms';
|
||||
const value3 = env0_0.speakingMinimumChunks.get(a1);
|
||||
const value4 = 0;
|
||||
object2[value] = (value3 ?? value4) + (env0_1 >= a1 ? env0_1 : value4);
|
||||
object2['speech_event_count_gte_' + a1 + 'ms'] = (env0_0.speakingMinimumChunkCounts.get(a1) ?? value4) + (env0_1 >= a1 ? 1 : value4);
|
||||
return object2;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,207 @@
|
||||
/* Metro module 12410; source: lib/VoiceStateAnalytics.tsx; dependencies: [6, 7, 4259, 4297, 4300, 4291, 22, 2] */
|
||||
function _fun94684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:6, offset: 0x02123918, size: 204 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
|
||||
const env0_7 = (require(4291) /* metro dependency 4291: Constants */).SpeakingFlags;
|
||||
const value = _fun94685();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VoiceStateAnalytics.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun94685() { // fn#94685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:172, offset: 0x021239e4, size: 163 bytes, params: 1, frame: 15
|
||||
return env0_3(VoiceStateAnalytics, [{key: 'updateVoiceStates', value: value_94687}, {key: 'getStats',
|
||||
value: function() {
|
||||
var object = {max_voice_state_count: this.maxVoiceStateCount,
|
||||
total_voice_state_count: this.totalParticipants.size,
|
||||
max_listener_count: this.maxListenerCount, total_listener_count: this.totalListeners.size,
|
||||
max_speaker_count: this.maxSpeakerCount};
|
||||
var Object = global.Object;
|
||||
object.total_speaker_count = Object.keys(this.totalSpeakers).length;
|
||||
return object;
|
||||
}}, {key: 'getUserVoiceSettingsStats', value: value_94689}, {key: 'setSpeaking', value: value_94690},
|
||||
{key: 'setChannelId', value: value_94694}]);
|
||||
}
|
||||
|
||||
function VoiceStateAnalytics(a0, a1) { // fn#94686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:193, offset: 0x02123a87, size: 163 bytes, params: 3, frame: 15
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, VoiceStateAnalytics);
|
||||
this.maxVoiceStateCount = 1;
|
||||
let Set = global.Set;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set();
|
||||
this.totalParticipants = set instanceof Object ? set : value3;
|
||||
const NONE = SpeakingFlags.NONE;
|
||||
this.speaking = NONE;
|
||||
this.maxListenerCount = 0;
|
||||
Set = global.Set;
|
||||
this.totalListeners = new Set();
|
||||
this.maxSpeakerCount = 0;
|
||||
this.totalSpeakers = {};
|
||||
this.userId = a0;
|
||||
this.setChannelId(a1);
|
||||
}
|
||||
|
||||
function value_94687(a0, a1) { // fn#94687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:499, offset: 0x02123b2a, size: 164 bytes, params: 3, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
var totalSpeakers;
|
||||
var Math;
|
||||
var max;
|
||||
if (a1 === this.channelId) {
|
||||
this.totalParticipants.add(a0);
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value = environment.__proto__;
|
||||
value = SortedVoiceStateStore.countVoiceStatesForChannel(a1);
|
||||
this.maxVoiceStateCount = Reflect.apply(max, Math, [value, this.maxVoiceStateCount]);
|
||||
} else {
|
||||
value = a1 == null;
|
||||
r0 = value && a0 in this.totalSpeakers;
|
||||
if (r0) {
|
||||
totalSpeakers = this.totalSpeakers;
|
||||
value = environment.__proto__;
|
||||
totalSpeakers[a0] = SpeakingFlags.NONE;
|
||||
}
|
||||
value = a0 === this.userId;
|
||||
r0 = value && a1 != null;
|
||||
if (r0) {
|
||||
this.setChannelId(a1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_94689(a0) { // fn#94689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:1135, offset: 0x02123c42, size: 311 bytes, params: 2, frame: 23
|
||||
let value = environment.__proto__;
|
||||
const settings = MediaEngineStore.getSettings(a0);
|
||||
let Set = global.Set;
|
||||
let Object = global.Object;
|
||||
let set = new Set(Object.keys(settings.localMutes));
|
||||
Set = global.Set;
|
||||
Object = global.Object;
|
||||
set = new Set(Object.keys(settings.localVolumes));
|
||||
let userId = this.userId;
|
||||
set.delete(userId);
|
||||
userId = this.userId;
|
||||
set.delete(userId);
|
||||
const object2 = {};
|
||||
value = require(22) /* metro dependency 22 */;
|
||||
let intersection = value.intersection;
|
||||
let Array = global.Array;
|
||||
const value9 = Array.from(set);
|
||||
Array = global.Array;
|
||||
object2.num_local_voice_user_mutes = Reflect.apply(intersection, value, [value9,
|
||||
Array.from(this.totalParticipants)]).length;
|
||||
value = require(22) /* metro dependency 22 */;
|
||||
intersection = value.intersection;
|
||||
Array = global.Array;
|
||||
const value10 = Array.from(set);
|
||||
Array = global.Array;
|
||||
object2.num_local_voice_volumes = Reflect.apply(intersection, value, [value10,
|
||||
Array.from(this.totalParticipants)]).length;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_94690(a0, a1) { // fn#94690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:1533, offset: 0x02123d79, size: 362 bytes, params: 3, frame: 18
|
||||
var environment;
|
||||
var totalSpeakers;
|
||||
var value2;
|
||||
var Object;
|
||||
var values;
|
||||
var value3;
|
||||
var length;
|
||||
var Math;
|
||||
let value = environment.__proto__;
|
||||
const NONE = SpeakingFlags.NONE;
|
||||
if (a1 !== NONE) {
|
||||
value2 = VoiceStateStore.getVoiceStateForChannel(this.channelId, a0);
|
||||
if (value2 != null) {
|
||||
if (!value2.selfMute) {
|
||||
if (!value2.mute) {
|
||||
totalSpeakers = this.totalSpeakers;
|
||||
totalSpeakers[a0] = a1;
|
||||
Object = global.Object;
|
||||
values = Object.values;
|
||||
totalSpeakers = this.totalSpeakers;
|
||||
value3 = Reflect.apply(values, Object, [totalSpeakers]);
|
||||
length = value3.filter(function(a0) {
|
||||
return a0 !== SpeakingFlags.NONE;
|
||||
}).length;
|
||||
Math = global.Math;
|
||||
this.maxSpeakerCount = Math.max(this.maxSpeakerCount, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (a0 in this.totalSpeakers) {
|
||||
this.totalSpeakers[a0] = SpeakingFlags.NONE;
|
||||
}
|
||||
const userId = this.userId;
|
||||
if (userId === a0) {
|
||||
if (a1 === this.speaking) {
|
||||
return undefined;
|
||||
}
|
||||
if (a1 !== SpeakingFlags.NONE) {
|
||||
Object = global.Object;
|
||||
value = Object.values(VoiceStateStore.getVoiceStatesForChannel(this.channelId));
|
||||
value = value.filter(function(a0) {
|
||||
return !a0.selfDeaf && !a0.deaf;
|
||||
});
|
||||
value.forEach(_fun94693);
|
||||
Math = global.Math;
|
||||
this.maxListenerCount = Math.max(value.length, this.maxListenerCount);
|
||||
}
|
||||
this.speaking = a1;
|
||||
}
|
||||
}
|
||||
|
||||
function value_94694(a0) { // fn#94694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2176, offset: 0x02123f34, size: 221 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
var Set;
|
||||
var items;
|
||||
var prototype;
|
||||
var value;
|
||||
var set;
|
||||
var Object;
|
||||
var keys;
|
||||
var value2;
|
||||
if (a0 !== this.channelId) {
|
||||
this.channelId = a0;
|
||||
Set = global.Set;
|
||||
items = [this.userId];
|
||||
prototype = Set.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value = set instanceof Object ? set : value;
|
||||
this.totalParticipants = value;
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
value = environment.__proto__;
|
||||
value2 = Reflect.apply(keys, Object, [VoiceStateStore.getVoiceStatesForChannel(this.channelId)]);
|
||||
value2.forEach(_fun94695);
|
||||
this.maxVoiceStateCount = value2.length;
|
||||
this.speaking = SpeakingFlags.NONE;
|
||||
this.maxListenerCount = 0;
|
||||
Set = global.Set;
|
||||
prototype = Set.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value = set instanceof Object ? set : value;
|
||||
this.totalListeners = value;
|
||||
this.maxSpeakerCount = 0;
|
||||
this.totalSpeakers = {};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun94693({userId}) { // fn#94693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2029, offset: 0x02123f13, size: 33 bytes, params: 2, frame: 11
|
||||
return env0_0.totalListeners.add(userId);
|
||||
}
|
||||
|
||||
function _fun94695(a0) { // fn#94695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2347, offset: 0x02124011, size: 28 bytes, params: 2, frame: 11
|
||||
return env0_0.totalParticipants.add(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Metro module 10683; source: lib/WindowVisibilityUtils.native.tsx; dependencies: [7030, 661, 10684, 2] */
|
||||
function _fun82138(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10869:6, offset: 0x01eec82a, size: 136 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AppStates;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/WindowVisibilityUtils.native.tsx');
|
||||
exports.default = isDiscordVisible;
|
||||
}
|
||||
|
||||
function isDiscordVisible() { // fn#82139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10869:206, offset: 0x01eec8b2, size: 74 bytes, params: 1, frame: 12
|
||||
const state = AppStateStore.getState();
|
||||
const BACKGROUND = AppStates.BACKGROUND;
|
||||
const value3 = state === BACKGROUND;
|
||||
let value = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */;
|
||||
value = value.isInPipMode();
|
||||
return value3 ? value : !value3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
/* Metro module 10682; source: lib/WindowVisibilityVideoManager.tsx; dependencies: [6, 7, 15, 17, 18, 4041, 3, 672, 10683, 694, 10684, 4479, 2] */
|
||||
function _fun82127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:6, offset: 0x01eec358, size: 266 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(4479) /* metro dependency 4479: TypedEventEmitter */;
|
||||
value = _fun82131(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/WindowVisibilityVideoManager.tsx');
|
||||
exports.WindowVisibilityEvent = {WindowVisibilityChanged: 'window-visibility-changed',
|
||||
IncomingVideoEnabledChanged: 'incoming-video-enabled-changed'};
|
||||
exports.WindowVisibilityVideoManager = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_82128() { // fn#82128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:148, offset: 0x01eec462, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_82128_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun82131(a0) { // fn#82131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:496, offset: 0x01eec4c4, size: 124 bytes, params: 2, frame: 16
|
||||
const closure = WindowVisibilityVideoManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'isIncomingVideoEnabled', value: function() {
|
||||
return this.incomingVideoEnabled;
|
||||
}}, {key: 'lastIncomingVideoEnabledChangeTime', value: function() {
|
||||
return this.lastEnabledChange;
|
||||
}}, {key: 'setIncomingVideoEnabled', value: value_82137}]);
|
||||
}
|
||||
|
||||
function WindowVisibilityVideoManager() { // fn#82132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:508, offset: 0x01eec540, size: 395 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
env1_3(this, WindowVisibilityVideoManager);
|
||||
const value3 = env1_6(WindowVisibilityVideoManager);
|
||||
const value6 = env1_5(this, _isNativeReflectConstruct_82128() ? global.Reflect.construct(value3, [],
|
||||
env1_6(this).constructor) : value3.apply(this, undefined));
|
||||
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
|
||||
const value7 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
|
||||
const timeout = new Timeout();
|
||||
value6.disableVideoTimer = timeout instanceof Object ? timeout : value7;
|
||||
value6.discordVisible = true;
|
||||
value6.incomingVideoEnabled = true;
|
||||
value6.lastEnabledChange = global.performance.now();
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('WindowVisibilityVideoManager');
|
||||
value6.logger = value;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
value6.HIDDEN_WINDOW_DISABLE_VIDEO_DURATION_MS = 30 * SECOND;
|
||||
value6.update = update_82133;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.subscribe('WINDOW_VISIBILITY_CHANGE', value6.update);
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.subscribe('APP_STATE_UPDATE', value6.update);
|
||||
value = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */;
|
||||
value.addOnPipModeChangedListener(value6.update);
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_82137(a0) { // fn#82137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1755, offset: 0x01eec7ad, size: 125 bytes, params: 2, frame: 16
|
||||
var logger;
|
||||
var info;
|
||||
var performance;
|
||||
var emit;
|
||||
var value;
|
||||
var IncomingVideoEnabledChanged;
|
||||
let incomingVideoEnabled = this.incomingVideoEnabled;
|
||||
this.incomingVideoEnabled = a0;
|
||||
if (incomingVideoEnabled !== a0) {
|
||||
logger = this.logger;
|
||||
info = logger.info;
|
||||
incomingVideoEnabled = this.incomingVideoEnabled;
|
||||
Reflect.apply(info, logger, ['Incoming video enabled changed, incomingVideoEnabled = ' + incomingVideoEnabled]);
|
||||
performance = global.performance;
|
||||
this.lastEnabledChange = performance.now();
|
||||
emit = this.emit;
|
||||
value = environment.__proto__;
|
||||
IncomingVideoEnabledChanged = env1_8.IncomingVideoEnabledChanged;
|
||||
incomingVideoEnabled = this.incomingVideoEnabled;
|
||||
Reflect.apply(emit, this, [IncomingVideoEnabledChanged, incomingVideoEnabled]);
|
||||
}
|
||||
}
|
||||
|
||||
function WindowVisibilityVideoManagerUpdate() { // fn#82133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1022, owner: WindowVisibilityVideoManager.update, offset: 0x01eec6cb, size: 180 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
var emit;
|
||||
var WindowVisibilityChanged;
|
||||
var disableVideoTimer;
|
||||
let discordVisible = env0_0.discordVisible;
|
||||
if (discordVisible !== (importDefault(10683) /* metro dependency 10683: WindowVisibilityUtilsNative */)()) {
|
||||
binding = env0_0;
|
||||
binding.discordVisible = (importDefault(10683) /* metro dependency 10683: WindowVisibilityUtilsNative */)();
|
||||
emit = binding.emit;
|
||||
WindowVisibilityChanged = env2_8.WindowVisibilityChanged;
|
||||
discordVisible = binding.discordVisible;
|
||||
Reflect.apply(emit, binding, [WindowVisibilityChanged, discordVisible]);
|
||||
discordVisible = binding.discordVisible;
|
||||
binding = env0_0;
|
||||
disableVideoTimer = binding.disableVideoTimer;
|
||||
if (discordVisible) {
|
||||
disableVideoTimer.stop();
|
||||
binding.setIncomingVideoEnabled(true);
|
||||
} else {
|
||||
disableVideoTimer.start(binding.HIDDEN_WINDOW_DISABLE_VIDEO_DURATION_MS, _fun82134);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82134() { // fn#82134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1281, offset: 0x01eec77f, size: 24 bytes, params: 1, frame: 11
|
||||
env1_0.setIncomingVideoEnabled(false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* Metro module 4024; source: lib/ZustandStore.tsx; dependencies: [685, 4025, 690, 2] */
|
||||
function _fun33121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:6, offset: 0x010281e4, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const defaultStatesAreEqual = function(a0, a1) {
|
||||
return a0 === a1;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/ZustandStore.tsx');
|
||||
exports.createZustandStore = createZustandStore;
|
||||
}
|
||||
|
||||
function createZustandStore(a0) { // fn#33123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:216, offset: 0x0102824b, size: 161 bytes, params: 2, frame: 17
|
||||
let env0_0 = a0;
|
||||
const closure = useState_33124;
|
||||
const closure2 = getState_33125;
|
||||
const value = require(685) /* metro dependency 685 */;
|
||||
const createWithEqualityFn = value.createWithEqualityFn;
|
||||
const moduleValue = require(4025) /* metro dependency 4025 */;
|
||||
const env0_1 = Reflect.apply(createWithEqualityFn, value, [moduleValue.subscribeWithSelector(function(a0, a1, a2) {
|
||||
return a0(_fun33127, a1, a2);
|
||||
})]);
|
||||
return {useState: closure, getState: closure2, useField: useField, getField: function(a0) {
|
||||
var env0_0 = a0;
|
||||
return getState_33125(_fun33134);
|
||||
}, subscribe: subscribe_33135, setState: setState_33129, resetState: resetState_33136};
|
||||
}
|
||||
|
||||
function createZustandStoreUseState(a0) { // fn#33124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:370, owner: createZustandStore.useState, offset: 0x010282ec, size: 34 bytes, params: 2, frame: 13
|
||||
const value = a1;
|
||||
return env0_1(a0, value !== undefined ? value : defaultStatesAreEqual);
|
||||
}
|
||||
|
||||
function createZustandStoreGetState(a0) { // fn#33125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:429, owner: createZustandStore.getState, offset: 0x0102830e, size: 38 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = env0_1.getState();
|
||||
if (a0 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = a0(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun33126(a0, a1, a2) { // fn#33126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:313, offset: 0x01028334, size: 38 bytes, params: 4, frame: 15
|
||||
return a0(_fun33127, a1, a2);
|
||||
}
|
||||
|
||||
function createZustandStoreSetState(a0) { // fn#33129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:504, owner: createZustandStore.setState, offset: 0x010283a5, size: 52 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun33130);
|
||||
}
|
||||
|
||||
function useField(a0) { // fn#33131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:603, owner: createZustandStore.useField, offset: 0x010283f4, size: 45 bytes, params: 2, frame: 13
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
return useState_33124(_fun33132, value !== undefined ? value : defaultStatesAreEqual);
|
||||
}
|
||||
|
||||
function getField(a0) { // fn#33133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:678, owner: createZustandStore.getField, offset: 0x01028421, size: 30 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return getState_33125(_fun33134);
|
||||
}
|
||||
|
||||
function createZustandStoreSubscribe(a0, a1, a2) { // fn#33135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:728, owner: createZustandStore.subscribe, offset: 0x0102843f, size: 31 bytes, params: 4, frame: 15
|
||||
return env0_1.subscribe(a0, a1, a2);
|
||||
}
|
||||
|
||||
function createZustandStoreResetState() { // fn#33136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:800, owner: createZustandStore.resetState, offset: 0x0102845e, size: 30 bytes, params: 1, frame: 11
|
||||
setState_33129(env0_1.getInitialState());
|
||||
}
|
||||
|
||||
function _fun33127(a0) { // fn#33127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:325, offset: 0x0102835a, size: 52 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun33128);
|
||||
}
|
||||
|
||||
function _fun33130() { // fn#33130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:530, offset: 0x010283d9, size: 27 bytes, params: 1, frame: 11
|
||||
return env1_1.setState(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,745 @@
|
||||
/* Metro module 8878; source: lib/getOnClick.tsx; dependencies: [57, 5, 4234, 4117, 6831, 1226, 1945, 1867, 4097, 1934, 3969, 4896, 661, 663, 694, 4098, 8879, 9037, 1962, 6593, 6837, 9032, 4096, 4101, 4126, 3847, 683, 8091, 9466, 9468, 7860, 4603, 9472, 9476, 9477, 9479, 1471, 9480, 6533, 4127, 5120, 4863, 4246, 10191, 10193, 2] */
|
||||
function _fun69196(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:6, offset: 0x01c6cb7a, size: 427 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const openInviteModal = function() {
|
||||
return _openInviteModal.apply(this, arguments);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
|
||||
const socialLayerStorefrontStore = importDefault(6831) /* metro dependency 6831: SocialLayerStorefrontStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
value.AbortCodes;
|
||||
const env0_13 = value.AnalyticEvents;
|
||||
value.AppContext;
|
||||
const env0_14 = value.InviteStates;
|
||||
value.JoinGuildSources;
|
||||
value.Routes;
|
||||
value = require(663) /* metro dependency 663: CollectiblesShopConstants */;
|
||||
const env0_15 = value.CollectibleShopTab;
|
||||
const env0_16 = value.CollectiblesMobileShopScreen;
|
||||
object = {skipExtensionCheck: undefined, analyticsLocations: []};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/getOnClick.tsx');
|
||||
exports.default = getOnClick;
|
||||
}
|
||||
|
||||
function _openInviteModal() { // fn#69198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:467, offset: 0x01c6cd25, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun69200).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _handleInviteCodedLink() { // fn#69201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:690, offset: 0x01c6cdc2, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun69203).apply(this, arguments);
|
||||
}
|
||||
|
||||
function getOnClick(a0) { // fn#69205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:1536, offset: 0x01c6d027, size: 1110 bytes, params: 2, frame: 27
|
||||
var environment;
|
||||
var r1;
|
||||
var r2;
|
||||
var r13;
|
||||
var r11;
|
||||
var binding;
|
||||
var type;
|
||||
const CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
|
||||
var EMBEDDED_ACTIVITY_INVITE;
|
||||
var APP_DIRECTORY_STOREFRONT;
|
||||
var APP_DIRECTORY_STOREFRONT_SKU;
|
||||
var moduleValue2;
|
||||
var getIsEligibleForQuests;
|
||||
var object2;
|
||||
var defaultImport3;
|
||||
var isDiscordLocalhost;
|
||||
var isDiscordLocalhost2;
|
||||
var defaultImport4;
|
||||
var isAppRoute;
|
||||
var APP_OAUTH2_LINK;
|
||||
var moduleValue3;
|
||||
var tryParseEventDetailsPath;
|
||||
var isSuspiciousDownload;
|
||||
var closure;
|
||||
let value = a1;
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value !== value2) {
|
||||
r1 = value;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value = environment;
|
||||
binding = env0_17;
|
||||
r1 = binding;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const skipExtensionCheck = r1.skipExtensionCheck;
|
||||
const env0_1 = r1.analyticsLocations;
|
||||
const env0_2 = r1.messageId;
|
||||
var env0_5;
|
||||
value = environment;
|
||||
const codedLink = (require(4096) /* metro dependency 4096: findCodedLinks */).findCodedLink(a0);
|
||||
const value3 = null;
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin5: while (true) {
|
||||
reducibleJoin52: while (true) {
|
||||
if (type === CodedLinkType.INVITE) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
type = codedLink.type;
|
||||
EMBEDDED_ACTIVITY_INVITE = CodedLinkType.EMBEDDED_ACTIVITY_INVITE;
|
||||
if (type === EMBEDDED_ACTIVITY_INVITE) {
|
||||
break reducibleJoin52;
|
||||
}
|
||||
break reducibleJoin5;
|
||||
}
|
||||
return _fun69206;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin9: while (true) {
|
||||
reducibleJoin51: while (true) {
|
||||
if (type === CodedLinkType.APP_DIRECTORY_PROFILE) {
|
||||
break reducibleJoin51;
|
||||
}
|
||||
type = codedLink.type;
|
||||
APP_DIRECTORY_STOREFRONT = CodedLinkType.APP_DIRECTORY_STOREFRONT;
|
||||
if (type === APP_DIRECTORY_STOREFRONT) {
|
||||
break reducibleJoin51;
|
||||
}
|
||||
type = codedLink.type;
|
||||
APP_DIRECTORY_STOREFRONT_SKU = CodedLinkType.APP_DIRECTORY_STOREFRONT_SKU;
|
||||
if (type === APP_DIRECTORY_STOREFRONT_SKU) {
|
||||
break reducibleJoin51;
|
||||
}
|
||||
break reducibleJoin9;
|
||||
}
|
||||
return _fun69208;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin11: while (true) {
|
||||
if (type === CodedLinkType.ACTIVITY_BOOKMARK) {
|
||||
return _fun69209;
|
||||
}
|
||||
break reducibleJoin11;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin13: while (true) {
|
||||
if (type === CodedLinkType.GUILD_PRODUCT) {
|
||||
return _fun69220;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin15: while (true) {
|
||||
if (type === CodedLinkType.SOCIAL_LAYER_STOREFRONT) {
|
||||
return _fun69222;
|
||||
}
|
||||
break reducibleJoin15;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin17: while (true) {
|
||||
if (type === CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP) {
|
||||
return _fun69224;
|
||||
}
|
||||
break reducibleJoin17;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin20: while (true) {
|
||||
if (type !== CodedLinkType.QUESTS_EMBED) {
|
||||
break reducibleJoin20;
|
||||
}
|
||||
moduleValue2 = require(9479) /* metro dependency 9479: QuestsEligibility */;
|
||||
getIsEligibleForQuests = moduleValue2.getIsEligibleForQuests;
|
||||
if (Reflect.apply(getIsEligibleForQuests, moduleValue2, [])) {
|
||||
return _fun69226;
|
||||
}
|
||||
break reducibleJoin20;
|
||||
}
|
||||
}
|
||||
if (value3 != codedLink) {
|
||||
type = codedLink.type;
|
||||
reducibleJoin22: while (true) {
|
||||
if (type === CodedLinkType.COLLECTIBLES_SHOP) {
|
||||
return _fun69227;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
}
|
||||
const value4 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
|
||||
reducibleJoin24: while (true) {
|
||||
if (value3 != value4) {
|
||||
r2 = value4;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
r2 = {};
|
||||
break reducibleJoin24;
|
||||
}
|
||||
const host = r2.host;
|
||||
const hostname = r2.hostname;
|
||||
const pathname = r2.pathname;
|
||||
const search = r2.search;
|
||||
const hash = r2.hash;
|
||||
const defaultImport2 = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
||||
const isDiscordHostname = defaultImport2.isDiscordHostname;
|
||||
let r9 = value3 != hostname ? hostname : value3;
|
||||
const isDiscordHostname2 = Reflect.apply(isDiscordHostname, defaultImport2, [r9]);
|
||||
reducibleJoin29: while (true) {
|
||||
if (isDiscordHostname2) {
|
||||
r9 = isDiscordHostname2;
|
||||
break reducibleJoin29;
|
||||
}
|
||||
defaultImport3 = defaultImport2;
|
||||
isDiscordLocalhost = defaultImport3.isDiscordLocalhost;
|
||||
r13 = value3 != host ? host : value3;
|
||||
r11 = value3 != hostname ? hostname : value3;
|
||||
isDiscordLocalhost2 = Reflect.apply(isDiscordLocalhost, defaultImport3, [r13, r11]);
|
||||
r9 = isDiscordLocalhost2;
|
||||
break reducibleJoin29;
|
||||
}
|
||||
if (value3 != pathname) {
|
||||
reducibleJoin32: while (true) {
|
||||
if (r9) {
|
||||
defaultImport4 = defaultImport2;
|
||||
isAppRoute = defaultImport4.isAppRoute;
|
||||
if (Reflect.apply(isAppRoute, defaultImport4, [pathname])) {
|
||||
object2 = {'navigationReplace': false, 'openChannel': true};
|
||||
env0_5 = object2;
|
||||
reducibleJoin42: while (true) {
|
||||
if (value3 == search) {
|
||||
break reducibleJoin42;
|
||||
}
|
||||
object2.search = search;
|
||||
break reducibleJoin42;
|
||||
}
|
||||
reducibleJoin44: while (true) {
|
||||
if (value3 == hash) {
|
||||
break reducibleJoin44;
|
||||
}
|
||||
object2.hash = hash;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
return _fun69229;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
reducibleJoin39: while (true) {
|
||||
reducibleJoin37: while (true) {
|
||||
if (value3 == codedLink) {
|
||||
moduleValue3 = require(4246) /* metro dependency 4246: LinkUtils */;
|
||||
moduleValue3.tryParseEventDetailsPath(pathname);
|
||||
if (skipExtensionCheck) {
|
||||
r1 = value2;
|
||||
break reducibleJoin37;
|
||||
}
|
||||
value = require(10191) /* metro dependency 10191: SuspiciousDownloadUtils */;
|
||||
if (value3 == value.isSuspiciousDownload(a0)) {
|
||||
r1 = value2;
|
||||
break reducibleJoin37;
|
||||
}
|
||||
r1 = _fun69231;
|
||||
break reducibleJoin37;
|
||||
}
|
||||
type = codedLink.type;
|
||||
APP_OAUTH2_LINK = CodedLinkType.APP_OAUTH2_LINK;
|
||||
if (type === APP_OAUTH2_LINK) {
|
||||
r1 = _fun69230;
|
||||
break reducibleJoin39;
|
||||
}
|
||||
moduleValue3 = require(4246) /* metro dependency 4246: LinkUtils */;
|
||||
tryParseEventDetailsPath = moduleValue3.tryParseEventDetailsPath;
|
||||
Reflect.apply(tryParseEventDetailsPath, moduleValue3, [pathname]);
|
||||
if (skipExtensionCheck) {
|
||||
r1 = value2;
|
||||
break reducibleJoin37;
|
||||
}
|
||||
value = require(10191) /* metro dependency 10191: SuspiciousDownloadUtils */;
|
||||
isSuspiciousDownload = value.isSuspiciousDownload;
|
||||
if (value3 == Reflect.apply(isSuspiciousDownload, value, [a0])) {
|
||||
r1 = value2;
|
||||
break reducibleJoin37;
|
||||
}
|
||||
closure = _fun69231;
|
||||
r1 = closure;
|
||||
break reducibleJoin37;
|
||||
}
|
||||
break reducibleJoin39;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function* _fun69200(a0, a1, a2) { // fn#69200, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:522, offset: 0x01c6cd62, size: 96 bytes, params: 4, frame: 14
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[14]);
|
||||
yield value.dispatch({type: 'DISPLAYED_INVITE_SHOW', code: a1, username: undefined,
|
||||
deeplinkAttemptId: undefined,
|
||||
invite_instance_id: a2});
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun69203(a0, a1) { // fn#69203, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:757, offset: 0x01c6cdff, size: 552 bytes, params: 3, frame: 25
|
||||
var r5;
|
||||
var id;
|
||||
var r8;
|
||||
var roles;
|
||||
var r10;
|
||||
var r7;
|
||||
var state;
|
||||
var flattenedGuildIds;
|
||||
var value15;
|
||||
var id2;
|
||||
var member;
|
||||
var Set;
|
||||
var set;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = undefined;
|
||||
let binding = env2_0;
|
||||
const inviteInstanceId = binding(env2_2[15]).getInviteInstanceId(a0.code, a1);
|
||||
const invite = env2_9.getInvite(a0.code);
|
||||
if (invite != null) {
|
||||
r5 = invite;
|
||||
if (r5 == null) {
|
||||
return value;
|
||||
}
|
||||
state = r5.state;
|
||||
if (state === env2_14.EXPIRED) {
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
state = r5.state;
|
||||
if (state === env2_14.BANNED) {
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
state = r5.state;
|
||||
if (state !== env2_14.ERROR) {
|
||||
binding = env2_12;
|
||||
flattenedGuildIds = binding.getFlattenedGuildIds();
|
||||
id = r5 == null || r5.guild == null ? value : r5.guild.id;
|
||||
r8 = id != null && flattenedGuildIds.includes(id);
|
||||
value15 = false;
|
||||
if (r8) {
|
||||
roles = r5.roles;
|
||||
if (roles != null) {
|
||||
roles = r5.roles;
|
||||
if (roles.length > 0) {
|
||||
binding = env2_7;
|
||||
id2 = binding.getId();
|
||||
binding = env2_8;
|
||||
member = binding.getMember(id, id2);
|
||||
Set = global.Set;
|
||||
roles = member == null ? value : member.roles;
|
||||
r10 = roles ?? [];
|
||||
set = new Set();
|
||||
roles = r5.roles;
|
||||
r7 = roles.some(_fun69204);
|
||||
} else {
|
||||
r7 = value15;
|
||||
}
|
||||
} else {
|
||||
r7 = value15;
|
||||
}
|
||||
} else {
|
||||
r7 = value15;
|
||||
}
|
||||
if (r8) {
|
||||
if (r7) {
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
env2_1(env2_2[16]).transitionToInviteSync(r5);
|
||||
return value;
|
||||
}
|
||||
binding = env2_18;
|
||||
yield binding(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
binding = env2_18;
|
||||
yield binding(r5, a0.code, inviteInstanceId);
|
||||
} else {
|
||||
var value7 = env2_1(env2_2[16]);
|
||||
yield value7.resolveInvite(a0.code, 'Markdown Link', {inviteInstanceId: inviteInstanceId});
|
||||
var value8 = undefined;
|
||||
if (false) {
|
||||
return value8;
|
||||
}
|
||||
r5 = value8.invite;
|
||||
if (r5 == null) {
|
||||
return value;
|
||||
}
|
||||
state = r5.state;
|
||||
if (state === env2_14.EXPIRED) {
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
state = r5.state;
|
||||
if (state === env2_14.BANNED) {
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
state = r5.state;
|
||||
if (state !== env2_14.ERROR) {
|
||||
binding = env2_12;
|
||||
flattenedGuildIds = binding.getFlattenedGuildIds();
|
||||
id = r5 == null || r5.guild == null ? value : r5.guild.id;
|
||||
r8 = id != null && flattenedGuildIds.includes(id);
|
||||
value15 = false;
|
||||
if (r8) {
|
||||
roles = r5.roles;
|
||||
if (roles != null) {
|
||||
roles = r5.roles;
|
||||
if (roles.length > 0) {
|
||||
binding = env2_7;
|
||||
id2 = binding.getId();
|
||||
binding = env2_8;
|
||||
member = binding.getMember(id, id2);
|
||||
Set = global.Set;
|
||||
roles = member == null ? value : member.roles;
|
||||
r10 = roles ?? [];
|
||||
set = new Set();
|
||||
roles = r5.roles;
|
||||
r7 = roles.some(_fun69204);
|
||||
} else {
|
||||
r7 = value15;
|
||||
}
|
||||
} else {
|
||||
r7 = value15;
|
||||
}
|
||||
} else {
|
||||
r7 = value15;
|
||||
}
|
||||
if (r8) {
|
||||
if (r7) {
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
env2_1(env2_2[16]).transitionToInviteSync(r5);
|
||||
return value;
|
||||
}
|
||||
binding = env2_18;
|
||||
yield binding(r5, a0.code, inviteInstanceId);
|
||||
return value;
|
||||
}
|
||||
yield env2_18(r5, a0.code, inviteInstanceId);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun69206(a0) { // fn#69206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:1769, offset: 0x01c6d47d, size: 51 bytes, params: 2, frame: 13
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
(function() {
|
||||
return _handleInviteCodedLink.apply(this, arguments);
|
||||
})(env0_3, messageId);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69208(a0) { // fn#69208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:2091, offset: 0x01c6d4ce, size: 340 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var APP_DIRECTORY_PROFILE_EMBED_URL_CLICKED;
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
const code = env0_3.code;
|
||||
const type = env0_3.type;
|
||||
const value3 = undefined;
|
||||
const CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
|
||||
const APP_DIRECTORY_PROFILE = CodedLinkType.APP_DIRECTORY_PROFILE;
|
||||
const r4 = type === APP_DIRECTORY_PROFILE || env0_3.type === CodedLinkType.APP_DIRECTORY_STOREFRONT ? {applicationId: code,
|
||||
skuId: value3} : (require(4126) /* metro dependency 4126: storefrontMessageEmbedCodedLink */).parseStorefrontSkuCodedLink(code) ?? ({applicationId: value3,
|
||||
skuId: value3});
|
||||
const applicationId = r4.applicationId;
|
||||
r4.skuId;
|
||||
if (applicationId != null) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
APP_DIRECTORY_PROFILE_EMBED_URL_CLICKED = AnalyticEvents.APP_DIRECTORY_PROFILE_EMBED_URL_CLICKED;
|
||||
object2 = {application_id: applicationId, device_platform: 'mobile_native',
|
||||
guild_id: SelectedGuildStore.getGuildId() ?? value3};
|
||||
object2.channel_id = SelectedChannelStore.getChannelId();
|
||||
Reflect.apply(track, defaultImport, [APP_DIRECTORY_PROFILE_EMBED_URL_CLICKED, object2]);
|
||||
}
|
||||
(importDefault(3847) /* metro dependency 3847: openURL */)(env0_0);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69209(a0) { // fn#69209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:2690, offset: 0x01c6d622, size: 473 bytes, params: 2, frame: 23
|
||||
var environment;
|
||||
var r8;
|
||||
var getCustomActivityLinkParams;
|
||||
var value11;
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
const code = env0_3.code;
|
||||
const url = env0_3.url;
|
||||
let value = environment.__proto__;
|
||||
const application = ApplicationStore.getApplication(code);
|
||||
const URL = global.URL;
|
||||
const uRL = new URL(url);
|
||||
let searchParams = uRL.searchParams;
|
||||
const value5 = searchParams.get('referrer_id');
|
||||
const value6 = undefined;
|
||||
let r0 = value5 ?? value6;
|
||||
var env0_3 = (importDefault(8091) /* metro dependency 8091: getEmbeddedActivitiesManagerNative */)();
|
||||
const playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(code);
|
||||
const currentChannelId = playInContext.currentChannelId;
|
||||
const env0_5 = playInContext.instanceId;
|
||||
if (playInContext.canLaunchInChannel) {
|
||||
r0 = !playInContext.isCurrentlyInInstance && currentChannelId != null;
|
||||
if (r0) {
|
||||
value = require(9468) /* metro dependency 9468: CustomActivityLinkUtils */;
|
||||
getCustomActivityLinkParams = value.getCustomActivityLinkParams;
|
||||
searchParams = uRL.searchParams;
|
||||
value11 = searchParams.get('link_id');
|
||||
searchParams = uRL.searchParams;
|
||||
value = Reflect.apply(getCustomActivityLinkParams, value, [code, value11, searchParams.get('custom_id')]);
|
||||
value = value.then(_fun69210());
|
||||
value.catch(function() {
|
||||
});
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
const id = application == null || application.bot == null ? value6 : application.bot.id;
|
||||
const value8 = id != null;
|
||||
if (value8) {
|
||||
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
value = value.openPrivateChannel({recipientIds: id});
|
||||
value = value.then(_fun69215());
|
||||
value.catch(function() {
|
||||
});
|
||||
value = true;
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = value8;
|
||||
}
|
||||
return r8;
|
||||
}
|
||||
|
||||
function _fun69220(a0) { // fn#69220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:3900, offset: 0x01c6d9c5, size: 145 bytes, params: 2, frame: 15
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
let value = env0_3.code.split('-');
|
||||
value = env1_3(value, 2);
|
||||
const env0_0 = value[0];
|
||||
const env0_1 = value[1];
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[33], dependencyMap.paths);
|
||||
value.then(_fun69221);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69222(a0) { // fn#69222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:4134, offset: 0x01c6da74, size: 145 bytes, params: 2, frame: 15
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
let value = env0_3.code.split('-');
|
||||
value = env1_3(value, 2);
|
||||
const env0_0 = value[0];
|
||||
const env0_1 = value[1];
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[34], dependencyMap.paths);
|
||||
value.then(_fun69223);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69224(a0) { // fn#69224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:4415, offset: 0x01c6db2c, size: 166 bytes, params: 2, frame: 16
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
let value = env0_3.code.split('-');
|
||||
value = env1_3(value, 2);
|
||||
const env0_0 = value[0];
|
||||
value = SocialLayerStorefrontStore.getGuildIdFromApplicationId(value[1]);
|
||||
if (value != null) {
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[34], dependencyMap.paths);
|
||||
value.then(_fun69225);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun69226(a0) { // fn#69226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:4722, offset: 0x01c6dbf8, size: 300 bytes, params: 2, frame: 18
|
||||
var r1;
|
||||
var r5;
|
||||
var r7;
|
||||
var uRLSearchParams;
|
||||
var value8;
|
||||
var value9;
|
||||
const value = null;
|
||||
if (value != a0) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
const value3 = undefined;
|
||||
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
||||
const value5 = defaultImport.toURLSafe(env0_3.url);
|
||||
const search = (value != value5 ? value5 : {}).search;
|
||||
if (value != search) {
|
||||
uRLSearchParams = new global.URLSearchParams(search);
|
||||
value8 = uRLSearchParams.get('sort');
|
||||
r1 = value != value8 ? value8 : value3;
|
||||
value9 = uRLSearchParams.get('filter');
|
||||
r5 = value != value9 ? value9 : value3;
|
||||
r7 = r1;
|
||||
} else {
|
||||
r5 = value3;
|
||||
r7 = value3;
|
||||
}
|
||||
const openQuestHome = (require(9480) /* metro dependency 9480: QuestUtilsNative */).openQuestHome;
|
||||
const object2 = {};
|
||||
object2.scrollToQuestId = env0_3.code;
|
||||
object2.sort = value != r7 ? r7 : value;
|
||||
object2.filter = value != r5 ? r5 : value;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const QUEST_SHARE_LINK = QuestContent.QUEST_SHARE_LINK;
|
||||
object2.fromContent = QUEST_SHARE_LINK;
|
||||
openQuestHome(object2);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69227(a0) { // fn#69227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:5162, offset: 0x01c6dd24, size: 116 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
let value = environment.__proto__;
|
||||
value = require(dependencyMap[39]);
|
||||
const env0_0 = value.isVirtualCurrencyEnabled().enabled;
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[40], dependencyMap.paths);
|
||||
value.then(_fun69228);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69229(a0) { // fn#69229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:5862, offset: 0x01c6de51, size: 65 bytes, params: 2, frame: 13
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(importDefault(6837) /* metro dependency 6837: safeTransitionToNative */)(pathname, env0_5);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69230(a0) { // fn#69230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:5976, offset: 0x01c6de92, size: 110 bytes, params: 2, frame: 18
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
const APP_OAUTH2_LINK_EMBED_URL_CLICKED = AnalyticEvents.APP_OAUTH2_LINK_EMBED_URL_CLICKED;
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [APP_OAUTH2_LINK_EMBED_URL_CLICKED, {application_id: env0_3.code}]);
|
||||
(importDefault(3847) /* metro dependency 3847: openURL */)(env0_0);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69231(a0) { // fn#69231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:6199, offset: 0x01c6df00, size: 66 bytes, params: 2, frame: 11
|
||||
if (a0 != null) {
|
||||
a0.preventDefault();
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(importDefault(10193) /* metro dependency 10193: SuspiciousDownloadModalActionCreatorsNative */).show(env0_0);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun69210() { // fn#69210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:3096, offset: 0x01c6d7fb, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env2_4(_fun69212);
|
||||
return _fun69213;
|
||||
}
|
||||
|
||||
function _fun69215() { // fn#69215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:3508, offset: 0x01c6d8d1, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env2_4(_fun69217);
|
||||
return _fun69218;
|
||||
}
|
||||
|
||||
function _fun69221({openGuildProductLink}) { // fn#69221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:4016, offset: 0x01c6da56, size: 30 bytes, params: 2, frame: 13
|
||||
openGuildProductLink(env0_0, env0_1);
|
||||
}
|
||||
|
||||
function _fun69223({navigateToSocialLayerStorefrontWithGuildPreview}) { // fn#69223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:4250, offset: 0x01c6db05, size: 39 bytes, params: 2, frame: 12
|
||||
navigateToSocialLayerStorefrontWithGuildPreview({guildId: env0_1, skuId: env0_0});
|
||||
}
|
||||
|
||||
function _fun69225({default: property}) { // fn#69225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:4577, offset: 0x01c6dbd2, size: 38 bytes, params: 2, frame: 12
|
||||
property({guildId: env0_1, skuId: env0_0});
|
||||
}
|
||||
|
||||
function _fun69228({openCollectiblesShopMobile}) { // fn#69228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:5281, offset: 0x01c6dd98, size: 185 bytes, params: 2, frame: 19
|
||||
const value5 = env2_3(env1_3.code.split('-'), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const value6 = property2 !== '';
|
||||
const r3 = enabled && property === CollectibleShopTab.ORBS ? CollectiblesMobileShopScreen.ORBS : value6 ? CollectiblesMobileShopScreen.SHOP_ALL : CollectiblesMobileShopScreen.FEATURED_PAGE;
|
||||
const analyticsLocationsBinding = analyticsLocations;
|
||||
openCollectiblesShopMobile({analyticsSource: analyticsLocationsBinding[analyticsLocationsBinding.length - 1],
|
||||
analyticsLocations: analyticsLocationsBinding, screen: r3, initialProductSkuId: value6 ? property2 : undefined});
|
||||
}
|
||||
|
||||
async function _fun69212({customId}) { // fn#69212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:3116, offset: 0x01c6d833, size: 158 bytes, params: 2, frame: 18
|
||||
if (true) {
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = env4_0(env4_2[30]);
|
||||
await value.runPrimaryAppCommandOrJoinEmbeddedActivity({channelId: pathname, applicationId: env2_0,
|
||||
isStart: env2_5 == null, embeddedActivitiesManager: env2_3, customId: customId, referrerId: messageId,
|
||||
analyticsLocations: importDefault});
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun69217(a0) { // fn#69217, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9063:3528, offset: 0x01c6d900, size: 197 bytes, params: 2, frame: 21
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
var binding = env4_0;
|
||||
var value3 = binding(env4_2[29]);
|
||||
var getCustomActivityLinkParams = value3.getCustomActivityLinkParams;
|
||||
binding = env2_0;
|
||||
var searchParams = analyticsLocations.searchParams;
|
||||
var get = searchParams.get;
|
||||
var value5 = Reflect.apply(get, searchParams, ['link_id']);
|
||||
searchParams = analyticsLocations.searchParams;
|
||||
get = searchParams.get;
|
||||
yield Reflect.apply(getCustomActivityLinkParams, value3, [binding, value5, Reflect.apply(get, searchParams,
|
||||
['custom_id'])]);
|
||||
var value6 = undefined;
|
||||
if (false) {
|
||||
return value6;
|
||||
}
|
||||
var customId = value6.customId;
|
||||
value = env4_1(env4_2[32]);
|
||||
value({targetApplicationId: env2_0, channelId: a0, analyticsLocations: importDefault, customId: customId,
|
||||
referrerId: messageId});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 15631; source: lib/getTimeZone.native.tsx; dependencies: [4092, 2] */
|
||||
function _fun119716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15839:6, offset: 0x02516e9c, size: 96 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('lib/getTimeZone.native.tsx');
|
||||
exports.default = getTimeZone_119717;
|
||||
}
|
||||
|
||||
function getTimeZone_119717() { // fn#119717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15839:162, offset: 0x02516efc, size: 36 bytes, params: 1, frame: 11
|
||||
return (require(4092) /* metro dependency 4092: DeviceUtils */).getTimeZone();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 6890; source: lib/guild/GuildChannelSubscriptions.tsx; dependencies: [6, 7, 1393, 22, 2] */
|
||||
function _fun54712(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:6, offset: 0x0136c7e8, size: 174 bytes, params: 8, frame: 18
|
||||
const serializeChannelRanges = function(a0) {
|
||||
a0.forEach(_fun54714);
|
||||
return {};
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const value = _fun54715();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildChannelSubscriptions.tsx');
|
||||
exports.default = value;
|
||||
exports.MINIMUM_RANGE = 100;
|
||||
exports.DEFAULT_RANGES = [[0, 99]];
|
||||
}
|
||||
|
||||
function serializeChannelRanges(a0) { // fn#54713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:116, offset: 0x0136c896, size: 28 bytes, params: 2, frame: 12
|
||||
a0.forEach(_fun54714);
|
||||
return {};
|
||||
}
|
||||
|
||||
function _fun54715() { // fn#54715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:204, offset: 0x0136c8b2, size: 147 bytes, params: 1, frame: 15
|
||||
return env0_3(GuildChannelSubscriptions, [{key: 'reset', value: function() {
|
||||
this._subscriptions = {};
|
||||
}}, {key: 'get', value: value_54718}, {key: '_get', value: value_54719}, {key: 'clear', value: function(a0) {
|
||||
delete this._subscriptions[a0];
|
||||
}}, {key: 'subscribe', value: function(a0, a1, a2) {
|
||||
var r0;
|
||||
var value = this._get(a0);
|
||||
var isEqual = importDefault(dependencyMap[3]).isEqual(value.get(a1), a2);
|
||||
if (isEqual) {
|
||||
r0 = !isEqual;
|
||||
} else {
|
||||
value.set(a1, a2);
|
||||
this._subscriptions[a0] = value;
|
||||
this._onChange(a0, serializeChannelRanges(value));
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun54714(a0, a1) { // fn#54714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:178, offset: 0x00daaa50, size: 21 bytes, params: 3, frame: 3
|
||||
env0_0[a1] = a0;
|
||||
}
|
||||
|
||||
function value_54718(a0) { // fn#54718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:412, offset: 0x0136c980, size: 33 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return serializeChannelRanges(this._get(a0));
|
||||
}
|
||||
|
||||
function value_54719(a0) { // fn#54719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:488, offset: 0x0136c9a1, size: 81 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
const property = this._subscriptions[a0];
|
||||
if (property != null) {
|
||||
r0 = property;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(1393) /* metro dependency 1393 */;
|
||||
value = new value({max: 5});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
/* Metro module 6270; source: lib/guild/GuildMemberRequester.tsx; dependencies: [6, 7, 4041, 22, 2] */
|
||||
function _fun49525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:6, offset: 0x011fc0cd, size: 149 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = _fun49526();
|
||||
const value = _fun49535();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildMemberRequester.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun49526() { // fn#49526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:118, offset: 0x011fc162, size: 124 bytes, params: 1, frame: 15
|
||||
return env0_4(GuildMemberRequestState, [{key: 'acknowledge', value: function(a0) {
|
||||
this._unacknowledgedRequests.delete(a0);
|
||||
this._pendingRequests.delete(a0);
|
||||
}}, {key: 'flushRequests', value: function(a0) {
|
||||
var items;
|
||||
var _pendingRequests;
|
||||
var env0_0 = this;
|
||||
if (this._pendingRequests.size !== 0) {
|
||||
items = [];
|
||||
var env0_1 = items;
|
||||
_pendingRequests = this._pendingRequests;
|
||||
_pendingRequests.forEach(_fun49531);
|
||||
if (items.length > 0) {
|
||||
a0(this._guildId, items);
|
||||
}
|
||||
_pendingRequests = this._pendingRequests;
|
||||
_pendingRequests.clear();
|
||||
}
|
||||
}}, {key: 'requestUnacknowledged', value: function() {
|
||||
var r0;
|
||||
var env0_0 = this;
|
||||
var value = this._unacknowledgedRequests.size !== 0;
|
||||
if (value) {
|
||||
this._unacknowledgedRequests.forEach(_fun49533);
|
||||
r0 = this._pendingRequests.size !== 0 && undefined;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'request', value: function(a0) {
|
||||
if (this._guildMemberExists(a0)) {
|
||||
return false;
|
||||
}
|
||||
if (this._sentRequests.has(a0)) {
|
||||
return false;
|
||||
}
|
||||
if (this._pendingRequests.has(a0)) {
|
||||
return false;
|
||||
}
|
||||
this._pendingRequests.add(a0);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun49535() { // fn#49535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1195, offset: 0x011fc450, size: 195 bytes, params: 1, frame: 15
|
||||
return env0_4(GuildMemberRequester, [{key: 'reset', value: function() {
|
||||
this._guildStates = {};
|
||||
this._flush.cancel();
|
||||
}}, {key: 'request', value: function(a0, a1) {
|
||||
var value = this._getGuildState(a0);
|
||||
value = value.request(a1);
|
||||
if (value !== false) {
|
||||
this._flush.delay(false);
|
||||
}
|
||||
}}, {key: 'acknowledge', value: function(a0, a1) {
|
||||
this._getGuildState(a0).acknowledge(a1);
|
||||
}}, {key: 'flushRequests', value: value_49541}, {key: 'requestUnacknowledged', value: value_49543},
|
||||
{key: '_getGuildState', value: value_49545}, {key: 'getDebugState', value: value_49546}]);
|
||||
}
|
||||
|
||||
function GuildMemberRequestState(a0, a1) { // fn#49527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:139, offset: 0x011fc1de, size: 158 bytes, params: 3, frame: 16
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, GuildMemberRequestState);
|
||||
let Set = global.Set;
|
||||
this._pendingRequests = new Set();
|
||||
Set = global.Set;
|
||||
this._sentRequests = new Set();
|
||||
Set = global.Set;
|
||||
this._unacknowledgedRequests = new Set();
|
||||
this._guildId = a0;
|
||||
this._guildMemberExists = _guildMemberExists;
|
||||
}
|
||||
|
||||
function value_49530(a0) { // fn#49530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:493, offset: 0x011fc2be, size: 101 bytes, params: 2, frame: 15
|
||||
var items2;
|
||||
let _pendingRequests = this._pendingRequests;
|
||||
if (_pendingRequests.size !== 0) {
|
||||
items2 = [];
|
||||
_pendingRequests = this._pendingRequests;
|
||||
_pendingRequests.forEach(_fun49531);
|
||||
if (items2.length > 0) {
|
||||
a0(this._guildId, items2);
|
||||
}
|
||||
_pendingRequests = this._pendingRequests;
|
||||
_pendingRequests.clear();
|
||||
}
|
||||
}
|
||||
|
||||
function value_49532() { // fn#49532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:788, offset: 0x011fc371, size: 75 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
const value = this._unacknowledgedRequests.size !== 0;
|
||||
if (value) {
|
||||
this._unacknowledgedRequests.forEach(_fun49533);
|
||||
r0 = this._pendingRequests.size !== 0 && undefined;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GuildMemberRequester(a0, a1) { // fn#49536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1216, offset: 0x011fc513, size: 118 bytes, params: 3, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, GuildMemberRequester);
|
||||
this._guildStates = {};
|
||||
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
|
||||
this._flush = new DelayedCall(0, _fun49537);
|
||||
this._guildMemberExists = a0;
|
||||
this._onChange = a1;
|
||||
}
|
||||
|
||||
function value_49541() { // fn#49541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1693, offset: 0x011fc618, size: 58 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(this._guildStates, _fun49542);
|
||||
}
|
||||
|
||||
function value_49543() { // fn#49543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1813, offset: 0x011fc66f, size: 77 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
if (value.reduce(this._guildStates, function(a0, a1) {
|
||||
return a1.requestUnacknowledged() !== false || a0;
|
||||
}, false)) {
|
||||
this._flush.delay();
|
||||
}
|
||||
}
|
||||
|
||||
function value_49545(a0) { // fn#49545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1955, offset: 0x011fc6da, size: 73 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
var binding;
|
||||
var _guildMemberExists;
|
||||
var binding2;
|
||||
let _guildStates = this._guildStates;
|
||||
const property = _guildStates[a0];
|
||||
if (property != null) {
|
||||
r0 = property;
|
||||
} else {
|
||||
_guildStates = this._guildStates;
|
||||
value = environment.__proto__;
|
||||
binding = env1_5;
|
||||
_guildMemberExists = this._guildMemberExists;
|
||||
binding2 = new binding(a0);
|
||||
_guildStates[a0] = binding2;
|
||||
r0 = binding2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_49546(a0) { // fn#49546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:2099, offset: 0x011fc723, size: 108 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(this._guildStates, _fun49547);
|
||||
return {pendingRequestGuildIds: [], unacknowledgedRequestGuildIds: [], sentRequestGuildIds: []};
|
||||
}
|
||||
|
||||
function _guildMemberExists(a0) { // fn#49528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:343, owner: GuildMemberRequestState._guildMemberExists, offset: 0x011fc27c, size: 24 bytes, params: 2, frame: 13
|
||||
return require(env0_0, a0);
|
||||
}
|
||||
|
||||
function _fun49531(a0) { // fn#49531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:580, offset: 0x011fc323, size: 78 bytes, params: 2, frame: 13
|
||||
let binding = env0_0;
|
||||
if (!binding._guildMemberExists(a0)) {
|
||||
binding = env0_0;
|
||||
binding._unacknowledgedRequests.add(a0);
|
||||
binding._sentRequests.add(a0);
|
||||
binding = env0_1;
|
||||
binding.push(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun49533(a0) { // fn#49533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:884, offset: 0x011fc3bc, size: 66 bytes, params: 2, frame: 12
|
||||
let binding = env0_0;
|
||||
const value2 = binding._guildMemberExists(a0);
|
||||
binding = env0_0;
|
||||
if (value2) {
|
||||
binding._unacknowledgedRequests.delete(a0);
|
||||
} else {
|
||||
binding._pendingRequests.add(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun49537() { // fn#49537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1341, offset: 0x011fc589, size: 19 bytes, params: 1, frame: 9
|
||||
return env0_0.flushRequests();
|
||||
}
|
||||
|
||||
function _fun49542(a0) { // fn#49542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1739, offset: 0x011fc652, size: 29 bytes, params: 2, frame: 11
|
||||
return a0.flushRequests(env0_0._onChange);
|
||||
}
|
||||
|
||||
function _fun49547(a0) { // fn#49547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:2172, offset: 0x011fc78f, size: 139 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
const _pendingRequests = a0._pendingRequests;
|
||||
if (_pendingRequests.has(env0_0)) {
|
||||
binding = env0_1;
|
||||
binding.push(a0._guildId);
|
||||
}
|
||||
const _unacknowledgedRequests = a0._unacknowledgedRequests;
|
||||
if (_unacknowledgedRequests.has(env0_0)) {
|
||||
binding = env0_2;
|
||||
binding.push(a0._guildId);
|
||||
}
|
||||
const _sentRequests = a0._sentRequests;
|
||||
if (_sentRequests.has(env0_0)) {
|
||||
binding = env0_3;
|
||||
binding.push(a0._guildId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* Metro module 6889; source: lib/guild/GuildMemberSubscriptions.tsx; dependencies: [6, 7, 672, 4041, 21, 3, 22, 2] */
|
||||
function _fun54697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:6, offset: 0x0136c22e, size: 168 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
const env0_5 = 1 * MINUTE;
|
||||
const value = _fun54698();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildMemberSubscriptions.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun54698() { // fn#54698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:144, offset: 0x0136c2d6, size: 243 bytes, params: 1, frame: 15
|
||||
return env0_4(GuildMemberSubscriptions, [{key: 'reset', value: function() {
|
||||
this._subscriptions = {};
|
||||
this._unsubscriptions = {};
|
||||
this._unsubscribe.cancel();
|
||||
}}, {key: 'get', value: value_54702}, {key: 'clear', value: function(a0) {
|
||||
delete this._subscriptions[a0];
|
||||
delete this._unsubscriptions[a0];
|
||||
}}, {key: 'subscribe', value: function(a0, a1) {
|
||||
var r0;
|
||||
r0 = this._subscriptions[a0] ?? ({});
|
||||
r0[a1] = (r0[a1] ?? 0) + 1;
|
||||
this._subscriptions[a0] = r0;
|
||||
if (r0[a1] === 1) {
|
||||
this._onChange(a0, this.get(a0));
|
||||
}
|
||||
this.checkForLeaks(a0, a1);
|
||||
}}, {key: 'isSubscribed', value: function(a0, a1) {
|
||||
return this._subscriptions[a0] != null && this._subscriptions[a0][a1] != null;
|
||||
}}, {key: 'isSubscribedToAnyMember', value: function(a0) {
|
||||
return this.get(a0).length > 0;
|
||||
}}, {key: 'unsubscribe', value: function(a0, a1) {
|
||||
var r1;
|
||||
var property;
|
||||
if (this.isSubscribed(a0, a1)) {
|
||||
property = this._unsubscriptions[a0];
|
||||
r1 = property ?? ({});
|
||||
property = r1[a1];
|
||||
r1[a1] = (property ?? 0) + 1;
|
||||
this._unsubscriptions[a0] = r1;
|
||||
if (r1[a1] === 1) {
|
||||
this._unsubscribe.delay(false);
|
||||
}
|
||||
}
|
||||
}}, {key: 'checkForLeaks', value: value_54708}, {key: 'flushUnsubscriptions', value: value_54709}]);
|
||||
}
|
||||
|
||||
function GuildMemberSubscriptions(a0) { // fn#54699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:165, offset: 0x0136c3c9, size: 119 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, GuildMemberSubscriptions);
|
||||
this._subscriptions = {};
|
||||
this._unsubscriptions = {};
|
||||
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
|
||||
this._unsubscribe = new DelayedCall(env1_5, _fun54700);
|
||||
this._onChange = a0;
|
||||
}
|
||||
|
||||
function value_54702(a0) { // fn#54702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:507, offset: 0x0136c47c, size: 61 bytes, params: 2, frame: 12
|
||||
const r2 = this._subscriptions[a0] ?? ({});
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(r2);
|
||||
}
|
||||
|
||||
function value_54708(a0, a1) { // fn#54708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1322, offset: 0x0136c602, size: 183 bytes, params: 3, frame: 18
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var value5;
|
||||
var defaultImport2;
|
||||
let property = this._subscriptions[a0];
|
||||
const value = undefined;
|
||||
const r7 = property == null ? value : property[a1];
|
||||
const value2 = 0;
|
||||
const r1 = r7 ?? value2;
|
||||
property = this._unsubscriptions[a0];
|
||||
const value3 = r1 - ((property == null ? value : property[a1]) ?? value2);
|
||||
if (value3 > 5) {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
defaultImport2 = new defaultImport('GuildMemberSubscriptions');
|
||||
(defaultImport2 instanceof Object ? defaultImport2 : value5).warn('GuildMemberSubscriptions.subscribe(...): Potential reference leak! (' + value3 + ' subscriptions)');
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_54709() { // fn#54709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1652, offset: 0x0136c6b9, size: 103 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
if (!defaultImport.isEmpty(this._unsubscriptions)) {
|
||||
value = defaultImport;
|
||||
value.forEach(this._unsubscriptions, _fun54710);
|
||||
this._unsubscriptions = {};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun54700() { // fn#54700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:329, offset: 0x0136c440, size: 21 bytes, params: 1, frame: 9
|
||||
return env0_0.flushUnsubscriptions();
|
||||
}
|
||||
|
||||
function _fun54710(a0, a1) { // fn#54710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1743, offset: 0x0136c720, size: 135 bytes, params: 3, frame: 20
|
||||
const property = env0_0._subscriptions[a1];
|
||||
var env0_0 = property;
|
||||
(importDefault(22) /* metro dependency 22 */).forEach(a0, _fun54711);
|
||||
const defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
if (defaultImport2.isEmpty(property)) {
|
||||
delete env0_0._subscriptions[a1];
|
||||
}
|
||||
const binding = env0_0;
|
||||
const _onChange = binding._onChange;
|
||||
const get = binding.get;
|
||||
Reflect.apply(_onChange, binding, [a1, Reflect.apply(get, binding, [a1])]);
|
||||
}
|
||||
|
||||
function _fun54711(a0, a1) { // fn#54711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1799, offset: 0x0136c7a7, size: 65 bytes, params: 3, frame: 7
|
||||
const binding = env0_0;
|
||||
const property = binding[a1];
|
||||
const value2 = 0;
|
||||
binding[a1] = (property ?? value2) - a0;
|
||||
if (env0_0[a1] <= value2) {
|
||||
delete env0_0[a1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
/* Metro module 6888; source: lib/guild/GuildSubscriptions.tsx; dependencies: [6, 7, 661, 6889, 6890, 6891, 4041, 22, 2] */
|
||||
function _fun54669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:6, offset: 0x0136b7fd, size: 222 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.FAVORITES;
|
||||
const env0_6 = value.ME;
|
||||
value = _fun54671();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildSubscriptions.tsx');
|
||||
exports.default = value;
|
||||
const MINIMUM_RANGE = (require(6890) /* metro dependency 6890: GuildChannelSubscriptions */).MINIMUM_RANGE;
|
||||
exports.MINIMUM_RANGE = MINIMUM_RANGE;
|
||||
const DEFAULT_RANGES = (require(6890) /* metro dependency 6890: GuildChannelSubscriptions */).DEFAULT_RANGES;
|
||||
exports.DEFAULT_RANGES = DEFAULT_RANGES;
|
||||
}
|
||||
|
||||
function validateGuildId(a0) { // fn#54670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:147, offset: 0x0136b8db, size: 61 bytes, params: 2, frame: 3
|
||||
let r0 = a0 != null && a0 !== 'null' && a0 !== ME;
|
||||
r0 = r0 && a0 !== 'undefined' && a0 !== FAVORITES;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun54671() { // fn#54671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:239, offset: 0x0136b918, size: 471 bytes, params: 1, frame: 15
|
||||
return env0_4(GuildSubscriptions, [{key: '_enqueue', value: function(a0, a1) {
|
||||
var property = this._pending;
|
||||
var object = {};
|
||||
var _pending = this._pending;
|
||||
copyDataProperties(object, a1, copyDataProperties(object, _pending[a0], _pending));
|
||||
property[a0] = object;
|
||||
this._flush.delay();
|
||||
}}, {key: 'reset', value: value_54678}, {key: 'get', value: value_54679}, {key: 'getSubscribedThreadIds',
|
||||
value: function() {
|
||||
return this._threadMemberLists.getSubscribedThreadIds();
|
||||
}}, {key: 'isSubscribedToThreads', value: function(a0) {
|
||||
return this._threads.has(a0);
|
||||
}}, {key: 'isSubscribedToAnyMember', value: function(a0) {
|
||||
var isSubscribedToAnyMember = this._members.isSubscribedToAnyMember(a0);
|
||||
return isSubscribedToAnyMember != null && isSubscribedToAnyMember;
|
||||
}}, {key: 'isSubscribedToMemberUpdates', value: function(a0) {
|
||||
var member_updates = this.get(a0).member_updates;
|
||||
return member_updates != null && member_updates;
|
||||
}}, {key: 'forEach', value: function(a0) {
|
||||
this._subscribed.forEach(a0);
|
||||
}}, {key: 'clearWithoutFlushing', value: value_54685}, {key: 'flush', value: value_54686}, {key: 'subscribeUser',
|
||||
value: function(a0, a1) {
|
||||
if (validateGuildId(a0)) {
|
||||
this._members.subscribe(a0, a1);
|
||||
}
|
||||
}}, {key: 'unsubscribeUser', value: function(a0, a1) {
|
||||
if (validateGuildId(a0)) {
|
||||
this._members.unsubscribe(a0, a1);
|
||||
}
|
||||
}}, {key: 'subscribeChannel', value: value_54690}, {key: 'subscribeToMemberUpdates', value: function(a0) {
|
||||
if (validateGuildId(a0)) {
|
||||
this._enqueue(a0, {member_updates: true});
|
||||
this._memberUpdates.add(a0);
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}}, {key: 'unsubscribeFromMemberUpdates', value: value_54692}, {key: 'subscribeThreadMemberList',
|
||||
value: value_54693}, {key: 'unsubscribeThreadMemberList', value: value_54694}, {key: 'subscribeToGuild',
|
||||
value: function(a0) {
|
||||
this._subscribeToFeature(a0, this._typing, {typing: true});
|
||||
this._subscribeToFeature(a0, this._activities, {activities: true});
|
||||
this._subscribeToFeature(a0, this._threads, {threads: true});
|
||||
}}, {key: '_subscribeToFeature', value: function(a0, a1, a2) {
|
||||
if (validateGuildId(a0)) {
|
||||
if (!a1.has(a0)) {
|
||||
a1.add(a0);
|
||||
this._enqueue(a0, a2);
|
||||
}
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function GuildSubscriptions(a0) { // fn#54672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:260, offset: 0x0136baef, size: 404 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, GuildSubscriptions);
|
||||
const defaultImport = importDefault(6889) /* metro dependency 6889: GuildMemberSubscriptions */;
|
||||
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
const defaultImport4 = new defaultImport(_fun54673);
|
||||
this._members = defaultImport4 instanceof Object ? defaultImport4 : value3;
|
||||
const defaultImport2 = importDefault(6890) /* metro dependency 6890: GuildChannelSubscriptions */;
|
||||
const value6 = Object.create(defaultImport2.prototype, {constructor: {value: defaultImport2}});
|
||||
const defaultImport22 = new defaultImport2(_fun54674);
|
||||
this._channels = defaultImport22 instanceof Object ? defaultImport22 : value6;
|
||||
const defaultImport3 = importDefault(6891) /* metro dependency 6891: GuildThreadSubscriptions */;
|
||||
const value9 = Object.create(defaultImport3.prototype, {constructor: {value: defaultImport3}});
|
||||
const defaultImport32 = new defaultImport3(_fun54675);
|
||||
this._threadMemberLists = defaultImport32 instanceof Object ? defaultImport32 : value9;
|
||||
let Set = global.Set;
|
||||
const value12 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
let set = new Set();
|
||||
this._typing = set instanceof Object ? set : value12;
|
||||
Set = global.Set;
|
||||
const value14 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
this._threads = set instanceof Object ? set : value14;
|
||||
Set = global.Set;
|
||||
const value16 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
this._activities = set instanceof Object ? set : value16;
|
||||
Set = global.Set;
|
||||
const value18 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
this._memberUpdates = set instanceof Object ? set : value18;
|
||||
Set = global.Set;
|
||||
const value20 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
this._subscribed = set instanceof Object ? set : value20;
|
||||
this._pending = {};
|
||||
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
|
||||
this._flush = new DelayedCall(0, _fun54676);
|
||||
this._onChange = a0;
|
||||
}
|
||||
|
||||
function value_54678() { // fn#54678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:878, offset: 0x0136bd3d, size: 143 bytes, params: 1, frame: 10
|
||||
this._subscribed.clear();
|
||||
this._pending = {};
|
||||
this._members.reset();
|
||||
this._memberUpdates.clear();
|
||||
this._channels.reset();
|
||||
this._threadMemberLists.reset();
|
||||
this._typing.clear();
|
||||
this._threads.clear();
|
||||
this._activities.clear();
|
||||
}
|
||||
|
||||
function value_54679(a0) { // fn#54679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:1123, offset: 0x0136bdcc, size: 157 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.typing = this._typing.has(a0);
|
||||
object2.threads = this._threads.has(a0);
|
||||
object2.activities = this._activities.has(a0);
|
||||
object2.members = this._members.get(a0);
|
||||
object2.member_updates = this._memberUpdates.has(a0);
|
||||
object2.channels = this._channels.get(a0);
|
||||
object2.thread_member_lists = this._threadMemberLists.get(a0);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_54685(a0, a1) { // fn#54685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:1894, offset: 0x0136bef9, size: 182 bytes, params: 3, frame: 14
|
||||
if (!(!a1 && this._threads.has(a0))) {
|
||||
this._subscribed.delete(a0);
|
||||
}
|
||||
delete this._pending[a0];
|
||||
this._members.clear(a0);
|
||||
this._channels.clear(a0);
|
||||
this._threadMemberLists.clear(a0);
|
||||
this._typing.delete(a0);
|
||||
this._memberUpdates.delete(a0);
|
||||
if (a1) {
|
||||
this._threads.delete(a0);
|
||||
}
|
||||
this._activities.delete(a0);
|
||||
}
|
||||
|
||||
function value_54686() { // fn#54686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2193, offset: 0x0136bfaf, size: 83 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(this._pending, _fun54687);
|
||||
this._onChange(this._pending);
|
||||
this._pending = {};
|
||||
}
|
||||
|
||||
function value_54690(a0, a1, a2) { // fn#54690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2537, offset: 0x0136c07c, size: 56 bytes, params: 4, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = validateGuildId(a0);
|
||||
return value ? this._channels.subscribe(a0, a1, a2) : !!value;
|
||||
}
|
||||
|
||||
function value_54692(a0) { // fn#54692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2805, offset: 0x0136c0f6, size: 48 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__;
|
||||
if (validateGuildId(a0)) {
|
||||
this._enqueue(a0, {member_updates: false});
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function value_54693(a0, a1, a2) { // fn#54693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2927, offset: 0x0136c126, size: 56 bytes, params: 4, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = validateGuildId(a0);
|
||||
return value ? this._threadMemberLists.subscribe(a0, a1, a2) : !!value;
|
||||
}
|
||||
|
||||
function value_54694(a0, a1) { // fn#54694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:3055, offset: 0x0136c15e, size: 52 bytes, params: 3, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = validateGuildId(a0);
|
||||
return value ? this._threadMemberLists.unsubscribe(a0, a1) : !!value;
|
||||
}
|
||||
|
||||
function _fun54673(a0, a1) { // fn#54673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:346, offset: 0x0136bc83, size: 34 bytes, params: 3, frame: 13
|
||||
return env0_0._enqueue(a0, {members: a1});
|
||||
}
|
||||
|
||||
function _fun54674(a0, a1) { // fn#54674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:413, offset: 0x0136bca5, size: 34 bytes, params: 3, frame: 13
|
||||
return env0_0._enqueue(a0, {channels: a1});
|
||||
}
|
||||
|
||||
function _fun54675(a0, a1) { // fn#54675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:490, offset: 0x0136bcc7, size: 34 bytes, params: 3, frame: 13
|
||||
return env0_0._enqueue(a0, {thread_member_lists: a1});
|
||||
}
|
||||
|
||||
function _fun54687(a0, a1) { // fn#54687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2235, offset: 0x0136c002, size: 30 bytes, params: 3, frame: 11
|
||||
env0_0._subscribed.add(a1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,248 @@
|
||||
/* Metro module 6891; source: lib/guild/GuildThreadSubscriptions.tsx; dependencies: [6, 7, 1393, 2] */
|
||||
function _fun54722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:6, offset: 0x0136ca80, size: 150 bytes, params: 8, frame: 18
|
||||
const _arrayLikeToArray_54725 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = _fun54726();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildThreadSubscriptions.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_54723(a0, a1) { // fn#54723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:120, offset: 0x0136cb16, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun54724;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_54725(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_54725(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_54725(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun54724;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun54726() { // fn#54726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1036, offset: 0x0136cc88, size: 193 bytes, params: 1, frame: 15
|
||||
return env0_3(GuildThreadSubscriptions, [{key: 'reset', value: function() {
|
||||
this._subscriptions = {};
|
||||
}}, {key: 'get', value: function(a0) {
|
||||
return this._get(a0).keys();
|
||||
}}, {key: 'getSubscribedThreadIds', value: value_54730}, {key: '_get', value: value_54731}, {key: 'clear',
|
||||
value: function(a0) {
|
||||
if (a0 in this._subscriptions) {
|
||||
delete this._subscriptions[a0];
|
||||
this._onChange(a0, []);
|
||||
}
|
||||
}}, {key: 'subscribe', value: value_54733}, {key: 'unsubscribe', value: function(a0, a1) {
|
||||
var r0;
|
||||
var property;
|
||||
var value;
|
||||
if (a0 in this._subscriptions) {
|
||||
property = this._subscriptions[a0];
|
||||
value = property.has(a1);
|
||||
if (value) {
|
||||
property.del(a1);
|
||||
this._onChange(a0, property.keys());
|
||||
r0 = true;
|
||||
} else {
|
||||
r0 = !!value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function value_54730() { // fn#54730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1319, offset: 0x0136cd65, size: 136 bytes, params: 1, frame: 21
|
||||
var r8;
|
||||
var r2;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var _createForOfIteratorHelperLoose_54723Binding;
|
||||
var _subscriptions2;
|
||||
var property;
|
||||
var keys;
|
||||
var value3;
|
||||
var value4;
|
||||
var done;
|
||||
var value5;
|
||||
var add;
|
||||
var value6;
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const properties = Object.keys(this._subscriptions);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties !== undefined) {
|
||||
r8 = properties2;
|
||||
reducibleLoop1: while (true) {
|
||||
propertyName = properties[r8];
|
||||
propertyName2 = r8 + 1;
|
||||
if (propertyName === undefined) {
|
||||
break reducibleLoop1;
|
||||
}
|
||||
_createForOfIteratorHelperLoose_54723Binding = _createForOfIteratorHelperLoose_54723;
|
||||
_subscriptions2 = this._subscriptions;
|
||||
property = _subscriptions2[propertyName];
|
||||
keys = property.keys;
|
||||
value3 = _createForOfIteratorHelperLoose_54723Binding(Reflect.apply(keys, property, []));
|
||||
value4 = value3();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
r8 = propertyName2;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
r2 = value4;
|
||||
reducibleLoop3: while (true) {
|
||||
value5 = r2.value;
|
||||
add = set.add;
|
||||
Reflect.apply(add, set, [value5]);
|
||||
value6 = value3();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
r8 = propertyName2;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
r2 = value6;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
function value_54731(a0) { // fn#54731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1520, offset: 0x0136cded, size: 83 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
const property = this._subscriptions[a0];
|
||||
if (property != null) {
|
||||
r0 = property;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(1393) /* metro dependency 1393 */;
|
||||
value = new value({'max': 3, 'updateAgeOnGet': true});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_54733(a0, a1, a2) { // fn#54733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1757, offset: 0x0136ce71, size: 181 bytes, params: 4, frame: 17
|
||||
var r0;
|
||||
var set;
|
||||
var Date;
|
||||
let value = this._get(a0);
|
||||
if (value.has(a1)) {
|
||||
set = value.set;
|
||||
Date = global.Date;
|
||||
Reflect.apply(set, value, [a1, Date.now()]);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a2 != null && value.has(a2);
|
||||
if (r0) {
|
||||
set = value.set;
|
||||
Date = global.Date;
|
||||
Reflect.apply(set, value, [a2, Date.now()]);
|
||||
}
|
||||
set = value.set;
|
||||
Date = global.Date;
|
||||
Reflect.apply(set, value, [a1, Date.now()]);
|
||||
this._subscriptions[a0] = value;
|
||||
this._onChange(a0, value.keys());
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Metro module 6902; source: lib/guild/subscribeGuildMembers.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216, 2] */
|
||||
function _fun54904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:6, offset: 0x01370aa8, size: 287 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const env0_3 = ['forwardedRef'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_6 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_7 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_8 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_9 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_10 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/subscribeGuildMembers.tsx');
|
||||
exports.default = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return _fun54909;
|
||||
};
|
||||
exports.MAX_GUILD_MEMBER_SUBSCRIPTIONS = 50;
|
||||
exports.useSubscribeGuildMembers = useSubscribeGuildMembers;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_54905() { // fn#54905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:205, offset: 0x01370bc7, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_54905_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function subscribeGuildMembers(a0) { // fn#54908, offset: 0x01370c25, size: 16 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun54909;
|
||||
}
|
||||
|
||||
function useSubscribeGuildMembers(a0, a1) { // fn#54920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1859, offset: 0x01370fd4, size: 55 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
env0_10.useEffect(_fun54921, [a0, a1]);
|
||||
}
|
||||
|
||||
function _fun54909(a0) { // fn#54909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:529, offset: 0x01370c35, size: 152 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
value = 'SubscribeGuildMembersContainer(' + (a0.displayName ?? a0.name ?? 'Component') + ')';
|
||||
const binding = env1_10;
|
||||
const Component = binding.Component;
|
||||
_fun54910(Component).displayName = value;
|
||||
const value4 = binding.forwardRef(_fun54919);
|
||||
value4.displayName = 'ForwardRef(' + value + ')';
|
||||
return value4;
|
||||
}
|
||||
|
||||
function _fun54921() { // fn#54921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1911, offset: 0x0137100b, size: 57 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(env0_0, _fun54922);
|
||||
return _fun54923;
|
||||
}
|
||||
|
||||
function _fun54910(a0) { // fn#54910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:681, offset: 0x01370ccd, size: 114 bytes, params: 2, frame: 16
|
||||
const closure = WrappedComponent_54911;
|
||||
env2_9(closure, a0);
|
||||
return env2_6(closure, [{key: 'componentDidUpdate', value: value_54913}, {key: 'componentWillUnmount',
|
||||
value: value_54916}, {key: 'render', value: value_54918}]);
|
||||
}
|
||||
|
||||
function _fun54919(a0, a1) { // fn#54919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1714, offset: 0x01370fa4, size: 48 bytes, params: 3, frame: 14
|
||||
return ((Component) => <Component {...a0} {...{['forwardedRef']: a1}} />)(env0_1);
|
||||
}
|
||||
|
||||
function _fun54922(a0, a1) { // fn#54922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1935, offset: 0x01371044, size: 150 bytes, params: 3, frame: 17
|
||||
var defaultImport;
|
||||
var captureMessage;
|
||||
var value4;
|
||||
const value = environment.__proto__.__proto__;
|
||||
if (!env2_12 && a0.length > 50) {
|
||||
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
||||
captureMessage = defaultImport.captureMessage;
|
||||
value4 = environment.__proto__;
|
||||
Reflect.apply(captureMessage, defaultImport, ['SubscribeGuildMembers called with more than 50 userIds.',
|
||||
{extra: {count: a0.length, guildId: a1, reason: require}}]);
|
||||
}
|
||||
(require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).subscribeMembers(a1, a0);
|
||||
}
|
||||
|
||||
function _fun54923() { // fn#54923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2127, offset: 0x013710da, size: 52 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(env1_0, _fun54924);
|
||||
}
|
||||
|
||||
function WrappedComponent_54911(a0) { // fn#54911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:693, offset: 0x01370d3f, size: 171 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
env3_5(this, WrappedComponent_54911);
|
||||
const items2 = [a0];
|
||||
const value3 = env3_8(WrappedComponent_54911);
|
||||
const value6 = env3_7(this, _isNativeReflectConstruct_54905() ? global.Reflect.construct(value3, items2,
|
||||
env3_8(this).constructor) : value3.apply(this, items2));
|
||||
const value8 = env2_0(a0);
|
||||
(importDefault(22) /* metro dependency 22 */).forEach(value8, _fun54912);
|
||||
value6._subscriptions = value8;
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_54913(a0) { // fn#54913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1092, offset: 0x01370e17, size: 219 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var r5;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var defaultImport2;
|
||||
var defaultImport3;
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
if (!(importDefault(628) /* metro dependency 628: shallowEqual */)(this.props, a0)) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
value3 = env2_0(this.props);
|
||||
value4 = this._subscriptions != null;
|
||||
if (value4) {
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
r5 = defaultImport2.isEqual(this._subscriptions, value3);
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
if (!r5) {
|
||||
if (this._subscriptions != null) {
|
||||
defaultImport3 = importDefault(22) /* metro dependency 22 */;
|
||||
defaultImport3.forEach(this._subscriptions, _fun54914);
|
||||
}
|
||||
(importDefault(22) /* metro dependency 22 */).forEach(value3, _fun54915);
|
||||
this._subscriptions = value3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_54916() { // fn#54916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1443, offset: 0x01370f1f, size: 68 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var value;
|
||||
if (this._subscriptions != null) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value.forEach(this._subscriptions, _fun54917);
|
||||
}
|
||||
}
|
||||
|
||||
function value_54918() { // fn#54918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1581, offset: 0x01370f63, size: 65 bytes, params: 1, frame: 15
|
||||
const props = this.props;
|
||||
return ((Component) => <Component ref={props.forwardedRef} {...env3_4(props, env3_3)} />)(env1_0);
|
||||
}
|
||||
|
||||
function _fun54924(a0, a1) { // fn#54924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2151, offset: 0x0137110e, size: 45 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return (require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).unsubscribeMembers(a1, a0);
|
||||
}
|
||||
|
||||
function _fun54912(a0, a1) { // fn#54912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:951, offset: 0x01370dea, size: 45 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
return (require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).subscribeMembers(a1, a0);
|
||||
}
|
||||
|
||||
function _fun54914(a0, a1) { // fn#54914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1284, offset: 0x01370ef2, size: 45 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
return (require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).unsubscribeMembers(a1, a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 12419; source: lib/hook/Hook.native.tsx; dependencies: [2] */
|
||||
function _fun94716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12605:6, offset: 0x0212484b, size: 130 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/hook/Hook.native.tsx');
|
||||
exports.isHookModuleTooOld = function() {
|
||||
return true;
|
||||
};
|
||||
exports.attachToProcess = function() {
|
||||
var Promise = global.Promise;
|
||||
return Promise.resolve();
|
||||
};
|
||||
exports.cancelAttachToProcess = function() {
|
||||
var Promise = global.Promise;
|
||||
return Promise.resolve();
|
||||
};
|
||||
exports.findSteamProcess = function() {
|
||||
var Promise = global.Promise;
|
||||
return Promise.resolve(null);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 4260; source: lib/injectMediaEngine.native.tsx; dependencies: [4261, 4262, 2] */
|
||||
function _fun35842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4432:6, offset: 0x0107e0db, size: 122 bytes, params: 8, frame: 16
|
||||
const env0_0 = require;
|
||||
(require(4261) /* metro dependency 4261: inject */).inject({supported: function() {
|
||||
return true;
|
||||
}, supportsFeature: function(a0) {
|
||||
return this.getVoiceEngine().supportsFeature(a0);
|
||||
}, setProcessPriority: function() {
|
||||
}, getVoiceEngine: function() {
|
||||
return require(dependencyMap[1]).default;
|
||||
}, getOpenH264LibraryPath: function() {
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/injectMediaEngine.native.tsx');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
/* Metro module 3846; source: lib/intlFormatDate.tsx; dependencies: [1949, 3843, 1244, 2] */
|
||||
function _fun31714(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:6, offset: 0x01001c69, size: 121 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const makeIntlFormatter = function(a0, a1) {
|
||||
var property;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
property = global.Intl;
|
||||
value = property.DateTimeFormat(a0, a1);
|
||||
property = value.format;
|
||||
} catch (error) {
|
||||
property = global.Intl;
|
||||
return property.DateTimeFormat(undefined, a1).format;
|
||||
}
|
||||
return property;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/intlFormatDate.tsx');
|
||||
exports.makeFormatter = makeFormatter_31716;
|
||||
}
|
||||
|
||||
function makeFormatter_31716(a0) { // fn#31716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:310, offset: 0x01001d2b, size: 49 bytes, params: 2, frame: 15
|
||||
const locale = LocaleStore.locale;
|
||||
return tryMakeNativeFormatter(locale, a0) ?? makeIntlFormatter(locale, a0);
|
||||
}
|
||||
|
||||
function tryMakeNativeFormatter(a0, a1) { // fn#31717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:353, owner: makeFormatter_31716.tryMakeNativeFormatter, offset: 0x01001d5c, size: 268 bytes, params: 3, frame: 25
|
||||
var r9;
|
||||
var r8;
|
||||
var value4;
|
||||
var split;
|
||||
var value5;
|
||||
var property;
|
||||
var property2;
|
||||
var moduleValue;
|
||||
var systemLocale;
|
||||
var value6;
|
||||
var property3;
|
||||
var moduleValue2;
|
||||
var value7;
|
||||
var property4;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var initialLocale;
|
||||
var value9;
|
||||
var error;
|
||||
let value = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = undefined;
|
||||
let makeFormatter = require(dependencyMap[1]).makeFormatter;
|
||||
if (makeFormatter == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value4 = value != null;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
if (value4) {
|
||||
try {
|
||||
split = value.split;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(split, value, ['-']);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property = value5[0];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property2 = dependencyMap[2];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
moduleValue = require(property2);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
systemLocale = moduleValue.systemLocale;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value6 = systemLocale == null;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
if (value6) {
|
||||
r9 = value2;
|
||||
} else {
|
||||
try {
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property3 = dependencyMap[2];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
moduleValue2 = require(property3);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
systemLocale = moduleValue2.systemLocale;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
split = systemLocale.split;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value7 = Reflect.apply(split, systemLocale, ['-']);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property4 = value7[0];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
r9 = property4;
|
||||
}
|
||||
r8 = property === r9;
|
||||
} else {
|
||||
r8 = value4;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[1];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
moduleValue3 = require(property);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
makeFormatter = moduleValue3.makeFormatter;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[2];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
moduleValue4 = require(property);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
initialLocale = moduleValue4.initialLocale;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value9 = value !== initialLocale;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(makeFormatter, moduleValue3, [value9 ? value : r8 ? value2 : value, a1]);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
var env0_2 = value;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value = value == null;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
if (value) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
var env0_3 = null;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
return _fun31718;
|
||||
}
|
||||
|
||||
function _fun31718(a0) { // fn#31718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:652, offset: 0x01001e68, size: 80 bytes, params: 2, frame: 15
|
||||
var value;
|
||||
var binding;
|
||||
var value2;
|
||||
var error;
|
||||
var value3;
|
||||
var makeIntlFormatterBinding;
|
||||
try {
|
||||
value = environment;
|
||||
binding = env0_2;
|
||||
value2 = binding(a0);
|
||||
} catch (error) {
|
||||
if (env0_3 == null) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
makeIntlFormatterBinding = makeIntlFormatter;
|
||||
binding = env0_0;
|
||||
env0_3 = makeIntlFormatterBinding(binding, require);
|
||||
}
|
||||
return env0_3(a0);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,171 @@
|
||||
/* Metro module 10560; source: lib/native/BundleUpdater.tsx; dependencies: [5, 6, 7, 27, 661, 3, 477, 90, 1962, 4242, 683, 4826, 2] */
|
||||
function _fun81412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:6, offset: 0x01ececf1, size: 297 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 env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const NativeModules = value.NativeModules;
|
||||
const NativeEventEmitter = value.NativeEventEmitter;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('BundleUpdater');
|
||||
const BundleUpdaterManager = NativeModules.BundleUpdaterManager;
|
||||
let nativeEventEmitter = new NativeEventEmitter(BundleUpdaterManager);
|
||||
const env0_10 = {'downloaded': 'BundleDownloaded', 'otaUpdateChecked': 'OtaUpdateChecked'};
|
||||
nativeEventEmitter = _fun81413();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/native/BundleUpdater.tsx');
|
||||
exports.default = nativeEventEmitter;
|
||||
}
|
||||
|
||||
function _fun81413() { // fn#81413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:342, offset: 0x01ecee1a, size: 384 bytes, params: 1, frame: 18
|
||||
const closure = BundleUpdater;
|
||||
const binding = env0_5;
|
||||
const items2 = [{key: 'getInitialBundleDownloaded', value: function() {
|
||||
return BundleUpdaterManager.getInitialBundleDownloaded();
|
||||
}}];
|
||||
items2[1] = {key: 'getInitialOtaUpdateChecked', value: function() {
|
||||
return BundleUpdaterManager.getInitialOtaUpdateChecked();
|
||||
}};
|
||||
items2[2] = {key: 'addEventListener', value: value_81417};
|
||||
items2[3] = {key: 'checkForUpdateAndReload', value: function() {
|
||||
BundleUpdaterManager.checkForUpdateAndReload();
|
||||
}};
|
||||
items2[4] = {key: 'verifyOtaFiles', value: function() {
|
||||
return BundleUpdaterManager.verifyOtaFiles();
|
||||
}};
|
||||
items2[5] = {key: 'getBuildOverrideCookieContents', value: function() {
|
||||
return BundleUpdaterManager.getBuildOverrideCookieContents();
|
||||
}};
|
||||
items2[6] = {key: 'setBuildOverrideCookieHeader', value: function(a0) {
|
||||
return BundleUpdaterManager.setBuildOverrideCookieHeader(a0);
|
||||
}};
|
||||
items2[7] = {key: 'getOtaRootPath', value: function() {
|
||||
return BundleUpdaterManager.getOtaRootPath();
|
||||
}};
|
||||
items2[8] = {key: 'getOtaStatus', value: function() {
|
||||
return BundleUpdaterManager.getOtaStatus();
|
||||
}};
|
||||
items2[9] = {key: 'getManifestInfo', value: function() {
|
||||
return BundleUpdaterManager.getManifestInfo();
|
||||
}};
|
||||
let env0_0 = env0_3(_fun81426);
|
||||
items2[10] = {key: 'setupOTAAssetFallback', value: value_81428};
|
||||
items2[11] = {key: 'emitOtaMetric', value: value_81429};
|
||||
items2[12] = {key: 'prepareOtaMetricForDatadog', value: function(a0) {
|
||||
var value = a1;
|
||||
var env0_0 = a0;
|
||||
return {name: a0.type, tags: (value !== undefined ? value : []).map(_fun81433)};
|
||||
}};
|
||||
return binding(closure, null, items2);
|
||||
}
|
||||
|
||||
function BundleUpdater() { // fn#81414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:353, offset: 0x01ecef9a, size: 27 bytes, params: 1, frame: 13
|
||||
env1_4(this, BundleUpdater);
|
||||
}
|
||||
|
||||
function value_81417(a0, a1) { // fn#81417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:641, offset: 0x01ecefdb, size: 37 bytes, params: 3, frame: 13
|
||||
env1_9.addListener(env1_10[a0], a1);
|
||||
}
|
||||
|
||||
function* _fun81426() { // fn#81426, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1268, offset: 0x01ecf096, size: 142 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var binding2;
|
||||
var property;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var value3 = binding(env2_2[6]);
|
||||
if (value3.isIOS()) {
|
||||
binding = env2_0;
|
||||
binding2 = env2_2;
|
||||
value = binding(binding2[8]);
|
||||
property = binding2[7];
|
||||
yield value(property, binding2.paths);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
property = value.default;
|
||||
(property ?? value).addCustomSourceTransformer(_fun81427);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_81429(a0) { // fn#81429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1643, offset: 0x01ecf180, size: 115 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(4242) /* metro dependency 4242 */;
|
||||
value = value.match(a0);
|
||||
value = value.with({type: 'OtaCheckAttempt'}, _fun81430);
|
||||
value = value.with({type: 'OtaAssetDownloadAttempt'}, _fun81431);
|
||||
value.exhaustive();
|
||||
}
|
||||
|
||||
function value_81432(a0) { // fn#81432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:2375, offset: 0x01ecf357, size: 57 bytes, params: 2, frame: 12
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const r3 = value !== undefined ? value : [];
|
||||
const object2 = {};
|
||||
object2.name = a0.type;
|
||||
object2.tags = r3.map(_fun81433);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun81427(a0) { // fn#81427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1394, offset: 0x01ecf124, size: 92 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var value;
|
||||
var value2;
|
||||
var binding;
|
||||
var resolvedOTAAssetURI;
|
||||
var uri;
|
||||
var value3;
|
||||
var object2;
|
||||
if (a0.isLoadedFromFileSystem()) {
|
||||
value = a0.scaledAssetURLNearBundle();
|
||||
value2 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_8;
|
||||
resolvedOTAAssetURI = binding.resolvedOTAAssetURI;
|
||||
uri = value.uri;
|
||||
value3 = Reflect.apply(resolvedOTAAssetURI, binding, [uri]);
|
||||
uri = value.uri;
|
||||
if (value3 === uri) {
|
||||
r0 = null;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, value3);
|
||||
object2['uri'] = value3;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun81430(a0) { // fn#81430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1703, offset: 0x01ecf1f3, size: 167 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__.__proto__;
|
||||
env2_7.verbose('OTA check attempt', a0);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const MOBILE_OTA_CHECK_ATTEMPT = AnalyticEvents.MOBILE_OTA_CHECK_ATTEMPT;
|
||||
Reflect.apply(track, defaultImport, [MOBILE_OTA_CHECK_ATTEMPT, {result: a0.result,
|
||||
duration_seconds: a0.durationSeconds, bytes_received: a0.bytesReceived, error: a0.error}]);
|
||||
value = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
return value.increment(BundleUpdater.prepareOtaMetricForDatadog(a0, ['result']));
|
||||
}
|
||||
|
||||
function _fun81431(a0) { // fn#81431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1998, offset: 0x01ecf29a, size: 189 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__.__proto__;
|
||||
env2_7.verbose('OTA asset download attempt', a0);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT = AnalyticEvents.MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT;
|
||||
Reflect.apply(track, defaultImport, [MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT, {result: a0.result,
|
||||
duration_seconds: a0.durationSeconds, error: a0.error, url: a0.url, status_code: a0.statusCode,
|
||||
bytes_received: a0.bytesReceived}]);
|
||||
value = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
return value.increment(BundleUpdater.prepareOtaMetricForDatadog(a0, ['result', 'statusCode']));
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,25 @@
|
||||
/* Metro module 3853; source: lib/native/Linking.tsx; dependencies: [27, 3848, 2] */
|
||||
function _fun31782(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:6, offset: 0x010034d2, size: 142 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).Linking;
|
||||
object2 = {openURL: openURL_31783, openURLExternally: function(a0, a1) {
|
||||
require(dependencyMap[1]).default(a0, a1, {forceExternalBrowser: true});
|
||||
}, performURLNavigation: performURLNavigation};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/native/Linking.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function openURL_31783(a0, a1) { // fn#31783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:117, offset: 0x01003560, size: 61 bytes, params: 3, frame: 15
|
||||
const value = a2;
|
||||
(require(3848) /* metro dependency 3848: handleURL */).default(a0, a1,
|
||||
{allowExternal: !(value !== undefined) || value});
|
||||
}
|
||||
|
||||
function performURLNavigation(a0) { // fn#31785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:254, offset: 0x010035d3, size: 43 bytes, params: 2, frame: 11
|
||||
Linking.openURL(a0).catch(function() {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 3847; source: lib/openURL.tsx; dependencies: [5, 3848, 8878, 1962, 2] */
|
||||
function _fun31719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:6, offset: 0x01001eb8, size: 121 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/openURL.tsx');
|
||||
exports.default = function() {
|
||||
return _openURL.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _openURL() { // fn#31720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:106, offset: 0x01001f31, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun31722).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun31722(a0, a1) { // fn#31722, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:145, offset: 0x01001f6a, size: 124 bytes, params: 3, frame: 16
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_1;
|
||||
(0, binding(binding2[1]).default)(a0);
|
||||
yield binding(binding2[3])(binding2[2], binding2.paths);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
value.default(a0, {skipExtensionCheck: a1, analyticsLocations: []});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
/* Metro module 10741; source: lib/pushnotification/PushNotification.tsx; dependencies: [27, 477, 10742, 10743, 10744, 2] */
|
||||
function _fun82510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:6, offset: 0x01ef9c1b, size: 497 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
var nativeEventEmitter;
|
||||
let env0_0 = require;
|
||||
const createNotification = function(a0) {
|
||||
var env0_0 = a0;
|
||||
var value = null;
|
||||
return value == a0 ? value : {getData: _fun82512, getMessage: _fun82513, getSound: _fun82514,
|
||||
getCategory: _fun82515, getAlert: _fun82516, getContentAvailable: _fun82517, getBadgeCount: _fun82518,
|
||||
finish: _fun82519};
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const {NativeModules, NativeEventEmitter} = require(27) /* metro dependency 27 */;
|
||||
const PushNotificationAndroid = NativeModules.PushNotificationAndroid;
|
||||
if (PushNotificationAndroid != null) {
|
||||
nativeEventEmitter = new NativeEventEmitter(NativeModules.PushNotificationAndroid);
|
||||
}
|
||||
object2 = {getInitialNotification: getInitialNotification, setCurrentUser: function(a0, a1) {
|
||||
if (require(dependencyMap[1]).isAndroid()) {
|
||||
PushNotificationAndroid.setCurrentUser(a0, a1);
|
||||
}
|
||||
}, setMultiAccountUsers: setMultiAccountUsers, clearPushNotificationLogs: function() {
|
||||
if (require(dependencyMap[1]).isAndroid()) {
|
||||
require(dependencyMap[3]).default.clearLogs();
|
||||
}
|
||||
}, setApplicationIconBadgeNumber: setApplicationIconBadgeNumber, clearAllNotifications: clearAllNotifications,
|
||||
presentLocalNotification: presentLocalNotification, getDeliveredNotifications: getDeliveredNotifications,
|
||||
removeDeliveredNotifications: removeDeliveredNotifications,
|
||||
scheduleLocalNotification: scheduleLocalNotification,
|
||||
getScheduledLocalNotifications: getScheduledLocalNotifications,
|
||||
cancelLocalNotifications: cancelLocalNotifications, cancelAllLocalNotifications: cancelAllLocalNotifications,
|
||||
checkPermissions: checkPermissions, requestPermissions: requestPermissions,
|
||||
openNotificationSettings: function() {
|
||||
importDefault(dependencyMap[4])();
|
||||
}, addNotificationEventListener: addNotificationEventListener, addRegisterEventListener: addRegisterEventListener,
|
||||
getSoundsEnabled: function() {
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun82546);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
}, getVibrationsEnabled: function() {
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun82549);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
}, getLightsEnabled: function() {
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun82552);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
}, setSoundsEnabled: function(a0) {
|
||||
if (require(dependencyMap[1]).isAndroid()) {
|
||||
PushNotificationAndroid.setSoundsEnabled(a0);
|
||||
}
|
||||
}, setVibrationsEnabled: function(a0) {
|
||||
if (require(dependencyMap[1]).isAndroid()) {
|
||||
PushNotificationAndroid.setVibrationsEnabled(a0);
|
||||
}
|
||||
}, setLightsEnabled: function(a0) {
|
||||
if (require(dependencyMap[1]).isAndroid()) {
|
||||
PushNotificationAndroid.setLightsEnabled(a0);
|
||||
}
|
||||
}, setAndroidNotifyEveryTime: function(a0) {
|
||||
if (require(dependencyMap[1]).isAndroid()) {
|
||||
PushNotificationAndroid.setNotifyEveryTime(a0);
|
||||
}
|
||||
}, shouldAndroidNotifyEveryTime: function() {
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun82559);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
}};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/pushnotification/PushNotification.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function createNotification(a0) { // fn#82511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:223, offset: 0x01ef9e0c, size: 121 bytes, params: 2, frame: 4
|
||||
const env0_0 = a0;
|
||||
let value = null;
|
||||
return value == a0 ? value : {getData: getData_82512, getMessage: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('TODO: Implement on Android');
|
||||
}, getSound: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('TODO: Implement on Android');
|
||||
}, getCategory: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('TODO: Implement on Android');
|
||||
}, getAlert: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('TODO: Implement on Android');
|
||||
}, getContentAvailable: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('TODO: Implement on Android');
|
||||
}, getBadgeCount: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('TODO: Implement on Android');
|
||||
}, finish: function(a0) {
|
||||
var Error = global.Error;
|
||||
var value = 'Not implemented on Android: ' + a0;
|
||||
value = new Error(value);
|
||||
throw value;
|
||||
}};
|
||||
}
|
||||
|
||||
function getInitialNotification() { // fn#82520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:810, offset: 0x01ef9f28, size: 109 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
r0 = new global.Promise(_fun82521);
|
||||
} else {
|
||||
value = importDefault(10742) /* metro dependency 10742 */;
|
||||
value = value.getInitialNotification();
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function setMultiAccountUsers(a0) { // fn#82524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1016, offset: 0x01efa021, size: 152 bytes, params: 2, frame: 15
|
||||
var NSUserDefaultsBridge;
|
||||
const JSON = global.JSON;
|
||||
const value = JSON.stringify(a0);
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
if (!(PushNotificationAndroid == null || PushNotificationAndroid.setMultiAccountUsernames == null)) {
|
||||
PushNotificationAndroid.setMultiAccountUsernames(value);
|
||||
}
|
||||
} else {
|
||||
NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
|
||||
if (!(NSUserDefaultsBridge == null || NSUserDefaultsBridge.setMultiAccountUsersJSONString == null)) {
|
||||
NSUserDefaultsBridge.setMultiAccountUsersJSONString(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setApplicationIconBadgeNumber(a0) { // fn#82526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1348, offset: 0x01efa104, size: 74 bytes, params: 2, frame: 12
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10742) /* metro dependency 10742 */).setApplicationIconBadgeNumber(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function clearAllNotifications() { // fn#82527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1444, offset: 0x01efa14e, size: 89 bytes, params: 1, frame: 13
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
PushNotificationAndroid.clearAllNotifications();
|
||||
} else {
|
||||
(importDefault(10742) /* metro dependency 10742 */).setApplicationIconBadgeNumber(0);
|
||||
}
|
||||
}
|
||||
|
||||
function presentLocalNotification(a0) { // fn#82528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1556, offset: 0x01efa1a7, size: 91 bytes, params: 2, frame: 14
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
PushNotificationAndroid.presentLocalNotification(a0);
|
||||
} else {
|
||||
(importDefault(10742) /* metro dependency 10742 */).presentLocalNotification(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function getDeliveredNotifications() { // fn#82529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1697, offset: 0x01efa202, size: 93 bytes, params: 1, frame: 12
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const Promise = global.Promise;
|
||||
return value ? Promise.resolve([]) : new Promise(_fun82530);
|
||||
}
|
||||
|
||||
function removeDeliveredNotifications(a0) { // fn#82531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1798, offset: 0x01efa288, size: 74 bytes, params: 2, frame: 12
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10742) /* metro dependency 10742 */).removeDeliveredNotifications(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function scheduleLocalNotification(a0) { // fn#82532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1892, offset: 0x01efa2d2, size: 74 bytes, params: 2, frame: 12
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10742) /* metro dependency 10742 */).scheduleLocalNotification(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function getScheduledLocalNotifications(a0) { // fn#82533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1980, offset: 0x01efa31c, size: 74 bytes, params: 2, frame: 12
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10742) /* metro dependency 10742 */).getScheduledLocalNotifications(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function cancelLocalNotifications(a0) { // fn#82534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2078, offset: 0x01efa366, size: 74 bytes, params: 2, frame: 12
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10742) /* metro dependency 10742 */).cancelLocalNotifications(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function cancelAllLocalNotifications() { // fn#82535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2164, offset: 0x01efa3b0, size: 70 bytes, params: 1, frame: 12
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10742) /* metro dependency 10742 */).cancelAllLocalNotifications();
|
||||
}
|
||||
}
|
||||
|
||||
function checkPermissions(a0) { // fn#82536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2254, offset: 0x01efa3f6, size: 83 bytes, params: 2, frame: 13
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
a0({});
|
||||
} else {
|
||||
(importDefault(10742) /* metro dependency 10742 */).checkPermissions(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function requestPermissions(a0) { // fn#82537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2348, offset: 0x01efa449, size: 113 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
r0 = new global.Promise(function(a0) {
|
||||
return a0({});
|
||||
});
|
||||
} else {
|
||||
value = importDefault(10742) /* metro dependency 10742 */;
|
||||
value = value.requestPermissions(a0);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function addNotificationEventListener(a0, a1) { // fn#82540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2463, offset: 0x01efa4e7, size: 165 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
if (a0 === 'notification') {
|
||||
env0_5.addListener('notification', _fun82541);
|
||||
}
|
||||
if (a0 === 'localNotification') {
|
||||
env0_5.addListener('localNotification', _fun82542);
|
||||
}
|
||||
PushNotificationAndroid.registerEventListener(a0);
|
||||
} else {
|
||||
(importDefault(10742) /* metro dependency 10742 */).addEventListener(a0, a1);
|
||||
}
|
||||
}
|
||||
|
||||
function addRegisterEventListener(a0) { // fn#82543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2785, offset: 0x01efa5b1, size: 129 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
env0_5.addListener('register', _fun82544);
|
||||
PushNotificationAndroid.registerEventListener('register');
|
||||
} else {
|
||||
(importDefault(10742) /* metro dependency 10742 */).addEventListener('register', a0);
|
||||
}
|
||||
}
|
||||
|
||||
function getSoundsEnabled() { // fn#82545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2976, offset: 0x01efa64b, size: 39 bytes, params: 1, frame: 11
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun82546);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function getVibrationsEnabled() { // fn#82548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3084, offset: 0x01efa6cb, size: 39 bytes, params: 1, frame: 11
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun82549);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function getLightsEnabled() { // fn#82551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3192, offset: 0x01efa74b, size: 39 bytes, params: 1, frame: 11
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun82552);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function shouldAndroidNotifyEveryTime() { // fn#82558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3583, offset: 0x01efa8b5, size: 39 bytes, params: 1, frame: 11
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun82559);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function createNotificationGetData() { // fn#82512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:283, owner: createNotification.getData, offset: 0x01ef9e85, size: 72 bytes, params: 1, frame: 14
|
||||
const object2 = {};
|
||||
const binding = env0_0;
|
||||
copyDataProperties(object2, binding, undefined);
|
||||
const message = binding.message;
|
||||
const value2 = null;
|
||||
object2['message'] = value2 != message ? global.JSON.parse(env0_0.message) : value2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun82521(a0) { // fn#82521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:847, offset: 0x01ef9f95, size: 47 bytes, params: 2, frame: 11
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
PushNotificationAndroid.getInitialNotification().then(_fun82522);
|
||||
}
|
||||
|
||||
function _fun82530(a0) { // fn#82530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1754, offset: 0x01efa25f, size: 41 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(10742) /* metro dependency 10742 */).getDeliveredNotifications(a0);
|
||||
}
|
||||
|
||||
function _fun82541(a0) { // fn#82541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2568, offset: 0x01efa58c, size: 37 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = createNotification(a0);
|
||||
if (value != null) {
|
||||
require(value);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82544({token}) { // fn#82544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2860, offset: 0x01efa632, size: 25 bytes, params: 2, frame: 11
|
||||
env0_0(token);
|
||||
}
|
||||
|
||||
function _fun82546(a0) { // fn#82546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2993, offset: 0x01efa672, size: 89 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
PushNotificationAndroid.getSoundsEnabled().then(_fun82547);
|
||||
} else {
|
||||
a0(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82549(a0) { // fn#82549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3101, offset: 0x01efa6f2, size: 89 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
PushNotificationAndroid.getVibrationsEnabled().then(_fun82550);
|
||||
} else {
|
||||
a0(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82552(a0) { // fn#82552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3209, offset: 0x01efa772, size: 89 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
PushNotificationAndroid.getLightsEnabled().then(_fun82553);
|
||||
} else {
|
||||
a0(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82559(a0) { // fn#82559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3600, offset: 0x01efa8dc, size: 91 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
PushNotificationAndroid.shouldNotifyEveryTime().then(_fun82560);
|
||||
} else {
|
||||
a0(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82522(a0) { // fn#82522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:884, offset: 0x01ef9fc4, size: 31 bytes, params: 2, frame: 12
|
||||
env0_0(createNotification(a0));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Metro module 12529; source: lib/rateLimit.tsx; dependencies: [2] */
|
||||
function _fun95464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:6, offset: 0x02146ec3, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/rateLimit.tsx');
|
||||
exports.default = function(a0, a1, a2) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
var env0_2 = a2;
|
||||
var env0_4 = [];
|
||||
var closure = _fun95466;
|
||||
var env0_5 = closure;
|
||||
return closure;
|
||||
};
|
||||
}
|
||||
|
||||
function rateLimit(a0, a1, a2) { // fn#95465, offset: 0x02146f1a, size: 44 bytes, params: 4, frame: 2
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_4 = [];
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
function wrapper(a0) { // fn#95466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:198, owner: rateLimit.wrapper, offset: 0x02146f46, size: 239 bytes, params: 2, frame: 20
|
||||
var r9;
|
||||
var clearTimeout;
|
||||
var binding;
|
||||
var items2;
|
||||
const value = copyRestArgs(0, undefined);
|
||||
const env0_0 = value;
|
||||
const Date = global.Date;
|
||||
const value2 = Date.now();
|
||||
if (env0_3 != null) {
|
||||
clearTimeout = global.clearTimeout;
|
||||
clearTimeout(env0_3);
|
||||
r9 = clearTimeout;
|
||||
}
|
||||
let length = env0_4.length;
|
||||
if (length > 0) {
|
||||
if (env0_4[0] <= value2) {
|
||||
while (true) {
|
||||
binding = env0_4;
|
||||
binding.shift();
|
||||
length = binding.length;
|
||||
if (!(length > 0)) {
|
||||
break;
|
||||
}
|
||||
if (env0_4[0] <= value2) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (env0_4.length < env0_0) {
|
||||
env0_4.push(value2 + require);
|
||||
items2 = [];
|
||||
arraySpread(items2, value, 0, r9);
|
||||
apply(importDefault, items2, undefined, r9);
|
||||
} else {
|
||||
env0_3 = global.setTimeout(_fun95467, env0_4[0] - value2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun95467() { // fn#95467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:340, offset: 0x02147035, size: 41 bytes, params: 1, frame: 14
|
||||
const wrapperBinding = wrapper;
|
||||
const binding = env0_0;
|
||||
const items2 = [];
|
||||
arraySpread(items2, binding, 0, undefined);
|
||||
return apply(wrapperBinding, items2, undefined, undefined);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
/* Metro module 15102; source: lib/search/EnglishAnalyzer.tsx; dependencies: [22, 15103, 15105, 2] */
|
||||
function _fun114263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:6, offset: 0x02419f24, size: 264 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_114266 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const stripPossessive = function(a0) {
|
||||
return a0.replace(RegExp("('|\\u2019|\\uFF07)(s|S)$", ''), '');
|
||||
};
|
||||
const lowercase = function(a0) {
|
||||
return a0.toLowerCase();
|
||||
};
|
||||
const isBlank = function(a0) {
|
||||
return a0.length === 0;
|
||||
};
|
||||
const closure = analyze;
|
||||
const closure2 = shouldHighlight;
|
||||
const closure3 = highlightAST;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const Set = global.Set;
|
||||
const set = new Set(['a', 'an', 'and', 'are', 'as', 'at', 'be', 'but', 'by', 'for', 'if', 'in', 'into', 'is', 'it',
|
||||
'no', 'not', 'of', 'on', 'or', 'such', 'that', 'the', 'their', 'then', 'there', 'these', 'they', 'this', 'to',
|
||||
'was', 'will', 'with']);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/search/EnglishAnalyzer.tsx');
|
||||
exports.analyze = closure;
|
||||
exports.shouldHighlight = closure2;
|
||||
exports.highlightAST = closure3;
|
||||
exports.createASTHighlighter = createASTHighlighter;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_114264(a0, a1) { // fn#114264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:46, offset: 0x0241a02c, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun114265;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_114266(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_114266(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_114266(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun114265;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function analyze(a0) { // fn#114271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1418, offset: 0x0241a1d2, size: 157 bytes, params: 2, frame: 15
|
||||
const value2 = (importDefault(22) /* metro dependency 22 */)(a0.split(RegExp('\\W+', '')));
|
||||
const value3 = value2.map(stripPossessive);
|
||||
const value4 = value3.reject(isBlank);
|
||||
const value5 = value4.map(lowercase);
|
||||
const value6 = value5.reject(isStopWord);
|
||||
return value6.map((require(15103) /* metro dependency 15103: snowballStemmer */).snowballStem).value();
|
||||
}
|
||||
|
||||
function shouldHighlight(a0, a1) { // fn#114272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1575, offset: 0x0241a26f, size: 192 bytes, params: 3, frame: 16
|
||||
var value4;
|
||||
var done;
|
||||
var value5;
|
||||
var includes;
|
||||
var value6;
|
||||
let value = a2;
|
||||
let r1 = value !== undefined ? value : false;
|
||||
const isBlankBinding = isBlank;
|
||||
const value2 = lowercase(stripPossessive(a0));
|
||||
if (isBlankBinding(value2)) {
|
||||
return false;
|
||||
}
|
||||
if (isStopWord(value2)) {
|
||||
return false;
|
||||
}
|
||||
const value3 = (require(15103) /* metro dependency 15103: snowballStemmer */).snowballStem(value2);
|
||||
if (r1) {
|
||||
value = _createForOfIteratorHelperLoose_114264(a1.values());
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
r1 = value4;
|
||||
loopExit7: while (true) {
|
||||
value5 = r1.value;
|
||||
includes = value3.includes;
|
||||
if (Reflect.apply(includes, value3, [value5])) {
|
||||
break loopExit7;
|
||||
}
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
r1 = value6;
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return a1.has(value3);
|
||||
}
|
||||
|
||||
function highlightAST(a0, a1, a2) { // fn#114273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1863, offset: 0x0241a32f, size: 336 bytes, params: 4, frame: 17
|
||||
var items2;
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
a0.forEach(function(a0) {
|
||||
highlightAST(a0, require, importDefault);
|
||||
return a0;
|
||||
});
|
||||
} else if (a0.type === 'list') {
|
||||
a0.items.forEach(_fun114275);
|
||||
} else if (typeof a0.content !== 'string') {
|
||||
if (a0.content != null) {
|
||||
highlightAST(a0.content, a1, a2);
|
||||
}
|
||||
} else if (a0.type !== 'codeBlock') {
|
||||
items2 = [];
|
||||
var env0_3 = '';
|
||||
a0.content.split(RegExp('(\\W+)', 'g')).forEach(_fun114276);
|
||||
if (items2.length > 0) {
|
||||
if (env0_3.length > 0) {
|
||||
items2.push({type: 'text', content: env0_3});
|
||||
}
|
||||
if (a0.type === 'text') {
|
||||
a0.content = items2;
|
||||
} else {
|
||||
items2 = [{type: 'text', content: items2}];
|
||||
a0.content = items2;
|
||||
}
|
||||
}
|
||||
} else if (a0.content != null) {
|
||||
highlightAST(a0.content, a1, a2);
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function createASTHighlighter(a0) { // fn#114277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2597, offset: 0x0241a51f, size: 155 bytes, params: 2, frame: 17
|
||||
var value3;
|
||||
const value = a1;
|
||||
const env0_0 = value !== undefined ? value : false;
|
||||
const length = a0.length;
|
||||
const SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH = (require(15105) /* metro dependency 15105: Search */).SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH;
|
||||
if (length >= SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH) {
|
||||
value3 = a0.length <= (require(15105) /* metro dependency 15105: Search */).SEARCH_PARTIAL_NAME_MATCH_MAX_QUERY_LENGTH;
|
||||
}
|
||||
const Set = global.Set;
|
||||
const set = new Set(analyze(a0));
|
||||
return _fun114278;
|
||||
}
|
||||
|
||||
function _fun114276(a0) { // fn#114276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2121, offset: 0x0241a49f, size: 128 bytes, params: 2, frame: 17
|
||||
const shouldHighlight2 = shouldHighlight(a0, require, importDefault);
|
||||
let binding = env0_3;
|
||||
if (shouldHighlight2) {
|
||||
if (binding.length > 0) {
|
||||
binding = env0_2;
|
||||
binding.push({type: 'text', content: env0_3});
|
||||
}
|
||||
binding = env0_2;
|
||||
binding.push({type: 'highlight', content: a0});
|
||||
} else {
|
||||
env0_3 = binding + a0;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun114278(a0) { // fn#114278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2795, offset: 0x0241a5ba, size: 39 bytes, params: 2, frame: 16
|
||||
highlightAST(a0, env0_2, env0_1 && env0_0);
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 15103; source: lib/search/snowballStemmer.tsx; dependencies: [15104, 2] */
|
||||
function _fun114279(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15300:6, offset: 0x0241a5e1, size: 120 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(15104) /* metro dependency 15104 */).newStemmer('english');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/search/snowballStemmer.tsx');
|
||||
exports.snowballStem = snowballStem;
|
||||
}
|
||||
|
||||
function snowballStem(a0) { // fn#114280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15300:207, offset: 0x0241a659, size: 23 bytes, params: 2, frame: 11
|
||||
return env0_0.stem(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 6730; source: lib/spellcheck/LanguageDetector.tsx; dependencies: [6, 7, 6731, 2] */
|
||||
function _fun52864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:6, offset: 0x01338c37, size: 132 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const value = _fun52865();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/LanguageDetector.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun52865() { // fn#52865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:122, offset: 0x01338cbb, size: 135 bytes, params: 1, frame: 15
|
||||
return env0_3(LanguageDetector, [{key: 'language', get: function() {
|
||||
return this._language;
|
||||
}, set: function(a0) {
|
||||
if (this._language !== a0) {
|
||||
this._language = a0;
|
||||
this._onChange(a0);
|
||||
}
|
||||
}}, {key: 'languageHint', set: function(a0) {
|
||||
this._languageHint = a0;
|
||||
}}, {key: 'process', value: function(a0) {
|
||||
var env0_0 = this;
|
||||
var env0_1 = a0;
|
||||
if (!this._processing) {
|
||||
this._processing = true;
|
||||
global.requestIdleCallback(_fun52871);
|
||||
}
|
||||
}}, {key: '_processEnd', value: function() {
|
||||
var r1;
|
||||
var _minimumTimeRemaining;
|
||||
var value = a0;
|
||||
r1 = value !== undefined ? value : false;
|
||||
this._processing = false;
|
||||
if (r1) {
|
||||
_minimumTimeRemaining = this._minimumTimeRemaining;
|
||||
this._minimumTimeRemaining = typeof _minimumTimeRemaining === 'bigint' ? _minimumTimeRemaining + 1n : +_minimumTimeRemaining + 1;
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function LanguageDetector(a0, a1) { // fn#52866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:143, offset: 0x01338d42, size: 81 bytes, params: 3, frame: 15
|
||||
env1_2(this, LanguageDetector);
|
||||
this._shouldProcess = false;
|
||||
this._processing = false;
|
||||
this._minimumTimeRemaining = 5;
|
||||
this._language = a0;
|
||||
this._languageHint = a0;
|
||||
this._onChange = a1;
|
||||
a1(a0);
|
||||
}
|
||||
|
||||
function value_52870(a0) { // fn#52870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:543, offset: 0x01338dd3, size: 57 bytes, params: 2, frame: 11
|
||||
const env0_1 = a0;
|
||||
if (!this._processing) {
|
||||
this._processing = true;
|
||||
global.requestIdleCallback(_fun52871);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52871(a0) { // fn#52871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:615, offset: 0x01338e0c, size: 144 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
if (a0.timeRemaining() <= env0_0._minimumTimeRemaining) {
|
||||
env0_0._processEnd();
|
||||
} else {
|
||||
env0_1 = env0_1.length > 256 ? env0_1.slice(0, 256) : env0_1;
|
||||
detectLanguage(env0_1, env0_0._languageHint).then(_fun52876, _fun52877);
|
||||
}
|
||||
}
|
||||
|
||||
function detectLanguage(a0, a1) { // fn#52872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:718, offset: 0x01338e9c, size: 75 bytes, params: 3, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
|
||||
value = value.ensureModule('discord_spellcheck');
|
||||
return value.then(_fun52873);
|
||||
}
|
||||
|
||||
function _fun52876(a0) { // fn#52876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1143, offset: 0x01339063, size: 44 bytes, params: 2, frame: 11
|
||||
const binding = env1_0;
|
||||
binding.language = a0;
|
||||
binding._processEnd(env0_0.didTimeout);
|
||||
}
|
||||
|
||||
function _fun52877() { // fn#52877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1197, offset: 0x0133908f, size: 35 bytes, params: 1, frame: 11
|
||||
const binding = env1_0;
|
||||
binding._processEnd(env0_0.didTimeout);
|
||||
}
|
||||
|
||||
function _fun52873() { // fn#52873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:803, offset: 0x01338ee7, size: 91 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
|
||||
const env0_0 = value.requireModule('discord_spellcheck').cld;
|
||||
const Promise = global.Promise;
|
||||
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun52874);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function _fun52874(a0, a1) { // fn#52874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:882, offset: 0x01338f42, size: 80 bytes, params: 3, frame: 16
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const cldBinding = cld;
|
||||
cldBinding.detect(env1_0, {httpHint: require, encodingHint: 'UTF8'}, _fun52875);
|
||||
}
|
||||
|
||||
function _fun52875(a0, a1) { // fn#52875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:935, offset: 0x01338f92, size: 209 bytes, params: 3, frame: 13
|
||||
var Error;
|
||||
var message;
|
||||
if (a0 != null) {
|
||||
Error = global.Error;
|
||||
message = a0.message;
|
||||
require(new Error());
|
||||
} else if (a1.reliable) {
|
||||
if (a1.languages[0].percent < 90) {
|
||||
require(new global.Error('Not enough reliable text.'));
|
||||
} else if (a1.languages[0].score < 500) {
|
||||
require(new global.Error('Not enough reliable text.'));
|
||||
} else {
|
||||
env0_0(a1.languages[0].code);
|
||||
}
|
||||
} else {
|
||||
require(new global.Error('Not enough reliable text.'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
/* Metro module 6727; source: lib/spellcheck/Spellchecker.tsx; dependencies: [5, 57, 6, 7, 1949, 3, 3767, 6728, 6729, 6730, 22, 1864, 1360, 2] */
|
||||
function _fun52835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:6, offset: 0x013380be, size: 339 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = undefined;
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_6 = importDefault(7) /* metro dependency 7 */;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const value4 = new (importDefault(3) /* metro dependency 3: Logger */)('Spellchecker');
|
||||
const env0_9 = (importDefault(3767) /* metro dependency 3767: DiscordNative */) == null ? value : (importDefault(3767) /* metro dependency 3767: DiscordNative */).spellCheck;
|
||||
const value7 = _fun52842();
|
||||
const env0_11 = (importDefault(22) /* metro dependency 22 */).debounce(_fun52859, 250);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/Spellchecker.tsx');
|
||||
exports.Spellchecker = value7;
|
||||
exports.install = function() {
|
||||
return _install.apply(this, arguments);
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
function normalizeLocale(a0) { // fn#52836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:221, offset: 0x01338211, size: 255 bytes, params: 2, frame: 19
|
||||
let value = a0;
|
||||
const r3 = (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[value] ?? value;
|
||||
value = Reflect.apply((require(6729) /* metro dependency 6729 */).parse, value, [r3.replace(RegExp('[_-]', 'g'),
|
||||
'-')]);
|
||||
if (value == null) {
|
||||
env0_8.error('' + r3 + ' is not a valid locale.');
|
||||
} else {
|
||||
var langtag = value.langtag;
|
||||
var language = langtag.language;
|
||||
if (language == null) {
|
||||
env0_8.error('' + r3 + ' is not a valid locale.');
|
||||
return undefined;
|
||||
}
|
||||
langtag = value.langtag;
|
||||
var region = langtag.region;
|
||||
if (region != null) {
|
||||
langtag = value.langtag;
|
||||
language = langtag.language;
|
||||
region = langtag.region;
|
||||
language = language.language;
|
||||
value = language.toLowerCase();
|
||||
return '' + value + '-' + region.toUpperCase();
|
||||
}
|
||||
env0_8.error('' + r3 + ' is not a valid locale.');
|
||||
}
|
||||
}
|
||||
|
||||
function _install() { // fn#52837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2371, offset: 0x01338310, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun52839).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun52842() { // fn#52842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:528, offset: 0x01338444, size: 277 bytes, params: 1, frame: 15
|
||||
return env0_6(Spellchecker, [{key: 'enabled', get: function() {
|
||||
return this._enabled;
|
||||
}, set: function(a0) {
|
||||
this._enabled = a0;
|
||||
}}, {key: 'setLearnedWords', value: function(a0) {
|
||||
spellCheck.setLearnedWords(a0);
|
||||
}}, {key: 'setLocale', value: value_52849}, {key: 'setAppLocale', value: function(a0) {
|
||||
this.regionPreference = a0.split('-')[1];
|
||||
}}, {key: 'detectLanguage', value: function(a0) {
|
||||
if (this.enabled) {
|
||||
this.languageDetector.process(a0);
|
||||
}
|
||||
}}, {key: 'getAvailableLanguages', value: function(a0) {
|
||||
a0.forEach(_fun52854);
|
||||
return {};
|
||||
}}, {key: 'isMisspelled', value: function(a0) {
|
||||
return this.misspelledWord !== '' && a0 === this.misspelledWord;
|
||||
}}, {key: 'getCorrectionsForMisspelling', value: function(a0, a1) {
|
||||
return this.isMisspelled(a0, a1) ? this.corrections : [];
|
||||
}}, {key: 'getCachedMisspelling', value: function() {
|
||||
return {misspelledWord: this.misspelledWord, corrections: this.corrections};
|
||||
}}, {key: 'replaceMisspelling', value: function(a0) {
|
||||
spellCheck.replaceMisspelling(a0);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun52859(a0, a1) { // fn#52859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2080, offset: 0x013388db, size: 195 bytes, params: 3, frame: 20
|
||||
var r1;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const value = null;
|
||||
if (value == a1) {
|
||||
r1 = value;
|
||||
} else {
|
||||
value3 = undefined;
|
||||
moduleValue = require(1864) /* metro dependency 1864: DOMUtils */;
|
||||
if (moduleValue.isElement(a1, global.HTMLInputElement)) {
|
||||
r1 = a1.value;
|
||||
} else {
|
||||
moduleValue2 = require(1864) /* metro dependency 1864: DOMUtils */;
|
||||
if (moduleValue2.isElement(a1, global.HTMLTextAreaElement)) {
|
||||
r1 = a1.value;
|
||||
} else {
|
||||
moduleValue3 = require(1864) /* metro dependency 1864: DOMUtils */;
|
||||
r1 = moduleValue3.isElement(a1) && a1.hasAttribute('contenteditable') ? a1.textContent : value3;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value != r1) {
|
||||
a0.detectLanguage(r1);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun52839() { // fn#52839, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2410, offset: 0x01338349, size: 149 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_9;
|
||||
const getAvailableDictionaries = binding.getAvailableDictionaries;
|
||||
yield Reflect.apply(getAvailableDictionaries, binding, []);
|
||||
const value3 = undefined;
|
||||
if (false) {
|
||||
return value3;
|
||||
}
|
||||
const value5 = (value3 ?? []).map(env2_12);
|
||||
const env2_102 = new env2_10(value5.filter(env2_0(env2_2[12]).isNotNullish));
|
||||
((a0) => {
|
||||
var env0_0 = a0;
|
||||
if (global.document.body != null) {
|
||||
global.document.body.addEventListener('beforeinput', _fun52841, true);
|
||||
}
|
||||
})(env2_102);
|
||||
return env2_102;
|
||||
}
|
||||
|
||||
function Spellchecker(a0) { // fn#52843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:549, offset: 0x01338559, size: 226 bytes, params: 2, frame: 17
|
||||
const env0_1 = a0;
|
||||
env1_5(this, Spellchecker);
|
||||
this._enabled = true;
|
||||
this.misspelledWord = '';
|
||||
this.corrections = [];
|
||||
const value4 = env1_4(LocaleStore.locale.split('-'), 2);
|
||||
const property = value4[0];
|
||||
this.regionPreference = value4[1];
|
||||
const env0_3 = this.getAvailableLanguages(a0);
|
||||
const defaultImport = importDefault(6730) /* metro dependency 6730: LanguageDetector */;
|
||||
const value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
const defaultImport2 = new defaultImport(property, _fun52844);
|
||||
this.languageDetector = defaultImport2 instanceof Object ? defaultImport2 : value5;
|
||||
spellCheck.on('spellcheck-result', _fun52845);
|
||||
}
|
||||
|
||||
function value_52849(a0) { // fn#52849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1231, offset: 0x01338739, size: 52 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = spellCheck.setLocale(a0);
|
||||
if (value != null) {
|
||||
value.then(_fun52850);
|
||||
}
|
||||
}
|
||||
|
||||
function value_52853(a0) { // fn#52853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1554, offset: 0x013387fd, size: 28 bytes, params: 2, frame: 12
|
||||
a0.forEach(_fun52854);
|
||||
return {};
|
||||
}
|
||||
|
||||
function attachToInput(a0) { // fn#52840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2551, offset: 0x013383de, size: 69 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
if (global.document.body != null) {
|
||||
global.document.body.addEventListener('beforeinput', _fun52841, true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52844(a0) { // fn#52844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:802, offset: 0x0133863b, size: 156 bytes, params: 2, frame: 17
|
||||
var r4;
|
||||
const value2 = '' + a0 + '-' + env0_0.regionPreference;
|
||||
if (env0_1.indexOf(value2) !== -1) {
|
||||
env0_0.setLocale(value2);
|
||||
} else {
|
||||
r4 = env0_3[a0] ?? (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[env0_2];
|
||||
if (r4 != null) {
|
||||
env0_0.setLocale(r4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun52845(a0, a1) { // fn#52845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:981, offset: 0x013386d7, size: 57 bytes, params: 3, frame: 7
|
||||
const value = a0;
|
||||
const value2 = a1;
|
||||
env0_0.misspelledWord = value ?? '';
|
||||
env0_0.corrections = value2 ?? [];
|
||||
}
|
||||
|
||||
function _fun52850(a0) { // fn#52850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1283, offset: 0x0133876d, size: 72 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
const binding = env2_8;
|
||||
binding.info('Switching to ' + env0_0, a0 ? '(available)' : '(unavailable)');
|
||||
}
|
||||
|
||||
function _fun52854(a0) { // fn#52854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1593, offset: 0x01338819, size: 67 bytes, params: 2, frame: 15
|
||||
const value = a0;
|
||||
const property = env2_4(value.split('-'), 1)[0];
|
||||
const binding = env0_0;
|
||||
binding[property] = binding[property] ?? value;
|
||||
}
|
||||
|
||||
function _fun52841({target}) { // fn#52841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2644, offset: 0x01338423, size: 33 bytes, params: 2, frame: 13
|
||||
return env4_11(env0_0, target);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 6728; source: lib/spellcheck/fallbackLocales.tsx; dependencies: [2] */
|
||||
function _fun52861(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6906:6, offset: 0x0133899e, size: 92 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/fallbackLocales.tsx');
|
||||
exports.default = {'aa': 'aa-ET', 'af': 'af-ZA', 'ak': 'ak-GH', 'am': 'am-ET', 'an': 'an-ES', 'ar': 'ar-MA',
|
||||
'as': 'as-IN', 'ay': 'ay-PE', 'az': 'az-AZ', 'be': 'be-BY', 'bg': 'bg-BG', 'bi': 'bi-TV', 'bn': 'bn-BD',
|
||||
'bo': 'bo-CN', 'br': 'br-FR', 'bs': 'bs-BA', 'ca': 'ca-ES', 'ce': 'ce-RU', 'cs': 'cs-CZ', 'cv': 'cv-RU',
|
||||
'cy': 'cy-GB', 'da': 'da-DK', 'de': 'de-DE', 'dv': 'dv-MV', 'dz': 'dz-BT', 'el': 'el-GR', 'en': 'en-US',
|
||||
'es': 'es-ES', 'et': 'et-EE', 'eu': 'eu-ES', 'fa': 'fa-IR', 'ff': 'ff-SN', 'fi': 'fi-FI', 'fo': 'fo-FO',
|
||||
'fr': 'fr-FR', 'fy': 'fy-DE', 'ga': 'ga-IE', 'gd': 'gd-GB', 'gl': 'gl-ES', 'gu': 'gu-IN', 'gv': 'gv-GB',
|
||||
'ha': 'ha-NG', 'he': 'he-IL', 'hi': 'hi-IN', 'hr': 'hr-HR', 'ht': 'ht-HT', 'hu': 'hu-HU', 'hy': 'hy-AM',
|
||||
'ia': 'ia-FR', 'id': 'id-ID', 'ig': 'ig-NG', 'ik': 'ik-CA', 'is': 'is-IS', 'it': 'it-IT', 'iu': 'iu-CA',
|
||||
'ja': 'ja-JP', 'ka': 'ka-GE', 'kk': 'kk-KZ', 'kl': 'kl-GL', 'km': 'km-KH', 'kn': 'kn-IN', 'ko': 'ko-KR',
|
||||
'ks': 'ks-IN', 'ku': 'ku-TR', 'kw': 'kw-GB', 'ky': 'ky-KG', 'lb': 'lb-LU', 'lg': 'lg-UG', 'li': 'li-BE',
|
||||
'ln': 'ln-CD', 'lo': 'lo-LA', 'lt': 'lt-LT', 'lv': 'lv-LV', 'mg': 'mg-MG', 'mh': 'mh-MH', 'mi': 'mi-NZ',
|
||||
'mk': 'mk-MK', 'ml': 'ml-IN', 'mn': 'mn-MN', 'mr': 'mr-IN', 'ms': 'ms-MY', 'mt': 'mt-MT', 'my': 'my-MM',
|
||||
'nb': 'nb-NO', 'ne': 'ne-NP', 'nl': 'nl-NL', 'nn': 'nn-NO', 'nr': 'nr-ZA', 'oc': 'oc-FR', 'om': 'om-KE',
|
||||
'or': 'or-IN', 'os': 'os-RU', 'pa': 'pa-PK', 'pl': 'pl-PL', 'ps': 'ps-AF', 'pt': 'pt-PT', 'ro': 'ro-RO',
|
||||
'ru': 'ru-RU', 'rw': 'rw-RW', 'sa': 'sa-IN', 'sc': 'sc-IT', 'sd': 'sd-IN', 'se': 'se-NO', 'si': 'si-LK',
|
||||
'sk': 'sk-SK', 'sl': 'sl-SI', 'so': 'so-SO', 'sq': 'sq-AL', 'sr': 'sr-RS', 'ss': 'ss-ZA', 'st': 'st-ZA',
|
||||
'sv': 'sv-SE', 'sw': 'sw-KE', 'ta': 'ta-IN', 'te': 'te-IN', 'tg': 'tg-TJ', 'th': 'th-TH', 'ti': 'ti-ER',
|
||||
'tk': 'tk-TM', 'tl': 'tl-PH', 'tn': 'tn-ZA', 'tr': 'tr-TR', 'ts': 'ts-ZA', 'tt': 'tt-RU', 'ug': 'ug-CN',
|
||||
'uk': 'uk-UA', 'ur': 'ur-PK', 'uz': 'uz-UZ', 've': 've-ZA', 'vi': 'vi-VN', 'wa': 'wa-BE', 'wo': 'wo-SN',
|
||||
'xh': 'xh-ZA', 'yi': 'yi-US', 'yo': 'yo-NG', 'zh': 'zh-CN', 'zu': 'zu-ZA'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,924 @@
|
||||
/* Metro module 15628; source: lib/superagentPatch.tsx; dependencies: [5, 661, 508, 15629, 1471, 507, 1226, 691, 1949, 1878, 683, 477, 15630, 27, 651, 15631, 15632, 12, 1216, 15635, 1962, 9486, 14208, 8786, 6595, 15641, 4495, 15642, 1458, 2] */
|
||||
function _fun119694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:6, offset: 0x02515e07, size: 302 bytes, params: 8, frame: 17
|
||||
const env0_0 = require;
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
|
||||
const env0_6 = ['https://cdn.discordapp.com/bad-domains/updated_hashes.json',
|
||||
'https://cdn.discordapp.com/bad-domains/hashes.json'];
|
||||
const parse = (importDefault(508) /* metro dependency 508 */).parse;
|
||||
const JSON = global.JSON;
|
||||
parse[''] = JSON.parse;
|
||||
const IdGenerator = (require(15629) /* metro dependency 15629: IdGenerator */).IdGenerator;
|
||||
let idGenerator = new IdGenerator();
|
||||
const env0_8 = RegExp('\\/api(\\/v\\d+)?\\/science', '');
|
||||
idGenerator = require(507) /* metro dependency 507: HTTPUtils */;
|
||||
idGenerator.setRequestPatch({prepareRequest: prepareRequest, interceptResponse: interceptResponse});
|
||||
(require(507) /* metro dependency 507: HTTPUtils */).setAwaitOnline(_fun119709());
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/superagentPatch.tsx');
|
||||
}
|
||||
|
||||
function isAnalyticsEndpoint(a0) { // fn#119695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:289, offset: 0x02515f35, size: 80 bytes, params: 2, frame: 12
|
||||
var URL;
|
||||
var prototype;
|
||||
var value;
|
||||
var uRL;
|
||||
var pathname;
|
||||
var binding;
|
||||
var error;
|
||||
try {
|
||||
URL = global.URL;
|
||||
prototype = URL.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: URL}});
|
||||
uRL = new URL(a0);
|
||||
value = uRL instanceof Object ? uRL : value;
|
||||
pathname = value.pathname;
|
||||
value = environment;
|
||||
binding = env0_8;
|
||||
value = binding.test(pathname);
|
||||
} catch (error) {
|
||||
value = environment;
|
||||
binding = env0_8;
|
||||
return binding.test(a0);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function prepareRequest(a0) { // fn#119696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:420, offset: 0x02515f85, size: 1245 bytes, params: 2, frame: 27
|
||||
var r11;
|
||||
var r12;
|
||||
var r9;
|
||||
var aPIBaseURL;
|
||||
var superPropertiesBase64;
|
||||
var fingerprint;
|
||||
var installationForTracking;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var value14;
|
||||
var debugOptionsHeaderValue;
|
||||
var routingKeyHeaderValue;
|
||||
var currentUser;
|
||||
var binding;
|
||||
var value23;
|
||||
var isAnalyticsEndpointBinding;
|
||||
var URL;
|
||||
var prototype;
|
||||
var value24;
|
||||
var uRL;
|
||||
var value25;
|
||||
var pathname;
|
||||
var isAnalyticsEndpoint2;
|
||||
var URLSearchParams;
|
||||
var value26;
|
||||
var uRLSearchParams;
|
||||
var value27;
|
||||
var append;
|
||||
var value28;
|
||||
var defaultImport;
|
||||
var toURLSafe;
|
||||
var value29;
|
||||
var value30;
|
||||
var value31;
|
||||
var value32;
|
||||
var error;
|
||||
let env0_0 = a0;
|
||||
const value = undefined;
|
||||
let property = require(dependencyMap[6]).default;
|
||||
const property2 = require(dependencyMap[7]).default;
|
||||
const property3 = require(dependencyMap[8]).default;
|
||||
const property4 = require(dependencyMap[9]).default;
|
||||
const property5 = require(dependencyMap[10]).default;
|
||||
const isPlatformEmbedded = require(dependencyMap[11]).isPlatformEmbedded;
|
||||
const env0_1 = global.performance.now();
|
||||
let url = a0.url;
|
||||
if (url[0] === '/') {
|
||||
aPIBaseURL = require(dependencyMap[5]).getAPIBaseURL();
|
||||
url = a0.url;
|
||||
a0.url = aPIBaseURL + url;
|
||||
if (!('Authorization' in a0.header || 'authorization' in a0.header)) {
|
||||
a0.set('Authorization', property.getToken());
|
||||
}
|
||||
require(dependencyMap[12]).updateDynamicSuperProperties();
|
||||
superPropertiesBase64 = property5.getSuperPropertiesBase64();
|
||||
if (superPropertiesBase64 != null) {
|
||||
a0.set('X-Super-Properties', superPropertiesBase64);
|
||||
}
|
||||
fingerprint = property.getFingerprint();
|
||||
r11 = fingerprint != null && fingerprint !== '';
|
||||
if (r11) {
|
||||
a0.set('X-Fingerprint', fingerprint);
|
||||
}
|
||||
installationForTracking = property.getInstallationForTracking();
|
||||
r11 = installationForTracking != null && installationForTracking !== '';
|
||||
if (r11) {
|
||||
a0.set('X-Installation-ID', installationForTracking);
|
||||
}
|
||||
if (isPlatformEmbedded) {
|
||||
moduleValue3 = require(dependencyMap[13]);
|
||||
moduleValue4 = require(dependencyMap[11]);
|
||||
if (moduleValue4.isAndroid()) {
|
||||
property = require(dependencyMap[14]).default;
|
||||
r12 = property;
|
||||
} else {
|
||||
r12 = moduleValue3.NativeModules.LocalizationManager;
|
||||
}
|
||||
a0.set('Accept-Language', ((a0) => {
|
||||
var env0_0 = 10;
|
||||
return a0.reduce(_fun119699, []).join(',');
|
||||
})(r12 == null ? [] : r12.getConstants().Languages ?? []));
|
||||
}
|
||||
a0.set('X-Discord-Locale', property3.locale);
|
||||
value14 = importDefault(dependencyMap[15])();
|
||||
if (value14 != null) {
|
||||
a0.set('X-Discord-Timezone', value14);
|
||||
}
|
||||
debugOptionsHeaderValue = property2.getDebugOptionsHeaderValue();
|
||||
r9 = debugOptionsHeaderValue != null && debugOptionsHeaderValue !== '';
|
||||
if (r9) {
|
||||
a0.set('X-Debug-Options', debugOptionsHeaderValue);
|
||||
}
|
||||
routingKeyHeaderValue = property2.getRoutingKeyHeaderValue();
|
||||
r9 = routingKeyHeaderValue != null && routingKeyHeaderValue !== '';
|
||||
if (r9) {
|
||||
a0.set('X-Routing-Key', routingKeyHeaderValue);
|
||||
}
|
||||
if (property2.isTracingRequests) {
|
||||
currentUser = property4.getCurrentUser();
|
||||
binding = env0_7;
|
||||
value23 = binding.generate((currentUser == null ? value : currentUser.id) ?? '0');
|
||||
a0.set('x-client-trace-id', value23);
|
||||
try {
|
||||
isAnalyticsEndpointBinding = isAnalyticsEndpoint;
|
||||
URL = global.URL;
|
||||
url = a0.url;
|
||||
prototype = URL.prototype;
|
||||
value24 = Object.create(prototype, {constructor: {value: URL}});
|
||||
uRL = new URL(url);
|
||||
value25 = uRL instanceof Object ? uRL : value24;
|
||||
pathname = value25.pathname;
|
||||
isAnalyticsEndpoint2 = isAnalyticsEndpointBinding(pathname);
|
||||
if (!isAnalyticsEndpoint2) {
|
||||
URLSearchParams = global.URLSearchParams;
|
||||
prototype = URLSearchParams.prototype;
|
||||
value26 = Object.create(prototype, {constructor: {value: URLSearchParams}});
|
||||
uRLSearchParams = new URLSearchParams();
|
||||
value27 = uRLSearchParams instanceof Object ? uRLSearchParams : value26;
|
||||
append = value27.append;
|
||||
value28 = '@http.x_client_trace_id:"' + value23 + '"';
|
||||
Reflect.apply(append, value27, ['query', value28]);
|
||||
value27.append('showAllSpans', 'true');
|
||||
property = dependencyMap[4];
|
||||
defaultImport = importDefault(property);
|
||||
toURLSafe = defaultImport.toURLSafe;
|
||||
value29 = value27.toString();
|
||||
value30 = 'traces?' + value29;
|
||||
value31 = Reflect.apply(toURLSafe, defaultImport, [value30, 'https://datadog.discord.tools/apm/']);
|
||||
value32 = value31 == null;
|
||||
if (!value32) {
|
||||
value31.toString();
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
const result = !isAnalyticsEndpoint(a0.url);
|
||||
const moduleValue5 = importAll(dependencyMap[17]);
|
||||
moduleValue5.report('Network', 'Sending ' + a0.method + ' to ' + a0.url);
|
||||
a0.on('response', _fun119700);
|
||||
a0.on('error', _fun119701);
|
||||
return value;
|
||||
}
|
||||
|
||||
function interceptResponse(a0, a1, a2) { // fn#119702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:3035, offset: 0x025167e2, size: 716 bytes, params: 4, frame: 25
|
||||
var r0;
|
||||
var body;
|
||||
var value;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var isLimitedAccessErrorCode;
|
||||
var moduleValue2;
|
||||
var property;
|
||||
var paths;
|
||||
var Promise;
|
||||
var all;
|
||||
var items2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
let statusCode = a0.statusCode;
|
||||
if (statusCode !== 400) {
|
||||
statusCode = a0.statusCode;
|
||||
if (statusCode !== 401) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode, body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(function(a0) {
|
||||
(0, a0.default)();
|
||||
});
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
value = undefined;
|
||||
if ((body == null ? value : body.code) !== AbortCodes.MFA_REQUIRED) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
if (body == null) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (body.mfa) {
|
||||
value = require(dependencyMap[20])(dependencyMap[22], dependencyMap.paths);
|
||||
value = value.then(_fun119705);
|
||||
value.catch(a2);
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
if (body == null) {
|
||||
statusCode = a0.statusCode;
|
||||
if (statusCode !== 401) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
value = undefined;
|
||||
if ((body == null ? value : body.code) !== AbortCodes.MFA_REQUIRED) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
if (body == null) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (body.mfa) {
|
||||
value = require(dependencyMap[20])(dependencyMap[22], dependencyMap.paths);
|
||||
value = value.then(_fun119705);
|
||||
value.catch(a2);
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (body.captcha_key) {
|
||||
Promise = global.Promise;
|
||||
all = Promise.all;
|
||||
value = require(dependencyMap[20]);
|
||||
property = dependencyMap[19];
|
||||
paths = dependencyMap.paths;
|
||||
value = value(property, paths);
|
||||
items2 = [value];
|
||||
value = require(dependencyMap[20]);
|
||||
property = dependencyMap[21];
|
||||
paths = dependencyMap.paths;
|
||||
items2[1] = value(property, paths);
|
||||
value = Reflect.apply(all, Promise, [items2]);
|
||||
value = value.then(_fun119703);
|
||||
value = value.then(_fun119704);
|
||||
value.catch(a2);
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
statusCode = a0.statusCode;
|
||||
if (statusCode !== 401) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
value = undefined;
|
||||
if ((body == null ? value : body.code) !== AbortCodes.MFA_REQUIRED) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body = a0.body;
|
||||
if (body == null) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (body.mfa) {
|
||||
value = require(dependencyMap[20])(dependencyMap[22], dependencyMap.paths);
|
||||
value = value.then(_fun119705);
|
||||
value.catch(a2);
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[23]);
|
||||
isLimitedAccessErrorCode = moduleValue.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
value.then(_fun119706);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[25]);
|
||||
isLimitedAccessErrorCode = moduleValue2.isLimitedAccessErrorCode;
|
||||
statusCode = a0.statusCode;
|
||||
body = a0.body;
|
||||
if (Reflect.apply(isLimitedAccessErrorCode, moduleValue2, [statusCode,
|
||||
body == null ? value3 : body.code])) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[26], dependencyMap.paths);
|
||||
value.then(_fun119707);
|
||||
value = false;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0.statusCode === 403 && (a0.body == null ? value3 : a0.body.code) === AbortCodes.RESTRICTED_HOURS_ACTIVE;
|
||||
if (r0) {
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[27], dependencyMap.paths);
|
||||
value.then(_fun119708);
|
||||
value = false;
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun119709() { // fn#119709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:4155, offset: 0x02516bfb, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_4(_fun119711);
|
||||
return _fun119712;
|
||||
}
|
||||
|
||||
function maybeTrackRequest(a0) { // fn#119697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:2116, owner: prepareRequest.maybeTrackRequest, offset: 0x02516462, size: 149 bytes, params: 2, frame: 16
|
||||
var value2;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
var binding;
|
||||
var Math;
|
||||
if (result) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
defaultImport = importDefault(15632) /* metro dependency 15632: trackHttpRequest */;
|
||||
object2 = {};
|
||||
binding = env0_0;
|
||||
object2.url = binding.url;
|
||||
object2.method = binding.method;
|
||||
object2.status_code = a0 == null ? value3 : a0.status;
|
||||
Math = global.Math;
|
||||
object2.duration_ms = Math.round(global.performance.now() - env0_1);
|
||||
defaultImport(object2);
|
||||
}
|
||||
}
|
||||
|
||||
function populateQValues(a0) { // fn#119698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:1159, owner: prepareRequest.populateQValues, offset: 0x025164f7, size: 51 bytes, params: 2, frame: 13
|
||||
return a0.reduce(_fun119699, []).join(',');
|
||||
}
|
||||
|
||||
function _fun119700(a0) { // fn#119700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:2352, offset: 0x0251659a, size: 213 bytes, params: 2, frame: 28
|
||||
let value = null;
|
||||
const text = value != a0 && a0.status >= 400 ? a0.text : value;
|
||||
const r13 = value == text ? '' : 'and body: ' + text;
|
||||
const value5 = undefined;
|
||||
const logAggregatorModule = importAll(12) /* metro dependency 12: LogAggregator */;
|
||||
const report = logAggregatorModule.report;
|
||||
const binding = env0_0;
|
||||
value = 'Completed ' + binding.method + ' to ' + binding.url + ' with status: ' + (value == a0 ? value5 : a0.status) + ' ' + r13;
|
||||
Reflect.apply(report, logAggregatorModule, ['Network', value]);
|
||||
maybeTrackRequest(a0);
|
||||
return value5;
|
||||
}
|
||||
|
||||
function _fun119701(a0, a1) { // fn#119701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:2573, offset: 0x0251666f, size: 371 bytes, params: 3, frame: 31
|
||||
var r8;
|
||||
var includes;
|
||||
var addBreadcrumb;
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const logAggregatorModule = importAll(12) /* metro dependency 12: LogAggregator */;
|
||||
const report = logAggregatorModule.report;
|
||||
let binding = env0_0;
|
||||
const method = binding.method;
|
||||
let url = binding.url;
|
||||
Reflect.apply(report, logAggregatorModule, ['Network',
|
||||
'Failed ' + method + ' to ' + url + ' with status ' + (a0 == null ? value2 : a0.status) + ' and body: ' + (a1 == null ? value2 : a1.text)]);
|
||||
if (a0 != null) {
|
||||
if ('parse' in a0) {
|
||||
if (a0.parse) {
|
||||
binding = env1_6;
|
||||
includes = binding.includes;
|
||||
url = env0_0.url;
|
||||
r8 = Reflect.apply(includes, binding,
|
||||
[url]) ? env0_0.xhr == null || env0_0.xhr.responseText == null ? value2 : env0_0.xhr.responseText.slice(0,
|
||||
|
||||
|
||||
1000) : '[FILTERED]';
|
||||
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
||||
addBreadcrumb = value.addBreadcrumb;
|
||||
binding = env0_0;
|
||||
url = binding.url;
|
||||
Reflect.apply(addBreadcrumb, value, [{'category': 'superagent',
|
||||
'message': 'Failed to parse HTTP response.',
|
||||
data: {method: binding.method, url: url, responseText: r8, status: a0.status}}]);
|
||||
}
|
||||
}
|
||||
}
|
||||
maybeTrackRequest(a1);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun119703(a0) { // fn#119703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:3205, offset: 0x02516aae, size: 137 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var r2;
|
||||
var r0;
|
||||
var property;
|
||||
var item3;
|
||||
var value3;
|
||||
var extractCaptchaPropsFromResponse;
|
||||
var error;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
const value = undefined;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
const value2 = item2 === value;
|
||||
let r5 = value2 ? value : item;
|
||||
try {
|
||||
property = r5.default;
|
||||
} catch (error) {
|
||||
r0 = error;
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
if (!r2) {
|
||||
try {
|
||||
r1.return();
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
throw r0;
|
||||
}
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r5 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r5 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r5 = item;
|
||||
}
|
||||
}
|
||||
try {
|
||||
extractCaptchaPropsFromResponse = r5.extractCaptchaPropsFromResponse;
|
||||
} catch (error) {
|
||||
r0 = error;
|
||||
if (!r2) {
|
||||
try {
|
||||
r1.return();
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
throw r0;
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
return property.showCaptchaAsync(extractCaptchaPropsFromResponse(env0_0.body));
|
||||
}
|
||||
|
||||
function _fun119704({captcha_key, captcha_rqtoken, captcha_session_id}) { // fn#119704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:3296, offset: 0x02516b37, size: 72 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2['X-Captcha-Key'] = captcha_key;
|
||||
if (captcha_rqtoken != null) {
|
||||
object2['X-Captcha-Rqtoken'] = captcha_rqtoken;
|
||||
}
|
||||
if (captcha_session_id != null) {
|
||||
object2['X-Captcha-Session-Id'] = captcha_session_id;
|
||||
}
|
||||
require(object2);
|
||||
}
|
||||
|
||||
function _fun119705({openMFAModal}) { // fn#119705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:3603, offset: 0x02516b7f, size: 46 bytes, params: 2, frame: 15
|
||||
openMFAModal(env0_0.body.mfa, require, importDefault);
|
||||
}
|
||||
|
||||
function _fun119706(a0) { // fn#119706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:3768, offset: 0x02516bad, size: 16 bytes, params: 2, frame: 9
|
||||
(0, a0.default)();
|
||||
}
|
||||
|
||||
function _fun119707({default: property}) { // fn#119707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:3905, offset: 0x02516bbd, size: 45 bytes, params: 2, frame: 13
|
||||
property(env0_0.body?.guild_id);
|
||||
}
|
||||
|
||||
function _fun119708({openRestrictedHoursModal}) { // fn#119708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:4085, offset: 0x02516bea, size: 17 bytes, params: 2, frame: 9
|
||||
openRestrictedHoursModal();
|
||||
}
|
||||
|
||||
function* _fun119711(a0) { // fn#119711, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:4175, offset: 0x02516c2a, size: 215 bytes, params: 2, frame: 21
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_2;
|
||||
var binding2 = env2_3;
|
||||
binding(binding2[17]).report('Network', 'Request to ' + a0 + ' failed, will retry.');
|
||||
var value5 = env2_1(binding2[28]);
|
||||
if (!value5.isOnline()) {
|
||||
binding = env2_1;
|
||||
var value6 = binding(env2_3[28]);
|
||||
yield value6.awaitOnline();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_2;
|
||||
binding(env2_3[17]).report('Network', 'Network detected online, retrying ' + a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119699(a0, a1) { // fn#119699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15836:1213, offset: 0x0251652a, size: 112 bytes, params: 3, frame: 18
|
||||
if (env0_0 === 10) {
|
||||
a0.push(a1);
|
||||
} else {
|
||||
a0.push('' + a1 + ';q=0.' + env0_0);
|
||||
}
|
||||
const Math = global.Math;
|
||||
env0_0 = Math.max(env0_0 - 1, 1);
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
/* Metro module 11217; source: lib/uploadRtcLogFiles.android.tsx; dependencies: [5, 661, 3, 11218, 4131, 507, 2] */
|
||||
function _fun85739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:6, offset: 0x01f7a3fd, size: 197 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = value.DebugLogCategory;
|
||||
const env0_4 = value.Endpoints;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('uploadRtcLogFiles');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploadRtcLogFiles.android.tsx');
|
||||
exports.uploadRtcLogFiles = function() {
|
||||
return _uploadRtcLogFiles.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _uploadRtcLogFiles() { // fn#85740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:187, offset: 0x01f7a4c2, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun85742).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun85742(a0) { // fn#85742, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:246, offset: 0x01f7a4ff, size: 659 bytes, params: 2, frame: 36
|
||||
var r16;
|
||||
var value;
|
||||
var value2;
|
||||
var items2;
|
||||
var length;
|
||||
var value3;
|
||||
var property;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property2;
|
||||
var readFile;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var binding3;
|
||||
var property3;
|
||||
var value7;
|
||||
var HTTP;
|
||||
var post;
|
||||
var object3;
|
||||
var DEBUG_LOG;
|
||||
var binding4;
|
||||
var ANDROID_APP;
|
||||
var value8;
|
||||
var object4;
|
||||
var value9;
|
||||
var error;
|
||||
var error2;
|
||||
var status;
|
||||
var message;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var binding5;
|
||||
var UploadVoiceDebugLogsError;
|
||||
var UploadErrorCodes;
|
||||
var UPLOAD;
|
||||
var prototype;
|
||||
var uploadVoiceDebugLogsError;
|
||||
var binding6;
|
||||
var PROGRESS;
|
||||
var warn;
|
||||
var error3;
|
||||
var binding7;
|
||||
var READ;
|
||||
exceptionSkip53: while (true) {
|
||||
exceptionLanding53: while (true) {
|
||||
exceptionSkip44: while (true) {
|
||||
exceptionLanding44: while (true) {
|
||||
value = undefined;
|
||||
value2 = false;
|
||||
if (value2) {
|
||||
return value;
|
||||
}
|
||||
value = 0;
|
||||
items2 = ['discord-webrtc_0', 'discord-webrtc_1', 'discord-last-webrtc_0', 'discord-last-webrtc_1'];
|
||||
length = items2.length;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
if (value < length) {
|
||||
r16 = value;
|
||||
reducibleLoop2: while (true) {
|
||||
property = items2[r16];
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
property2 = binding2[3];
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
value = binding(property2);
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
readFile = value.readFile;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(readFile, value, ['documents', property, 'utf8']);
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value4 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
if (value4) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value5 = value == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
if (!value5) {
|
||||
try {
|
||||
length = value.length;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
value6 = length > a0;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
if (value6) {
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
warn = binding.warn;
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(warn, binding,
|
||||
['uploadRtcLogFiles: Log file is too big, skipping upload']);
|
||||
} catch (error) {
|
||||
break exceptionLanding53;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
property3 = binding3[5];
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
value7 = binding(property3);
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
HTTP = value7.HTTP;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
post = HTTP.post;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
DEBUG_LOG = binding.DEBUG_LOG;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
ANDROID_APP = binding4.ANDROID_APP;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
value8 = Reflect.apply(DEBUG_LOG, binding, [ANDROID_APP, property]);
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object3.url = value8;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object3.body = value;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object4['Content-Type'] = 'text/plain';
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object3.headers = object4;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
object3.rejectWithError = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(post, HTTP, [object3]);
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value9 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding44;
|
||||
}
|
||||
reducibleJoin50: while (true) {
|
||||
if (value9) {
|
||||
return value;
|
||||
}
|
||||
break reducibleJoin50;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = typeof r16 === 'bigint' ? r16 + 1n : +r16 + 1;
|
||||
length = items2.length;
|
||||
if (!(value < length)) {
|
||||
return undefined;
|
||||
}
|
||||
r16 = value;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
break exceptionSkip44;
|
||||
}
|
||||
binding = env2_5;
|
||||
error2 = binding.error;
|
||||
status = error.status;
|
||||
message = error.message;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
Reflect.apply(error2, binding,
|
||||
['uploadRtcLogFiles: Log file upload error: status: ' + status + ', message: ' + message]);
|
||||
status = error.status;
|
||||
if (status === 429) {
|
||||
binding = env2_0;
|
||||
binding6 = env2_1;
|
||||
UploadVoiceDebugLogsError = binding(binding6[4]).UploadVoiceDebugLogsError;
|
||||
PROGRESS = binding(binding6[4]).UploadErrorCodes.PROGRESS;
|
||||
throw new UploadVoiceDebugLogsError();
|
||||
}
|
||||
binding = env2_0;
|
||||
binding5 = env2_1;
|
||||
UploadVoiceDebugLogsError = binding(binding5[4]).UploadVoiceDebugLogsError;
|
||||
UploadErrorCodes = binding(binding5[4]).UploadErrorCodes;
|
||||
UPLOAD = UploadErrorCodes.UPLOAD;
|
||||
prototype = UploadVoiceDebugLogsError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
|
||||
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
|
||||
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
|
||||
throw value;
|
||||
break exceptionSkip44;
|
||||
}
|
||||
break exceptionSkip53;
|
||||
}
|
||||
binding = env2_5;
|
||||
error3 = binding.error;
|
||||
message = error.message;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
Reflect.apply(error3, binding, ['uploadRtcLogFiles: Log file reading error: ' + message]);
|
||||
binding = env2_0;
|
||||
binding7 = env2_1;
|
||||
UploadVoiceDebugLogsError = binding(binding7[4]).UploadVoiceDebugLogsError;
|
||||
UploadErrorCodes = binding(binding7[4]).UploadErrorCodes;
|
||||
READ = UploadErrorCodes.READ;
|
||||
prototype = UploadVoiceDebugLogsError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
|
||||
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
|
||||
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
|
||||
throw value;
|
||||
break exceptionSkip53;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,128 @@
|
||||
/* Metro module 4650; source: lib/uploader/Upload.tsx; dependencies: [6, 7, 15, 17, 18, 4651, 22, 4655, 491, 639, 2] */
|
||||
function _fun40122(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:6, offset: 0x010f6cfc, size: 320 bytes, params: 8, frame: 21
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
object3 = {REACT_NATIVE: 0};
|
||||
object3[0] = 'REACT_NATIVE';
|
||||
object3.WEB = 1;
|
||||
object3[1] = 'WEB';
|
||||
const object4 = {FILE_ATTACHMENT: 0};
|
||||
object4[0] = 'FILE_ATTACHMENT';
|
||||
object4.IMAGE_PICKER = 1;
|
||||
object4[1] = 'IMAGE_PICKER';
|
||||
object4.IMAGE_EDITOR = 2;
|
||||
object4[2] = 'IMAGE_EDITOR';
|
||||
const EventEmitter = (require(639) /* metro dependency 639 */).EventEmitter;
|
||||
const value = _fun40126(EventEmitter);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/Upload.tsx');
|
||||
exports.default = value;
|
||||
exports.UploadPlatform = object3;
|
||||
exports.isResolvedUpload = function(a0) {
|
||||
return a0.isVideo !== undefined && a0.isImage !== undefined;
|
||||
};
|
||||
exports.UploadOrigin = object4;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_40123() { // fn#40123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:148, offset: 0x010f6e3c, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_40123_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun40126(a0) { // fn#40126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:570, offset: 0x010f6e9a, size: 91 bytes, params: 2, frame: 16
|
||||
const closure = Upload;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'cancel', value: function() {
|
||||
}}, {key: 'resetState', value: function() {
|
||||
return this;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function Upload(a0) { // fn#40127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:582, offset: 0x010f6ef5, size: 579 bytes, params: 2, frame: 21
|
||||
var moduleValue;
|
||||
var classifyFile;
|
||||
var file;
|
||||
var classification;
|
||||
var moduleValue2;
|
||||
var getFile;
|
||||
var filename;
|
||||
var value8;
|
||||
const value = environment.__proto__;
|
||||
env1_4(this, Upload);
|
||||
const value3 = env1_7(Upload);
|
||||
const value6 = env1_6(this, _isNativeReflectConstruct_40123() ? global.Reflect.construct(value3, [],
|
||||
env1_7(this).constructor) : value3.apply(this, undefined));
|
||||
value6.allowOptimization = true;
|
||||
value6.item = a0;
|
||||
const platform = a0.platform;
|
||||
const REACT_NATIVE = env1_9.REACT_NATIVE;
|
||||
if (platform === REACT_NATIVE) {
|
||||
value6.id = a0.id ?? a0.uri;
|
||||
moduleValue2 = require(4651) /* metro dependency 4651: UploadUtils */;
|
||||
getFile = moduleValue2.getFile;
|
||||
filename = a0.filename;
|
||||
value8 = Reflect.apply(getFile, moduleValue2, [{uri: a0.uri, overrideFilename: filename,
|
||||
overrideType: a0.mimeType}]);
|
||||
filename = value8.filename;
|
||||
value6.filename = filename;
|
||||
value6.isImage = value8.isImage;
|
||||
value6.isVideo = value8.isVideo;
|
||||
value6.mimeType = value8.type;
|
||||
value6.origin = a0.origin;
|
||||
value6.durationSecs = a0.durationSecs;
|
||||
value6.waveform = a0.waveform;
|
||||
} else {
|
||||
value6.id = a0.id ?? (importDefault(22) /* metro dependency 22 */).uniqueId('upload');
|
||||
moduleValue = importAll(4655) /* metro dependency 4655: FileUtils */;
|
||||
classifyFile = moduleValue.classifyFile;
|
||||
file = a0.file;
|
||||
value6.classification = Reflect.apply(classifyFile, moduleValue, [file]);
|
||||
classification = value6.classification;
|
||||
value6.isImage = classification === 'image';
|
||||
classification = value6.classification;
|
||||
value6.isVideo = classification === 'video';
|
||||
file = a0.file;
|
||||
value6.filename = file.name;
|
||||
file = a0.file;
|
||||
value6.mimeType = file.type;
|
||||
value6.origin = a0.origin;
|
||||
}
|
||||
value6.isThumbnail = a0.isThumbnail;
|
||||
value6.clip = a0.clip;
|
||||
value6.uniqueId = (require(491) /* metro dependency 491 */).v4();
|
||||
value6.spoiler = false;
|
||||
value6.description = null;
|
||||
return value6;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Metro module 4692; source: lib/uploader/UploadTargets.tsx; dependencies: [6, 7, 1379, 661, 4655, 4651, 4693, 4695, 2] */
|
||||
function _fun40570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:6, offset: 0x0110535c, size: 256 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.Endpoints;
|
||||
const env0_8 = constantsModule.MAX_UPLOAD_COUNT;
|
||||
const env0_9 = _fun40571();
|
||||
object2 = {MESSAGE_ATTACHMENT: 0};
|
||||
object2[0] = 'MESSAGE_ATTACHMENT';
|
||||
object2.GUILD_PRODUCT_ATTACHMENT = 1;
|
||||
object2[1] = 'GUILD_PRODUCT_ATTACHMENT';
|
||||
object2.GRAVITY_ATTACHMENT = 2;
|
||||
object2[2] = 'GRAVITY_ATTACHMENT';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploadTargets.tsx');
|
||||
exports.UploadTargets = object2;
|
||||
exports.getUploadTarget = getUploadTarget;
|
||||
}
|
||||
|
||||
function _fun40571() { // fn#40571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:173, offset: 0x0110545c, size: 176 bytes, params: 1, frame: 15
|
||||
return env0_5(MessageAttachmentUploadTarget, [{key: 'getCreateAttachmentURL', value: function(a0) {
|
||||
return Endpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(a0);
|
||||
}}, {key: 'getDeleteUploadURL', value: function(a0) {
|
||||
return Endpoints.MESSAGE_DELETE_UPLOAD(a0);
|
||||
}}, {key: 'getMaxFileSize', value: value_40575}, {key: 'getMaxAttachmentsCount', value: function() {
|
||||
return MAX_UPLOAD_COUNT;
|
||||
}}, {key: 'getMaxTotalAttachmentSize', value: function() {
|
||||
return require(dependencyMap[5]).MAX_TOTAL_ATTACHMENT_SIZE;
|
||||
}}, {key: 'shouldReactNativeCompressUploads', get: function() {
|
||||
return true;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function getUploadTarget(a0) { // fn#40579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:1077, offset: 0x011055a1, size: 158 bytes, params: 2, frame: 12
|
||||
var value3;
|
||||
var value4;
|
||||
var value;
|
||||
const GUILD_PRODUCT_ATTACHMENT = env0_10.GUILD_PRODUCT_ATTACHMENT;
|
||||
if (GUILD_PRODUCT_ATTACHMENT === a0) {
|
||||
value = importDefault(4693) /* metro dependency 4693: GuildProductAttachmentUploadTarget */;
|
||||
value4 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
value = new value();
|
||||
return value instanceof Object ? value : value4;
|
||||
}
|
||||
const GRAVITY_ATTACHMENT = env0_10.GRAVITY_ATTACHMENT;
|
||||
if (GRAVITY_ATTACHMENT === a0) {
|
||||
value = importDefault(4695) /* metro dependency 4695: ICYMIAttachmentUploadTarget */;
|
||||
value3 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
value = new value();
|
||||
return value instanceof Object ? value : value3;
|
||||
}
|
||||
env0_10.MESSAGE_ATTACHMENT;
|
||||
const binding = env0_9;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
const binding2 = new binding();
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
|
||||
function value_40575(a0) { // fn#40575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:479, offset: 0x0110553a, size: 70 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__;
|
||||
const basicChannel = ChannelStore.getBasicChannel(a0);
|
||||
value = undefined;
|
||||
const fileUtilsModule = importAll(4655) /* metro dependency 4655: FileUtils */;
|
||||
return fileUtilsModule.maxFileSize(basicChannel == null ? value : basicChannel.guild_id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
/* Metro module 4658; source: lib/uploader/UploadUtils.tsx; dependencies: [6, 7, 4650, 507, 4659, 1873, 2] */
|
||||
function _fun40246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:6, offset: 0x010fa529, size: 180 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = _fun40247();
|
||||
const value2 = _fun40251();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploadUtils.tsx');
|
||||
exports.doesImageMatchUpload = doesImageMatchUpload;
|
||||
exports.calculateProgress = function(a0, a1) {
|
||||
var value = 0;
|
||||
return value === a1 ? value : global.Math.min(global.Math.floor(a0 / a1 * 100), 100);
|
||||
};
|
||||
exports.DefaultHttpClient = value;
|
||||
exports.canUploadNatively = canUploadNatively;
|
||||
exports.LibdiscoreHttpClient = value2;
|
||||
}
|
||||
|
||||
function _fun40247() { // fn#40247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:122, offset: 0x010fa5dd, size: 80 bytes, params: 1, frame: 15
|
||||
return env0_3(DefaultHttpClient, [{key: 'sliceBody', value: function(a0, a1) {
|
||||
var r0;
|
||||
var value = a0;
|
||||
if (value instanceof global.File) {
|
||||
value = value.slice(a1);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}}, {key: 'doUpload', value: function(a0, a1) {
|
||||
if (a1?.fileByteRange != null) {
|
||||
a0.body = this.sliceBody(a0.body, a1.fileByteRange.start);
|
||||
}
|
||||
return require(dependencyMap[3]).HTTP.put(a0);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun40251() { // fn#40251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:448, offset: 0x010fa6be, size: 55 bytes, params: 1, frame: 14
|
||||
return env0_3(LibdiscoreHttpClient, [{key: 'doUpload', value: value_40253}]);
|
||||
}
|
||||
|
||||
function doesImageMatchUpload(a0, a1) { // fn#40256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1993, offset: 0x010fab0b, size: 176 bytes, params: 3, frame: 15
|
||||
var item;
|
||||
const UploadPlatform = (require(4650) /* metro dependency 4650: Upload */).UploadPlatform;
|
||||
var filename;
|
||||
var originalUri;
|
||||
if (a1.id === a0.uri) {
|
||||
return true;
|
||||
}
|
||||
if (a1.id == null) {
|
||||
item = a1.item;
|
||||
if (item.platform === UploadPlatform.REACT_NATIVE) {
|
||||
item = a1.item;
|
||||
filename = a0.filename;
|
||||
originalUri = item.originalUri;
|
||||
if (originalUri === a0.uri) {
|
||||
return true;
|
||||
}
|
||||
if (filename == null) {
|
||||
return false;
|
||||
}
|
||||
originalUri = item.originalUri;
|
||||
if (originalUri == null) {
|
||||
return false;
|
||||
}
|
||||
if (originalUri.includes(filename)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (a1.id === a0.id) {
|
||||
return true;
|
||||
}
|
||||
item = a1.item;
|
||||
if (item.platform === UploadPlatform.REACT_NATIVE) {
|
||||
item = a1.item;
|
||||
filename = a0.filename;
|
||||
originalUri = item.originalUri;
|
||||
if (originalUri === a0.uri) {
|
||||
return true;
|
||||
}
|
||||
if (filename == null) {
|
||||
return false;
|
||||
}
|
||||
originalUri = item.originalUri;
|
||||
if (originalUri == null) {
|
||||
return false;
|
||||
}
|
||||
if (originalUri.includes(filename)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function canUploadNatively(a0) { // fn#40258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:2423, offset: 0x010fabf8, size: 138 bytes, params: 2, frame: 15
|
||||
var moduleValue;
|
||||
const platform = a0.platform;
|
||||
var value;
|
||||
const UploadPlatform = (require(4650) /* metro dependency 4650: Upload */).UploadPlatform;
|
||||
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
|
||||
let r0 = platform === REACT_NATIVE && a0.uri != null;
|
||||
if (r0) {
|
||||
moduleValue = require(4659) /* metro dependency 4659: AttachmentFileNative */;
|
||||
r0 = moduleValue.fileIsInAppDir(a0.uri);
|
||||
}
|
||||
if (r0) {
|
||||
value = require(1873) /* metro dependency 1873: shimNative */;
|
||||
value = value.isLibdiscoreInitialized();
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function LibdiscoreHttpClient() { // fn#40252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:469, offset: 0x010fa6f5, size: 96 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
env1_2(this, LibdiscoreHttpClient);
|
||||
value = require(1873) /* metro dependency 1873: shimNative */;
|
||||
if (value.isLibdiscoreInitialized()) {
|
||||
return undefined;
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('Libdiscore is not loaded');
|
||||
}
|
||||
|
||||
function value_40253(a0, a1) { // fn#40253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:637, offset: 0x010fa755, size: 426 bytes, params: 3, frame: 20
|
||||
var environment;
|
||||
var r1;
|
||||
var value5;
|
||||
let env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const httpClientAPI = (require(1873) /* metro dependency 1873: shimNative */).getHttpClientAPI();
|
||||
if (httpClientAPI == null) {
|
||||
throw new global.Error('Libdiscore client is not available');
|
||||
}
|
||||
let body = a0.body;
|
||||
let uri = body == null ? value : body.uri;
|
||||
if (value !== uri && typeof a0.body.uri === 'string') {
|
||||
body = a0.body;
|
||||
uri = body.uri;
|
||||
value5 = uri.startsWith('file://');
|
||||
body = a0.body;
|
||||
uri = body.uri;
|
||||
r1 = value5 ? uri.slice(7) : uri;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
if (value === r1) {
|
||||
throw new global.Error('No file path found in request body');
|
||||
}
|
||||
if (r1 === '') {
|
||||
throw new global.Error('No file path found in request body');
|
||||
}
|
||||
let env0_2 = httpClientAPI.httpRequest(a0.url, {method: 'PUT', body: {path: r1,
|
||||
byteRangeStart: a1 == null || a1.fileByteRange == null ? value : a1.fileByteRange.start,
|
||||
byteRangeEnd: a1 == null || a1.fileByteRange == null ? value : a1.fileByteRange.end}, headers: a0.headers});
|
||||
const Promise = global.Promise;
|
||||
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
var closure = _fun40255;
|
||||
var env0_2 = closure;
|
||||
closure();
|
||||
});
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function _fun40254(a0, a1) { // fn#40254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1196, offset: 0x010fa8ff, size: 33 bytes, params: 3, frame: 9
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
pollStatus();
|
||||
}
|
||||
|
||||
function pollStatus() { // fn#40255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1219, offset: 0x010fa920, size: 491 bytes, params: 1, frame: 18
|
||||
var binding;
|
||||
var httpRequestStatus;
|
||||
var Error;
|
||||
var error;
|
||||
var object2;
|
||||
var response;
|
||||
var value5;
|
||||
const value = environment.__proto__;
|
||||
const signal = env1_0.signal;
|
||||
if (signal == null) {
|
||||
httpRequestStatus = env1_1.getHttpRequestStatus(env1_2);
|
||||
} else {
|
||||
if (signal.aborted) {
|
||||
Error = global.Error;
|
||||
value5 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
error = new Error('Request cancelled');
|
||||
require(error instanceof Object ? error : value5);
|
||||
env1_1.cancelHttpRequest(env1_2);
|
||||
return undefined;
|
||||
}
|
||||
httpRequestStatus = env1_1.getHttpRequestStatus(env1_2);
|
||||
}
|
||||
const value3 = undefined;
|
||||
if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'success') {
|
||||
binding = env0_0;
|
||||
object2 = {};
|
||||
response = httpRequestStatus.response;
|
||||
object2.status = response == null ? value3 : response.status;
|
||||
response = httpRequestStatus.response;
|
||||
object2.headers = response == null ? value3 : response.headers;
|
||||
response = httpRequestStatus.response;
|
||||
object2.text = response == null ? value3 : response.body;
|
||||
binding(object2);
|
||||
} else if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'error') {
|
||||
Error = global.Error;
|
||||
error = httpRequestStatus.error;
|
||||
error = new Error();
|
||||
require(error);
|
||||
} else if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'progressing') {
|
||||
if (value3 !== env1_0.onRequestProgress) {
|
||||
if (httpRequestStatus.uploaded_bytes != null) {
|
||||
if (httpRequestStatus.uploaded_bytes > 0) {
|
||||
env1_0.onRequestProgress({loaded: httpRequestStatus.uploaded_bytes,
|
||||
total: httpRequestStatus.total_bytes});
|
||||
}
|
||||
}
|
||||
}
|
||||
global.setTimeout(pollStatus, 50);
|
||||
} else {
|
||||
require(new global.Error('Unknown upload status'));
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,889 @@
|
||||
/* Metro module 7227; source: lib/uploader/UploaderBase.tsx; dependencies: [5, 6, 7, 15, 17, 18, 661, 4503, 3, 4658, 22, 4692, 4697, 4659, 639, 2] */
|
||||
function _fun57858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:6, offset: 0x016b7d68, size: 332 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_57861 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
|
||||
const env0_10 = (require(4503) /* metro dependency 4503: MessageConstants */).FileUploadErrorTypes;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('UploaderBase.tsx');
|
||||
const EventEmitter = (require(639) /* metro dependency 639 */).EventEmitter;
|
||||
value = _fun57865(EventEmitter);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploaderBase.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_57859(a0, a1) { // fn#57859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:214, offset: 0x016b7eb4, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun57860;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_57861(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_57861(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_57861(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun57860;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_57862() { // fn#57862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:1124, offset: 0x016b8026, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_57862_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun57865(a0) { // fn#57865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:1358, offset: 0x016b8084, size: 344 bytes, params: 2, frame: 17
|
||||
const closure = UploaderBase;
|
||||
env0_8(closure, a0);
|
||||
const binding = env0_5;
|
||||
const items2 = [{key: '_fileSize', value: function() {
|
||||
return this.files.reduce(_fun57875, 0);
|
||||
}}];
|
||||
const binding2 = env0_3;
|
||||
const env0_1 = binding2(_fun57877);
|
||||
items2[1] = {key: 'compressAndCheckFileSize', value: value_57878};
|
||||
items2[2] = {key: 'setUploadingTextForUI', value: value_57879};
|
||||
items2[3] = {key: '_recomputeProgress', value: function() {
|
||||
var value = this._recomputeProgressTotal();
|
||||
this._handleProgress(value.loaded, value.total, this._recomputeProgressByFile());
|
||||
}};
|
||||
items2[4] = {key: '_recomputeProgressTotal', value: function() {
|
||||
var value = this._fileSize();
|
||||
var object = {};
|
||||
object.loaded = this.files.reduce(_fun57884, 0);
|
||||
object.total = value;
|
||||
return object;
|
||||
}};
|
||||
items2[5] = {key: '_recomputeProgressByFile', value: function() {
|
||||
this.files.forEach(_fun57886);
|
||||
return {};
|
||||
}};
|
||||
items2[6] = {key: '_addAttachmentsToPayload', value: value_57887};
|
||||
items2[7] = {key: 'clearProcessingMessageInterval', value: function() {
|
||||
if (this.processingMessageChangeInterval != null) {
|
||||
global.clearInterval(this.processingMessageChangeInterval);
|
||||
this.processingMessageChangeInterval = undefined;
|
||||
}
|
||||
}};
|
||||
items2[8] = {key: 'cancel', value: value_57889};
|
||||
const env0_0 = binding2(_fun57892);
|
||||
items2[9] = {key: 'cancelItem', value: value_57894};
|
||||
items2[10] = {key: 'upload', value: function(a0) {
|
||||
if (this._cancel != null) {
|
||||
throw new global.Error('Uploader.upload(...): An upload is already in progress.');
|
||||
}
|
||||
this._lastUpdate = global.Date.now();
|
||||
this._loaded = 0;
|
||||
this._file = {'id': null, 'currentSize': 0, 'totalPreCompressionSize': 0, 'compressionProgress': 0,
|
||||
'progress': 0,
|
||||
'rate': 0, 'hasImage': false, 'hasVideo': false, 'attachmentsCount': 0, id: this.id, items: a0};
|
||||
}};
|
||||
return binding(closure, items2);
|
||||
}
|
||||
|
||||
function UploaderBase() { // fn#57866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:1370, offset: 0x016b81dc, size: 303 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_4(this, UploaderBase);
|
||||
const value3 = env1_7(UploaderBase);
|
||||
const value6 = env1_6(this, _isNativeReflectConstruct_57862() ? global.Reflect.construct(value3, [],
|
||||
env1_7(this).constructor) : value3.apply(this, undefined));
|
||||
value6._aborted = false;
|
||||
value6._errored = false;
|
||||
value6.files = [];
|
||||
value6._lastUpdate = 0;
|
||||
value6._loaded = 0;
|
||||
value6.alreadyStarted = false;
|
||||
value6._handleStart = _handleStart;
|
||||
value6._handleProgress = _handleProgress;
|
||||
value6._handleException = _handleException;
|
||||
value6._handleAborted = _handleAborted;
|
||||
value6._handleError = _handleError;
|
||||
value6._handleComplete = _handleComplete;
|
||||
value6.id = (importDefault(22) /* metro dependency 22 */).uniqueId('Uploader');
|
||||
value6._file = {'id': null, 'currentSize': 0, 'totalPreCompressionSize': 0, 'compressionProgress': 0, 'progress': 0,
|
||||
'rate': 0, 'hasImage': false, 'hasVideo': false, 'attachmentsCount': 0, id: value6.id, items: undefined};
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_57874() { // fn#57874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:2862, offset: 0x016b85e2, size: 32 bytes, params: 1, frame: 13
|
||||
return this.files.reduce(function(a0, {currentSize}) {
|
||||
return a0 + (currentSize ?? 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function* _fun57877() { // fn#57877, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:3002, offset: 0x016b862b, size: 775 bytes, params: 1, frame: 34
|
||||
var r5;
|
||||
var r19;
|
||||
var r1;
|
||||
var object3;
|
||||
var concat;
|
||||
var reactNativeCompressAndExtractData;
|
||||
var value12;
|
||||
var value13;
|
||||
var value14;
|
||||
var isCancelled;
|
||||
var isCancelled2;
|
||||
var currentSize;
|
||||
var value15;
|
||||
var value16;
|
||||
var binding2;
|
||||
var value17;
|
||||
var getEffectiveKestrelLimit;
|
||||
var getMaxFileSize;
|
||||
var channelId;
|
||||
var value18;
|
||||
var value19;
|
||||
var value20;
|
||||
var value21;
|
||||
var _handleError;
|
||||
var ENTITY_TOO_LARGE;
|
||||
var object4;
|
||||
var POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE;
|
||||
var ENTITY_EMPTY;
|
||||
var value22;
|
||||
var value23;
|
||||
var error;
|
||||
var _handleException;
|
||||
var _fileSize;
|
||||
var getMaxTotalAttachmentSize;
|
||||
var POSTCOMPRESSION_SUM_TOO_LARGE;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = undefined;
|
||||
let binding = env2_0;
|
||||
const value4 = binding(env2_2[11]);
|
||||
const getUploadTarget = value4.getUploadTarget;
|
||||
const files = this.files;
|
||||
const value5 = 0;
|
||||
let property = files[value5];
|
||||
const value6 = Reflect.apply(getUploadTarget, value4,
|
||||
[property == null || property.item == null ? value : property.item.target]);
|
||||
const length = this.files.length;
|
||||
const getMaxAttachmentsCount = value6.getMaxAttachmentsCount;
|
||||
if (length > Reflect.apply(getMaxAttachmentsCount, value6, [])) {
|
||||
binding = env2_11;
|
||||
binding.log('Too many attachments for ' + this.id);
|
||||
this._handleError({code: env2_9.TOO_MANY_ATTACHMENTS});
|
||||
return false;
|
||||
}
|
||||
const kestrelConfig = env2_0(env2_2[12]).getKestrelConfig({location: 'UploaderBase.compressAndCheckFileSize'});
|
||||
binding = env2_11;
|
||||
let log = binding.log;
|
||||
let id = this.id;
|
||||
let HermesInternal = global.HermesInternal;
|
||||
Reflect.apply(log, binding, ['compressing files for ' + id]);
|
||||
const value9 = env2_12(this.files);
|
||||
const value10 = value9();
|
||||
let done = value10.done;
|
||||
if (done) {
|
||||
value = this._fileSize();
|
||||
value = value > value6.getMaxTotalAttachmentSize();
|
||||
if (value) {
|
||||
this._handleError({code: env2_9.ENTITY_TOO_LARGE, reason: {type: env2_10.POSTCOMPRESSION_SUM_TOO_LARGE}});
|
||||
r1 = 1;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
return !r1;
|
||||
}
|
||||
let r13 = value10;
|
||||
let value11 = r13.value;
|
||||
reducibleLoop7: while (true) {
|
||||
try {
|
||||
reactNativeCompressAndExtractData = value11.reactNativeCompressAndExtractData;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value12 = Reflect.apply(reactNativeCompressAndExtractData, value11, []);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
yield value12;
|
||||
try {
|
||||
value13 = undefined;
|
||||
value14 = false;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
if (value14) {
|
||||
return value13;
|
||||
}
|
||||
try {
|
||||
isCancelled = value11.isCancelled;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
isCancelled2 = Reflect.apply(isCancelled, value11, []);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
if (isCancelled2) {
|
||||
try {
|
||||
binding = env2_11;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
log = binding.log;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
id = value11.id;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
HermesInternal = global.HermesInternal;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
concat = HermesInternal.concat;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value22 = 'compressAndCheckFileSize() file has been cancelled for compression - ' + id;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(log, binding, [value22]);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
currentSize = value11.currentSize;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value15 = currentSize != null;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
reducibleJoin23: while (true) {
|
||||
if (value15) {
|
||||
r5 = currentSize;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
r5 = value5;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
try {
|
||||
value16 = value5 === r5;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
if (value16) {
|
||||
try {
|
||||
_handleError = this._handleError;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
binding = env2_9;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
ENTITY_EMPTY = binding.ENTITY_EMPTY;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object3.code = ENTITY_EMPTY;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(_handleError, this, [object3]);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
property = binding2[12];
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value17 = binding(property);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
getEffectiveKestrelLimit = value17.getEffectiveKestrelLimit;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
getMaxFileSize = value6.getMaxFileSize;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
channelId = value11.channelId;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value18 = Reflect.apply(getMaxFileSize, value6, [channelId]);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value19 = Reflect.apply(getEffectiveKestrelLimit, value17, [kestrelConfig, value18]);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
currentSize = value11.currentSize;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value20 = currentSize != null;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
reducibleJoin40: while (true) {
|
||||
if (value20) {
|
||||
r19 = currentSize;
|
||||
break reducibleJoin40;
|
||||
}
|
||||
r19 = value5;
|
||||
break reducibleJoin40;
|
||||
}
|
||||
try {
|
||||
value21 = r19 > value19;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
reducibleJoin69: while (true) {
|
||||
if (value21) {
|
||||
try {
|
||||
_handleError = this._handleError;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
binding = env2_9;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
ENTITY_TOO_LARGE = binding.ENTITY_TOO_LARGE;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object3.code = ENTITY_TOO_LARGE;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
binding = env2_10;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE = binding.POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object4.type = POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
object3.reason = object4;
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(_handleError, this, [object3]);
|
||||
} catch (error) {
|
||||
_handleException = this._handleException;
|
||||
Reflect.apply(_handleException, this, [error]);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break reducibleJoin69;
|
||||
}
|
||||
}
|
||||
value23 = value9();
|
||||
done = value23.done;
|
||||
if (done) {
|
||||
_fileSize = this._fileSize;
|
||||
value = Reflect.apply(_fileSize, this, []);
|
||||
getMaxTotalAttachmentSize = value6.getMaxTotalAttachmentSize;
|
||||
value = value > Reflect.apply(getMaxTotalAttachmentSize, value6, []);
|
||||
reducibleJoin74: while (true) {
|
||||
if (value) {
|
||||
_handleError = this._handleError;
|
||||
ENTITY_TOO_LARGE = env2_9.ENTITY_TOO_LARGE;
|
||||
POSTCOMPRESSION_SUM_TOO_LARGE = env2_10.POSTCOMPRESSION_SUM_TOO_LARGE;
|
||||
Reflect.apply(_handleError, this, [{code: ENTITY_TOO_LARGE,
|
||||
reason: {type: POSTCOMPRESSION_SUM_TOO_LARGE}}]);
|
||||
value = 1;
|
||||
r1 = value;
|
||||
break reducibleJoin74;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin74;
|
||||
}
|
||||
return !r1;
|
||||
}
|
||||
r13 = value23;
|
||||
value11 = r13.value;
|
||||
continue reducibleLoop7;
|
||||
}
|
||||
}
|
||||
|
||||
function value_57879() { // fn#57879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:4258, offset: 0x016b8932, size: 229 bytes, params: 1, frame: 24
|
||||
const value = this.files.some(function(a0) {
|
||||
return a0.isImage;
|
||||
});
|
||||
const value2 = this.files.some(function(a0) {
|
||||
return a0.isVideo;
|
||||
});
|
||||
const value3 = this._fileSize();
|
||||
const binding = env1_11;
|
||||
const log = binding.log;
|
||||
const length = this.files.length;
|
||||
Reflect.apply(log, binding,
|
||||
['setUploadingTextForUI - total content: ' + value3 + ' bytes and ' + length + ' attachments for ' + this.id]);
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, this._file, length);
|
||||
object2['totalPostCompressionSize'] = value3;
|
||||
object2['currentSize'] = value3;
|
||||
object2['hasVideo'] = value2;
|
||||
object2['hasImage'] = value;
|
||||
object2['attachmentsCount'] = this.files.length;
|
||||
object2['items'] = this.files;
|
||||
this._file = object2;
|
||||
}
|
||||
|
||||
function value_57883() { // fn#57883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:4817, offset: 0x016b8a65, size: 54 bytes, params: 1, frame: 15
|
||||
const value = this._fileSize();
|
||||
const object2 = {};
|
||||
object2.loaded = this.files.reduce(function(a0, {loaded}) {
|
||||
return a0 + (loaded ?? 0);
|
||||
}, 0);
|
||||
object2.total = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_57885() { // fn#57885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:4985, offset: 0x016b8abb, size: 34 bytes, params: 1, frame: 12
|
||||
this.files.forEach(_fun57886);
|
||||
return {};
|
||||
}
|
||||
|
||||
function value_57887(a0, a1, a2) { // fn#57887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:5140, offset: 0x016b8b23, size: 102 bytes, params: 4, frame: 19
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
const value2 = value.get(object2, a1, []);
|
||||
const items2 = [];
|
||||
arraySpread(items2, a2, arraySpread(items2, value2, 0, value), value);
|
||||
return (importDefault(22) /* metro dependency 22 */).set(object2, a1, items2);
|
||||
}
|
||||
|
||||
function value_57889() { // fn#57889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:5450, offset: 0x016b8bb7, size: 126 bytes, params: 1, frame: 14
|
||||
var _cancel;
|
||||
const binding = env1_11;
|
||||
binding.log('cancel() for ' + this.id);
|
||||
if (!this._aborted) {
|
||||
this._aborted = true;
|
||||
_cancel = this._cancel;
|
||||
if (_cancel != null) {
|
||||
_cancel.call(this);
|
||||
}
|
||||
this.files.forEach(function(a0) {
|
||||
return a0.cancel();
|
||||
});
|
||||
this._handleComplete();
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun57892(a0) { // fn#57892, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:5662, offset: 0x016b8c4d, size: 360 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
if (true) {
|
||||
var env0_0 = a0;
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_11;
|
||||
binding.log('Cancel called for ' + this.id + ' for item ' + a0);
|
||||
var files = this.files;
|
||||
var value3 = files.find(_fun57893);
|
||||
if (value3 != null) {
|
||||
if (value3.isCancelled()) {
|
||||
return undefined;
|
||||
}
|
||||
files = this.files;
|
||||
var value4 = files.indexOf(value3);
|
||||
files = this.files;
|
||||
var slice = files.slice;
|
||||
var value5 = Reflect.apply(slice, files, [0, value4]);
|
||||
var object = [];
|
||||
var value6 = arraySpread(object, value5, 0, value4);
|
||||
files = this.files;
|
||||
slice = files.slice;
|
||||
arraySpread(object, Reflect.apply(slice, files, [value4 + 1]), value6, value4);
|
||||
this.files = object;
|
||||
object = {};
|
||||
var _file = this._file;
|
||||
copyDataProperties(object, _file, value6);
|
||||
files = this.files;
|
||||
object['items'] = files;
|
||||
this._file = object;
|
||||
value = env2_0(env2_2[13]);
|
||||
yield value.cancelGetAttachmentFile(value3);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
value3.cancel();
|
||||
var emit = this.emit;
|
||||
_file = this._file;
|
||||
Reflect.apply(emit, this, ['cancel-upload-item', _file]);
|
||||
files = this.files;
|
||||
if (files.length === 0) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _handleStart(a0) { // fn#57867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:1683, owner: UploaderBase._handleStart, offset: 0x016b830b, size: 67 bytes, params: 2, frame: 14
|
||||
let binding = env0_0;
|
||||
binding._cancel = a0;
|
||||
if (!binding.alreadyStarted) {
|
||||
binding = env0_0;
|
||||
binding.emit('start', binding._file);
|
||||
}
|
||||
env0_0.alreadyStarted = true;
|
||||
}
|
||||
|
||||
function _handleProgress(a0, a1, a2) { // fn#57868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:1780, owner: UploaderBase._handleProgress, offset: 0x016b834e, size: 252 bytes, params: 4, frame: 22
|
||||
var items2;
|
||||
const env0_0 = a2;
|
||||
const Date = global.Date;
|
||||
const value = Date.now();
|
||||
const value3 = (require(4658) /* metro dependency 4658: UploadUtils */).calculateProgress(a0, a1);
|
||||
const Math = global.Math;
|
||||
const floor = Math.floor;
|
||||
let binding = env0_0;
|
||||
const value5 = a0 - binding._loaded;
|
||||
const value6 = value - binding._lastUpdate;
|
||||
const value7 = Reflect.apply(floor, Math, [value5 / (value6 / 1000)]);
|
||||
if (a2 != null) {
|
||||
items2 = env0_0._file.items;
|
||||
if (items2 != null) {
|
||||
items2.forEach(function(a0) {
|
||||
a0.item.progress = importDefault[a0.id];
|
||||
});
|
||||
}
|
||||
}
|
||||
binding = env0_0;
|
||||
binding._lastUpdate = value;
|
||||
binding._loaded = a0;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, binding._file, value6);
|
||||
object2['currentSize'] = a1;
|
||||
object2['progress'] = value3;
|
||||
object2['rate'] = value7;
|
||||
binding._file = object2;
|
||||
binding.emit('progress', binding._file);
|
||||
}
|
||||
|
||||
function _handleException(a0) { // fn#57870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:2101, owner: UploaderBase._handleException, offset: 0x016b846c, size: 65 bytes, params: 2, frame: 14
|
||||
const binding = env0_0;
|
||||
const _handleError = binding._handleError;
|
||||
const object = {};
|
||||
const ERROR_SOURCE_UNKNOWN = FileUploadErrorTypes.ERROR_SOURCE_UNKNOWN;
|
||||
object.type = ERROR_SOURCE_UNKNOWN;
|
||||
object.msg = a0.toString();
|
||||
Reflect.apply(_handleError, binding, [{reason: object}]);
|
||||
}
|
||||
|
||||
function _handleAborted() { // fn#57871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:2195, owner: UploaderBase._handleAborted, offset: 0x016b84ad, size: 21 bytes, params: 1, frame: 9
|
||||
env0_0.clearProcessingMessageInterval();
|
||||
}
|
||||
|
||||
function _handleError({code, reason, body}) { // fn#57872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:2251, owner: UploaderBase._handleError, offset: 0x016b84c2, size: 184 bytes, params: 2, frame: 24
|
||||
var binding2;
|
||||
var log;
|
||||
var value;
|
||||
let binding = env0_0;
|
||||
binding.clearProcessingMessageInterval();
|
||||
if (!binding._aborted) {
|
||||
binding = env0_0;
|
||||
binding._errored = true;
|
||||
value = environment.__proto__.__proto__;
|
||||
binding2 = env2_11;
|
||||
log = binding2.log;
|
||||
value = global.JSON.stringify(reason);
|
||||
Reflect.apply(log, binding2, ['_handleError: ' + code + ' (' + value + ') for ' + binding.id]);
|
||||
binding.emit('error', binding._file, code, body, reason);
|
||||
binding.removeAllListeners();
|
||||
}
|
||||
}
|
||||
|
||||
function _handleComplete(a0) { // fn#57873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:2478, owner: UploaderBase._handleComplete, offset: 0x016b857a, size: 104 bytes, params: 2, frame: 16
|
||||
const binding = env0_0;
|
||||
binding.clearProcessingMessageInterval();
|
||||
const binding2 = env2_11;
|
||||
binding2.log('_handleComplete for ' + binding.id);
|
||||
binding.emit('complete', binding._file, a0);
|
||||
binding.removeAllListeners();
|
||||
}
|
||||
|
||||
function _fun57886({id, loaded, currentSize}) { // fn#57886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7405:5032, offset: 0x016b8add, size: 70 bytes, params: 2, frame: 16
|
||||
const binding = env0_0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4658) /* metro dependency 4658: UploadUtils */;
|
||||
binding[id] = value.calculateProgress(loaded, currentSize);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
/* Metro module 7225; source: lib/uploader/UploaderQueue.tsx; dependencies: [5, 6, 7, 3, 2] */
|
||||
function _fun57838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:6, offset: 0x016b7650, size: 202 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_1 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('UploaderQueue.tsx');
|
||||
value = _fun57839();
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploaderQueue.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun57839() { // fn#57839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:166, offset: 0x016b771a, size: 96 bytes, params: 1, frame: 17
|
||||
const binding = env0_2;
|
||||
const closure = UploaderQueue;
|
||||
const items2 = [{key: 'enqueue', value: value_57841}];
|
||||
const env0_0Binding = env0_0(_fun57843);
|
||||
items2[1] = {key: 'drainQueue', value: value_57847};
|
||||
return binding(closure, items2);
|
||||
}
|
||||
|
||||
function UploaderQueue() { // fn#57840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:187, offset: 0x016b777a, size: 45 bytes, params: 1, frame: 13
|
||||
env1_1(this, UploaderQueue);
|
||||
this.queue = [];
|
||||
this.drainingQueue = false;
|
||||
}
|
||||
|
||||
function value_57841(a0) { // fn#57841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:294, offset: 0x016b77a7, size: 93 bytes, params: 2, frame: 13
|
||||
this.queue.unshift(a0);
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
binding.log('enqueue() - alreadying draining? ' + (this.drainingQueue ? 'yes' : 'no'));
|
||||
if (!this.drainingQueue) {
|
||||
this.drainQueue();
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun57843() { // fn#57843, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:473, offset: 0x016b780d, size: 298 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var value4;
|
||||
var Promise;
|
||||
var prototype;
|
||||
var closure;
|
||||
var promise;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var id;
|
||||
var value9;
|
||||
var error;
|
||||
var error2;
|
||||
var drainQueue;
|
||||
if (true) {
|
||||
var env0_0;
|
||||
this.drainingQueue = true;
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_3;
|
||||
var log = binding.log;
|
||||
Reflect.apply(log, binding, ['drainQueue() - starting, queue length: ' + this.queue.length]);
|
||||
var value3 = this.queue.pop();
|
||||
if (value3 == null) {
|
||||
env2_3.log('drainQueue() - No uploads left, setting drainingQueue to false');
|
||||
this.drainingQueue = false;
|
||||
} else {
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort29: while (true) {
|
||||
exceptionLanding28: while (true) {
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
binding = env2_3;
|
||||
error2 = binding.error;
|
||||
Reflect.apply(error2, binding, [error]);
|
||||
break reduciblePort29;
|
||||
}
|
||||
drainQueue = this.drainQueue;
|
||||
Reflect.apply(drainQueue, this, []);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
log = binding.log;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(log, binding, ['drainQueue() - start uploader']);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value4 = value3();
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
env0_0 = value4;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
Promise = global.Promise;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
prototype = Promise.prototype;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
closure = _fun57844;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
promise = new Promise();
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value6 = promise instanceof Object ? promise : undefined;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
log = binding.log;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
id = value4.id;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value9 = 'drainQueue() Uploader complete - ' + id;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(log, binding, [value9]);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
this.drainQueue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun57844(a0) { // fn#57844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:789, offset: 0x016b7937, size: 98 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
if (env0_0._aborted || env0_0._errored) {
|
||||
a0();
|
||||
}
|
||||
env0_0.addListener('complete', _fun57845);
|
||||
env0_0.addListener('error', _fun57846);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,87 @@
|
||||
/* Metro module 4691; source: lib/uploader/native/CloudUploaderUtils.tsx; dependencies: [1949, 1226, 691, 4651, 22, 683, 2] */
|
||||
function _fun40565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:6, offset: 0x011050d7, size: 183 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = getUploadPayload;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
|
||||
object2 = {getUploadPayload: closure};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/native/CloudUploaderUtils.tsx');
|
||||
exports.default = object2;
|
||||
exports.prepareMessagePayload = prepareMessagePayload;
|
||||
exports.getUploadPayload = closure;
|
||||
}
|
||||
|
||||
function _prepareMessageRequestBodyCloud(a0, a1, a2) { // fn#40566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:126, offset: 0x0110518e, size: 166 bytes, params: 4, frame: 21
|
||||
var r0;
|
||||
var object3;
|
||||
var object4;
|
||||
var value;
|
||||
var value2;
|
||||
var items2;
|
||||
const items3 = [];
|
||||
a0.forEach(_fun40567);
|
||||
if (a2 == null) {
|
||||
object3 = {};
|
||||
copyDataProperties(object3, a1, undefined);
|
||||
object3['attachments'] = items3;
|
||||
r0 = object3;
|
||||
} else if (a1 != null) {
|
||||
object4 = {};
|
||||
copyDataProperties(object4, a1, undefined);
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value2 = value.get(object4, a2, []);
|
||||
items2 = [];
|
||||
arraySpread(items2, items3, arraySpread(items2, value2, 0, value), value);
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value.set(object4, a2, items2);
|
||||
r0 = value;
|
||||
} else {
|
||||
object3 = {};
|
||||
copyDataProperties(object3, a1, undefined);
|
||||
object3['attachments'] = items3;
|
||||
r0 = object3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getUploadPayload({filename, currentSize}) { // fn#40568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:425, offset: 0x0110527b, size: 73 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
object2.filename = filename;
|
||||
object2.file_size = currentSize;
|
||||
object2.id = (importDefault(22) /* metro dependency 22 */).uniqueId();
|
||||
object2.original_content_type = undefined;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function prepareMessagePayload(a0, a1, a2, a3) { // fn#40569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:711, offset: 0x011052c4, size: 152 bytes, params: 5, frame: 18
|
||||
const value2 = _prepareMessageRequestBodyCloud(a1, a2, a3);
|
||||
const object = {Authorization: a0};
|
||||
const getDebugOptionsHeaderValue = DeveloperOptionsStore.getDebugOptionsHeaderValue;
|
||||
object['X-Debug-Options'] = Reflect.apply(getDebugOptionsHeaderValue, DeveloperOptionsStore, []);
|
||||
object['Accept-Language'] = LocaleStore.locale;
|
||||
const superPropertiesBase64 = (importDefault(683) /* metro dependency 683: AnalyticsUtils */).getSuperPropertiesBase64();
|
||||
if (superPropertiesBase64 != null) {
|
||||
object['X-Super-Properties'] = superPropertiesBase64;
|
||||
}
|
||||
const fingerprint = AuthenticationStore.getFingerprint();
|
||||
if (fingerprint != null) {
|
||||
object['X-Fingerprint'] = fingerprint;
|
||||
}
|
||||
return {headers: object, body: value2};
|
||||
}
|
||||
|
||||
function _fun40567(a0, a1) { // fn#40567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:201, offset: 0x01105234, size: 71 bytes, params: 3, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(4651) /* metro dependency 4651: UploadUtils */;
|
||||
const attachmentPayload = value.getAttachmentPayload(a0, a1);
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, attachmentPayload, value);
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/* Metro module 7226; source: lib/uploader/stageAttachmentFiles.tsx; dependencies: [5, 661, 4648, 2] */
|
||||
function _fun57848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:6, offset: 0x016b7999, size: 143 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/stageAttachmentFiles.tsx');
|
||||
exports.default = function() {
|
||||
return _stageAttachmentFiles.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _stageAttachmentFiles() { // fn#57849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:127, offset: 0x016b7a28, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun57851).apply(this, arguments);
|
||||
}
|
||||
|
||||
async function _fun57851(a0) { // fn#57851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:192, offset: 0x016b7a6a, size: 100 bytes, params: 2, frame: 15
|
||||
let value = a1;
|
||||
if (true) {
|
||||
var env0_0 = value !== undefined ? value : false;
|
||||
var env0_1 = a2;
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = a0.map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun57853);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
});
|
||||
var Promise = global.Promise;
|
||||
await Promise.all(value);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun57852(a0) { // fn#57852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:225, offset: 0x016b7ace, size: 44 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun57853);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function _fun57853(a0, a1) { // fn#57853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:241, offset: 0x016b7afa, size: 482 bytes, params: 3, frame: 19
|
||||
var environment;
|
||||
var Error;
|
||||
var value3;
|
||||
var error;
|
||||
var value5;
|
||||
var value7;
|
||||
var value8;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const status = env0_0.status;
|
||||
let binding = env4_0;
|
||||
const CloudUploadStatus = binding(env4_1[2]).CloudUploadStatus;
|
||||
const NOT_STARTED = CloudUploadStatus.NOT_STARTED;
|
||||
if (NOT_STARTED === status) {
|
||||
env0_0.upload();
|
||||
} else if (env4_0(env4_1[2]).CloudUploadStatus.COMPLETED === status) {
|
||||
a0('complete');
|
||||
} else if (env4_0(env4_1[2]).CloudUploadStatus.ERROR === status) {
|
||||
value7 = environment.__proto__;
|
||||
if (env1_0) {
|
||||
error = env0_0.error;
|
||||
if (error !== env4_3.ENTITY_TOO_LARGE) {
|
||||
env0_0.upload();
|
||||
} else {
|
||||
Error = global.Error;
|
||||
value8 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
error = new Error('File failed to upload');
|
||||
a1(error instanceof Object ? error : value8);
|
||||
}
|
||||
} else {
|
||||
Error = global.Error;
|
||||
value8 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
error = new Error('File failed to upload');
|
||||
a1(error instanceof Object ? error : value8);
|
||||
}
|
||||
} else if (env4_0(env4_1[2]).CloudUploadStatus.CANCELED === status) {
|
||||
Error = global.Error;
|
||||
value5 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
error = new Error('Upload is canceled');
|
||||
a1(error instanceof Object ? error : value5);
|
||||
} else if (env4_0(env4_1[2]).CloudUploadStatus.REMOVED_FROM_MSG_DRAFT === status) {
|
||||
Error = global.Error;
|
||||
value3 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
error = new Error('Upload is removed from draft');
|
||||
a1(error instanceof Object ? error : value3);
|
||||
}
|
||||
binding = env0_0;
|
||||
binding.on('complete', _fun57854);
|
||||
binding.on('error', _fun57855);
|
||||
binding.on('progress', function(a0, a1) {
|
||||
if (importDefault != null) {
|
||||
importDefault(a0, a1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function _fun57854() { // fn#57854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:708, offset: 0x016b7cdc, size: 20 bytes, params: 1, frame: 11
|
||||
env0_0('complete');
|
||||
}
|
||||
|
||||
function _fun57855() { // fn#57855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:744, offset: 0x016b7cf0, size: 85 bytes, params: 1, frame: 15
|
||||
const Error = global.Error;
|
||||
let value = environment.__proto__;
|
||||
value = 'File ' + env1_0.id + ' failed to upload';
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
require(error instanceof Object ? error : value2);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,198 @@
|
||||
/* Metro module 7618; source: lib/uploader_inline/InlineUploader.tsx; dependencies: [5, 6, 7, 4680, 7619, 2] */
|
||||
function _fun61016(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:6, offset: 0x017183d8, size: 170 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 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = RegExp('^[a-f0-9]{32}$', '');
|
||||
const value = _fun61017();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader_inline/InlineUploader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun61017() { // fn#61017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:152, offset: 0x01718482, size: 151 bytes, params: 1, frame: 18
|
||||
const closure = InlineUploader;
|
||||
const binding = env0_5;
|
||||
const env0_0 = env0_3(_fun61021);
|
||||
return binding(closure, [{key: 'getOriginalMd5', value: function() {
|
||||
return this.originalMd5Promise;
|
||||
}}, {key: 'buildHeaders', value: value_61022}], [{key: 'fromBlob', value: value_61023}, {key: 'buildHeadersForMd5',
|
||||
value: value_61025}]);
|
||||
}
|
||||
|
||||
function InlineUploader(a0, a1) { // fn#61018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:163, offset: 0x01718519, size: 45 bytes, params: 3, frame: 13
|
||||
env1_4(this, InlineUploader);
|
||||
this.surface = a0;
|
||||
this.originalMd5Promise = a1;
|
||||
}
|
||||
|
||||
function* _fun61021(a0) { // fn#61021, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:385, offset: 0x0171855a, size: 57 bytes, params: 2, frame: 14
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const buildHeadersForMd5 = importDefault.buildHeadersForMd5;
|
||||
yield this.originalMd5Promise;
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return Reflect.apply(buildHeadersForMd5, importDefault, [value, a0]);
|
||||
}
|
||||
|
||||
function value_61023(a0, a1) { // fn#61023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:557, offset: 0x01718593, size: 89 bytes, params: 3, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(4680) /* metro dependency 4680: DiscordMd5 */;
|
||||
value = value.fromBlob(a1);
|
||||
value = value.catch(function() {
|
||||
return null;
|
||||
});
|
||||
const value2 = Object.create(InlineUploader.prototype, {constructor: {value: InlineUploader}});
|
||||
const inlineUploader = new InlineUploader(a0);
|
||||
return inlineUploader instanceof Object ? inlineUploader : value2;
|
||||
}
|
||||
|
||||
function value_61025(a0, a1) { // fn#61025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:672, offset: 0x017185ec, size: 80 bytes, params: 3, frame: 16
|
||||
var environment;
|
||||
var r0;
|
||||
var object2;
|
||||
let value = a1;
|
||||
const value2 = serializeOriginalMd5Header(a0);
|
||||
if (value2 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = environment.__proto__;
|
||||
object2[(require(7619) /* metro dependency 7619: originalMd5Header */).ORIGINAL_MD5_HEADER] = value2;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function serializeOriginalMd5Header(a0) { // fn#61026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:692, owner: value_61025.serializeOriginalMd5Header, offset: 0x0171863c, size: 224 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
var r4;
|
||||
var r1;
|
||||
var property;
|
||||
var property2;
|
||||
var value6;
|
||||
var binding;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
let value = a0;
|
||||
let value2 = null;
|
||||
if (value2 == value) {
|
||||
return value2;
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
value9 = environment.__proto__.__proto__;
|
||||
binding = env2_6;
|
||||
return binding.test(value) ? value : value2;
|
||||
}
|
||||
const items2 = [];
|
||||
const Object = global.Object;
|
||||
let value3 = Object.keys(value);
|
||||
let length = value3.length;
|
||||
const value4 = 0;
|
||||
if (value4 < length) {
|
||||
r4 = value4;
|
||||
while (true) {
|
||||
property = value3[r4];
|
||||
property2 = value[property];
|
||||
value6 = value2 != property2;
|
||||
if (value6) {
|
||||
binding = env2_6;
|
||||
value7 = binding.test(property2);
|
||||
r1 = value7;
|
||||
} else {
|
||||
r1 = value6;
|
||||
}
|
||||
if (!r1) {
|
||||
continue;
|
||||
}
|
||||
items2.push([property, property2]);
|
||||
value8 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
||||
length = value3.length;
|
||||
if (value8 < length) {
|
||||
r4 = value8;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (value4 === items2.length) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
items2.sort(function(a0, a1) {
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var item2 = iterator.next();
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r1 = value2 ? value : item;
|
||||
if (!value2) {
|
||||
item2.return();
|
||||
}
|
||||
iterator = a1[Symbol.iterator]();
|
||||
var item3 = iterator.next();
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : iterator;
|
||||
var value3 = item3 === value;
|
||||
var r2 = value3 ? value : item;
|
||||
if (!value3) {
|
||||
item3.return();
|
||||
}
|
||||
return r1 < r2 ? -1 : r1 > r2 ? 1 : 0;
|
||||
});
|
||||
value = items2.map(_fun61028);
|
||||
value = value.join(', ');
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun61028(a0) { // fn#61028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:971, offset: 0x0171877a, size: 109 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
var r2;
|
||||
var r5;
|
||||
var item3;
|
||||
var value3;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
const value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r1 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r2 = value2;
|
||||
r5 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r2 = value3;
|
||||
r5 = value;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r2 = value3;
|
||||
r5 = item;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r0.return();
|
||||
}
|
||||
return '' + r1.toLowerCase() + '="' + r5 + '"';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 7619; source: lib/uploader_inline/originalMd5Header.tsx; dependencies: [2] */
|
||||
function _fun61029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7797:6, offset: 0x017187e7, size: 84 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader_inline/originalMd5Header.tsx');
|
||||
exports.ORIGINAL_MD5_HEADER = 'X-Discord-Original-MD5';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 7615; source: lib/uploader_inline/safetyScannedUploadSurfaces.tsx; dependencies: [7616, 2] */
|
||||
function _fun61011(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7793:6, offset: 0x01717e6e, size: 221 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(7616) /* metro dependency 7616: ImageCroppingConstants */).UploadTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader_inline/safetyScannedUploadSurfaces.tsx');
|
||||
exports.SafetyScannedUploadSurface = {USER_DEFAULT_PROFILE_AVATAR: 'USER_DEFAULT_PROFILE_AVATAR',
|
||||
USER_DEFAULT_PROFILE_BANNER: 'USER_DEFAULT_PROFILE_BANNER',
|
||||
USER_GUILD_PROFILE_AVATAR: 'USER_GUILD_PROFILE_AVATAR', USER_GUILD_PROFILE_BANNER: 'USER_GUILD_PROFILE_BANNER',
|
||||
GUILD_ICON: 'GUILD_ICON', GUILD_BANNER: 'GUILD_BANNER', GUILD_DISCOVERY_SPLASH: 'GUILD_DISCOVERY_SPLASH',
|
||||
GUILD_INVITE_SPLASH: 'GUILD_INVITE_SPLASH', EMOJI: 'EMOJI', STICKER: 'STICKER'};
|
||||
exports.getSafetyScannedUploadSurfaceForProfileCustomization = getSafetyScannedUploadSurfaceForProfileCustomization;
|
||||
}
|
||||
|
||||
function getSafetyScannedUploadSurfaceForProfileCustomization(a0, a1) { // fn#61012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7793:735, offset: 0x01717f4b, size: 192 bytes, params: 3, frame: 4
|
||||
const AVATAR = UploadTypes.AVATAR;
|
||||
if (AVATAR === a0) {
|
||||
return a1 != null ? env0_1.USER_GUILD_PROFILE_AVATAR : env0_1.USER_DEFAULT_PROFILE_AVATAR;
|
||||
}
|
||||
const BANNER = UploadTypes.BANNER;
|
||||
if (BANNER === a0) {
|
||||
return a1 != null ? env0_1.USER_GUILD_PROFILE_BANNER : env0_1.USER_DEFAULT_PROFILE_BANNER;
|
||||
}
|
||||
const GUILD_BANNER = UploadTypes.GUILD_BANNER;
|
||||
if (GUILD_BANNER === a0) {
|
||||
return null;
|
||||
}
|
||||
const VIDEO_BACKGROUND = UploadTypes.VIDEO_BACKGROUND;
|
||||
if (VIDEO_BACKGROUND === a0) {
|
||||
return null;
|
||||
}
|
||||
const SCHEDULED_EVENT_IMAGE = UploadTypes.SCHEDULED_EVENT_IMAGE;
|
||||
if (SCHEDULED_EVENT_IMAGE === a0) {
|
||||
return null;
|
||||
}
|
||||
const HOME_HEADER = UploadTypes.HOME_HEADER;
|
||||
if (HOME_HEADER === a0) {
|
||||
return null;
|
||||
}
|
||||
const AVATAR_DECORATION = UploadTypes.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === a0) {
|
||||
return null;
|
||||
}
|
||||
const GUILD_ICON = UploadTypes.GUILD_ICON;
|
||||
if (GUILD_ICON === a0) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,755 @@
|
||||
/* Metro module 16226; source: lib/websocketTelemetryHook.android.tsx; dependencies: [2] */
|
||||
function _fun125470(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16434:6, offset: 0x025d9b68, size: 94 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/websocketTelemetryHook.android.tsx');
|
||||
exports.installWebsocketTelemetryHook = installWebsocketTelemetryHook;
|
||||
}
|
||||
|
||||
function installWebsocketTelemetryHook(a0) { // fn#125471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16434:196, offset: 0x025d9bc6, size: 179 bytes, params: 2, frame: 16
|
||||
var window;
|
||||
var r2;
|
||||
var closure;
|
||||
const env0_0 = a0;
|
||||
if (typeof global.globalThis !== 'undefined') {
|
||||
r2 = global.globalThis;
|
||||
} else if (env0_0 !== undefined) {
|
||||
r2 = env0_0;
|
||||
} else {
|
||||
window = global.window;
|
||||
window = typeof window === 'undefined' ? null : global.window;
|
||||
r2 = window;
|
||||
}
|
||||
let value = undefined;
|
||||
let WebSocket = r2 == null ? value : r2.WebSocket;
|
||||
if (WebSocket != null) {
|
||||
if (!r2.__discordWebsocketTelemetryPatched) {
|
||||
WebSocket = r2.WebSocket;
|
||||
closure = function(a0) {
|
||||
var r5;
|
||||
var r7;
|
||||
var value = copyRestArgs(0, r7);
|
||||
var items = [];
|
||||
arraySpread(items, value, 0, r5);
|
||||
var value3 = apply(WebSocket, items, 0);
|
||||
_fun125474(value3, typeof value[0] === 'string' ? value[0] : value3.url ?? '');
|
||||
return value3;
|
||||
};
|
||||
closure.prototype = WebSocket.prototype;
|
||||
global.Object.assign(closure, WebSocket);
|
||||
r2.WebSocket = closure;
|
||||
r2.__discordWebsocketTelemetryPatched = true;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function handleMessage(a0, a1) { // fn#125472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16434:864, owner: installWebsocketTelemetryHook.handleMessage, offset: 0x025d9c79, size: 539 bytes, params: 3, frame: 22
|
||||
var r7;
|
||||
var r4;
|
||||
var r2;
|
||||
var URL;
|
||||
var prototype;
|
||||
var value;
|
||||
var uRL;
|
||||
var hostname;
|
||||
var pathname;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var error;
|
||||
var split;
|
||||
var property;
|
||||
var value2;
|
||||
var length;
|
||||
var JSON;
|
||||
var parse;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var op;
|
||||
var value6;
|
||||
var s;
|
||||
var value7;
|
||||
var t;
|
||||
var value8;
|
||||
var type;
|
||||
var value9;
|
||||
var evt;
|
||||
var value10;
|
||||
var cmd;
|
||||
var value11;
|
||||
var binding;
|
||||
const object2 = {};
|
||||
reducibleJoin92: while (true) {
|
||||
reduciblePort94: while (true) {
|
||||
exceptionLanding93: while (true) {
|
||||
reducibleJoin85: while (true) {
|
||||
reduciblePort84: while (true) {
|
||||
exceptionLanding83: while (true) {
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort28: while (true) {
|
||||
exceptionLanding27: while (true) {
|
||||
try {
|
||||
URL = global.URL;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
break reduciblePort28;
|
||||
}
|
||||
split = a0.split;
|
||||
value = Reflect.apply(split, a0, ['?']);
|
||||
property = value[0];
|
||||
value = null;
|
||||
r4 = property === '' ? value : property;
|
||||
r7 = r4;
|
||||
reducibleJoin32: while (true) {
|
||||
if (r7 == null) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
object2.url = r7;
|
||||
break reducibleJoin32;
|
||||
}
|
||||
value = false;
|
||||
value2 = typeof a1;
|
||||
if (value2 !== 'string') {
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
length = a1.length;
|
||||
if (length > 0) {
|
||||
if (a1[0] !== '{') {
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
try {
|
||||
JSON = global.JSON;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
parse = JSON.parse;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value3 = Reflect.apply(parse, JSON, [a1]);
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value4 = value3 != null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin44: while (true) {
|
||||
if (value4) {
|
||||
value5 = typeof value3 === 'object';
|
||||
r7 = value5;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
r7 = value4;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
reducibleJoin82: while (true) {
|
||||
if (r7) {
|
||||
try {
|
||||
op = value3.op;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value6 = op == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin51: while (true) {
|
||||
if (value6) {
|
||||
break reducibleJoin51;
|
||||
}
|
||||
try {
|
||||
op = value3.op;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.op = op;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin51;
|
||||
}
|
||||
try {
|
||||
s = value3.s;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value7 = s == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin57: while (true) {
|
||||
if (value7) {
|
||||
break reducibleJoin57;
|
||||
}
|
||||
try {
|
||||
s = value3.s;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.s = s;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
try {
|
||||
t = value3.t;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value8 = t == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin63: while (true) {
|
||||
if (value8) {
|
||||
break reducibleJoin63;
|
||||
}
|
||||
try {
|
||||
t = value3.t;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.t = t;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin63;
|
||||
}
|
||||
try {
|
||||
type = value3.type;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value9 = type == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin69: while (true) {
|
||||
if (value9) {
|
||||
break reducibleJoin69;
|
||||
}
|
||||
try {
|
||||
type = value3.type;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.type = type;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin69;
|
||||
}
|
||||
try {
|
||||
evt = value3.evt;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value10 = evt == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin75: while (true) {
|
||||
if (value10) {
|
||||
break reducibleJoin75;
|
||||
}
|
||||
try {
|
||||
evt = value3.evt;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.evt = evt;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin75;
|
||||
}
|
||||
try {
|
||||
cmd = value3.cmd;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value11 = cmd == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin81: while (true) {
|
||||
if (value11) {
|
||||
break reducibleJoin81;
|
||||
}
|
||||
try {
|
||||
cmd = value3.cmd;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.cmd = cmd;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin81;
|
||||
}
|
||||
value = true;
|
||||
r2 = value;
|
||||
break reducibleJoin82;
|
||||
}
|
||||
r2 = value;
|
||||
break reducibleJoin82;
|
||||
}
|
||||
break reduciblePort84;
|
||||
}
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
try {
|
||||
prototype = URL.prototype;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
uRL = new URL(a0);
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
value = uRL instanceof Object ? uRL : value;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
hostname = value.hostname;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
pathname = value.pathname;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
value = hostname == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
reducibleJoin30: while (true) {
|
||||
reducibleJoin29: while (true) {
|
||||
if (value) {
|
||||
value = a0.split('?');
|
||||
property = value[0];
|
||||
value = null;
|
||||
if (property === '') {
|
||||
r4 = value;
|
||||
break reducibleJoin29;
|
||||
}
|
||||
r4 = property;
|
||||
break reducibleJoin29;
|
||||
}
|
||||
try {
|
||||
value = hostname !== '';
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
if (value) {
|
||||
try {
|
||||
value = pathname == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
reducibleJoin26: while (true) {
|
||||
reducibleJoin22: while (true) {
|
||||
if (value) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
try {
|
||||
value = pathname === '';
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
if (value) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
try {
|
||||
value = pathname !== '/';
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
if (value) {
|
||||
try {
|
||||
HermesInternal = global.HermesInternal;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
concat = HermesInternal.concat;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
try {
|
||||
value = '' + hostname + pathname;
|
||||
} catch (error) {
|
||||
break exceptionLanding27;
|
||||
}
|
||||
r7 = value;
|
||||
break reducibleJoin26;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
r7 = hostname;
|
||||
break reducibleJoin26;
|
||||
}
|
||||
break reducibleJoin30;
|
||||
}
|
||||
split = a0.split;
|
||||
value = Reflect.apply(split, a0, ['?']);
|
||||
property = value[0];
|
||||
value = null;
|
||||
if (property === '') {
|
||||
r4 = value;
|
||||
break reducibleJoin29;
|
||||
}
|
||||
r4 = property;
|
||||
break reducibleJoin29;
|
||||
}
|
||||
r7 = r4;
|
||||
break reducibleJoin30;
|
||||
}
|
||||
reducibleJoin32: while (true) {
|
||||
if (r7 == null) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
object2.url = r7;
|
||||
break reducibleJoin32;
|
||||
}
|
||||
value = false;
|
||||
value2 = typeof a1;
|
||||
if (value2 !== 'string') {
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
length = a1.length;
|
||||
if (length > 0) {
|
||||
if (a1[0] !== '{') {
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
try {
|
||||
JSON = global.JSON;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
parse = JSON.parse;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value3 = Reflect.apply(parse, JSON, [a1]);
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value4 = value3 != null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin44: while (true) {
|
||||
if (value4) {
|
||||
value5 = typeof value3 === 'object';
|
||||
r7 = value5;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
r7 = value4;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
reducibleJoin82: while (true) {
|
||||
if (r7) {
|
||||
try {
|
||||
op = value3.op;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value6 = op == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin51: while (true) {
|
||||
if (value6) {
|
||||
break reducibleJoin51;
|
||||
}
|
||||
try {
|
||||
op = value3.op;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.op = op;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin51;
|
||||
}
|
||||
try {
|
||||
s = value3.s;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value7 = s == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin57: while (true) {
|
||||
if (value7) {
|
||||
break reducibleJoin57;
|
||||
}
|
||||
try {
|
||||
s = value3.s;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.s = s;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
try {
|
||||
t = value3.t;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value8 = t == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin63: while (true) {
|
||||
if (value8) {
|
||||
break reducibleJoin63;
|
||||
}
|
||||
try {
|
||||
t = value3.t;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.t = t;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin63;
|
||||
}
|
||||
try {
|
||||
type = value3.type;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value9 = type == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin69: while (true) {
|
||||
if (value9) {
|
||||
break reducibleJoin69;
|
||||
}
|
||||
try {
|
||||
type = value3.type;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.type = type;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin69;
|
||||
}
|
||||
try {
|
||||
evt = value3.evt;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value10 = evt == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin75: while (true) {
|
||||
if (value10) {
|
||||
break reducibleJoin75;
|
||||
}
|
||||
try {
|
||||
evt = value3.evt;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.evt = evt;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin75;
|
||||
}
|
||||
try {
|
||||
cmd = value3.cmd;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
value11 = cmd == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
reducibleJoin81: while (true) {
|
||||
if (value11) {
|
||||
break reducibleJoin81;
|
||||
}
|
||||
try {
|
||||
cmd = value3.cmd;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
try {
|
||||
object2.cmd = cmd;
|
||||
} catch (error) {
|
||||
break exceptionLanding83;
|
||||
}
|
||||
break reducibleJoin81;
|
||||
}
|
||||
value = true;
|
||||
r2 = value;
|
||||
break reducibleJoin82;
|
||||
}
|
||||
r2 = value;
|
||||
break reducibleJoin82;
|
||||
}
|
||||
break reduciblePort84;
|
||||
}
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
r2 = value;
|
||||
break reduciblePort84;
|
||||
}
|
||||
reducibleJoin86: while (true) {
|
||||
if (r2) {
|
||||
break reducibleJoin86;
|
||||
}
|
||||
break reducibleJoin85;
|
||||
}
|
||||
reducibleJoin88: while (true) {
|
||||
if (r2) {
|
||||
break reducibleJoin88;
|
||||
}
|
||||
value = value2 === 'string';
|
||||
r2 = value;
|
||||
break reducibleJoin88;
|
||||
}
|
||||
reducibleJoin90: while (true) {
|
||||
if (r2) {
|
||||
break reducibleJoin90;
|
||||
}
|
||||
object2.type = 'binary';
|
||||
break reducibleJoin90;
|
||||
}
|
||||
value = environment;
|
||||
try {
|
||||
binding = env0_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding93;
|
||||
}
|
||||
break reducibleJoin92;
|
||||
}
|
||||
value = a1 == null;
|
||||
r2 = value;
|
||||
reducibleJoin88: while (true) {
|
||||
if (r2) {
|
||||
break reducibleJoin88;
|
||||
}
|
||||
value = value2 === 'string';
|
||||
r2 = value;
|
||||
break reducibleJoin88;
|
||||
}
|
||||
reducibleJoin90: while (true) {
|
||||
if (r2) {
|
||||
break reducibleJoin90;
|
||||
}
|
||||
object2.type = 'binary';
|
||||
break reducibleJoin90;
|
||||
}
|
||||
value = environment;
|
||||
try {
|
||||
binding = env0_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding93;
|
||||
}
|
||||
break reducibleJoin92;
|
||||
}
|
||||
break reduciblePort94;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding(object2);
|
||||
} catch (error) {
|
||||
break exceptionLanding93;
|
||||
}
|
||||
}
|
||||
|
||||
function installWebsocketTelemetryHookWebSocket(a0) { // fn#125473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16434:481, owner: installWebsocketTelemetryHook.WebSocket, offset: 0x025d9e94, size: 102 bytes, params: 2, frame: 16
|
||||
const value = copyRestArgs(0, undefined);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, undefined);
|
||||
const value3 = apply(WebSocket, items2, 0);
|
||||
((a0, a1) => {
|
||||
var env0_0 = a1;
|
||||
if (typeof a0.addEventListener === 'function') {
|
||||
a0.addEventListener('message', _fun125475);
|
||||
}
|
||||
})(value3, typeof value[0] === 'string' ? value[0] : value3.url ?? '');
|
||||
return value3;
|
||||
}
|
||||
|
||||
function attachListener(a0, a1) { // fn#125474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16434:523, owner: installWebsocketTelemetryHook.WebSocket.attachListener, offset: 0x025d9efa, size: 56 bytes, params: 3, frame: 13
|
||||
const env0_0 = a1;
|
||||
if (typeof a0.addEventListener === 'function') {
|
||||
a0.addEventListener('message', _fun125475);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun125475(a0) { // fn#125475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16434:621, offset: 0x025d9f32, size: 43 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
const handleMessageBinding = handleMessage;
|
||||
value = undefined;
|
||||
handleMessageBinding(require, a0 == null ? value : a0.data);
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Metro module 12388; source: lib/zipWithNext.tsx; dependencies: [2] */
|
||||
function _fun94365(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12574:6, offset: 0x021152ff, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/zipWithNext.tsx');
|
||||
exports.default = function(a0, a1) {
|
||||
var r3;
|
||||
var r4;
|
||||
if (a0.length < 2) {
|
||||
return [];
|
||||
}
|
||||
var items = [];
|
||||
var property = a0[0];
|
||||
var value = 1;
|
||||
if (value < a0.length) {
|
||||
r3 = value;
|
||||
r4 = property;
|
||||
reducibleLoop2: while (true) {
|
||||
property = a0[r3];
|
||||
items.push(a1(r4, property));
|
||||
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
if (value < a0.length) {
|
||||
r3 = value;
|
||||
r4 = property;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
break reducibleLoop2;
|
||||
}
|
||||
}
|
||||
return items;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user