2489 lines
105 KiB
TypeScript
2489 lines
105 KiB
TypeScript
/* Metro module 4107; source: modules/experiments/ExperimentStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 1226, 1228, 4108, 661, 3, 4102, 1225, 683, 4109, 587, 22, 694, 2] */
|
|
import Logger from '../debug/Logger.tsx'; /* Metro dependency 3 */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
|
|
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import MobileCacheSnapshotStore from '../../stores/MobileCacheSnapshotStore.tsx'; /* Metro dependency 1228 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as StorageModule from '../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as DispatcherModule from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import * as BuildOverrideUtilsModule from '../build_overrides/BuildOverrideUtils.tsx'; /* Metro dependency 4102 */
|
|
import * as ExperimentConstantsModule from './ExperimentConstants.tsx'; /* Metro dependency 4108 */
|
|
import * as GuildFiltersModule from './GuildFilters.tsx'; /* Metro dependency 4109 */
|
|
|
|
function _fun33649(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:6, offset: 0x0103710b, size: 841 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_33655 = 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 _loadOverrides = function(a0) {
|
|
var r2;
|
|
var r6;
|
|
var value4;
|
|
var b;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var object = {};
|
|
if (a0 != null) {
|
|
var value2 = _createForOfIteratorHelperLoose_33653(a0);
|
|
var value3 = value2();
|
|
if (!value3.done) {
|
|
r2 = value3;
|
|
reducibleLoop2: while (true) {
|
|
value4 = r2.value;
|
|
b = value4.b;
|
|
value5 = _createForOfIteratorHelperLoose_33653(value4.k);
|
|
value6 = value5();
|
|
if (!value6.done) {
|
|
r6 = value6;
|
|
reducibleLoop3: while (true) {
|
|
object[r6.value] = b;
|
|
value7 = value5();
|
|
if (value7.done) {
|
|
break reducibleLoop3;
|
|
}
|
|
r6 = value7;
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
value8 = value2();
|
|
if (value8.done) {
|
|
break reducibleLoop2;
|
|
}
|
|
r2 = value8;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
}
|
|
return object;
|
|
};
|
|
const handleFetchFailure = function() {
|
|
env0_21 = true;
|
|
};
|
|
const Object = global.Object;
|
|
let value = true;
|
|
Object.defineProperty(exports, '__esModule', {value: value});
|
|
let value7 = new (Logger)('ExperimentStore');
|
|
const env0_22 = {};
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
const env0_24 = {};
|
|
object = {rawUserExperiments: [], rawGuildExperiments: []};
|
|
const env0_26 = {};
|
|
const env0_27 = {};
|
|
const env0_28 = {};
|
|
const env0_29 = {};
|
|
const env0_30 = {};
|
|
const GLOBAL_ENV = global.window.GLOBAL_ENV;
|
|
const RELEASE_CHANNEL = GLOBAL_ENV.RELEASE_CHANNEL;
|
|
const env0_31 = RELEASE_CHANNEL === 'staging' || value;
|
|
const env0_32 = {};
|
|
const Date = global.Date;
|
|
Date.now();
|
|
value = _fun33686(MobileCacheSnapshotStore);
|
|
value.displayName = 'ExperimentStore';
|
|
value.LATEST_SNAPSHOT_VERSION = 1;
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/experiments/ExperimentStore.tsx');
|
|
exports.default = value;
|
|
exports.registerExperiment = registerExperiment;
|
|
function _isNativeReflectConstruct_33650() { // fn#33650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:325, offset: 0x01037454, 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_33650_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_33653(a0, a1) { // fn#33653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:518, offset: 0x010374b2, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun33654;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_33655(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_33655(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_33655(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun33654;
|
|
}
|
|
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 _fun33654() { // fn#33654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:1089, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function getHash(a0) { // fn#33656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:1727, offset: 0x01037624, size: 63 bytes, params: 2, frame: 14
|
|
var value2;
|
|
const property = env0_32[a0];
|
|
if (property === undefined) {
|
|
value2 = (importDefault(1225) /* metro dependency 1225 */).v3(a0);
|
|
env0_32[a0] = value2;
|
|
return value2;
|
|
}
|
|
return property;
|
|
}
|
|
|
|
function userCanUseExperiments(a0) { // fn#33657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:1832, offset: 0x01037663, size: 68 bytes, params: 2, frame: 5
|
|
const r4 = a0.flags ?? 0;
|
|
let STAFF = UserFlags.STAFF;
|
|
const value2 = r4 & STAFF;
|
|
STAFF = UserFlags.STAFF;
|
|
return value2 === STAFF || a0.personal_connection_id != null;
|
|
}
|
|
|
|
function getTrackExposureExperimentKey(a0, a1, a2, a3) { // fn#33658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:1954, offset: 0x010376a7, size: 282 bytes, params: 5, frame: 20
|
|
var r7;
|
|
var r0;
|
|
var r1;
|
|
let type = a1.type;
|
|
let value = '' + type + '|' + a0;
|
|
const r6 = a1.triggerDebuggingEnabled && a2 !== undefined && a2.length > 0;
|
|
type = a1.type;
|
|
const USER = ExperimentTypes.USER;
|
|
if (USER === type) {
|
|
if (r6) {
|
|
value += '|' + a2;
|
|
if (a3) {
|
|
value += '|triggerDebugging';
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
const GUILD = ExperimentTypes.GUILD;
|
|
if (GUILD === type) {
|
|
value += '|' + a1.guildId;
|
|
if (r6) {
|
|
value += '|' + a2;
|
|
if (a3) {
|
|
value += '|triggerDebugging';
|
|
r7 = value;
|
|
} else {
|
|
r7 = value;
|
|
}
|
|
r0 = r7;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
const Error = global.Error;
|
|
value = 'Unknown experiment type: ' + a1;
|
|
const value5 = Object.create(Error.prototype, {constructor: {value: Error}});
|
|
const error = new Error(value);
|
|
throw error instanceof Object ? error : value5;
|
|
}
|
|
|
|
function getTrackExposureExperimentHash(a0) { // fn#33659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:2300, offset: 0x010377c1, size: 208 bytes, params: 2, frame: 21
|
|
const type = a0.type;
|
|
const USER = ExperimentTypes.USER;
|
|
if (USER === type) {
|
|
return getHash('' + a0.bucket + '|' + a0.revision);
|
|
}
|
|
const GUILD = ExperimentTypes.GUILD;
|
|
if (GUILD === type) {
|
|
return getHash('' + a0.bucket + '|' + a0.revision + '|' + a0.guildId);
|
|
}
|
|
const Error = global.Error;
|
|
const value = 'Unknown experiment type: ' + a0;
|
|
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
|
const error = new Error();
|
|
throw error instanceof Object ? error : value2;
|
|
}
|
|
|
|
function _hasExperimentTrackedExposure(a0, a1) { // fn#33660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:2553, offset: 0x01037891, size: 81 bytes, params: 3, frame: 12
|
|
const property = env0_22[a0];
|
|
return property != null && (!(global.Date.now() - property.time > env0_33) && property.hash === a1);
|
|
}
|
|
|
|
function trackExposure({experimentId, descriptor, location, location_stack, context, fingerprint, excluded, exposureType}) { // fn#33661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:2661, offset: 0x010378e2, size: 1184 bytes, params: 2, frame: 31
|
|
var r6;
|
|
var r18;
|
|
var binding;
|
|
var object;
|
|
var defaultImport;
|
|
var object3;
|
|
var defaultImport2;
|
|
var defaultImport3;
|
|
var object5;
|
|
var defaultImport4;
|
|
var trackExposureExperimentKey;
|
|
const assignmentSource = descriptor.assignmentSource;
|
|
if (assignmentSource === 'override') {
|
|
return false;
|
|
}
|
|
const r2 = assignmentSource === 'ready_payload' ? !(descriptor.sessionId === AuthenticationStore.getSessionId()) && true : assignmentSource !== 'logged_out_api' || !(descriptor.fingerprint === AuthenticationStore.getFingerprint()) && true;
|
|
if (descriptor.override) {
|
|
return false;
|
|
}
|
|
const AUTO_FALLBACK = ExposureTypes.AUTO_FALLBACK;
|
|
const r5 = exposureType === AUTO_FALLBACK && !!descriptor.triggerDebuggingEnabled;
|
|
const trackExposureExperimentKey2 = getTrackExposureExperimentKey(experimentId, descriptor, location, r5);
|
|
const trackExposureExperimentHash = getTrackExposureExperimentHash(descriptor);
|
|
if (r2) {
|
|
binding = env0_23;
|
|
r6 = binding.get(trackExposureExperimentKey2) === trackExposureExperimentHash;
|
|
} else {
|
|
r6 = r2;
|
|
}
|
|
if (r6) {
|
|
return false;
|
|
}
|
|
if (_hasExperimentTrackedExposure(trackExposureExperimentKey2, trackExposureExperimentHash)) {
|
|
return false;
|
|
}
|
|
const type = descriptor.type;
|
|
const USER = ExperimentTypes.USER;
|
|
if (USER === type) {
|
|
object = {name: experimentId};
|
|
object.revision = descriptor.revision;
|
|
object.population = descriptor.population;
|
|
object.bucket = descriptor.bucket;
|
|
object.location = location;
|
|
object.location_stack = location_stack;
|
|
object.hash_result = descriptor.hashResult;
|
|
object.excluded = excluded;
|
|
object.exposure_type = exposureType;
|
|
object.assignment_source = descriptor.assignmentSource;
|
|
object.assignment_session_id = descriptor.sessionId;
|
|
object.assignment_loaded_from_cache = descriptor.loadedFromCache;
|
|
object.holdout_name = descriptor.holdoutName;
|
|
object.holdout_revision = descriptor.holdoutRevision;
|
|
object.holdout_bucket = descriptor.holdoutBucket;
|
|
if (context != null) {
|
|
object.context_guild_id = context.guildId;
|
|
}
|
|
if (r2) {
|
|
object5 = {};
|
|
copyDataProperties(object5, object, location);
|
|
object5['assignment_fingerprint'] = descriptor.fingerprint;
|
|
object5['current_session_id'] = AuthenticationStore.getSessionId();
|
|
object5['current_fingerprint'] = AuthenticationStore.getFingerprint();
|
|
object5['current_source'] = env0_25.source;
|
|
defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport4.track(AnalyticEvents.EXPERIMENT_USER_TRIGGERED_IGNORED, object5, {flush: false,
|
|
fingerprint: fingerprint});
|
|
} else {
|
|
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport3.track(r5 ? AnalyticEvents.EXPERIMENT_USER_TRIGGERED_FALLBACK : AnalyticEvents.EXPERIMENT_USER_TRIGGERED,
|
|
|
|
|
|
object, {flush: true, fingerprint: fingerprint});
|
|
}
|
|
} else if (ExperimentTypes.GUILD === type) {
|
|
r18 = r5 ? AnalyticEvents.EXPERIMENT_GUILD_TRIGGERED_FALLBACK : AnalyticEvents.EXPERIMENT_GUILD_TRIGGERED;
|
|
object = {name: experimentId};
|
|
object.revision = descriptor.revision;
|
|
object.bucket = descriptor.bucket;
|
|
object.guild_id = descriptor.guildId;
|
|
object.location = location;
|
|
object.location_stack = location_stack;
|
|
object.hash_result = descriptor.hashResult;
|
|
object.excluded = excluded;
|
|
object.exposure_type = exposureType;
|
|
object.assignment_source = descriptor.assignmentSource;
|
|
object.assignment_session_id = descriptor.sessionId;
|
|
object.assignment_loaded_from_cache = descriptor.loadedFromCache;
|
|
object.holdout_name = descriptor.holdoutName;
|
|
object.holdout_revision = descriptor.holdoutRevision;
|
|
object.holdout_bucket = descriptor.holdoutBucket;
|
|
if (r2) {
|
|
object3 = {};
|
|
copyDataProperties(object3, object, location);
|
|
object3['assignment_fingerprint'] = descriptor.fingerprint;
|
|
object3['current_session_id'] = AuthenticationStore.getSessionId();
|
|
object3['current_fingerprint'] = AuthenticationStore.getFingerprint();
|
|
object3['current_source'] = env0_25.source;
|
|
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport2.track(AnalyticEvents.EXPERIMENT_GUILD_TRIGGERED_IGNORED, object3, {flush: false,
|
|
fingerprint: fingerprint});
|
|
} else {
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport.track(r18, object, {flush: true, fingerprint: fingerprint});
|
|
}
|
|
}
|
|
if (r2) {
|
|
env0_23.set(trackExposureExperimentKey2, trackExposureExperimentHash);
|
|
} else {
|
|
binding = env0_22;
|
|
trackExposureExperimentKey = getTrackExposureExperimentKey(experimentId, descriptor, location, r5);
|
|
object = {};
|
|
object.time = global.Date.now();
|
|
object.hash = getTrackExposureExperimentHash(descriptor);
|
|
binding[trackExposureExperimentKey] = object;
|
|
saveTrackedExposureExperiments(env0_22);
|
|
}
|
|
}
|
|
|
|
function _loadGuildFilter(a0) { // fn#33662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:4966, offset: 0x01037d82, size: 139 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var r2;
|
|
var r3;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r1 = value2 ? value : item;
|
|
if (value2) {
|
|
r0 = item2;
|
|
r2 = value2;
|
|
r3 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = item3;
|
|
r2 = value3;
|
|
r3 = value;
|
|
} else {
|
|
r0 = item3;
|
|
r2 = value3;
|
|
r3 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r0.return();
|
|
}
|
|
const GUILD_FILTERS = (GuildFiltersModule).GUILD_FILTERS;
|
|
const value5 = null;
|
|
return value5 != GUILD_FILTERS[r1] ? GUILD_FILTERS[r1](r3) : value5;
|
|
}
|
|
|
|
function _loadPopulation(a0) { // fn#33664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:5295, offset: 0x01037e82, size: 84 bytes, params: 2, frame: 15
|
|
let value2 = Module00057(a0, 2);
|
|
const property = value2[0];
|
|
const property2 = value2[1];
|
|
return {buckets: property.map(function(a0) {
|
|
var r0;
|
|
var r2;
|
|
var r3;
|
|
var item3;
|
|
var value3;
|
|
var iterator = a0[Symbol.iterator]();
|
|
var iterator2 = iterator.next;
|
|
var item2 = Reflect.apply(iterator2, iterator, []);
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
var value = undefined;
|
|
var value2 = item2 === value;
|
|
var r1 = value2 ? value : item;
|
|
if (value2) {
|
|
r0 = item2;
|
|
r2 = value2;
|
|
r3 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = item3;
|
|
r2 = value3;
|
|
r3 = value;
|
|
} else {
|
|
r0 = item3;
|
|
r2 = value3;
|
|
r3 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r0.return();
|
|
}
|
|
return {bucket: r1, positions: r3.map(_fun33666)};
|
|
}), filters: property2.map(_loadGuildFilter), rawFilterData: property2};
|
|
function _fun33665(a0) { // fn#33665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:5372, offset: 0x01037ed6, size: 94 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var r2;
|
|
var r3;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r1 = value2 ? value : item;
|
|
if (value2) {
|
|
r0 = item2;
|
|
r2 = value2;
|
|
r3 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = item3;
|
|
r2 = value3;
|
|
r3 = value;
|
|
} else {
|
|
r0 = item3;
|
|
r2 = value3;
|
|
r3 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r0.return();
|
|
}
|
|
const object = {bucket: r1};
|
|
object.positions = r3.map(function({s, e}) {
|
|
return {start: s, end: e};
|
|
});
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function handleLoadedExperiments(a0) { // fn#33667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:5495, offset: 0x01037f4d, size: 440 bytes, params: 2, frame: 18
|
|
var defaultImport;
|
|
var track;
|
|
var EXPERIMENT_FETCH_IGNORED;
|
|
var object;
|
|
var fingerprint;
|
|
var processRawExperimentsBinding;
|
|
if (!env0_31 && a0.type === 'CONNECTION_OPEN' && userCanUseExperiments(a0.user)) {
|
|
}
|
|
if (a0.type === 'EXPERIMENTS_FETCH_SUCCESS' && env0_21 && env0_25.source === 'ready_payload') {
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
EXPERIMENT_FETCH_IGNORED = AnalyticEvents.EXPERIMENT_FETCH_IGNORED;
|
|
object = {};
|
|
fingerprint = a0.fingerprint;
|
|
object.fingerprint = fingerprint;
|
|
object.current_snapshot_source = env0_25.source;
|
|
object.current_snapshot_session_id = env0_25.sessionId;
|
|
fingerprint = env0_25.fingerprint;
|
|
object.current_snapshot_fingerprint = fingerprint;
|
|
Reflect.apply(track, defaultImport, [EXPERIMENT_FETCH_IGNORED, object]);
|
|
}
|
|
env0_26 = {};
|
|
env0_27 = {};
|
|
env0_28 = {};
|
|
let r3 = a0.type === 'CONNECTION_OPEN' || a0.fingerprint == null;
|
|
r3 = !r3 ? a0.fingerprint === AuthenticationStore.getFingerprint() : r3;
|
|
if (r3) {
|
|
processRawExperimentsBinding = processRawExperiments;
|
|
object = {rawUserExperiments: a0.experiments};
|
|
object.rawGuildExperiments = a0.guildExperiments ?? [];
|
|
object.source = a0.type !== 'CONNECTION_OPEN' ? 'logged_out_api' : 'ready_payload';
|
|
object.sessionId = 'sessionId' in a0 ? a0.sessionId : AuthenticationStore.getSessionId() ?? '';
|
|
object.fingerprint = AuthenticationStore.getFingerprint();
|
|
processRawExperimentsBinding(object, false);
|
|
}
|
|
}
|
|
|
|
function processRawExperiments({rawUserExperiments, rawGuildExperiments, source, sessionId, fingerprint}) { // fn#33668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:6275, offset: 0x01038105, size: 143 bytes, params: 2, frame: 19
|
|
const value = a1;
|
|
const env0_3 = value !== undefined ? value : false;
|
|
const object = {rawUserExperiments: rawUserExperiments};
|
|
object.rawGuildExperiments = rawGuildExperiments ?? [];
|
|
object.source = source;
|
|
object.sessionId = sessionId;
|
|
object.fingerprint = fingerprint;
|
|
rawUserExperiments.forEach(_fun33669);
|
|
if (rawGuildExperiments != null) {
|
|
rawGuildExperiments.forEach(_fun33670);
|
|
}
|
|
function _fun33669(a0) { // fn#33669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:6496, offset: 0x01038194, size: 480 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var r2;
|
|
var r13;
|
|
var r7;
|
|
var r11;
|
|
var r12;
|
|
var r10;
|
|
var r9;
|
|
var r8;
|
|
var r6;
|
|
var r5;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
var item4;
|
|
var value4;
|
|
var item5;
|
|
var value5;
|
|
var item6;
|
|
var value6;
|
|
var item7;
|
|
var value7;
|
|
var item8;
|
|
var value8;
|
|
var item9;
|
|
var value9;
|
|
var item10;
|
|
var value10;
|
|
var item11;
|
|
var value11;
|
|
var item12;
|
|
var value12;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r3 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r13 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r13 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r13 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r7 = value;
|
|
} else {
|
|
item4 = Reflect.apply(iterator2, r1, []);
|
|
item = item4.value;
|
|
item4 = item4.done ? undefined : r1;
|
|
value4 = item4 === value;
|
|
if (value4) {
|
|
r1 = item4;
|
|
r2 = value4;
|
|
r7 = value;
|
|
} else {
|
|
r1 = item4;
|
|
r2 = value4;
|
|
r7 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r11 = value;
|
|
} else {
|
|
item5 = Reflect.apply(iterator2, r1, []);
|
|
item = item5.value;
|
|
item5 = item5.done ? undefined : r1;
|
|
value5 = item5 === value;
|
|
if (value5) {
|
|
r1 = item5;
|
|
r2 = value5;
|
|
r11 = value;
|
|
} else {
|
|
r1 = item5;
|
|
r2 = value5;
|
|
r11 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r12 = value;
|
|
} else {
|
|
item6 = Reflect.apply(iterator2, r1, []);
|
|
item = item6.value;
|
|
item6 = item6.done ? undefined : r1;
|
|
value6 = item6 === value;
|
|
if (value6) {
|
|
r1 = item6;
|
|
r2 = value6;
|
|
r12 = value;
|
|
} else {
|
|
r1 = item6;
|
|
r2 = value6;
|
|
r12 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r10 = value;
|
|
} else {
|
|
item7 = Reflect.apply(iterator2, r1, []);
|
|
item = item7.value;
|
|
item7 = item7.done ? undefined : r1;
|
|
value7 = item7 === value;
|
|
if (value7) {
|
|
r1 = item7;
|
|
r2 = value7;
|
|
r10 = value;
|
|
} else {
|
|
r1 = item7;
|
|
r2 = value7;
|
|
r10 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r9 = value;
|
|
} else {
|
|
item8 = Reflect.apply(iterator2, r1, []);
|
|
item = item8.value;
|
|
item8 = item8.done ? undefined : r1;
|
|
value8 = item8 === value;
|
|
if (value8) {
|
|
r1 = item8;
|
|
r2 = value8;
|
|
r9 = value;
|
|
} else {
|
|
r1 = item8;
|
|
r2 = value8;
|
|
r9 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r8 = value;
|
|
} else {
|
|
item9 = Reflect.apply(iterator2, r1, []);
|
|
item = item9.value;
|
|
item9 = item9.done ? undefined : r1;
|
|
value9 = item9 === value;
|
|
if (value9) {
|
|
r1 = item9;
|
|
r2 = value9;
|
|
r8 = value;
|
|
} else {
|
|
r1 = item9;
|
|
r2 = value9;
|
|
r8 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r6 = value;
|
|
} else {
|
|
item10 = Reflect.apply(iterator2, r1, []);
|
|
item = item10.value;
|
|
item10 = item10.done ? undefined : r1;
|
|
value10 = item10 === value;
|
|
if (value10) {
|
|
r1 = item10;
|
|
r2 = value10;
|
|
r6 = value;
|
|
} else {
|
|
r1 = item10;
|
|
r2 = value10;
|
|
r6 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r5 = value;
|
|
} else {
|
|
item11 = Reflect.apply(iterator2, r1, []);
|
|
item = item11.value;
|
|
item11 = item11.done ? undefined : r1;
|
|
value11 = item11 === value;
|
|
if (value11) {
|
|
r1 = item11;
|
|
r2 = value11;
|
|
r5 = value;
|
|
} else {
|
|
r1 = item11;
|
|
r2 = value11;
|
|
r5 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r4 = value;
|
|
} else {
|
|
item12 = Reflect.apply(iterator2, r1, []);
|
|
item = item12.value;
|
|
item12 = item12.done ? undefined : r1;
|
|
value12 = item12 === value;
|
|
if (value12) {
|
|
r1 = item12;
|
|
r2 = value12;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item12;
|
|
r2 = value12;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
env1_26[r3] = {type: 'user', revision: r13, population: r12, bucket: r7, override: r11 === 0, hashResult: r10 ?? -1,
|
|
aaMode: r9 === 1, triggerDebuggingEnabled: r8 === 1, assignmentSource: source, sessionId: sessionId,
|
|
loadedFromCache: env0_3, fingerprint: fingerprint, holdoutName: r6, holdoutRevision: r5, holdoutBucket: r4};
|
|
return value;
|
|
}
|
|
|
|
function _fun33670(a0) { // fn#33670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:6792, offset: 0x01038374, size: 487 bytes, params: 2, frame: 24
|
|
var r1;
|
|
var r2;
|
|
var r12;
|
|
var r10;
|
|
var r13;
|
|
var r8;
|
|
var r11;
|
|
var r9;
|
|
var r7;
|
|
var r6;
|
|
var r5;
|
|
var item3;
|
|
var value3;
|
|
var item4;
|
|
var value4;
|
|
var item5;
|
|
var value5;
|
|
var item6;
|
|
var value6;
|
|
var item7;
|
|
var value7;
|
|
var item8;
|
|
var value8;
|
|
var item9;
|
|
var value9;
|
|
var item10;
|
|
var value10;
|
|
var item11;
|
|
var value11;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r3 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r12 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r12 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r12 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r10 = value;
|
|
} else {
|
|
item4 = Reflect.apply(iterator2, r1, []);
|
|
item = item4.value;
|
|
item4 = item4.done ? undefined : r1;
|
|
value4 = item4 === value;
|
|
if (value4) {
|
|
r1 = item4;
|
|
r2 = value4;
|
|
r10 = value;
|
|
} else {
|
|
r1 = item4;
|
|
r2 = value4;
|
|
r10 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r13 = value;
|
|
} else {
|
|
item5 = Reflect.apply(iterator2, r1, []);
|
|
item = item5.value;
|
|
item5 = item5.done ? undefined : r1;
|
|
value5 = item5 === value;
|
|
if (value5) {
|
|
r1 = item5;
|
|
r2 = value5;
|
|
r13 = value;
|
|
} else {
|
|
r1 = item5;
|
|
r2 = value5;
|
|
r13 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r8 = value;
|
|
} else {
|
|
item6 = Reflect.apply(iterator2, r1, []);
|
|
item = item6.value;
|
|
item6 = item6.done ? undefined : r1;
|
|
value6 = item6 === value;
|
|
if (value6) {
|
|
r1 = item6;
|
|
r2 = value6;
|
|
r8 = value;
|
|
} else {
|
|
r1 = item6;
|
|
r2 = value6;
|
|
r8 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r11 = value;
|
|
} else {
|
|
item7 = Reflect.apply(iterator2, r1, []);
|
|
item = item7.value;
|
|
item7 = item7.done ? undefined : r1;
|
|
value7 = item7 === value;
|
|
if (value7) {
|
|
r1 = item7;
|
|
r2 = value7;
|
|
r11 = value;
|
|
} else {
|
|
r1 = item7;
|
|
r2 = value7;
|
|
r11 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r9 = value;
|
|
} else {
|
|
item8 = Reflect.apply(iterator2, r1, []);
|
|
item = item8.value;
|
|
item8 = item8.done ? undefined : r1;
|
|
value8 = item8 === value;
|
|
if (value8) {
|
|
r1 = item8;
|
|
r2 = value8;
|
|
r9 = value;
|
|
} else {
|
|
r1 = item8;
|
|
r2 = value8;
|
|
r9 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r7 = value;
|
|
} else {
|
|
item9 = Reflect.apply(iterator2, r1, []);
|
|
item = item9.value;
|
|
item9 = item9.done ? undefined : r1;
|
|
value9 = item9 === value;
|
|
if (value9) {
|
|
r1 = item9;
|
|
r2 = value9;
|
|
r7 = value;
|
|
} else {
|
|
r1 = item9;
|
|
r2 = value9;
|
|
r7 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r6 = value;
|
|
} else {
|
|
item10 = Reflect.apply(iterator2, r1, []);
|
|
item = item10.value;
|
|
item10 = item10.done ? undefined : r1;
|
|
value10 = item10 === value;
|
|
if (value10) {
|
|
r1 = item10;
|
|
r2 = value10;
|
|
r6 = value;
|
|
} else {
|
|
r1 = item10;
|
|
r2 = value10;
|
|
r6 = item;
|
|
}
|
|
}
|
|
if (r2) {
|
|
r5 = value;
|
|
} else {
|
|
item11 = Reflect.apply(iterator2, r1, []);
|
|
item = item11.value;
|
|
item11 = item11.done ? undefined : r1;
|
|
value11 = item11 === value;
|
|
if (value11) {
|
|
r1 = item11;
|
|
r2 = value11;
|
|
r5 = value;
|
|
} else {
|
|
r1 = item11;
|
|
r2 = value11;
|
|
r5 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
const binding = env1_27;
|
|
const object = {hashKey: r12, revision: r10};
|
|
object.populations = r13.map(_loadPopulation);
|
|
object.overrides = _loadOverrides(r8);
|
|
const value13 = null;
|
|
r11 = value13 == r11 ? [] : r11;
|
|
object.overridesFormatted = r11.map(function(a0) {
|
|
return a0.map(_loadPopulation);
|
|
});
|
|
object.holdoutName = value13 != r9 ? r9 : value13;
|
|
object.holdoutControlBucket = value13 != r7 ? r7 : value13;
|
|
object.aaMode = r6 === 1;
|
|
object.triggerDebuggingEnabled = r5 === 1;
|
|
object.assignmentSource = source;
|
|
object.sessionId = sessionId;
|
|
object.loadedFromCache = env0_3;
|
|
object.fingerprint = fingerprint;
|
|
binding[r3] = object;
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function computeGuildExperimentBucketFromPopulationsOrNull(a0, a1, a2) { // fn#33672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:7148, offset: 0x01038571, size: 260 bytes, params: 4, frame: 28
|
|
var r8;
|
|
var r16;
|
|
var r3;
|
|
var r2;
|
|
var value5;
|
|
var buckets;
|
|
var filters;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
const env0_0 = a2;
|
|
const value2 = _createForOfIteratorHelperLoose_33653(a1);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
const value4 = null;
|
|
if (!done) {
|
|
r8 = value3;
|
|
reducibleLoop1: while (true) {
|
|
value5 = r8.value;
|
|
buckets = value5.buckets;
|
|
filters = value5.filters;
|
|
value6 = true;
|
|
reducibleJoin6: while (true) {
|
|
if (value4 == filters) {
|
|
r3 = value6;
|
|
break reducibleJoin6;
|
|
}
|
|
value7 = _createForOfIteratorHelperLoose_33653(filters);
|
|
value8 = value7();
|
|
done = value8.done;
|
|
if (done) {
|
|
r3 = value6;
|
|
break reducibleJoin6;
|
|
}
|
|
r16 = value8;
|
|
reducibleLoop3: while (true) {
|
|
value9 = r16.value;
|
|
if (value4 != value9) {
|
|
value10 = value9(a0);
|
|
value11 = false;
|
|
reducibleJoin5: while (true) {
|
|
if (value10) {
|
|
break reducibleJoin5;
|
|
}
|
|
r3 = value11;
|
|
break reducibleJoin6;
|
|
}
|
|
}
|
|
value12 = value7();
|
|
done = value12.done;
|
|
if (done) {
|
|
r3 = value6;
|
|
break reducibleJoin6;
|
|
}
|
|
r16 = value12;
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
if (r3) {
|
|
break reducibleLoop1;
|
|
}
|
|
value13 = value2();
|
|
done = value13.done;
|
|
if (done) {
|
|
return value4;
|
|
}
|
|
r8 = value13;
|
|
continue reducibleLoop1;
|
|
}
|
|
value14 = buckets.find(function({positions}) {
|
|
return positions.some(_fun33674);
|
|
});
|
|
r2 = value4 != value14 ? value14.bucket : ExperimentBuckets.CONTROL;
|
|
return r2 === ExperimentBuckets.NOT_ELIGIBLE ? value4 : r2;
|
|
}
|
|
return value4;
|
|
function _fun33673({positions}) { // fn#33673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:7466, offset: 0x01038675, size: 29 bytes, params: 2, frame: 11
|
|
return positions.some(_fun33674);
|
|
function _fun33674({start, end}) { // fn#33674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:7491, offset: 0x01038692, size: 37 bytes, params: 2, frame: 4
|
|
const value = environment.__proto__;
|
|
return importDefault >= start && importDefault < end;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function computeGuildExperimentDescriptor(a0, a1) { // fn#33675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:7598, offset: 0x010386b7, size: 720 bytes, params: 3, frame: 26
|
|
var bucket;
|
|
var r8;
|
|
var holdoutName;
|
|
var object;
|
|
var computeGuildExperimentBucketFromPopulationsOrNullBinding;
|
|
var value10;
|
|
var guildExperimentBucketFromPopulationsOrNull;
|
|
var value11;
|
|
var GUILD;
|
|
var assignmentSource;
|
|
var sessionId;
|
|
var loadedFromCache;
|
|
var populations;
|
|
var guildExperimentBucketFromPopulationsOrNull2;
|
|
var holdoutControlBucket;
|
|
var computeGuildExperimentDescriptorBinding;
|
|
var override;
|
|
let value = a1;
|
|
let getHashBinding = getHash;
|
|
const value3 = undefined;
|
|
const property = env0_27['' + getHashBinding(value)];
|
|
const value5 = null;
|
|
if (value5 == property) {
|
|
return value5;
|
|
}
|
|
let revision = property.revision;
|
|
const aaMode = property.aaMode;
|
|
const property2 = property.overrides[a0];
|
|
const triggerDebuggingEnabled = property.triggerDebuggingEnabled;
|
|
if (value5 != property2) {
|
|
return property2 === ExperimentBuckets.NOT_ELIGIBLE ? value5 : {type: ExperimentTypes.GUILD, guildId: a0,
|
|
revision: revision, bucket: property2, override: true, hashResult: -1,
|
|
triggerDebuggingEnabled: triggerDebuggingEnabled};
|
|
}
|
|
getHashBinding = getHash;
|
|
const hashKey = property.hashKey;
|
|
let r12 = value5 == hashKey ? value : hashKey;
|
|
const value7 = getHashBinding('' + r12 + ':' + a0) % 10000;
|
|
const _createForOfIteratorHelperLoose_33653Binding = _createForOfIteratorHelperLoose_33653;
|
|
const overridesFormatted = property.overridesFormatted;
|
|
const value8 = _createForOfIteratorHelperLoose_33653Binding(value5 != overridesFormatted ? overridesFormatted : []);
|
|
const value9 = value8();
|
|
let done = value9.done;
|
|
if (done) {
|
|
guildExperimentBucketFromPopulationsOrNull2 = computeGuildExperimentBucketFromPopulationsOrNull(a0,
|
|
property.populations, value7);
|
|
if (value5 == guildExperimentBucketFromPopulationsOrNull2) {
|
|
return value5;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
if (value5 != holdoutName) {
|
|
if (value5 != property.holdoutControlBucket) {
|
|
holdoutName = property.holdoutName;
|
|
if (holdoutName === value) {
|
|
r8 = value5;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
object.holdoutName = value5 != r8 ? property.holdoutName : value5;
|
|
revision = value5 == r8 ? value3 : r8.revision;
|
|
object.holdoutRevision = revision;
|
|
object.holdoutBucket = value5 == r8 ? value3 : r8.bucket;
|
|
return object;
|
|
}
|
|
computeGuildExperimentDescriptorBinding = computeGuildExperimentDescriptor;
|
|
holdoutName = property.holdoutName;
|
|
value = computeGuildExperimentDescriptorBinding(a0, holdoutName);
|
|
bucket = value5 == value ? value3 : value.bucket;
|
|
if (value5 == bucket) {
|
|
r8 = value;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
object.holdoutName = value5 != r8 ? property.holdoutName : value5;
|
|
revision = value5 == r8 ? value3 : r8.revision;
|
|
object.holdoutRevision = revision;
|
|
object.holdoutBucket = value5 == r8 ? value3 : r8.bucket;
|
|
return object;
|
|
}
|
|
if (value.override !== true) {
|
|
trackExposure({experimentId: property.holdoutName, descriptor: value});
|
|
}
|
|
bucket = value5 == value ? value3 : value.bucket;
|
|
if (bucket === property.holdoutControlBucket) {
|
|
return value5;
|
|
}
|
|
r8 = value;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
holdoutName = value5 != r8 ? property.holdoutName : value5;
|
|
object.holdoutName = holdoutName;
|
|
revision = value5 == r8 ? value3 : r8.revision;
|
|
object.holdoutRevision = revision;
|
|
bucket = value5 == r8 ? value3 : r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
r8 = value5;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
holdoutName = value5 != r8 ? property.holdoutName : value5;
|
|
object.holdoutName = holdoutName;
|
|
revision = value5 == r8 ? value3 : r8.revision;
|
|
object.holdoutRevision = revision;
|
|
bucket = value5 == r8 ? value3 : r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
r8 = value5;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
holdoutName = value5 != r8 ? property.holdoutName : value5;
|
|
object.holdoutName = holdoutName;
|
|
revision = value5 == r8 ? value3 : r8.revision;
|
|
object.holdoutRevision = revision;
|
|
bucket = value5 == r8 ? value3 : r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
r12 = value9;
|
|
loopExit6: while (true) {
|
|
computeGuildExperimentBucketFromPopulationsOrNullBinding = computeGuildExperimentBucketFromPopulationsOrNull;
|
|
value10 = r12.value;
|
|
guildExperimentBucketFromPopulationsOrNull = computeGuildExperimentBucketFromPopulationsOrNullBinding(a0,
|
|
value10,
|
|
value7);
|
|
if (value5 !== guildExperimentBucketFromPopulationsOrNull) {
|
|
break loopExit6;
|
|
}
|
|
value11 = value8();
|
|
done = value11.done;
|
|
if (done) {
|
|
computeGuildExperimentBucketFromPopulationsOrNullBinding = computeGuildExperimentBucketFromPopulationsOrNull;
|
|
populations = property.populations;
|
|
guildExperimentBucketFromPopulationsOrNull2 = computeGuildExperimentBucketFromPopulationsOrNullBinding(a0,
|
|
populations, value7);
|
|
if (value5 == guildExperimentBucketFromPopulationsOrNull2) {
|
|
return value5;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
if (value5 != holdoutName) {
|
|
holdoutControlBucket = property.holdoutControlBucket;
|
|
if (value5 != holdoutControlBucket) {
|
|
holdoutName = property.holdoutName;
|
|
if (holdoutName === value) {
|
|
r8 = value5;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
if (value5 == r8) {
|
|
holdoutName = value5;
|
|
continue;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
object.holdoutName = holdoutName;
|
|
if (value5 == r8) {
|
|
revision = value3;
|
|
continue;
|
|
}
|
|
revision = r8.revision;
|
|
object.holdoutRevision = revision;
|
|
if (value5 == r8) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
computeGuildExperimentDescriptorBinding = computeGuildExperimentDescriptor;
|
|
holdoutName = property.holdoutName;
|
|
value = computeGuildExperimentDescriptorBinding(a0, holdoutName);
|
|
if (value5 == value) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = value.bucket;
|
|
if (value5 == bucket) {
|
|
r8 = value;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
if (value5 == r8) {
|
|
holdoutName = value5;
|
|
continue;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
object.holdoutName = holdoutName;
|
|
if (value5 == r8) {
|
|
revision = value3;
|
|
continue;
|
|
}
|
|
revision = r8.revision;
|
|
object.holdoutRevision = revision;
|
|
if (value5 == r8) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
override = value.override;
|
|
if (override === true) {
|
|
continue;
|
|
}
|
|
trackExposure({experimentId: property.holdoutName, descriptor: value});
|
|
if (value5 == value) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = value.bucket;
|
|
holdoutControlBucket = property.holdoutControlBucket;
|
|
if (bucket === holdoutControlBucket) {
|
|
return value5;
|
|
}
|
|
r8 = value;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
if (value5 == r8) {
|
|
holdoutName = value5;
|
|
continue;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
object.holdoutName = holdoutName;
|
|
if (value5 == r8) {
|
|
revision = value3;
|
|
continue;
|
|
}
|
|
revision = r8.revision;
|
|
object.holdoutRevision = revision;
|
|
if (value5 == r8) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
r8 = value5;
|
|
object = {};
|
|
object.type = ExperimentTypes.GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
object.assignmentSource = property.assignmentSource;
|
|
object.sessionId = property.sessionId;
|
|
object.loadedFromCache = property.loadedFromCache;
|
|
if (value5 == r8) {
|
|
holdoutName = value5;
|
|
continue;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
object.holdoutName = holdoutName;
|
|
if (value5 == r8) {
|
|
revision = value3;
|
|
continue;
|
|
}
|
|
revision = r8.revision;
|
|
object.holdoutRevision = revision;
|
|
if (value5 == r8) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
r8 = value5;
|
|
object = {};
|
|
GUILD = ExperimentTypes.GUILD;
|
|
object.type = GUILD;
|
|
object.guildId = a0;
|
|
revision = property.revision;
|
|
object.revision = revision;
|
|
object.bucket = guildExperimentBucketFromPopulationsOrNull2;
|
|
object.hashResult = value7;
|
|
object.aaMode = aaMode;
|
|
object.triggerDebuggingEnabled = triggerDebuggingEnabled;
|
|
assignmentSource = property.assignmentSource;
|
|
object.assignmentSource = assignmentSource;
|
|
sessionId = property.sessionId;
|
|
object.sessionId = sessionId;
|
|
loadedFromCache = property.loadedFromCache;
|
|
object.loadedFromCache = loadedFromCache;
|
|
if (value5 == r8) {
|
|
holdoutName = value5;
|
|
continue;
|
|
}
|
|
holdoutName = property.holdoutName;
|
|
object.holdoutName = holdoutName;
|
|
if (value5 == r8) {
|
|
revision = value3;
|
|
continue;
|
|
}
|
|
revision = r8.revision;
|
|
object.holdoutRevision = revision;
|
|
if (value5 == r8) {
|
|
bucket = value3;
|
|
continue;
|
|
}
|
|
bucket = r8.bucket;
|
|
object.holdoutBucket = bucket;
|
|
return object;
|
|
}
|
|
r12 = value11;
|
|
continue;
|
|
}
|
|
GUILD = ExperimentTypes.GUILD;
|
|
return {type: GUILD, guildId: a0, revision: property.revision, bucket: guildExperimentBucketFromPopulationsOrNull,
|
|
override: true, hashResult: value7, triggerDebuggingEnabled: triggerDebuggingEnabled,
|
|
assignmentSource: property.assignmentSource, sessionId: property.sessionId,
|
|
loadedFromCache: property.loadedFromCache};
|
|
}
|
|
|
|
function processGuildExperimentPopulationFromCache(a0) { // fn#33676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:9091, offset: 0x01038987, size: 287 bytes, params: 2, frame: 29
|
|
var r19;
|
|
var r11;
|
|
var r3;
|
|
var r1;
|
|
var r2;
|
|
var r15;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var object;
|
|
var _createForOfIteratorHelperLoose_33653Binding;
|
|
var populations;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var rawFilterData;
|
|
var map;
|
|
var value5;
|
|
var overridesFormatted;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
const object2 = {};
|
|
const properties = Object.keys(a0);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r11 = properties2;
|
|
reducibleLoop1: while (true) {
|
|
propertyName = properties[r11];
|
|
propertyName2 = r11 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleLoop1;
|
|
}
|
|
property = a0[propertyName];
|
|
object = {};
|
|
copyDataProperties(object, property, r19);
|
|
object2[propertyName] = object;
|
|
_createForOfIteratorHelperLoose_33653Binding = _createForOfIteratorHelperLoose_33653;
|
|
populations = object2[propertyName].populations;
|
|
value2 = _createForOfIteratorHelperLoose_33653Binding(populations);
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r3 = value3;
|
|
reducibleLoop3: while (true) {
|
|
value4 = r3.value;
|
|
rawFilterData = value4.rawFilterData;
|
|
map = rawFilterData.map;
|
|
value4.filters = Reflect.apply(map, rawFilterData, [_loadGuildFilter]);
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break reducibleLoop3;
|
|
}
|
|
r3 = value5;
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
_createForOfIteratorHelperLoose_33653Binding = _createForOfIteratorHelperLoose_33653;
|
|
overridesFormatted = object2[propertyName].overridesFormatted;
|
|
reducibleJoin6: while (true) {
|
|
if (overridesFormatted != null) {
|
|
r1 = overridesFormatted;
|
|
break reducibleJoin6;
|
|
}
|
|
r1 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
value6 = _createForOfIteratorHelperLoose_33653Binding(r1);
|
|
value7 = value6();
|
|
done = value7.done;
|
|
if (done) {
|
|
r11 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
r2 = value7;
|
|
reducibleLoop7: while (true) {
|
|
_createForOfIteratorHelperLoose_33653Binding = _createForOfIteratorHelperLoose_33653;
|
|
value8 = r2.value;
|
|
value9 = _createForOfIteratorHelperLoose_33653Binding(value8);
|
|
value10 = value9();
|
|
done = value10.done;
|
|
if (!done) {
|
|
r15 = value10;
|
|
reducibleLoop8: while (true) {
|
|
value11 = r15.value;
|
|
rawFilterData = value11.rawFilterData;
|
|
map = rawFilterData.map;
|
|
value11.filters = Reflect.apply(map, rawFilterData, [_loadGuildFilter]);
|
|
value12 = value9();
|
|
done = value12.done;
|
|
if (done) {
|
|
r19 = rawFilterData;
|
|
break reducibleLoop8;
|
|
}
|
|
r15 = value12;
|
|
continue reducibleLoop8;
|
|
}
|
|
}
|
|
value13 = value6();
|
|
done = value13.done;
|
|
if (done) {
|
|
r11 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
r2 = value13;
|
|
continue reducibleLoop7;
|
|
}
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return object2;
|
|
}
|
|
|
|
function handleOverlayInitialize({serializedExperimentStore, user}) { // fn#33677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:9575, offset: 0x01038aa6, size: 190 bytes, params: 2, frame: 15
|
|
if (!env0_31 && userCanUseExperiments(user)) {
|
|
}
|
|
env0_21 = serializedExperimentStore.hasLoadedExperiments;
|
|
env0_22 = serializedExperimentStore.trackedExposureExperiments;
|
|
env0_26 = serializedExperimentStore.loadedUserExperiments;
|
|
env0_29 = serializedExperimentStore.userExperimentOverrides;
|
|
env0_30 = serializedExperimentStore.guildExperimentOverrides;
|
|
const object = {};
|
|
copyDataProperties(object, env0_25, user);
|
|
object['source'] = serializedExperimentStore.assignmentSource;
|
|
object['sessionId'] = serializedExperimentStore.assignmentSessionId;
|
|
object['fingerprint'] = serializedExperimentStore.assignmentFingerprint;
|
|
env0_27 = processGuildExperimentPopulationFromCache(serializedExperimentStore.loadedGuildExperiments);
|
|
env0_28 = {};
|
|
}
|
|
|
|
function handleLogout({isSwitchingAccount}) { // fn#33679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:10035, offset: 0x01038b64, size: 218 bytes, params: 2, frame: 17
|
|
var r7;
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
Storage.remove(env0_16);
|
|
if (!isSwitchingAccount) {
|
|
Storage.remove(env0_17);
|
|
Storage.remove(env0_18);
|
|
(require(587) /* metro dependency 587: Storage */).Storage.remove(env0_19);
|
|
env0_29 = {};
|
|
env0_30 = {};
|
|
r7 = Storage;
|
|
}
|
|
env0_26 = {};
|
|
const object = {};
|
|
copyDataProperties(object, env0_25, r7);
|
|
object['rawUserExperiments'] = [];
|
|
env0_22 = {};
|
|
}
|
|
|
|
function handleLogin() { // fn#33680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:10254, offset: 0x01038c3e, size: 66 bytes, params: 1, frame: 12
|
|
env0_22 = {};
|
|
env0_27 = {};
|
|
const Storage = (StorageModule).Storage;
|
|
Storage.remove(env0_16);
|
|
}
|
|
|
|
function loadLocalOverrides() { // fn#33681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:10320, offset: 0x01038c80, size: 650 bytes, params: 1, frame: 33
|
|
var object4;
|
|
var r2;
|
|
var r6;
|
|
var r7;
|
|
var r13;
|
|
var r16;
|
|
var r10;
|
|
var r3;
|
|
var r4;
|
|
var property;
|
|
var properties;
|
|
var properties2;
|
|
var properties3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property2;
|
|
var type;
|
|
var USER;
|
|
var GUILD;
|
|
var bucket;
|
|
var override;
|
|
var fromCookie;
|
|
var value8;
|
|
var propertyName3;
|
|
var binding;
|
|
const Storage = (StorageModule).Storage;
|
|
const value2 = Storage.get(env0_17);
|
|
reducibleJoin2: while (true) {
|
|
if (value2 != null) {
|
|
r2 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
r2 = {};
|
|
break reducibleJoin2;
|
|
}
|
|
const items2 = [r2];
|
|
const value3 = Storage.get(env0_18);
|
|
reducibleJoin4: while (true) {
|
|
if (value3 != null) {
|
|
r2 = value3;
|
|
break reducibleJoin4;
|
|
}
|
|
r2 = {};
|
|
break reducibleJoin4;
|
|
}
|
|
items2[1] = r2;
|
|
const value4 = Storage.get(env0_19);
|
|
reducibleJoin6: while (true) {
|
|
if (value4 != null) {
|
|
r2 = value4;
|
|
break reducibleJoin6;
|
|
}
|
|
r2 = {};
|
|
break reducibleJoin6;
|
|
}
|
|
items2[2] = r2;
|
|
object = {};
|
|
object4 = {};
|
|
const defaultImport = Module00022;
|
|
const isEmpty = defaultImport.isEmpty;
|
|
const value5 = 0;
|
|
const value6 = !Reflect.apply(isEmpty, defaultImport, [items2[value5]]);
|
|
let length = items2.length;
|
|
const value7 = true;
|
|
if (value5 < length) {
|
|
r6 = value6;
|
|
r7 = value5;
|
|
reducibleLoop7: while (true) {
|
|
property = items2[r7];
|
|
properties = Object.keys(property);
|
|
properties2 = 0;
|
|
properties3 = properties.length;
|
|
if (properties === undefined) {
|
|
r10 = r6;
|
|
} else {
|
|
r13 = r6;
|
|
r16 = properties2;
|
|
reducibleLoop8: while (true) {
|
|
propertyName = properties[r16];
|
|
propertyName2 = r16 + 1;
|
|
if (propertyName === undefined) {
|
|
r10 = r13;
|
|
break reducibleLoop8;
|
|
}
|
|
property2 = property[propertyName];
|
|
if (property2 != null) {
|
|
type = property2.type;
|
|
USER = ExperimentTypes.USER;
|
|
reducibleJoin18: while (true) {
|
|
reducibleJoin12: while (true) {
|
|
if (type === USER) {
|
|
break reducibleJoin12;
|
|
}
|
|
type = property2.type;
|
|
GUILD = ExperimentTypes.GUILD;
|
|
if (type !== GUILD) {
|
|
break reducibleJoin18;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
bucket = property2.bucket;
|
|
if (bucket == null) {
|
|
break reducibleJoin18;
|
|
}
|
|
override = property2.override;
|
|
if (value7 !== override) {
|
|
break reducibleJoin18;
|
|
}
|
|
fromCookie = property2.fromCookie;
|
|
if (fromCookie) {
|
|
break reducibleJoin18;
|
|
}
|
|
type = property2.type;
|
|
USER = ExperimentTypes.USER;
|
|
if (type === USER) {
|
|
object[propertyName] = property2;
|
|
r16 = propertyName2;
|
|
continue reducibleLoop8;
|
|
}
|
|
object4[propertyName] = property2;
|
|
r16 = propertyName2;
|
|
continue reducibleLoop8;
|
|
}
|
|
}
|
|
delete property[propertyName];
|
|
r13 = value7;
|
|
r16 = propertyName2;
|
|
continue reducibleLoop8;
|
|
}
|
|
}
|
|
value8 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
|
length = items2.length;
|
|
if (value8 < length) {
|
|
r6 = r10;
|
|
r7 = value8;
|
|
continue reducibleLoop7;
|
|
}
|
|
r3 = r10;
|
|
break reducibleLoop7;
|
|
}
|
|
} else {
|
|
r3 = value6;
|
|
}
|
|
const buildOverrideExperiments = (BuildOverrideUtilsModule).getBuildOverrideExperiments();
|
|
const value10 = false;
|
|
properties = Object.keys(buildOverrideExperiments);
|
|
const properties4 = 0;
|
|
const properties5 = properties.length;
|
|
if (properties === undefined) {
|
|
r2 = value10;
|
|
} else {
|
|
r4 = value10;
|
|
r7 = properties4;
|
|
reducibleLoop21: while (true) {
|
|
propertyName = properties[r7];
|
|
propertyName3 = r7 + 1;
|
|
if (propertyName === undefined) {
|
|
r2 = r4;
|
|
break reducibleLoop21;
|
|
}
|
|
binding = object;
|
|
USER = ExperimentTypes.USER;
|
|
binding[propertyName] = {'type': null, 'revision': 1, 'population': 0, 'override': true, 'fromCookie': true,
|
|
'assignmentSource': 'override', type: USER, bucket: buildOverrideExperiments[propertyName]};
|
|
binding = object4;
|
|
GUILD = ExperimentTypes.GUILD;
|
|
binding[propertyName] = {'type': null, 'revision': 1, 'override': true, 'fromCookie': true,
|
|
'assignmentSource': 'override', type: GUILD, bucket: buildOverrideExperiments[propertyName]};
|
|
r4 = value7;
|
|
r7 = propertyName3;
|
|
continue reducibleLoop21;
|
|
}
|
|
}
|
|
r2 = !r2 ? r3 : r2;
|
|
reducibleJoin26: while (true) {
|
|
if (r2) {
|
|
saveExperimentOverrides();
|
|
break reducibleJoin26;
|
|
}
|
|
break reducibleJoin26;
|
|
}
|
|
}
|
|
|
|
function saveExperimentOverrides() { // fn#33682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:11084, offset: 0x01038f0a, size: 274 bytes, params: 1, frame: 14
|
|
var value;
|
|
var property;
|
|
var moduleValue;
|
|
var Storage;
|
|
var set;
|
|
var binding;
|
|
var binding2;
|
|
var error;
|
|
var defaultImport;
|
|
var track;
|
|
var EXPERIMENT_SAVE_EXPOSURE_FAILED;
|
|
var moduleValue2;
|
|
var binding3;
|
|
var defaultImport2;
|
|
try {
|
|
value = environment;
|
|
property = dependencyMap[15];
|
|
moduleValue = require(property);
|
|
Storage = moduleValue.Storage;
|
|
set = Storage.set;
|
|
binding = env0_18;
|
|
binding2 = env0_29;
|
|
Reflect.apply(set, Storage, [binding, binding2]);
|
|
} catch (error) {
|
|
binding = env0_20;
|
|
binding.error('Error saving user experiment overrides, unsaved data will be lost', error);
|
|
defaultImport = importDefault(dependencyMap[13]);
|
|
track = defaultImport.track;
|
|
EXPERIMENT_SAVE_EXPOSURE_FAILED = AnalyticEvents.EXPERIMENT_SAVE_EXPOSURE_FAILED;
|
|
Reflect.apply(track, defaultImport, [EXPERIMENT_SAVE_EXPOSURE_FAILED, {'module': 'discord_app',
|
|
'call': 'ExperimentStore.saveExperimentOverrides'}]);
|
|
}
|
|
try {
|
|
property = dependencyMap[15];
|
|
moduleValue2 = require(property);
|
|
Storage = moduleValue2.Storage;
|
|
set = Storage.set;
|
|
binding = env0_19;
|
|
binding3 = env0_30;
|
|
Reflect.apply(set, Storage, [binding, binding3]);
|
|
} catch (error) {
|
|
binding = env0_20;
|
|
binding.error('Error saving guild experiment overrides, unsaved data will be lost', error);
|
|
defaultImport2 = importDefault(dependencyMap[13]);
|
|
track = defaultImport2.track;
|
|
EXPERIMENT_SAVE_EXPOSURE_FAILED = AnalyticEvents.EXPERIMENT_SAVE_EXPOSURE_FAILED;
|
|
Reflect.apply(track, defaultImport2, [EXPERIMENT_SAVE_EXPOSURE_FAILED, {'module': 'discord_app',
|
|
'call': 'ExperimentStore.saveExperimentOverrides'}]);
|
|
}
|
|
}
|
|
|
|
function saveTrackedExposureExperiments(a0) { // fn#33683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:11599, offset: 0x0103901c, size: 151 bytes, params: 2, frame: 15
|
|
var value;
|
|
var property;
|
|
var moduleValue;
|
|
var Storage;
|
|
var set;
|
|
var binding;
|
|
var error;
|
|
var defaultImport;
|
|
var track;
|
|
var EXPERIMENT_SAVE_EXPOSURE_FAILED;
|
|
try {
|
|
value = environment;
|
|
property = dependencyMap[15];
|
|
moduleValue = require(property);
|
|
Storage = moduleValue.Storage;
|
|
set = Storage.set;
|
|
binding = env0_16;
|
|
Reflect.apply(set, Storage, [binding, {v: 1, e: a0}]);
|
|
} catch (error) {
|
|
binding = env0_20;
|
|
binding.error('Error saving tracked exposure experiments, unsaved data will be lost', error);
|
|
defaultImport = importDefault(dependencyMap[13]);
|
|
track = defaultImport.track;
|
|
EXPERIMENT_SAVE_EXPOSURE_FAILED = AnalyticEvents.EXPERIMENT_SAVE_EXPOSURE_FAILED;
|
|
Reflect.apply(track, defaultImport, [EXPERIMENT_SAVE_EXPOSURE_FAILED, {'module': 'discord_app',
|
|
'call': 'ExperimentStore.saveTrackedExposureExperiments'}]);
|
|
}
|
|
}
|
|
|
|
function handleExperimentOverrideBucket({experimentId, experimentBucket, experimentType, skipCleanup}) { // fn#33684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:11900, offset: 0x010390b3, size: 370 bytes, params: 2, frame: 22
|
|
var object2;
|
|
var object3;
|
|
var r7;
|
|
var r2;
|
|
var r8;
|
|
var property;
|
|
var object;
|
|
var length;
|
|
var value2;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var value3;
|
|
if (experimentType != null) {
|
|
r7 = experimentType;
|
|
} else {
|
|
property = env0_24[experimentId];
|
|
r7 = property?.type;
|
|
}
|
|
if (r7 == null) {
|
|
return false;
|
|
}
|
|
if (experimentBucket == null) {
|
|
object = {};
|
|
copyDataProperties(object, object2, undefined);
|
|
object2 = object;
|
|
delete object[experimentId];
|
|
object = {};
|
|
copyDataProperties(object, object3, undefined);
|
|
object3 = object;
|
|
delete object[experimentId];
|
|
} else if (r7 === 'user') {
|
|
object = {};
|
|
copyDataProperties(object, object2, undefined);
|
|
object[experimentId] = {'type': null, 'revision': 1, 'population': 0, 'bucket': null, 'override': true,
|
|
type: r7,
|
|
bucket: experimentBucket};
|
|
object2 = object;
|
|
} else {
|
|
object = {};
|
|
copyDataProperties(object, object3, undefined);
|
|
object[experimentId] = {type: r7, revision: 1, bucket: experimentBucket, override: true};
|
|
object3 = object;
|
|
}
|
|
if (!skipCleanup) {
|
|
object = [object2, object3];
|
|
length = object.length;
|
|
value2 = 0;
|
|
if (value2 < length) {
|
|
r2 = value2;
|
|
while (true) {
|
|
property = object[r2];
|
|
for (propertyName in property) {
|
|
if (env0_24[propertyName] != null) {
|
|
r8 = propertyName2;
|
|
continue;
|
|
}
|
|
delete object2[propertyName];
|
|
r8 = propertyName2;
|
|
}
|
|
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
length = object.length;
|
|
if (value3 < length) {
|
|
r2 = value3;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
saveExperimentOverrides();
|
|
}
|
|
|
|
function handleGuildChange({guild}) { // fn#33685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:12375, offset: 0x01039225, size: 91 bytes, params: 2, frame: 23
|
|
var r7;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var value2;
|
|
var property;
|
|
var id;
|
|
for (propertyName in env0_28) {
|
|
value2 = propertyName.split(':');
|
|
property = Module00057(value2, 1)[0];
|
|
id = guild.id;
|
|
if (id !== property) {
|
|
r7 = propertyName2;
|
|
continue;
|
|
}
|
|
delete env0_28[propertyName];
|
|
r7 = propertyName2;
|
|
}
|
|
}
|
|
|
|
function _fun33686(a0) { // fn#33686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:12489, offset: 0x01039280, size: 525 bytes, params: 2, frame: 16
|
|
const ExperimentStore2 = ExperimentStore;
|
|
Inherits(ExperimentStore2, a0);
|
|
return CreateClass(ExperimentStore2, [{key: 'initialize', value: value_33688}, {key: 'loadCache', value: value_33689},
|
|
{key: 'takeSnapshot', value: value_33692}, {key: 'hasLoadedExperiments', get: get_33693},
|
|
{key: 'hasRegisteredExperiment', value: value_33694}, {key: 'getUserExperimentDescriptor', value: value_33695},
|
|
{key: 'getGuildExperimentDescriptor', value: value_33696}, {key: 'getUserExperimentBucket',
|
|
value: function(a0) {
|
|
var value = this.getUserExperimentDescriptor(a0);
|
|
return value != null ? value.bucket : ExperimentBuckets.NOT_ELIGIBLE;
|
|
}}, {key: 'getGuildExperimentBucket', value: function(a0, a1) {
|
|
var value = this.getGuildExperimentDescriptor(a0, a1);
|
|
return value != null ? value.bucket : ExperimentBuckets.NOT_ELIGIBLE;
|
|
}}, {key: 'getAllUserExperimentDescriptors', value: value_33699}, {key: 'getGuildExperiments', value: value_33700},
|
|
{key: 'getLoadedUserExperiment', value: value_33701}, {key: 'getLoadedGuildExperiment', value: value_33702},
|
|
{key: 'getRecentExposures', value: value_33703}, {key: 'getRegisteredExperiments', value: value_33706},
|
|
{key: 'getAllExperimentOverrideDescriptors', value: value_33707}, {key: 'getExperimentOverrideDescriptor',
|
|
value: value_33708}, {key: 'getAllExperimentAssignments', value: value_33709}, {key: 'getSerializedState',
|
|
value: value_33711}, {key: 'hasExperimentTrackedExposure', value: function(a0, a1, a2, a3) {
|
|
return _hasExperimentTrackedExposure(getTrackExposureExperimentKey(a0, a1, a2, a3),
|
|
getTrackExposureExperimentHash(a1));
|
|
}}]);
|
|
function ExperimentStore() { // fn#33687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:12501, offset: 0x0103948d, size: 235 bytes, params: 1, frame: 20
|
|
env1_3(this, ExperimentStore);
|
|
const handleLoadedExperimentsBinding = handleLoadedExperiments;
|
|
const handleGuildChangeBinding = handleGuildChange;
|
|
const items2 = [{LOGOUT: handleLogout, LOGIN_SUCCESS: handleLogin, CONNECTION_OPEN: handleLoadedExperimentsBinding,
|
|
EXPERIMENTS_FETCH_SUCCESS: handleLoadedExperimentsBinding, OVERLAY_INITIALIZE: handleOverlayInitialize,
|
|
EXPERIMENTS_FETCH_FAILURE: handleFetchFailure, EXPERIMENT_OVERRIDE_BUCKET: handleExperimentOverrideBucket,
|
|
GUILD_CREATE: handleGuildChangeBinding, GUILD_UPDATE: handleGuildChangeBinding}];
|
|
const DispatchBand = (DispatcherModule).DispatchBand;
|
|
const Early = DispatchBand.Early;
|
|
items2[1] = Early;
|
|
const value3 = env1_6(ExperimentStore);
|
|
const value6 = env1_5(this, _isNativeReflectConstruct_33650() ? global.Reflect.construct(value3, items2,
|
|
env1_6(this).constructor) : value3.apply(this, items2));
|
|
value6.trackExposure = trackExposure;
|
|
return value6;
|
|
}
|
|
|
|
function value_33688() { // fn#33688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:13201, offset: 0x01039578, size: 209 bytes, params: 1, frame: 24
|
|
var r3;
|
|
var r9;
|
|
var r5;
|
|
var e;
|
|
var value3;
|
|
var value4;
|
|
var properties;
|
|
var properties2;
|
|
var properties3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var time;
|
|
var value5;
|
|
var value6;
|
|
var object;
|
|
const Storage = (StorageModule).Storage;
|
|
const value2 = Storage.get(env1_16);
|
|
if (value2 == null) {
|
|
object = {};
|
|
} else if (value2.v !== 1) {
|
|
object = {};
|
|
} else {
|
|
e = value2.e;
|
|
value3 = global.Date.now();
|
|
value4 = false;
|
|
properties = Object.keys(e);
|
|
properties2 = 0;
|
|
properties3 = properties.length;
|
|
if (properties === undefined) {
|
|
r5 = value4;
|
|
} else {
|
|
r3 = value4;
|
|
r9 = properties2;
|
|
while (true) {
|
|
propertyName = properties[r9];
|
|
propertyName2 = r9 + 1;
|
|
if (propertyName === undefined) {
|
|
r5 = r3;
|
|
break;
|
|
}
|
|
time = e[propertyName].time;
|
|
value5 = value3 - time;
|
|
if (!(value5 > env1_33)) {
|
|
r9 = propertyName2;
|
|
continue;
|
|
}
|
|
delete e[propertyName];
|
|
value6 = true;
|
|
r3 = value6;
|
|
r9 = propertyName2;
|
|
}
|
|
}
|
|
if (r5) {
|
|
saveTrackedExposureExperiments(e);
|
|
}
|
|
}
|
|
loadLocalOverrides();
|
|
this.waitFor(AuthenticationStore);
|
|
this.loadCache();
|
|
}
|
|
|
|
function value_33689() { // fn#33689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:13521, offset: 0x01039649, size: 175 bytes, params: 1, frame: 15
|
|
var environment;
|
|
var value2;
|
|
var Object;
|
|
const readSnapshot = this.readSnapshot;
|
|
const LATEST_SNAPSHOT_VERSION = ExperimentStore.LATEST_SNAPSHOT_VERSION;
|
|
let value = Reflect.apply(readSnapshot, this, [LATEST_SNAPSHOT_VERSION]);
|
|
if (value != null) {
|
|
value2 = environment.__proto__;
|
|
if ('loadedUserExperiments' in value) {
|
|
loadedUserExperiments = value.loadedUserExperiments;
|
|
env1_27 = processGuildExperimentPopulationFromCache(value.loadedGuildExperiments);
|
|
Object = global.Object;
|
|
value = Object.values(loadedUserExperiments);
|
|
value.forEach(function(a0) {
|
|
a0.loadedFromCache = true;
|
|
return true;
|
|
});
|
|
Object = global.Object;
|
|
value = Object.values(env1_27);
|
|
value.forEach(_fun33691);
|
|
} else {
|
|
processRawExperiments(value, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_33692() { // fn#33692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:13894, offset: 0x01039705, size: 42 bytes, params: 1, frame: 12
|
|
const object = {};
|
|
const LATEST_SNAPSHOT_VERSION = ExperimentStore.LATEST_SNAPSHOT_VERSION;
|
|
object.version = LATEST_SNAPSHOT_VERSION;
|
|
const object2 = {};
|
|
copyDataProperties(object2, env1_25, environment.__proto__);
|
|
object.data = object2;
|
|
return object;
|
|
}
|
|
|
|
function get_33693() { // fn#33693, offset: 0x00f854d6, size: 9 bytes, params: 1, frame: 1
|
|
return env1_21;
|
|
}
|
|
|
|
function value_33694(a0) { // fn#33694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:14066, offset: 0x0103972f, size: 22 bytes, params: 2, frame: 2
|
|
return env1_24[a0] != null;
|
|
}
|
|
|
|
function value_33695(a0) { // fn#33695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:14139, offset: 0x01039745, size: 72 bytes, params: 2, frame: 13
|
|
var property;
|
|
if (env1_31) {
|
|
property = env1_29[a0];
|
|
if (property != null) {
|
|
return property;
|
|
}
|
|
}
|
|
return env1_26['' + getHash(a0)];
|
|
}
|
|
|
|
function value_33696(a0, a1) { // fn#33696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:14266, offset: 0x0103978d, size: 114 bytes, params: 3, frame: 17
|
|
const r5 = a1 ?? EMPTY_STRING_SNOWFLAKE_ID;
|
|
value = environment.__proto__;
|
|
const property = env1_30[a0];
|
|
if (env1_31) {
|
|
if (property != null) {
|
|
return property;
|
|
}
|
|
}
|
|
const value2 = '' + r5 + ':' + a0;
|
|
if (value2 in env1_28) {
|
|
return env1_28[value2];
|
|
}
|
|
const guildExperimentDescriptor = computeGuildExperimentDescriptor(r5, a0);
|
|
env1_28[value2] = guildExperimentDescriptor;
|
|
return guildExperimentDescriptor;
|
|
}
|
|
|
|
function value_33699() { // fn#33699, offset: 0x00df3adf, size: 9 bytes, params: 1, frame: 1
|
|
return env1_26;
|
|
}
|
|
|
|
function value_33700() { // fn#33700, offset: 0x00df3b32, size: 9 bytes, params: 1, frame: 1
|
|
return env1_27;
|
|
}
|
|
|
|
function value_33701(a0) { // fn#33701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:14859, offset: 0x0103985f, size: 27 bytes, params: 2, frame: 12
|
|
return env1_26[getHash(a0)];
|
|
}
|
|
|
|
function value_33702(a0) { // fn#33702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:14932, offset: 0x0103987a, size: 27 bytes, params: 2, frame: 12
|
|
return env1_27[getHash(a0)];
|
|
}
|
|
|
|
function value_33703(a0, a1) { // fn#33703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:14999, offset: 0x01039895, size: 99 bytes, params: 3, frame: 18
|
|
var environment;
|
|
const env0_0 = '' + a0 + '|' + a1 + '|';
|
|
const Object = global.Object;
|
|
const entries = Object.entries;
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply(entries, Object, [env1_22]);
|
|
value = value.filter(_fun33704);
|
|
return value.map(_fun33705);
|
|
function _fun33704(a0) { // fn#33704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15065, offset: 0x010398f8, size: 51 bytes, params: 2, frame: 13
|
|
const iterator = a0[Symbol.iterator]();
|
|
let item2 = iterator.next();
|
|
const item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r2 = value2 ? value : item;
|
|
if (!value2) {
|
|
item2.return();
|
|
}
|
|
return r2.startsWith(env0_0);
|
|
}
|
|
|
|
function _fun33705(a0) { // fn#33705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15095, offset: 0x0103992b, size: 131 bytes, params: 2, frame: 20
|
|
var r1;
|
|
var r2;
|
|
var r52;
|
|
var item3;
|
|
var value3;
|
|
var time;
|
|
var error;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
const value = undefined;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value2 = item2 === value;
|
|
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 {
|
|
time = r52.time;
|
|
} catch (error) {
|
|
if (!r2) {
|
|
try {
|
|
r1.return();
|
|
} catch {
|
|
}
|
|
}
|
|
throw error;
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
return [r5.replace(env0_0, ''), time];
|
|
}
|
|
|
|
}
|
|
|
|
function value_33706() { // fn#33706, offset: 0x00df3acd, size: 9 bytes, params: 1, frame: 1
|
|
return env1_24;
|
|
}
|
|
|
|
function value_33707() { // fn#33707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15244, offset: 0x010399ae, size: 44 bytes, params: 1, frame: 13
|
|
const binding = env1_31;
|
|
const object = {};
|
|
if (binding) {
|
|
copyDataProperties(object, env1_30, copyDataProperties(object, env1_29, undefined));
|
|
}
|
|
return object;
|
|
}
|
|
|
|
function value_33708(a0) { // fn#33708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15326, offset: 0x010399da, size: 42 bytes, params: 2, frame: 5
|
|
const value2 = null;
|
|
return env1_31 ? value2 != env1_29[a0] ? env1_29[a0] : env1_30[a0] : value2;
|
|
}
|
|
|
|
function value_33709() { // fn#33709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15423, offset: 0x01039a04, size: 154 bytes, params: 1, frame: 20
|
|
var r3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var bucket;
|
|
var propertyName3;
|
|
const object = {};
|
|
const object2 = {};
|
|
const Object = global.Object;
|
|
Object.keys(env1_24).forEach(_fun33710);
|
|
for (propertyName in env1_26) {
|
|
property = object2[propertyName];
|
|
if (property == null) {
|
|
r3 = propertyName2;
|
|
continue;
|
|
}
|
|
bucket = env1_26[propertyName].bucket;
|
|
object[property] = bucket;
|
|
r3 = propertyName2;
|
|
}
|
|
for (propertyName in env1_28) {
|
|
property = env1_28[propertyName];
|
|
if (property == null) {
|
|
r3 = propertyName3;
|
|
continue;
|
|
}
|
|
bucket = property.bucket;
|
|
object[propertyName] = bucket;
|
|
r3 = propertyName3;
|
|
}
|
|
return object;
|
|
function _fun33710(a0) { // fn#33710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15485, offset: 0x01039a9e, size: 52 bytes, params: 2, frame: 13
|
|
const binding = env0_0;
|
|
const value = environment.__proto__.__proto__;
|
|
binding[getHash('' + a0)] = a0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_33711() { // fn#33711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:15650, offset: 0x01039ad2, size: 277 bytes, params: 1, frame: 23
|
|
var r9;
|
|
var r3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var JSON;
|
|
var parse;
|
|
var JSON2;
|
|
var stringify;
|
|
var _createForOfIteratorHelperLoose_33653Binding;
|
|
var populations;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var value5;
|
|
const object = {};
|
|
const properties = Object.keys(env1_27);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r9 = properties2;
|
|
reducibleLoop1: while (true) {
|
|
propertyName = properties[r9];
|
|
propertyName2 = r9 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleLoop1;
|
|
}
|
|
JSON = global.JSON;
|
|
parse = JSON.parse;
|
|
JSON2 = global.JSON;
|
|
stringify = JSON2.stringify;
|
|
object[propertyName] = Reflect.apply(parse, JSON, [Reflect.apply(stringify, JSON2,
|
|
[env1_27[propertyName]])]);
|
|
_createForOfIteratorHelperLoose_33653Binding = _createForOfIteratorHelperLoose_33653;
|
|
populations = object[propertyName].populations;
|
|
value2 = _createForOfIteratorHelperLoose_33653Binding(populations);
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (done) {
|
|
r9 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
r3 = value3;
|
|
reducibleLoop3: while (true) {
|
|
value4 = r3.value;
|
|
value4.filters = [];
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
r9 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
r3 = value5;
|
|
continue reducibleLoop3;
|
|
}
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
const object2 = {hasLoadedExperiments: env1_21, trackedExposureExperiments: env1_22, loadedUserExperiments: env1_26,
|
|
loadedGuildExperiments: object, userExperimentOverrides: env1_29, guildExperimentOverrides: env1_30};
|
|
object2.cookieOverrides = (require(4102) /* metro dependency 4102: BuildOverrideUtils */).getBuildOverrideExperiments();
|
|
object2.assignmentSource = env1_25.source;
|
|
object2.assignmentSessionId = env1_25.sessionId;
|
|
object2.assignmentFingerprint = env1_25.fingerprint;
|
|
return object2;
|
|
}
|
|
|
|
}
|
|
|
|
function registerExperiment({experimentId, experimentType, title, description, buckets, commonTriggerPoint}) { // fn#33713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:16497, offset: 0x01039c1a, size: 76 bytes, params: 2, frame: 8
|
|
env0_24[experimentId] = {type: experimentType, title: title, description: description, buckets: buckets,
|
|
commonTriggerPoint: commonTriggerPoint};
|
|
}
|
|
|
|
}
|
|
|
|
function _fun33666({s, e}) { // fn#33666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:5409, offset: 0x01037f34, size: 25 bytes, params: 2, frame: 3
|
|
return {start: s, end: e};
|
|
}
|
|
|
|
function _fun33691(a0) { // fn#33691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4272:13810, offset: 0x010396f8, size: 13 bytes, params: 2, frame: 2
|
|
a0.loadedFromCache = true;
|
|
return true;
|
|
}
|
|
|
|
global.__d(_fun33649, 4107, [6, 7, 15, 17, 18, 57, 1226, 1228, 4108, 661, 3, 4102, 1225, 683, 4109, 587, 22, 694,
|
|
2]) /* metro module 4107, dependencies: [6, 7, 15, 17, 18, 57, 1226, 1228, 4108, 661, 3, 4102, 1225, 683, 4109, 587, 22, 694, 2] */;
|