507 lines
19 KiB
TypeScript
507 lines
19 KiB
TypeScript
/* Metro module 11973; source: modules/welcome_screen/WelcomeScreenActionCreators.tsx; dependencies: [5, 661, 694, 507, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun91902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:6, offset: 0x020760e7, size: 219 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const value = _fun91903();
|
|
const value2 = _fun91907();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/welcome_screen/WelcomeScreenActionCreators.tsx');
|
|
exports.welcomeScreenViewed = welcomeScreenViewed;
|
|
exports.fetchWelcomeScreen = value;
|
|
exports.resetWelcomeScreen = resetWelcomeScreen;
|
|
exports.clearWelcomeScreenSettings = clearWelcomeScreenSettings;
|
|
exports.updateSettings = updateSettings_91914;
|
|
exports.saveWelcomeScreen = value2;
|
|
function _fun91903() { // fn#91903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:130, offset: 0x020761c2, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = Module00005(_fun91905);
|
|
return _fun91906;
|
|
function* _fun91905(a0) { // fn#91905, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:150, offset: 0x020761f1, size: 250 bytes, params: 2, frame: 19
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var get;
|
|
var GUILD_WELCOME_SCREEN;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var binding3;
|
|
var value9;
|
|
var body;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
binding(env2_2[2]).dispatch({type: 'WELCOME_SCREEN_FETCH_START'});
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding2[3];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
get = HTTP.get;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
GUILD_WELCOME_SCREEN = binding.GUILD_WELCOME_SCREEN;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(GUILD_WELCOME_SCREEN, binding, [a0]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.url = value5;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(get, HTTP, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding3[2];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
dispatch = value9.dispatch;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.type = 'WELCOME_SCREEN_FETCH_SUCCESS';
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.guildId = a0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
body = value7.body;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
object.welcomeScreen = body;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value9, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
try {
|
|
body = value7.body;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
value.dispatch({type: 'WELCOME_SCREEN_FETCH_FAIL'});
|
|
return undefined;
|
|
}
|
|
return body;
|
|
}
|
|
|
|
function _fun91906() { // fn#91906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:493, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun91907() { // fn#91907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:541, offset: 0x020762eb, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = Module00005(_fun91909);
|
|
return _fun91910;
|
|
function* _fun91909(a0, a1) { // fn#91909, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:561, offset: 0x0207631a, size: 284 bytes, params: 3, frame: 20
|
|
var object2;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var patch;
|
|
var GUILD_WELCOME_SCREEN;
|
|
var value5;
|
|
var object;
|
|
var description;
|
|
var channels;
|
|
var enabled;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var binding3;
|
|
var value9;
|
|
var body;
|
|
var error;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var value3 = binding(env2_2[2]);
|
|
var dispatch = value3.dispatch;
|
|
Reflect.apply(dispatch, value3, [{type: 'WELCOME_SCREEN_SUBMIT'}]);
|
|
reducibleJoin3: while (true) {
|
|
reduciblePort44: while (true) {
|
|
exceptionLanding43: while (true) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
break reducibleJoin3;
|
|
}
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
dispatch = value.dispatch;
|
|
Reflect.apply(dispatch, value, [{type: 'WELCOME_SCREEN_SUBMIT_FAILURE'}]);
|
|
break reduciblePort44;
|
|
}
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
property = binding2[3];
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
patch = HTTP.patch;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
GUILD_WELCOME_SCREEN = binding.GUILD_WELCOME_SCREEN;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(GUILD_WELCOME_SCREEN, binding, [a0]);
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.url = value5;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
description = a1.description;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object.description = description;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
channels = a1.channels;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object.welcome_channels = channels;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
enabled = a1.enabled;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object.enabled = enabled;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.body = object;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.oldFormErrors = true;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.rejectWithError = true;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(patch, HTTP, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
property = binding3[2];
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
dispatch = value9.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.type = 'WELCOME_SCREEN_SUBMIT_SUCCESS';
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.guildId = a0;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
body = value7.body;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
object2.welcomeScreen = body;
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value9, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding43;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun91910() { // fn#91910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:973, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function welcomeScreenViewed(a0) { // fn#91911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:1130, offset: 0x02076436, size: 70 bytes, params: 2, frame: 14
|
|
let value = a1;
|
|
const r4 = value !== undefined ? value : false;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'WELCOME_SCREEN_VIEW', guildId: a0, isLurking: r4});
|
|
}
|
|
|
|
function resetWelcomeScreen() { // fn#91912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:1257, offset: 0x0207647c, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'WELCOME_SCREEN_SETTINGS_RESET'});
|
|
}
|
|
|
|
function clearWelcomeScreenSettings() { // fn#91913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:1350, offset: 0x020764ad, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'WELCOME_SCREEN_SETTINGS_CLEAR'});
|
|
}
|
|
|
|
function updateSettings_91914(a0) { // fn#91914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12159:1431, offset: 0x020764de, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'WELCOME_SCREEN_SETTINGS_UPDATE',
|
|
settings: a0});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91902, 11973, [5, 661, 694, 507, 2]) /* metro module 11973, dependencies: [5, 661, 694, 507, 2] */;
|