Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,198 @@
|
||||
/* Metro module 12504; source: modules/gateway/ActionBatcher.tsx; dependencies: [6, 7, 694, 2] */
|
||||
function _fun95269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:6, offset: 0x02137a41, size: 166 bytes, params: 8, frame: 18
|
||||
const _arrayLikeToArray_95272 = 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 = _fun95273();
|
||||
value.batchers = [];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/ActionBatcher.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_95270(a0, a1) { // fn#95270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:120, offset: 0x02137ae7, 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 _fun95271;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_95272(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_95272(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_95272(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun95271;
|
||||
}
|
||||
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 _fun95273() { // fn#95273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:1036, offset: 0x02137c5b, size: 85 bytes, params: 1, frame: 16
|
||||
return env0_3(ActionBatcher, [{key: 'flush', value: value_95276}], [{key: 'flush', value: value_95278}]);
|
||||
}
|
||||
|
||||
function ActionBatcher(a0, a1, a2) { // fn#95274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:1047, offset: 0x02137cb0, size: 95 bytes, params: 4, frame: 14
|
||||
const env0_1 = a1;
|
||||
env1_2(this, ActionBatcher);
|
||||
this.socket = a0;
|
||||
this.action = null;
|
||||
this.shouldFlush = a2;
|
||||
this.add = add_95275;
|
||||
ActionBatcher.batchers.push(this);
|
||||
}
|
||||
|
||||
function value_95276() { // fn#95276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:1269, offset: 0x02137d32, size: 87 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var value;
|
||||
const action = this.action;
|
||||
this.action = null;
|
||||
if (action != null) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value = value.dispatch(action);
|
||||
value.catch(_fun95277);
|
||||
}
|
||||
}
|
||||
|
||||
function value_95278(a0, a1) { // fn#95278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:1448, offset: 0x02137db9, size: 116 bytes, params: 3, frame: 19
|
||||
var r2;
|
||||
var r8;
|
||||
var r1;
|
||||
var value3;
|
||||
var action;
|
||||
var value4;
|
||||
var value5;
|
||||
var shouldFlush2;
|
||||
var value6;
|
||||
let value = environment.__proto__;
|
||||
value = _createForOfIteratorHelperLoose_95270(ActionBatcher.batchers);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (!done) {
|
||||
r2 = value2;
|
||||
while (true) {
|
||||
value3 = r2.value;
|
||||
action = value3.action;
|
||||
value4 = action != null;
|
||||
if (value4) {
|
||||
value5 = a0 == null;
|
||||
if (value5) {
|
||||
r8 = value5;
|
||||
continue;
|
||||
}
|
||||
shouldFlush2 = value3.shouldFlush(a0, a1);
|
||||
r8 = shouldFlush2;
|
||||
r1 = r8;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
if (!r1) {
|
||||
continue;
|
||||
}
|
||||
value3.flush();
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r2 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ActionBatcherAdd(a0) { // fn#95275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:1158, owner: ActionBatcher.add, offset: 0x02137d0f, size: 35 bytes, params: 2, frame: 14
|
||||
const binding = env0_0;
|
||||
binding.action = require(binding.action, a0);
|
||||
}
|
||||
|
||||
function _fun95277(a0) { // fn#95277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12694:1351, offset: 0x02137d89, size: 48 bytes, params: 2, frame: 13
|
||||
return env0_0.socket.resetSocketAndClearCacheOnError({error: a0, action: action.type});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
/* Metro module 12500; source: modules/gateway/BasicWorkScheduler.tsx; dependencies: [6, 7, 12498, 3, 12501, 44, 2] */
|
||||
function _fun95220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:6, offset: 0x02135b8a, size: 232 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(12498) /* metro dependency 12498: DispatcherWorkConstants */;
|
||||
const env0_5 = value.MAX_DISPATCHER_FLUSH_DEADLINE_TRIES;
|
||||
const env0_6 = value.DISPATCHER_STANDARD_TIMEOUT_MS;
|
||||
const env0_7 = value.DISPATCHER_IDEAL_TIME_LIMIT_MS;
|
||||
const env0_8 = value.DISPATCHER_LONG_TIMEOUT_MS;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('DispatcherWorkScheduler');
|
||||
value = _fun95221();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/BasicWorkScheduler.tsx');
|
||||
exports.BasicWorkScheduler = value;
|
||||
}
|
||||
|
||||
function _fun95221() { // fn#95221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:311, offset: 0x02135c72, size: 346 bytes, params: 1, frame: 15
|
||||
return env0_4(BasicWorkScheduler, [{key: '_trackAppBackgrounded', value: value_95223}, {key: '_queueIdleCallback',
|
||||
value: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('Not implemented');
|
||||
}}, {key: '_clearIdleCallback', value: function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('Not implemented');
|
||||
}}, {key: '_hasExceededMaxConsecutiveFlushes', get: function() {
|
||||
return this._consecutiveFlushesBeforeQueueEmpty >= MAX_DISPATCHER_FLUSH_DEADLINE_TRIES;
|
||||
}}, {key: '_processWorkCallback', value: value_95227}, {key: 'markCriticalWorkScheduled', value: function() {
|
||||
this._criticalWorkScheduled = true;
|
||||
if (this._flushIdleHandler != null) {
|
||||
this._clearIdleCallback();
|
||||
this._processWorkCallback();
|
||||
}
|
||||
}}, {key: 'toggleRequestIdleCallback', value: function(a0) {
|
||||
this._enableRequestIdleCallback = a0;
|
||||
if (!a0 && this.hasWorkScheduled) {
|
||||
this._clearIdleCallback();
|
||||
this._processWorkCallback();
|
||||
}
|
||||
}}, {key: 'isBackgrounded', get: function() {
|
||||
return this._isBackgrounded;
|
||||
}}, {key: 'hasWorkScheduled', get: function() {
|
||||
return this._flushTimeoutHandler != null || this._flushIdleHandler != null;
|
||||
}}, {key: 'isRequestIdleCallbackEnabled', get: function() {
|
||||
return this._enableRequestIdleCallback;
|
||||
}}, {key: 'clearWorkTimeout', value: function() {
|
||||
if (this._flushTimeoutHandler != null) {
|
||||
global.clearTimeout(this._flushTimeoutHandler);
|
||||
this._flushTimeoutHandler = null;
|
||||
}
|
||||
this._clearIdleCallback();
|
||||
this._nextDispatchTimeout = DISPATCHER_STANDARD_TIMEOUT_MS;
|
||||
this._workCallbackFn = null;
|
||||
}}, {key: 'requestWorkTimeout', value: value_95234}]);
|
||||
}
|
||||
|
||||
function BasicWorkScheduler() { // fn#95222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:332, offset: 0x02135dcc, size: 149 bytes, params: 1, frame: 15
|
||||
env1_3(this, BasicWorkScheduler);
|
||||
this._flushTimeoutHandler = null;
|
||||
this._flushIdleHandler = null;
|
||||
this._nextDispatchTimeout = DISPATCHER_STANDARD_TIMEOUT_MS;
|
||||
this._workCallbackFn = null;
|
||||
this._consecutiveFlushesBeforeQueueEmpty = 0;
|
||||
this._isBackgrounded = false;
|
||||
this._enableRequestIdleCallback = true;
|
||||
this._criticalWorkScheduled = false;
|
||||
const WorkSchedulerTelemetry = (require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetry;
|
||||
const value3 = Object.create(WorkSchedulerTelemetry.prototype, {constructor: {value: WorkSchedulerTelemetry}});
|
||||
const workSchedulerTelemetry = new WorkSchedulerTelemetry();
|
||||
this.telemetry = workSchedulerTelemetry instanceof Object ? workSchedulerTelemetry : value3;
|
||||
this._logger = env1_9;
|
||||
}
|
||||
|
||||
function value_95223(a0) { // fn#95223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:739, offset: 0x02135e61, size: 107 bytes, params: 2, frame: 14
|
||||
var telemetry;
|
||||
var track;
|
||||
var value;
|
||||
if (this._isBackgrounded !== a0) {
|
||||
this._isBackgrounded = a0;
|
||||
if (this._isBackgrounded && this.hasWorkScheduled) {
|
||||
telemetry = this.telemetry;
|
||||
track = telemetry.track;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(track, telemetry,
|
||||
[(require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryEvent.SKIP_IDLE_CALLBACK_DUE_TO_BACKGROUNDED]);
|
||||
this._processWorkCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_95227(a0) { // fn#95227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:1279, offset: 0x02135f06, size: 417 bytes, params: 2, frame: 19
|
||||
var value;
|
||||
var _consecutiveFlushesBeforeQueueEmpty;
|
||||
var telemetry;
|
||||
const WorkSchedulerTelemetryMeasurement = (require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryMeasurement;
|
||||
if (this._workCallbackFn != null) {
|
||||
if (this._hasExceededMaxConsecutiveFlushes) {
|
||||
value = environment.__proto__;
|
||||
env1_9.log('Unable to fully flush work queue after max retries, skipping future deadline.');
|
||||
this._workCallbackFn();
|
||||
this.clearWorkTimeout();
|
||||
telemetry = this.telemetry;
|
||||
telemetry.measure(WorkSchedulerTelemetryMeasurement.COUNT_FLUSH_BEFORE_QUEUE_EMPTY,
|
||||
this._consecutiveFlushesBeforeQueueEmpty);
|
||||
telemetry = this.telemetry;
|
||||
telemetry.track((require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryEvent.EXCEEDED_MAX_CONSECUTIVE_FLUSHES);
|
||||
this._consecutiveFlushesBeforeQueueEmpty = 0;
|
||||
this._nextDispatchTimeout = DISPATCHER_LONG_TIMEOUT_MS;
|
||||
return undefined;
|
||||
}
|
||||
var performance = global.performance;
|
||||
value = performance.now();
|
||||
var value2 = this._workCallbackFn(a0);
|
||||
performance = global.performance;
|
||||
var value3 = performance.now();
|
||||
this.clearWorkTimeout();
|
||||
value = value3 - value;
|
||||
this._nextDispatchTimeout = value > DISPATCHER_IDEAL_TIME_LIMIT_MS ? DISPATCHER_LONG_TIMEOUT_MS : DISPATCHER_STANDARD_TIMEOUT_MS;
|
||||
_consecutiveFlushesBeforeQueueEmpty = this._consecutiveFlushesBeforeQueueEmpty;
|
||||
if (value2) {
|
||||
if (_consecutiveFlushesBeforeQueueEmpty > 0) {
|
||||
telemetry = this.telemetry;
|
||||
telemetry.measure(WorkSchedulerTelemetryMeasurement.COUNT_FLUSH_BEFORE_QUEUE_EMPTY,
|
||||
global.parseInt('' + this._consecutiveFlushesBeforeQueueEmpty));
|
||||
}
|
||||
this._consecutiveFlushesBeforeQueueEmpty = 0;
|
||||
this._criticalWorkScheduled = false;
|
||||
} else {
|
||||
this._consecutiveFlushesBeforeQueueEmpty = _consecutiveFlushesBeforeQueueEmpty + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_95234(a0) { // fn#95234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:3132, offset: 0x02136188, size: 202 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var telemetry;
|
||||
var time;
|
||||
let value = a1;
|
||||
const r3 = value !== undefined ? value : false;
|
||||
this._workCallbackFn = a0;
|
||||
if (!this.hasWorkScheduled) {
|
||||
telemetry = this.telemetry;
|
||||
time = telemetry.time;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(time, telemetry,
|
||||
[(require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryTiming.TIME_TO_QUEUE_EMPTY]);
|
||||
if (this._nextDispatchTimeout === DISPATCHER_LONG_TIMEOUT_MS) {
|
||||
telemetry = this.telemetry;
|
||||
telemetry.track((require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryEvent.LONGER_DISPATCH);
|
||||
}
|
||||
if (r3) {
|
||||
this._queueIdleCallback();
|
||||
} else {
|
||||
this._flushTimeoutHandler = global.setTimeout(_fun95235, this._nextDispatchTimeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun95235() { // fn#95235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12690:3445, offset: 0x02136252, size: 141 bytes, params: 1, frame: 16
|
||||
var telemetry;
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
let binding = env0_0;
|
||||
defaultImport(binding._workCallbackFn != null, 'Work callback should be set');
|
||||
const _isBackgrounded = binding._isBackgrounded;
|
||||
binding = env0_0;
|
||||
if (_isBackgrounded) {
|
||||
telemetry = binding.telemetry;
|
||||
telemetry.track((require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryEvent.SKIP_IDLE_CALLBACK_DUE_TO_BACKGROUNDED);
|
||||
return binding._processWorkCallback();
|
||||
}
|
||||
binding._queueIdleCallback();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,701 @@
|
||||
/* Metro module 15679; source: modules/gateway/ChannelResyncManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 1226, 1379, 4646, 1867, 4257, 661, 1386, 3, 672, 4860, 683, 694, 5235, 12526, 1391, 491, 2] */
|
||||
function _fun120268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:6, offset: 0x02526273, size: 774 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const scheduleGuildResyncs = function() {
|
||||
return _scheduleGuildResyncs.apply(this, arguments);
|
||||
};
|
||||
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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const env0_14 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_15 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('ChannelResyncManager');
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
let SECOND = Millis.SECOND;
|
||||
const env0_17 = 2 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
const env0_18 = 30 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
const env0_19 = 300 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
const env0_20 = 30 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
const env0_21 = 60 * SECOND;
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120307(value);
|
||||
const env0_22 = {};
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const env0_24 = {};
|
||||
const env0_25 = {};
|
||||
const env0_26 = {};
|
||||
const env0_27 = {};
|
||||
const env0_28 = {};
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/ChannelResyncManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120269() { // fn#120269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:259, offset: 0x02526579, 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_120269_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function setLatestRequest(a0, a1, a2) { // fn#120272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:1549, offset: 0x025265db, size: 58 bytes, params: 4, frame: 12
|
||||
const binding = env0_22;
|
||||
const object2 = {guildId: a0, requestId: a1, source: a2};
|
||||
object2.requestedUserId = AuthenticationStore.getId();
|
||||
binding[a0] = object2;
|
||||
}
|
||||
|
||||
function getLatestRequestId(a0) { // fn#120273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:1646, offset: 0x02526615, size: 47 bytes, params: 2, frame: 4
|
||||
return env0_22[a0]?.requestId ?? 'unknown';
|
||||
}
|
||||
|
||||
function cleanupResyncState(a0) { // fn#120274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:1748, offset: 0x02526644, size: 98 bytes, params: 2, frame: 14
|
||||
if (env0_25[a0] != null) {
|
||||
global.clearTimeout(env0_25[a0]);
|
||||
delete env0_25[a0];
|
||||
}
|
||||
if (env0_24[a0] != null) {
|
||||
global.clearTimeout(env0_24[a0]);
|
||||
delete env0_24[a0];
|
||||
}
|
||||
}
|
||||
|
||||
function cleanupIntegrityCheckState(a0) { // fn#120275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:1869, offset: 0x025266a6, size: 98 bytes, params: 2, frame: 14
|
||||
if (env0_27[a0] != null) {
|
||||
global.clearTimeout(env0_27[a0]);
|
||||
delete env0_27[a0];
|
||||
}
|
||||
if (env0_26[a0] != null) {
|
||||
global.clearTimeout(env0_26[a0]);
|
||||
delete env0_26[a0];
|
||||
}
|
||||
}
|
||||
|
||||
function handleGuildCreate_120276({guild}) { // fn#120276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:1998, offset: 0x02526708, size: 126 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var id;
|
||||
if (guild.unavailable !== true) {
|
||||
binding = env0_28;
|
||||
id = guild.id;
|
||||
if (binding[id] != null) {
|
||||
global.clearTimeout(env0_28[guild.id]);
|
||||
}
|
||||
binding = env0_28;
|
||||
id = guild.id;
|
||||
binding[id] = global.setTimeout(_fun120277, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function handlePostConnectionOpen() { // fn#120278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:2230, offset: 0x025267e2, size: 62 bytes, params: 1, frame: 12
|
||||
env0_23.clear();
|
||||
scheduleGuildResyncs();
|
||||
GuildStore.getGuildIds().forEach(function(a0) {
|
||||
scheduleIntegrityCheck(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function handleChannelSync(a0) { // fn#120280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:2357, offset: 0x02526833, size: 159 bytes, params: 2, frame: 18
|
||||
var getLatestRequestIdBinding;
|
||||
var guild_id;
|
||||
var latestRequestIdBinding;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_CHANNEL_RESYNC_COMPLETED;
|
||||
var cleanupResyncStateBinding;
|
||||
var scheduleIntegrityCheckBinding;
|
||||
if (a0.integrity_check) {
|
||||
doIntegrityCheck(a0);
|
||||
} else {
|
||||
getLatestRequestIdBinding = getLatestRequestId;
|
||||
guild_id = a0.guild_id;
|
||||
latestRequestIdBinding = getLatestRequestIdBinding(guild_id);
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_CHANNEL_RESYNC_COMPLETED = AnalyticEvents.GUILD_CHANNEL_RESYNC_COMPLETED;
|
||||
guild_id = a0.guild_id;
|
||||
Reflect.apply(track, defaultImport, [GUILD_CHANNEL_RESYNC_COMPLETED, {guild_id: guild_id,
|
||||
request_id: latestRequestIdBinding, num_new_channels: a0.channels.length}]);
|
||||
cleanupResyncStateBinding = cleanupResyncState;
|
||||
guild_id = a0.guild_id;
|
||||
cleanupResyncStateBinding(guild_id);
|
||||
scheduleIntegrityCheckBinding = scheduleIntegrityCheck;
|
||||
guild_id = a0.guild_id;
|
||||
scheduleIntegrityCheckBinding(guild_id);
|
||||
}
|
||||
}
|
||||
|
||||
function handleLogout_120283({isSwitchingAccount}) { // fn#120283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:3697, offset: 0x02526bc2, size: 329 bytes, params: 2, frame: 21
|
||||
var propertyName;
|
||||
var clearTimeout;
|
||||
const binding = env0_29;
|
||||
env0_29 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
const env0_0 = isSwitchingAccount !== true ? 'logout' : 'account_switch';
|
||||
const Set = global.Set;
|
||||
let Object = global.Object;
|
||||
const value4 = Object.keys(env0_24);
|
||||
const items2 = [];
|
||||
const value5 = arraySpread(items2, value4, 0, undefined);
|
||||
Object = global.Object;
|
||||
const value6 = arraySpread(items2, Object.keys(env0_25), value5, undefined);
|
||||
Object = global.Object;
|
||||
const value7 = arraySpread(items2, Object.keys(env0_26), value6, undefined);
|
||||
Object = global.Object;
|
||||
arraySpread(items2, Object.keys(env0_27), value7, undefined);
|
||||
const set = new Set(items2);
|
||||
set.forEach(_fun120284);
|
||||
set.forEach(function(a0) {
|
||||
cleanupResyncState(a0);
|
||||
cleanupIntegrityCheckState(a0);
|
||||
});
|
||||
for (propertyName in env0_28) {
|
||||
clearTimeout = global.clearTimeout;
|
||||
clearTimeout(env0_28[propertyName]);
|
||||
delete env0_28[propertyName];
|
||||
}
|
||||
for (propertyName in env0_22) {
|
||||
delete env0_22[propertyName];
|
||||
}
|
||||
env0_23.clear();
|
||||
}
|
||||
|
||||
function _scheduleGuildResyncs() { // fn#120287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:4642, offset: 0x02526e50, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun120289).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _getResyncGuilds() { // fn#120298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:6355, offset: 0x02527335, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun120300).apply(this, arguments);
|
||||
}
|
||||
|
||||
function scheduleIntegrityCheck(a0) { // fn#120302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:6615, offset: 0x02527436, size: 283 bytes, params: 2, frame: 20
|
||||
var r8;
|
||||
var value2;
|
||||
var property;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var Math;
|
||||
const env0_0 = a0;
|
||||
const privateChannelHidingExperimentModule = require(12526) /* metro dependency 12526: PrivateChannelHidingExperiment */;
|
||||
if (privateChannelHidingExperimentModule.isChannelMetadataIntegrityCheckEnabled('scheduleIntegrityCheck')) {
|
||||
value2 = env0_26[a0] != null;
|
||||
cleanupIntegrityCheckState(a0);
|
||||
property = env0_22[a0];
|
||||
if (property != null) {
|
||||
r8 = property.requestId;
|
||||
} else {
|
||||
value3 = (require(491) /* metro dependency 491 */).v4();
|
||||
setLatestRequest(a0, value3, 'integrity_check');
|
||||
r8 = value3;
|
||||
}
|
||||
if (!value2) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_REQUESTED, {guild_id: a0, request_id: r8});
|
||||
}
|
||||
Math = global.Math;
|
||||
env0_26[a0] = global.setTimeout(_fun120303, env0_18 + Math.ceil(global.Math.random() * env0_19));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120307(a0) { // fn#120307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:638, offset: 0x02527767, size: 74 bytes, params: 2, frame: 15
|
||||
const closure = ChannelResyncManager;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: '__unsafeGetTestState', value: value_120309}]);
|
||||
}
|
||||
|
||||
function _fun120277() { // fn#120277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:2124, offset: 0x02526786, size: 92 bytes, params: 1, frame: 13
|
||||
var scheduleGuildResyncsBinding;
|
||||
var scheduleIntegrityCheckBinding;
|
||||
let binding = env1_28;
|
||||
let id = guild.id;
|
||||
delete binding[id];
|
||||
binding = env0_1;
|
||||
if (binding === env1_29) {
|
||||
binding = env1_23;
|
||||
guildBinding = guild;
|
||||
id = guildBinding.id;
|
||||
binding.delete(id);
|
||||
scheduleGuildResyncsBinding = scheduleGuildResyncs;
|
||||
id = guildBinding.id;
|
||||
scheduleGuildResyncsBinding(id);
|
||||
scheduleIntegrityCheckBinding = scheduleIntegrityCheck;
|
||||
id = guildBinding.id;
|
||||
scheduleIntegrityCheckBinding(id);
|
||||
}
|
||||
}
|
||||
|
||||
function doIntegrityCheck({guild_id, channels}) { // fn#120281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:2409, owner: handleChannelSync.doIntegrityCheck, offset: 0x025268d2, size: 351 bytes, params: 2, frame: 23
|
||||
const latestRequestId = getLatestRequestId(guild_id);
|
||||
const env0_0 = ChannelStore.getMutableGuildChannelsForGuild(guild_id);
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
const items = [];
|
||||
channels.forEach(_fun120282);
|
||||
const Array = global.Array;
|
||||
const value6 = Array.from(set).join(', ');
|
||||
const r7 = items.length > 0 ? global.JSON.stringify(items) : null;
|
||||
(set.size > 0 ? env1_16.warn : env1_16.verbose)('Integrity check for guild ' + guild_id + ' completed. Discrepancies found: ' + value6);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_CHANNEL_INTEGRITY_CHECK_COMPLETED = AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_COMPLETED;
|
||||
Reflect.apply(track, defaultImport, [GUILD_CHANNEL_INTEGRITY_CHECK_COMPLETED, {guild_id: guild_id,
|
||||
request_id: latestRequestId, num_channels_received: channels.length, num_discrepancies_found: set.size,
|
||||
discrepancy_channel_ids: value6, discrepancies_details: r7}]);
|
||||
cleanupIntegrityCheckState(guild_id);
|
||||
env1_23.add(guild_id);
|
||||
}
|
||||
|
||||
function _fun120284(a0) { // fn#120284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:3893, offset: 0x02526d0b, size: 297 bytes, params: 2, frame: 22
|
||||
var value3;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_CHANNEL_RESYNC_CANCELED;
|
||||
var requestedUserId;
|
||||
var value6;
|
||||
var value7;
|
||||
var defaultImport2;
|
||||
var GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED;
|
||||
const property = env1_22[a0];
|
||||
const value2 = null;
|
||||
if (value2 != property) {
|
||||
value3 = value2 != env1_24[a0];
|
||||
value4 = value2 != env1_25[a0];
|
||||
if (value3) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_CHANNEL_RESYNC_CANCELED = AnalyticEvents.GUILD_CHANNEL_RESYNC_CANCELED;
|
||||
requestedUserId = property.requestedUserId;
|
||||
Reflect.apply(track, defaultImport, [GUILD_CHANNEL_RESYNC_CANCELED, {guild_id: a0,
|
||||
request_id: property.requestId,
|
||||
requested_user_id: value2 != requestedUserId ? requestedUserId : value2, cancellation_reason: env0_0,
|
||||
had_scheduled_timer: value3, had_pending_timeout: value4}]);
|
||||
} else if (value4) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_CHANNEL_RESYNC_CANCELED = AnalyticEvents.GUILD_CHANNEL_RESYNC_CANCELED;
|
||||
requestedUserId = property.requestedUserId;
|
||||
Reflect.apply(track, defaultImport, [GUILD_CHANNEL_RESYNC_CANCELED, {guild_id: a0,
|
||||
request_id: property.requestId,
|
||||
requested_user_id: value2 != requestedUserId ? requestedUserId : value2, cancellation_reason: env0_0,
|
||||
had_scheduled_timer: value3, had_pending_timeout: value4}]);
|
||||
}
|
||||
value6 = value2 != env1_26[a0];
|
||||
value7 = value2 != env1_27[a0];
|
||||
if (value6) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED = AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED;
|
||||
requestedUserId = property.requestedUserId;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED, {guild_id: a0,
|
||||
request_id: property.requestId, requested_user_id: value2 != requestedUserId ? requestedUserId : value2,
|
||||
cancellation_reason: env0_0, had_scheduled_timer: value6, had_pending_timeout: value7}]);
|
||||
} else if (value7) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED = AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED;
|
||||
requestedUserId = property.requestedUserId;
|
||||
Reflect.apply(track, defaultImport2, [GUILD_CHANNEL_INTEGRITY_CHECK_CANCELED, {guild_id: a0,
|
||||
request_id: property.requestId, requested_user_id: value2 != requestedUserId ? requestedUserId : value2,
|
||||
cancellation_reason: env0_0, had_scheduled_timer: value6, had_pending_timeout: value7}]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun120289(a0) { // fn#120289, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:4707, offset: 0x02526e8d, size: 295 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var value6;
|
||||
if (true) {
|
||||
var env0_0 = a0;
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_29;
|
||||
yield getResyncGuilds();
|
||||
var value3 = undefined;
|
||||
if (false) {
|
||||
return value3;
|
||||
}
|
||||
if (binding === env2_29) {
|
||||
binding = env2_16;
|
||||
binding.verbose('Resync guilds: ' + global.JSON.stringify(value3));
|
||||
value3.eligible.forEach(_fun120291);
|
||||
if (value3.ineligible.length > 0) {
|
||||
value6 = value3.ineligible.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
binding = env2_16;
|
||||
binding.verbose('Guilds we are no longer part of are marked for resync. Unmarking them. Guilds: ' + global.JSON.stringify(value6));
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[17]);
|
||||
value.dispatch({type: 'UNMARK_RESYNC_GUILDS', guildIds: value6});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun120300() { // fn#120300, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:6410, offset: 0x02527372, size: 102 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[18]);
|
||||
const getAll = value.getAll;
|
||||
yield Reflect.apply(getAll, value, []);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return value.reduce(_fun120301, {eligible: [], ineligible: []});
|
||||
}
|
||||
|
||||
function _fun120303() { // fn#120303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:7005, offset: 0x02527551, size: 36 bytes, params: 1, frame: 11
|
||||
const binding = env1_26;
|
||||
const binding2 = env0_0;
|
||||
delete binding[binding2];
|
||||
triggerIntegrityCheck(binding2);
|
||||
}
|
||||
|
||||
function ChannelResyncManager(a0) { // fn#120308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:650, offset: 0x025277b1, size: 170 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, ChannelResyncManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_7(ChannelResyncManager);
|
||||
binding = env1_6;
|
||||
if (_isNativeReflectConstruct_120269()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_7(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {GUILD_CREATE: handleGuildCreate_120276, POST_CONNECTION_OPEN: handlePostConnectionOpen,
|
||||
CHANNEL_SYNC: handleChannelSync, LOGOUT: handleLogout_120283};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_120309() { // fn#120309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:1129, offset: 0x0252785b, size: 209 bytes, params: 1, frame: 14
|
||||
const object2 = {};
|
||||
let Object = global.Object;
|
||||
object2.scheduledResyncTimerGuildIds = Object.keys(env1_24);
|
||||
Object = global.Object;
|
||||
object2.pendingResyncTimeoutGuildIds = Object.keys(env1_25);
|
||||
Object = global.Object;
|
||||
object2.scheduledIntegrityCheckTimerGuildIds = Object.keys(env1_26);
|
||||
Object = global.Object;
|
||||
object2.pendingIntegrityCheckTimeoutGuildIds = Object.keys(env1_27);
|
||||
Object = global.Object;
|
||||
object2.pendingGuildCreateDeferredGuildIds = Object.keys(env1_28);
|
||||
Object = global.Object;
|
||||
object2.guildIdsWithLatestRequest = Object.keys(env1_22);
|
||||
const Array = global.Array;
|
||||
object2.guildsCompletedIntegrityCheck = Array.from(env1_23);
|
||||
object2.sessionEpoch = env1_29;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun120282(a0) { // fn#120282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:2553, offset: 0x02526a31, size: 401 bytes, params: 2, frame: 26
|
||||
var r7;
|
||||
var warn;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var hasFlag;
|
||||
var flags;
|
||||
var value4;
|
||||
var OBFUSCATED;
|
||||
var hasFlag2;
|
||||
var moduleValue2;
|
||||
var hasFlag3;
|
||||
var add;
|
||||
var push;
|
||||
var object2;
|
||||
var parent_id;
|
||||
let binding = env0_0;
|
||||
let id = a0.id;
|
||||
const property = binding[id];
|
||||
const value2 = null;
|
||||
if (value2 != property) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
hasFlag = moduleValue.hasFlag;
|
||||
flags = a0.flags;
|
||||
value4 = 0;
|
||||
r7 = value2 != flags ? flags : value4;
|
||||
OBFUSCATED = ChannelFlags.OBFUSCATED;
|
||||
hasFlag2 = Reflect.apply(hasFlag, moduleValue, [r7, OBFUSCATED]);
|
||||
moduleValue2 = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
hasFlag = moduleValue2.hasFlag;
|
||||
flags = property.flags;
|
||||
OBFUSCATED = ChannelFlags.OBFUSCATED;
|
||||
hasFlag3 = Reflect.apply(hasFlag, moduleValue2, [flags, OBFUSCATED]);
|
||||
if (hasFlag2 !== hasFlag3) {
|
||||
binding = env2_16;
|
||||
warn = binding.warn;
|
||||
id = a0.id;
|
||||
Reflect.apply(warn, binding,
|
||||
['Integrity check failure: ' + id + ' serverObfuscated: ' + hasFlag2 + ' != clientObfuscated: ' + hasFlag3]);
|
||||
binding = env0_1;
|
||||
add = binding.add;
|
||||
id = a0.id;
|
||||
Reflect.apply(add, binding, [id]);
|
||||
binding = env0_2;
|
||||
push = binding.push;
|
||||
object2 = {};
|
||||
id = a0.id;
|
||||
object2.channel_id = id;
|
||||
object2.server_obfuscated = hasFlag2;
|
||||
object2.client_obfuscated = hasFlag3;
|
||||
flags = a0.flags;
|
||||
object2.server_flags = value2 != flags ? flags : value4;
|
||||
flags = property.flags;
|
||||
object2.client_flags = value2 != flags ? flags : value4;
|
||||
object2.channel_type = a0.type;
|
||||
parent_id = a0.parent_id;
|
||||
object2.parent_id = value2 != parent_id ? parent_id : value2;
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
}
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_16;
|
||||
binding.warn('Integrity check failure: ' + a0.id + ' was missing.');
|
||||
}
|
||||
}
|
||||
|
||||
function getResyncGuilds() { // fn#120290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:4736, offset: 0x02526fb4, size: 30 bytes, params: 1, frame: 13
|
||||
return env3_41.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun120291(a0) { // fn#120291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:4892, offset: 0x02526fd2, size: 67 bytes, params: 2, frame: 13
|
||||
if (!(env0_0 != null && a0.id !== env0_0)) {
|
||||
scheduleGuildResync(a0.id, a0.requestId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120301(a0, a1) { // fn#120301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:6462, offset: 0x025273d8, size: 94 bytes, params: 3, frame: 14
|
||||
let binding = env3_12;
|
||||
const getGuild = binding.getGuild;
|
||||
if (Reflect.apply(getGuild, binding, [a1.id]) != null) {
|
||||
a0.eligible.push(a1);
|
||||
} else {
|
||||
binding = env3_11;
|
||||
if (binding.isUnavailable(a1.id)) {
|
||||
a0.eligible.push(a1);
|
||||
} else {
|
||||
a0.ineligible.push(a1);
|
||||
}
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function triggerIntegrityCheck(a0) { // fn#120304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:7022, offset: 0x02527575, size: 271 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var binding;
|
||||
var latestRequestId;
|
||||
var defaultImport;
|
||||
var defaultImport2;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const privateChannelHidingExperimentModule = require(12526) /* metro dependency 12526: PrivateChannelHidingExperiment */;
|
||||
if (privateChannelHidingExperimentModule.isChannelMetadataIntegrityCheckEnabled('triggerIntegrityCheck')) {
|
||||
binding = env2_23;
|
||||
if (binding.has(a0)) {
|
||||
return undefined;
|
||||
}
|
||||
latestRequestId = getLatestRequestId(a0);
|
||||
if (GuildStore.getGuild(a0) == null) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport2.track(AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_FAILED, {guild_id: a0,
|
||||
request_id: latestRequestId, failure_reason: 'guild_not_found'});
|
||||
cleanupIntegrityCheckState(a0);
|
||||
return undefined;
|
||||
}
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_EXECUTED, {guild_id: a0,
|
||||
request_id: latestRequestId});
|
||||
GatewayConnectionStore.getSocket().triggerGuildChannelResync(a0, null);
|
||||
scheduleIntegrityCheckTimeout(a0, latestRequestId);
|
||||
}
|
||||
}
|
||||
|
||||
function scheduleGuildResync(a0, a1) { // fn#120292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:4915, offset: 0x02527015, size: 141 bytes, params: 3, frame: 19
|
||||
const env0_0 = a0;
|
||||
env4_31(a0, a1, 'resync');
|
||||
if (env4_24[a0] != null) {
|
||||
global.clearTimeout(env4_24[a0]);
|
||||
}
|
||||
const Math = global.Math;
|
||||
const ceil = Math.ceil;
|
||||
const Math2 = global.Math;
|
||||
env4_24[a0] = global.setTimeout(_fun120293, Reflect.apply(ceil, Math, [Math2.random() * env4_17]));
|
||||
}
|
||||
|
||||
function scheduleIntegrityCheckTimeout(a0, a1) { // fn#120305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:7497, owner: triggerIntegrityCheck.scheduleIntegrityCheckTimeout, offset: 0x02527684, size: 93 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
if (env3_27[a0] != null) {
|
||||
global.clearTimeout(env3_27[a0]);
|
||||
}
|
||||
env3_27[a0] = global.setTimeout(_fun120306, env3_21);
|
||||
}
|
||||
|
||||
function _fun120293() { // fn#120293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:5061, offset: 0x025270a2, size: 36 bytes, params: 1, frame: 11
|
||||
const binding = env5_24;
|
||||
const binding2 = env0_0;
|
||||
delete binding[binding2];
|
||||
triggerGuildChannelResync(binding2);
|
||||
}
|
||||
|
||||
function _fun120306() { // fn#120306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:7589, offset: 0x025276e1, size: 134 bytes, params: 1, frame: 19
|
||||
const binding = env0_0;
|
||||
env4_16.warn('Integrity check timeout for guild ' + binding + ' with request ' + require);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_CHANNEL_INTEGRITY_CHECK_FAILED = AnalyticEvents.GUILD_CHANNEL_INTEGRITY_CHECK_FAILED;
|
||||
Reflect.apply(track, defaultImport, [GUILD_CHANNEL_INTEGRITY_CHECK_FAILED, {guild_id: binding, request_id: require,
|
||||
failure_reason: 'timeout'}]);
|
||||
cleanupIntegrityCheckState(binding);
|
||||
}
|
||||
|
||||
function triggerGuildChannelResync(a0) { // fn#120294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:5078, offset: 0x025270c6, size: 396 bytes, params: 2, frame: 28
|
||||
var r3;
|
||||
var r10;
|
||||
var r9;
|
||||
var value3;
|
||||
var items;
|
||||
var mutableGuildChannelsForGuild;
|
||||
var value6;
|
||||
var properties;
|
||||
var properties2;
|
||||
var properties3;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var property;
|
||||
var value7;
|
||||
var hasFlag;
|
||||
var flags;
|
||||
var OBFUSCATED;
|
||||
var value8;
|
||||
var value9;
|
||||
var value11;
|
||||
let binding = env6_0;
|
||||
const value2 = binding(env6_2[19]);
|
||||
if (value2.isChannelMetadataObfuscationEnabled('triggerGuildChannelResync')) {
|
||||
value3 = env6_32(a0);
|
||||
binding = env6_12;
|
||||
if (binding.getGuild(a0) == null) {
|
||||
value11 = env6_1(env6_2[16]);
|
||||
value11.track(env6_14.GUILD_CHANNEL_RESYNC_FAILED, {guild_id: a0, request_id: value3,
|
||||
failure_reason: 'guild_not_found'});
|
||||
env6_33(a0);
|
||||
return undefined;
|
||||
}
|
||||
items = [];
|
||||
binding = env6_10;
|
||||
mutableGuildChannelsForGuild = binding.getMutableGuildChannelsForGuild(a0);
|
||||
value6 = 0;
|
||||
properties = Object.keys(mutableGuildChannelsForGuild);
|
||||
properties2 = 0;
|
||||
properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r9 = value6;
|
||||
} else {
|
||||
r3 = value6;
|
||||
r10 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r10];
|
||||
propertyName2 = r10 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r9 = r3;
|
||||
break;
|
||||
}
|
||||
property = mutableGuildChannelsForGuild[propertyName];
|
||||
binding = env6_0;
|
||||
value7 = binding(env6_2[20]);
|
||||
hasFlag = value7.hasFlag;
|
||||
flags = property.flags;
|
||||
OBFUSCATED = env6_15.OBFUSCATED;
|
||||
if (!Reflect.apply(hasFlag, value7, [flags, OBFUSCATED])) {
|
||||
continue;
|
||||
}
|
||||
items.push(propertyName);
|
||||
value8 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
r3 = value8;
|
||||
r10 = propertyName2;
|
||||
}
|
||||
}
|
||||
binding = env6_1;
|
||||
value9 = binding(env6_2[16]);
|
||||
value9.track(env6_14.GUILD_CHANNEL_RESYNC_EXECUTED, {guild_id: a0, request_id: value3,
|
||||
num_obfuscated_channels: items.length, num_total_channels: r9});
|
||||
binding = env6_13;
|
||||
binding.getSocket().triggerGuildChannelResync(a0, items);
|
||||
scheduleResyncTimeout(a0, value3);
|
||||
env6_42(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function scheduleResyncTimeout(a0, a1) { // fn#120295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:5701, owner: triggerGuildChannelResync.scheduleResyncTimeout, offset: 0x02527252, size: 93 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
if (env7_25[a0] != null) {
|
||||
global.clearTimeout(env7_25[a0]);
|
||||
}
|
||||
env7_25[a0] = global.setTimeout(_fun120296, env7_20);
|
||||
}
|
||||
|
||||
function _fun120296() { // fn#120296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15887:5785, offset: 0x025272af, size: 134 bytes, params: 1, frame: 19
|
||||
const binding = env0_0;
|
||||
env8_16.warn('Resync timeout for guild ' + binding + ' with request ' + require);
|
||||
const value2 = env8_1(env8_2[16]);
|
||||
const track = value2.track;
|
||||
const GUILD_CHANNEL_RESYNC_FAILED = env8_14.GUILD_CHANNEL_RESYNC_FAILED;
|
||||
Reflect.apply(track, value2, [GUILD_CHANNEL_RESYNC_FAILED, {guild_id: binding, request_id: require,
|
||||
failure_reason: 'timeout'}]);
|
||||
env8_33(binding);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 12503; source: modules/gateway/ConnectionState.tsx; dependencies: [2] */
|
||||
function _fun95268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12693:6, offset: 0x021379b5, size: 140 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/ConnectionState.tsx');
|
||||
exports.default = {CLOSED: 'CLOSED', WILL_RECONNECT: 'WILL_RECONNECT', CONNECTING: 'CONNECTING',
|
||||
IDENTIFYING: 'IDENTIFYING', RESUMING: 'RESUMING', SESSION_ESTABLISHED: 'SESSION_ESTABLISHED'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* Metro module 12498; source: modules/gateway/DispatcherWorkConstants.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun95202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12688:6, offset: 0x021354d6, size: 244 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 = _fun95203();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/DispatcherWorkConstants.tsx');
|
||||
exports.DISPATCHER_STANDARD_TIMEOUT_MS = 50;
|
||||
exports.DISPATCHER_IDEAL_TIME_LIMIT_MS = 50;
|
||||
exports.DISPATCHER_MIN_DEADLINE_TIME_MS = 2.0833333333333335;
|
||||
exports.DISPATCHER_DEADLINE_OVERHEAD_MS = 3.3333333333333335;
|
||||
exports.NATIVE_WORK_DEADLINE_MS = 5.555555555555556;
|
||||
exports.NATIVE_WORK_BACKOFF_MS = 4.166666666666667;
|
||||
exports.DISPATCHER_LONG_TIMEOUT_MS = 200;
|
||||
exports.MAX_DISPATCHER_TIMEOUT_MS = 1000;
|
||||
exports.MAX_DISPATCHER_FLUSH_DEADLINE_TRIES = 2;
|
||||
exports.DISPATCHER_CALLBACK_MAX_TIME_REMAINING_MS = 50;
|
||||
exports.WorkIdleDeadline = value;
|
||||
}
|
||||
|
||||
function _fun95203() { // fn#95203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12688:139, offset: 0x021355ca, size: 138 bytes, params: 1, frame: 15
|
||||
return env0_1(WorkIdleDeadline, [{key: 'timeRemaining', value: function() {
|
||||
var value = global.performance.now();
|
||||
value -= this._startMs;
|
||||
return global.Math.max(0, this._deadlineMs - value);
|
||||
}}, {key: 'didTimeout', get: function() {
|
||||
return this._firedDueToMaxTimeout;
|
||||
}}, {key: 'timeSinceExpiration', get: function() {
|
||||
return global.performance.now() - (this._startMs + this._deadlineMs);
|
||||
}}, {key: 'generateDeadlineMetrics', value: function() {
|
||||
var object = {isDeadlineNotIdeal: this._browserDeadlineMs < 2.0833333333333335};
|
||||
object.deadlineMs = this._deadlineMs.toFixed(2);
|
||||
var value = global.performance.now();
|
||||
value -= this._startMs;
|
||||
object.timeSinceStartMs = value.toFixed(2);
|
||||
return object;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function WorkIdleDeadline(a0) { // fn#95204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12688:160, offset: 0x02135654, size: 107 bytes, params: 2, frame: 17
|
||||
let value = a1;
|
||||
const r3 = value !== undefined ? value : false;
|
||||
value = environment.__proto__;
|
||||
env1_0(this, WorkIdleDeadline);
|
||||
const Math = global.Math;
|
||||
this._deadlineMs = Math.max(2.0833333333333335, a0);
|
||||
this._browserDeadlineMs = a0;
|
||||
this._firedDueToMaxTimeout = r3;
|
||||
const performance = global.performance;
|
||||
this._startMs = performance.now();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 12499; source: modules/gateway/DispatcherWorkScheduler.native.tsx; dependencies: [6, 7, 15, 17, 18, 12498, 661, 694, 12500, 2] */
|
||||
function _fun95209(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:6, offset: 0x0213579b, size: 297 bytes, params: 8, frame: 19
|
||||
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 dispatcherWorkConstantsModule = require(12498) /* metro dependency 12498: DispatcherWorkConstants */;
|
||||
const env0_7 = dispatcherWorkConstantsModule.DISPATCHER_CALLBACK_MAX_TIME_REMAINING_MS;
|
||||
const env0_8 = dispatcherWorkConstantsModule.NATIVE_WORK_BACKOFF_MS;
|
||||
const env0_9 = dispatcherWorkConstantsModule.NATIVE_WORK_DEADLINE_MS;
|
||||
const env0_10 = dispatcherWorkConstantsModule.WorkIdleDeadline;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).AppStates;
|
||||
const BasicWorkScheduler = (require(12500) /* metro dependency 12500: BasicWorkScheduler */).BasicWorkScheduler;
|
||||
const env0_12 = _fun95213(BasicWorkScheduler);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/DispatcherWorkScheduler.native.tsx');
|
||||
exports.createDispatcherWorkScheduler = createDispatcherWorkScheduler;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_95210() { // fn#95210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:300, offset: 0x021358c4, 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_95210_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun95213(a0) { // fn#95213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:499, offset: 0x02135926, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = DispatcherWorkScheduler;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: '_queueIdleCallback', value: function() {
|
||||
var property;
|
||||
var env0_0 = this;
|
||||
if (this._enableRequestIdleCallback) {
|
||||
if (this._criticalWorkScheduled) {
|
||||
return this._processWorkCallback();
|
||||
}
|
||||
property = global.performance;
|
||||
var env0_1 = property.now();
|
||||
property = global.setTimeout;
|
||||
this._flushIdleHandler = property(_fun95217, 1);
|
||||
return undefined;
|
||||
}
|
||||
return this._processWorkCallback();
|
||||
}}, {key: '_clearIdleCallback', value: function() {
|
||||
if (this._flushIdleHandler != null) {
|
||||
global.clearTimeout(this._flushIdleHandler);
|
||||
this._flushIdleHandler = null;
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function createDispatcherWorkScheduler() { // fn#95219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:1621, offset: 0x02135b6d, size: 29 bytes, params: 1, frame: 9
|
||||
const binding = env0_12;
|
||||
const value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
const binding2 = new binding();
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
|
||||
function DispatcherWorkScheduler() { // fn#95214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:511, offset: 0x02135987, size: 157 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, DispatcherWorkScheduler);
|
||||
const value3 = env1_5(DispatcherWorkScheduler);
|
||||
const value6 = env1_4(this, _isNativeReflectConstruct_95210() ? global.Reflect.construct(value3, [],
|
||||
env1_5(this).constructor) : value3.apply(this, undefined));
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('APP_STATE_UPDATE', _fun95215);
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_95216() { // fn#95216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:957, offset: 0x02135a55, size: 92 bytes, params: 1, frame: 14
|
||||
if (this._enableRequestIdleCallback) {
|
||||
if (this._criticalWorkScheduled) {
|
||||
return this._processWorkCallback();
|
||||
}
|
||||
var env0_1 = global.performance.now();
|
||||
this._flushIdleHandler = global.setTimeout(_fun95217, 1);
|
||||
return undefined;
|
||||
}
|
||||
return this._processWorkCallback();
|
||||
}
|
||||
|
||||
function _fun95215({state}) { // fn#95215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:793, offset: 0x02135a24, size: 49 bytes, params: 2, frame: 12
|
||||
const BACKGROUND = AppStates.BACKGROUND;
|
||||
env0_0._trackAppBackgrounded(state === BACKGROUND);
|
||||
}
|
||||
|
||||
function _fun95217() { // fn#95217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12689:1127, offset: 0x02135ab1, size: 142 bytes, params: 1, frame: 18
|
||||
let value = global.performance.now();
|
||||
value -= env0_1;
|
||||
const binding = env0_0;
|
||||
const _processWorkCallback = binding._processWorkCallback;
|
||||
const _consecutiveFlushesBeforeQueueEmpty = binding._consecutiveFlushesBeforeQueueEmpty;
|
||||
let Math = global.Math;
|
||||
let max = Math.max;
|
||||
value = Reflect.apply(max, Math, [0, NATIVE_WORK_DEADLINE_MS - value]);
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value += NATIVE_WORK_BACKOFF_MS * _consecutiveFlushesBeforeQueueEmpty;
|
||||
value = Reflect.apply(max, Math, [value, DISPATCHER_CALLBACK_MAX_TIME_REMAINING_MS]);
|
||||
const value4 = Object.create(WorkIdleDeadline.prototype, {constructor: {value: WorkIdleDeadline}});
|
||||
const workIdleDeadline = new WorkIdleDeadline(value, false);
|
||||
Reflect.apply(_processWorkCallback, binding, [workIdleDeadline instanceof Object ? workIdleDeadline : value4]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
/* Metro module 15695; source: modules/gateway/EntityVersionsManager.tsx; dependencies: [6, 7, 15, 17, 18, 6540, 6583, 1379, 1938, 1867, 4257, 3, 694, 4860, 566, 5234, 1225, 21, 2] */
|
||||
function _fun120403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:6, offset: 0x0252a892, size: 419 bytes, params: 8, frame: 18
|
||||
const scheduleGuild = function(a0) {
|
||||
var env0_0 = a0;
|
||||
var property = global.Math;
|
||||
var Math = global.Math;
|
||||
var value = Math.random();
|
||||
value = property.ceil(2000 * value);
|
||||
global.setTimeout(_fun120422, 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 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('EntityVersionsManager');
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120428(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/EntityVersionsManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120404() { // fn#120404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:209, offset: 0x0252aa35, 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_120404_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleDeletedEntityIds(a0) { // fn#120407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:447, offset: 0x0252aa97, size: 154 bytes, params: 2, frame: 22
|
||||
const env0_0 = a0;
|
||||
const guild = GuildStore.getGuild(a0.guild_id);
|
||||
const value3 = undefined;
|
||||
const name = guild == null ? value3 : guild.name;
|
||||
const binding = env0_13;
|
||||
binding.fileOnly('received deleted guild entities (id: ' + a0.guild_id + ', name: ' + name + ')');
|
||||
const Emitter = (importDefault(566) /* metro dependency 566: flux */).Emitter;
|
||||
Emitter.batched(_fun120408);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function handleConnectionOpen_120417() { // fn#120417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1641, offset: 0x0252aed2, size: 56 bytes, params: 1, frame: 12
|
||||
let value = importDefault(5234) /* metro dependency 5234: GuildsRequiringDeletedIdsSync */;
|
||||
value = value.getAll();
|
||||
value.then(function(a0) {
|
||||
a0.forEach(_fun120419);
|
||||
});
|
||||
}
|
||||
|
||||
function handleGuildCreate_120420({guild}) { // fn#120420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1737, offset: 0x0252af37, size: 40 bytes, params: 2, frame: 11
|
||||
if (guild.unableToSyncDeletes) {
|
||||
scheduleGuild(guild.id);
|
||||
}
|
||||
}
|
||||
|
||||
function scheduleGuild(a0) { // fn#120421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1818, offset: 0x0252af5f, size: 77 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const Math = global.Math;
|
||||
const ceil = Math.ceil;
|
||||
const Math2 = global.Math;
|
||||
let value = Math2.random();
|
||||
value = Reflect.apply(ceil, Math, [2000 * value]);
|
||||
global.setTimeout(_fun120422, value);
|
||||
}
|
||||
|
||||
function computeHash(a0) { // fn#120427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:2389, offset: 0x0252b0f9, size: 74 bytes, params: 2, frame: 13
|
||||
var value;
|
||||
const v3 = (importDefault(1225) /* metro dependency 1225 */).v3;
|
||||
const value2 = a0.sort();
|
||||
value = Reflect.apply(v3, value, [value2.join(',')]);
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
function _fun120428(a0) { // fn#120428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:2473, offset: 0x0252b143, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = EntityVersionsManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: '_initialize', value: function() {
|
||||
importDefault(dependencyMap[12]).subscribe('CONNECTION_OPEN', handleConnectionOpen_120417);
|
||||
}}, {key: '_terminate', value: function() {
|
||||
importDefault(dependencyMap[12]).unsubscribe('CONNECTION_OPEN', handleConnectionOpen_120417);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun120408() { // fn#120408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:641, offset: 0x0252ab31, size: 299 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
var guild_id;
|
||||
var Set;
|
||||
var value2;
|
||||
var set;
|
||||
var value4;
|
||||
var value6;
|
||||
let channels = env0_0.channels;
|
||||
if (channels != null) {
|
||||
binding = env0_0;
|
||||
guild_id = binding.guild_id;
|
||||
Set = global.Set;
|
||||
channels = binding.channels;
|
||||
value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(channels);
|
||||
syncChannels(guild_id, set instanceof Object ? set : value2);
|
||||
}
|
||||
let roles = env0_0.roles;
|
||||
if (roles != null) {
|
||||
binding = env0_0;
|
||||
guild_id = binding.guild_id;
|
||||
Set = global.Set;
|
||||
roles = binding.roles;
|
||||
value4 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(roles);
|
||||
syncRoles_120411(guild_id, set instanceof Object ? set : value4);
|
||||
}
|
||||
let emojis = env0_0.emojis;
|
||||
if (emojis != null) {
|
||||
binding = env0_0;
|
||||
guild_id = binding.guild_id;
|
||||
Set = global.Set;
|
||||
emojis = binding.emojis;
|
||||
value6 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(emojis);
|
||||
syncEmojis_120413(guild_id, set instanceof Object ? set : value6);
|
||||
}
|
||||
if (env0_0.stickers != null) {
|
||||
binding = env0_0;
|
||||
syncStickers_120415(binding.guild_id, new global.Set(binding.stickers));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120418(a0) { // fn#120418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1697, offset: 0x0252af0a, size: 26 bytes, params: 2, frame: 11
|
||||
a0.forEach(function(a0) {
|
||||
scheduleGuild(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun120422() { // fn#120422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1891, offset: 0x0252afac, size: 25 bytes, params: 1, frame: 11
|
||||
computeHashAndFetchDeletedIds(env0_0);
|
||||
}
|
||||
|
||||
function EntityVersionsManager(a0) { // fn#120429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:2485, offset: 0x0252b1a4, size: 152 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_2;
|
||||
binding(this, EntityVersionsManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_5(EntityVersionsManager);
|
||||
binding = env1_4;
|
||||
if (_isNativeReflectConstruct_120404()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_5(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {GUILD_CREATE: handleGuildCreate_120420, DELETED_ENTITY_IDS: handleDeletedEntityIds};
|
||||
return value;
|
||||
}
|
||||
|
||||
function syncChannels(a0, a1) { // fn#120409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:664, offset: 0x0252ac5c, size: 123 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const keys = defaultImport.keys;
|
||||
const getMutableBasicGuildChannelsForGuild = ChannelStore.getMutableBasicGuildChannelsForGuild;
|
||||
const value2 = Reflect.apply(keys, defaultImport, [Reflect.apply(getMutableBasicGuildChannelsForGuild, ChannelStore,
|
||||
[a0])]);
|
||||
const binding = env2_13;
|
||||
binding.fileOnly('syncChannels', {channelIdsInMemory: value2, channelIdsFromServer: a1});
|
||||
value2.forEach(_fun120410);
|
||||
}
|
||||
|
||||
function syncRoles_120411(a0, a1) { // fn#120411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:989, offset: 0x0252ad36, size: 85 bytes, params: 3, frame: 15
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const keys = defaultImport.keys;
|
||||
const getUnsafeMutableRoles = GuildRoleStore.getUnsafeMutableRoles;
|
||||
Reflect.apply(keys, defaultImport, [Reflect.apply(getUnsafeMutableRoles, GuildRoleStore, [a0])]).forEach(_fun120412);
|
||||
}
|
||||
|
||||
function syncEmojis_120413(a0, a1) { // fn#120413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1192, offset: 0x0252ade0, size: 116 bytes, params: 3, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a1;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const guildEmoji = EmojiStore.getGuildEmoji(a0);
|
||||
const value3 = guildEmoji.filter(function(a0) {
|
||||
return require.has(a0.id);
|
||||
});
|
||||
if (guildEmoji.length !== value3.length) {
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'GUILD_EMOJIS_UPDATE', guildId: a0, emojis: value3});
|
||||
}
|
||||
}
|
||||
|
||||
function syncStickers_120415(a0, a1) { // fn#120415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1408, offset: 0x0252ae54, size: 126 bytes, params: 3, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a1;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const r1 = StickersStore.getStickersByGuildId(a0) ?? [];
|
||||
const value3 = r1.filter(function(a0) {
|
||||
return require.has(a0.id);
|
||||
});
|
||||
if (r1.length !== value3.length) {
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'GUILD_STICKERS_UPDATE', guildId: a0, stickers: value3});
|
||||
}
|
||||
}
|
||||
|
||||
function computeHashAndFetchDeletedIds(a0) { // fn#120423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1895, offset: 0x0252afc5, size: 308 bytes, params: 2, frame: 25
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
const value3 = undefined;
|
||||
env2_13.fileOnly('requesting deleted guild entities (id: ' + a0 + ', name: ' + (guild == null ? value3 : guild.name) + ')');
|
||||
const computeHashBinding = computeHash;
|
||||
const Object = global.Object;
|
||||
const keys = Object.keys;
|
||||
const getMutableBasicGuildChannelsForGuild = ChannelStore.getMutableBasicGuildChannelsForGuild;
|
||||
const hash = computeHashBinding(Reflect.apply(keys, Object, [Reflect.apply(getMutableBasicGuildChannelsForGuild,
|
||||
ChannelStore, [a0])]));
|
||||
const sortedRoles = GuildRoleStore.getSortedRoles(a0);
|
||||
const hash2 = computeHashBinding(sortedRoles.map(function(a0) {
|
||||
return a0.id;
|
||||
}));
|
||||
const guildEmoji = EmojiStore.getGuildEmoji(a0);
|
||||
const hash3 = computeHashBinding(guildEmoji.map(function(a0) {
|
||||
return a0.id;
|
||||
}));
|
||||
const stickersByGuildId = StickersStore.getStickersByGuildId(a0);
|
||||
let r2 = stickersByGuildId == null ? value3 : stickersByGuildId.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
r2 = r2 ?? [];
|
||||
GatewayConnectionStore.getSocket().getDeletedEntityIdsNotMatchingHash(a0, hash, hash2, hash3,
|
||||
computeHashBinding(r2));
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun120410(a0) { // fn#120410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:838, offset: 0x0252acd7, size: 95 bytes, params: 2, frame: 15
|
||||
var value2;
|
||||
if (!require.has(a0)) {
|
||||
value2 = environment.__proto__.__proto__.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_DELETE',
|
||||
channel: {guild_id: env0_0, id: a0, parent_id: undefined}});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120412(a0) { // fn#120412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15903:1064, offset: 0x0252ad8b, size: 85 bytes, params: 2, frame: 14
|
||||
var value2;
|
||||
var defaultImport;
|
||||
if (!require.has(a0)) {
|
||||
value2 = environment.__proto__.__proto__.__proto__;
|
||||
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
defaultImport.dispatch({type: 'GUILD_ROLE_DELETE', guildId: env0_0, roleId: a0});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 12525; source: modules/gateway/GatewayCapabilities.tsx; dependencies: [2] */
|
||||
function _fun95444(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12715:6, offset: 0x021468b8, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayCapabilities.tsx');
|
||||
exports.getClientCapabilities = function(a0) {
|
||||
return a0.useChannelObfuscation ? 1767423 : 1734655;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,585 @@
|
||||
/* Metro module 12505; source: modules/gateway/GatewayCompressionHandler.tsx; dependencies: [15, 17, 18, 6, 7, 27, 12506, 12508, 3, 477, 12507, 4664, 2] */
|
||||
function _fun95279(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:6, offset: 0x02137e2d, size: 381 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_95282 = 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(15) /* metro dependency 15 */;
|
||||
const env0_4 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_5 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_8 = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
items = [];
|
||||
let value = _fun95287();
|
||||
items.push(_fun95293(value));
|
||||
items.push(_fun95300(value));
|
||||
items.push(_fun95308(value));
|
||||
items.push(_fun95315(value));
|
||||
value = _fun95323(value);
|
||||
items.push(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayCompressionHandler.tsx');
|
||||
exports.getCompressionHandler = getCompressionHandler;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_95280(a0, a1) { // fn#95280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:162, offset: 0x02137faa, 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 _fun95281;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_95282(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_95282(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_95282(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun95281;
|
||||
}
|
||||
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_95284() { // fn#95284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:1203, offset: 0x0213811e, 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_95284_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun95287() { // fn#95287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:1432, offset: 0x02138180, size: 145 bytes, params: 1, frame: 16
|
||||
return env0_7(BaseGatewayCompressionHandler, [{key: 'bindWebSocket', value: function() {
|
||||
}}, {key: 'feed', value: function() {
|
||||
}}, {key: 'dataReady', value: function(a0) {
|
||||
this._onDataReady = a0;
|
||||
}}], [{key: 'canUse', value: function() {
|
||||
return false;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun95293(a0) { // fn#95293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:1769, offset: 0x0213824d, size: 181 bytes, params: 2, frame: 17
|
||||
const closure = DesktopZstdGatewayCompressionHandler;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getAlgorithm', value: function() {
|
||||
return 'zstd-stream';
|
||||
}}, {key: 'usesLegacyCompression', value: function() {
|
||||
return false;
|
||||
}}, {key: 'feed', value: value_95297}, {key: 'close', value: function() {
|
||||
}}], [{key: 'canUse', value: function() {
|
||||
return false;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun95300(a0) { // fn#95300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:2745, offset: 0x02138463, size: 208 bytes, params: 2, frame: 17
|
||||
const closure = PakoStreamGatewayCompressionHandler;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getAlgorithm', value: function() {
|
||||
return 'zlib-stream';
|
||||
}}, {key: 'usesLegacyCompression', value: function() {
|
||||
return false;
|
||||
}}, {key: 'feed', value: value_95304}, {key: 'close', value: function() {
|
||||
if (this._inflate != null) {
|
||||
this._inflate.onEnd = null;
|
||||
this._inflate.chunks = [];
|
||||
}
|
||||
this._inflate = null;
|
||||
}}, {key: 'handleFlushEnd', value: value_95306}], [{key: 'canUse', value: function() {
|
||||
return false;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun95308(a0) { // fn#95308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:4514, offset: 0x02138902, size: 181 bytes, params: 2, frame: 17
|
||||
const closure = PakoGatewayCompressionHandler;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getAlgorithm', value: function() {
|
||||
return null;
|
||||
}}, {key: 'usesLegacyCompression', value: function() {
|
||||
return true;
|
||||
}}, {key: 'feed', value: value_95312}, {key: 'close', value: function() {
|
||||
}}], [{key: 'canUse', value: function() {
|
||||
return false;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun95315(a0) { // fn#95315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:5237, offset: 0x02138a91, size: 208 bytes, params: 2, frame: 17
|
||||
const closure = MobileGatewayCompressionHandler;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'bindWebSocket', value: value_95317}, {key: 'getAlgorithm', value: value_95318},
|
||||
{key: 'usesLegacyCompression', value: function() {
|
||||
return false;
|
||||
}}, {key: 'feed', value: function(a0) {
|
||||
if (this._onDataReady == null) {
|
||||
throw new global.Error('Cannot feed unless a data ready callback is registered.');
|
||||
}
|
||||
if (a0 !== null) {
|
||||
this._onDataReady(a0);
|
||||
}
|
||||
}}, {key: 'close', value: value_95321}], [{key: 'canUse', value: value_95322}]);
|
||||
}
|
||||
|
||||
function _fun95323(a0) { // fn#95323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:6621, offset: 0x02138e40, size: 181 bytes, params: 2, frame: 17
|
||||
const closure = NullGatewayCompressionHandler;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getAlgorithm', value: function() {
|
||||
return null;
|
||||
}}, {key: 'usesLegacyCompression', value: function() {
|
||||
return false;
|
||||
}}, {key: 'feed', value: function(a0) {
|
||||
if (this._onDataReady == null) {
|
||||
throw new global.Error('Cannot feed unless a data ready callback is registered.');
|
||||
}
|
||||
this._onDataReady(a0);
|
||||
}}, {key: 'close', value: function() {
|
||||
}}], [{key: 'canUse', value: function() {
|
||||
return true;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function getCompressionHandler(a0) { // fn#95330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:7313, offset: 0x02138f64, size: 195 bytes, params: 2, frame: 16
|
||||
var value4;
|
||||
var canUse;
|
||||
var value5;
|
||||
var binding;
|
||||
var binding2;
|
||||
var binding3;
|
||||
let value = environment;
|
||||
const ProcessArgs = (require(4664) /* metro dependency 4664: ProcessArgs */).ProcessArgs;
|
||||
if (ProcessArgs.isDiscordGatewayPlaintextSet()) {
|
||||
binding = env0_10;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
binding3 = new binding(a0);
|
||||
return binding3 instanceof Object ? binding3 : value;
|
||||
}
|
||||
const value2 = _createForOfIteratorHelperLoose_95280(env0_9);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (done) {
|
||||
binding = env0_10;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
binding2 = new binding(a0);
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
let r4 = value3;
|
||||
loopExit2: while (true) {
|
||||
value4 = r4.value;
|
||||
canUse = value4.canUse;
|
||||
if (Reflect.apply(canUse, value4, [])) {
|
||||
break loopExit2;
|
||||
}
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
binding = env0_10;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
binding2 = new binding(a0);
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
r4 = value5;
|
||||
continue;
|
||||
}
|
||||
value = Object.create(value4.prototype, {constructor: {value: value4}});
|
||||
const value6 = new value4(a0);
|
||||
return value6 instanceof Object ? value6 : value;
|
||||
}
|
||||
|
||||
function BaseGatewayCompressionHandler(a0) { // fn#95288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:1453, offset: 0x02138211, size: 44 bytes, params: 2, frame: 13
|
||||
env1_6(this, BaseGatewayCompressionHandler);
|
||||
this._onDataReady = null;
|
||||
this._gatewayEncoding = a0;
|
||||
}
|
||||
|
||||
function DesktopZstdGatewayCompressionHandler(a0) { // fn#95294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:1781, offset: 0x02138302, size: 160 bytes, params: 2, frame: 17
|
||||
var TextDecoder;
|
||||
var value4;
|
||||
var textDecoder;
|
||||
const value = environment.__proto__;
|
||||
env1_6(this, DesktopZstdGatewayCompressionHandler);
|
||||
const value3 = _callSuper_95283(this, DesktopZstdGatewayCompressionHandler, [a0]);
|
||||
value3._decoder = null;
|
||||
const _gatewayEncoding = value3._gatewayEncoding;
|
||||
if (_gatewayEncoding.wantsString()) {
|
||||
TextDecoder = global.TextDecoder;
|
||||
value4 = Object.create(TextDecoder.prototype, {constructor: {value: TextDecoder}});
|
||||
textDecoder = new TextDecoder('utf-8');
|
||||
value3._decoder = textDecoder instanceof Object ? textDecoder : value4;
|
||||
} else {
|
||||
value3._decoder = null;
|
||||
}
|
||||
value3._stream = (require(12506) /* metro dependency 12506: GatewayZstdUtilsNative */).createZstdContextWeb();
|
||||
return value3;
|
||||
}
|
||||
|
||||
function value_95297(a0) { // fn#95297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:2316, offset: 0x021383aa, size: 185 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var value;
|
||||
if (this._stream == null) {
|
||||
throw new global.Error('Trying to decompress with zstd but did not initialize with it');
|
||||
}
|
||||
const ArrayBuffer = global.ArrayBuffer;
|
||||
if (a0 instanceof ArrayBuffer) {
|
||||
value = this._stream.decompress(a0);
|
||||
if (this._decoder == null) {
|
||||
r1 = value;
|
||||
} else {
|
||||
value = this._decoder.decode(value);
|
||||
r1 = value;
|
||||
}
|
||||
if (this._onDataReady != null) {
|
||||
this._onDataReady(r1);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('Expected array buffer, but got ' + typeof a0);
|
||||
}
|
||||
|
||||
function PakoStreamGatewayCompressionHandler(a0) { // fn#95301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:2757, offset: 0x02138533, size: 218 bytes, params: 2, frame: 17
|
||||
var object2;
|
||||
const value = environment.__proto__;
|
||||
env1_6(this, PakoStreamGatewayCompressionHandler);
|
||||
const value3 = _callSuper_95283(this, PakoStreamGatewayCompressionHandler, [a0]);
|
||||
value3._pako = require(12508) /* metro dependency 12508 */;
|
||||
value3._usesZstd = false;
|
||||
value3._zstdDecoder = null;
|
||||
value3._zstdStream = null;
|
||||
const Inflate = value3._pako.Inflate;
|
||||
object2 = {chunkSize: 65536};
|
||||
object2.to = value3._gatewayEncoding.wantsString() ? 'string' : '';
|
||||
value3._inflate = new Inflate(object2);
|
||||
value3._inflate.onEnd = value3.handleFlushEnd.bind(value3);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function value_95304(a0) { // fn#95304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:3355, offset: 0x02138615, size: 283 bytes, params: 2, frame: 16
|
||||
var r5;
|
||||
var dataView;
|
||||
var value3;
|
||||
var push;
|
||||
let _inflate = this._inflate;
|
||||
if (_inflate == null) {
|
||||
throw new global.Error('Trying to feed to closed compression adapter');
|
||||
}
|
||||
if (this._onDataReady === null) {
|
||||
throw new global.Error('Cannot feed unless a data ready callback is registered.');
|
||||
}
|
||||
const ArrayBuffer = global.ArrayBuffer;
|
||||
if (a0 instanceof ArrayBuffer) {
|
||||
dataView = new global.DataView(a0);
|
||||
value3 = dataView.byteLength >= 4;
|
||||
if (value3) {
|
||||
dataView = dataView.getUint32(dataView.byteLength - 4, false);
|
||||
dataView = dataView === 65535;
|
||||
r5 = dataView;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
_inflate = this._inflate;
|
||||
push = _inflate.push;
|
||||
dataView = !!r5;
|
||||
Reflect.apply(push, _inflate, [a0, r5 ? this._pako.Z_SYNC_FLUSH : dataView]);
|
||||
return undefined;
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('Expected array buffer, but got ' + typeof a0);
|
||||
}
|
||||
|
||||
function value_95306(a0) { // fn#95306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:3932, offset: 0x02138765, size: 413 bytes, params: 2, frame: 23
|
||||
var r9;
|
||||
var r10;
|
||||
var r11;
|
||||
var r8;
|
||||
var r2;
|
||||
var value;
|
||||
var chunks;
|
||||
var length;
|
||||
var property;
|
||||
var length2;
|
||||
var value3;
|
||||
var value4;
|
||||
var uint8Array;
|
||||
var set;
|
||||
var length3;
|
||||
var value7;
|
||||
var _onDataReady;
|
||||
var Error;
|
||||
const _pako = this._pako;
|
||||
const _inflate = this._inflate;
|
||||
if (_inflate != null) {
|
||||
if (a0 !== _pako.Z_OK) {
|
||||
Error = global.Error;
|
||||
value = 'zlib error, ' + a0 + ', ' + _inflate.strm.msg;
|
||||
throw new Error();
|
||||
}
|
||||
chunks = _inflate.chunks;
|
||||
length = chunks.length;
|
||||
value = this._gatewayEncoding.wantsString();
|
||||
if (value) {
|
||||
r2 = length > 1 ? chunks.join('') : chunks[0];
|
||||
} else if (length > 1) {
|
||||
value = 0;
|
||||
if (value < length) {
|
||||
r9 = value;
|
||||
r10 = value;
|
||||
reducibleLoop7: while (true) {
|
||||
length2 = chunks[r9].length;
|
||||
value3 = r10 + length2;
|
||||
value4 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
|
||||
if (value4 < length) {
|
||||
r9 = value4;
|
||||
r10 = value3;
|
||||
continue reducibleLoop7;
|
||||
}
|
||||
r11 = value3;
|
||||
break reducibleLoop7;
|
||||
}
|
||||
} else {
|
||||
r11 = value;
|
||||
}
|
||||
uint8Array = new global.Uint8Array();
|
||||
if (value < length) {
|
||||
r8 = value;
|
||||
r9 = value;
|
||||
reducibleLoop9: while (true) {
|
||||
property = chunks[r8];
|
||||
set = uint8Array.set;
|
||||
Reflect.apply(set, uint8Array, [property, r9]);
|
||||
length3 = property.length;
|
||||
value = r9 + length3;
|
||||
value7 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
|
||||
if (value7 < length) {
|
||||
r8 = value7;
|
||||
r9 = value;
|
||||
continue reducibleLoop9;
|
||||
}
|
||||
r2 = uint8Array;
|
||||
break reducibleLoop9;
|
||||
}
|
||||
} else {
|
||||
r2 = uint8Array;
|
||||
}
|
||||
} else {
|
||||
r2 = chunks[0];
|
||||
}
|
||||
chunks.length = 0;
|
||||
_onDataReady = this._onDataReady;
|
||||
reducibleJoin16: while (true) {
|
||||
if (_onDataReady == null) {
|
||||
break reducibleJoin16;
|
||||
}
|
||||
_onDataReady = this._onDataReady;
|
||||
Reflect.apply(_onDataReady, this, [r2]);
|
||||
break reducibleJoin16;
|
||||
}
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('GatewayCompressionHandler');
|
||||
value.error('flush end happened on closed compression adapter');
|
||||
}
|
||||
}
|
||||
|
||||
function PakoGatewayCompressionHandler(a0) { // fn#95309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:4526, offset: 0x021389b7, size: 86 bytes, params: 2, frame: 18
|
||||
let value = copyRestArgs(0, undefined);
|
||||
env1_6(this, PakoGatewayCompressionHandler);
|
||||
const _callSuper_95283Binding = _callSuper_95283;
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, undefined);
|
||||
value = _callSuper_95283Binding(this, PakoGatewayCompressionHandler, items2);
|
||||
value._pako = require(12508) /* metro dependency 12508 */;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_95312(a0) { // fn#95312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:4898, offset: 0x02138a0d, size: 132 bytes, params: 2, frame: 17
|
||||
var r2;
|
||||
let value = a0;
|
||||
const _pako = this._pako;
|
||||
const ArrayBuffer = global.ArrayBuffer;
|
||||
if (value instanceof ArrayBuffer && this._gatewayEncoding.wantsString()) {
|
||||
value = _pako.inflate(value, {to: 'string'});
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
if (this._onDataReady == null) {
|
||||
throw new global.Error('Cannot feed unless a data ready callback is registered.');
|
||||
}
|
||||
this._onDataReady(r2);
|
||||
}
|
||||
|
||||
function MobileGatewayCompressionHandler(a0) { // fn#95316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:5249, offset: 0x02138b61, size: 57 bytes, params: 2, frame: 16
|
||||
let value = environment.__proto__;
|
||||
env1_6(this, MobileGatewayCompressionHandler);
|
||||
value = _callSuper_95283(this, MobileGatewayCompressionHandler, [a0]);
|
||||
value._socketId = null;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_95317({_socketId}) { // fn#95317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:5526, offset: 0x02138b9a, size: 313 bytes, params: 2, frame: 16
|
||||
var DCDCompressionManager;
|
||||
const property = (require(12507) /* metro dependency 12507: NativeCompressionModule */).default;
|
||||
this.close();
|
||||
this._socketId = _socketId;
|
||||
const value2 = (require(12506) /* metro dependency 12506: GatewayZstdUtilsNative */).supportsZstd();
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
if (value2) {
|
||||
if (isAndroid2) {
|
||||
if (property != null) {
|
||||
property.enableZstdStreamSupport(this._socketId);
|
||||
}
|
||||
} else {
|
||||
DCDCompressionManager = NativeModules.DCDCompressionManager;
|
||||
DCDCompressionManager.enableZstdStreamSupport(this._socketId, 0);
|
||||
}
|
||||
} else if (isAndroid2) {
|
||||
if (property != null) {
|
||||
property.enableZlibStreamSupport(this._socketId);
|
||||
}
|
||||
} else {
|
||||
DCDCompressionManager = NativeModules.DCDCompressionManager;
|
||||
DCDCompressionManager.enableZlibStreamSupport(this._socketId);
|
||||
}
|
||||
}
|
||||
|
||||
function value_95318() { // fn#95318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:5968, offset: 0x02138cd3, size: 52 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(12506) /* metro dependency 12506: GatewayZstdUtilsNative */;
|
||||
value = value.supportsZstd();
|
||||
return value ? 'zstd-stream' : 'zlib-stream';
|
||||
}
|
||||
|
||||
function value_95321() { // fn#95321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:6281, offset: 0x02138d50, size: 151 bytes, params: 1, frame: 15
|
||||
var value;
|
||||
var moduleValue;
|
||||
const _socketId = this._socketId;
|
||||
this._socketId = null;
|
||||
if (_socketId !== null) {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isAndroid()) {
|
||||
if ((require(12507) /* metro dependency 12507: NativeCompressionModule */).default != null) {
|
||||
(require(12507) /* metro dependency 12507: NativeCompressionModule */).default.disableZlibStreamSupport(_socketId);
|
||||
}
|
||||
} else {
|
||||
NativeModules.DCDCompressionManager.disableZlibStreamSupport(_socketId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_95322() { // fn#95322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:6513, offset: 0x02138de7, size: 89 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
return platformUtilsModule.isAndroid() ? (require(12507) /* metro dependency 12507: NativeCompressionModule */).default != null : NativeModules.DCDCompressionManager != null;
|
||||
}
|
||||
|
||||
function NullGatewayCompressionHandler() { // fn#95324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12695:6633, offset: 0x02138ef5, size: 42 bytes, params: 1, frame: 16
|
||||
env1_6(this, NullGatewayCompressionHandler);
|
||||
return _callSuper_95283(this, NullGatewayCompressionHandler, arguments);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,549 @@
|
||||
/* Metro module 4257; source: modules/gateway/GatewayConnectionStore.tsx; dependencies: [6, 7, 15, 17, 18, 5, 1348, 1226, 4258, 1379, 4259, 4294, 4402, 1934, 6876, 4395, 661, 670, 12490, 12532, 3, 587, 6944, 4796, 477, 12524, 22, 4285, 12503, 566, 694, 2] */
|
||||
function _fun35388(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:6, offset: 0x01071406, size: 985 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = function() {
|
||||
require(dependencyMap[18]).localVoiceState.update();
|
||||
};
|
||||
const handleMediaEngineChange = function() {
|
||||
require(dependencyMap[18]).localVoiceState.update();
|
||||
return false;
|
||||
};
|
||||
const handleLocalPresenceChange = function() {
|
||||
require(dependencyMap[18]).localPresenceState.update();
|
||||
return false;
|
||||
};
|
||||
const deleteStream = function(a0) {
|
||||
var socket = require(dependencyMap[18]).socket;
|
||||
if (socket.isSessionEstablished()) {
|
||||
socket.streamDelete(a0);
|
||||
}
|
||||
};
|
||||
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 */;
|
||||
const env0_9 = importDefault(5) /* metro dependency 5 */;
|
||||
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const rtcRegionStore = importDefault(4402) /* metro dependency 4402: RTCRegionStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
||||
const streamRTCConnectionStore = importDefault(4395) /* metro dependency 4395: StreamRTCConnectionStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_20 = value.RTCConnectionStates;
|
||||
const env0_21 = value.AppStates;
|
||||
const env0_22 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
|
||||
const env0_23 = global.window.DiscordNative;
|
||||
(require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket.dispatcher.getDispatchHandler = importDefault(12532) /* metro dependency 12532: dispatchSocketMessage */;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('ConnectionStore');
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun35404(Store).displayName = 'GatewayConnectionStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {START_SESSION: START_SESSION,
|
||||
LOGIN_SUCCESS: LOGIN_SUCCESS_35413, LOGOUT: LOGOUT_35414, CLEAR_CACHES: CLEAR_CACHES,
|
||||
CONNECTION_OPEN: function(a0) {
|
||||
_fun35417(a0);
|
||||
}, CONNECTION_RESUMED: function() {
|
||||
env0_29 = null;
|
||||
}, CONNECTION_CLOSED: CONNECTION_CLOSED_35419, RTC_CONNECTION_STATE: RTC_CONNECTION_STATE,
|
||||
VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_35421, VOICE_STATE_UPDATES: function({voiceStates}) {
|
||||
return voiceStates.reduce(_fun35423, false);
|
||||
}, GUILD_DELETE: function(a0) {
|
||||
if (a0.guild.id === require(dependencyMap[18]).localVoiceState.guildId) {
|
||||
require(dependencyMap[18]).localVoiceState.setState({'guildId': null, 'channelId': null});
|
||||
}
|
||||
}, CHANNEL_DELETE: function(a0) {
|
||||
if (a0.channel.id === require(dependencyMap[18]).localVoiceState.channelId) {
|
||||
require(dependencyMap[18]).localVoiceState.setState({'guildId': null, 'channelId': null});
|
||||
}
|
||||
}, CALL_DELETE: CALL_DELETE, APP_STATE_UPDATE: APP_STATE_UPDATE, GUILD_MEMBERS_REQUEST: GUILD_MEMBERS_REQUEST,
|
||||
GUILD_SEARCH_RECENT_MEMBERS: function({guildId, query, continuationToken}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
require(dependencyMap[18]).socket.searchRecentMembers(guildId, {query: query,
|
||||
continuationToken: continuationToken});
|
||||
}
|
||||
}, GUILD_SUBSCRIPTIONS_FLUSH: function({subscriptions}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
require(dependencyMap[18]).socket.updateGuildSubscriptions(subscriptions);
|
||||
}
|
||||
return false;
|
||||
}, CALL_CONNECT: function({channelId}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
require(dependencyMap[18]).socket.callConnect(channelId);
|
||||
}
|
||||
return false;
|
||||
}, CALL_CONNECT_MULTIPLE: function({channelIds}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
channelIds.forEach(_fun35434);
|
||||
}
|
||||
return false;
|
||||
}, STREAM_CREATE: closure, STREAM_START: STREAM_START, STREAM_WATCH: function({streamKey, allowMultiple}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
if (!allowMultiple) {
|
||||
cleanupAllStreamsExceptSelf();
|
||||
}
|
||||
require(dependencyMap[18]).socket.streamWatch(streamKey);
|
||||
}
|
||||
return false;
|
||||
}, STREAM_STOP: function({streamKey}) {
|
||||
deleteStream(streamKey);
|
||||
STREAM_CREATE_35395();
|
||||
return false;
|
||||
}, STREAM_SET_PAUSED: function({streamKey, paused}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
require(dependencyMap[18]).socket.streamSetPaused(streamKey, paused);
|
||||
}
|
||||
}, PUSH_NOTIFICATION_CLICK: function() {
|
||||
require(dependencyMap[18]).socket.expeditedHeartbeat(5000, 'user clicked on notification', true);
|
||||
return false;
|
||||
}, REQUEST_FORUM_UNREADS: function({guildId, channelId, threads}) {
|
||||
require(dependencyMap[18]).socket.requestForumUnreads(guildId, channelId, threads);
|
||||
}, REQUEST_SOUNDBOARD_SOUNDS: function({guildIds}) {
|
||||
require(dependencyMap[18]).socket.requestSoundboardSounds(guildIds);
|
||||
}, REMOTE_COMMAND: function({sessionId, payload}) {
|
||||
if (require(dependencyMap[18]).socket.isSessionEstablished()) {
|
||||
require(dependencyMap[18]).socket.remoteCommand(sessionId, payload);
|
||||
}
|
||||
return false;
|
||||
}, RESET_SOCKET: function(a0) {
|
||||
if (require(dependencyMap[18]).socket.connectionState !== importDefault(dependencyMap[28]).WILL_RECONNECT) {
|
||||
require(dependencyMap[18]).socket.resetSocketAndClearCacheOnError(a0.args);
|
||||
}
|
||||
}, CLIPS_SETTINGS_UPDATE: closure, RUNNING_GAMES_CHANGE: closure, USER_SETTINGS_PROTO_UPDATE: function(a0) {
|
||||
if (a0.settings.type === UserSettingsTypes.PRELOADED_USER_SETTINGS && a0.settings.proto.clips?.allowVoiceRecording != null) {
|
||||
STREAM_CREATE_35395();
|
||||
}
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayConnectionStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_35389() { // fn#35389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:342, offset: 0x010717df, 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_35389_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _handleConnectionOpen() { // fn#35392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:686, offset: 0x0107183d, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_9(_fun35394).apply(this, arguments);
|
||||
}
|
||||
|
||||
function cleanupAllStreamsExceptSelf() { // fn#35399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:1949, offset: 0x01071bcd, size: 66 bytes, params: 1, frame: 13
|
||||
const env0_0 = getSelfStreamKey();
|
||||
let value = StreamRTCConnectionStore.getAllActiveStreamKeys();
|
||||
value = value.filter(_fun35402);
|
||||
value.forEach(function(a0) {
|
||||
deleteStream(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun35404(a0) { // fn#35404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:2200, offset: 0x01071c88, size: 185 bytes, params: 2, frame: 16
|
||||
const closure = GatewayConnectionStore;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(AuthenticationStore, CallStore, ChannelStore, MediaEngineStore, RTCConnectionStore, RTCRegionStore,
|
||||
SelectedChannelStore, SelfPresenceStore, StreamRTCConnectionStore, UserSettingsProtoStore);
|
||||
this.syncWith([MediaEngineStore], handleMediaEngineChange);
|
||||
this.syncWith([SelfPresenceStore], handleLocalPresenceChange);
|
||||
}}, {key: 'getSocket', value: function() {
|
||||
return require(dependencyMap[18]).socket;
|
||||
}}, {key: 'isTryingToConnect', value: function() {
|
||||
return !require(dependencyMap[18]).socket.isClosed();
|
||||
}}, {key: 'isConnected', value: function() {
|
||||
return require(dependencyMap[18]).socket.isSessionEstablished();
|
||||
}}, {key: 'isConnectedOrOverlay', value: value_35410}, {key: 'lastTimeConnectedChanged', value: value_35411}]);
|
||||
}
|
||||
|
||||
function START_SESSION() { // fn#35412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:3147, offset: 0x01071ed1, size: 115 bytes, params: 1, frame: 15
|
||||
var r0;
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
const isClosed2 = socket.isClosed();
|
||||
const binding = env0_24;
|
||||
const verbose = binding.verbose;
|
||||
if (isClosed2) {
|
||||
Reflect.apply(verbose, binding, ['Socket is reconnecting because of starting new session']);
|
||||
r0 = socket.connect();
|
||||
} else {
|
||||
Reflect.apply(verbose, binding, ['Socket is not reconnecting during a new session because it is not closed']);
|
||||
r0 = false;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function LOGIN_SUCCESS_35413() { // fn#35413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:3413, offset: 0x01071f44, size: 166 bytes, params: 1, frame: 19
|
||||
var r0;
|
||||
const binding = env0_24;
|
||||
const verbose = binding.verbose;
|
||||
const object2 = {};
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
object2.isEstablished = socket.isSessionEstablished();
|
||||
Reflect.apply(verbose, binding, ['session refresh dispatched', object2]);
|
||||
const isSessionEstablished2 = socket.isSessionEstablished();
|
||||
if (isSessionEstablished2) {
|
||||
socket.close();
|
||||
r0 = socket.connect();
|
||||
} else {
|
||||
r0 = !!isSessionEstablished2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function LOGOUT_35414(a0) { // fn#35414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:3649, offset: 0x01071fea, size: 119 bytes, params: 2, frame: 12
|
||||
if (a0.isSwitchingAccount) {
|
||||
(require(12490) /* metro dependency 12490: GatewaySocketSingleton */).localPresenceState.handleAccountSwitch();
|
||||
}
|
||||
env0_24.verbose('Closing socket because of logout');
|
||||
(require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket.close();
|
||||
}
|
||||
|
||||
function CLEAR_CACHES(a0) { // fn#35415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:3830, offset: 0x01072061, size: 113 bytes, params: 2, frame: 14
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
if (a0.resetSocket) {
|
||||
socket.close();
|
||||
socket.dispatcher.clear();
|
||||
socket.connect();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_35416(a0) { // fn#35416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:3989, offset: 0x010720d2, size: 22 bytes, params: 2, frame: 11
|
||||
(function() {
|
||||
return _handleConnectionOpen.apply(this, arguments);
|
||||
})(a0);
|
||||
}
|
||||
|
||||
function CONNECTION_CLOSED_35419() { // fn#35419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:4162, offset: 0x01072113, size: 49 bytes, params: 1, frame: 12
|
||||
env0_24.verbose('connection closed dispatched');
|
||||
const Date = global.Date;
|
||||
env0_25 = Date.now();
|
||||
}
|
||||
|
||||
function RTC_CONNECTION_STATE(a0) { // fn#35420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:4273, offset: 0x01072144, size: 143 bytes, params: 2, frame: 13
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
const state = a0.state;
|
||||
const DISCONNECTED = RTCConnectionStates.DISCONNECTED;
|
||||
if (state !== DISCONNECTED) {
|
||||
return false;
|
||||
}
|
||||
if (a0.willReconnect) {
|
||||
if (a0.streamKey != null) {
|
||||
socket.streamPing(a0.streamKey);
|
||||
} else {
|
||||
socket.voiceServerPing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VOICE_CHANNEL_SELECT_35421(a0) { // fn#35421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:4480, offset: 0x010721d3, size: 307 bytes, params: 2, frame: 16
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
const localVoiceState = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).localVoiceState;
|
||||
const update = localVoiceState.update;
|
||||
let channelId = a0.channelId;
|
||||
Reflect.apply(update, localVoiceState, [{guildId: a0.guildId, channelId: channelId}]);
|
||||
const lockVoiceStateForResume = a0.lockVoiceStateForResume;
|
||||
const value2 = null;
|
||||
if (lockVoiceStateForResume) {
|
||||
channelId = a0.channelId;
|
||||
channelId = value2 != channelId ? a0.channelId : value2;
|
||||
}
|
||||
if ((require(477) /* metro dependency 477: PlatformUtils */).isIOS() && env0_28 === AppStates.BACKGROUND) {
|
||||
if (value2 == a0.channelId) {
|
||||
socket.close(true);
|
||||
} else if (socket.isClosed()) {
|
||||
(importAll(12524) /* metro dependency 12524: PauseGatewaySocket */).setIsPaused(false);
|
||||
socket.connect();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function VOICE_STATE_UPDATES_35422({voiceStates}) { // fn#35422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:4850, offset: 0x01072306, size: 32 bytes, params: 2, frame: 13
|
||||
return voiceStates.reduce(_fun35423, false);
|
||||
}
|
||||
|
||||
function CALL_DELETE({channelId}) { // fn#35426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:5632, offset: 0x010724ea, size: 110 bytes, params: 2, frame: 14
|
||||
const localVoiceState = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).localVoiceState;
|
||||
if (channelId === localVoiceState.channelId) {
|
||||
if (env0_29 === channelId) {
|
||||
return false;
|
||||
}
|
||||
localVoiceState.setState({'guildId': null, 'channelId': null});
|
||||
}
|
||||
}
|
||||
|
||||
function APP_STATE_UPDATE(a0) { // fn#35427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:5818, offset: 0x01072558, size: 462 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var state;
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
if (AuthenticationStore.isAuthenticated()) {
|
||||
if (env0_28 !== AppStates.INACTIVE) {
|
||||
r2 = env0_28 === AppStates.BACKGROUND && a0.state === AppStates.ACTIVE;
|
||||
r2 = r2 && socket.isClosed();
|
||||
if (r2) {
|
||||
(importAll(12524) /* metro dependency 12524: PauseGatewaySocket */).setIsPaused(false);
|
||||
socket.connect();
|
||||
}
|
||||
} else if (a0.state !== AppStates.BACKGROUND) {
|
||||
r2 = env0_28 === AppStates.BACKGROUND && a0.state === AppStates.ACTIVE;
|
||||
r2 = r2 && socket.isClosed();
|
||||
if (r2) {
|
||||
(importAll(12524) /* metro dependency 12524: PauseGatewaySocket */).setIsPaused(false);
|
||||
socket.connect();
|
||||
}
|
||||
} else if ((require(12490) /* metro dependency 12490: GatewaySocketSingleton */).localVoiceState.channelId == null) {
|
||||
socket.close(true);
|
||||
} else {
|
||||
r2 = env0_28 === AppStates.BACKGROUND && a0.state === AppStates.ACTIVE;
|
||||
r2 = r2 && socket.isClosed();
|
||||
if (r2) {
|
||||
(importAll(12524) /* metro dependency 12524: PauseGatewaySocket */).setIsPaused(false);
|
||||
socket.connect();
|
||||
}
|
||||
}
|
||||
}
|
||||
state = a0.state;
|
||||
} else if (a0.state === AppStates.ACTIVE) {
|
||||
(importAll(12524) /* metro dependency 12524: PauseGatewaySocket */).setIsPaused(false);
|
||||
if (AuthenticationStore.isAuthenticated()) {
|
||||
socket.resetBackoff('App state is active');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function GUILD_MEMBERS_REQUEST(a0) { // fn#35428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:6273, offset: 0x01072726, size: 213 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
if (socket.isSessionEstablished()) {
|
||||
if ('userIds' in a0) {
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value(a0.userIds);
|
||||
value = value.chunk(100);
|
||||
value.forEach(_fun35429);
|
||||
} else {
|
||||
socket.requestGuildMembers(a0.guildIds, {query: a0.query, limit: a0.limit, presences: !!a0.presences});
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function CALL_CONNECT_MULTIPLE({channelIds}) { // fn#35433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:7168, offset: 0x01072978, size: 74 bytes, params: 2, frame: 12
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
if (socket.isSessionEstablished()) {
|
||||
channelIds.forEach(function(a0) {
|
||||
require(dependencyMap[18]).socket.callConnect(a0);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function STREAM_START({streamType, guildId, channelId}) { // fn#35435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:7363, offset: 0x010729f1, size: 208 bytes, params: 2, frame: 22
|
||||
var r2;
|
||||
var streamCreate;
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
if (socket.isSessionEstablished()) {
|
||||
r2 = guildId != null ? ChannelStore.getChannel(channelId)?.rtcRegion : CallStore.getCall(channelId)?.region;
|
||||
streamCreate = socket.streamCreate;
|
||||
r2 = r2 ?? RTCRegionStore.getPreferredRegion();
|
||||
Reflect.apply(streamCreate, socket, [streamType, guildId, channelId, r2]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function* _fun35394({sessionId}) { // fn#35394, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:751, offset: 0x01071876, size: 637 bytes, params: 2, frame: 25
|
||||
var r5;
|
||||
var type;
|
||||
var r7;
|
||||
var performance;
|
||||
var entriesByType;
|
||||
var channel;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const Date = global.Date;
|
||||
value = Date.now();
|
||||
let binding = env2_0;
|
||||
value = undefined;
|
||||
binding(env2_3[18]).localPresenceState.handleConnectionOpen();
|
||||
let object2 = {};
|
||||
const voiceChannelId = env2_17.getVoiceChannelId();
|
||||
if (voiceChannelId == null) {
|
||||
env2_0(env2_3[18]).localVoiceState.update(object2, true);
|
||||
env2_27 = false;
|
||||
} else {
|
||||
var Storage = env2_0(env2_3[21]).Storage;
|
||||
var value6 = Storage.get('discord_watchdog_restart_timestamp');
|
||||
r5 = value6 != null && global.Date.now() - global.parseInt(value6, 10) < 60000;
|
||||
Storage = env2_0(env2_3[21]).Storage;
|
||||
Storage.remove('discord_watchdog_restart_timestamp');
|
||||
var window = global.window;
|
||||
if (window == null) {
|
||||
type = value;
|
||||
} else {
|
||||
performance = window.performance;
|
||||
if (performance == null) {
|
||||
type = value;
|
||||
} else if (performance.getEntriesByType == null) {
|
||||
type = value;
|
||||
} else {
|
||||
entriesByType = performance.getEntriesByType('navigation');
|
||||
type = entriesByType == null || entriesByType[0] == null ? value : entriesByType[0].type;
|
||||
}
|
||||
}
|
||||
if (type === 'reload') {
|
||||
binding = env2_13;
|
||||
channel = binding.getChannel(voiceChannelId);
|
||||
if (channel == null) {
|
||||
r7 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.guildId = channel.getGuildId();
|
||||
object2.channelId = voiceChannelId;
|
||||
env2_0(env2_3[22]).muteCustomJoinSound(voiceChannelId);
|
||||
r7 = object2;
|
||||
}
|
||||
binding = env2_0;
|
||||
binding(env2_3[18]).localVoiceState.update(r7, true);
|
||||
env2_27 = false;
|
||||
return value;
|
||||
}
|
||||
if (r5) {
|
||||
binding = env2_13;
|
||||
channel = binding.getChannel(voiceChannelId);
|
||||
if (channel == null) {
|
||||
r7 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.guildId = channel.getGuildId();
|
||||
object2.channelId = voiceChannelId;
|
||||
env2_0(env2_3[22]).muteCustomJoinSound(voiceChannelId);
|
||||
r7 = object2;
|
||||
}
|
||||
binding = env2_0;
|
||||
binding(env2_3[18]).localVoiceState.update(r7, true);
|
||||
env2_27 = false;
|
||||
return value;
|
||||
}
|
||||
r5 = env2_23 == null || env2_23.processUtils == null || env2_23.processUtils.getLastCrash == null ? value : env2_23.processUtils.getLastCrash();
|
||||
yield r5;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
if ((null == undefined ? value : undefined.rendererCrashReason) != null) {
|
||||
channel = env2_13.getChannel(voiceChannelId);
|
||||
if (channel == null) {
|
||||
r7 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.guildId = channel.getGuildId();
|
||||
object2.channelId = voiceChannelId;
|
||||
env2_0(env2_3[22]).muteCustomJoinSound(voiceChannelId);
|
||||
r7 = object2;
|
||||
}
|
||||
} else if (env2_27) {
|
||||
binding = env2_15;
|
||||
binding.setLastSessionVoiceChannelId(voiceChannelId ?? null);
|
||||
binding = env2_1;
|
||||
binding(env2_3[23]).selectVoiceChannel(null);
|
||||
r7 = object2;
|
||||
} else {
|
||||
channel = env2_13.getChannel(voiceChannelId);
|
||||
if (channel == null) {
|
||||
r7 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.guildId = channel.getGuildId();
|
||||
object2.channelId = voiceChannelId;
|
||||
env2_0(env2_3[22]).muteCustomJoinSound(voiceChannelId);
|
||||
r7 = object2;
|
||||
}
|
||||
}
|
||||
env2_0(env2_3[18]).localVoiceState.update(r7, true);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function getSelfStreamKey() { // fn#35400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:1994, owner: cleanupAllStreamsExceptSelf.getSelfStreamKey, offset: 0x01071c0f, size: 37 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return StreamRTCConnectionStore.getAllActiveStreamKeys().find(function(a0) {
|
||||
return require(dependencyMap[27]).decodeStreamKey(a0).ownerId === AuthenticationStore.getId();
|
||||
});
|
||||
}
|
||||
|
||||
function GatewayConnectionStore() { // fn#35405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:2212, offset: 0x01071d41, size: 113 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
env1_4(this, GatewayConnectionStore);
|
||||
const value3 = env1_7(GatewayConnectionStore);
|
||||
return env1_6(this, _isNativeReflectConstruct_35389() ? global.Reflect.construct(value3, arguments,
|
||||
env1_7(this).constructor) : value3.apply(this, arguments));
|
||||
}
|
||||
|
||||
function value_35410() { // fn#35410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:2930, offset: 0x01071ea1, size: 48 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket.isSessionEstablished() || false;
|
||||
}
|
||||
|
||||
function _fun35423(a0, a1) { // fn#35423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:4917, offset: 0x01072326, size: 246 bytes, params: 3, frame: 17
|
||||
const localVoiceState = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).localVoiceState;
|
||||
const id = AuthenticationStore.getId();
|
||||
const userId = a1.userId;
|
||||
if (id !== userId) {
|
||||
return a0;
|
||||
}
|
||||
if (a1.sessionId === env1_26) {
|
||||
if (env1_29 != null) {
|
||||
env1_24.verbose('Ignoring voice state for own session due to VSU lock on channel:', env1_29);
|
||||
return a0;
|
||||
}
|
||||
localVoiceState.setState({guildId: a1.guildId, channelId: a1.channelId});
|
||||
} else {
|
||||
if (a1.guildId !== localVoiceState.guildId) {
|
||||
return a0;
|
||||
}
|
||||
localVoiceState.setState({'guildId': null, 'channelId': null});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun35429(a0) { // fn#35429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4429:6413, offset: 0x010727fb, size: 85 bytes, params: 2, frame: 16
|
||||
const socket = (require(12490) /* metro dependency 12490: GatewaySocketSingleton */).socket;
|
||||
const requestGuildMembers = socket.requestGuildMembers;
|
||||
const binding = env0_0;
|
||||
Reflect.apply(requestGuildMembers, socket, [binding.guildIds, {userIds: a0, presences: !!binding.presences}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 12492; source: modules/gateway/GatewayEncoding.tsx; dependencies: [6, 7, 12493, 4664, 2] */
|
||||
function _fun95136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12682:6, offset: 0x0213328c, size: 192 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 */;
|
||||
let value = require(12493) /* metro dependency 12493: GatewayEncodingErlpackEncodingNative */;
|
||||
value = value.getErlpackEncoding();
|
||||
const value2 = _fun95137();
|
||||
let r1 = value === undefined ? value2 : value;
|
||||
const ProcessArgs = (require(4664) /* metro dependency 4664: ProcessArgs */).ProcessArgs;
|
||||
r1 = ProcessArgs.isDiscordGatewayPlaintextSet() ? value2 : r1;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayEncoding.tsx');
|
||||
exports.default = r1;
|
||||
}
|
||||
|
||||
function _fun95137() { // fn#95137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12682:149, offset: 0x0213334c, size: 134 bytes, params: 1, frame: 15
|
||||
return env0_1(JSONEncoding, [{key: 'pack', value: function(a0) {
|
||||
var JSON = global.JSON;
|
||||
return JSON.stringify(a0);
|
||||
}}, {key: 'unpack', value: function(a0) {
|
||||
var property;
|
||||
var value2;
|
||||
var value = typeof a0;
|
||||
if (value !== 'string') {
|
||||
property = global.Error;
|
||||
value2 = null;
|
||||
value = 'Expected a string to be passed to JSONEncoding.unpack, got ' + (value2 == a0 ? value2 : value);
|
||||
value = new property(value);
|
||||
throw value;
|
||||
}
|
||||
return global.JSON.parse(a0);
|
||||
}}, {key: 'getName', value: function() {
|
||||
return 'json';
|
||||
}}, {key: 'wantsString', value: function() {
|
||||
return true;
|
||||
}}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 12493; source: modules/gateway/GatewayEncodingErlpackEncoding.native.tsx; dependencies: [2] */
|
||||
function _fun95143(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12683:6, offset: 0x0213343b, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayEncodingErlpackEncoding.native.tsx');
|
||||
exports.getErlpackEncoding = function() {
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,561 @@
|
||||
/* Metro module 12502; source: modules/gateway/GatewaySocketAnalytics.tsx; dependencies: [29, 1878, 661, 20, 14, 683, 2] */
|
||||
function _fun95253(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:6, offset: 0x02136c26, size: 304 bytes, params: 8, frame: 19
|
||||
const env0_2 = ['guilds', 'merged_presences', 'merged_members', 'read_state', 'private_channels',
|
||||
'user_guild_settings', 'user_settings', 'user_settings_proto', 'experiments', 'guild_experiments',
|
||||
'relationships', 'users'];
|
||||
const env0_3 = ['features'];
|
||||
const env0_4 = ['threads', 'guild_scheduled_events'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_5 = importDefault(29) /* metro dependency 29 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.AnalyticEvents;
|
||||
const env0_8 = constantsModule.ChannelTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewaySocketAnalytics.tsx');
|
||||
exports.reportDevtoolsEvent = function() {
|
||||
};
|
||||
exports.logReadyPayloadReceived = logReadyPayloadReceived;
|
||||
exports.getConnectionPath = getConnectionPath;
|
||||
exports.getReadyPayloadByteSizeAnalytics = getReadyPayloadByteSizeAnalytics;
|
||||
exports.createResumeAnalytics = function(a0) {
|
||||
var value = a0;
|
||||
var object = {'connectTime': null, 'numEvents': 0, 'largestWaitTime': 0, 'dispatchTime': 0, 'totalWaitTime': 0,
|
||||
'initialWaitTime': 0};
|
||||
object.connectTime = value ?? 0;
|
||||
object.startTime = global.performance.now();
|
||||
object.lastUpdateTime = global.performance.now();
|
||||
return object;
|
||||
};
|
||||
exports.logResumeAnalytics = logResumeAnalytics;
|
||||
}
|
||||
|
||||
function prettyPrintTrace_(a0, a1) { // fn#95254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:424, offset: 0x02136d56, size: 173 bytes, params: 3, frame: 29
|
||||
var r2;
|
||||
var r12;
|
||||
var r0;
|
||||
var property;
|
||||
var micros;
|
||||
var value4;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var value5;
|
||||
var prettyPrintTrace_Binding;
|
||||
var calls;
|
||||
var value6;
|
||||
if (a0 == null) {
|
||||
return '';
|
||||
}
|
||||
let length = a0.length;
|
||||
let value = 0;
|
||||
const value2 = '';
|
||||
if (value < length) {
|
||||
r2 = value2;
|
||||
r12 = value;
|
||||
reducibleLoop2: while (true) {
|
||||
property = a0[r12];
|
||||
value = r12 + 1;
|
||||
micros = a0[value].micros;
|
||||
value4 = micros / 1000;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
value5 = r2 + ('\n' + a1 + property + ': ' + value4);
|
||||
prettyPrintTrace_Binding = prettyPrintTrace_;
|
||||
calls = a0[value].calls;
|
||||
value = value5 + prettyPrintTrace_Binding(calls, a1 + '| ');
|
||||
value6 = r12 + 2;
|
||||
length = a0.length;
|
||||
if (value6 < length) {
|
||||
r2 = value;
|
||||
r12 = value6;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
r0 = value;
|
||||
break reducibleLoop2;
|
||||
}
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function eachTraceCall(a0, a1) { // fn#95255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:602, offset: 0x02136e03, size: 105 bytes, params: 3, frame: 19
|
||||
var r5;
|
||||
var length;
|
||||
var value;
|
||||
var value2;
|
||||
var property;
|
||||
var property2;
|
||||
var micros;
|
||||
var eachTraceCallBinding;
|
||||
var calls;
|
||||
reducibleJoin4: while (true) {
|
||||
if (a0 == null) {
|
||||
break reducibleJoin4;
|
||||
}
|
||||
length = a0.length;
|
||||
value = 0;
|
||||
if (!(length > value)) {
|
||||
break reducibleJoin4;
|
||||
}
|
||||
length = a0.length;
|
||||
value2 = environment;
|
||||
if (!(value < length)) {
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r5 = value;
|
||||
reducibleLoop3: while (true) {
|
||||
property = a0[r5];
|
||||
property2 = a0[r5 + 1];
|
||||
micros = property2.micros;
|
||||
a1(property, micros);
|
||||
eachTraceCallBinding = eachTraceCall;
|
||||
calls = property2.calls;
|
||||
eachTraceCallBinding(calls, a1);
|
||||
value = r5 + 2;
|
||||
length = a0.length;
|
||||
if (value < length) {
|
||||
r5 = value;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getReadyPayloadSizeAnalytics({guilds}) { // fn#95256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:742, offset: 0x02136e6c, size: 72 bytes, params: 2, frame: 12
|
||||
guilds.forEach(function(a0) {
|
||||
var r2;
|
||||
if (!a0.unavailable) {
|
||||
r2 = a0.data_mode === 'partial' ? a0.partial_updates.channels : a0.channels;
|
||||
if (r2 != null && r2.forEach != null) {
|
||||
r2.forEach(_fun95258);
|
||||
}
|
||||
}
|
||||
});
|
||||
return {num_guilds: guilds.length, num_guild_channels: 0, num_guild_category_channels: 0};
|
||||
}
|
||||
|
||||
function logReadyPayloadReceived(a0, a1, a2, a3, a4) { // fn#95260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:1228, offset: 0x02136f44, size: 503 bytes, params: 6, frame: 23
|
||||
var defaultImport;
|
||||
var addDetail;
|
||||
var Math;
|
||||
let value = getReadyPayloadTraceAnalytics(a1);
|
||||
if (a3 != null) {
|
||||
defaultImport = importDefault(20) /* metro dependency 20: AppStartPerformance */;
|
||||
addDetail = defaultImport.addDetail;
|
||||
Math = global.Math;
|
||||
Reflect.apply(addDetail, defaultImport, ['payload_size(kb)', Math.round(a3.uncompressed_byte_size / 1024)]);
|
||||
}
|
||||
const defaultImport2 = importDefault(20) /* metro dependency 20: AppStartPerformance */;
|
||||
defaultImport2.addDetail('server_time(ms)', value.identify_total_server_duration_ms ?? 0);
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a3, undefined);
|
||||
copyDataProperties(object2, value, undefined);
|
||||
copyDataProperties(object2, getReadyPayloadSizeAnalytics(a1), undefined);
|
||||
copyDataProperties(object2, a4, undefined);
|
||||
object2['duration_ms_since_identify_start'] = a2 - a0.identifyStartTime;
|
||||
object2['duration_ms_since_connection_start'] = a2 - a0.connectionStartTime;
|
||||
const Date = global.Date;
|
||||
object2['duration_ms_since_emit_start'] = Date.now() - a2;
|
||||
object2['is_reconnect'] = a0.hasConnectedOnce;
|
||||
object2['is_fast_connect'] = a0.isFastConnect;
|
||||
object2['did_force_clear_guild_hashes'] = a0.didForceClearGuildHashes;
|
||||
object2['identify_uncompressed_byte_size'] = a0.identifyUncompressedByteSize;
|
||||
object2['identify_compressed_byte_size'] = a0.identifyCompressedByteSize;
|
||||
const hadCacheAtStartup = a0.analytics.hadCacheAtStartup;
|
||||
object2['had_cache_at_startup'] = hadCacheAtStartup != null && hadCacheAtStartup;
|
||||
const usedCacheAtStartup = a0.analytics.usedCacheAtStartup;
|
||||
object2['used_cache_at_startup'] = usedCacheAtStartup != null && usedCacheAtStartup;
|
||||
(importDefault(14) /* metro dependency 14: TTITracker */).attachReadyPayloadProperties(object2);
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = value.track;
|
||||
const READY_PAYLOAD_RECEIVED = AnalyticEvents.READY_PAYLOAD_RECEIVED;
|
||||
Reflect.apply(track, value, [READY_PAYLOAD_RECEIVED, object2, {logEventProperties: true}]);
|
||||
}
|
||||
|
||||
function getConnectionPath(a0) { // fn#95263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:2632, offset: 0x021372ad, size: 147 bytes, params: 2, frame: 18
|
||||
var r8;
|
||||
var r2;
|
||||
var r0;
|
||||
var _trace;
|
||||
var value3;
|
||||
var property;
|
||||
var value4;
|
||||
var value5;
|
||||
var prettyPrintTrace_Binding;
|
||||
var JSON;
|
||||
var parse;
|
||||
var value6;
|
||||
var error;
|
||||
var join;
|
||||
let value = undefined;
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort22: while (true) {
|
||||
exceptionLanding21: while (true) {
|
||||
try {
|
||||
_trace = a0._trace;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
break reduciblePort22;
|
||||
}
|
||||
_trace = a0._trace;
|
||||
value = '???';
|
||||
reducibleJoin24: while (true) {
|
||||
if (_trace != null) {
|
||||
_trace = a0._trace;
|
||||
join = _trace.join;
|
||||
value = Reflect.apply(join, _trace, [' -> ']);
|
||||
r0 = value;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
r0 = value;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
const value2 = null;
|
||||
try {
|
||||
value3 = value2 == _trace;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
reducibleJoin8: while (true) {
|
||||
if (value3) {
|
||||
r8 = value;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
try {
|
||||
property = _trace[0];
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
r8 = property;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
try {
|
||||
value4 = value2 == r8;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
reducibleJoin18: while (true) {
|
||||
if (value4) {
|
||||
r2 = value2;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
value5 = environment;
|
||||
try {
|
||||
prettyPrintTrace_Binding = prettyPrintTrace_;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
try {
|
||||
JSON = global.JSON;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
try {
|
||||
parse = JSON.parse;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(parse, JSON, [r8]);
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
try {
|
||||
value = prettyPrintTrace_Binding(value6, '');
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
r2 = value;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
try {
|
||||
value = value2 != r2;
|
||||
} catch (error) {
|
||||
break exceptionLanding21;
|
||||
}
|
||||
if (value) {
|
||||
return r2;
|
||||
}
|
||||
_trace = a0._trace;
|
||||
value = '???';
|
||||
reducibleJoin24: while (true) {
|
||||
if (_trace != null) {
|
||||
_trace = a0._trace;
|
||||
join = _trace.join;
|
||||
value = Reflect.apply(join, _trace, [' -> ']);
|
||||
r0 = value;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
r0 = value;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getReadyPayloadByteSizeAnalytics(a0) { // fn#95264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:2909, offset: 0x02137340, size: 914 bytes, params: 2, frame: 38
|
||||
const Math = global.Math;
|
||||
if (Math.random() > 0.01) {
|
||||
return undefined;
|
||||
}
|
||||
let Date = global.Date;
|
||||
value = Date.now();
|
||||
const guilds = a0.guilds;
|
||||
const merged_presences = a0.merged_presences;
|
||||
const merged_members = a0.merged_members;
|
||||
const read_state = a0.read_state;
|
||||
const private_channels = a0.private_channels;
|
||||
const user_guild_settings = a0.user_guild_settings;
|
||||
const user_settings = a0.user_settings;
|
||||
const user_settings_proto = a0.user_settings_proto;
|
||||
const experiments = a0.experiments;
|
||||
const guild_experiments = a0.guild_experiments;
|
||||
const relationships = a0.relationships;
|
||||
const users = a0.users;
|
||||
const binding = env0_5;
|
||||
const value3 = undefined;
|
||||
const value4 = binding(a0, env0_2);
|
||||
guilds.forEach(_fun95265);
|
||||
const object2 = {};
|
||||
let JSON = global.JSON;
|
||||
let stringify = JSON.stringify;
|
||||
let length = Reflect.apply(stringify, JSON,
|
||||
[(merged_presences == null ? value3 : merged_presences.friends) ?? []]).length;
|
||||
object2.presences_size = length;
|
||||
JSON = global.JSON;
|
||||
object2.users_size = JSON.stringify(users).length;
|
||||
JSON = global.JSON;
|
||||
object2.read_states_size = JSON.stringify(read_state).length;
|
||||
JSON = global.JSON;
|
||||
object2.private_channels_size = JSON.stringify(private_channels).length;
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
const value5 = '';
|
||||
object2.user_settings_size = Reflect.apply(stringify, JSON,
|
||||
[user_settings ?? value5]).length + (user_settings_proto ?? value5).length;
|
||||
JSON = global.JSON;
|
||||
length = JSON.stringify(experiments ?? []).length;
|
||||
JSON = global.JSON;
|
||||
object2.experiments_size = length + JSON.stringify(guild_experiments ?? []).length;
|
||||
JSON = global.JSON;
|
||||
object2.user_guild_settings_size = JSON.stringify(user_guild_settings).length;
|
||||
JSON = global.JSON;
|
||||
object2.relationships_size = JSON.stringify(relationships).length;
|
||||
JSON = global.JSON;
|
||||
object2.remaining_data_size = JSON.stringify(value4 ?? ({})).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_channels_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_members_size = JSON.stringify(merged_members ?? []).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_presences_size = JSON.stringify((merged_presences == null ? value3 : merged_presences.guilds) ?? []).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_roles_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_emojis_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_threads_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_stickers_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_events_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_features_size = JSON.stringify([]).length;
|
||||
JSON = global.JSON;
|
||||
object2.guild_remaining_data_size = JSON.stringify([]).length;
|
||||
Date = global.Date;
|
||||
object2.size_metrics_duration_ms = Date.now() - value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function logResumeAnalytics(a0) { // fn#95267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:5050, offset: 0x02137863, size: 338 bytes, params: 2, frame: 20
|
||||
var Math;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var CONNECTION_RESUMED;
|
||||
var object2;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
if (!((currentUser == null || !currentUser.isStaff()) && global.Math.random() < 0.5)) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
CONNECTION_RESUMED = AnalyticEvents.CONNECTION_RESUMED;
|
||||
object2 = {};
|
||||
object2.connect_time_ms = a0.connectTime;
|
||||
Math = global.Math;
|
||||
object2.resume_time_ms = Math.floor(global.performance.now() - a0.startTime);
|
||||
object2.num_events = a0.numEvents;
|
||||
Math = global.Math;
|
||||
object2.largest_wait_time_ms = Math.floor(a0.largestWaitTime);
|
||||
Math = global.Math;
|
||||
object2.initial_wait_time_ms = Math.floor(a0.initialWaitTime);
|
||||
Math = global.Math;
|
||||
object2.total_wait_time_ms = Math.floor(a0.totalWaitTime);
|
||||
Math = global.Math;
|
||||
object2.total_dispatch_time_ms = Math.floor(a0.dispatchTime);
|
||||
Reflect.apply(track, defaultImport, [CONNECTION_RESUMED, object2, {logEventProperties: true}]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun95257(a0) { // fn#95257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:822, offset: 0x02136eb4, size: 90 bytes, params: 2, frame: 12
|
||||
var channels;
|
||||
if (!a0.unavailable) {
|
||||
channels = a0.data_mode === 'partial' ? a0.partial_updates.channels : a0.channels;
|
||||
if (channels != null && channels.forEach != null) {
|
||||
channels.forEach(_fun95258);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getReadyPayloadTraceAnalytics({_trace}) { // fn#95261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:1284, owner: logReadyPayloadReceived.getReadyPayloadTraceAnalytics, offset: 0x0213713b, size: 254 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
var r7;
|
||||
var r5;
|
||||
var r3;
|
||||
var JSON;
|
||||
var value;
|
||||
var value2;
|
||||
var property;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var Math;
|
||||
var floor;
|
||||
var micros;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var eachTraceCallBinding;
|
||||
var closure;
|
||||
var error;
|
||||
const object2 = {};
|
||||
try {
|
||||
JSON = global.JSON;
|
||||
value = JSON.parse(_trace);
|
||||
value2 = 0;
|
||||
property = value[value2];
|
||||
value3 = property != null;
|
||||
if (value3) {
|
||||
property = value[value2];
|
||||
value4 = property !== '';
|
||||
r7 = value4;
|
||||
} else {
|
||||
r7 = value3;
|
||||
}
|
||||
if (r7) {
|
||||
property = value[value2];
|
||||
value5 = typeof property === 'string';
|
||||
r5 = value5;
|
||||
} else {
|
||||
r5 = r7;
|
||||
}
|
||||
if (r5) {
|
||||
property = value[value2];
|
||||
value6 = property.startsWith('gateway-');
|
||||
r3 = value6;
|
||||
} else {
|
||||
r3 = r5;
|
||||
}
|
||||
if (r3) {
|
||||
property = value[1];
|
||||
value7 = typeof property !== 'object';
|
||||
if (value7) {
|
||||
r3 = value2;
|
||||
} else {
|
||||
property = value[1];
|
||||
value8 = 'micros' in property;
|
||||
if (value8) {
|
||||
Math = global.Math;
|
||||
floor = Math.floor;
|
||||
property = value[1];
|
||||
micros = property.micros;
|
||||
value9 = micros / 1000;
|
||||
value10 = Reflect.apply(floor, Math, [value9]);
|
||||
r3 = value10;
|
||||
} else {
|
||||
r3 = value2;
|
||||
}
|
||||
}
|
||||
object2.identify_total_server_duration_ms = r3;
|
||||
}
|
||||
value11 = environment.__proto__;
|
||||
eachTraceCallBinding = eachTraceCall;
|
||||
closure = _fun95262;
|
||||
eachTraceCallBinding(value, closure);
|
||||
} catch (error) {
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun95265(a0) { // fn#95265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:3290, offset: 0x021376d2, size: 320 bytes, params: 2, frame: 21
|
||||
var r4;
|
||||
var features;
|
||||
var value;
|
||||
var binding;
|
||||
var value2;
|
||||
var threads;
|
||||
var guild_scheduled_events;
|
||||
var push;
|
||||
var data_mode;
|
||||
if (!a0.unavailable) {
|
||||
r4 = a0.properties ?? ({});
|
||||
features = r4.features;
|
||||
value = environment.__proto__;
|
||||
binding = env1_5;
|
||||
value2 = binding(r4, env1_3);
|
||||
threads = a0.threads;
|
||||
guild_scheduled_events = a0.guild_scheduled_events;
|
||||
value = binding(a0, env1_4);
|
||||
binding = env0_0;
|
||||
push = binding.push;
|
||||
data_mode = a0.data_mode;
|
||||
Reflect.apply(push, binding, [data_mode === 'partial' ? a0.partial_updates.channels : a0.channels]);
|
||||
binding = env0_1;
|
||||
push = binding.push;
|
||||
data_mode = a0.data_mode;
|
||||
Reflect.apply(push, binding, [data_mode === 'partial' ? a0.partial_updates.roles : a0.roles]);
|
||||
binding = env0_2;
|
||||
push = binding.push;
|
||||
data_mode = a0.data_mode;
|
||||
Reflect.apply(push, binding, [data_mode === 'partial' ? a0.partial_updates.emojis : a0.emojis]);
|
||||
binding = env0_3;
|
||||
binding.push(threads);
|
||||
binding = env0_4;
|
||||
push = binding.push;
|
||||
data_mode = a0.data_mode;
|
||||
Reflect.apply(push, binding, [data_mode === 'partial' ? a0.partial_updates.stickers : a0.stickers]);
|
||||
binding = env0_5;
|
||||
binding.push(features);
|
||||
binding = env0_6;
|
||||
binding.push(guild_scheduled_events);
|
||||
binding = env0_7;
|
||||
binding.push(value, value2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun95258({type}) { // fn#95258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:950, offset: 0x02136f0e, size: 54 bytes, params: 2, frame: 3
|
||||
let binding = env1_1;
|
||||
env1_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
|
||||
if (type === GUILD_CATEGORY) {
|
||||
binding = env1_0;
|
||||
env1_0 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun95262(a0, a1) { // fn#95262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12692:1567, offset: 0x02137239, size: 116 bytes, params: 3, frame: 13
|
||||
if (a0 === 'start_session') {
|
||||
env0_0.identify_api_duration_ms = global.Math.floor(a1 / 1000);
|
||||
} else if (a0 === 'guilds_connect') {
|
||||
env0_0.identify_guilds_duration_ms = global.Math.floor(a1 / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,975 @@
|
||||
/* Metro module 12497; source: modules/gateway/GatewaySocketDispatcher.tsx; dependencies: [6, 7, 57, 12498, 3, 12499, 12502, 12501, 12503, 566, 12504, 2] */
|
||||
function _fun95177(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:6, offset: 0x02134352, size: 465 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_95180 = 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 */;
|
||||
const env0_5 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_6 = (require(12498) /* metro dependency 12498: DispatcherWorkConstants */).DISPATCHER_IDEAL_TIME_LIMIT_MS;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('GatewaySocket');
|
||||
let Set = global.Set;
|
||||
let set = new Set(['INITIAL_GUILD', 'READY']);
|
||||
Set = global.Set;
|
||||
set = new Set(['READY', 'INITIAL_GUILD']);
|
||||
Set = global.Set;
|
||||
set = new Set(['READY', 'READY_SUPPLEMENTAL', 'RESUMED']);
|
||||
Set = global.Set;
|
||||
set = new Set(['READY', 'INITIAL_GUILD', 'READY_SUPPLEMENTAL', 'RESUMED', 'VOICE_CHANNEL_SELECT',
|
||||
'VOICE_STATE_UPDATE', 'VOICE_SERVER_UPDATE', 'RTC_CONNECTION_STATE', 'RTC_CONNECTION_VIDEO',
|
||||
'RTC_CONNECTION_CLIENT_CONNECT', 'RTC_CONNECTION_PING', 'MEDIA_SESSION_JOINED', 'MEDIA_ENGINE_PERMISSION',
|
||||
'SESSIONS_REPLACE', 'STREAM_CREATE', 'STREAM_SERVER_UPDATE', 'STREAM_DELETE', 'STREAM_UPDATE']);
|
||||
object2 = {NotStarted: 0};
|
||||
object2[0] = 'NotStarted';
|
||||
object2.Loading = 1;
|
||||
object2[1] = 'Loading';
|
||||
object2.Loaded = 2;
|
||||
object2[2] = 'Loaded';
|
||||
const env0_13 = {};
|
||||
set = _fun95182();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewaySocketDispatcher.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_95178(a0, a1) { // fn#95178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:176, offset: 0x02134523, 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 _fun95179;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_95180(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_95180(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_95180(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun95179;
|
||||
}
|
||||
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 _shouldYieldToBrowser(a0, a1, a2) { // fn#95181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:1737, offset: 0x02134697, size: 134 bytes, params: 4, frame: 18
|
||||
let value = null;
|
||||
if (value == a2) {
|
||||
return false;
|
||||
}
|
||||
const property = a0[a1];
|
||||
const value2 = a0.length - 1;
|
||||
const r8 = a1 < value2 ? a0[a1 + 1] : value;
|
||||
const value3 = undefined;
|
||||
const r9 = value == a2 ? value3 : a2.timeRemaining();
|
||||
const value5 = 0;
|
||||
const r5 = value != r9 ? r9 : value5;
|
||||
const type2 = property.type;
|
||||
const type = value == r8 ? value3 : r8.type;
|
||||
value = value != a2;
|
||||
return value && r5 <= value5 && !(type2 === type) && a1 !== value2;
|
||||
}
|
||||
|
||||
function _fun95182() { // fn#95182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:1965, offset: 0x0213471d, size: 400 bytes, params: 1, frame: 15
|
||||
return env0_4(GatewaySocketDispatcher, [{key: 'hasStuffToDispatchNow', value: value_95185},
|
||||
{key: 'processFirstQueuedDispatch', value: value_95186}, {key: 'unpauseDispatchQueue', value: value_95187},
|
||||
{key: 'receiveDispatch', value: value_95188}, {key: 'maybePreload', value: value_95189}, {key: 'scheduleFlush',
|
||||
value: value_95192}, {key: 'getDispatchTimings', value: value_95193}, {key: 'getSchedulerTelemetry',
|
||||
value: function() {
|
||||
return this.scheduler.telemetry;
|
||||
}}, {key: 'getIsSchedulerBackgrounded', value: function() {
|
||||
return this.scheduler.isBackgrounded;
|
||||
}}, {key: 'toggleRequestIdleCallback', value: function(a0) {
|
||||
this.scheduler.toggleRequestIdleCallback(a0);
|
||||
}}, {key: 'getIsRequestIdleCallbackEnabled', value: function() {
|
||||
return this.scheduler.isRequestIdleCallbackEnabled;
|
||||
}}, {key: 'dispatchMultiple', value: value_95198}, {key: 'dispatchOne', value: value_95200}, {key: 'clear',
|
||||
value: function() {
|
||||
this.paused = false;
|
||||
this.queue.length = 0;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function GatewaySocketDispatcher(a0) { // fn#95183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:1986, offset: 0x021348ad, size: 145 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
env1_3(this, GatewaySocketDispatcher);
|
||||
this.socket = a0;
|
||||
value = require(12499) /* metro dependency 12499: DispatcherWorkSchedulerNative */;
|
||||
this.scheduler = value.createDispatcherWorkScheduler();
|
||||
this.queue = [];
|
||||
this.paused = true;
|
||||
value = require(12502) /* metro dependency 12502: GatewaySocketAnalytics */;
|
||||
this.resumeAnalytics = value.createResumeAnalytics();
|
||||
this.getDispatchHandler = null;
|
||||
this.flush = flush_95184;
|
||||
}
|
||||
|
||||
function value_95185() { // fn#95185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:2670, offset: 0x02134abc, size: 57 bytes, params: 1, frame: 4
|
||||
var r0;
|
||||
var status;
|
||||
let value = this.queue.length > 0;
|
||||
if (value) {
|
||||
status = this.queue[0].status;
|
||||
value = environment.__proto__;
|
||||
value = status === env1_12.Loaded;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_95186(a0) { // fn#95186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:2783, offset: 0x02134af5, size: 206 bytes, params: 2, frame: 16
|
||||
var has;
|
||||
var type;
|
||||
var status;
|
||||
var value;
|
||||
var Loaded;
|
||||
var push;
|
||||
var shift;
|
||||
const items2 = [];
|
||||
let queue = this.queue;
|
||||
let length = queue.length;
|
||||
if (length > 0) {
|
||||
has = a0.has;
|
||||
queue = this.queue;
|
||||
type = queue[0].type;
|
||||
if (Reflect.apply(has, a0, [type])) {
|
||||
queue = this.queue;
|
||||
status = queue[0].status;
|
||||
value = environment.__proto__;
|
||||
Loaded = env1_12.Loaded;
|
||||
if (status === Loaded) {
|
||||
while (true) {
|
||||
push = items2.push;
|
||||
queue = this.queue;
|
||||
shift = queue.shift;
|
||||
Reflect.apply(push, items2, [Reflect.apply(shift, queue, [])]);
|
||||
queue = this.queue;
|
||||
length = queue.length;
|
||||
if (!(length > 0)) {
|
||||
break;
|
||||
}
|
||||
has = a0.has;
|
||||
queue = this.queue;
|
||||
type = queue[0].type;
|
||||
if (Reflect.apply(has, a0, [type])) {
|
||||
queue = this.queue;
|
||||
status = queue[0].status;
|
||||
Loaded = env1_12.Loaded;
|
||||
if (status === Loaded) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dispatchMultiple(items2);
|
||||
}
|
||||
|
||||
function value_95187() { // fn#95187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:2977, offset: 0x02134bc3, size: 86 bytes, params: 1, frame: 14
|
||||
var r3;
|
||||
var value3;
|
||||
var value4;
|
||||
this.paused = false;
|
||||
let value = environment.__proto__;
|
||||
value = _createForOfIteratorHelperLoose_95178(this.queue);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (!done) {
|
||||
for (r3 = value2; true; r3 = value4) {
|
||||
value3 = r3.value;
|
||||
this.maybePreload(value3);
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.flush();
|
||||
}
|
||||
|
||||
function value_95188(a0, a1, a2) { // fn#95188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:3154, offset: 0x02134c19, size: 134 bytes, params: 4, frame: 13
|
||||
const getDispatchHandler = this.getDispatchHandler;
|
||||
if (getDispatchHandler == null) {
|
||||
throw global.Error('getDispatchHandler needs to be passed in first!');
|
||||
}
|
||||
const object2 = {data: a0, type: a1, compressionAnalytics: a2};
|
||||
const NotStarted = env1_12.NotStarted;
|
||||
object2.status = NotStarted;
|
||||
object2.preloadPromise = null;
|
||||
object2.preloadedData = null;
|
||||
this.queue.push(object2);
|
||||
if (!this.maybePreload(object2)) {
|
||||
this.scheduleFlush(a1);
|
||||
}
|
||||
}
|
||||
|
||||
function value_95189(a0) { // fn#95189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:3461, offset: 0x02134c9f, size: 204 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
var r3;
|
||||
var value;
|
||||
var binding;
|
||||
var status;
|
||||
const env0_1 = a0;
|
||||
if (this.paused) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_8;
|
||||
if (binding.has(a0.type)) {
|
||||
status = a0.status;
|
||||
value = environment.__proto__;
|
||||
if (status !== env1_12.NotStarted) {
|
||||
return false;
|
||||
}
|
||||
r3 = this.getDispatchHandler(a0.type)?.preload(a0.data);
|
||||
a0.status = r3 == null ? env1_12.Loaded : env1_12.Loading;
|
||||
a0.preloadPromise = r3;
|
||||
if (r3 != null) {
|
||||
r3.then(_fun95190).catch(_fun95191);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
status = a0.status;
|
||||
value = environment.__proto__;
|
||||
if (status !== env1_12.NotStarted) {
|
||||
return false;
|
||||
}
|
||||
r3 = this.getDispatchHandler(a0.type)?.preload(a0.data);
|
||||
a0.status = r3 == null ? env1_12.Loaded : env1_12.Loading;
|
||||
a0.preloadPromise = r3;
|
||||
if (r3 != null) {
|
||||
r3.then(_fun95190).catch(_fun95191);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function value_95192(a0) { // fn#95192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:3884, offset: 0x02134dd6, size: 134 bytes, params: 2, frame: 15
|
||||
var value;
|
||||
var binding;
|
||||
var value2;
|
||||
var scheduler;
|
||||
if (!this.paused) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_9;
|
||||
value2 = binding.has(a0);
|
||||
scheduler = this.scheduler;
|
||||
if (value2) {
|
||||
scheduler.clearWorkTimeout();
|
||||
this.flush();
|
||||
} else if (!scheduler.hasWorkScheduled) {
|
||||
scheduler = this.scheduler;
|
||||
scheduler.requestWorkTimeout(this.flush);
|
||||
}
|
||||
binding = env1_11;
|
||||
if (binding.has(a0)) {
|
||||
this.scheduler.markCriticalWorkScheduled();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_95198(a0, a1) { // fn#95198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:4563, offset: 0x02134eb0, size: 489 bytes, params: 3, frame: 22
|
||||
var environment;
|
||||
var items;
|
||||
var socket;
|
||||
var connectionState;
|
||||
var property;
|
||||
var defaultImport;
|
||||
var RESUMING;
|
||||
var value2;
|
||||
var defaultImport2;
|
||||
var Emitter;
|
||||
var pause;
|
||||
var defaultImport3;
|
||||
var batched;
|
||||
var closure;
|
||||
var binding;
|
||||
var defaultImport4;
|
||||
var resume;
|
||||
var value3;
|
||||
var COUNT_DISPATCHES_LEFT_AFTER_YIELD;
|
||||
var queue;
|
||||
var unshift;
|
||||
var requestWorkTimeout;
|
||||
var flush;
|
||||
var error;
|
||||
var resetSocketOnDispatchError;
|
||||
const env0_1 = a0;
|
||||
const env0_2 = a1;
|
||||
let length = a0.length;
|
||||
if (length !== 0) {
|
||||
var env0_3 = 'none';
|
||||
var env0_4 = false;
|
||||
var scheduler = this.scheduler;
|
||||
var telemetry = scheduler.telemetry;
|
||||
var measure = telemetry.measure;
|
||||
var value = environment.__proto__;
|
||||
var WorkSchedulerTelemetryMeasurement = require(dependencyMap[7]).WorkSchedulerTelemetryMeasurement;
|
||||
var COUNT_INITIAL_DISPATCHS_LENGTH = WorkSchedulerTelemetryMeasurement.COUNT_INITIAL_DISPATCHS_LENGTH;
|
||||
length = a0.length;
|
||||
Reflect.apply(measure, telemetry, [COUNT_INITIAL_DISPATCHS_LENGTH, length]);
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort71: while (true) {
|
||||
exceptionLanding70: while (true) {
|
||||
try {
|
||||
items = [];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
socket = this.socket;
|
||||
resetSocketOnDispatchError = socket.resetSocketOnDispatchError;
|
||||
Reflect.apply(resetSocketOnDispatchError, socket, [{error: error, action: env0_3}]);
|
||||
break reduciblePort71;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
var env0_5 = items;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
socket = this.socket;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
connectionState = socket.connectionState;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[8];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
defaultImport = importDefault(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
RESUMING = defaultImport.RESUMING;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
value2 = connectionState !== RESUMING;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
reducibleJoin22: while (true) {
|
||||
if (value2) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[9];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
defaultImport2 = importDefault(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Emitter = defaultImport2.Emitter;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
pause = Emitter.pause;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(pause, Emitter, [150]);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
try {
|
||||
var env0_6 = 0;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[9];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
defaultImport3 = importDefault(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Emitter = defaultImport3.Emitter;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
batched = Emitter.batched;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
closure = _fun95199;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(batched, Emitter, [closure]);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
binding = env0_4;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
reducibleJoin41: while (true) {
|
||||
if (binding) {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[9];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
defaultImport4 = importDefault(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Emitter = defaultImport4.Emitter;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
resume = Emitter.resume;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(resume, Emitter, []);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
try {
|
||||
binding = env0_5;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
length = binding.length;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
value3 = length > 0;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
if (value3) {
|
||||
try {
|
||||
scheduler = this.scheduler;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
telemetry = scheduler.telemetry;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
measure = telemetry.measure;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[7];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
value = require(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
WorkSchedulerTelemetryMeasurement = value.WorkSchedulerTelemetryMeasurement;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
COUNT_DISPATCHES_LEFT_AFTER_YIELD = WorkSchedulerTelemetryMeasurement.COUNT_DISPATCHES_LEFT_AFTER_YIELD;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
binding = env0_5;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
length = binding.length;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(measure, telemetry, [COUNT_DISPATCHES_LEFT_AFTER_YIELD, length]);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
queue = this.queue;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
unshift = queue.unshift;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
binding = env0_5;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
items = [];
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
arraySpread(items, binding, 0, require);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
apply(unshift, items, queue, require);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
scheduler = this.scheduler;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
requestWorkTimeout = scheduler.requestWorkTimeout;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
flush = this.flush;
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(requestWorkTimeout, scheduler, [flush, true]);
|
||||
} catch (error) {
|
||||
break exceptionLanding70;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function value_95200({data, type, compressionAnalytics, preloadedData}) { // fn#95200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:5721, offset: 0x0213524e, size: 619 bytes, params: 2, frame: 28
|
||||
var resumeAnalytics;
|
||||
var value3;
|
||||
var numEvents;
|
||||
var dispatchHandler;
|
||||
var dispatchHandler2;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var readyPayloadByteSizeAnalytics;
|
||||
var dispatchHandler3;
|
||||
var moduleValue4;
|
||||
var dispatchTime;
|
||||
let performance = global.performance;
|
||||
const value = performance.now();
|
||||
let connectionState = this.socket.connectionState;
|
||||
let RESUMING = (importDefault(12503) /* metro dependency 12503: ConnectionState */).RESUMING;
|
||||
if (connectionState === RESUMING) {
|
||||
resumeAnalytics = this.resumeAnalytics;
|
||||
value3 = value - resumeAnalytics.lastUpdateTime;
|
||||
resumeAnalytics = this.resumeAnalytics;
|
||||
numEvents = resumeAnalytics.numEvents;
|
||||
if (numEvents === 0) {
|
||||
this.resumeAnalytics.initialWaitTime = value3;
|
||||
} else if (value3 > this.resumeAnalytics.largestWaitTime) {
|
||||
this.resumeAnalytics.largestWaitTime = value3;
|
||||
}
|
||||
resumeAnalytics = this.resumeAnalytics;
|
||||
resumeAnalytics.totalWaitTime = resumeAnalytics.totalWaitTime + value3;
|
||||
resumeAnalytics = this.resumeAnalytics;
|
||||
resumeAnalytics.lastUpdateTime = value;
|
||||
resumeAnalytics = this.resumeAnalytics;
|
||||
numEvents = resumeAnalytics.numEvents;
|
||||
resumeAnalytics.numEvents = numEvents + 1;
|
||||
}
|
||||
(importDefault(12504) /* metro dependency 12504: ActionBatcher */).flush(type, data);
|
||||
if (type === 'READY') {
|
||||
readyPayloadByteSizeAnalytics = (require(12502) /* metro dependency 12502: GatewaySocketAnalytics */).getReadyPayloadByteSizeAnalytics(data);
|
||||
dispatchHandler3 = this.getDispatchHandler(type);
|
||||
if (dispatchHandler3 != null) {
|
||||
dispatchHandler3.dispatch(data, type, preloadedData);
|
||||
}
|
||||
moduleValue4 = require(12502) /* metro dependency 12502: GatewaySocketAnalytics */;
|
||||
moduleValue4.logReadyPayloadReceived(this.socket, data, value, compressionAnalytics,
|
||||
readyPayloadByteSizeAnalytics);
|
||||
} else if (type === 'RESUMED') {
|
||||
dispatchHandler2 = this.getDispatchHandler(type);
|
||||
if (dispatchHandler2 != null) {
|
||||
dispatchHandler2.dispatch(data, type, preloadedData);
|
||||
}
|
||||
moduleValue = require(12502) /* metro dependency 12502: GatewaySocketAnalytics */;
|
||||
moduleValue.logResumeAnalytics(this.resumeAnalytics);
|
||||
this.socket.handleResumeDispatched();
|
||||
moduleValue2 = require(12502) /* metro dependency 12502: GatewaySocketAnalytics */;
|
||||
this.resumeAnalytics = moduleValue2.createResumeAnalytics();
|
||||
} else {
|
||||
dispatchHandler = this.getDispatchHandler(type);
|
||||
if (dispatchHandler != null) {
|
||||
dispatchHandler.dispatch(data, type, preloadedData);
|
||||
}
|
||||
}
|
||||
connectionState = this.socket.connectionState;
|
||||
RESUMING = (importDefault(12503) /* metro dependency 12503: ConnectionState */).RESUMING;
|
||||
if (connectionState === RESUMING) {
|
||||
resumeAnalytics = this.resumeAnalytics;
|
||||
dispatchTime = resumeAnalytics.dispatchTime;
|
||||
performance = global.performance;
|
||||
resumeAnalytics.dispatchTime = dispatchTime + (performance.now() - value);
|
||||
}
|
||||
}
|
||||
|
||||
function GatewaySocketDispatcherFlush(a0) { // fn#95184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:2247, owner: GatewaySocketDispatcher.flush, offset: 0x0213493e, size: 382 bytes, params: 2, frame: 21
|
||||
var r6;
|
||||
var r5;
|
||||
var status;
|
||||
var value4;
|
||||
var Loaded;
|
||||
var value5;
|
||||
var telemetry;
|
||||
var timeEnd;
|
||||
var value;
|
||||
if (env0_0.paused) {
|
||||
return true;
|
||||
}
|
||||
let performance = global.performance;
|
||||
const value2 = performance.now();
|
||||
let queue = env0_0.queue;
|
||||
let length = queue.length;
|
||||
const value3 = 0;
|
||||
if (value3 < length) {
|
||||
queue = env0_0.queue;
|
||||
status = queue[value3].status;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
Loaded = env2_12.Loaded;
|
||||
if (status !== Loaded) {
|
||||
r5 = value3;
|
||||
} else {
|
||||
r6 = value3;
|
||||
while (true) {
|
||||
value5 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
|
||||
queue = env0_0.queue;
|
||||
length = queue.length;
|
||||
if (!(value5 < length)) {
|
||||
r5 = value5;
|
||||
break;
|
||||
}
|
||||
queue = env0_0.queue;
|
||||
status = queue[value5].status;
|
||||
Loaded = env2_12.Loaded;
|
||||
if (status === Loaded) {
|
||||
r6 = value5;
|
||||
continue;
|
||||
}
|
||||
r5 = value5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
if (value3 === r5) {
|
||||
return true;
|
||||
}
|
||||
let binding = env0_0;
|
||||
const value6 = binding.queue.splice(value3, r5);
|
||||
const value7 = binding.dispatchMultiple(value6, a0);
|
||||
if (value7) {
|
||||
telemetry = env0_0.scheduler.telemetry;
|
||||
timeEnd = telemetry.timeEnd;
|
||||
value = environment.__proto__.__proto__;
|
||||
Reflect.apply(timeEnd, telemetry,
|
||||
[(require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryTiming.TIME_TO_QUEUE_EMPTY]);
|
||||
}
|
||||
performance = global.performance;
|
||||
value = performance.now() - value2;
|
||||
if (value > DISPATCHER_IDEAL_TIME_LIMIT_MS && !value7) {
|
||||
binding = env2_7;
|
||||
binding.log('Dispatched ' + value6.length + ' messages in ' + value + 'ms');
|
||||
}
|
||||
return value7;
|
||||
}
|
||||
|
||||
function _fun95190(a0) { // fn#95190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:3697, offset: 0x02134d6b, size: 59 bytes, params: 2, frame: 11
|
||||
const binding = env0_1;
|
||||
binding.preloadedData = a0;
|
||||
const Loaded = env2_12.Loaded;
|
||||
binding.status = Loaded;
|
||||
const binding2 = env0_0;
|
||||
binding2.scheduleFlush(binding.type);
|
||||
}
|
||||
|
||||
function _fun95191(a0) { // fn#95191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:3774, offset: 0x02134da6, size: 48 bytes, params: 2, frame: 13
|
||||
return env0_0.socket.resetSocketOnDispatchError({error: a0, action: env0_1.type});
|
||||
}
|
||||
|
||||
function _fun95199() { // fn#95199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12687:4864, offset: 0x02135099, size: 437 bytes, params: 1, frame: 25
|
||||
var r9;
|
||||
var r7;
|
||||
var r3;
|
||||
var property;
|
||||
var type;
|
||||
var binding;
|
||||
var value4;
|
||||
var performance;
|
||||
var now;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var property2;
|
||||
var value8;
|
||||
var value9;
|
||||
var _shouldYieldToBrowserBinding;
|
||||
var value10;
|
||||
var value11;
|
||||
var value12;
|
||||
var timeRemaining;
|
||||
var value13;
|
||||
var scheduler;
|
||||
var telemetry;
|
||||
var timeTrack;
|
||||
var WorkSchedulerTelemetryTiming;
|
||||
var TIME_OVER_DEADLINE;
|
||||
var timeSinceExpiration;
|
||||
let length = env0_1.length;
|
||||
const value2 = 0;
|
||||
if (value2 < length) {
|
||||
r9 = value2;
|
||||
while (true) {
|
||||
property = env0_1[r9];
|
||||
type = property.type;
|
||||
env0_3 = type;
|
||||
binding = env0_4;
|
||||
if (binding) {
|
||||
r7 = binding;
|
||||
} else {
|
||||
value4 = env2_10.has(property.type);
|
||||
r7 = value4;
|
||||
}
|
||||
env0_4 = r7;
|
||||
performance = global.performance;
|
||||
value5 = performance.now();
|
||||
binding = env0_0;
|
||||
binding.dispatchOne(property);
|
||||
performance = global.performance;
|
||||
now = performance.now;
|
||||
value6 = Reflect.apply(now, performance, []) - value5;
|
||||
env0_6 = value6;
|
||||
type = property.type;
|
||||
property = env2_13[type];
|
||||
if (property != null) {
|
||||
r7 = property;
|
||||
continue;
|
||||
}
|
||||
value7 = env2_5([0, 0], 2);
|
||||
property = value7[value2];
|
||||
property2 = value7[1];
|
||||
binding = env2_13;
|
||||
value8 = property * property2 + value6;
|
||||
value9 = value8 / (property2 + 1);
|
||||
binding[type] = [value9, property2 + 1];
|
||||
_shouldYieldToBrowserBinding = _shouldYieldToBrowser;
|
||||
binding = env0_1;
|
||||
value10 = _shouldYieldToBrowserBinding(binding, r9, require);
|
||||
binding = env0_1;
|
||||
if (value10) {
|
||||
env0_5 = binding.slice(r9 + 1);
|
||||
value12 = require != null;
|
||||
if (!value12) {
|
||||
r3 = value12;
|
||||
continue;
|
||||
}
|
||||
timeRemaining = require.timeRemaining;
|
||||
value13 = Reflect.apply(timeRemaining, require, []) <= value2;
|
||||
r3 = value13;
|
||||
if (r3) {
|
||||
scheduler = env0_0.scheduler;
|
||||
telemetry = scheduler.telemetry;
|
||||
timeTrack = telemetry.timeTrack;
|
||||
WorkSchedulerTelemetryTiming = (require(12501) /* metro dependency 12501: WorkSchedulerTelemetry */).WorkSchedulerTelemetryTiming;
|
||||
TIME_OVER_DEADLINE = WorkSchedulerTelemetryTiming.TIME_OVER_DEADLINE;
|
||||
timeSinceExpiration = require.timeSinceExpiration;
|
||||
Reflect.apply(timeTrack, telemetry, [TIME_OVER_DEADLINE, timeSinceExpiration]);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
value11 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
|
||||
length = binding.length;
|
||||
if (value11 < length) {
|
||||
r9 = value11;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
(importDefault(12504) /* metro dependency 12504: ActionBatcher */).flush();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/* Metro module 12495; source: modules/gateway/GatewaySocketOpCodes.tsx; dependencies: [6, 7, 15, 17, 18, 4402, 12496, 21, 639, 2] */
|
||||
function _fun95147(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:6, offset: 0x02133530, size: 256 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 */;
|
||||
const rtcRegionStore = importDefault(4402) /* metro dependency 4402: RTCRegionStore */;
|
||||
const EventEmitter = (require(639) /* metro dependency 639 */).EventEmitter;
|
||||
const value = _fun95151(EventEmitter);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewaySocketOpCodes.tsx');
|
||||
exports.default = value;
|
||||
const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode;
|
||||
exports.Opcode = Opcode;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_95148() { // fn#95148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:158, offset: 0x02133630, 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_95148_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun95151(a0) { // fn#95151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:357, offset: 0x02133692, size: 575 bytes, params: 2, frame: 16
|
||||
const closure = GatewaySocketOpCodes;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'presenceUpdate', value: function(a0, a1, a2, a3) {
|
||||
var PRESENCE_UPDATE = require(dependencyMap[6]).Opcode.PRESENCE_UPDATE;
|
||||
this.send(PRESENCE_UPDATE, {status: a0, since: a1, activities: a2, afk: a3});
|
||||
}}, {key: 'voiceStateUpdate', value: value_95154}, {key: 'voiceServerPing', value: function() {
|
||||
var VOICE_SERVER_PING = require(dependencyMap[6]).Opcode.VOICE_SERVER_PING;
|
||||
this.send(VOICE_SERVER_PING, null);
|
||||
}}, {key: 'requestGuildMembers', value: function(a0, {query, limit, userIds, presences}) {
|
||||
var REQUEST_GUILD_MEMBERS = require(dependencyMap[6]).Opcode.REQUEST_GUILD_MEMBERS;
|
||||
this.send(REQUEST_GUILD_MEMBERS, {guild_id: a0, query: query, limit: limit, user_ids: userIds,
|
||||
presences: presences});
|
||||
}}, {key: 'searchRecentMembers', value: value_95158}, {key: 'updateGuildSubscriptions', value: value_95159},
|
||||
{key: 'callConnect', value: function(a0) {
|
||||
var CALL_CONNECT = require(dependencyMap[6]).Opcode.CALL_CONNECT;
|
||||
this.send(CALL_CONNECT, {channel_id: a0});
|
||||
}}, {key: 'streamCreate', value: value_95162}, {key: 'streamWatch', value: function(a0) {
|
||||
var STREAM_WATCH = require(dependencyMap[6]).Opcode.STREAM_WATCH;
|
||||
this.send(STREAM_WATCH, {stream_key: a0});
|
||||
}}, {key: 'streamPing', value: function(a0) {
|
||||
var STREAM_PING = require(dependencyMap[6]).Opcode.STREAM_PING;
|
||||
this.send(STREAM_PING, {stream_key: a0});
|
||||
}}, {key: 'streamDelete', value: function(a0) {
|
||||
var STREAM_DELETE = require(dependencyMap[6]).Opcode.STREAM_DELETE;
|
||||
this.send(STREAM_DELETE, {stream_key: a0});
|
||||
}}, {key: 'streamSetPaused', value: function(a0, a1) {
|
||||
var STREAM_SET_PAUSED = require(dependencyMap[6]).Opcode.STREAM_SET_PAUSED;
|
||||
this.send(STREAM_SET_PAUSED, {stream_key: a0, paused: a1});
|
||||
}}, {key: 'requestForumUnreads', value: function(a0, a1, a2) {
|
||||
var REQUEST_FORUM_UNREADS = require(dependencyMap[6]).Opcode.REQUEST_FORUM_UNREADS;
|
||||
this.send(REQUEST_FORUM_UNREADS, {guild_id: a0, channel_id: a1, threads: a2.map(_fun95168)});
|
||||
}}, {key: 'requestSoundboardSounds', value: function(a0) {
|
||||
var REQUEST_SOUNDBOARD_SOUNDS = require(dependencyMap[6]).Opcode.REQUEST_SOUNDBOARD_SOUNDS;
|
||||
this.send(REQUEST_SOUNDBOARD_SOUNDS, {guild_ids: a0});
|
||||
}}, {key: 'requestLastMessages', value: function(a0, a1) {
|
||||
var REQUEST_LAST_MESSAGES = require(dependencyMap[6]).Opcode.REQUEST_LAST_MESSAGES;
|
||||
this.send(REQUEST_LAST_MESSAGES, {guild_id: a0, channel_ids: a1});
|
||||
}}, {key: 'getDeletedEntityIdsNotMatchingHash', value: function(a0, a1, a2, a3, a4) {
|
||||
var GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH = require(dependencyMap[6]).Opcode.GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH;
|
||||
this.send(GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH, {guild_id: a0, channel_ids_hash: a1, role_ids_hash: a2,
|
||||
emoji_ids_hash: a3, sticker_ids_hash: a4});
|
||||
}}, {key: 'triggerGuildChannelResync', value: function(a0, a1) {
|
||||
var GUILD_CHANNELS_RESYNC = require(dependencyMap[6]).Opcode.GUILD_CHANNELS_RESYNC;
|
||||
this.send(GUILD_CHANNELS_RESYNC, {guild_id: a0, obfuscated_channel_ids: a1});
|
||||
}}, {key: 'requestChannelInfo', value: function(a0, a1) {
|
||||
var REQUEST_CHANNEL_INFO = require(dependencyMap[6]).Opcode.REQUEST_CHANNEL_INFO;
|
||||
this.send(REQUEST_CHANNEL_INFO, {guild_id: a0, fields: a1});
|
||||
}}, {key: 'requestChannelMemberCount', value: function(a0, a1) {
|
||||
var REQUEST_CHANNEL_MEMBER_COUNT = require(dependencyMap[6]).Opcode.REQUEST_CHANNEL_MEMBER_COUNT;
|
||||
this.send(REQUEST_CHANNEL_MEMBER_COUNT, {guild_id: a0, channel_id: a1});
|
||||
}}, {key: 'remoteCommand', value: function(a0, a1) {
|
||||
var REMOTE_COMMAND = require(dependencyMap[6]).Opcode.REMOTE_COMMAND;
|
||||
this.send(REMOTE_COMMAND, {target_session_id: a0, payload: a1});
|
||||
}}]);
|
||||
}
|
||||
|
||||
function value_95154({guildId, channelId, selfMute, selfDeaf, selfVideo, preferredRegion, preferredRegions, videoStreamParameters, flags}) { // fn#95154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:821, offset: 0x02133928, size: 272 bytes, params: 2, frame: 21
|
||||
guildId = guildId === undefined ? null : guildId;
|
||||
channelId = channelId === undefined ? null : channelId;
|
||||
selfMute = !(selfMute === undefined) && selfMute;
|
||||
selfDeaf = !(selfDeaf === undefined) && selfDeaf;
|
||||
selfVideo = !(selfVideo === undefined) && selfVideo;
|
||||
preferredRegion = preferredRegion === undefined ? null : preferredRegion;
|
||||
preferredRegions = preferredRegions === undefined ? null : preferredRegions;
|
||||
videoStreamParameters = videoStreamParameters === undefined ? null : videoStreamParameters;
|
||||
flags = flags === undefined ? 0 : flags;
|
||||
const object2 = {guild_id: guildId, channel_id: channelId, self_mute: selfMute, self_deaf: selfDeaf,
|
||||
self_video: selfVideo, flags: flags};
|
||||
if (channelId != null && RTCRegionStore.shouldIncludePreferredRegion()) {
|
||||
object2.preferred_region = preferredRegion;
|
||||
object2.preferred_regions = preferredRegions;
|
||||
}
|
||||
if (videoStreamParameters != null) {
|
||||
object2.tracks = videoStreamParameters?.map(function(a0) {
|
||||
return {type: a0.type, rid: a0.rid, quality: a0.quality};
|
||||
});
|
||||
}
|
||||
const send = this.send;
|
||||
const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode;
|
||||
const VOICE_STATE_UPDATE = Opcode.VOICE_STATE_UPDATE;
|
||||
Reflect.apply(send, this, [VOICE_STATE_UPDATE, object2]);
|
||||
}
|
||||
|
||||
function value_95158(a0, {query, continuationToken}) { // fn#95158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:1610, offset: 0x02133b02, size: 118 bytes, params: 3, frame: 19
|
||||
const send = this.send;
|
||||
let value = environment.__proto__;
|
||||
const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode;
|
||||
const SEARCH_RECENT_MEMBERS = Opcode.SEARCH_RECENT_MEMBERS;
|
||||
value = null;
|
||||
Reflect.apply(send, this, [SEARCH_RECENT_MEMBERS, {guild_id: a0, query: value != query ? query : '',
|
||||
continuation_token: value != continuationToken ? continuationToken : value}]);
|
||||
}
|
||||
|
||||
function value_95159(a0) { // fn#95159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:1806, offset: 0x02133b78, size: 145 bytes, params: 2, frame: 17
|
||||
const env0_1 = a0;
|
||||
const env0_2 = {};
|
||||
const env0_3 = 0;
|
||||
(importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(a0).forEach(_fun95160);
|
||||
if (env0_3 > 0) {
|
||||
this.send((require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode.GUILD_SUBSCRIPTIONS_BULK,
|
||||
{subscriptions: env0_2});
|
||||
}
|
||||
}
|
||||
|
||||
function value_95162(a0, a1, a2) { // fn#95162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:2203, offset: 0x02133cf0, size: 91 bytes, params: 4, frame: 16
|
||||
let value = a3;
|
||||
const r5 = value !== undefined ? value : null;
|
||||
const send = this.send;
|
||||
value = environment.__proto__;
|
||||
const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode;
|
||||
const STREAM_CREATE = Opcode.STREAM_CREATE;
|
||||
Reflect.apply(send, this, [STREAM_CREATE, {type: a0, guild_id: a1, channel_id: a2, preferred_region: r5}]);
|
||||
}
|
||||
|
||||
function value_95167(a0, a1, a2) { // fn#95167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:2745, offset: 0x02133e53, size: 97 bytes, params: 4, frame: 17
|
||||
const send = this.send;
|
||||
const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode;
|
||||
const REQUEST_FORUM_UNREADS = Opcode.REQUEST_FORUM_UNREADS;
|
||||
const object2 = {guild_id: a0, channel_id: a1};
|
||||
object2.threads = a2.map(function(a0) {
|
||||
return {thread_id: a0.threadId, ack_message_id: a0.ackMessageId};
|
||||
});
|
||||
Reflect.apply(send, this, [REQUEST_FORUM_UNREADS, object2]);
|
||||
}
|
||||
|
||||
function _fun95160(a0) { // fn#95160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:1856, offset: 0x02133c09, size: 168 bytes, params: 2, frame: 18
|
||||
var binding;
|
||||
var send;
|
||||
var value2;
|
||||
const property = env0_1[a0];
|
||||
const JSON = global.JSON;
|
||||
const length = JSON.stringify([a0, property]).length;
|
||||
if (env0_3 + length > 15360) {
|
||||
binding = env0_0;
|
||||
send = binding.send;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
Reflect.apply(send, binding,
|
||||
[(require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode.GUILD_SUBSCRIPTIONS_BULK,
|
||||
{subscriptions: env0_2}]);
|
||||
env0_2 = {};
|
||||
env0_3 = 0;
|
||||
}
|
||||
env0_2[a0] = property;
|
||||
env0_3 += length;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Metro module 12496; source: modules/gateway/GatewaySocketOpcode.tsx; dependencies: [2] */
|
||||
function _fun95176(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12686:6, offset: 0x021340e1, size: 625 bytes, params: 8, frame: 16
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {DISPATCH: 0};
|
||||
object2[0] = 'DISPATCH';
|
||||
object2.HEARTBEAT = 1;
|
||||
object2[1] = 'HEARTBEAT';
|
||||
object2.IDENTIFY = 2;
|
||||
object2[2] = 'IDENTIFY';
|
||||
object2.PRESENCE_UPDATE = 3;
|
||||
object2[3] = 'PRESENCE_UPDATE';
|
||||
object2.VOICE_STATE_UPDATE = 4;
|
||||
object2[4] = 'VOICE_STATE_UPDATE';
|
||||
object2.VOICE_SERVER_PING = 5;
|
||||
object2[5] = 'VOICE_SERVER_PING';
|
||||
object2.RESUME = 6;
|
||||
object2[6] = 'RESUME';
|
||||
object2.RECONNECT = 7;
|
||||
object2[7] = 'RECONNECT';
|
||||
object2.REQUEST_GUILD_MEMBERS = 8;
|
||||
object2[8] = 'REQUEST_GUILD_MEMBERS';
|
||||
object2.INVALID_SESSION = 9;
|
||||
object2[9] = 'INVALID_SESSION';
|
||||
object2.HELLO = 10;
|
||||
object2[10] = 'HELLO';
|
||||
object2.HEARTBEAT_ACK = 11;
|
||||
object2[11] = 'HEARTBEAT_ACK';
|
||||
object2.CALL_CONNECT = 13;
|
||||
object2[13] = 'CALL_CONNECT';
|
||||
object2.GUILD_SUBSCRIPTIONS = 14;
|
||||
object2[14] = 'GUILD_SUBSCRIPTIONS';
|
||||
object2.STREAM_CREATE = 18;
|
||||
object2[18] = 'STREAM_CREATE';
|
||||
object2.STREAM_DELETE = 19;
|
||||
object2[19] = 'STREAM_DELETE';
|
||||
object2.STREAM_WATCH = 20;
|
||||
object2[20] = 'STREAM_WATCH';
|
||||
object2.STREAM_PING = 21;
|
||||
object2[21] = 'STREAM_PING';
|
||||
object2.STREAM_SET_PAUSED = 22;
|
||||
object2[22] = 'STREAM_SET_PAUSED';
|
||||
object2.REQUEST_GUILD_APPLICATION_COMMANDS = 24;
|
||||
object2[24] = 'REQUEST_GUILD_APPLICATION_COMMANDS';
|
||||
object2.REQUEST_FORUM_UNREADS = 28;
|
||||
object2[28] = 'REQUEST_FORUM_UNREADS';
|
||||
object2.REMOTE_COMMAND = 29;
|
||||
object2[29] = 'REMOTE_COMMAND';
|
||||
object2.GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH = 30;
|
||||
object2[30] = 'GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH';
|
||||
object2.REQUEST_SOUNDBOARD_SOUNDS = 31;
|
||||
object2[31] = 'REQUEST_SOUNDBOARD_SOUNDS';
|
||||
object2.REQUEST_LAST_MESSAGES = 34;
|
||||
object2[34] = 'REQUEST_LAST_MESSAGES';
|
||||
object2.SEARCH_RECENT_MEMBERS = 35;
|
||||
object2[35] = 'SEARCH_RECENT_MEMBERS';
|
||||
object2.GUILD_SUBSCRIPTIONS_BULK = 37;
|
||||
object2[37] = 'GUILD_SUBSCRIPTIONS_BULK';
|
||||
object2.GUILD_CHANNELS_RESYNC = 38;
|
||||
object2[38] = 'GUILD_CHANNELS_RESYNC';
|
||||
object2.REQUEST_CHANNEL_MEMBER_COUNT = 39;
|
||||
object2[39] = 'REQUEST_CHANNEL_MEMBER_COUNT';
|
||||
object2.QOS_HEARTBEAT = 40;
|
||||
object2[40] = 'QOS_HEARTBEAT';
|
||||
object2.UPDATE_TIME_SPENT_SESSION_ID = 41;
|
||||
object2[41] = 'UPDATE_TIME_SPENT_SESSION_ID';
|
||||
object2.REQUEST_CHANNEL_INFO = 43;
|
||||
object2[43] = 'REQUEST_CHANNEL_INFO';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewaySocketOpcode.tsx');
|
||||
exports.Opcode = object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 12490; source: modules/gateway/GatewaySocketSingleton.tsx; dependencies: [1226, 3, 12491, 12528, 12531, 9493, 683, 660, 477, 3767, 1458, 694, 2] */
|
||||
function _fun95044(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:6, offset: 0x0212fa50, size: 460 bytes, params: 8, frame: 23
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('ConnectionStore');
|
||||
value = importDefault(12491) /* metro dependency 12491: GatewaySocket */;
|
||||
value = new value();
|
||||
const value6 = new (importDefault(12528) /* metro dependency 12528: LocalPresenceStateManager */)(value);
|
||||
const value10 = new (importDefault(12531) /* metro dependency 12531: LocalVoiceStateManager */)(value);
|
||||
value.handleIdentify = handleIdentify;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isDesktop()) {
|
||||
(importDefault(3767) /* metro dependency 3767: DiscordNative */).powerMonitor.on('resume', _fun95046);
|
||||
}
|
||||
(importDefault(1458) /* metro dependency 1458: NetworkUtils */).addOfflineCallback(_fun95047);
|
||||
(importDefault(1458) /* metro dependency 1458: NetworkUtils */).addOnlineCallback(_fun95048);
|
||||
value.on('disconnect', _fun95049);
|
||||
value.on('close', _fun95050);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewaySocketSingleton.tsx');
|
||||
exports.socket = value;
|
||||
exports.localPresenceState = value6;
|
||||
exports.localVoiceState = value10;
|
||||
}
|
||||
|
||||
function handleIdentify() { // fn#95045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:208, offset: 0x0212fc1c, size: 258 bytes, params: 1, frame: 19
|
||||
var object3;
|
||||
const token = AuthenticationStore.getToken();
|
||||
env0_4.verbose('handleIdentify called', {hasToken: token != null});
|
||||
if (token == null) {
|
||||
return null;
|
||||
}
|
||||
const state = (importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */).getState();
|
||||
const installationForTracking = AuthenticationStore.getInstallationForTracking();
|
||||
object3 = {token: token};
|
||||
const object4 = {};
|
||||
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const getSuperProperties = defaultImport2.getSuperProperties;
|
||||
copyDataProperties(object4, Reflect.apply(getSuperProperties, defaultImport2, []), defaultImport2);
|
||||
object4['client_app_state'] = state;
|
||||
object4['is_fast_connect'] = false;
|
||||
object4['gateway_connect_reasons'] = (importAll(660) /* metro dependency 660: RequestGatewaySocket */).describeConnectionReasons();
|
||||
copyDataProperties(object4, installationForTracking != null ? {installation_id: installationForTracking} : {},
|
||||
defaultImport2);
|
||||
object3.properties = object4;
|
||||
object3.presence = env0_6.getInitialState();
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _fun95046() { // fn#95046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:645, offset: 0x0212fd1e, size: 35 bytes, params: 1, frame: 13
|
||||
env0_5.expeditedHeartbeat(5000, 'power monitor resumed');
|
||||
}
|
||||
|
||||
function _fun95047() { // fn#95047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:732, offset: 0x0212fd41, size: 38 bytes, params: 1, frame: 15
|
||||
env0_5.networkStateChange(15000, 'network detected offline.', false);
|
||||
}
|
||||
|
||||
function _fun95048() { // fn#95048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:826, offset: 0x0212fd67, size: 35 bytes, params: 1, frame: 13
|
||||
env0_5.networkStateChange(5000, 'network detected online.');
|
||||
}
|
||||
|
||||
function _fun95049({code, reason}) { // fn#95049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:906, offset: 0x0212fd8a, size: 70 bytes, params: 2, frame: 15
|
||||
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatcher.dispatch({type: 'CONNECTION_CLOSED', code: code, reason: reason});
|
||||
}
|
||||
|
||||
function _fun95050({code, reason}) { // fn#95050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12680:1007, offset: 0x0212fdd0, size: 70 bytes, params: 2, frame: 15
|
||||
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatcher.dispatch({type: 'CONNECTION_INTERRUPTED', code: code, reason: reason});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 12506; source: modules/gateway/GatewayZstdUtils.native.tsx; dependencies: [27, 477, 12507, 2] */
|
||||
function _fun95331(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12696:6, offset: 0x02139027, size: 137 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayZstdUtils.native.tsx');
|
||||
exports.supportsZstd = supportsZstd;
|
||||
exports.createZstdContextWeb = function() {
|
||||
var Error = global.Error;
|
||||
throw new Error('Attempting to use createZstdContextWeb in a native context. Use MobileGatewayCompressionHandler instead.');
|
||||
};
|
||||
}
|
||||
|
||||
function supportsZstd() { // fn#95332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12696:212, offset: 0x021390b0, size: 115 bytes, params: 1, frame: 14
|
||||
var supportsZstd;
|
||||
var r0;
|
||||
var DCDCompressionManager;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
value = importDefault(12507) /* metro dependency 12507: NativeCompressionModule */;
|
||||
r0 = value.getConstants().supportsZstd;
|
||||
} else {
|
||||
DCDCompressionManager = NativeModules.DCDCompressionManager;
|
||||
supportsZstd = DCDCompressionManager == null ? value2 : DCDCompressionManager.supportsZstd;
|
||||
r0 = supportsZstd != null && supportsZstd;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* Metro module 12528; source: modules/gateway/LocalPresenceStateManager.tsx; dependencies: [6, 7, 15, 17, 18, 6876, 12529, 12530, 2] */
|
||||
function _fun95452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12718:6, offset: 0x02146b4b, size: 222 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 env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
||||
let value = importDefault(12530) /* metro dependency 12530: StateManager */;
|
||||
value = _fun95456(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/LocalPresenceStateManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_95453() { // fn#95453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12718:158, offset: 0x02146c29, 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_95453_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun95456(a0) { // fn#95456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12718:357, offset: 0x02146c8b, size: 203 bytes, params: 2, frame: 16
|
||||
const closure = LocalPresenceStateManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'getInitialState', value: function() {
|
||||
return SelfPresenceStore.getLocalPresence();
|
||||
}}, {key: 'getNextState', value: function() {
|
||||
return SelfPresenceStore.getLocalPresence();
|
||||
}}, {key: 'shouldCommit', value: function() {
|
||||
return this.socket.isSessionEstablished();
|
||||
}}, {key: 'emitPresenceUpdate', value: function({status, since, activities, afk}) {
|
||||
this.socket.presenceUpdate(status, since, activities, afk);
|
||||
}}, {key: 'handleConnectionOpen', value: function() {
|
||||
this.update({}, !this.switchingAccounts);
|
||||
this.switchingAccounts = false;
|
||||
}}, {key: 'handleAccountSwitch', value: function() {
|
||||
this.switchingAccounts = true;
|
||||
this.reset();
|
||||
this.emitPresenceUpdate(this.getState());
|
||||
}}]);
|
||||
}
|
||||
|
||||
function LocalPresenceStateManager(a0) { // fn#95457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12718:369, offset: 0x02146d56, size: 187 bytes, params: 2, frame: 21
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, LocalPresenceStateManager);
|
||||
const items2 = [false];
|
||||
const value3 = env1_5(LocalPresenceStateManager);
|
||||
const value6 = env1_4(this, _isNativeReflectConstruct_95453() ? global.Reflect.construct(value3, items2,
|
||||
env1_5(this).constructor) : value3.apply(this, items2));
|
||||
value6.socket = a0;
|
||||
value6.switchingAccounts = false;
|
||||
value6.didCommit = (importDefault(12529) /* metro dependency 12529: rateLimit */)(5, 20000,
|
||||
value6.emitPresenceUpdate.bind(value6));
|
||||
return value6;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/* Metro module 12531; source: modules/gateway/LocalVoiceStateManager.tsx; dependencies: [6, 7, 15, 17, 18, 4266, 4492, 1379, 4259, 4402, 661, 3829, 1391, 12382, 12530, 2] */
|
||||
function _fun95477(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:6, offset: 0x0214736f, size: 328 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 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const runningGameStoreNative = importDefault(4266) /* metro dependency 4266: RunningGameStoreNative */;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const rtcRegionStore = importDefault(4402) /* metro dependency 4402: RTCRegionStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.ApplicationStreamStates;
|
||||
const env0_13 = value.ChannelTypes;
|
||||
const env0_14 = value.VoiceFlags;
|
||||
value = importDefault(12530) /* metro dependency 12530: StateManager */;
|
||||
value = _fun95481(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/LocalVoiceStateManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_95478() { // fn#95478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:269, offset: 0x021474b7, 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_95478_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun95481(a0) { // fn#95481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:468, offset: 0x02147519, size: 228 bytes, params: 2, frame: 16
|
||||
const closure = LocalVoiceStateManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'guildId', get: function() {
|
||||
return this.getState().guildId;
|
||||
}}, {key: 'channelId', get: function() {
|
||||
return this.getState().channelId;
|
||||
}}, {key: 'computeVoiceFlags', value: value_95485}, {key: 'getInitialState', value: function() {
|
||||
var object = {'guildId': null, 'channelId': null, 'selfMute': null, 'selfDeaf': null, 'selfVideo': null,
|
||||
'preferredRegion': null, 'preferredRegions': null, 'videoStreamParameters': null, 'flags': 0};
|
||||
object.selfMute = MediaEngineStore.isSelfMute();
|
||||
object.selfDeaf = MediaEngineStore.isSelfDeaf();
|
||||
object.selfVideo = MediaEngineStore.isVideoEnabled();
|
||||
return object;
|
||||
}}, {key: 'getNextState', value: value_95487}, {key: 'shouldCommit', value: function() {
|
||||
return this.socket.isSessionEstablished();
|
||||
}}, {key: 'didCommit', value: value_95489}]);
|
||||
}
|
||||
|
||||
function LocalVoiceStateManager(a0) { // fn#95482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:480, offset: 0x021475fd, size: 117 bytes, params: 2, frame: 19
|
||||
let value = environment.__proto__;
|
||||
env1_2(this, LocalVoiceStateManager);
|
||||
const value3 = env1_5(LocalVoiceStateManager);
|
||||
value = env1_4(this, _isNativeReflectConstruct_95478() ? global.Reflect.construct(value3, [],
|
||||
env1_5(this).constructor) : value3.apply(this, undefined));
|
||||
value.socket = a0;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_95485() { // fn#95485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:957, offset: 0x0214769a, size: 308 bytes, params: 1, frame: 20
|
||||
var r1;
|
||||
var r3;
|
||||
var r5;
|
||||
var currentUserActiveStream;
|
||||
var value6;
|
||||
var currentUserActiveStream2;
|
||||
var visibleGame;
|
||||
const value2 = undefined;
|
||||
const ClipsAllowVoiceRecording = (require(3829) /* metro dependency 3829: UserSettings */).ClipsAllowVoiceRecording;
|
||||
const setting = ClipsAllowVoiceRecording.getSetting();
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
let setFlag = flagUtilsModule.setFlag;
|
||||
const ALLOW_VOICE_RECORDING = VoiceFlags.ALLOW_VOICE_RECORDING;
|
||||
const value4 = Reflect.apply(setFlag, flagUtilsModule, [0, ALLOW_VOICE_RECORDING, setting]);
|
||||
const isClipsEnabled2 = (require(12382) /* metro dependency 12382: isClipsEnabled */).isClipsEnabled();
|
||||
if (isClipsEnabled2) {
|
||||
currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream();
|
||||
value6 = (currentUserActiveStream == null ? value2 : currentUserActiveStream.state) === ApplicationStreamStates.ACTIVE;
|
||||
if (value6) {
|
||||
r1 = value6;
|
||||
} else {
|
||||
currentUserActiveStream2 = ApplicationStreamingStore.getCurrentUserActiveStream();
|
||||
r1 = (currentUserActiveStream2 == null ? value2 : currentUserActiveStream2.state) === ApplicationStreamStates.PAUSED;
|
||||
}
|
||||
r3 = r1;
|
||||
} else {
|
||||
r3 = isClipsEnabled2;
|
||||
}
|
||||
const isDecoupledClipsEnabled2 = (require(12382) /* metro dependency 12382: isClipsEnabled */).isDecoupledClipsEnabled();
|
||||
if (isDecoupledClipsEnabled2) {
|
||||
visibleGame = RunningGameStoreNative.getVisibleGame();
|
||||
r5 = (visibleGame == null ? value2 : visibleGame.windowHandle) != null;
|
||||
} else {
|
||||
r5 = isDecoupledClipsEnabled2;
|
||||
}
|
||||
const moduleValue4 = flagUtilsModule;
|
||||
setFlag = moduleValue4.setFlag;
|
||||
const CLIPS_ENABLED = VoiceFlags.CLIPS_ENABLED;
|
||||
r3 = !r3 ? r5 : r3;
|
||||
return Reflect.apply(setFlag, moduleValue4, [value4, CLIPS_ENABLED, r3]);
|
||||
}
|
||||
|
||||
function value_95487({guildId, channelId}) { // fn#95487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:1661, offset: 0x02147815, size: 145 bytes, params: 2, frame: 12
|
||||
const object2 = {guildId: guildId, channelId: channelId};
|
||||
object2.selfMute = MediaEngineStore.isSelfMute();
|
||||
object2.selfDeaf = MediaEngineStore.isSelfDeaf();
|
||||
object2.selfVideo = MediaEngineStore.isVideoEnabled();
|
||||
object2.preferredRegion = RTCRegionStore.getPreferredRegion();
|
||||
object2.preferredRegions = RTCRegionStore.getPreferredRegions();
|
||||
object2.videoStreamParameters = MediaEngineStore.getVideoStreamParameters();
|
||||
object2.flags = this.computeVoiceFlags();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function value_95489({guildId, channelId, selfMute, selfDeaf, selfVideo, preferredRegion, preferredRegions, videoStreamParameters, flags}) { // fn#95489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12721:2070, offset: 0x021478a6, size: 236 bytes, params: 2, frame: 23
|
||||
var value3;
|
||||
var socket;
|
||||
flags = flags === undefined ? 0 : flags;
|
||||
if (selfVideo) {
|
||||
value3 = environment.__proto__;
|
||||
if (ChannelStore.getChannel(channelId)?.type === ChannelTypes.GUILD_STAGE_VOICE) {
|
||||
socket = this.socket;
|
||||
socket.voiceStateUpdate({guildId: guildId, channelId: channelId, selfMute: selfMute, selfDeaf: selfDeaf,
|
||||
selfVideo: selfVideo, preferredRegion: preferredRegion, preferredRegions: preferredRegions,
|
||||
videoStreamParameters: videoStreamParameters, flags: flags});
|
||||
} else {
|
||||
socket = this.socket;
|
||||
socket.voiceStateUpdate({guildId: guildId, channelId: channelId, selfMute: selfMute, selfDeaf: selfDeaf,
|
||||
selfVideo: selfVideo, preferredRegion: preferredRegion, preferredRegions: preferredRegions,
|
||||
flags: flags});
|
||||
}
|
||||
} else {
|
||||
socket = this.socket;
|
||||
socket.voiceStateUpdate({guildId: guildId, channelId: channelId, selfMute: selfMute, selfDeaf: selfDeaf,
|
||||
selfVideo: selfVideo, preferredRegion: preferredRegion, preferredRegions: preferredRegions, flags: flags});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 12524; source: modules/gateway/PauseGatewaySocket.tsx; dependencies: [2] */
|
||||
function _fun95441(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12714:6, offset: 0x0214684e, size: 106 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/PauseGatewaySocket.tsx');
|
||||
exports.getIsPaused = getIsPaused;
|
||||
exports.setIsPaused = function(a0) {
|
||||
env0_0 = a0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 4255; source: modules/gateway/PostConnectionCallbackStore.tsx; dependencies: [4256, 4257, 694, 2] */
|
||||
function _fun35370(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4427:6, offset: 0x01070ffb, size: 229 bytes, params: 8, frame: 20
|
||||
const closure = processCallbacks;
|
||||
const handleCallback = function(a0) {
|
||||
var env0_0 = a0;
|
||||
global.setImmediate(_fun35375);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const newUserStore = importDefault(4256) /* metro dependency 4256: NewUserStore */;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const env0_2 = [];
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('CONNECTION_OPEN', closure);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('CONNECTION_RESUMED', closure);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('NUF_COMPLETE', closure);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/PostConnectionCallbackStore.tsx');
|
||||
exports.addPostConnectionCallback = addPostConnectionCallback;
|
||||
}
|
||||
|
||||
function shouldWaitForBlockingModals() { // fn#35371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4427:121, offset: 0x010710e0, size: 25 bytes, params: 1, frame: 9
|
||||
return NewUserStore.getType() != null;
|
||||
}
|
||||
|
||||
function processCallbacks() { // fn#35372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4427:185, offset: 0x010710f9, size: 47 bytes, params: 1, frame: 13
|
||||
if (!shouldWaitForBlockingModals()) {
|
||||
env0_2.forEach(function(a0) {
|
||||
handleCallback(a0);
|
||||
});
|
||||
env0_2 = [];
|
||||
}
|
||||
}
|
||||
|
||||
function handleCallback(a0) { // fn#35374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4427:285, offset: 0x0107113b, size: 31 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
global.setImmediate(_fun35375);
|
||||
}
|
||||
|
||||
function addPostConnectionCallback(a0) { // fn#35376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4427:607, offset: 0x0107115a, size: 65 bytes, params: 2, frame: 12
|
||||
if (GatewayConnectionStore.isConnectedOrOverlay()) {
|
||||
if (shouldWaitForBlockingModals()) {
|
||||
env0_2.push(a0);
|
||||
} else {
|
||||
handleCallback(a0);
|
||||
}
|
||||
} else {
|
||||
env0_2.push(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 12526; source: modules/gateway/PrivateChannelHidingExperiment.tsx; dependencies: [1854, 2, 12527] */
|
||||
function _fun95446(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12716:6, offset: 0x02146929, size: 279 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-02-private-channel-hiding',
|
||||
'kind': 'user', defaultConfig: {'enableObfuscation': false, 'enableIntegrityCheck': false},
|
||||
variations: {[1]: {'enableObfuscation': true, 'enableIntegrityCheck': false}, [2]: {'enableObfuscation': true,
|
||||
'enableIntegrityCheck': true}, [3]: {'enableObfuscation': false, 'enableIntegrityCheck': false}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/PrivateChannelHidingExperiment.tsx');
|
||||
const getCachedPrivateChannelObfuscation = (require(12527) /* metro dependency 12527: PrivateChannelHidingExperimentCache */).getCachedPrivateChannelObfuscation;
|
||||
exports.getCachedPrivateChannelObfuscation = getCachedPrivateChannelObfuscation;
|
||||
const PRIVATE_CHANNEL_OBFUSCATION_KEY = (require(12527) /* metro dependency 12527: PrivateChannelHidingExperimentCache */).PRIVATE_CHANNEL_OBFUSCATION_KEY;
|
||||
exports.PRIVATE_CHANNEL_OBFUSCATION_KEY = PRIVATE_CHANNEL_OBFUSCATION_KEY;
|
||||
exports.isChannelMetadataObfuscationEnabled = isChannelMetadataObfuscationEnabled;
|
||||
exports.useIsChannelMetadataObfuscationEnabled = useIsChannelMetadataObfuscationEnabled;
|
||||
exports.isChannelMetadataIntegrityCheckEnabled = isChannelMetadataIntegrityCheckEnabled;
|
||||
}
|
||||
|
||||
function isChannelMetadataObfuscationEnabled(a0) { // fn#95447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12716:677, offset: 0x02146a40, size: 35 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
const getConfig = binding.getConfig;
|
||||
return Reflect.apply(getConfig, binding, [{location: a0}]).enableObfuscation;
|
||||
}
|
||||
|
||||
function useIsChannelMetadataObfuscationEnabled(a0) { // fn#95448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12716:818, offset: 0x02146a63, size: 35 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
const useConfig = binding.useConfig;
|
||||
return Reflect.apply(useConfig, binding, [{location: a0}]).enableObfuscation;
|
||||
}
|
||||
|
||||
function isChannelMetadataIntegrityCheckEnabled(a0) { // fn#95449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12716:962, offset: 0x02146a86, size: 35 bytes, params: 2, frame: 12
|
||||
const binding = env0_0;
|
||||
const getConfig = binding.getConfig;
|
||||
return Reflect.apply(getConfig, binding, [{location: a0}]).enableIntegrityCheck;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 12527; source: modules/gateway/PrivateChannelHidingExperimentCache.tsx; dependencies: [587, 2] */
|
||||
function _fun95450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12717:6, offset: 0x02146aa9, size: 108 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('modules/gateway/PrivateChannelHidingExperimentCache.tsx');
|
||||
exports.PRIVATE_CHANNEL_OBFUSCATION_KEY = 'private_channel_obfuscation';
|
||||
exports.getCachedPrivateChannelObfuscation = getCachedPrivateChannelObfuscation;
|
||||
}
|
||||
|
||||
function getCachedPrivateChannelObfuscation() { // fn#95451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12717:290, offset: 0x02146b15, size: 54 bytes, params: 1, frame: 11
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
return Storage.get('private_channel_obfuscation') != null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
/* Metro module 660; source: modules/gateway/RequestGatewaySocket.tsx; dependencies: [5, 661, 681, 683, 2] */
|
||||
function _fun7401(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#7401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:6, offset: 0x00d1a81a, size: 309 bytes, params: 8, frame: 24
|
||||
let env0_0 = require;
|
||||
const makeBridgeToken = function(a0) {
|
||||
return 'BRIDGE:' + a0;
|
||||
};
|
||||
const closure = isRequested;
|
||||
const closure2 = function(a0) {
|
||||
var env0_0 = a0;
|
||||
withStateTransitions(_fun7407);
|
||||
};
|
||||
const closure3 = function(a0) {
|
||||
var env0_0 = a0;
|
||||
withStateTransitions(_fun7409);
|
||||
};
|
||||
const withStateTransitions = function(a0) {
|
||||
var isRequestedBinding = isRequested;
|
||||
isRequestedBinding();
|
||||
env0_6 = false;
|
||||
a0();
|
||||
isRequestedBinding();
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_5 = ['COLD_START'];
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/RequestGatewaySocket.tsx');
|
||||
exports.isRequested = closure;
|
||||
exports.recordStartHeadlessTask = function() {
|
||||
env0_6 = false;
|
||||
};
|
||||
exports.describeConnectionReasons = describeConnectionReasons;
|
||||
exports.setRequestedBy = closure2;
|
||||
exports.startBridgeTo = startBridgeTo;
|
||||
exports.stopRequest = closure3;
|
||||
exports.withRequest = function() {
|
||||
return _withRequest.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function addToken(a0) { // fn#7402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:163, offset: 0x00d1a94f, size: 60 bytes, params: 2, frame: 14
|
||||
env0_7.set(a0, (env0_7.get(a0) ?? 0) + 1);
|
||||
}
|
||||
|
||||
function deleteToken(a0) { // fn#7403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:228, offset: 0x00d1a98b, size: 82 bytes, params: 2, frame: 15
|
||||
const value2 = env0_7.get(a0);
|
||||
const value3 = 0;
|
||||
const value4 = (value2 ?? value3) - 1;
|
||||
if (value4 <= value3) {
|
||||
env0_7.delete(a0);
|
||||
} else {
|
||||
env0_7.set(a0, value4);
|
||||
}
|
||||
}
|
||||
|
||||
function isRequested() { // fn#7405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:363, offset: 0x00d1a9fa, size: 27 bytes, params: 1, frame: 3
|
||||
return env0_7.size > 0 || env0_6;
|
||||
}
|
||||
|
||||
function setRequestedBy(a0) { // fn#7406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:405, offset: 0x00d1aa15, size: 30 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
withStateTransitions(_fun7407);
|
||||
}
|
||||
|
||||
function stopRequest(a0) { // fn#7408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:506, offset: 0x00d1aa5c, size: 30 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
withStateTransitions(_fun7409);
|
||||
}
|
||||
|
||||
function _withRequest() { // fn#7410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:573, offset: 0x00d1aa91, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun7412).apply(this, arguments);
|
||||
}
|
||||
|
||||
function describeConnectionReasons() { // fn#7415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:989, offset: 0x00d1ab59, size: 102 bytes, params: 1, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
const r3 = env0_6 ? env0_5 : [];
|
||||
const items2 = [];
|
||||
const value2 = arraySpread(items2, r3, 0, undefined);
|
||||
const binding = env0_7;
|
||||
arraySpread(items2, binding.keys(), value2, binding);
|
||||
if (items2.sort().length > 0) {
|
||||
value = value.join(',');
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = 'NO_REASONS';
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function startBridgeTo(a0) { // fn#7416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:1155, offset: 0x00d1abbf, size: 110 bytes, params: 2, frame: 15
|
||||
const env0_0 = makeBridgeToken(a0);
|
||||
const env0_1 = global.performance.now();
|
||||
withStateTransitions(_fun7417);
|
||||
(require(681) /* metro dependency 681: requestSafeIdleCallback */).requestSafeIdleCallback(_fun7418,
|
||||
{timeout: 5000});
|
||||
}
|
||||
|
||||
function _fun7407() { // fn#7407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:454, offset: 0x00d1aa33, size: 41 bytes, params: 1, frame: 12
|
||||
const addTokenBinding = addToken;
|
||||
const binding = env0_0;
|
||||
addTokenBinding(binding);
|
||||
deleteToken(makeBridgeToken(binding));
|
||||
}
|
||||
|
||||
function _fun7409() { // fn#7409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:552, offset: 0x00d1aa7a, size: 23 bytes, params: 1, frame: 11
|
||||
deleteToken(env0_0);
|
||||
}
|
||||
|
||||
function* _fun7412(a0, a1) { // fn#7412, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:620, offset: 0x00d1aaca, size: 98 bytes, params: 3, frame: 15
|
||||
var binding;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_12;
|
||||
} catch (error) {
|
||||
env2_13(a0);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
binding(a0);
|
||||
} catch (error) {
|
||||
env2_13(a0);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value3 = a1();
|
||||
} catch (error) {
|
||||
env2_13(a0);
|
||||
throw error;
|
||||
}
|
||||
yield value3;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
env2_13(a0);
|
||||
throw error;
|
||||
}
|
||||
if (value5) {
|
||||
}
|
||||
env2_13(a0);
|
||||
return value4;
|
||||
}
|
||||
|
||||
function _fun7418() { // fn#7418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:710:1299, offset: 0x00d1ac44, size: 128 bytes, params: 1, frame: 17
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GATEWAY_BRIDGE_TIMEOUT;
|
||||
var object2;
|
||||
const binding = env1_7;
|
||||
if (binding.has(env0_0)) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GATEWAY_BRIDGE_TIMEOUT = AnalyticEvents.GATEWAY_BRIDGE_TIMEOUT;
|
||||
object2 = {bridge_token: env0_0};
|
||||
object2.cleared_after = global.performance.now() - env0_1;
|
||||
Reflect.apply(track, defaultImport, [GATEWAY_BRIDGE_TIMEOUT, object2]);
|
||||
}
|
||||
stopRequest(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
/* Metro module 12501; source: modules/gateway/WorkSchedulerTelemetry.tsx; dependencies: [57, 6, 7, 22, 2] */
|
||||
function _fun95236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:6, offset: 0x021362df, size: 635 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
object4 = {LONGER_DISPATCH: 'longer_dispatch', EXCEEDED_MAX_CONSECUTIVE_FLUSHES: 'exceeded_max_consecutive_flushes',
|
||||
FIRED_DUE_TO_MAX_TIMEOUT: 'fired_due_to_max_timeout',
|
||||
SKIP_IDLE_CALLBACK_DUE_TO_BACKGROUNDED: 'skip_idle_callback_due_to_backgrounded'};
|
||||
const object5 = {TIME_TO_FIRE_IDLE_CALLBACK: 'time_to_fire_idle_callback',
|
||||
TIME_TO_QUEUE_EMPTY: 'time_to_flush_all_work', TIME_OVER_DEADLINE: 'time_over_deadline',
|
||||
DEADLINE_INITIAL_TIME_REMAINING: 'initial_time_of_deadline'};
|
||||
const object6 = {COUNT_DISPATCHES_LEFT_AFTER_YIELD: 'count_dispatches_left_after_yield',
|
||||
COUNT_FLUSH_BEFORE_QUEUE_EMPTY: 'count_flush_before_queue_empty',
|
||||
COUNT_INITIAL_DISPATCHS_LENGTH: 'count_initial_dispatches_length'};
|
||||
Object = global.Object;
|
||||
let freeze = Object.freeze;
|
||||
let TIME_TO_FIRE_IDLE_CALLBACK = object5.TIME_TO_FIRE_IDLE_CALLBACK;
|
||||
let TIME_TO_QUEUE_EMPTY = object5.TIME_TO_QUEUE_EMPTY;
|
||||
let TIME_OVER_DEADLINE = object5.TIME_OVER_DEADLINE;
|
||||
let DEADLINE_INITIAL_TIME_REMAINING = object5.DEADLINE_INITIAL_TIME_REMAINING;
|
||||
const env0_5 = Reflect.apply(freeze, Object, [{[TIME_TO_FIRE_IDLE_CALLBACK]: null, [TIME_TO_QUEUE_EMPTY]: null,
|
||||
[TIME_OVER_DEADLINE]: null, [DEADLINE_INITIAL_TIME_REMAINING]: null}]);
|
||||
Object = global.Object;
|
||||
freeze = Object.freeze;
|
||||
TIME_TO_FIRE_IDLE_CALLBACK = object5.TIME_TO_FIRE_IDLE_CALLBACK;
|
||||
TIME_TO_QUEUE_EMPTY = object5.TIME_TO_QUEUE_EMPTY;
|
||||
TIME_OVER_DEADLINE = object5.TIME_OVER_DEADLINE;
|
||||
DEADLINE_INITIAL_TIME_REMAINING = object5.DEADLINE_INITIAL_TIME_REMAINING;
|
||||
const env0_6 = Reflect.apply(freeze, Object, [{[TIME_TO_FIRE_IDLE_CALLBACK]: [0, 0], [TIME_TO_QUEUE_EMPTY]: [0, 0],
|
||||
[TIME_OVER_DEADLINE]: [0, 0], [DEADLINE_INITIAL_TIME_REMAINING]: [0, 0]}]);
|
||||
Object = global.Object;
|
||||
freeze = Object.freeze;
|
||||
const COUNT_FLUSH_BEFORE_QUEUE_EMPTY = object6.COUNT_FLUSH_BEFORE_QUEUE_EMPTY;
|
||||
const COUNT_DISPATCHES_LEFT_AFTER_YIELD = object6.COUNT_DISPATCHES_LEFT_AFTER_YIELD;
|
||||
const COUNT_INITIAL_DISPATCHS_LENGTH = object6.COUNT_INITIAL_DISPATCHS_LENGTH;
|
||||
const env0_7 = Reflect.apply(freeze, Object, [{[COUNT_FLUSH_BEFORE_QUEUE_EMPTY]: [0, 0],
|
||||
[COUNT_DISPATCHES_LEFT_AFTER_YIELD]: [0, 0], [COUNT_INITIAL_DISPATCHS_LENGTH]: [0, 0]}]);
|
||||
Object = global.Object;
|
||||
freeze = Object.freeze;
|
||||
const LONGER_DISPATCH = object4.LONGER_DISPATCH;
|
||||
const EXCEEDED_MAX_CONSECUTIVE_FLUSHES = object4.EXCEEDED_MAX_CONSECUTIVE_FLUSHES;
|
||||
const FIRED_DUE_TO_MAX_TIMEOUT = object4.FIRED_DUE_TO_MAX_TIMEOUT;
|
||||
const SKIP_IDLE_CALLBACK_DUE_TO_BACKGROUNDED = object4.SKIP_IDLE_CALLBACK_DUE_TO_BACKGROUNDED;
|
||||
const env0_8 = Reflect.apply(freeze, Object, [{[LONGER_DISPATCH]: 0, [EXCEEDED_MAX_CONSECUTIVE_FLUSHES]: 0,
|
||||
[FIRED_DUE_TO_MAX_TIMEOUT]: 0, [SKIP_IDLE_CALLBACK_DUE_TO_BACKGROUNDED]: 0}]);
|
||||
const value = _fun95237();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/WorkSchedulerTelemetry.tsx');
|
||||
exports.WorkSchedulerTelemetryEvent = object4;
|
||||
exports.WorkSchedulerTelemetryTiming = object5;
|
||||
exports.WorkSchedulerTelemetryMeasurement = object6;
|
||||
exports.WorkSchedulerTelemetry = value;
|
||||
}
|
||||
|
||||
function _fun95237() { // fn#95237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:1478, offset: 0x0213655a, size: 321 bytes, params: 1, frame: 15
|
||||
return env0_4(WorkSchedulerTelemetry, [{key: 'reset', value: value_95239}, {key: 'clearTime', value: function(a0) {
|
||||
this._timeTracking[a0] = null;
|
||||
}}, {key: '_storeTimeValue', value: value_95241}, {key: 'time', value: function(a0) {
|
||||
if (this._enabled) {
|
||||
this._timeTracking[a0] = global.performance.now();
|
||||
}
|
||||
}}, {key: 'timeEnd', value: function(a0) {
|
||||
var property;
|
||||
if (this._enabled) {
|
||||
property = this._timeTracking[a0];
|
||||
if (property != null) {
|
||||
this._storeTimeValue(a0, global.performance.now() - property);
|
||||
this._timeTracking[a0] = null;
|
||||
}
|
||||
}
|
||||
}}, {key: 'timeTrack', value: function(a0, a1) {
|
||||
if (this._enabled) {
|
||||
this._storeTimeValue(a0, a1);
|
||||
}
|
||||
}}, {key: 'measure', value: value_95245}, {key: 'track', value: function(a0) {
|
||||
if (this._enabled) {
|
||||
this._eventCounts[a0] += 1;
|
||||
}
|
||||
}}, {key: 'toggleTelemetry', value: function(a0) {
|
||||
this._enabled = a0;
|
||||
}}, {key: 'isTelemetryEnabled', get: function() {
|
||||
return this._enabled;
|
||||
}}, {key: 'generateTelemetry', value: value_95249}]);
|
||||
}
|
||||
|
||||
function WorkSchedulerTelemetry() { // fn#95238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:1499, offset: 0x0213669b, size: 166 bytes, params: 1, frame: 18
|
||||
env1_3(this, WorkSchedulerTelemetry);
|
||||
const moduleValue = require(22) /* metro dependency 22 */;
|
||||
this._timeTracking = moduleValue.cloneDeep(env1_5);
|
||||
const moduleValue2 = moduleValue;
|
||||
this._timingStats = moduleValue2.cloneDeep(env1_6);
|
||||
const moduleValue3 = moduleValue;
|
||||
this._measurements = moduleValue3.cloneDeep(env1_7);
|
||||
const moduleValue4 = moduleValue;
|
||||
this._eventCounts = moduleValue4.cloneDeep(env1_8);
|
||||
this._enabled = false;
|
||||
}
|
||||
|
||||
function value_95239() { // fn#95239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:1761, offset: 0x02136741, size: 141 bytes, params: 1, frame: 17
|
||||
const moduleValue = require(22) /* metro dependency 22 */;
|
||||
this._timeTracking = moduleValue.cloneDeep(env1_5);
|
||||
const moduleValue2 = moduleValue;
|
||||
this._timingStats = moduleValue2.cloneDeep(env1_6);
|
||||
const moduleValue3 = moduleValue;
|
||||
this._measurements = moduleValue3.cloneDeep(env1_7);
|
||||
const moduleValue4 = moduleValue;
|
||||
this._eventCounts = moduleValue4.cloneDeep(env1_8);
|
||||
}
|
||||
|
||||
function value_95241(a0, a1) { // fn#95241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:2025, offset: 0x021367e4, size: 94 bytes, params: 3, frame: 16
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_2;
|
||||
let _timingStats = this._timingStats;
|
||||
value = binding(_timingStats[a0], 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
_timingStats = this._timingStats;
|
||||
value = property * property2 + a1;
|
||||
value /= property2 + 1;
|
||||
_timingStats[a0] = [value, property2 + 1];
|
||||
}
|
||||
|
||||
function value_95245(a0, a1) { // fn#95245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:2492, offset: 0x021368e0, size: 105 bytes, params: 3, frame: 15
|
||||
var value;
|
||||
var binding;
|
||||
var _measurements;
|
||||
var property;
|
||||
var property2;
|
||||
if (this._enabled) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_2;
|
||||
_measurements = this._measurements;
|
||||
value = binding(_measurements[a0], 2);
|
||||
property = value[0];
|
||||
property2 = value[1];
|
||||
_measurements = this._measurements;
|
||||
value = property * property2 + a1;
|
||||
value /= property2 + 1;
|
||||
_measurements[a0] = [value, property2 + 1];
|
||||
}
|
||||
}
|
||||
|
||||
function value_95249() { // fn#95249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:2844, offset: 0x02136971, size: 170 bytes, params: 1, frame: 17
|
||||
let Object = global.Object;
|
||||
let value = Object.entries(this._timingStats);
|
||||
value = value.reduce(_fun95250, {});
|
||||
Object = global.Object;
|
||||
let value2 = Object.entries(this._measurements);
|
||||
let value3 = value2.reduce(_fun95251, {});
|
||||
const object2 = {};
|
||||
Object = global.Object;
|
||||
const value4 = Object.entries(this._eventCounts);
|
||||
copyDataProperties(object2, value4.reduce(function(a0, a1) {
|
||||
var r1;
|
||||
var r2;
|
||||
var r4;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a1[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 r5 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r4 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r4 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r4 = item;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
a0['count_' + r5] = '' + r4;
|
||||
return a0;
|
||||
}, {}), value2);
|
||||
copyDataProperties(object2, value, value2);
|
||||
copyDataProperties(object2, value3, value2);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun95250(a0, a1) { // fn#95250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:2903, offset: 0x02136a1b, size: 206 bytes, params: 3, frame: 21
|
||||
var r1;
|
||||
var r2;
|
||||
var r52;
|
||||
var r8;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator3;
|
||||
var item4;
|
||||
var value4;
|
||||
var error;
|
||||
let iterator = a1[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;
|
||||
const r5 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r52 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r52 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r52 = item;
|
||||
}
|
||||
}
|
||||
try {
|
||||
iterator = r52[Symbol.iterator]();
|
||||
iterator3 = iterator.next;
|
||||
item4 = Reflect.apply(iterator3, iterator, []);
|
||||
item = item4.value;
|
||||
item4 = item4.done ? undefined : iterator;
|
||||
value4 = item4 === value;
|
||||
r8 = value4 ? value : item;
|
||||
if (!value4) {
|
||||
item4.return();
|
||||
}
|
||||
} catch (error) {
|
||||
if (!r2) {
|
||||
try {
|
||||
r1.return();
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
a0['avg_' + r5] = '' + r8.toFixed(2) + 'ms';
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun95251(a0, a1) { // fn#95251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12691:3004, offset: 0x02136ae9, size: 201 bytes, params: 3, frame: 20
|
||||
var r1;
|
||||
var r2;
|
||||
var r52;
|
||||
var r8;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator3;
|
||||
var item4;
|
||||
var value4;
|
||||
var error;
|
||||
let iterator = a1[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;
|
||||
const r5 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r52 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r52 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r52 = item;
|
||||
}
|
||||
}
|
||||
try {
|
||||
iterator = r52[Symbol.iterator]();
|
||||
iterator3 = iterator.next;
|
||||
item4 = Reflect.apply(iterator3, iterator, []);
|
||||
item = item4.value;
|
||||
item4 = item4.done ? undefined : iterator;
|
||||
value4 = item4 === value;
|
||||
r8 = value4 ? value : item;
|
||||
if (!value4) {
|
||||
item4.return();
|
||||
}
|
||||
} catch (error) {
|
||||
if (!r2) {
|
||||
try {
|
||||
r1.return();
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
a0['avg_' + r5] = '' + r8.toFixed(2);
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 12494; source: modules/gateway/createWebSocket.android.tsx; dependencies: [2] */
|
||||
function _fun95145(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12684:6, offset: 0x02133492, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/createWebSocket.android.tsx');
|
||||
exports.default = function(a0, a1) {
|
||||
var WebSocket = global.WebSocket;
|
||||
var object = {};
|
||||
object.headers = {Origin: global.window.GLOBAL_ENV.NATIVE_WEBSOCKET_ORIGIN};
|
||||
var value = Object.create(WebSocket.prototype, {constructor: {value: WebSocket}});
|
||||
var value2 = new WebSocket(a0, a1, object);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,258 @@
|
||||
/* Metro module 25; source: modules/gateway/native/fast_connect.tsx; dependencies: [26, 27, 476, 3, 477, 479, 480, 660, 12525, 5231, 12507, 12494, 20, 14, 2] */
|
||||
function _fun1094(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#1094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:6, offset: 0x00c531c6, size: 291 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = createFastConnectSocket;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
require(26) /* metro dependency 26: checkEnv */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.NativeModules;
|
||||
const AppState = value.AppState;
|
||||
const env0_6 = (require(476) /* metro dependency 476: KvCacheVersionConstants */).VERSION_TO_FORCE_RESYNCING_ALL_DATA;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('FAST CONNECT');
|
||||
value.info('initial app state (import time)', AppState.currentState);
|
||||
closure();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/native/fast_connect.tsx');
|
||||
exports.createFastConnectSocket = closure;
|
||||
exports.closeFastConnectSocket = closeFastConnectSocket;
|
||||
exports.getLastFastConnectIdentifyUserId = getLastFastConnectIdentifyUserId;
|
||||
exports.identifyWebSocket = identifyWebSocket;
|
||||
}
|
||||
|
||||
function prepareIdentify(a0, a1, a2) { // fn#1095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:224, offset: 0x00c532e9, size: 715 bytes, params: 4, frame: 25
|
||||
var r5;
|
||||
var r6;
|
||||
var DCDFastConnectManager;
|
||||
var analyticsInstallation;
|
||||
var defaultImport;
|
||||
var value3;
|
||||
var useChannelObfuscation;
|
||||
var defaultImport2;
|
||||
var prepareIdentify;
|
||||
var moduleValue7;
|
||||
var defaultImport3;
|
||||
var float;
|
||||
var moduleValue8;
|
||||
const binding = env0_7;
|
||||
binding.info('prepareIdentify: app state: ', AppState.currentState);
|
||||
const value2 = undefined;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
defaultImport = importDefault(479) /* metro dependency 479: NativeFastConnectModule */;
|
||||
analyticsInstallation = defaultImport.getConstants().analyticsInstallation;
|
||||
value3 = null;
|
||||
r5 = value3 != analyticsInstallation ? analyticsInstallation : value3;
|
||||
} else {
|
||||
r5 = NativeModules.DCDFastConnectManager.analyticsInstallation;
|
||||
}
|
||||
const object3 = {token: a2};
|
||||
const object4 = {};
|
||||
const analyticsUtilsModule = importAll(480) /* metro dependency 480: AnalyticsUtils */;
|
||||
const getSuperProperties = analyticsUtilsModule.getSuperProperties;
|
||||
copyDataProperties(object4, Reflect.apply(getSuperProperties, analyticsUtilsModule, []), undefined);
|
||||
object4['client_app_state'] = AppState.currentState;
|
||||
object4['is_fast_connect'] = true;
|
||||
object4['gateway_connect_reasons'] = (importAll(660) /* metro dependency 660: RequestGatewaySocket */).describeConnectionReasons();
|
||||
const value5 = null;
|
||||
let r3 = value5 != r5 ? {installation_id: r5} : {};
|
||||
copyDataProperties(object4, r3, undefined);
|
||||
object3.properties = object4;
|
||||
const gatewayCapabilitiesModule = require(12525) /* metro dependency 12525: GatewayCapabilities */;
|
||||
const getClientCapabilities = gatewayCapabilitiesModule.getClientCapabilities;
|
||||
const moduleValue5 = platformUtilsModule;
|
||||
if (moduleValue5.isAndroid()) {
|
||||
defaultImport2 = importDefault(479) /* metro dependency 479: NativeFastConnectModule */;
|
||||
useChannelObfuscation = defaultImport2.getConstants().useChannelObfuscation;
|
||||
r5 = value5 != useChannelObfuscation && useChannelObfuscation;
|
||||
} else {
|
||||
useChannelObfuscation = NativeModules.DCDFastConnectManager.useChannelObfuscation;
|
||||
r5 = value5 != useChannelObfuscation && useChannelObfuscation;
|
||||
}
|
||||
object3.capabilities = Reflect.apply(getClientCapabilities, gatewayCapabilitiesModule,
|
||||
[{useChannelObfuscation: r5}]);
|
||||
object3.client_state = {guild_versions: {}};
|
||||
const JSON = global.JSON;
|
||||
const value8 = JSON.stringify({op: 2, d: object3});
|
||||
const moduleValue6 = platformUtilsModule;
|
||||
if (moduleValue6.isAndroid()) {
|
||||
r3 = value5 == a1 ? value2 : a1.toString();
|
||||
r6 = value5 != r3 ? r3 : value5;
|
||||
defaultImport3 = importDefault(479) /* metro dependency 479: NativeFastConnectModule */;
|
||||
prepareIdentify = defaultImport3.prepareIdentify;
|
||||
float = global.parseFloat(a0);
|
||||
moduleValue8 = require(5231) /* metro dependency 5231: isCacheEnabledNative */;
|
||||
Reflect.apply(prepareIdentify, defaultImport3, [r6, value8, float,
|
||||
moduleValue8.isCacheEnabled() ? VERSION_TO_FORCE_RESYNCING_ALL_DATA : value2]);
|
||||
} else {
|
||||
DCDFastConnectManager = NativeModules.DCDFastConnectManager;
|
||||
prepareIdentify = DCDFastConnectManager.prepareIdentify;
|
||||
moduleValue7 = require(5231) /* metro dependency 5231: isCacheEnabledNative */;
|
||||
Reflect.apply(prepareIdentify, DCDFastConnectManager, [a1, value8, a0,
|
||||
moduleValue7.isCacheEnabled() ? VERSION_TO_FORCE_RESYNCING_ALL_DATA : value5]);
|
||||
}
|
||||
return object3.client_state;
|
||||
}
|
||||
|
||||
function createFastConnectSocket() { // fn#1096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:1230, offset: 0x00c535b4, size: 63 bytes, params: 1, frame: 11
|
||||
const WebSocket = global.window.WebSocket;
|
||||
if (WebSocket != null) {
|
||||
newWebSocket();
|
||||
} else {
|
||||
env0_7.log('Skipping fast_connect because `window.WebSocket` does not exist.');
|
||||
}
|
||||
}
|
||||
|
||||
function closeFastConnectSocket() { // fn#1101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:2760, offset: 0x00c53966, size: 71 bytes, params: 1, frame: 11
|
||||
let window = global.window;
|
||||
if (window._ws != null) {
|
||||
window = global.window;
|
||||
window._ws.ws.close();
|
||||
window = global.window;
|
||||
window._ws = null;
|
||||
}
|
||||
}
|
||||
|
||||
function identifyWebSocket() { // fn#1103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:2971, offset: 0x00c539b6, size: 99 bytes, params: 1, frame: 11
|
||||
if (global.window._ws != null) {
|
||||
(importDefault(14) /* metro dependency 14: TTITracker */).beginFastConnect.measure(_fun1104);
|
||||
} else {
|
||||
env0_7.log('Skipping identifyWebSocket because socket is null');
|
||||
}
|
||||
}
|
||||
|
||||
function newWebSocket() { // fn#1097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:1288, owner: createFastConnectSocket.newWebSocket, offset: 0x00c535f3, size: 599 bytes, params: 1, frame: 25
|
||||
var environment;
|
||||
var supportsZstd;
|
||||
var defaultImport;
|
||||
var isAndroid2;
|
||||
var object2;
|
||||
var closure;
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
defaultImport = importDefault(12507) /* metro dependency 12507: NativeCompressionModule */;
|
||||
supportsZstd = defaultImport.getConstants().supportsZstd;
|
||||
} else {
|
||||
supportsZstd = NativeModules.DCDCompressionManager.supportsZstd;
|
||||
}
|
||||
const r12 = supportsZstd ? 'zstd-stream' : 'zlib-stream';
|
||||
let GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const GATEWAY_ENDPOINT = GLOBAL_ENV.GATEWAY_ENDPOINT;
|
||||
GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const API_VERSION = GLOBAL_ENV.API_VERSION;
|
||||
const value4 = '' + GATEWAY_ENDPOINT + '/?encoding=json&v=' + API_VERSION + '&compress=' + r12;
|
||||
let binding = env1_7;
|
||||
binding.log('[FAST CONNECT] ' + value4);
|
||||
const Date = global.Date;
|
||||
const env0_0 = Date.now();
|
||||
const value5 = (importDefault(12494) /* metro dependency 12494: createWebSocketAndroid */)(value4);
|
||||
const float = global.parseFloat(value5._socketId);
|
||||
if (global.isNaN(float)) {
|
||||
binding = env1_7;
|
||||
binding.log('[FAST CONNECT] Unable to create socketId from NaN value ', value5._socketId);
|
||||
} else {
|
||||
isAndroid2 = platformUtilsModule.isAndroid();
|
||||
if (supportsZstd) {
|
||||
if (isAndroid2) {
|
||||
(importDefault(12507) /* metro dependency 12507: NativeCompressionModule */).enableZstdStreamSupport(float);
|
||||
} else {
|
||||
NativeModules.DCDCompressionManager.enableZstdStreamSupport(float, 0);
|
||||
}
|
||||
} else if (isAndroid2) {
|
||||
(importDefault(12507) /* metro dependency 12507: NativeCompressionModule */).enableZlibStreamSupport(float);
|
||||
} else {
|
||||
NativeModules.DCDCompressionManager.enableZlibStreamSupport(float);
|
||||
}
|
||||
object2 = {'open': false, 'gateway': null, 'identify': false, 'messages': null, 'clientState': null,
|
||||
'userId': null};
|
||||
object2.gateway = value4;
|
||||
object2.messages = [];
|
||||
value5.onopen = onopen;
|
||||
closure = onerror_1099;
|
||||
value5.onerror = closure;
|
||||
value5.onclose = closure;
|
||||
value5.onmessage = onmessage_1100;
|
||||
global.window._ws = {ws: value5, state: object2};
|
||||
(importDefault(20) /* metro dependency 20: AppStartPerformance */).mark('🌐', 'Fastconnect socket created');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun1104() { // fn#1104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:3052, offset: 0x00c53a19, size: 278 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
var userId;
|
||||
var r7;
|
||||
var _ws;
|
||||
var ws;
|
||||
var state;
|
||||
var _socketId;
|
||||
var moduleValue;
|
||||
var defaultImport;
|
||||
let value = environment.__proto__;
|
||||
const value2 = (importDefault(14) /* metro dependency 14: TTITracker */).loadFastConnectNativeModule.measure(_fun1105);
|
||||
const value3 = null;
|
||||
if (value3 == value2) {
|
||||
env1_7.log('Skipping fast_connect because we could not find a token to connect with.');
|
||||
} else if (value2 !== '') {
|
||||
_ws = global.window._ws;
|
||||
ws = _ws.ws;
|
||||
state = _ws.state;
|
||||
_socketId = ws._socketId;
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isAndroid()) {
|
||||
defaultImport = importDefault(479) /* metro dependency 479: NativeFastConnectModule */;
|
||||
userId = defaultImport.getConstants().userId;
|
||||
} else {
|
||||
userId = NativeModules.DCDFastConnectManager.userId;
|
||||
}
|
||||
r7 = value3 != userId ? userId : value3;
|
||||
r7 = value3 != userId ? userId : value3;
|
||||
state.userId = r7;
|
||||
value = prepareIdentify(_socketId, value3 != userId ? userId : value3, value2);
|
||||
state.identify = true;
|
||||
state.clientState = value;
|
||||
} else {
|
||||
env1_7.log('Skipping fast_connect because we could not find a token to connect with.');
|
||||
}
|
||||
}
|
||||
|
||||
function newWebSocketOnopen() { // fn#1098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:2035, owner: createFastConnectSocket.newWebSocket.onopen, offset: 0x00c5384a, size: 144 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__.__proto__;
|
||||
(importDefault(20) /* metro dependency 20: AppStartPerformance */).mark('🌐', 'Fastconnect socket opened');
|
||||
const binding = env2_7;
|
||||
const log = binding.log;
|
||||
const Date = global.Date;
|
||||
value = Date.now();
|
||||
value -= env0_0;
|
||||
Reflect.apply(log, binding, ['connected and identified in ' + value + 'ms didIdentify:' + env0_1.identify]);
|
||||
env0_1.open = true;
|
||||
}
|
||||
|
||||
function newWebSocketOnclose() { // fn#1099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:2202, owner: createFastConnectSocket.newWebSocket.onclose, offset: 0x00c538da, size: 65 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(20) /* metro dependency 20: AppStartPerformance */).mark('🌐', 'Fastconnect socket close');
|
||||
global.window._ws = null;
|
||||
}
|
||||
|
||||
function newWebSocketOnmessage(a0) { // fn#1100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:2285, owner: createFastConnectSocket.newWebSocket.onmessage, offset: 0x00c5391b, size: 75 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(20) /* metro dependency 20: AppStartPerformance */).mark('🌐', 'Fastconnect socket message');
|
||||
env0_1.messages.push(a0);
|
||||
}
|
||||
|
||||
function _fun1105() { // fn#1105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:30:3109, offset: 0x00c53b2f, size: 109 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var token;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
value = importDefault(479) /* metro dependency 479: NativeFastConnectModule */;
|
||||
token = value.getConstants().token;
|
||||
value = null;
|
||||
r0 = value != token ? token : value;
|
||||
} else {
|
||||
r0 = NativeModules.DCDFastConnectManager.token;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 13100; source: modules/gateway/useRequestGatewaySocket.tsx; dependencies: [31, 9493, 660, 2] */
|
||||
function _fun100155(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13290:6, offset: 0x021dfbfc, size: 121 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/useRequestGatewaySocket.tsx');
|
||||
exports.useRequestGatewaySocket = useRequestGatewaySocket;
|
||||
}
|
||||
|
||||
function useRequestGatewaySocket(a0) { // fn#100156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13290:209, offset: 0x021dfc75, size: 84 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
env0_3.useEffect(_fun100157, [a0,
|
||||
(importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */).useCanUIRequestGatewaySocket()]);
|
||||
}
|
||||
|
||||
function _fun100157() { // fn#100157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13290:303, offset: 0x021dfcc9, size: 65 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var value2;
|
||||
if (env0_1) {
|
||||
value2 = environment.__proto__;
|
||||
(importAll(660) /* metro dependency 660: RequestGatewaySocket */).setRequestedBy(env0_0);
|
||||
return _fun100158;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun100158() { // fn#100158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13290:346, offset: 0x021dfd0a, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importAll(660) /* metro dependency 660: RequestGatewaySocket */).stopRequest(env1_0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user