132 lines
6.8 KiB
TypeScript
132 lines
6.8 KiB
TypeScript
/* Metro module 6599; source: modules/guild_onboarding/GuildOnboardingStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */
|
|
function _fun52002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:6, offset: 0x012ea17e, size: 448 bytes, params: 8, frame: 21
|
|
const closure = isOnboarding;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_5 = value.ME;
|
|
const env0_6 = value.FAVORITES;
|
|
let env0_8 = {};
|
|
let env0_9 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun52007(Store).displayName = 'GuildOnboardingStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
|
|
env0_8 = {};
|
|
env0_9 = {};
|
|
}, GUILD_DELETE: GUILD_DELETE_52014, GUILD_ONBOARDING_START: GUILD_ONBOARDING_START,
|
|
GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS: GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS,
|
|
GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE: GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE,
|
|
GUILD_ONBOARDING_COMPLETE: GUILD_ONBOARDING_COMPLETE, GUILD_ONBOARDING_SET_STEP: GUILD_ONBOARDING_SET_STEP,
|
|
CONNECTION_OPEN: function() {
|
|
env0_9 = {};
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/GuildOnboardingStore.tsx');
|
|
exports.default = value;
|
|
exports.GuildOnboardingStatus = {STARTED: 'started', READY: 'ready', COMPLETED: 'completed',
|
|
NOT_APPLICABLE: 'not_applicable'};
|
|
exports.isOnboarding = closure;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_52003() { // fn#52003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:179, offset: 0x012ea33e, 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_52003_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function isOnboarding(a0) { // fn#52006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:498, offset: 0x012ea39c, size: 59 bytes, params: 2, frame: 13
|
|
return a0 != null && [env0_7.STARTED, env0_7.READY].includes(a0);
|
|
}
|
|
|
|
function _fun52007(a0) { // fn#52007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:591, offset: 0x012ea3d7, size: 143 bytes, params: 2, frame: 16
|
|
const closure = GuildOnboardingStore;
|
|
env0_4(closure, a0);
|
|
return env0_1(closure, [{key: 'shouldShowOnboarding', value: value_52009}, {key: 'getOnboardingStatus',
|
|
value: value_52010}, {key: 'resetOnboardingStatus', value: value_52011}, {key: 'getCurrentOnboardingStep',
|
|
value: value_52012}]);
|
|
}
|
|
|
|
function GUILD_DELETE_52014({guild}) { // fn#52014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1343, offset: 0x012ea4f8, size: 41 bytes, params: 2, frame: 4
|
|
delete env0_8[guild.id];
|
|
delete env0_9[guild.id];
|
|
}
|
|
|
|
function GUILD_ONBOARDING_START({guildId}) { // fn#52015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1430, offset: 0x012ea521, size: 33 bytes, params: 2, frame: 3
|
|
const binding = env0_8;
|
|
const STARTED = env0_7.STARTED;
|
|
binding[guildId] = STARTED;
|
|
}
|
|
|
|
function GUILD_ONBOARDING_PROMPTS_FETCH_SUCCESS({guildId, enabled}) { // fn#52016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1529, offset: 0x012ea542, size: 75 bytes, params: 2, frame: 5
|
|
const property = env0_8[guildId];
|
|
const STARTED = env0_7.STARTED;
|
|
if (property !== STARTED) {
|
|
return false;
|
|
}
|
|
const binding = env0_8;
|
|
const binding2 = env0_7;
|
|
binding[guildId] = enabled ? binding2.READY : binding2.NOT_APPLICABLE;
|
|
}
|
|
|
|
function GUILD_ONBOARDING_PROMPTS_FETCH_FAILURE({guildId}) { // fn#52017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1688, offset: 0x012ea58d, size: 33 bytes, params: 2, frame: 3
|
|
const binding = env0_8;
|
|
const NOT_APPLICABLE = env0_7.NOT_APPLICABLE;
|
|
binding[guildId] = NOT_APPLICABLE;
|
|
}
|
|
|
|
function GUILD_ONBOARDING_COMPLETE({guildId}) { // fn#52018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1785, offset: 0x012ea5ae, size: 33 bytes, params: 2, frame: 3
|
|
const binding = env0_8;
|
|
const COMPLETED = env0_7.COMPLETED;
|
|
binding[guildId] = COMPLETED;
|
|
}
|
|
|
|
function GUILD_ONBOARDING_SET_STEP({guildId, step}) { // fn#52019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1876, offset: 0x012ea5cf, size: 29 bytes, params: 2, frame: 3
|
|
env0_9[guildId] = step;
|
|
}
|
|
|
|
function value_52009(a0) { // fn#52009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:931, offset: 0x012ea466, size: 55 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
return a0 !== ME && a0 !== FAVORITES && !!isOnboarding(env1_8[a0]);
|
|
}
|
|
|
|
function value_52011(a0) { // fn#52011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1081, offset: 0x012ea49d, size: 40 bytes, params: 2, frame: 4
|
|
const binding = env1_8;
|
|
const STARTED = env1_7.STARTED;
|
|
binding[a0] = STARTED;
|
|
env1_9[a0] = 'cover';
|
|
}
|
|
|
|
function value_52012(a0) { // fn#52012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6777:1161, offset: 0x012ea4c5, size: 32 bytes, params: 2, frame: 3
|
|
const value = environment.__proto__;
|
|
return env1_9[a0] ?? 'cover';
|
|
}
|
|
|