/* Metro module 7008; source: stores/UserSettingsAccountStore.tsx; dependencies: [6, 7, 15, 17, 18, 1878, 661, 566, 694, 2] */ function _fun55477(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7186:6, offset: 0x013a8362, size: 418 bytes, params: 8, frame: 22 const closure = USER_SETTINGS_MODAL_INIT_55481; const closure2 = function() { env0_7 = FormStates.CLOSED; env0_9 = null; env0_8 = {}; }; const closure3 = function() { env0_7 = FormStates.OPEN; env0_8 = {}; }; 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 */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const FormStates = (require(661) /* metro dependency 661: Constants */).FormStates; let env0_7 = FormStates.CLOSED; let env0_8 = {}; const Store = (importDefault(566) /* metro dependency 566: flux */).Store; let value = _fun55484(Store); value.displayName = 'UserSettingsAccountStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {USER_SETTINGS_MODAL_OPEN: function() { USER_SETTINGS_MODAL_INIT_55481(); }, USER_SETTINGS_MODAL_INIT: closure, USER_SETTINGS_MODAL_CLOSE: closure2, LOGOUT: closure2, USER_SETTINGS_MODAL_SUBMIT: function() { env0_7 = FormStates.SUBMITTING; }, USER_SETTINGS_MODAL_SUBMIT_FAILURE: function(a0) { if (CLOSED !== FormStates.SUBMITTING) { return false; } env0_7 = FormStates.OPEN; env0_8 = a0.errors ?? ({}); }, USER_SETTINGS_MODAL_UPDATE_ACCOUNT: USER_SETTINGS_MODAL_UPDATE_ACCOUNT, USER_SETTINGS_MODAL_SUBMIT_COMPLETE: closure3, USER_SETTINGS_MODAL_RESET: USER_SETTINGS_MODAL_RESET}); (require(2) /* metro dependency 2 */).fileFinishedImporting('stores/UserSettingsAccountStore.tsx'); exports.default = value; } function _isNativeReflectConstruct_55478() { // fn#55478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7186:179, offset: 0x013a8504, 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_55478_isNativeReflectConstruct = function() { return !!result; })(); } function USER_SETTINGS_MODAL_INIT_55481() { // fn#55481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7186:406, offset: 0x013a8562, size: 161 bytes, params: 1, frame: 14 const currentUser = UserStore.getCurrentUser(); if (currentUser == null) { USER_SETTINGS_MODAL_CLOSE(); } else { env0_7 = FormStates.OPEN; env0_8 = {}; var object2 = {}; object2.userId = currentUser.id; var username = currentUser.username; object2.username = username; object2.discriminator = currentUser.discriminator; object2.email = currentUser.email; object2.avatar = currentUser.avatar; object2.password = ''; object2.newPassword = null; object2.claimed = currentUser.isClaimed(); copyDataProperties({}, object2, ''); } } function _fun55484(a0) { // fn#55484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7186:776, offset: 0x013a863f, size: 139 bytes, params: 2, frame: 16 const closure = UserSettingsAccountStore; env0_4(closure, a0); return env0_1(closure, [{key: 'initialize', value: function() { this.waitFor(UserStore); }}, {key: 'getErrors', value: value_55487}, {key: 'getSubmitting', value: function() { return CLOSED === FormStates.SUBMITTING; }}, {key: 'getSettings', value: value_55489}]); } function USER_SETTINGS_MODAL_UPDATE_ACCOUNT({settings}) { // fn#55493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7186:1813, offset: 0x013a8736, size: 59 bytes, params: 2, frame: 13 const binding = env0_9; env0_9 = binding == null ? {} : env0_9; const object2 = {}; copyDataProperties(object2, settings, copyDataProperties(object2, env0_9, binding)); } function USER_SETTINGS_MODAL_RESET() { // fn#55494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7186:1974, offset: 0x013a8771, size: 134 bytes, params: 1, frame: 15 var object2; const currentUser = UserStore.getCurrentUser(); USER_SETTINGS_MODAL_SUBMIT_COMPLETE(); if (currentUser != null) { object2 = {}; object2.userId = currentUser.id; object2.username = currentUser.username; object2.discriminator = currentUser.discriminator; object2.email = currentUser.email; object2.avatar = currentUser.avatar; object2.password = ''; object2.newPassword = null; object2.claimed = currentUser.isClaimed(); copyDataProperties({}, object2, ''); } }