Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
67 lines
2.5 KiB
TypeScript
67 lines
2.5 KiB
TypeScript
// Module ID: 17972
|
|
// Function ID: 17973
|
|
// Name: LibdiscoreExperimentManager
|
|
// Dependencies: [1236, 1351, 1983, 558, 1433, 7221, 2]
|
|
|
|
// Module 17972 (LibdiscoreExperimentManager)
|
|
import discord_common_shallowEqualDefault from "discord_common/shallowEqual" /* 558 */;
|
|
import js_shim_shim from "js_shim/shim" /* 1351 */;
|
|
import ApexExperiment from "ApexExperiment" /* 1433 */;
|
|
import libdiscoreExperiments from "libdiscoreExperiments" /* 1983 */;
|
|
import ApexExperimentStore from "ApexExperimentStore" /* 1236 */;
|
|
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7221 */;
|
|
|
|
require = fn;
|
|
function experimentStoreUpdateHandler() {
|
|
if (obj.isLibdiscoreInitialized()) {
|
|
if (!tmpResult.isExperimentSyncDisabled()) {
|
|
obj2 = {};
|
|
const ALL_LIBDISCORE_EXPERIMENTS = tmp(1983).ALL_LIBDISCORE_EXPERIMENTS;
|
|
for (const item10018 of ALL_LIBDISCORE_EXPERIMENTS) {
|
|
obj2[item10018.id] = item10018.getCurrentConfig();
|
|
continue;
|
|
}
|
|
let tmp7 = null != obj2;
|
|
if (tmp7) {
|
|
tmp7 = discord_common_shallowEqualDefault(obj2, obj2);
|
|
}
|
|
if (!tmp7) {
|
|
const experimentCacher = js_shim_shim.getExperimentCacher();
|
|
const _JSON = JSON;
|
|
experimentCacher.flushToCache(JSON.stringify(obj2));
|
|
}
|
|
}
|
|
tmpResult = tmp(1983);
|
|
}
|
|
}
|
|
class LibdiscoreExperimentManager extends tmp2 {
|
|
constructor() {
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
applyArgumentsResult.actions = {};
|
|
map = new Map();
|
|
applyArgumentsResult.stores = map.set(closure_3, experimentStoreUpdateHandler);
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = LibdiscoreExperimentManager.prototype;
|
|
prototype["_initialize"] = function _initialize() {
|
|
const prop = libdiscoreExperiments.ALL_LIBDISCORE_EXPERIMENTS;
|
|
const item = prop.forEach((id) => {
|
|
obj2 = { kind: "user", name: id.id, defaultConfig: { treatmentId: -1 }, variations: null };
|
|
const treatments = id.getTreatments();
|
|
obj2.variations = Object.fromEntries(treatments.map((treatmentId) => {
|
|
treatmentId = treatmentId.treatmentId;
|
|
const items = [treatmentId, { treatmentId }];
|
|
return items;
|
|
}));
|
|
id.setExperiment(ApexExperiment.createApexExperiment(obj2));
|
|
});
|
|
};
|
|
prototype["_terminate"] = function _terminate() {
|
|
|
|
};
|
|
const libdiscoreExperimentManager = new LibdiscoreExperimentManager();
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/libdiscore/LibdiscoreExperimentManager.tsx");
|
|
|
|
export default libdiscoreExperimentManager;
|