/* Metro module 15172; source: components_native/channel_settings/ChannelSettingsOverview.tsx; dependencies: [5, 6, 7, 15, 17, 18, 31, 27, 3786, 1383, 1422, 8149, 1379, 1935, 1867, 3784, 4605, 15173, 3793, 1878, 15174, 661, 1386, 6900, 1243, 482, 33, 4501, 697, 566, 11245, 22, 4863, 8148, 3857, 8096, 1244, 7877, 4800, 3797, 1391, 4002, 15175, 9090, 4496, 4573, 6766, 9112, 4805, 4596, 4008, 4131, 15176, 5282, 9603, 15177, 7981, 7681, 477, 6231, 6808, 5072, 6239, 12809, 15178, 7878, 7988, 7987, 1388, 1390, 1948, 6238, 6860, 9097, 9216, 11243, 4056, 1389, 15179, 8941, 12133, 13467, 10859, 7153, 4076, 4066, 6705, 12148, 4054, 4071, 4572, 11162, 8341, 10083, 5278, 15180, 7972, 3868, 1484, 15181, 2] */ function _fun115831(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:6, offset: 0x0246f0fd, size: 1326 bytes, params: 8, frame: 31 var object5; const env0_0 = require; const closure = PinImage; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(5) /* metro dependency 5 */; const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(7) /* metro dependency 7 */; const env0_6 = importDefault(15) /* metro dependency 15 */; const env0_7 = importDefault(17) /* metro dependency 17 */; const env0_8 = importDefault(18) /* metro dependency 18 */; let value = importAll(31) /* metro dependency 31 */; const env0_10 = (require(27) /* metro dependency 27 */).View; const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */; const channelRecordModule = require(1383) /* metro dependency 1383: ChannelRecord */; const env0_12 = channelRecordModule.EDITABLE_VOICE_SETTINGS_TYPES; const env0_13 = channelRecordModule.isGuildTextChannelType; const env0_14 = channelRecordModule.THREADED_CHANNEL_TYPES; const env0_15 = channelRecordModule.THREAD_CHANNEL_TYPES; const env0_16 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildNSFW; const channelSettingsStore = importDefault(8149) /* metro dependency 8149: ChannelSettingsStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */; const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */; const regionStore = importDefault(15173) /* metro dependency 15173: RegionStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_26 = (require(15174) /* metro dependency 15174: ChannelSettingsConstants */).ChannelSettingsAutoFocusElement; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_27 = constantsModule.AnalyticEvents; const env0_28 = constantsModule.BITRATE_DEFAULT; const env0_29 = constantsModule.BITRATE_MIN; const env0_30 = constantsModule.ChannelSettingsSections; const env0_31 = constantsModule.ChannelTypes; const env0_32 = constantsModule.ChannelTypesSets; const env0_33 = constantsModule.GuildFeatures; const env0_34 = constantsModule.GuildSettingsSections; const env0_35 = constantsModule.HelpdeskArticles; const env0_36 = constantsModule.MAX_CHANNEL_NAME_LENGTH; const env0_37 = constantsModule.MAX_VOICE_USER_LIMIT; const env0_38 = constantsModule.MAX_STAGE_VOICE_USER_LIMIT; const env0_39 = constantsModule.Permissions; const env0_40 = constantsModule.SettingsPaneTypes; const env0_41 = constantsModule.SLOWMODE_VALUES; const env0_42 = constantsModule.VideoQualityMode; const channelConstantsModule = require(1386) /* metro dependency 1386: ChannelConstants */; const env0_43 = channelConstantsModule.ChannelFlags; const env0_44 = channelConstantsModule.MAX_CHANNEL_TOPIC_LENGTH; const env0_45 = channelConstantsModule.MAX_FORUM_CHANNEL_TOPIC_LENGTH; const env0_46 = (require(6900) /* metro dependency 6900: ForumConstants */).MAX_FORUM_TAGS; const env0_47 = (require(1243) /* metro dependency 1243: ThreadConstants */).DEFAULT_AUTO_ARCHIVE_DURATION; const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts; const value5 = require(33) /* metro dependency 33 */; const env0_48 = value5.jsx; const env0_49 = value5.jsxs; const env0_50 = value5.Fragment; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createStyles = createStylesModule.createStyles; object5 = {}; const object6 = {'position': 'absolute', 'top': 2, 'right': -4, 'width': 12, 'height': 12, 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center'}; object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md; const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object6.backgroundColor = BACKGROUND_SURFACE_HIGH; object5.outer = object6; const object7 = {'backgroundColor': null, 'width': 8, 'height': 8}; const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400; object7.backgroundColor = RED_400; object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs; object5.badge = object7; const env0_51 = Reflect.apply(createStyles, createStylesModule, [object5]); const value7 = createStylesModule; const createLegacyClassComponentStyles = value7.createLegacyClassComponentStyles; object5 = {}; const object8 = {flex: 1}; const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND; object8.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND; const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object8.paddingTop = PX_16; object5.screenContainer = object8; object5.slider = {marginHorizontal: 15}; const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING; object5.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING}; object5.alertText = {marginTop: 16}; object5.tagsWrapper = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'}; let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object5.addTagIconButtonWrapper = {justifyContent: 'center', margin: PX_4}; PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object5.createTagButton = {'backgroundColor': 'transparent', 'paddingHorizontal': 0, marginTop: PX_4}; const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD; object5.createTagButtonText = {fontFamily: PRIMARY_SEMIBOLD, fontSize: 14}; const env0_52 = Reflect.apply(createLegacyClassComponentStyles, value7, [object5]); const PureComponent = value.PureComponent; value = _fun115837(PureComponent); const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext; value.contextType = ThemeContext; (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsOverview.tsx'); exports.default = ConnectedChannelSettingsOverview; exports.PinImage = closure; } function _isNativeReflectConstruct_115832() { // fn#115832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:1066, offset: 0x0246f62b, size: 98 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_115832_isNativeReflectConstruct = function() { return !!result; })(); } function PinImage({channelId, style}) { // fn#115835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:1590, offset: 0x0246f68d, size: 219 bytes, params: 2, frame: 20 const styles = useStyles(); const fluxModule = require(566) /* metro dependency 566: flux */; const useStateFromStores = fluxModule.useStateFromStores; const r5 = Reflect.apply(useStateFromStores, fluxModule, [[ReadStateStore], function() { return ReadStateStore.hasUnreadPins(channelId); }]) ? : undefined; const PinIcon = (require(11245) /* metro dependency 11245: PinIcon */).PinIcon; return ( {r5} ); } function _fun115837(a0) { // fn#115837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:2428, offset: 0x0246f785, size: 862 bytes, params: 2, frame: 16 const closure = ChannelSettingsOverview; env0_8(closure, a0); return env0_5(closure, [{key: 'componentDidMount', value: value_115869}, {key: 'componentDidUpdate', value: function(a0, a1) { this.updateNavigation(a0, a1); }}, {key: 'updateNavigation', value: value_115871}, {key: 'renderChannelInfo', value: value_115873}, {key: 'renderNsfwConfig', value: value_115874}, {key: 'renderThreadSpoiler', value: value_115875}, {key: 'renderSlowmode', value: value_115876}, {key: 'renderAutoArchiveDuration', value: value_115877}, {key: 'renderInvitable', value: value_115878}, {key: 'renderDefaultAutoArchiveDuration', value: value_115879}, {key: 'renderDefaultSortOrder', value: value_115880}, {key: 'renderDefaultTagSetting', value: value_115881}, {key: 'renderAnnouncement', value: value_115882}, {key: 'renderBitrateSettings', value: value_115883}, {key: 'renderVideoQualityModeSettings', value: value_115884}, {key: 'renderUserLimitSettings', value: value_115885}, {key: 'renderRegionOverride', value: value_115886}, {key: 'showVoiceSettings', value: value_115889}, {key: 'renderPermissions', value: value_115890}, {key: 'renderSettingsSection', value: value_115892}, {key: 'renderCommonSettingsSection', value: value_115893}, {key: 'renderDefaultForumLayout', value: value_115897}, {key: 'renderUncommonSettingsSection', value: value_115899}, {key: 'renderThreadManagementActions', value: value_115901}, {key: 'renderDeleteButton', value: value_115908}, {key: 'renderForumTags', value: value_115910}, {key: 'renderShowMediaDownloadOptions', value: value_115915}, {key: 'renderCategory', value: value_115916}, {key: 'renderThreadSettings', value: value_115918}, {key: 'renderChannelSettings', value: value_115919}, {key: 'render', value: value_115920}]); } function ConnectedChannelSettingsOverview({channelId, autoFocusElement}) { // fn#115921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:29436, offset: 0x02474bcd, size: 704 bytes, params: 2, frame: 28 var r14; var r0; let value = undefined; const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(); const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }); const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsStore], function() { return ChannelSettingsStore.getChannel(); }); const value4 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel); const {isMutedThread, hasJoinedThread} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([JoinedThreadsStore], _fun115924); const value6 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanManageThread(channel); const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelSettingsStore, GuildStore, ChannelStore, UserStore, RegionStore, GuildChannelStore, PermissionStore], _fun115925, [channel, (require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldHideChannelContent(channel)]); const defaultImport = importDefault(15181) /* metro dependency 15181: SpoilerChannelExperiment */; const useExperiment = defaultImport.useExperiment; const enabled = Reflect.apply(useExperiment, defaultImport, [{guildId: channel == null ? value : channel.guild_id, location: 'ChannelSettingsOverview_native'}, {autoTrackExposure: true}]).enabled; let binding = env0_9; const value10 = binding.useRef(null); binding.useEffect(_fun115926, [autoFocusElement, value3]); if (channel2 != null) { binding = env0_53; var bindingProps = {...value8}; bindingProps['channel'] = channel2; bindingProps['navigation'] = value3; bindingProps['isThreadModerator'] = value4; r14 = channel == null ? value : channel.isLockedThread(); bindingProps['isLockedThread'] = r14; r14 = channel == null ? value : channel.isArchivedThread(); bindingProps['isArchivedThread'] = r14; bindingProps['canManageThread'] = value6; bindingProps['canUnarchiveThread'] = value8.canUnarchiveThread; bindingProps['isMutedThread'] = isMutedThread; bindingProps['hasJoinedThread'] = hasJoinedThread; bindingProps['isForumPost'] = channel == null ? value : channel.isForumPost(); bindingProps['channelNameRef'] = value10; bindingProps['showSpoilerThreadSetting'] = enabled; value = ((Component) => )(binding); r0 = value; } else { r0 = null; } return r0; } function ChannelSettingsOverview(a0) { // fn#115838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:2440, offset: 0x0246fae3, size: 538 bytes, params: 2, frame: 21 let binding = env1_4; binding(this, ChannelSettingsOverview); const items = [a0]; const value3 = env1_7(ChannelSettingsOverview); const value6 = env1_6(this, _isNativeReflectConstruct_115832() ? global.Reflect.construct(value3, items, env1_7(this).constructor) : value3.apply(this, items)); value6._cooldown = (importDefault(22) /* metro dependency 22 */).findIndex(SLOWMODE_VALUES, _fun115839); value6.state = {hasChanges: false}; value6.pushScreen = pushScreen; value6.handleSave = handleSave; value6.handleChangeName = handleChangeName; value6.handleBlurName = handleBlurName; value6.handleChangeTopic = handleChangeTopic; value6.handleBitRateChange = handleBitRateChange; value6.handleVideoQualityModeChange = handleVideoQualityModeChange; value6.handleNsfwChange = handleNsfwChange; value6.handleThreadSpoilerChange = handleThreadSpoilerChange; value6.handleSlowmodeChange = handleSlowmodeChange; value6.handleDefaultAutoArchiveDurationChange = handleDefaultAutoArchiveDurationChange; value6.handleAutoArchiveDurationChange = handleAutoArchiveDurationChange; value6.handleDefaultSortOrderChange = handleDefaultSortOrderChange; value6.handleDefaultTagSettingChange = handleDefaultTagSettingChange; value6.handleInvitableChange = handleInvitableChange; value6.handleAnnouncementChange = handleAnnouncementChange; value6.handleActiveChannelsRemovedChange = handleActiveChannelsRemovedChange; value6.handleUserLimitChange = handleUserLimitChange; binding = env1_3; value6.handleDeleteChannel = binding(_fun115860); value6.handleConfirmDeleteChannel = binding(_fun115864); value6.handlePressTag = handlePressTag; value6.handleToggleRequireTag = handleToggleRequireTag; value6.handleToggleShowMediaDownloadOptions = handleToggleShowMediaDownloadOptions; value6.getError = getError_115868; value6.state.hasChanges = ChannelSettingsStore.hasChanges(); return value6; } function value_115869() { // fn#115869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:9123, offset: 0x024710e8, size: 181 bytes, params: 1, frame: 16 this.updateNavigation(undefined, this.state); let value = this.props.regions == null; if (value && this.props.guild != null) { value = environment.__proto__; value = importDefault(15176) /* metro dependency 15176: RegionActionCreators */; value.fetchRegions(this.props.guild.id); } value = environment.__proto__; const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */; const trackWithMetadata = defaultImport.trackWithMetadata; const SETTINGS_PANE_VIEWED = AnalyticEvents.SETTINGS_PANE_VIEWED; const CHANNEL_SETTINGS = SettingsPaneTypes.CHANNEL_SETTINGS; Reflect.apply(trackWithMetadata, defaultImport, [SETTINGS_PANE_VIEWED, {settings_type: 'channel', destination_pane: CHANNEL_SETTINGS}]); } function value_115871(a0, a1) { // fn#115871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:9488, offset: 0x024711b6, size: 411 bytes, params: 3, frame: 20 var environment; var value; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const HeaderSubmittingIndicator = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderSubmittingIndicator; const props = this.props; const navigation = props.navigation; const submitting = props.submitting; const isThread = props.isThread; const type = props.channel.type; const isForumPost = props.isForumPost; if (a0 == null) { value = environment.__proto__; navigation.setOptions({headerRight: submitting ? HeaderSubmittingIndicator : _fun115872, title: isThread ? isForumPost ? intl.string(t.BsJrhj) : intl.string(t.d4n5Q1) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t['/uELTj']) : intl.string(t.XPDhcc)}); } else if (submitting !== a0.submitting) { value = environment.__proto__; navigation.setOptions({headerRight: submitting ? HeaderSubmittingIndicator : _fun115872, title: isThread ? isForumPost ? intl.string(t.BsJrhj) : intl.string(t.d4n5Q1) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t['/uELTj']) : intl.string(t.XPDhcc)}); } else if (isThread !== a0.isThread) { value = environment.__proto__; navigation.setOptions({headerRight: submitting ? HeaderSubmittingIndicator : _fun115872, title: isThread ? isForumPost ? intl.string(t.BsJrhj) : intl.string(t.d4n5Q1) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t['/uELTj']) : intl.string(t.XPDhcc)}); } else if (type !== a0.channel.type) { value = environment.__proto__; navigation.setOptions({headerRight: submitting ? HeaderSubmittingIndicator : _fun115872, title: isThread ? isForumPost ? intl.string(t.BsJrhj) : intl.string(t.d4n5Q1) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t['/uELTj']) : intl.string(t.XPDhcc)}); } else if (this.state.hasChanges !== a1.hasChanges) { value = environment.__proto__; navigation.setOptions({headerRight: submitting ? HeaderSubmittingIndicator : _fun115872, title: isThread ? isForumPost ? intl.string(t.BsJrhj) : intl.string(t.d4n5Q1) : type === ChannelTypes.GUILD_CATEGORY ? intl.string(t['/uELTj']) : intl.string(t.XPDhcc)}); } } function value_115873() { // fn#115873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15369:10129, offset: 0x024713e6, size: 880 bytes, params: 1, frame: 24 var r11; var r5; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var string; var t; var isForumLikeChannel2; var TextArea; var defaultImport; const {channel, canManageChannels, canManageThread, canSendMessages, isChannelOwner, isThread, isForumPost} = this.props; const isGuildTextChannelTypeBinding = isGuildTextChannelType; const type = channel.type; const value2 = undefined; let r1 = isGuildTextChannelTypeBinding(type) && !isThread; r1 = !r1 ? ChannelTypesSets.GUILD_THREADS_ONLY.has(channel.type) : r1; const channelSettingsUtilsModule = require(15177) /* metro dependency 15177: ChannelSettingsUtils */; const getIsChannelNameSettingEditable = channelSettingsUtilsModule.getIsChannelNameSettingEditable; let object2 = {canManageThread: canManageThread, canManageChannels: canManageChannels, canSendMessages: canSendMessages, isForumPost: isForumPost, isThread: isThread, isChannelOwner: isChannelOwner}; const value5 = Reflect.apply(getIsChannelNameSettingEditable, channelSettingsUtilsModule, [object2]); const r7 = channel.isForumPost() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uyVrTN) : isThread ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.j3XWjD) : channel.type === ChannelTypes.GUILD_CATEGORY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OCAkGP) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PVbHDl); const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput; const channelNameRef = this.props.channelNameRef; const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */; const textInput = ; if (r1) { isForumLikeChannel2 = channel.isForumLikeChannel(); string = intl.string; t = (require(1244) /* metro dependency 1244: indexNative */).t; r11 = isForumLikeChannel2 ? Reflect.apply(string, intl, [t.yR6HwZ]) : Reflect.apply(string, intl, [t.X8jMDh]); TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea; object2 = {label: r11, accessibilityLabel: r11}; defaultImport = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */; object2.value = defaultImport.translateSurrogatesToInlineEmoji(channel.topic); object2.onChange = this.handleChangeTopic; object2.isDisabled = !canManageChannels; object2.autoCorrect = true; object2.maxLength = channel.isForumLikeChannel() ? MAX_FORUM_CHANNEL_TOPIC_LENGTH : MAX_CHANNEL_TOPIC_LENGTH; object2.errorMessage = this.getError('topic'); r5 =