/* Metro module 1312; source: modules/user_settings/UnsyncedUserSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1313, 670, 661, 1346, 1347, 566, 587, 22, 694, 2] */ 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ 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 UserSettingsConstantsModule from './UserSettingsConstants.tsx'; /* Metro dependency 670 */ import * as ThemeConstantsModule from './ThemeConstants.tsx'; /* Metro dependency 1313 */ import * as ExpressionPickerConstantsModule from '../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */ function _fun14478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#14478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:6, offset: 0x00e07d6c, size: 597 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const env0_10 = value.DEFAULT_CHAT_SIDEBAR_WIDTH; const CHANNEL_SIDEBAR_WIDTH = value.CHANNEL_SIDEBAR_WIDTH; const env0_12 = value.DEFAULT_MESSAGE_REQUEST_SIDEBAR_WIDTH; object = {DATA_SAVER: 'data_saver', STANDARD: 'standard', BEST: 'best'}; const env0_14 = (global.window.innerWidth - CHANNEL_SIDEBAR_WIDTH) / 2; const env0_15 = object.STANDARD; const env0_17 = {}; const DeviceSettingsStore = (Flux).DeviceSettingsStore; value = _fun14482(DeviceSettingsStore); value.displayName = 'UnsyncedUserSettingsStore'; value.persistKey = 'UnsyncedUserSettingsStore'; value.migrations = [_fun14514, function(a0) { delete a0.disableVisualRefresh; }]; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {UNSYNCED_USER_SETTINGS_UPDATE: UNSYNCED_USER_SETTINGS_UPDATE, LOGOUT: LOGOUT_14517, LOGIN_SUCCESS: LOGIN_SUCCESS_14518, REGISTER_SUCCESS: REGISTER_SUCCESS_14519}); (FileImportTrackerModule).fileFinishedImporting('modules/user_settings/UnsyncedUserSettingsStore.tsx'); exports.default = value; exports.VideoQualitySettings = object; exports.VideoCompressionQuality = {VERY_LOW: 'very_low', LOW: 'low', MEDIUM: 'medium', HIGH: 'high', VERY_HIGH: 'very_high'}; function _isNativeReflectConstruct_14479() { // fn#14479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:343, offset: 0x00e07fc1, 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_14479_isNativeReflectConstruct = function() { return !!result; })(); } function _fun14482(a0) { // fn#14482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:809, offset: 0x00e0801f, size: 773 bytes, params: 2, frame: 16 const UnsyncedUserSettingsStore2 = UnsyncedUserSettingsStore; Inherits(UnsyncedUserSettingsStore2, a0); return CreateClass(UnsyncedUserSettingsStore2, [{key: 'initialize', value: value_14484}, {key: 'getUserAgnosticState', value: value_14485}, {key: 'displayCompactAvatars', get: get_14486}, {key: 'lowQualityImageMode', get: get_14487}, {key: 'videoUploadQuality', get: get_14488}, {key: 'dataSavingMode', get: get_14489}, {key: 'expressionPickerWidth', get: get_14490}, {key: 'messageRequestSidebarWidth', get: get_14491}, {key: 'threadSidebarWidth', get: get_14492}, {key: 'postSidebarWidth', get: get_14493}, {key: 'callChatSidebarWidth', get: get_14494}, {key: 'homeSidebarWidth', get: get_14495}, {key: 'callHeaderHeight', get: get_14496}, {key: 'useSystemTheme', get: get_14497}, {key: 'activityPanelHeight', get: get_14498}, {key: 'disableVoiceChannelChangeAlert', get: get_14499}, {key: 'disableHardwareMuteSilenceAlert', get: get_14500}, {key: 'disableEmbeddedActivityPopOutAlert', get: get_14501}, {key: 'disableActivityHardwareAccelerationPrompt', get: get_14502}, {key: 'disableInviteWithTextChannelActivityLaunch', get: get_14503}, {key: 'disableHideSelfStreamAndVideoConfirmationAlert', get: get_14504}, {key: 'pushUpsellUserSettingsDismissed', get: get_14505}, {key: 'disableActivityHostLeftNitroUpsell', get: get_14506}, {key: 'disableCallUserConfirmationPrompt', get: get_14507}, {key: 'disableApplicationSubscriptionCancellationSurvey', get: get_14508}, {key: 'darkSidebar', get: get_14509}, {key: 'saveCameraUploadsToDevice', get: get_14510}, {key: 'isVisualRefreshDisabled', value: value_14511}, {key: 'listDensity', get: get_14512}, {key: 'hdrDynamicRange', get: get_14513}]); function UnsyncedUserSettingsStore() { // fn#14483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:821, offset: 0x00e08324, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_3(this, UnsyncedUserSettingsStore); const value3 = env1_6(UnsyncedUserSettingsStore); return env1_5(this, _isNativeReflectConstruct_14479() ? global.Reflect.construct(value3, arguments, env1_6(this).constructor) : value3.apply(this, arguments)); } function value_14484(a0) { // fn#14484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:1164, offset: 0x00e08395, size: 180 bytes, params: 2, frame: 15 const r3 = a0 ?? ({}); value = environment.__proto__; env1_17 = r3; const useSystemTheme = r3.useSystemTheme; r3.useSystemTheme = useSystemTheme == null || (importDefault(1347) /* metro dependency 1347: getSystemThemeNative */)() == null ? SystemThemeState.UNSET : typeof useSystemTheme !== 'boolean' ? useSystemTheme : useSystemTheme ? SystemThemeState.ON : SystemThemeState.OFF; let binding = env1_17; binding.dataSavingMode = binding.dataSavingMode ?? env1_17.lowQualityImageMode; binding = env1_17; binding.hdrDynamicRange = binding.hdrDynamicRange ?? 'no-limit'; } function value_14485() { // fn#14485, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1 return env1_17; } function get_14486() { // fn#14486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:1567, offset: 0x00e08449, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const displayCompactAvatars = env1_17.displayCompactAvatars; return displayCompactAvatars != null && displayCompactAvatars; } function get_14487() { // fn#14487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:1661, offset: 0x00e08466, size: 27 bytes, params: 1, frame: 3 const value = environment.__proto__; const lowQualityImageMode = env1_17.lowQualityImageMode; return lowQualityImageMode != null && lowQualityImageMode; } function get_14488() { // fn#14488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:1752, offset: 0x00e08481, size: 25 bytes, params: 1, frame: 3 return env1_17.videoUploadQuality ?? STANDARD; } function get_14489() { // fn#14489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:1839, offset: 0x00e0849a, size: 41 bytes, params: 1, frame: 4 const value = environment.__proto__; const r1 = env1_17.dataSavingMode ?? env1_17.lowQualityImageMode; return r1 != null && r1; } function get_14490() { // fn#14490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:1964, offset: 0x00e084c3, size: 33 bytes, params: 1, frame: 3 return env1_17.expressionPickerWidth ?? ExpressionPickerWidths.MIN; } function get_14491() { // fn#14491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2070, offset: 0x00e084e4, size: 27 bytes, params: 1, frame: 3 return env1_17.messageRequestSidebarWidth ?? DEFAULT_MESSAGE_REQUEST_SIDEBAR_WIDTH; } function get_14492() { // fn#14492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2169, offset: 0x00e084ff, size: 27 bytes, params: 1, frame: 3 return env1_17.threadSidebarWidth ?? DEFAULT_CHAT_SIDEBAR_WIDTH; } function get_14493() { // fn#14493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2258, offset: 0x00e0851a, size: 27 bytes, params: 1, frame: 3 return env1_17.postSidebarWidth ?? env1_14; } function get_14494() { // fn#14494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2349, offset: 0x00e08535, size: 27 bytes, params: 1, frame: 3 return env1_17.callChatSidebarWidth ?? DEFAULT_CHAT_SIDEBAR_WIDTH; } function get_14495() { // fn#14495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2440, offset: 0x00e08550, size: 96 bytes, params: 1, frame: 15 return env1_17.homeSidebarWidth ?? (env1_16 ?? global.Math.max(0.4 * (global.window.innerWidth - CHANNEL_SIDEBAR_WIDTH), DEFAULT_CHAT_SIDEBAR_WIDTH)); } function get_14496() { // fn#14496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2625, offset: 0x00e085b0, size: 17 bytes, params: 1, frame: 1 return env1_17.callHeaderHeight; } function get_14497() { // fn#14497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2690, offset: 0x00e085c1, size: 31 bytes, params: 1, frame: 3 const useSystemTheme = env1_17.useSystemTheme; return useSystemTheme ?? SystemThemeState.UNSET; } function get_14498() { // fn#14498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2784, offset: 0x00e085e0, size: 17 bytes, params: 1, frame: 1 return env1_17.activityPanelHeight; } function get_14499() { // fn#14499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2868, offset: 0x00e085f1, size: 27 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableVoiceChannelChangeAlert = env1_17.disableVoiceChannelChangeAlert; return disableVoiceChannelChangeAlert != null && disableVoiceChannelChangeAlert; } function get_14500() { // fn#14500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:2983, offset: 0x00e0860c, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableHardwareMuteSilenceAlert = env1_17.disableHardwareMuteSilenceAlert; return disableHardwareMuteSilenceAlert != null && disableHardwareMuteSilenceAlert; } function get_14501() { // fn#14501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3102, offset: 0x00e08629, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableEmbeddedActivityPopOutAlert = env1_17.disableEmbeddedActivityPopOutAlert; return disableEmbeddedActivityPopOutAlert != null && disableEmbeddedActivityPopOutAlert; } function get_14502() { // fn#14502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3231, offset: 0x00e08646, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableActivityHardwareAccelerationPrompt = env1_17.disableActivityHardwareAccelerationPrompt; return disableActivityHardwareAccelerationPrompt != null && disableActivityHardwareAccelerationPrompt; } function get_14503() { // fn#14503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3368, offset: 0x00e08663, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableInviteWithTextChannelActivityLaunch = env1_17.disableInviteWithTextChannelActivityLaunch; return disableInviteWithTextChannelActivityLaunch != null && disableInviteWithTextChannelActivityLaunch; } function get_14504() { // fn#14504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3510, offset: 0x00e08680, size: 27 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableHideSelfStreamAndVideoConfirmationAlert = env1_17.disableHideSelfStreamAndVideoConfirmationAlert; return disableHideSelfStreamAndVideoConfirmationAlert != null && disableHideSelfStreamAndVideoConfirmationAlert; } function get_14505() { // fn#14505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3641, offset: 0x00e0869b, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const pushUpsellDismissed = env1_17.pushUpsellDismissed; return pushUpsellDismissed != null && pushUpsellDismissed; } function get_14506() { // fn#14506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3748, offset: 0x00e086b8, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableActivityHostLeftNitroUpsell = env1_17.disableActivityHostLeftNitroUpsell; return disableActivityHostLeftNitroUpsell != null && disableActivityHostLeftNitroUpsell; } function get_14507() { // fn#14507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:3869, offset: 0x00e086d5, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableCallUserConfirmationPrompt = env1_17.disableCallUserConfirmationPrompt; return disableCallUserConfirmationPrompt != null && disableCallUserConfirmationPrompt; } function get_14508() { // fn#14508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4004, offset: 0x00e086f2, size: 29 bytes, params: 1, frame: 3 const value = environment.__proto__; const disableApplicationSubscriptionCancellationSurvey = env1_17.disableApplicationSubscriptionCancellationSurvey; return disableApplicationSubscriptionCancellationSurvey != null && disableApplicationSubscriptionCancellationSurvey; } function get_14509() { // fn#14509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4117, offset: 0x00e0870f, size: 27 bytes, params: 1, frame: 3 const value = environment.__proto__; const darkSidebar = env1_17.darkSidebar; return darkSidebar != null && darkSidebar; } function get_14510() { // fn#14510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4207, offset: 0x00e0872a, size: 27 bytes, params: 1, frame: 3 const value = environment.__proto__; const saveCameraUploadsToDevice = env1_17.saveCameraUploadsToDevice; return saveCameraUploadsToDevice == null || saveCameraUploadsToDevice; } function value_14511(a0) { // fn#14511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4311, offset: 0x00e08745, size: 27 bytes, params: 2, frame: 3 return env1_17.disableVisualRefresh ?? a0; } function get_14512() { // fn#14512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4398, offset: 0x00e08760, size: 33 bytes, params: 1, frame: 3 return env1_17.listDensity ?? ListDensityMode.COZY; } function get_14513() { // fn#14513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4484, offset: 0x00e08781, size: 33 bytes, params: 1, frame: 3 const value = environment.__proto__; return env1_17.hdrDynamicRange ?? 'no-limit'; } } function _fun14514() { // fn#14514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:4681, offset: 0x00e087a2, size: 191 bytes, params: 1, frame: 43 const Storage = (StorageModule).Storage; const value2 = Storage.get('UserSettingsStore'); Storage.remove('UserSettingsStore'); return (Module00022).pick(value2, 'dataSavingMode', 'videoUploadQuality', 'lowQualityImageMode', 'useSystemTheme', 'expressionPickerWidth', 'disableVoiceChannelChangeAlert', 'disableHardwareMuteSilenceAlert', 'disableHideSelfStreamAndVideoConfirmationAlert', 'pushUpsellDismissed', 'disableEmbeddedActivityPopOutAlert', 'disableActivityHardwareAccelerationPrompt', 'disableInviteWithTextChannelActivityLaunch', 'disableActivityHostLeftNitroUpsell', 'disableCallUserConfirmationPrompt', 'disableApplicationSubscriptionCancellationSurvey', 'enableAndroidChatListAnimations'); } function UNSYNCED_USER_SETTINGS_UPDATE(a0) { // fn#14516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:5415, offset: 0x00e0886d, size: 40 bytes, params: 2, frame: 12 const object = {}; copyDataProperties(object, env0_17, undefined); copyDataProperties(object, a0.settings, a0); } function LOGOUT_14517() { // fn#14517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:5491, offset: 0x00e08895, size: 28 bytes, params: 1, frame: 3 const object = {}; const useSystemTheme = env0_17.useSystemTheme; object.useSystemTheme = useSystemTheme; } function LOGIN_SUCCESS_14518() { // fn#14518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:5566, offset: 0x00e088b1, size: 23 bytes, params: 1, frame: 3 var object2; if (object2 == null) { object2 = {}; } } function REGISTER_SUCCESS_14519() { // fn#14519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1439:5630, offset: 0x00e088c8, size: 27 bytes, params: 1, frame: 2 const binding = env0_17; const ON = SystemThemeState.ON; binding.useSystemTheme = ON; } } global.__d(_fun14478, 1312, [6, 7, 15, 17, 18, 1313, 670, 661, 1346, 1347, 566, 587, 22, 694, 2]) /* metro module 1312, dependencies: [6, 7, 15, 17, 18, 1313, 670, 661, 1346, 1347, 566, 587, 22, 694, 2] */;