This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,371 +1,390 @@
/* Metro module 15145; source: modules/media_keyboard/native/components/MediaKeyboard.tsx; dependencies: [31, 4645, 4644, 1580, 661, 1483, 11576, 33, 683, 4017, 4022, 1583, 15146, 1357, 3860, 697, 8448, 15147, 11095, 4015, 4650, 477, 4648, 11093, 11733, 1244, 8840, 6684, 11098, 9786, 6697, 11100, 15149, 15150, 11102, 15151, 11103, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UploadAttachmentStore from '../../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import MediaKeyboardBottomSheetHeaderSimple from './MediaKeyboardBottomSheetHeaderSimple.tsx'; /* Metro dependency 11100 */
import MediaKeyboardBottomSheetActions from './MediaKeyboardBottomSheetActions.tsx'; /* Metro dependency 11102 */
import MediaKeyboardList from './MediaKeyboardList.tsx'; /* Metro dependency 11103 */
import UseMediaKeyboardConfig from './useMediaKeyboardConfig.tsx'; /* Metro dependency 15147 */
import MediaKeyboardAccessoriesContainer from './MediaKeyboardAccessoriesContainer.tsx'; /* Metro dependency 15149 */
import MediaKeyboardBottomSheet from './MediaKeyboardBottomSheet.tsx'; /* Metro dependency 15151 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as AppLauncherNativeConstantsModule from '../../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
import * as KeyboardTypesModule from '../../../keyboard/native/KeyboardTypes.tsx'; /* Metro dependency 1583 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ChatInputUtilsModule from '../../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UseKeyboardTypeModule from '../../../keyboard/native/useKeyboardType.tsx'; /* Metro dependency 4022 */
import * as DraftStoreModule from '../../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as CloudUploadModule from '../../../../lib/uploader/CloudUpload.tsx'; /* Metro dependency 4648 */
import * as UploadModule from '../../../../lib/uploader/Upload.tsx'; /* Metro dependency 4650 */
import * as ImageIconModule from '../../../../design/components/Icon/native/redesign/generated/ImageIcon.tsx'; /* Metro dependency 6697 */
import * as AttachmentIconModule from '../../../../design/components/Icon/native/redesign/generated/AttachmentIcon.tsx'; /* Metro dependency 9786 */
import * as MediaKeyboardUtilsModule from '../MediaKeyboardUtils.tsx'; /* Metro dependency 11095 */
import * as PollsIconModule from '../../../../design/components/Icon/native/redesign/generated/PollsIcon.tsx'; /* Metro dependency 11098 */
import * as PortalKeyboardConstantsModule from '../../../keyboard/native/PortalKeyboardConstants.tsx'; /* Metro dependency 11576 */
import * as PollCreationModalActionCreatorsModule from '../../../polls/native/PollCreationModalActionCreators.tsx'; /* Metro dependency 11733 */
import * as AppLauncherActionSheetModule from '../../../app_launcher/native/AppLauncherActionSheet.tsx'; /* Metro dependency 15146 */
function _fun115478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:6, offset: 0x02461ec6, size: 307 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const mediaKeyboardConstantsModule = require(1580) /* metro dependency 1580: MediaKeyboardConstants */;
const env0_6 = mediaKeyboardConstantsModule.MediaKeyboardTarget;
const env0_7 = mediaKeyboardConstantsModule.MediaPickerActionSheetEngagedActions;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.ChatInputComponentViewedTypes;
const env0_10 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
const env0_11 = (require(11576) /* metro dependency 11576: PortalKeyboardConstants */).KEYBOARD_ANIMATION_CONFIG;
const value4 = require(33) /* metro dependency 33 */;
const env0_12 = value4.jsx;
const env0_13 = value4.jsxs;
let value = ReactModule;
value = value.memo(MediaKeyboard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboard.tsx');
exports.default = value;
}
function MediaKeyboard({channel, chatInputRef, onClose, transitionState}) { // fn#115479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:382, offset: 0x02461ff9, size: 921 bytes, params: 2, frame: 30
let binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
var channelBinding = channel;
defaultImport.track(CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.MEDIA_PICKER,
channel_id: channelBinding.id, guild_id: channelBinding.guild_id});
}, [channel.id, channel.guild_id]);
const value2 = binding.useRef(null);
const value3 = (ReanimatedRexportModule).useSharedValue(-1);
var env0_3 = value3;
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const useKeyboardContextForType = UseKeyboardTypeModule.useKeyboardContextForType;
const KeyboardTypes = (KeyboardTypesModule).KeyboardTypes;
const MEDIA = KeyboardTypes.MEDIA;
const value5 = Reflect.apply(useKeyboardContextForType, UseKeyboardTypeModule, [MEDIA]);
const useAppLauncherActionSheet = AppLauncherActionSheetModule.useAppLauncherActionSheet;
const appLauncherActionSheet = Reflect.apply(useAppLauncherActionSheet, AppLauncherActionSheetModule,
[{chatInputRef: chatInputRef, channel: channel}]).appLauncherActionSheet;
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'MediaKeyboard'}]).chatInputFloating;
const useToken = UseTokenModule.useToken;
const MEDIA_KEYBOARD_SEND_VERTICAL_INSET = (Native).modules.mobile.MEDIA_KEYBOARD_SEND_VERTICAL_INSET;
const value6 = Reflect.apply(useToken, UseTokenModule, [MEDIA_KEYBOARD_SEND_VERTICAL_INSET]);
const r18 = chatInputFloating && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).getIsAppLauncherEnabled(channel);
const value8 = (UseMediaKeyboardConfig)({channel: channel,
context: value5});
const value9 = env0_3.useMemo(_fun115481, [value3, channel, chatInputRef, value5, value2, value8]);
const r1 = chatInputFloating && value8.canStartThreads;
binding = env0_3;
const value10 = binding.useMemo(_fun115502, [value9, value8.uploadDisabled, value8.canPostPolls, r18, r1]);
const env0_12 = binding.useRef(null);
let useCallback = binding.useCallback;
const value11 = Reflect.apply(useCallback, binding, [_fun115503, [value9]]);
useCallback = binding.useCallback;
return ((Component) => <Component animationConfigs={KEYBOARD_ANIMATION_CONFIG} animatedIndex={value3} animatedPosition={value4} bottomSheetRef={value2} accessoriesComponent={Reflect.apply(useCallback,
binding, [_fun115504, [value3, value4, value9, channel.id, value8, value10,
value6]])} handleComponent={value11} overlayComponent={appLauncherActionSheet} onClose={onClose} transitionState={transitionState}>{((Component) => <Component channel={channel} draftType={value8.draftType} onPressCamera={value9.onPressCamera} onAttachPress={value9.onAttachPress} onPressItem={value9.onPressItem} onLongPressItem={value9.onLongPressItem} onViewAll={value9.onViewAll} onManageLimited={value9.onManageLimited} includedUploadIds={value8.includedUploadIds} uploadDisabled={value8.uploadDisabled} uploadLimit={value8.uploadLimit} disableWhenReachedLimit={value8.disableWhenReachedLimit} />)(MediaKeyboardList)}</Component>)(MediaKeyboardBottomSheet);
function _fun115481() { // fn#115481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1090, offset: 0x024623eb, size: 182 bytes, params: 1, frame: 3
return {onAttachPress: onAttachPress_115488, onPressCamera: onPressCamera_115489, onPressHeader: onPressHeader,
onViewAll: onViewAll_115491, onManageLimited: onManageLimited_115492, onPressItem: function({channelId, item,
isIncluded}) {
onSelectItem({channelId: channelId, item: item, isIncluded: isIncluded});
}, onLongPressItem: onLongPressItem, onPollsPress: onPollsPress, onAppsPress: function() {
var current = chatInputRef.current;
var object = {};
object.type = require(dependencyMap[11]).KeyboardTypes.APP_LAUNCHER;
object.context = {initialRouteName: AppLauncherRouteName.HOME};
current.openCustomKeyboard(object);
}, onThreadPress: onThreadPress, onSend: onSend_115501};
function onRestoreKeyboard() { // fn#115482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1117, offset: 0x024624a1, size: 102 bytes, params: 1, frame: 15
var current;
var openCustomKeyboard;
var object;
const target = env1_5.target;
const APP_LAUNCHER = MediaKeyboardTarget.APP_LAUNCHER;
if (target !== APP_LAUNCHER) {
current = chatInputRef.current;
openCustomKeyboard = current.openCustomKeyboard;
object = {};
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.MEDIA;
object.context = env1_5;
Reflect.apply(openCustomKeyboard, current, [object]);
}
}
function MediaKeyboard({channel, chatInputRef, onClose, transitionState}) { // fn#115479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:382, offset: 0x02461ff9, size: 921 bytes, params: 2, frame: 30
let binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
var channelBinding = channel;
defaultImport.track(CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.MEDIA_PICKER,
channel_id: channelBinding.id, guild_id: channelBinding.guild_id});
}, [channel.id, channel.guild_id]);
const value2 = binding.useRef(null);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
var env0_3 = value3;
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const useKeyboardTypeModule = require(4022) /* metro dependency 4022: useKeyboardType */;
const useKeyboardContextForType = useKeyboardTypeModule.useKeyboardContextForType;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const MEDIA = KeyboardTypes.MEDIA;
const value5 = Reflect.apply(useKeyboardContextForType, useKeyboardTypeModule, [MEDIA]);
const appLauncherActionSheetModule = require(15146) /* metro dependency 15146: AppLauncherActionSheet */;
const useAppLauncherActionSheet = appLauncherActionSheetModule.useAppLauncherActionSheet;
const appLauncherActionSheet = Reflect.apply(useAppLauncherActionSheet, appLauncherActionSheetModule,
[{chatInputRef: chatInputRef, channel: channel}]).appLauncherActionSheet;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'MediaKeyboard'}]).chatInputFloating;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const MEDIA_KEYBOARD_SEND_VERTICAL_INSET = (importDefault(697) /* metro dependency 697: native */).modules.mobile.MEDIA_KEYBOARD_SEND_VERTICAL_INSET;
const value6 = Reflect.apply(useToken, useTokenModule, [MEDIA_KEYBOARD_SEND_VERTICAL_INSET]);
const r18 = chatInputFloating && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).getIsAppLauncherEnabled(channel);
const value8 = (importDefault(15147) /* metro dependency 15147: useMediaKeyboardConfig */)({channel: channel,
context: value5});
const value9 = env0_3.useMemo(_fun115481, [value3, channel, chatInputRef, value5, value2, value8]);
const r1 = chatInputFloating && value8.canStartThreads;
binding = env0_3;
const value10 = binding.useMemo(_fun115502, [value9, value8.uploadDisabled, value8.canPostPolls, r18, r1]);
const env0_12 = binding.useRef(null);
let useCallback = binding.useCallback;
const value11 = Reflect.apply(useCallback, binding, [_fun115503, [value9]]);
useCallback = binding.useCallback;
return ((Component) => <Component animationConfigs={KEYBOARD_ANIMATION_CONFIG} animatedIndex={value3} animatedPosition={value4} bottomSheetRef={value2} accessoriesComponent={Reflect.apply(useCallback,
binding, [_fun115504, [value3, value4, value9, channel.id, value8, value10,
value6]])} handleComponent={value11} overlayComponent={appLauncherActionSheet} onClose={onClose} transitionState={transitionState}>{((Component) => <Component channel={channel} draftType={value8.draftType} onPressCamera={value9.onPressCamera} onAttachPress={value9.onAttachPress} onPressItem={value9.onPressItem} onLongPressItem={value9.onLongPressItem} onViewAll={value9.onViewAll} onManageLimited={value9.onManageLimited} includedUploadIds={value8.includedUploadIds} uploadDisabled={value8.uploadDisabled} uploadLimit={value8.uploadLimit} disableWhenReachedLimit={value8.disableWhenReachedLimit} />)(importDefault(11103) /* metro dependency 11103: MediaKeyboardList */)}</Component>)(importDefault(15151) /* metro dependency 15151: MediaKeyboardBottomSheet */);
}
function onSelectFiles_115483(a0, a1) { // fn#115483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1240, offset: 0x02462507, size: 171 bytes, params: 3, frame: 22
var moduleValue;
var moduleValue2;
const target = env1_5.target;
const CHAT = MediaKeyboardTarget.CHAT;
if (target === CHAT) {
moduleValue2 = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
moduleValue2.addImagesFromPicker(channel.id, a0, a1);
} else if (env1_5.target === MediaKeyboardTarget.COMMAND) {
moduleValue = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
moduleValue.addAttachmentForCommand(channel.id, chatInputRef, a0[0], env1_5, a1);
}
}
function _fun115481() { // fn#115481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1090, offset: 0x024623eb, size: 182 bytes, params: 1, frame: 3
return {onAttachPress: onAttachPress_115488, onPressCamera: onPressCamera_115489, onPressHeader: onPressHeader,
onViewAll: onViewAll_115491, onManageLimited: onManageLimited_115492, onPressItem: function({channelId, item,
isIncluded}) {
onSelectItem({channelId: channelId, item: item, isIncluded: isIncluded});
}, onLongPressItem: onLongPressItem, onPollsPress: onPollsPress, onAppsPress: function() {
var current = chatInputRef.current;
var object = {};
object.type = require(dependencyMap[11]).KeyboardTypes.APP_LAUNCHER;
object.context = {initialRouteName: AppLauncherRouteName.HOME};
current.openCustomKeyboard(object);
}, onThreadPress: onThreadPress, onSend: onSend_115501};
}
function onAttachFileParams_115484(a0) { // fn#115484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1397, offset: 0x024625b2, size: 75 bytes, params: 2, frame: 4
const env0_0 = a0;
return {channel: channel, uploadLimit: env1_8.uploadLimit, onDismissKeyboard: onDismissKeyboard_115485,
onRestoreKeyboard: onRestoreKeyboard, onSelectFiles: onSelectFiles_115486};
function onAttachFileParams_115484OnDismissKeyboard() { // fn#115485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1456, owner: onAttachFileParams_115484.onDismissKeyboard, offset: 0x024625fd, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (ChatInputUtilsModule).dismissKeyboard();
}
function _fun115502() { // fn#115502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3704, offset: 0x02462c8f, size: 652 bytes, params: 1, frame: 22
var items;
var items2;
var object2;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value3;
if (env0_7) {
object2 = {};
value2 = environment.__proto__;
object2.text = intl.string(t.PHjkRE);
object2.IconComponent = (require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon;
object2.onPress = env0_9.onAppsPress;
object2.disabled = false;
items = [object2];
} else {
items = [];
}
if (env0_10) {
object2 = {};
value3 = environment.__proto__;
object2.text = intl.string(t['7Xm5QI']);
object2.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object2.onPress = env0_9.onThreadPress;
object2.disabled = false;
items2 = [object2];
} else {
items2 = [];
}
object2 = {};
let string = intl.string;
const RgIi2B = t.RgIi2B;
object2.text = Reflect.apply(string, intl, [RgIi2B]);
const PollsIcon = (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
object2.IconComponent = PollsIcon;
object2.onPress = env0_9.onPollsPress;
object2.disabled = !env0_8.canPostPolls;
const items3 = [object2];
const value5 = arraySpread(items3, items, arraySpread(items3, items2, 1, undefined), undefined);
object2 = {};
object2.text = intl.string(t['8Hvr3+']);
const AttachmentIcon = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
object2.IconComponent = AttachmentIcon;
object2.onPress = env0_9.onAttachPress;
object2.disabled = env0_8.uploadDisabled;
items3[value5] = object2;
value5 + 1;
object2 = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl2.string;
const Zmm6dN = t.Zmm6dN;
object2.text = Reflect.apply(string, intl2, [Zmm6dN]);
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
object2.IconComponent = ImageIcon;
object2.onPress = env0_9.onViewAll;
object2.disabled = env0_8.uploadDisabled;
const items4 = [object2];
arraySpread(items4, items3, 1, intl);
return items4;
}
function onAttachFileParams_115484OnSelectFiles(a0) { // fn#115486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1537, owner: onAttachFileParams_115484.onSelectFiles, offset: 0x02462622, size: 27 bytes, params: 2, frame: 13
onSelectFiles_115483(a0, env0_0);
}
function _fun115503(a0) { // fn#115503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:4460, offset: 0x02462f1b, size: 70 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component animatedIndex={a0.animatedIndex} onPress={env0_9.onPressHeader} />)(importDefault(11100) /* metro dependency 11100: MediaKeyboardBottomSheetHeaderSimple */);
}
}
function _fun115504({animateOnMount, initialPosition}) { // fn#115504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:4554, offset: 0x02462f61, size: 260 bytes, params: 2, frame: 21
var environment;
animateOnMount = !(animateOnMount === undefined) && animateOnMount;
let value = environment.__proto__;
const MediaKeyboardAccessoriesContainer = importDefault(15149) /* metro dependency 15149: MediaKeyboardAccessoriesContainer */;
const object2 = {animateOnMount: animateOnMount};
const binding = env0_3;
object2.animatedIndex = binding;
object2.animatedPosition = env0_4;
object2.initialPosition = initialPosition;
value = importDefault(15150) /* metro dependency 15150: MediaKeyboardFloatingSend */;
value = ((Component) => <Component ref={env0_12} animatedIndex={binding} channelId={channel.id} draftType={env0_8.draftType} onSend={env0_9.onSend} />)(value);
return (
<MediaKeyboardAccessoriesContainer {...object2}>
{value}
{((Component) => <Component canPostPolls={env0_8.canPostPolls} onHeightChange={onHeightChange_115505} uploadDisabled={env0_8.uploadDisabled} overflowButtons={env0_11} />)(importDefault(11102) /* metro dependency 11102: MediaKeyboardBottomSheetActions */)}
</MediaKeyboardAccessoriesContainer>
);
}
function onSelectItem({channelId, item, isIncluded}) { // fn#115487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1574, offset: 0x0246263d, size: 271 bytes, params: 2, frame: 25
var moduleValue;
let value = environment.__proto__.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const MEDIA_PICKER_ACTION_SHEET_ENGAGED = AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED;
const MEDIA_SELECTED = MediaPickerActionSheetEngagedActions.MEDIA_SELECTED;
Reflect.apply(track, defaultImport, [MEDIA_PICKER_ACTION_SHEET_ENGAGED, {action: MEDIA_SELECTED}]);
const target = env1_5.target;
const CHAT = MediaKeyboardTarget.CHAT;
if (target === CHAT) {
(require(11095) /* metro dependency 11095: MediaKeyboardUtils */).handleSelectKeyboardItem(channelId, item,
isIncluded, false);
} else if (env1_5.target === MediaKeyboardTarget.COMMAND) {
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value = value.mediaNodeToUploadItem(item);
moduleValue = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
moduleValue.addAttachmentForCommand(channelId, chatInputRef, value, env1_5,
(require(4650) /* metro dependency 4650: Upload */).UploadOrigin.IMAGE_PICKER);
}
}
function onRestoreKeyboard() { // fn#115482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1117, offset: 0x024624a1, size: 102 bytes, params: 1, frame: 15
var current;
var openCustomKeyboard;
var object2;
const target = env1_5.target;
const APP_LAUNCHER = MediaKeyboardTarget.APP_LAUNCHER;
if (target !== APP_LAUNCHER) {
current = chatInputRef.current;
openCustomKeyboard = current.openCustomKeyboard;
object2 = {};
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.MEDIA;
object2.context = env1_5;
Reflect.apply(openCustomKeyboard, current, [object2]);
}
}
function onAttachPress_115488() { // fn#115488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1924, offset: 0x0246274c, size: 83 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
const handleAttachFile = value.handleAttachFile;
const object = {};
const onAttachFileParams_115484Binding = onAttachFileParams_115484;
const UploadOrigin = require(dependencyMap[20]).UploadOrigin;
const FILE_ATTACHMENT = UploadOrigin.FILE_ATTACHMENT;
copyDataProperties(object, onAttachFileParams_115484Binding(FILE_ATTACHMENT), dependencyMap);
Reflect.apply(handleAttachFile, value, [object]);
}
function onSelectFiles(a0, a1) { // fn#115483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1240, offset: 0x02462507, size: 171 bytes, params: 3, frame: 22
var moduleValue;
var moduleValue2;
const target = env1_5.target;
const CHAT = MediaKeyboardTarget.CHAT;
if (target === CHAT) {
moduleValue2 = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
moduleValue2.addImagesFromPicker(channel.id, a0, a1);
} else if (env1_5.target === MediaKeyboardTarget.COMMAND) {
moduleValue = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
moduleValue.addAttachmentForCommand(channel.id, chatInputRef, a0[0], env1_5, a1);
}
}
function onPressCamera_115489(a0) { // fn#115489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2034, offset: 0x0246279f, size: 97 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
const handleCameraDialog = value.handleCameraDialog;
const object = {};
const onAttachFileParams_115484Binding = onAttachFileParams_115484;
const UploadOrigin = require(dependencyMap[20]).UploadOrigin;
const IMAGE_PICKER = UploadOrigin.IMAGE_PICKER;
copyDataProperties(object, onAttachFileParams_115484Binding(IMAGE_PICKER), dependencyMap);
object['previewType'] = a0;
Reflect.apply(handleCameraDialog, value, [object]);
}
function onAttachFileParams_115484(a0) { // fn#115484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1397, offset: 0x024625b2, size: 75 bytes, params: 2, frame: 4
const env0_0 = a0;
return {channel: channel, uploadLimit: env1_8.uploadLimit, onDismissKeyboard: onDismissKeyboard_115485,
onRestoreKeyboard: onRestoreKeyboard, onSelectFiles: onSelectFiles_115486};
}
function onPressHeader() { // fn#115490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2156, offset: 0x02462800, size: 78 bytes, params: 1, frame: 10
var current;
if (env1_3.get() === 0) {
current = env1_2.current;
if (current != null) {
current.expand();
}
} else {
current = env1_2.current;
if (current != null) {
current.collapse();
}
}
}
function onSelectItem({channelId, item, isIncluded}) { // fn#115487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1574, offset: 0x0246263d, size: 271 bytes, params: 2, frame: 25
var moduleValue;
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const MEDIA_PICKER_ACTION_SHEET_ENGAGED = AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED;
const MEDIA_SELECTED = MediaPickerActionSheetEngagedActions.MEDIA_SELECTED;
Reflect.apply(track, defaultImport, [MEDIA_PICKER_ACTION_SHEET_ENGAGED, {action: MEDIA_SELECTED}]);
const target = env1_5.target;
const CHAT = MediaKeyboardTarget.CHAT;
if (target === CHAT) {
(require(11095) /* metro dependency 11095: MediaKeyboardUtils */).handleSelectKeyboardItem(channelId, item,
isIncluded, false);
} else if (env1_5.target === MediaKeyboardTarget.COMMAND) {
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value = value.mediaNodeToUploadItem(item);
moduleValue = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
moduleValue.addAttachmentForCommand(channelId, chatInputRef, value, env1_5,
(require(4650) /* metro dependency 4650: Upload */).UploadOrigin.IMAGE_PICKER);
}
}
function onViewAll_115491() { // fn#115491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2258, offset: 0x0246284e, size: 155 bytes, params: 1, frame: 18
var current;
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleViewAllDialog = value.handleViewAllDialog;
const object = {};
const onAttachFileParams_115484Binding = onAttachFileParams_115484;
const UploadOrigin = (UploadModule).UploadOrigin;
const IMAGE_PICKER = UploadOrigin.IMAGE_PICKER;
copyDataProperties(object, onAttachFileParams_115484Binding(IMAGE_PICKER), undefined);
object['draftType'] = env1_8.draftType;
Reflect.apply(handleViewAllDialog, value, [object]);
value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
current = env1_2.current;
if (current != null) {
current.collapse();
}
}
}
function onAttachPress_115488() { // fn#115488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1924, offset: 0x0246274c, size: 83 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
const handleAttachFile = value.handleAttachFile;
const object2 = {};
const onAttachFileParams_115484Binding = onAttachFileParams_115484;
const UploadOrigin = require(dependencyMap[20]).UploadOrigin;
const FILE_ATTACHMENT = UploadOrigin.FILE_ATTACHMENT;
copyDataProperties(object2, onAttachFileParams_115484Binding(FILE_ATTACHMENT), dependencyMap);
Reflect.apply(handleAttachFile, value, [object2]);
}
function onManageLimited_115492() { // fn#115492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2458, offset: 0x024628e9, size: 75 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleLimitedPickerDialog = value.handleLimitedPickerDialog;
const object = {};
object.onDismissKeyboard = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
object.onRestoreKeyboard = onRestoreKeyboard;
Reflect.apply(handleLimitedPickerDialog, value, [object]);
}
function onPressCamera_115489(a0) { // fn#115489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2034, offset: 0x0246279f, size: 97 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
const handleCameraDialog = value.handleCameraDialog;
const object2 = {};
const onAttachFileParams_115484Binding = onAttachFileParams_115484;
const UploadOrigin = require(dependencyMap[20]).UploadOrigin;
const IMAGE_PICKER = UploadOrigin.IMAGE_PICKER;
copyDataProperties(object2, onAttachFileParams_115484Binding(IMAGE_PICKER), dependencyMap);
object2['previewType'] = a0;
Reflect.apply(handleCameraDialog, value, [object2]);
}
function onLongPressItem({channelId, item, isIncluded}) { // fn#115494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2696, offset: 0x02462966, size: 277 bytes, params: 2, frame: 20
const value3 = (MediaKeyboardUtilsModule).mediaNodeToUploadItem(item);
const CloudUpload = (CloudUploadModule).CloudUpload;
const cloudUpload = new CloudUpload(value3, channelId);
const r6 = isIncluded ? UploadAttachmentStore.getUpload(channelId, cloudUpload.id,
DraftType.ChannelMessage) : undefined;
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: channelId,
disableAddDescription: r6 == null, disableSpoiler: r6 == null, upload: r6 ?? cloudUpload,
onAdd: r6 == null ? function() {
onSelectItem({channelId: channelId, item: item, isIncluded: isIncluded});
} : undefined, onEdit: onEdit_115497, onRemove: r6 == null ? undefined : _fun115495});
function _fun115495() { // fn#115495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2872, offset: 0x02462a7b, size: 57 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
return value.handleSelectKeyboardItem(channelId, item, isIncluded, false);
}
function onLongPressItemOnEdit(a0) { // fn#115497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3094, owner: onLongPressItem.onEdit, offset: 0x02462ae2, size: 86 bytes, params: 2, frame: 14
if (env0_3 != null) {
env0_3();
}
const onSelectFiles_115483Binding = onSelectFiles_115483;
const UploadOrigin = (UploadModule).UploadOrigin;
const IMAGE_EDITOR = UploadOrigin.IMAGE_EDITOR;
onSelectFiles_115483Binding([a0], IMAGE_EDITOR);
}
}
function onPollsPress() { // fn#115498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3193, offset: 0x02462b38, size: 153 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
const POLLS = ChatInputComponentViewedTypes.POLLS;
const channelBinding = channel;
Reflect.apply(track, defaultImport, [CHAT_INPUT_COMPONENT_VIEWED, {type: POLLS, channel_id: channelBinding.id,
guild_id: channelBinding.guild_id}]);
chatInputRef.current.closeCustomKeyboard();
(PollCreationModalActionCreatorsModule).openCreatePollModal({channel: channelBinding,
onCancel: onRestoreKeyboard});
}
function onThreadPress() { // fn#115500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3535, offset: 0x02462c2a, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value.handleSelectThread(channel, chatInputRef);
}
function onSend_115501() { // fn#115501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3581, offset: 0x02462c5c, size: 51 bytes, params: 1, frame: 10
const current = env1_2.current;
if (current != null) {
current.collapse();
}
chatInputRef.current.handleSend();
}
function onPressHeader() { // fn#115490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2156, offset: 0x02462800, size: 78 bytes, params: 1, frame: 10
var current;
if (env1_3.get() === 0) {
current = env1_2.current;
if (current != null) {
current.expand();
}
} else {
current = env1_2.current;
if (current != null) {
current.collapse();
function _fun115502() { // fn#115502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3704, offset: 0x02462c8f, size: 652 bytes, params: 1, frame: 22
var items5;
var items2;
var object;
var value2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value3;
if (MediaKeyboardConstantsModule.MediaPickerActionSheetEngagedActions) {
object = {};
value2 = environment.__proto__;
object.text = intl.string(t.PHjkRE);
object.IconComponent = (require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon;
object.onPress = ConstantsModule.ChatInputComponentViewedTypes.onAppsPress;
object.disabled = false;
items5 = [object];
} else {
items5 = [];
}
if (AppLauncherNativeConstantsModule.AppLauncherRouteName) {
object = {};
value3 = environment.__proto__;
object.text = intl.string(t['7Xm5QI']);
object.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object.onPress = ConstantsModule.ChatInputComponentViewedTypes.onThreadPress;
object.disabled = false;
items2 = [object];
} else {
items2 = [];
}
object = {};
let string = intl.string;
const RgIi2B = t.RgIi2B;
object.text = Reflect.apply(string, intl, [RgIi2B]);
const PollsIcon = (PollsIconModule).PollsIcon;
object.IconComponent = PollsIcon;
object.onPress = ConstantsModule.ChatInputComponentViewedTypes.onPollsPress;
object.disabled = !ConstantsModule.AnalyticEvents.canPostPolls;
const items3 = [object];
const value5 = arraySpread(items3, items5, arraySpread(items3, items2, 1, undefined), undefined);
object = {};
object.text = intl.string(t['8Hvr3+']);
const AttachmentIcon = (AttachmentIconModule).AttachmentIcon;
object.IconComponent = AttachmentIcon;
object.onPress = ConstantsModule.ChatInputComponentViewedTypes.onAttachPress;
object.disabled = ConstantsModule.AnalyticEvents.uploadDisabled;
items3[value5] = object;
value5 + 1;
object = {};
const intl2 = (IndexNativeModule).intl;
string = intl2.string;
const Zmm6dN = t.Zmm6dN;
object.text = Reflect.apply(string, intl2, [Zmm6dN]);
const ImageIcon = (ImageIconModule).ImageIcon;
object.IconComponent = ImageIcon;
object.onPress = ConstantsModule.ChatInputComponentViewedTypes.onViewAll;
object.disabled = ConstantsModule.AnalyticEvents.uploadDisabled;
const items4 = [object];
arraySpread(items4, items3, 1, intl);
return items4;
}
}
}
function onViewAll_115491() { // fn#115491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2258, offset: 0x0246284e, size: 155 bytes, params: 1, frame: 18
var current;
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleViewAllDialog = value.handleViewAllDialog;
const object2 = {};
const onAttachFileParams_115484Binding = onAttachFileParams_115484;
const UploadOrigin = (require(4650) /* metro dependency 4650: Upload */).UploadOrigin;
const IMAGE_PICKER = UploadOrigin.IMAGE_PICKER;
copyDataProperties(object2, onAttachFileParams_115484Binding(IMAGE_PICKER), undefined);
object2['draftType'] = env1_8.draftType;
Reflect.apply(handleViewAllDialog, value, [object2]);
value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
current = env1_2.current;
if (current != null) {
current.collapse();
function _fun115503(a0) { // fn#115503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:4460, offset: 0x02462f1b, size: 70 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component animatedIndex={a0.animatedIndex} onPress={ConstantsModule.ChatInputComponentViewedTypes.onPressHeader} />)(MediaKeyboardBottomSheetHeaderSimple);
}
function _fun115504({animateOnMount, initialPosition}) { // fn#115504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:4554, offset: 0x02462f61, size: 260 bytes, params: 2, frame: 21
var environment;
animateOnMount = !(animateOnMount === undefined) && animateOnMount;
let value = environment.__proto__;
const object = {animateOnMount: animateOnMount};
const binding = env0_3;
object.animatedIndex = binding;
object.animatedPosition = DraftStoreModule.DraftType;
object.initialPosition = initialPosition;
value = importDefault(15150) /* metro dependency 15150: MediaKeyboardFloatingSend */;
value = ((Component) => <Component ref={env0_12} animatedIndex={binding} channelId={channel.id} draftType={ConstantsModule.AnalyticEvents.draftType} onSend={ConstantsModule.ChatInputComponentViewedTypes.onSend} />)(value);
return (
<MediaKeyboardAccessoriesContainer {...object}>
{value}
{((Component) => <Component canPostPolls={ConstantsModule.AnalyticEvents.canPostPolls} onHeightChange={onHeightChange_115505} uploadDisabled={ConstantsModule.AnalyticEvents.uploadDisabled} overflowButtons={PortalKeyboardConstantsModule.KEYBOARD_ANIMATION_CONFIG} />)(MediaKeyboardBottomSheetActions)}
</MediaKeyboardAccessoriesContainer>
);
function onHeightChange_115505(a0) { // fn#115505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:4833, offset: 0x02463065, size: 47 bytes, params: 2, frame: 13
const value = environment.__proto__;
return env1_12.current?.setInsetFab(a0 + env1_6);
}
}
}
}
function onManageLimited_115492() { // fn#115492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2458, offset: 0x024628e9, size: 75 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleLimitedPickerDialog = value.handleLimitedPickerDialog;
const object2 = {};
object2.onDismissKeyboard = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
object2.onRestoreKeyboard = onRestoreKeyboard;
Reflect.apply(handleLimitedPickerDialog, value, [object2]);
}
function onLongPressItem({channelId, item, isIncluded}) { // fn#115494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2696, offset: 0x02462966, size: 277 bytes, params: 2, frame: 20
const value3 = (require(11095) /* metro dependency 11095: MediaKeyboardUtils */).mediaNodeToUploadItem(item);
const CloudUpload = (require(4648) /* metro dependency 4648: CloudUpload */).CloudUpload;
const cloudUpload = new CloudUpload(value3, channelId);
const r6 = isIncluded ? UploadAttachmentStore.getUpload(channelId, cloudUpload.id,
DraftType.ChannelMessage) : undefined;
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: channelId,
disableAddDescription: r6 == null, disableSpoiler: r6 == null, upload: r6 ?? cloudUpload,
onAdd: r6 == null ? function() {
onSelectItem({channelId: channelId, item: item, isIncluded: isIncluded});
} : undefined, onEdit: onEdit_115497, onRemove: r6 == null ? undefined : _fun115495});
}
function onPollsPress() { // fn#115498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3193, offset: 0x02462b38, size: 153 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
const POLLS = ChatInputComponentViewedTypes.POLLS;
const channelBinding = channel;
Reflect.apply(track, defaultImport, [CHAT_INPUT_COMPONENT_VIEWED, {type: POLLS, channel_id: channelBinding.id,
guild_id: channelBinding.guild_id}]);
chatInputRef.current.closeCustomKeyboard();
(require(11733) /* metro dependency 11733: PollCreationModalActionCreators */).openCreatePollModal({channel: channelBinding,
onCancel: onRestoreKeyboard});
}
function onThreadPress() { // fn#115500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3535, offset: 0x02462c2a, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value.handleSelectThread(channel, chatInputRef);
}
function onSend_115501() { // fn#115501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3581, offset: 0x02462c5c, size: 51 bytes, params: 1, frame: 10
const current = env1_2.current;
if (current != null) {
current.collapse();
}
chatInputRef.current.handleSend();
}
function onHeightChange_115505(a0) { // fn#115505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:4833, offset: 0x02463065, size: 47 bytes, params: 2, frame: 13
const value = environment.__proto__;
return env1_12.current?.setInsetFab(a0 + env1_6);
}
function onAttachFileParams_115484OnDismissKeyboard() { // fn#115485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1456, owner: onAttachFileParams_115484.onDismissKeyboard, offset: 0x024625fd, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
}
function onAttachFileParams_115484OnSelectFiles(a0) { // fn#115486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:1537, owner: onAttachFileParams_115484.onSelectFiles, offset: 0x02462622, size: 27 bytes, params: 2, frame: 13
onSelectFiles(a0, env0_0);
}
function _fun115495() { // fn#115495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:2872, offset: 0x02462a7b, size: 57 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
return value.handleSelectKeyboardItem(channelId, item, isIncluded, false);
}
function onLongPressItemOnEdit(a0) { // fn#115497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15342:3094, owner: onLongPressItem.onEdit, offset: 0x02462ae2, size: 86 bytes, params: 2, frame: 14
if (env0_3 != null) {
env0_3();
}
const onSelectFilesBinding = onSelectFiles;
const UploadOrigin = (require(4650) /* metro dependency 4650: Upload */).UploadOrigin;
const IMAGE_EDITOR = UploadOrigin.IMAGE_EDITOR;
onSelectFilesBinding([a0], IMAGE_EDITOR);
}
global.__d(_fun115478, 15145, [31, 4645, 4644, 1580, 661, 1483, 11576, 33, 683, 4017, 4022, 1583, 15146, 1357, 3860,
697, 8448, 15147, 11095, 4015, 4650, 477, 4648, 11093, 11733, 1244, 8840, 6684, 11098, 9786, 6697, 11100, 15149,
15150, 11102, 15151, 11103,
2]) /* metro module 15145, dependencies: [31, 4645, 4644, 1580, 661, 1483, 11576, 33, 683, 4017, 4022, 1583, 15146, 1357, 3860, 697, 8448, 15147, 11095, 4015, 4650, 477, 4648, 11093, 11733, 1244, 8840, 6684, 11098, 9786, 6697, 11100, 15149, 15150, 11102, 15151, 11103, 2] */;
@@ -1,94 +1,98 @@
/* Metro module 15149; source: modules/media_keyboard/native/components/MediaKeyboardAccessoriesContainer.tsx; dependencies: [31, 27, 10738, 33, 477, 4501, 4017, 566, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import NativeMenuStore from '../../../native_menu/native/NativeMenuStore.tsx'; /* Metro dependency 10738 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun115523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:6, offset: 0x02463971, size: 277 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const nativeMenuStore = importDefault(10738) /* metro dependency 10738: NativeMenuStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const StyleSheet = (ReactNativeModule).StyleSheet;
const env0_6 = (PlatformUtilsModule).isAndroid();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const env0_7 = Reflect.apply(createStyles, value, [{androidContainer: {flex: 1}, iosContainer: object2}]);
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
const env0_7 = Reflect.apply(createStyles, value, [{androidContainer: {flex: 1}, iosContainer: object3}]);
object = {code: 'function MediaKeyboardAccessoriesContainerTsx1(){const{animateOnMount,initialLayout,animatedIndex,initialPosition,animatedPosition,interpolate,IS_ANDROID}=this.__closure;const animatedMountDisabledAndNotInitialLayout=!animateOnMount&&!initialLayout.get();const animatedSheetIndexOrDefault=animatedMountDisabledAndNotInitialLayout?0:Math.min(animatedIndex.get(),0);const animatedSheetPositionOrDefault=animatedMountDisabledAndNotInitialLayout?initialPosition:animatedPosition.get();const transform=[{translateY:interpolate(animatedSheetIndexOrDefault,[-1,0],[100,0])}];if(IS_ANDROID){return{marginTop:animatedSheetPositionOrDefault,transform:transform};}return{top:animatedSheetPositionOrDefault,transform:transform};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardAccessoriesContainer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardAccessoriesContainer.tsx');
exports.default = MediaKeyboardAccessoriesContainer;
}
function MediaKeyboardAccessoriesContainer({animatedIndex, animatedPosition, animateOnMount, children, initialPosition}) { // fn#115524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:999, offset: 0x02463a86, size: 415 bytes, params: 2, frame: 27
const initialPosition2 = initialPosition;
const styles = useStyles();
const binding = initialPosition2;
const value3 = binding.useMemo(_fun115525, [styles]);
const env0_5 = binding.useRef(false);
const value4 = (ReanimatedRexportModule).useSharedValue(false);
const env0_6 = value4;
const value5 = binding.useCallback(_fun115526, [value4]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const MediaKeyboardAccessoriesContainer_2 = MediaKeyboardAccessoriesContainer_;
object = {animateOnMount: animateOnMount, initialLayout: value4, animatedIndex: animatedIndex,
initialPosition: initialPosition, animatedPosition: animatedPosition};
object.interpolate = ReanimatedRexportModule.interpolate;
object.IS_ANDROID = env0_6;
MediaKeyboardAccessoriesContainer_2.__closure = object;
MediaKeyboardAccessoriesContainer_2.__workletHash = 10575537164844;
MediaKeyboardAccessoriesContainer_2.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [MediaKeyboardAccessoriesContainer_2]);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NativeMenuStore], function() {
return NativeMenuStore.isOpen();
});
const View = (ReanimatedRexport).View;
return (
<View
importantForAccessibility={value7 ? 'no-hide-descendants' : undefined}
style={[value3, value6]}
onLayout={value5}
pointerEvents="box-none"
>
{children}
</View>
);
function _fun115525() { // fn#115525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:1151, offset: 0x02463c25, size: 58 bytes, params: 1, frame: 13
const object = {};
const binding = env1_6;
const stylesBinding = styles;
copyDataProperties(object, binding ? stylesBinding.androidContainer : stylesBinding.iosContainer, undefined);
object['overflow'] = 'hidden';
return object;
}
function MediaKeyboardAccessoriesContainer({animatedIndex, animatedPosition, animateOnMount, children, initialPosition}) { // fn#115524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:999, offset: 0x02463a86, size: 415 bytes, params: 2, frame: 27
var object2;
const env0_3 = initialPosition;
const styles = useStyles();
const binding = env0_3;
const value3 = binding.useMemo(_fun115525, [styles]);
const env0_5 = binding.useRef(false);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_6 = value4;
const value5 = binding.useCallback(_fun115526, [value4]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = MediaKeyboardAccessoriesContainer_;
object2 = {animateOnMount: animateOnMount, initialLayout: value4, animatedIndex: animatedIndex,
initialPosition: initialPosition, animatedPosition: animatedPosition};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.IS_ANDROID = env0_6;
closure.__closure = object2;
closure.__workletHash = 10575537164844;
closure.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NativeMenuStore], function() {
return NativeMenuStore.isOpen();
});
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View
importantForAccessibility={value7 ? 'no-hide-descendants' : undefined}
style={[value3, value6]}
onLayout={value5}
pointerEvents="box-none"
>
{children}
</View>
);
}
function _fun115526() { // fn#115526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:1283, offset: 0x02463c5f, size: 45 bytes, params: 1, frame: 11
if (!env0_5.current) {
env0_5.current = true;
env0_6.set(true);
}
}
function _fun115525() { // fn#115525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:1151, offset: 0x02463c25, size: 58 bytes, params: 1, frame: 13
const object2 = {};
const binding = env1_6;
const stylesBinding = styles;
copyDataProperties(object2, binding ? stylesBinding.androidContainer : stylesBinding.iosContainer, undefined);
object2['overflow'] = 'hidden';
return object2;
}
function MediaKeyboardAccessoriesContainer_() { // fn#115527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:1362, owner: MediaKeyboardAccessoriesContainer._, offset: 0x02463c8c, size: 206 bytes, params: 1, frame: 19
const r1 = !animateOnMount && !env0_6.get();
const value4 = 0;
const r7 = r1 ? value4 : global.Math.min(animatedIndex.get(), value4);
const r3 = r1 ? initialPosition : animatedPosition.get();
const value = environment.__proto__;
const items2 = [{translateY: ReanimatedRexportModule.interpolate(r7, [-1, value4], [100, 0])}];
const binding = env1_6;
object = {};
if (binding) {
object.marginTop = r3;
object.transform = items2;
} else {
object.top = r3;
object.transform = items2;
}
return object;
}
function _fun115526() { // fn#115526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:1283, offset: 0x02463c5f, size: 45 bytes, params: 1, frame: 11
if (!env0_5.current) {
env0_5.current = true;
env0_6.set(true);
}
}
function MediaKeyboardAccessoriesContainer_() { // fn#115527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15346:1362, owner: MediaKeyboardAccessoriesContainer._, offset: 0x02463c8c, size: 206 bytes, params: 1, frame: 19
var object2;
const r1 = !animateOnMount && !env0_6.get();
const value4 = 0;
const r7 = r1 ? value4 : global.Math.min(animatedIndex.get(), value4);
const r3 = r1 ? initialPosition : animatedPosition.get();
const value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const items2 = [{translateY: reanimatedRexportModule.interpolate(r7, [-1, value4], [100, 0])}];
const binding = env1_6;
object2 = {};
if (binding) {
object2.marginTop = r3;
object2.transform = items2;
} else {
object2.top = r3;
object2.transform = items2;
}
return object2;
}
global.__d(_fun115523, 15149, [31, 27, 10738, 33, 477, 4501, 4017, 566,
2]) /* metro module 15149, dependencies: [31, 27, 10738, 33, 477, 4501, 4017, 566, 2] */;
@@ -1,112 +1,126 @@
/* Metro module 11097; source: modules/media_keyboard/native/components/MediaKeyboardActionSheet.tsx; dependencies: [31, 1580, 661, 33, 4017, 1244, 11098, 9786, 11100, 4081, 4082, 683, 4594, 11102, 6697, 6275, 1581, 11103, 2] */
import MediaKeyboardBottomSheetHeaderSimple from './MediaKeyboardBottomSheetHeaderSimple.tsx'; /* Metro dependency 11100 */
import MediaKeyboardBottomSheetActions from './MediaKeyboardBottomSheetActions.tsx'; /* Metro dependency 11102 */
import MediaKeyboardList from './MediaKeyboardList.tsx'; /* Metro dependency 11103 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
import * as MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ImageIconModule from '../../../../design/components/Icon/native/redesign/generated/ImageIcon.tsx'; /* Metro dependency 6697 */
import * as AttachmentIconModule from '../../../../design/components/Icon/native/redesign/generated/AttachmentIcon.tsx'; /* Metro dependency 9786 */
import * as PollsIconModule from '../../../../design/components/Icon/native/redesign/generated/PollsIcon.tsx'; /* Metro dependency 11098 */
function _fun85006(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:6, offset: 0x01f5ff75, size: 186 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).MediaPickerActionSheetEngagedActions;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardActionSheet.tsx');
exports.default = MediaKeyboardActionSheet;
}
function MediaKeyboardActionSheet({channel, draftType, uploadLimit, disableWhenReachedLimit, includedUploadIds, extensions, allowCamera, onPressCamera, onAttachPress, onPressItem, onLongPressItem, onViewAll, onManageLimited, onClose, onBack}) { // fn#85007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:306, offset: 0x01f6002f, size: 509 bytes, params: 2, frame: 37
const env0_3 = onBack;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
const binding = env0_3;
const value3 = binding.useMemo(_fun85008, [onAttachPress]);
const value4 = binding.useCallback(_fun85010, [value2, onBack]);
const value5 = binding.useCallback(function() {
require(dependencyMap[9]).triggerHapticFeedback(importDefault(dependencyMap[10]).IMPACT_LIGHT);
var defaultImport = importDefault(dependencyMap[11]);
var MEDIA_PICKER_ACTION_SHEET_ENGAGED = AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED;
defaultImport.track(MEDIA_PICKER_ACTION_SHEET_ENGAGED,
{action: MediaPickerActionSheetEngagedActions.FULLY_EXPANDED});
}, []);
const value6 = binding.useCallback(function() {
if (onClose != null) {
onClose();
function MediaKeyboardActionSheet({channel, draftType, uploadLimit, disableWhenReachedLimit, includedUploadIds, extensions, allowCamera, onPressCamera, onAttachPress, onPressItem, onLongPressItem, onViewAll, onManageLimited, onClose, onBack}) { // fn#85007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:306, offset: 0x01f6002f, size: 509 bytes, params: 2, frame: 37
const onBack2 = onBack;
const value2 = (ReanimatedRexportModule).useSharedValue(-1);
const binding = onBack2;
const value3 = binding.useMemo(_fun85008, [onAttachPress]);
const value4 = binding.useCallback(_fun85010, [value2, onBack]);
const value5 = binding.useCallback(function() {
require(dependencyMap[9]).triggerHapticFeedback(importDefault(dependencyMap[10]).IMPACT_LIGHT);
var defaultImport = importDefault(dependencyMap[11]);
var MEDIA_PICKER_ACTION_SHEET_ENGAGED = AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED;
defaultImport.track(MEDIA_PICKER_ACTION_SHEET_ENGAGED,
{action: MediaPickerActionSheetEngagedActions.FULLY_EXPANDED});
}, []);
const value6 = binding.useCallback(function() {
if (onClose != null) {
onClose();
}
}, [onClose]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
return _fun85014;
});
const value7 = binding.useMemo(_fun85015, [onViewAll, value3]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
return (
<BottomSheet
handleComponent={value4}
scrollable
startExpanded={(MetaQuestUtilsAndroidModule).isMetaQuest()}
onExpand={value5}
onDismiss={value6}
animatedIndex={value2}
footer={value7}
>
{((Component) => <Component channel={channel} draftType={draftType} onPressCamera={onPressCamera} onAttachPress={onAttachPress} onPressItem={onPressItem} onLongPressItem={onLongPressItem} onViewAll={onViewAll} onManageLimited={onManageLimited} includedUploadIds={includedUploadIds} extensions={extensions} allowCamera={allowCamera} uploadLimit={uploadLimit} disableWhenReachedLimit={disableWhenReachedLimit} />)(MediaKeyboardList)}
</BottomSheet>
);
function _fun85008() { // fn#85008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:611, offset: 0x01f6022c, size: 210 bytes, params: 1, frame: 16
let object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const RgIi2B = t.RgIi2B;
object.text = Reflect.apply(string, intl, [RgIi2B]);
const PollsIcon = (PollsIconModule).PollsIcon;
object.IconComponent = PollsIcon;
object.onPress = function() {
};
object.disabled = true;
const items2 = [object];
object = {};
object.text = intl.string(t['8Hvr3+']);
const AttachmentIcon = (AttachmentIconModule).AttachmentIcon;
object.IconComponent = AttachmentIcon;
object.onPress = onAttachPress;
object.disabled = false;
items2[1] = object;
return items2;
}
}, [onClose]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
return _fun85014;
});
const value7 = binding.useMemo(_fun85015, [onViewAll, value3]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet
handleComponent={value4}
scrollable
startExpanded={(require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest()}
onExpand={value5}
onDismiss={value6}
animatedIndex={value2}
footer={value7}
>
{((Component) => <Component channel={channel} draftType={draftType} onPressCamera={onPressCamera} onAttachPress={onAttachPress} onPressItem={onPressItem} onLongPressItem={onLongPressItem} onViewAll={onViewAll} onManageLimited={onManageLimited} includedUploadIds={includedUploadIds} extensions={extensions} allowCamera={allowCamera} uploadLimit={uploadLimit} disableWhenReachedLimit={disableWhenReachedLimit} />)(importDefault(11103) /* metro dependency 11103: MediaKeyboardList */)}
</BottomSheet>
);
}
function _fun85008() { // fn#85008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:611, offset: 0x01f6022c, size: 210 bytes, params: 1, frame: 16
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const RgIi2B = t.RgIi2B;
object2.text = Reflect.apply(string, intl, [RgIi2B]);
const PollsIcon = (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
object2.IconComponent = PollsIcon;
object2.onPress = function() {
};
object2.disabled = true;
const items2 = [object2];
object2 = {};
object2.text = intl.string(t['8Hvr3+']);
const AttachmentIcon = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
object2.IconComponent = AttachmentIcon;
object2.onPress = onAttachPress;
object2.disabled = false;
items2[1] = object2;
return items2;
}
function _fun85010() { // fn#85010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:851, offset: 0x01f602fe, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component animatedIndex={MediaKeyboardConstantsModule.MediaPickerActionSheetEngagedActions} onPress={onBack} />)(MediaKeyboardBottomSheetHeaderSimple);
}
function _fun85010() { // fn#85010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:851, offset: 0x01f602fe, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component animatedIndex={env0_4} onPress={onBack} />)(importDefault(11100) /* metro dependency 11100: MediaKeyboardBottomSheetHeaderSimple */);
}
function _fun85013() { // fn#85013, offset: 0x01f603c1, size: 11 bytes, params: 1, frame: 1
return _fun85014;
function _fun85014() { // fn#85014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:1117, offset: 0x01f603cc, size: 30 bytes, params: 1, frame: 11
const value = environment.__proto__;
return env1_6?.();
}
function _fun85013() { // fn#85013, offset: 0x01f603c1, size: 11 bytes, params: 1, frame: 1
return _fun85014;
}
}
function _fun85015() { // fn#85015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:1159, offset: 0x01f603ea, size: 189 bytes, params: 1, frame: 21
const MediaKeyboardBottomSheetActions = importDefault(11102) /* metro dependency 11102: MediaKeyboardBottomSheetActions */;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Zmm6dN = (require(1244) /* metro dependency 1244: indexNative */).t.Zmm6dN;
object.text = Reflect.apply(string, intl, [Zmm6dN]);
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
object.IconComponent = ImageIcon;
object.onPress = onViewAll;
object.disabled = false;
const items2 = [object];
arraySpread(items2, env0_5, 1, intl);
return (
<MediaKeyboardBottomSheetActions
canPostPolls={false}
onHeightChange={function() {
}}
uploadDisabled={false}
overflowButtons={items2}
/>
);
}
function _fun85015() { // fn#85015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:1159, offset: 0x01f603ea, size: 189 bytes, params: 1, frame: 21
const object2 = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const Zmm6dN = (IndexNativeModule).t.Zmm6dN;
object2.text = Reflect.apply(string, intl, [Zmm6dN]);
const ImageIcon = (ImageIconModule).ImageIcon;
object2.IconComponent = ImageIcon;
object2.onPress = onViewAll;
object2.disabled = false;
const items2 = [object2];
arraySpread(items2, ConstantsModule.AnalyticEvents, 1, intl);
return (
<MediaKeyboardBottomSheetActions
canPostPolls={false}
onHeightChange={function() {
}}
uploadDisabled={false}
overflowButtons={items2}
/>
);
}
}
function _fun85014() { // fn#85014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11283:1117, offset: 0x01f603cc, size: 30 bytes, params: 1, frame: 11
const value = environment.__proto__;
return env1_6?.();
}
global.__d(_fun85006, 11097, [31, 1580, 661, 33, 4017, 1244, 11098, 9786, 11100, 4081, 4082, 683, 4594, 11102, 6697,
6275, 1581, 11103,
2]) /* metro module 11097, dependencies: [31, 1580, 661, 33, 4017, 1244, 11098, 9786, 11100, 4081, 4082, 683, 4594, 11102, 6697, 6275, 1581, 11103, 2] */;
@@ -1,200 +1,234 @@
/* Metro module 15151; source: modules/media_keyboard/native/components/MediaKeyboardBottomSheet.tsx; dependencies: [57, 31, 27, 1580, 661, 33, 1581, 4501, 697, 1244, 11621, 4508, 6277, 4018, 4081, 4082, 683, 4559, 4017, 4594, 1585, 4556, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import REAWorkaroundView from '../../../reanimated/native/REAWorkaroundView.tsx'; /* Metro dependency 4018 */
import defaultImport3 from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import UseCustomKeyboardBottomSheetConfig from '../../../action_sheet/native/useCustomKeyboardBottomSheetConfig.tsx'; /* Metro dependency 11621 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
import * as MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as AccessibilityViewNativeModule from '../../../../design/components/AccessibilityView/AccessibilityView.native.tsx'; /* Metro dependency 4556 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
function _fun115539(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:6, offset: 0x02464462, size: 400 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const mediaKeyboardConstantsModule = require(1580) /* metro dependency 1580: MediaKeyboardConstants */;
const env0_6 = mediaKeyboardConstantsModule.HEADER_HANDLE_HEIGHT;
const env0_7 = mediaKeyboardConstantsModule.MediaPickerActionSheetEngagedActions;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.Fragment;
const env0_11 = value3.jsxs;
const env0_12 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest();
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
const env0_13 = Reflect.apply(createStyles, createStylesModule,
let value = ReactModule;
const env0_12 = (MetaQuestUtilsAndroidModule).isMetaQuest();
const createStyles = CreateStylesModule.createStyles;
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (Native).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule,
[{background: {backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND, borderRadius: 15}}]);
object = {code: 'function MediaKeyboardBottomSheetTsx1(){const{animatedIndex}=this.__closure;return Math.max(animatedIndex.get(),0)>0;}'};
object = {code: 'function MediaKeyboardBottomSheetTsx2(result,previous){const{runOnJS,setAccessibilityViewIsModal}=this.__closure;if(result===previous)return;runOnJS(setAccessibilityViewIsModal)(result);}'};
value = value.memo(MediaKeyboardBottomSheet);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheet.tsx');
exports.default = value;
}
function MediaKeyboardBackground({pointerEvents, style}) { // fn#115540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:415, offset: 0x024645f2, size: 118 bytes, params: 2, frame: 19
const intl = (IndexNativeModule).intl;
const string = intl.string;
const XONG6A = (IndexNativeModule).t.XONG6A;
return (
<View
pointerEvents={pointerEvents}
accessible
accessibilityRole="adjustable"
accessibilityLabel={Reflect.apply(string, intl, [XONG6A])}
style={style}
/>
);
}
function MediaKeyboardBackground({pointerEvents, style}) { // fn#115540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:415, offset: 0x024645f2, size: 118 bytes, params: 2, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const XONG6A = (require(1244) /* metro dependency 1244: indexNative */).t.XONG6A;
return (
<View
pointerEvents={pointerEvents}
accessible
accessibilityRole="adjustable"
accessibilityLabel={Reflect.apply(string, intl, [XONG6A])}
style={style}
/>
);
}
function MediaKeyboardBottomSheet({accessoriesComponent, animatedIndex, animatedPosition, bottomSheetRef, children, handleComponent, onClose, transitionState, animationConfigs, overlayComponent}) { // fn#115541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:962, offset: 0x02464668, size: 823 bytes, params: 2, frame: 39
const styles = useStyles();
const value2 = (importDefault(11621) /* metro dependency 11621: useCustomKeyboardBottomSheetConfig */)({forceMaxHeight: false});
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
const value3 = transitionState === YEETED;
let binding = undefined;
let closure = _fun115542;
const value4 = binding.useCallback(closure, []);
const value5 = binding.useCallback(_fun115543, []);
const value6 = binding.useCallback(_fun115544, [value3, onClose]);
const r20 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled() || value3;
binding = undefined;
let [property, property2] = env0_3(binding.useState(false), 2);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = MediaKeyboardBottomSheetD;
closure.__closure = {animatedIndex: animatedIndex};
closure.__workletHash = 6409838147176;
closure.__initData = env0_14;
const closure2 = MediaKeyboardBottomSheetB;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setAccessibilityViewIsModal: property2};
closure2.__workletHash = 4155361737130;
closure2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
return _fun115548;
});
binding.useLayoutEffect(function() {
var property;
if (result) {
if (bottomSheetRef.current != null) {
property = bottomSheetRef.current;
property.forceClose();
property = global.setTimeout;
var env0_0 = property(_fun115550, 500);
return _fun115551;
function MediaKeyboardBottomSheet({accessoriesComponent, animatedIndex, animatedPosition, bottomSheetRef, children, handleComponent, onClose, transitionState, animationConfigs, overlayComponent}) { // fn#115541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:962, offset: 0x02464668, size: 823 bytes, params: 2, frame: 39
const styles = useStyles();
const value2 = (UseCustomKeyboardBottomSheetConfig)({forceMaxHeight: false});
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
const value3 = transitionState === YEETED;
let binding = undefined;
let closure = _fun115542;
const value4 = binding.useCallback(closure, []);
const value5 = binding.useCallback(_fun115543, []);
const value6 = binding.useCallback(_fun115544, [value3, onClose]);
const r20 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled() || value3;
binding = undefined;
let [property, property2] = Module00057(binding.useState(false), 2);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = MediaKeyboardBottomSheetD;
closure.__closure = {animatedIndex: animatedIndex};
closure.__workletHash = 6409838147176;
closure.__initData = env0_14;
const MediaKeyboardBottomSheetB2 = MediaKeyboardBottomSheetB;
MediaKeyboardBottomSheetB2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS,
setAccessibilityViewIsModal: property2};
MediaKeyboardBottomSheetB2.__workletHash = 4155361737130;
MediaKeyboardBottomSheetB2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, MediaKeyboardBottomSheetB2]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
return _fun115548;
});
binding.useLayoutEffect(function() {
var property;
if (result) {
if (bottomSheetRef.current != null) {
property = bottomSheetRef.current;
property.forceClose();
property = global.setTimeout;
var env0_0 = property(_fun115550, 500);
return _fun115551;
}
if (onClose != null) {
onClose();
}
}
if (onClose != null) {
onClose();
}, [bottomSheetRef, value3, onClose]);
const {left, right} = (UseSafeAreaInsetsNative)();
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const defaultImport3Props = {style: {marginLeft: left, marginRight: right},
BodyComponent: REAWorkaroundView, ref: bottomSheetRef,
animationConfigs: animationConfigs, animatedIndex: animatedIndex, animatedPosition: animatedPosition};
const value11 = !r20;
defaultImport3Props.enableContentPanningGesture = r20 ? value11 : !env0_12;
defaultImport3Props.enableHandlePanningGesture = value11;
defaultImport3Props.handleComponent = handleComponent;
defaultImport3Props.backgroundComponent = value4;
defaultImport3Props.backgroundStyle = styles.background;
defaultImport3Props.backdropComponent = value5;
defaultImport3Props.onAnimate = value6;
defaultImport3Props.handleHeight = HEADER_HANDLE_HEIGHT;
defaultImport3Props.onClose = onClose;
copyDataProperties(defaultImport3Props, value2, left);
const AccessibilityViewAnimated = (AccessibilityViewNativeModule).AccessibilityViewAnimated;
let value = (
<AccessibilityViewAnimated
nativeID="media-keyboard-sheet"
onAccessibilityEscape={function() {
var current = bottomSheetRef.current;
if (current != null) {
current.collapse();
}
}}
accessibilityViewIsModal={property}
>
{children}
</AccessibilityViewAnimated>
);
value = ((Component) => <Component {...defaultImport3Props}>{value}</Component>)(defaultImport3);
return (
<>
{[value, accessoriesComponent(value2), overlayComponent]}
</>
);
function _fun115542(a0) { // fn#115542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1271, offset: 0x0246499f, size: 33 bytes, params: 2, frame: 13
return <MediaKeyboardBackground {...a0} />;
}
function _fun115543(a0) { // fn#115543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1330, offset: 0x024649c0, size: 95 bytes, params: 2, frame: 16
const value = environment.__proto__;
const BottomSheetBackdrop = (Module06277Module).BottomSheetBackdrop;
const bottomSheetBackdropProps = {...a0};
bottomSheetBackdropProps['ViewComponent'] = importDefault(4018) /* metro dependency 4018: REAWorkaroundView */;
bottomSheetBackdropProps['pressBehavior'] = 'collapse';
return <BottomSheetBackdrop {...bottomSheetBackdropProps} />;
}
function _fun115544(a0, a1) { // fn#115544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1442, offset: 0x02464a1f, size: 181 bytes, params: 3, frame: 17
var moduleValue;
var defaultImport;
var value;
if (result) {
if (a1 !== -1) {
if (onClose != null) {
onClose();
}
} else {
value = a0 !== a1;
if (value && a0 === 0) {
value = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED,
{action: MediaPickerActionSheetEngagedActions.FULLY_EXPANDED});
}
}
} else {
value = a0 !== a1;
if (value && a0 === 0) {
value = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED,
{action: MediaPickerActionSheetEngagedActions.FULLY_EXPANDED});
}
}
}
}, [bottomSheetRef, value3, onClose]);
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const defaultImport3 = importDefault(6277) /* metro dependency 6277 */;
const defaultImport3Props = {style: {marginLeft: left, marginRight: right},
BodyComponent: importDefault(4018) /* metro dependency 4018: REAWorkaroundView */, ref: bottomSheetRef,
animationConfigs: animationConfigs, animatedIndex: animatedIndex, animatedPosition: animatedPosition};
const value11 = !r20;
defaultImport3Props.enableContentPanningGesture = r20 ? value11 : !env0_12;
defaultImport3Props.enableHandlePanningGesture = value11;
defaultImport3Props.handleComponent = handleComponent;
defaultImport3Props.backgroundComponent = value4;
defaultImport3Props.backgroundStyle = styles.background;
defaultImport3Props.backdropComponent = value5;
defaultImport3Props.onAnimate = value6;
defaultImport3Props.handleHeight = HEADER_HANDLE_HEIGHT;
defaultImport3Props.onClose = onClose;
copyDataProperties(defaultImport3Props, value2, left);
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
let value = <AccessibilityViewAnimated nativeID="media-keyboard-sheet" onAccessibilityEscape={function() {
var current = bottomSheetRef.current;
if (current != null) {
current.collapse();
function MediaKeyboardBottomSheetD() { // fn#115545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1744, owner: MediaKeyboardBottomSheet.D, offset: 0x01ffe12c, size: 43 bytes, params: 1, frame: 13
const Math = global.Math;
return Math.max(animatedIndex.get(), 0) > 0;
}
}} accessibilityViewIsModal={property}>{children}</AccessibilityViewAnimated>;
value = ((Component) => <Component {...defaultImport3Props}>{value}</Component>)(defaultImport3);
return (
<>
{[value, accessoriesComponent(value2), overlayComponent]}
</>
);
}
function _fun115542(a0) { // fn#115542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1271, offset: 0x0246499f, size: 33 bytes, params: 2, frame: 13
return <MediaKeyboardBackground {...a0} />;
}
function _fun115543(a0) { // fn#115543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1330, offset: 0x024649c0, size: 95 bytes, params: 2, frame: 16
const value = environment.__proto__;
const BottomSheetBackdrop = (require(6277) /* metro dependency 6277 */).BottomSheetBackdrop;
const bottomSheetBackdropProps = {...a0};
bottomSheetBackdropProps['ViewComponent'] = importDefault(4018) /* metro dependency 4018: REAWorkaroundView */;
bottomSheetBackdropProps['pressBehavior'] = 'collapse';
return <BottomSheetBackdrop {...bottomSheetBackdropProps} />;
}
function _fun115544(a0, a1) { // fn#115544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1442, offset: 0x02464a1f, size: 181 bytes, params: 3, frame: 17
var moduleValue;
var defaultImport;
var value;
if (result) {
if (a1 !== -1) {
if (onClose != null) {
onClose();
}
} else {
value = a0 !== a1;
if (value && a0 === 0) {
function MediaKeyboardBottomSheetB(a0, a1) { // fn#115546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1851, owner: MediaKeyboardBottomSheet.B, offset: 0x02464ad4, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED,
{action: MediaPickerActionSheetEngagedActions.FULLY_EXPANDED});
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_4)(a0);
}
}
} else {
value = a0 !== a1;
if (value && a0 === 0) {
value = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ACTION_SHEET_ENGAGED,
{action: MediaPickerActionSheetEngagedActions.FULLY_EXPANDED});
function _fun115547() { // fn#115547, offset: 0x02464b11, size: 11 bytes, params: 1, frame: 1
return function() {
if (onClose != null) {
onClose();
}
};
function _fun115548() { // fn#115548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:2027, offset: 0x01c50494, size: 27 bytes, params: 1, frame: 10
if (onClose != null) {
onClose();
}
}
}
function _fun115549() { // fn#115549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:2067, offset: 0x02464b1c, size: 110 bytes, params: 1, frame: 14
if (result) {
if (bottomSheetRef.current != null) {
bottomSheetRef.current.forceClose();
var env0_0 = global.setTimeout(_fun115550, 500);
return _fun115551;
}
if (onClose != null) {
onClose();
}
}
function _fun115550() { // fn#115550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:2139, offset: 0x02464b8a, size: 30 bytes, params: 1, frame: 11
const value = environment.__proto__;
return onClose?.();
}
function _fun115551() { // fn#115551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:2174, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0);
}
}
}
}
function MediaKeyboardBottomSheetB(a0, a1) { // fn#115546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:1851, owner: MediaKeyboardBottomSheet.B, offset: 0x02464ad4, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_4)(a0);
}
}
function _fun115547() { // fn#115547, offset: 0x02464b11, size: 11 bytes, params: 1, frame: 1
return function() {
if (onClose != null) {
onClose();
}
};
}
function _fun115549() { // fn#115549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:2067, offset: 0x02464b1c, size: 110 bytes, params: 1, frame: 14
if (result) {
if (bottomSheetRef.current != null) {
bottomSheetRef.current.forceClose();
var env0_0 = global.setTimeout(_fun115550, 500);
return _fun115551;
}
if (onClose != null) {
onClose();
}
}
}
function _fun115550() { // fn#115550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15348:2139, offset: 0x02464b8a, size: 30 bytes, params: 1, frame: 11
const value = environment.__proto__;
return onClose?.();
}
global.__d(_fun115539, 15151, [57, 31, 27, 1580, 661, 33, 1581, 4501, 697, 1244, 11621, 4508, 6277, 4018, 4081,
4082, 683, 4559, 4017, 4594, 1585, 4556,
2]) /* metro module 15151, dependencies: [57, 31, 27, 1580, 661, 33, 1581, 4501, 697, 1244, 11621, 4508, 6277, 4018, 4081, 4082, 683, 4559, 4017, 4594, 1585, 4556, 2] */;
@@ -1,172 +1,175 @@
/* Metro module 11102; source: modules/media_keyboard/native/components/MediaKeyboardBottomSheetActions.tsx; dependencies: [31, 27, 33, 4501, 697, 477, 3963, 674, 3860, 1585, 1357, 4589, 5278, 4573, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import LinearGradient from '../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as MobileVisualRefreshExperimentModule from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ClientThemesUtilsModule from '../../../client_themes/native/ClientThemesUtils.tsx'; /* Metro dependency 3963 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun85025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:6, offset: 0x01f60942, size: 225 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.StyleSheet;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun85026);
let value = ReactModule;
const env0_8 = (CreateStylesModule).createStyles(_fun85026);
value = value.memo(MediaKeyboardBottomSheetActions);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheetActions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheetActions.tsx');
exports.default = value;
}
function _fun85026(a0, a1, a2, a3) { // fn#85026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:191, offset: 0x01f60a23, size: 643 bytes, params: 5, frame: 20
const value = a0;
const value2 = a1;
const value3 = a2;
const object8 = {};
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object9['alignItems'] = 'center';
object9['top'] = undefined;
object8.wrap = object9;
const object10 = {};
const PX_8 = importDefault(dependencyMap[4]).space.PX_8;
object10.paddingVertical = PX_8;
const MEDIA_KEYBOARD_BAR_MARGIN_HORIZONTAL = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_MARGIN_HORIZONTAL;
object10.marginHorizontal = MEDIA_KEYBOARD_BAR_MARGIN_HORIZONTAL;
const moduleValue = require(dependencyMap[5]);
object10.marginBottom = moduleValue.isIOS() ? importDefault(dependencyMap[4]).space.PX_24 : value;
const MEDIA_KEYBOARD_BAR_BORDER_RADIUS = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_BORDER_RADIUS;
object10.borderRadius = MEDIA_KEYBOARD_BAR_BORDER_RADIUS;
object10.backgroundColor = value3 ?? value2;
const MEDIA_KEYBOARD_BAR_PADDING_HORIZONTAL = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_PADDING_HORIZONTAL;
object10.paddingHorizontal = MEDIA_KEYBOARD_BAR_PADDING_HORIZONTAL;
const MEDIA_KEYBOARD_BAR_BORDER_WIDTH = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_BORDER_WIDTH;
object10.borderWidth = MEDIA_KEYBOARD_BAR_BORDER_WIDTH;
const SHADOW_HIGH = importDefault(dependencyMap[4]).shadows.SHADOW_HIGH;
copyDataProperties(object10, SHADOW_HIGH, dependencyMap);
const object11 = {};
const BORDER_MUTED = importDefault(dependencyMap[4]).colors.BORDER_MUTED;
if (a3) {
object11.borderColor = BORDER_MUTED;
} else {
object11.borderTopColor = BORDER_MUTED;
function _fun85026(a0, a1, a2, a3) { // fn#85026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:191, offset: 0x01f60a23, size: 643 bytes, params: 5, frame: 20
const value = a0;
const value2 = a1;
const value3 = a2;
const object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['alignItems'] = 'center';
object2['top'] = undefined;
object.wrap = object2;
const object3 = {};
const PX_8 = importDefault(dependencyMap[4]).space.PX_8;
object3.paddingVertical = PX_8;
const MEDIA_KEYBOARD_BAR_MARGIN_HORIZONTAL = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_MARGIN_HORIZONTAL;
object3.marginHorizontal = MEDIA_KEYBOARD_BAR_MARGIN_HORIZONTAL;
const moduleValue = require(dependencyMap[5]);
object3.marginBottom = moduleValue.isIOS() ? importDefault(dependencyMap[4]).space.PX_24 : value;
const MEDIA_KEYBOARD_BAR_BORDER_RADIUS = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_BORDER_RADIUS;
object3.borderRadius = MEDIA_KEYBOARD_BAR_BORDER_RADIUS;
object3.backgroundColor = value3 ?? value2;
const MEDIA_KEYBOARD_BAR_PADDING_HORIZONTAL = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_PADDING_HORIZONTAL;
object3.paddingHorizontal = MEDIA_KEYBOARD_BAR_PADDING_HORIZONTAL;
const MEDIA_KEYBOARD_BAR_BORDER_WIDTH = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_BORDER_WIDTH;
object3.borderWidth = MEDIA_KEYBOARD_BAR_BORDER_WIDTH;
const SHADOW_HIGH = importDefault(dependencyMap[4]).shadows.SHADOW_HIGH;
copyDataProperties(object3, SHADOW_HIGH, dependencyMap);
const object4 = {};
const BORDER_MUTED = importDefault(dependencyMap[4]).colors.BORDER_MUTED;
if (a3) {
object4.borderColor = BORDER_MUTED;
} else {
object4.borderTopColor = BORDER_MUTED;
}
copyDataProperties(object3, object4, dependencyMap);
object.container = object3;
const object5 = {'gap': null, 'alignItems': 'stretch', 'flexDirection': 'row'};
const MEDIA_KEYBOARD_BAR_GAP = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_GAP;
object5.gap = MEDIA_KEYBOARD_BAR_GAP;
const MEDIA_KEYBOARD_BAR_BUTTONS_MARGIN_HORIZONTAL = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_BUTTONS_MARGIN_HORIZONTAL;
object5.marginHorizontal = MEDIA_KEYBOARD_BAR_BUTTONS_MARGIN_HORIZONTAL;
object.buttonsContainer = object5;
const object6 = {'flexBasis': 64, 'minHeight': 48, 'flexGrow': 1, 'justifyContent': 'center',
'flexDirection': 'column', 'alignItems': 'center', 'padding': null, 'borderRadius': null, 'gap': 4};
const MEDIA_KEYBOARD_BUTTON_PADDING = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BUTTON_PADDING;
object6.padding = MEDIA_KEYBOARD_BUTTON_PADDING;
const MEDIA_KEYBOARD_BUTTON_BORDER_RADIUS = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BUTTON_BORDER_RADIUS;
object6.borderRadius = MEDIA_KEYBOARD_BUTTON_BORDER_RADIUS;
object.button = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, dependencyMap);
const BACKGROUND_BASE_LOW = importDefault(dependencyMap[4]).colors.BACKGROUND_BASE_LOW;
object7['color'] = BACKGROUND_BASE_LOW;
object.gradient = object7;
return object;
}
copyDataProperties(object10, object11, dependencyMap);
object8.container = object10;
const object12 = {'gap': null, 'alignItems': 'stretch', 'flexDirection': 'row'};
const MEDIA_KEYBOARD_BAR_GAP = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_GAP;
object12.gap = MEDIA_KEYBOARD_BAR_GAP;
const MEDIA_KEYBOARD_BAR_BUTTONS_MARGIN_HORIZONTAL = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BAR_BUTTONS_MARGIN_HORIZONTAL;
object12.marginHorizontal = MEDIA_KEYBOARD_BAR_BUTTONS_MARGIN_HORIZONTAL;
object8.buttonsContainer = object12;
const object13 = {'flexBasis': 64, 'minHeight': 48, 'flexGrow': 1, 'justifyContent': 'center',
'flexDirection': 'column', 'alignItems': 'center', 'padding': null, 'borderRadius': null, 'gap': 4};
const MEDIA_KEYBOARD_BUTTON_PADDING = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BUTTON_PADDING;
object13.padding = MEDIA_KEYBOARD_BUTTON_PADDING;
const MEDIA_KEYBOARD_BUTTON_BORDER_RADIUS = importDefault(dependencyMap[4]).modules.mobile.MEDIA_KEYBOARD_BUTTON_BORDER_RADIUS;
object13.borderRadius = MEDIA_KEYBOARD_BUTTON_BORDER_RADIUS;
object8.button = object13;
const object14 = {};
copyDataProperties(object14, StyleSheet.absoluteFillObject, dependencyMap);
const BACKGROUND_BASE_LOW = importDefault(dependencyMap[4]).colors.BACKGROUND_BASE_LOW;
object14['color'] = BACKGROUND_BASE_LOW;
object8.gradient = object14;
return object8;
}
function MediaKeyboardBottomSheetActions({onHeightChange, overflowButtons}) { // fn#85027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:1348, offset: 0x01f60ca6, size: 807 bytes, params: 2, frame: 28
const clientThemesUtilsModule = require(3963) /* metro dependency 3963: ClientThemesUtils */;
const useGradientValue = clientThemesUtilsModule.useGradientValue;
const GradientPercentage = clientThemesUtilsModule.GradientPercentage;
const END = GradientPercentage.END;
const value2 = Reflect.apply(useGradientValue, clientThemesUtilsModule, [END]);
const r11 = value2 != null ? (importDefault(674) /* metro dependency 674 */)(value2).alpha(0.95).hex() : null;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
const value10 = (importDefault(674) /* metro dependency 674 */)(Reflect.apply(useToken, useTokenModule,
[CARD_BACKGROUND_DEFAULT])).alpha(0.95).hex();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'MediaKeyboardBottomSheetActions'}]).enabled;
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const styles = useStyles(bottom, enabled ? Reflect.apply(useToken, moduleValue4,
[BACKGROUND_SURFACE_HIGH]) : value10, r11, enabled);
const moduleValue5 = useTokenModule;
useToken = moduleValue5.useToken;
const MEDIA_KEYBOARD_BUTTON_ICON_COLOR_ACTIVE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.MEDIA_KEYBOARD_BUTTON_ICON_COLOR_ACTIVE;
const env0_2 = Reflect.apply(useToken, moduleValue5, [MEDIA_KEYBOARD_BUTTON_ICON_COLOR_ACTIVE]);
const moduleValue6 = useTokenModule;
useToken = moduleValue6.useToken;
const MEDIA_KEYBOARD_BUTTON_TEXT_COLOR_ACTIVE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.MEDIA_KEYBOARD_BUTTON_TEXT_COLOR_ACTIVE;
const env0_3 = Reflect.apply(useToken, moduleValue6, [MEDIA_KEYBOARD_BUTTON_TEXT_COLOR_ACTIVE]);
const moduleValue7 = useTokenModule;
useToken = moduleValue7.useToken;
const MEDIA_KEYBOARD_BUTTON_TEXT_VARIANT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.MEDIA_KEYBOARD_BUTTON_TEXT_VARIANT;
const env0_4 = Reflect.apply(useToken, moduleValue7, [MEDIA_KEYBOARD_BUTTON_TEXT_VARIANT]);
const binding = env0_3;
const value12 = binding.useMemo(_fun85028, [styles.gradient.color]);
const value13 = binding.useCallback(function({nativeEvent}) {
onHeightChange(nativeEvent.layout.height);
}, [onHeightChange]);
let value = importDefault(4589) /* metro dependency 4589 */;
value = ((Component) => <Component style={styles.gradient} {...value12} {...{['pointerEvents']: 'none'}} />)(value);
return (
<View
style={styles.wrap}
pointerEvents="box-none"
onLayout={value13}
>
{value}
<View style={styles.container}>
<View style={styles.buttonsContainer}>
{overflowButtons.map(_fun85030)}
function MediaKeyboardBottomSheetActions({onHeightChange, overflowButtons}) { // fn#85027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:1348, offset: 0x01f60ca6, size: 807 bytes, params: 2, frame: 28
const useGradientValue = ClientThemesUtilsModule.useGradientValue;
const GradientPercentage = ClientThemesUtilsModule.GradientPercentage;
const END = GradientPercentage.END;
const value2 = Reflect.apply(useGradientValue, ClientThemesUtilsModule, [END]);
const r11 = value2 != null ? (importDefault(674) /* metro dependency 674 */)(value2).alpha(0.95).hex() : null;
let useToken = UseTokenModule.useToken;
const CARD_BACKGROUND_DEFAULT = (Native).colors.CARD_BACKGROUND_DEFAULT;
const value10 = (importDefault(674) /* metro dependency 674 */)(Reflect.apply(useToken, UseTokenModule,
[CARD_BACKGROUND_DEFAULT])).alpha(0.95).hex();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'MediaKeyboardBottomSheetActions'}]).enabled;
useToken = UseTokenModule.useToken;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
const styles = useStyles(bottom, enabled ? Reflect.apply(useToken, UseTokenModule,
[BACKGROUND_SURFACE_HIGH]) : value10, r11, enabled);
useToken = UseTokenModule.useToken;
const MEDIA_KEYBOARD_BUTTON_ICON_COLOR_ACTIVE = (Native).modules.mobile.MEDIA_KEYBOARD_BUTTON_ICON_COLOR_ACTIVE;
const env0_2 = Reflect.apply(useToken, UseTokenModule, [MEDIA_KEYBOARD_BUTTON_ICON_COLOR_ACTIVE]);
useToken = UseTokenModule.useToken;
const MEDIA_KEYBOARD_BUTTON_TEXT_COLOR_ACTIVE = (Native).modules.mobile.MEDIA_KEYBOARD_BUTTON_TEXT_COLOR_ACTIVE;
const env0_3 = Reflect.apply(useToken, UseTokenModule, [MEDIA_KEYBOARD_BUTTON_TEXT_COLOR_ACTIVE]);
useToken = UseTokenModule.useToken;
const MEDIA_KEYBOARD_BUTTON_TEXT_VARIANT = (Native).modules.mobile.MEDIA_KEYBOARD_BUTTON_TEXT_VARIANT;
const env0_4 = Reflect.apply(useToken, UseTokenModule, [MEDIA_KEYBOARD_BUTTON_TEXT_VARIANT]);
const binding = env0_3;
const value12 = binding.useMemo(_fun85028, [styles.gradient.color]);
const value13 = binding.useCallback(function({nativeEvent}) {
onHeightChange(nativeEvent.layout.height);
}, [onHeightChange]);
let value = LinearGradient;
value = ((Component) => <Component style={styles.gradient} {...value12} {...{['pointerEvents']: 'none'}} />)(value);
return (
<View
style={styles.wrap}
pointerEvents="box-none"
onLayout={value13}
>
{value}
<View style={styles.container}>
<View style={styles.buttonsContainer}>
{overflowButtons.map(_fun85030)}
</View>
</View>
</View>
</View>
);
}
);
function _fun85028() { // fn#85028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:2068, offset: 0x01f60fcd, size: 172 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(styles.gradient.color);
value = value.alpha(0);
value = value.hex();
const items2 = [value];
value = importDefault(674) /* metro dependency 674 */;
value = value(styles.gradient.color);
value = value.alpha(1);
items2[1] = value.hex();
return {start: {'x': 0, 'y': 0}, end: {'x': 0, 'y': 1}, colors: items2};
}
function _fun85028() { // fn#85028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:2068, offset: 0x01f60fcd, size: 172 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
value = value(styles.gradient.color);
value = value.alpha(0);
value = value.hex();
const items2 = [value];
value = importDefault(674) /* metro dependency 674 */;
value = value(styles.gradient.color);
value = value.alpha(1);
items2[1] = value.hex();
return {start: {'x': 0, 'y': 0}, end: {'x': 0, 'y': 1}, colors: items2};
}
function _fun85030(a0, a1) { // fn#85030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:2487, offset: 0x01f6109d, size: 264 bytes, params: 3, frame: 23
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'button', accessibilityLabel: a0.text};
let disabled = a0.disabled;
pressableOpacityProps.accessibilityState = {disabled: disabled};
pressableOpacityProps.disabled = a0.disabled;
pressableOpacityProps.style = styles.button;
pressableOpacityProps.onPress = a0.onPress;
const IconComponent = a0.IconComponent;
disabled = a0.disabled;
const value3 = 'text-muted';
const iconComponent = <IconComponent size="md" color={disabled ? value3 : env0_2} />;
const Text = (TextModule).Text;
return (
<PressableOpacity {...pressableOpacityProps} key={a1}>
{iconComponent}
<Text
lineClamp={1}
variant={env0_4}
color={a0.disabled ? value3 : env0_3}
>
{a0.text}
</Text>
</PressableOpacity>
);
}
}
function _fun85030(a0, a1) { // fn#85030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11288:2487, offset: 0x01f6109d, size: 264 bytes, params: 3, frame: 23
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'button', accessibilityLabel: a0.text};
let disabled = a0.disabled;
pressableOpacityProps.accessibilityState = {disabled: disabled};
pressableOpacityProps.disabled = a0.disabled;
pressableOpacityProps.style = styles.button;
pressableOpacityProps.onPress = a0.onPress;
const IconComponent = a0.IconComponent;
disabled = a0.disabled;
const value3 = 'text-muted';
const iconComponent = <IconComponent size="md" color={disabled ? value3 : env0_2} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableOpacity {...pressableOpacityProps} key={a1}>
{iconComponent}
<Text
lineClamp={1}
variant={env0_4}
color={a0.disabled ? value3 : env0_3}
>
{a0.text}
</Text>
</PressableOpacity>
);
}
global.__d(_fun85025, 11102, [31, 27, 33, 4501, 697, 477, 3963, 674, 3860, 1585, 1357, 4589, 5278, 4573,
2]) /* metro module 11102, dependencies: [31, 27, 33, 4501, 697, 477, 3963, 674, 3860, 1585, 1357, 4589, 5278, 4573, 2] */;
@@ -1,59 +1,64 @@
/* Metro module 11101; source: modules/media_keyboard/native/components/MediaKeyboardBottomSheetHandle.tsx; dependencies: [31, 27, 1580, 33, 4501, 697, 7701, 8621, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ClientThemesOverridesModule from '../../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
function _fun85022(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11287:6, offset: 0x01f606d1, size: 371 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_2 = value2.Pressable;
const env0_3 = value2.View;
const StyleSheet = value2.StyleSheet;
const DRAG_HANDLE = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).DRAG_HANDLE;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['backgroundColor'] = 'transparent';
object5['height'] = DRAG_HANDLE.slotHeight;
object5['alignItems'] = 'center';
object5['bottom'] = undefined;
object4.headerHandleWrap = object5;
const object6 = {};
object6.backgroundColor = DRAG_HANDLE.barColor;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.marginTop = DRAG_HANDLE.barMarginTop;
object6.height = DRAG_HANDLE.barHeight;
object6.width = DRAG_HANDLE.barWidth;
object4.dragHandleBar = object6;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object4]);
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const DRAG_HANDLE = (MediaKeyboardConstantsModule).DRAG_HANDLE;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['backgroundColor'] = 'transparent';
object2['height'] = DRAG_HANDLE.slotHeight;
object2['alignItems'] = 'center';
object2['bottom'] = undefined;
object.headerHandleWrap = object2;
const object3 = {};
object3.backgroundColor = DRAG_HANDLE.barColor;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.marginTop = DRAG_HANDLE.barMarginTop;
object3.height = DRAG_HANDLE.barHeight;
object3.width = DRAG_HANDLE.barWidth;
object.dragHandleBar = object3;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(MediaKeyboardBottomSheetHandle);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheetHandle.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheetHandle.tsx');
exports.default = value;
function MediaKeyboardBottomSheetHandle({animatedIndex, onPress}) { // fn#85023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11287:491, offset: 0x01f60844, size: 254 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (ClientThemesOverridesModule).useGradientBottom();
const value3 = (require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(animatedIndex,
function(a0) {
return a0 > 0;
});
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<Pressable
accessibilityLabel={value3 ? Reflect.apply(string, intl, [t.iTcuma]) : Reflect.apply(string, intl,
[t.dcl9MQ])}
{...{['aria-hidden']: onPress == null}}
style={[styles.headerHandleWrap, value2]}
onPress={onPress}
>
<View style={styles.dragHandleBar} />
</Pressable>
);
}
}
function MediaKeyboardBottomSheetHandle({animatedIndex, onPress}) { // fn#85023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11287:491, offset: 0x01f60844, size: 254 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom();
const value3 = (require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(animatedIndex,
function(a0) {
return a0 > 0;
});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<Pressable
accessibilityLabel={value3 ? Reflect.apply(string, intl, [t.iTcuma]) : Reflect.apply(string, intl,
[t.dcl9MQ])}
{...{['aria-hidden']: onPress == null}}
style={[styles.headerHandleWrap, value2]}
onPress={onPress}
>
<View style={styles.dragHandleBar} />
</Pressable>
);
}
global.__d(_fun85022, 11101, [31, 27, 1580, 33, 4501, 697, 7701, 8621, 1244,
2]) /* metro module 11101, dependencies: [31, 27, 1580, 33, 4501, 697, 7701, 8621, 1244, 2] */;
@@ -1,28 +1,36 @@
/* Metro module 11100; source: modules/media_keyboard/native/components/MediaKeyboardBottomSheetHeaderSimple.tsx; dependencies: [31, 27, 1580, 33, 4501, 697, 11101, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MediaKeyboardBottomSheetHandle from './MediaKeyboardBottomSheetHandle.tsx'; /* Metro dependency 11101 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun85020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11286:6, offset: 0x01f60577, size: 250 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const HEADER_HANDLE_HEIGHT = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).HEADER_HANDLE_HEIGHT;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {height: HEADER_HANDLE_HEIGHT};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.paddingBottom = PX_4;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{headerHandleOnlyWrap: object}]);
let value = ReactModule;
const HEADER_HANDLE_HEIGHT = (MediaKeyboardConstantsModule).HEADER_HANDLE_HEIGHT;
const createStyles = CreateStylesModule.createStyles;
const object2 = {height: HEADER_HANDLE_HEIGHT};
const PX_4 = (Native).space.PX_4;
object2.paddingBottom = PX_4;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{headerHandleOnlyWrap: object2}]);
value = value.memo(MediaKeyboardBottomSheetHeaderSimple);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheetHeaderSimple.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardBottomSheetHeaderSimple.tsx');
exports.default = value;
function MediaKeyboardBottomSheetHeaderSimple({animatedIndex, onPress}) { // fn#85021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11286:271, offset: 0x01f60671, size: 96 bytes, params: 2, frame: 18
const styles = useStyles();
return (
<View style={styles.headerHandleOnlyWrap}>
{((Component) => <Component animatedIndex={animatedIndex} onPress={onPress} />)(MediaKeyboardBottomSheetHandle)}
</View>
);
}
}
function MediaKeyboardBottomSheetHeaderSimple({animatedIndex, onPress}) { // fn#85021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11286:271, offset: 0x01f60671, size: 96 bytes, params: 2, frame: 18
const styles = useStyles();
return (
<View style={styles.headerHandleOnlyWrap}>
{((Component) => <Component animatedIndex={animatedIndex} onPress={onPress} />)(importDefault(11101) /* metro dependency 11101: MediaKeyboardBottomSheetHandle */)}
</View>
);
}
global.__d(_fun85020, 11100, [31, 27, 1580, 33, 4501, 697, 11101,
2]) /* metro module 11100, dependencies: [31, 27, 1580, 33, 4501, 697, 11101, 2] */;
@@ -1,103 +1,129 @@
/* Metro module 11117; source: modules/media_keyboard/native/components/MediaKeyboardEmptyState.tsx; dependencies: [31, 27, 4661, 33, 4501, 697, 4573, 4578, 7002, 1244, 11118, 11112, 11119, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativePermissionConstantsModule from '../../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
function _fun85114(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11303:6, offset: 0x01f64948, size: 349 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = MediaKeyboardEmptyState;
const MediaKeyboardEmptyState2 = MediaKeyboardEmptyState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
const env0_5 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionStatus;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginHorizontal = PX_8;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.marginVertical = PX_32;
object4.justifyContent = 'center';
object4.alignItems = 'center';
object3.container = object4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.label = {textAlign: 'center', marginVertical: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardEmptyState.tsx');
exports.default = closure;
object = {};
const object2 = {};
const PX_8 = (Native).space.PX_8;
object2.marginHorizontal = PX_8;
const PX_32 = (Native).space.PX_32;
object2.marginVertical = PX_32;
object2.justifyContent = 'center';
object2.alignItems = 'center';
object.container = object2;
const PX_16 = (Native).space.PX_16;
object.label = {textAlign: 'center', marginVertical: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardEmptyState.tsx');
exports.default = MediaKeyboardEmptyState2;
exports.getMediaEmptyStateComponentOrNull = getMediaEmptyStateComponentOrNull;
}
function MediaKeyboardEmptyState({actionIcon, actionLabel, actionPress, imageSource, label}) { // fn#85115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11303:408, offset: 0x01f64aa5, size: 223 bytes, params: 2, frame: 25
const styles = useStyles();
const items2 = [<Image source={imageSource} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="text-sm/semibold" color="text-muted" style={styles.label}>{label}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <Button icon={actionIcon} size="sm" text={actionLabel} onPress={actionPress} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function getMediaEmptyStateComponentOrNull({photoPermissionStatus, photosEmpty, showCameraButton, onPressCamera, onManageLimited, onPressPrivacySettings}) { // fn#85116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11303:892, offset: 0x01f64b84, size: 702 bytes, params: 2, frame: 23
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
showCameraButton = showCameraButton === undefined || showCameraButton;
const DENIED = NativePermissionStatus.DENIED;
if (photoPermissionStatus === DENIED) {
return (
<MediaKeyboardEmptyState
actionIcon={((SettingsIcon) => <SettingsIcon color="white" size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}
actionLabel={intl.string(t['457oeG'])}
actionPress={onPressPrivacySettings}
imageSource={importDefault(11118) /* metro dependency 11118 */}
label={intl.string(t['8p9jGu'])}
function MediaKeyboardEmptyState({actionIcon, actionLabel, actionPress, imageSource, label}) { // fn#85115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11303:408, offset: 0x01f64aa5, size: 223 bytes, params: 2, frame: 25
const styles = useStyles();
const items2 = [
<Image source={imageSource} />,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
variant="text-sm/semibold"
color="text-muted"
style={styles.label}
>
{label}
</Text>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<Button
icon={actionIcon}
size="sm"
text={actionLabel}
onPress={actionPress}
/>
);
}
const RESTRICTED = NativePermissionStatus.RESTRICTED;
if (photoPermissionStatus === RESTRICTED) {
return (
<MediaKeyboardEmptyState
actionIcon={((SettingsIcon) => <SettingsIcon color="white" size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}
actionLabel={intl.string(t['457oeG'])}
actionPress={onPressPrivacySettings}
imageSource={importDefault(11118) /* metro dependency 11118 */}
label={intl.string(t['8p9jGu'])}
/>
<View style={styles.container}>
{items2}
</View>
);
}
if (photosEmpty) {
if (photoPermissionStatus === NativePermissionStatus.LIMITED) {
function getMediaEmptyStateComponentOrNull({photoPermissionStatus, photosEmpty, showCameraButton, onPressCamera, onManageLimited, onPressPrivacySettings}) { // fn#85116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11303:892, offset: 0x01f64b84, size: 702 bytes, params: 2, frame: 23
var object2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
showCameraButton = showCameraButton === undefined || showCameraButton;
const DENIED = NativePermissionStatus.DENIED;
if (photoPermissionStatus === DENIED) {
return (
<MediaKeyboardEmptyState
actionIcon={((SettingsIcon) => <SettingsIcon color="white" size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}
actionLabel={intl.string(t.JuXTi6)}
actionPress={onManageLimited}
actionLabel={intl.string(t['457oeG'])}
actionPress={onPressPrivacySettings}
imageSource={importDefault(11118) /* metro dependency 11118 */}
label={intl.string(t['5g7NcN'])}
label={intl.string(t['8p9jGu'])}
/>
);
}
if (showCameraButton) {
const RESTRICTED = NativePermissionStatus.RESTRICTED;
if (photoPermissionStatus === RESTRICTED) {
return (
<MediaKeyboardEmptyState
actionIcon={((CameraIcon) => <CameraIcon color="white" size="sm" />)((require(11112) /* metro dependency 11112: CameraIcon */).CameraIcon)}
actionLabel={intl.string(t.tpoWUd)}
actionPress={onPressCamera}
imageSource={importDefault(11119) /* metro dependency 11119 */}
label={intl.string(t.YOvRBZ)}
actionIcon={((SettingsIcon) => <SettingsIcon color="white" size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}
actionLabel={intl.string(t['457oeG'])}
actionPress={onPressPrivacySettings}
imageSource={importDefault(11118) /* metro dependency 11118 */}
label={intl.string(t['8p9jGu'])}
/>
);
}
if (photosEmpty) {
if (photoPermissionStatus === NativePermissionStatus.LIMITED) {
return (
<MediaKeyboardEmptyState
actionIcon={((SettingsIcon) => <SettingsIcon color="white" size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}
actionLabel={intl.string(t.JuXTi6)}
actionPress={onManageLimited}
imageSource={importDefault(11118) /* metro dependency 11118 */}
label={intl.string(t['5g7NcN'])}
/>
);
}
if (showCameraButton) {
return (
<MediaKeyboardEmptyState
actionIcon={((CameraIcon) => <CameraIcon color="white" size="sm" />)((require(11112) /* metro dependency 11112: CameraIcon */).CameraIcon)}
actionLabel={intl.string(t.tpoWUd)}
actionPress={onPressCamera}
imageSource={importDefault(11119) /* metro dependency 11119 */}
label={intl.string(t.YOvRBZ)}
/>
);
}
}
}
}
global.__d(_fun85114, 11117, [31, 27, 4661, 33, 4501, 697, 4573, 4578, 7002, 1244, 11118, 11112, 11119,
2]) /* metro module 11117, dependencies: [31, 27, 4661, 33, 4501, 697, 4573, 4578, 7002, 1244, 11118, 11112, 11119, 2] */;
@@ -1,153 +1,168 @@
/* Metro module 15150; source: modules/media_keyboard/native/components/MediaKeyboardFloatingSend.tsx; dependencies: [57, 31, 27, 4644, 33, 4501, 697, 566, 4017, 1585, 4577, 674, 4589, 8561, 1244, 4058, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import LinearGradient from '../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import UploadAttachmentStore from '../../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SendMessageIconModule from '../../../../design/components/Icon/native/redesign/generated/SendMessageIcon.tsx'; /* Metro dependency 4058 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as FloatingActionButtonNativeModule from '../../../../design/components/Button/native/FloatingActionButton.native.tsx'; /* Metro dependency 8561 */
function _fun115529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:6, offset: 0x02463d6d, size: 423 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['top'] = undefined;
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object5, SHADOW_HIGH, undefined);
object4.sendContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6['color'] = BACKGROUND_SURFACE_HIGH;
object4.gradient = object6;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object4]);
object4 = {code: 'function MediaKeyboardFloatingSendTsx1(){const{animatedIndex,INDEX_HEADER_CHANGE_THRESHOLD,hasUploads}=this.__closure;const isSheetOpen=animatedIndex.get()>INDEX_HEADER_CHANGE_THRESHOLD;return isSheetOpen&&hasUploads;}'};
object4 = {code: 'function MediaKeyboardFloatingSendTsx2(visible){const{isSendVisibleSharedValue}=this.__closure;isSendVisibleSharedValue.set(visible);}'};
object4 = {code: 'function MediaKeyboardFloatingSendTsx3(){const{insetFab,tokens,withSpring,sendVisibleSharedValue}=this.__closure;return{height:insetFab+tokens.space.PX_64+tokens.space.PX_32,opacity:withSpring(sendVisibleSharedValue.get()?1:0)};}'};
object4 = {code: "function MediaKeyboardFloatingSendTsx4(){const{sendVisibleSharedValue}=this.__closure;return{pointerEvents:sendVisibleSharedValue.get()?'box-none':'none'};}"};
let value = ReactModule;
const StyleSheet = (ReactNativeModule).StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['top'] = undefined;
const SHADOW_HIGH = (Native).shadows.SHADOW_HIGH;
copyDataProperties(object2, SHADOW_HIGH, undefined);
object.sendContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object3['color'] = BACKGROUND_SURFACE_HIGH;
object.gradient = object3;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function MediaKeyboardFloatingSendTsx1(){const{animatedIndex,INDEX_HEADER_CHANGE_THRESHOLD,hasUploads}=this.__closure;const isSheetOpen=animatedIndex.get()>INDEX_HEADER_CHANGE_THRESHOLD;return isSheetOpen&&hasUploads;}'};
object = {code: 'function MediaKeyboardFloatingSendTsx2(visible){const{isSendVisibleSharedValue}=this.__closure;isSendVisibleSharedValue.set(visible);}'};
object = {code: 'function MediaKeyboardFloatingSendTsx3(){const{insetFab,tokens,withSpring,sendVisibleSharedValue}=this.__closure;return{height:insetFab+tokens.space.PX_64+tokens.space.PX_32,opacity:withSpring(sendVisibleSharedValue.get()?1:0)};}'};
object = {code: "function MediaKeyboardFloatingSendTsx4(){const{sendVisibleSharedValue}=this.__closure;return{pointerEvents:sendVisibleSharedValue.get()?'box-none':'none'};}"};
value = value.memo(value.forwardRef(MediaKeyboardFloatingSendInner));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardFloatingSend.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardFloatingSend.tsx');
exports.default = value;
function MediaKeyboardFloatingSendInner({animatedIndex, channelId, draftType, onSend}, a1) { // fn#115530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1171, offset: 0x02463f14, size: 667 bytes, params: 3, frame: 25
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
let binding = env0_4;
const [property, env0_1] = undefined(binding.useState(null), 2);
const r8 = property ?? value2.bottom;
const value5 = useSendVisibleSharedValue({animatedIndex: animatedIndex, channelId: channelId, draftType: draftType});
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = MediaKeyboardFloatingSendInnerY;
object = {insetFab: r8};
object.tokens = importDefault(697) /* metro dependency 697: native */;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.sendVisibleSharedValue = value5;
closure.__closure = object;
closure.__workletHash = 6402761213297;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useAnimatedProps = ReanimatedRexportModule.useAnimatedProps;
closure = MediaKeyboardFloatingSendInnerF;
closure.__closure = {sendVisibleSharedValue: value5};
closure.__workletHash = 1097586248797;
closure.__initData = env0_12;
const value7 = Reflect.apply(useAnimatedProps, ReanimatedRexportModule, [closure]);
binding = env0_4;
const value8 = binding.useMemo(_fun115537, [styles.gradient.color]);
binding.useImperativeHandle(a1, _fun115538);
const View = (ReanimatedRexport).View;
const items2 = [value6];
items2[1] = styles.sendContainer;
let value = LinearGradient;
value = ((Component) => <Component style={styles.gradient} {...value8} {...{['pointerEvents']: 'none'}} />)(value);
const FloatingActionButton = (FloatingActionButtonNativeModule).FloatingActionButton;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const TXNS7S = (IndexNativeModule).t.TXNS7S;
const SendMessageIcon = (SendMessageIconModule).SendMessageIcon;
return (
<View style={items2} animatedProps={value7}>
{value}
<FloatingActionButton
accessibilityLabel={Reflect.apply(string, intl, [TXNS7S])}
icon={<SendMessageIcon />}
onPress={onSend}
positionBottom={r8}
/>
</View>
);
function useSendVisibleSharedValue({animatedIndex, channelId, draftType}) { // fn#115531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1356, owner: MediaKeyboardFloatingSendInner.useSendVisibleSharedValue, offset: 0x024641af, size: 276 bytes, params: 2, frame: 22
const value2 = (FluxModule).useStateFromStores([UploadAttachmentStore],
_fun115532, [channelId, draftType]);
const value3 = (ReanimatedRexportModule).useSharedValue(false);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const useSendVisibleSharedValueC2 = useSendVisibleSharedValueC;
useSendVisibleSharedValueC2.__closure = {animatedIndex: animatedIndex, INDEX_HEADER_CHANGE_THRESHOLD: 0.7,
hasUploads: value2};
useSendVisibleSharedValueC2.__workletHash = 12206635621152;
useSendVisibleSharedValueC2.__initData = env1_9;
const useSendVisibleSharedValueL2 = useSendVisibleSharedValueL;
useSendVisibleSharedValueL2.__closure = {isSendVisibleSharedValue: value3};
useSendVisibleSharedValueL2.__workletHash = 10753585819648;
useSendVisibleSharedValueL2.__initData = env1_10;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [useSendVisibleSharedValueC2,
useSendVisibleSharedValueL2]);
return value3;
function _fun115532() { // fn#115532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1476, offset: 0x024642c3, size: 38 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
const uploadAttachmentStoreBinding = UploadAttachmentStore;
const getUploadCount = uploadAttachmentStoreBinding.getUploadCount;
return Reflect.apply(getUploadCount, uploadAttachmentStoreBinding, [channelId, draftType]) > 0;
}
function useSendVisibleSharedValueC() { // fn#115533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1580, owner: MediaKeyboardFloatingSendInner.useSendVisibleSharedValue.c, offset: 0x024642e9, size: 39 bytes, params: 1, frame: 10
return animatedIndex.get() > 0.7 && Module00057;
}
function useSendVisibleSharedValueL(a0) { // fn#115534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1740, owner: MediaKeyboardFloatingSendInner.useSendVisibleSharedValue.l, offset: 0x010c54ef, size: 24 bytes, params: 2, frame: 11
env0_4.set(a0);
}
}
function MediaKeyboardFloatingSendInnerY() { // fn#115535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1928, owner: MediaKeyboardFloatingSendInner.y, offset: 0x02464310, size: 130 bytes, params: 1, frame: 17
const object = {};
const binding = env0_2;
const PX_64 = (Native).space.PX_64;
const value3 = binding + PX_64;
const PX_32 = (Native).space.PX_32;
object.height = value3 + PX_32;
object.opacity = SpringModule.withSpring(Module00057.get() ? 1 : 0);
return object;
}
function MediaKeyboardFloatingSendInnerF() { // fn#115536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:2201, owner: MediaKeyboardFloatingSendInner.f, offset: 0x02464392, size: 38 bytes, params: 1, frame: 10
const object = {};
object.pointerEvents = Module00057.get() ? 'box-none' : 'none';
return object;
}
function _fun115537() { // fn#115537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:2348, offset: 0x024643b8, size: 154 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
const stylesBinding = styles;
value = value(stylesBinding.gradient.color);
value = value.alpha(0);
value = value.hex();
const items2 = [value];
value = importDefault(674) /* metro dependency 674 */;
value = value(stylesBinding.gradient.color);
items2[1] = value.hex();
return {start: {'x': 0, 'y': 0}, end: {'x': 0, 'y': 1}, colors: items2};
}
function _fun115538() { // fn#115538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:2523, offset: 0x02464452, size: 16 bytes, params: 1, frame: 2
return {setInsetFab: env0_1};
}
}
}
function MediaKeyboardFloatingSendInner({animatedIndex, channelId, draftType, onSend}, a1) { // fn#115530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1171, offset: 0x02463f14, size: 667 bytes, params: 3, frame: 25
var object2;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
let binding = env0_4;
const [property, env0_1] = undefined(binding.useState(null), 2);
const r8 = property ?? value2.bottom;
const value5 = useSendVisibleSharedValue({animatedIndex: animatedIndex, channelId: channelId, draftType: draftType});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = MediaKeyboardFloatingSendInnerY;
object2 = {insetFab: r8};
object2.tokens = importDefault(697) /* metro dependency 697: native */;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.sendVisibleSharedValue = value5;
closure.__closure = object2;
closure.__workletHash = 6402761213297;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedProps = moduleValue2.useAnimatedProps;
closure = MediaKeyboardFloatingSendInnerF;
closure.__closure = {sendVisibleSharedValue: value5};
closure.__workletHash = 1097586248797;
closure.__initData = env0_12;
const value7 = Reflect.apply(useAnimatedProps, moduleValue2, [closure]);
binding = env0_4;
const value8 = binding.useMemo(_fun115537, [styles.gradient.color]);
binding.useImperativeHandle(a1, _fun115538);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [value6];
items2[1] = styles.sendContainer;
let value = importDefault(4589) /* metro dependency 4589 */;
value = ((Component) => <Component style={styles.gradient} {...value8} {...{['pointerEvents']: 'none'}} />)(value);
const FloatingActionButton = (require(8561) /* metro dependency 8561: FloatingActionButtonNative */).FloatingActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const TXNS7S = (require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S;
const SendMessageIcon = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
return (
<View style={items2} animatedProps={value7}>
{value}
<FloatingActionButton
accessibilityLabel={Reflect.apply(string, intl, [TXNS7S])}
icon={<SendMessageIcon />}
onPress={onSend}
positionBottom={r8}
/>
</View>
);
}
function useSendVisibleSharedValue({animatedIndex, channelId, draftType}) { // fn#115531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1356, owner: MediaKeyboardFloatingSendInner.useSendVisibleSharedValue, offset: 0x024641af, size: 276 bytes, params: 2, frame: 22
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UploadAttachmentStore],
_fun115532, [channelId, draftType]);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useSendVisibleSharedValueC;
closure.__closure = {animatedIndex: animatedIndex, INDEX_HEADER_CHANGE_THRESHOLD: 0.7, hasUploads: value2};
closure.__workletHash = 12206635621152;
closure.__initData = env1_9;
const closure2 = useSendVisibleSharedValueL;
closure2.__closure = {isSendVisibleSharedValue: value3};
closure2.__workletHash = 10753585819648;
closure2.__initData = env1_10;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return value3;
}
function MediaKeyboardFloatingSendInnerY() { // fn#115535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1928, owner: MediaKeyboardFloatingSendInner.y, offset: 0x02464310, size: 130 bytes, params: 1, frame: 17
const object2 = {};
const binding = env0_2;
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
const value3 = binding + PX_64;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.height = value3 + PX_32;
const springModule = require(4577) /* metro dependency 4577: spring */;
object2.opacity = springModule.withSpring(env0_3.get() ? 1 : 0);
return object2;
}
function MediaKeyboardFloatingSendInnerF() { // fn#115536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:2201, owner: MediaKeyboardFloatingSendInner.f, offset: 0x02464392, size: 38 bytes, params: 1, frame: 10
const object2 = {};
object2.pointerEvents = env0_3.get() ? 'box-none' : 'none';
return object2;
}
function _fun115537() { // fn#115537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:2348, offset: 0x024643b8, size: 154 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = importDefault(674) /* metro dependency 674 */;
const stylesBinding = styles;
value = value(stylesBinding.gradient.color);
value = value.alpha(0);
value = value.hex();
const items2 = [value];
value = importDefault(674) /* metro dependency 674 */;
value = value(stylesBinding.gradient.color);
items2[1] = value.hex();
return {start: {'x': 0, 'y': 0}, end: {'x': 0, 'y': 1}, colors: items2};
}
function _fun115538() { // fn#115538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:2523, offset: 0x02464452, size: 16 bytes, params: 1, frame: 2
return {setInsetFab: env0_1};
}
function _fun115532() { // fn#115532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1476, offset: 0x024642c3, size: 38 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
const getUploadCount = UploadAttachmentStore.getUploadCount;
return Reflect.apply(getUploadCount, UploadAttachmentStore, [channelId, draftType]) > 0;
}
function useSendVisibleSharedValueC() { // fn#115533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15347:1580, owner: MediaKeyboardFloatingSendInner.useSendVisibleSharedValue.c, offset: 0x024642e9, size: 39 bytes, params: 1, frame: 10
return animatedIndex.get() > 0.7 && env0_3;
}
global.__d(_fun115529, 15150, [57, 31, 27, 4644, 33, 4501, 697, 566, 4017, 1585, 4577, 674, 4589, 8561, 1244, 4058,
2]) /* metro module 15150, dependencies: [57, 31, 27, 4644, 33, 4501, 697, 566, 4017, 1585, 4577, 674, 4589, 8561, 1244, 4058, 2] */;
@@ -1,70 +1,90 @@
/* Metro module 11114; source: modules/media_keyboard/native/components/MediaKeyboardFooter.tsx; dependencies: [31, 27, 33, 4501, 697, 11104, 4573, 1244, 4578, 11115, 2] */
import DeviceMedia from '../../../device/native/DeviceMedia.tsx'; /* Metro dependency 11104 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun85108(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11300:6, offset: 0x01f64330, size: 412 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.View;
const env0_4 = value2.Image;
const env0_5 = value2.ActivityIndicator;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {'padding': null, 'height': 280, 'alignItems': 'center', padding: PX_16};
object2.label = {'textAlign': 'center', 'marginBottom': 16};
const object5 = {};
object.container = {'padding': null, 'height': 280, 'alignItems': 'center', padding: PX_16};
object.label = {'textAlign': 'center', 'marginBottom': 16};
const object3 = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.marginBottom = PX_32;
object3.marginBottom = PX_32;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object5.height = PX_48;
object2.buttonWrapper = object5;
const object6 = {};
object3.height = PX_48;
object.buttonWrapper = object3;
const object4 = {};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object6.color = BACKGROUND_SURFACE_HIGHEST;
object4.color = BACKGROUND_SURFACE_HIGHEST;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.margin = PX_16;
object2.loadingSpinner = object6;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
object4.margin = PX_16;
object.loadingSpinner = object4;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun85109);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardFooter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardFooter.tsx');
exports.default = value;
exports.FOOTER_HEIGHT = 280;
}
function _fun85109({disabled, onViewAll}) { // fn#85109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11300:502, offset: 0x01f644cc, size: 417 bytes, params: 2, frame: 27
var r0;
var object2;
var loadingSpinner;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var Button;
const styles = useStyles();
const defaultImport = importDefault(11104) /* metro dependency 11104: DeviceMedia */;
const useHasReachedEnd = defaultImport.useHasReachedEnd;
if (Reflect.apply(useHasReachedEnd, defaultImport, [])) {
var viewBindingProps = {style: styles.container};
items2 = [((Text) => <Text variant="text-sm/normal" style={styles.label}>{intl.string(t.mKSwAW)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
var viewBindingProps2 = {style: styles.buttonWrapper};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[1] = <View {...viewBindingProps2}><Button variant="primary" size="sm" onPress={onViewAll} text={intl.string(t.ZT24In)} disabled={disabled} /></View>;
items2[2] = <Image source={importDefault(11115) /* metro dependency 11115 */} />;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
object2 = {};
loadingSpinner = styles.loadingSpinner;
object2.style = loadingSpinner;
object2.size = 'large';
loadingSpinner = styles.loadingSpinner;
object2.color = loadingSpinner.color;
r0 = <ActivityIndicator {...object2} />;
function _fun85109({disabled, onViewAll}) { // fn#85109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11300:502, offset: 0x01f644cc, size: 417 bytes, params: 2, frame: 27
var r0;
var object;
var loadingSpinner;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
var Button;
const styles = useStyles();
const defaultImport = DeviceMedia;
const useHasReachedEnd = defaultImport.useHasReachedEnd;
if (Reflect.apply(useHasReachedEnd, defaultImport, [])) {
var viewBindingProps = {style: styles.container};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2 = [
<Text variant="text-sm/normal" style={styles.label}>
{intl.string(t.mKSwAW)}
</Text>,
];
var viewBindingProps2 = {style: styles.buttonWrapper};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[1] = (
<View {...viewBindingProps2}>
<Button
variant="primary"
size="sm"
onPress={onViewAll}
text={intl.string(t.ZT24In)}
disabled={disabled}
/>
</View>
);
items2[2] = <Image source={importDefault(11115) /* metro dependency 11115 */} />;
r0 = (
<View {...viewBindingProps}>
{items2}
</View>
);
} else {
object = {};
loadingSpinner = styles.loadingSpinner;
object.style = loadingSpinner;
object.size = 'large';
loadingSpinner = styles.loadingSpinner;
object.color = loadingSpinner.color;
r0 = <ActivityIndicator {...object} />;
}
return r0;
}
return r0;
}
global.__d(_fun85108, 11114, [31, 27, 33, 4501, 697, 11104, 4573, 1244, 4578, 11115,
2]) /* metro module 11114, dependencies: [31, 27, 33, 4501, 697, 11104, 4573, 1244, 4578, 11115, 2] */;
@@ -1,79 +1,85 @@
/* Metro module 11108; source: modules/media_keyboard/native/components/MediaKeyboardItem.tsx; dependencies: [31, 27, 4644, 11109, 33, 4017, 4501, 697, 4000, 1305, 11059, 4573, 566, 4658, 11110, 1244, 4690, 4660, 8509, 11111, 4504, 1478, 11112, 6697, 9786, 2] */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UploadAttachmentStore from '../../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import Module11059 from '../../../../by-id/module-11059.js'; /* Metro dependency 11059 */
import NativeMenuActionCreators from '../../../native_menu/native/NativeMenuActionCreators.tsx'; /* Metro dependency 11110 */
import Module11111 from '../../../../by-id/module-11111.js'; /* Metro dependency 11111 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ImageIconModule from '../../../../design/components/Icon/native/redesign/generated/ImageIcon.tsx'; /* Metro dependency 6697 */
import * as AttachmentIconModule from '../../../../design/components/Icon/native/redesign/generated/AttachmentIcon.tsx'; /* Metro dependency 9786 */
import * as DeviceConstantsModule from '../../../device/native/DeviceConstants.tsx'; /* Metro dependency 11109 */
import * as CameraIconModule from '../../../../design/components/Icon/native/redesign/generated/CameraIcon.tsx'; /* Metro dependency 11112 */
function _fun85078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:6, offset: 0x01f62cd3, size: 1124 bytes, params: 8, frame: 32
var object2;
const env0_0 = require;
const closure = function(a0) {
return 'type' in a0 && ['allphotos', 'attach', 'camera'].includes(a0.type);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const Pressable = value2.Pressable;
const StyleSheet = value2.StyleSheet;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const deviceConstantsModule = require(11109) /* metro dependency 11109: DeviceConstants */;
const env0_7 = deviceConstantsModule.ALAssetsType;
const env0_8 = deviceConstantsModule.DeviceMediaType;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const env0_11 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {container: {'flexDirection': 'row', 'paddingHorizontal': 12, 'alignItems': 'center'}};
let value = ReactModule;
const Pressable = ReactNativeModule.Pressable;
const StyleSheet = ReactNativeModule.StyleSheet;
const env0_11 = (ReanimatedRexport).createAnimatedComponent(Pressable);
const createStyles = CreateStylesModule.createStyles;
object = {container: {'flexDirection': 'row', 'paddingHorizontal': 12, 'alignItems': 'center'}};
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
object2.image = {backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND};
const object5 = {'borderRadius': null, 'overflow': 'hidden', 'position': 'relative'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.imageContainer = object5;
const object6 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
object.image = {backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND};
const object3 = {'borderRadius': null, 'overflow': 'hidden', 'position': 'relative'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.imageContainer = object3;
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
'paddingHorizontal': 5, 'paddingVertical': 4, 'position': 'absolute', 'left': 8, 'bottom': 8};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
let hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object6.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_700, 0.6]);
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.labelContainer = object6;
object2.mediaKeyboardItemLabelContainer = {right: 10};
object4.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_700, 0.6]);
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.labelContainer = object4;
object.mediaKeyboardItemLabelContainer = {right: 10};
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.icon = {'width': 12, 'height': 12, 'tintColor': null, 'marginEnd': 4, tintColor: WHITE};
object.icon = {'width': 12, 'height': 12, 'tintColor': null, 'marginEnd': 4, tintColor: WHITE};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.checkIcon = {'width': 14, 'height': 14, color: BACKGROUND_BRAND};
const object7 = {'width': 24, 'height': 24, 'position': 'absolute', 'justifyContent': 'center',
object.checkIcon = {'width': 14, 'height': 14, color: BACKGROUND_BRAND};
const object8 = {'width': 24, 'height': 24, 'position': 'absolute', 'justifyContent': 'center',
'alignItems': 'center', 'right': 6, 'top': 6, 'borderRadius': null, 'backgroundColor': null, 'borderWidth': 1};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object7.backgroundColor = WHITE;
const value8 = colorUtilsModule;
hexWithOpacity = value8.hexWithOpacity;
object8.backgroundColor = WHITE;
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
let BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object7.borderColor = Reflect.apply(hexWithOpacity, value8, [BLACK, 0.1]);
object2.checkIconContainer = object7;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const value9 = colorUtilsModule;
hexWithOpacity = value9.hexWithOpacity;
object8.borderColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.1]);
object.checkIconContainer = object8;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xs;
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object10['backgroundColor'] = Reflect.apply(hexWithOpacity, value9, [BLACK, 0.3]);
object2.selectedOverlay = object10;
object2.specialButton = {'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center', 'gap': 8};
object2.disabled = {opacity: 0.4};
object2.imageDisabled = {opacity: 0.2};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
const value11 = createStylesModule;
const createStyleProperties = value11.createStyleProperties;
object2 = {};
object9['backgroundColor'] = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.3]);
object.selectedOverlay = object9;
object.specialButton = {'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center', 'gap': 8};
object.disabled = {opacity: 0.4};
object.imageDisabled = {opacity: 0.2};
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const createStyleProperties = CreateStylesModule.createStyleProperties;
object = {};
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object2.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
const CONTROL_SECONDARY_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_ACTIVE;
object2.pressedBackgroundColor = CONTROL_SECONDARY_BACKGROUND_ACTIVE;
const env0_16 = Reflect.apply(createStyleProperties, value11, [object2]);
object2 = {code: 'function MediaKeyboardItemTsx1(){const{withTiming,interpolateColor,pressed,backgroundColor,pressedBackgroundColor,Easing}=this.__closure;return{backgroundColor:withTiming(interpolateColor(pressed.get(),[0,1],[backgroundColor,pressedBackgroundColor]),{duration:200,easing:Easing.out(Easing.quad)})};}'};
object.pressedBackgroundColor = CONTROL_SECONDARY_BACKGROUND_ACTIVE;
const env0_16 = Reflect.apply(createStyleProperties, CreateStylesModule, [object]);
object = {code: 'function MediaKeyboardItemTsx1(){const{withTiming,interpolateColor,pressed,backgroundColor,pressedBackgroundColor,Easing}=this.__closure;return{backgroundColor:withTiming(interpolateColor(pressed.get(),[0,1],[backgroundColor,pressedBackgroundColor]),{duration:200,easing:Easing.out(Easing.quad)})};}'};
value = value.memo(_fun85094);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardItem.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardItem.tsx');
exports.default = value;
exports.PARENT_PADDING = 24;
exports.CHILD_PADDING = 4;
@@ -88,299 +94,340 @@ function _fun85078(global, require, importDefault, importAll, module, exports, d
return 'type' in a0 && a0.type === 'allphotos';
};
exports.isSpecialMediaGridNode = closure;
}
function useLayoutStyle(a0, a1, a2) { // fn#85080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:1625, offset: 0x01f6315e, size: 66 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return env0_3.useMemo(_fun85081, [a0, a1, a2]);
function _fun85081() { // fn#85081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:1674, offset: 0x01f631a0, size: 306 bytes, params: 1, frame: 18
const value2 = 0;
const r5 = value2 === importDefault ? value2 : global.Math.floor((importDefault - 1) / require);
const Math = global.Math;
const floor = Math.floor;
const binding = env0_0;
const value5 = Reflect.apply(floor, Math, [binding / require]);
const value6 = 4;
return {borderTopLeftRadius: value2 !== binding ? value6 : 16,
borderTopRightRadius: (importDefault >= require ? env0_0 === require - 1 : env0_0 === importDefault - 1) ? 16 : value6,
borderBottomLeftRadius: value5 !== r5 || env0_0 % require != value2 ? value6 : 16,
borderBottomRightRadius: env0_0 === importDefault - 1 ? 16 : importDefault % require == value2 || env0_0 !== (r5 - 1) * require + require - 1 ? value6 : 16,
marginLeft: env0_0 % require != value2 ? value6 : value2};
}
function useLayoutStyle(a0, a1, a2) { // fn#85080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:1625, offset: 0x01f6315e, size: 66 bytes, params: 4, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return env0_3.useMemo(_fun85081, [a0, a1, a2]);
}
}
function NewCaption({label, style, textStyle}) { // fn#85082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:1971, offset: 0x01f632d2, size: 201 bytes, params: 2, frame: 23
const styles = useStyles();
const items2 = [styles.labelContainer, style];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const icon = <Icon source={importDefault(11059) /* metro dependency 11059 */} style={styles.icon} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
{icon}
<Text
style={textStyle}
color="always-white"
variant="text-xs/bold"
function NewCaption({label, style, textStyle}) { // fn#85082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:1971, offset: 0x01f632d2, size: 201 bytes, params: 2, frame: 23
const styles = useStyles();
const items2 = [styles.labelContainer, style];
const Icon = (NativeModule).Icon;
const icon = <Icon source={Module11059} style={styles.icon} />;
const Text = (TextModule).Text;
return (
<View style={items2}>
{icon}
<Text
style={textStyle}
color="always-white"
variant="text-xs/bold"
>
{label}
</Text>
</View>
);
}
function MediaKeyboardImage({draftType, item, index, totalNumItems, numItemsPerRow, size, channelId, onPressItem, onLongPressItem, disabled, includedUploadIds, uploadLimit, disableWhenReachedLimit}) { // fn#85083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2217, offset: 0x01f6339b, size: 1167 bytes, params: 2, frame: 34
var r8;
var r0;
var r16;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var moduleValue2;
var moduleValue3;
const onPressItem2 = onPressItem;
const styles = useStyles();
const {image, type} = item.node;
const {upload,
uploadCount} = (FluxModule).useStateFromStoresObject([UploadAttachmentStore],
_fun85084, [channelId, draftType, image, includedUploadIds]);
const value5 = upload != null;
const {onPress, onLongPress} = onPressItem2.useMemo(function() {
return {onPress: _fun85087, onLongPress: _fun85088};
}, [channelId, item, value5, onPressItem, onLongPressItem]);
const PHOTO = ALAssetsType.PHOTO;
const r17 = PHOTO === type || DeviceMediaType.IMAGE === type ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SkfkEJ) : ALAssetsType.VIDEO === type ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FlNoSV) : DeviceMediaType.VIDEO !== type ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FlNoSV);
const VIDEO = ALAssetsType.VIDEO;
if (VIDEO === type) {
moduleValue3 = require(4690) /* metro dependency 4690: TimeUtils */;
r8 = <NewCaption label={moduleValue3.getTimeFormat(image.playableDuration)} />;
} else if (DeviceMediaType.VIDEO === type) {
moduleValue3 = require(4690) /* metro dependency 4690: TimeUtils */;
r8 = <NewCaption label={moduleValue3.getTimeFormat(image.playableDuration)} />;
} else if (ALAssetsType.PHOTO === type) {
moduleValue2 = require(4660) /* metro dependency 4660: UploadUtils */;
if (moduleValue2.getType(image.uri) !== 'image/gif') {
r8 = null;
} else {
const Caption = (require(8509) /* metro dependency 8509: Caption */).Caption;
r8 = <Caption style={styles.mediaKeyboardItemLabelContainer} label="GIF" />;
}
} else if (DeviceMediaType.IMAGE !== type) {
r8 = null;
} else {
moduleValue2 = require(4660) /* metro dependency 4660: UploadUtils */;
if (moduleValue2.getType(image.uri) !== 'image/gif') {
r8 = null;
} else {
const Caption2 = (require(8509) /* metro dependency 8509: Caption */).Caption;
r8 = <Caption2 style={styles.mediaKeyboardItemLabelContainer} label="GIF" />;
}
}
if (value5) {
r16 = !value5;
} else {
r0 = uploadCount >= uploadLimit && disableWhenReachedLimit;
r0 = !r0 ? disabled : r0;
r16 = r0;
}
const View2 = (ReanimatedRexport).View;
const Icon = (NativeModule).Icon;
const view = (
<View2 style={styles.checkIconContainer}>
<Icon
source={Module11111}
disableColor={false}
color={styles.checkIcon.color}
style={styles.checkIcon}
/>
</View2>
);
const value15 = useLayoutStyle(index, numItemsPerRow, totalNumItems);
const object2 = {selected: value5};
const items2 = [styles.imageContainer];
items2[1] = r16 ? styles.imageDisabled : undefined;
items2[2] = value15;
const ThumbnailImage = (NativeModule).ThumbnailImage;
const items4 = [
<ThumbnailImage
resizeMode="cover"
resizeMethod="resize"
style={[styles.image, {height: size, width: size}]}
source={{
uri: image.uri,
width: size,
height: size,
cache: 'force-cache',
}}
localImageSource={{
uri: image.uri,
width: size,
height: size,
}}
/>,
r8,
];
items4[2] = (
value5
? (
<View style={[styles.selectedOverlay, {height: size, width: size}]} />
)
: null
);
items4[3] = value5 ? view : null;
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={r17}
accessibilityState={object2}
onPress={onPress}
onLongPress={onLongPress}
disabled={r16}
style={items2}
>
{label}
</Text>
</View>
);
}
{items4}
</Pressable>
);
function _fun85084() { // fn#85084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2486, offset: 0x01f6382a, size: 106 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
const uploadAttachmentStoreBinding = UploadAttachmentStore;
return {upload: uploadAttachmentStoreBinding.findUpload(channelId, draftType, _fun85085),
uploadCount: includedUploadIds?.length ?? UploadAttachmentStore.getUploadCount(channelId, draftType)};
function _fun85085(a0) { // fn#85085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2529, offset: 0x01f63894, size: 87 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4658) /* metro dependency 4658: UploadUtils */).doesImageMatchUpload, value, [image,
a0]);
return value && (includedUploadIds == null || includedUploadIds.includes(a0.id));
}
function MediaKeyboardImage({draftType, item, index, totalNumItems, numItemsPerRow, size, channelId, onPressItem, onLongPressItem, disabled, includedUploadIds, uploadLimit, disableWhenReachedLimit}) { // fn#85083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2217, offset: 0x01f6339b, size: 1167 bytes, params: 2, frame: 34
var r8;
var r0;
var r16;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var moduleValue2;
var moduleValue3;
const env0_3 = onPressItem;
const styles = useStyles();
const {image, type} = item.node;
const {upload,
uploadCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UploadAttachmentStore],
_fun85084, [channelId, draftType, image, includedUploadIds]);
const value5 = upload != null;
const {onPress, onLongPress} = env0_3.useMemo(function() {
return {onPress: _fun85087, onLongPress: _fun85088};
}, [channelId, item, value5, onPressItem, onLongPressItem]);
const PHOTO = ALAssetsType.PHOTO;
const r17 = PHOTO === type || DeviceMediaType.IMAGE === type ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SkfkEJ) : ALAssetsType.VIDEO === type ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FlNoSV) : DeviceMediaType.VIDEO !== type ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FlNoSV);
const VIDEO = ALAssetsType.VIDEO;
if (VIDEO === type) {
moduleValue3 = require(4690) /* metro dependency 4690: TimeUtils */;
r8 = <NewCaption label={moduleValue3.getTimeFormat(image.playableDuration)} />;
} else if (DeviceMediaType.VIDEO === type) {
moduleValue3 = require(4690) /* metro dependency 4690: TimeUtils */;
r8 = <NewCaption label={moduleValue3.getTimeFormat(image.playableDuration)} />;
} else if (ALAssetsType.PHOTO === type) {
moduleValue2 = require(4660) /* metro dependency 4660: UploadUtils */;
if (moduleValue2.getType(image.uri) !== 'image/gif') {
r8 = null;
} else {
const Caption = (require(8509) /* metro dependency 8509: Caption */).Caption;
r8 = <Caption style={styles.mediaKeyboardItemLabelContainer} label="GIF" />;
}
} else if (DeviceMediaType.IMAGE !== type) {
r8 = null;
} else {
moduleValue2 = require(4660) /* metro dependency 4660: UploadUtils */;
if (moduleValue2.getType(image.uri) !== 'image/gif') {
r8 = null;
} else {
const Caption2 = (require(8509) /* metro dependency 8509: Caption */).Caption;
r8 = <Caption2 style={styles.mediaKeyboardItemLabelContainer} label="GIF" />;
function _fun85086() { // fn#85086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2732, offset: 0x01f638eb, size: 29 bytes, params: 1, frame: 3
return {onPress: onPress_85087, onLongPress: onLongPress_85088};
function onPress_85087() { // fn#85087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2746, offset: 0x01f63908, size: 76 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
(NativeMenuActionCreators).hideNativeMenu();
value = environment.__proto__;
onPressItem({channelId: channelId, item: item, isIncluded: result});
}
function onLongPress_85088() { // fn#85088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2828, offset: 0x01f63954, size: 86 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
(NativeMenuActionCreators).hideNativeMenu();
value = environment.__proto__;
if (onLongPressItem != null) {
onLongPressItem({channelId: channelId, item: item, isIncluded: result});
}
}
}
}
if (value5) {
r16 = !value5;
} else {
r0 = uploadCount >= uploadLimit && disableWhenReachedLimit;
r0 = !r0 ? disabled : r0;
r16 = r0;
}
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const view = <View2 style={styles.checkIconContainer}><Icon source={importDefault(11111) /* metro dependency 11111 */} disableColor={false} color={styles.checkIcon.color} style={styles.checkIcon} /></View2>;
const value15 = useLayoutStyle(index, numItemsPerRow, totalNumItems);
const object = {selected: value5};
const items2 = [styles.imageContainer];
items2[1] = r16 ? styles.imageDisabled : undefined;
items2[2] = value15;
const ThumbnailImage = (require(1305) /* metro dependency 1305: native */).ThumbnailImage;
const items4 = [<ThumbnailImage resizeMode="cover" resizeMethod="resize" style={[styles.image, {height: size,
width: size}]} source={{uri: image.uri, width: size, height: size,
cache: 'force-cache'}} localImageSource={{uri: image.uri, width: size, height: size}} />, r8];
items4[2] = value5 ? <View style={[styles.selectedOverlay, {height: size, width: size}]} /> : null;
items4[3] = value5 ? view : null;
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={r17}
accessibilityState={object}
onPress={onPress}
onLongPress={onLongPress}
disabled={r16}
style={items2}
>
{items4}
</Pressable>
);
}
function MediaKeyboardDummy({size, isFirstInRow}) { // fn#85089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:4051, offset: 0x01f639aa, size: 138 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={[styles.imageContainer, !isFirstInRow && ({marginLeft: 4})]}>
<View style={[styles.image, {height: size, width: size}]} />
</View>
);
}
function MediaKeyboardSpecialButton({size, onPress, disabled, accessibilityLabel, children, index, totalNumItems, numItemsPerRow}) { // fn#85090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:4716, offset: 0x01f63a34, size: 401 bytes, params: 2, frame: 33
const styles = useStyles();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const {backgroundColor, pressedBackgroundColor} = env0_16();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = MediaKeyboardSpecialButtonH;
let object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.interpolateColor = reanimatedRexportModule.interpolateColor;
object2.pressed = value3;
object2.backgroundColor = backgroundColor;
object2.pressedBackgroundColor = pressedBackgroundColor;
const Easing = reanimatedRexportModule.Easing;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 15924448581794;
closure.__initData = env0_17;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value6 = useLayoutStyle(index, numItemsPerRow, totalNumItems);
const binding = env0_11;
object2 = {disabled: disabled, accessibilityRole: 'button', accessibilityLabel: accessibilityLabel,
onPressIn: onPressIn_85092, onPressOut: onPressOut_85093, onPress: onPress};
disabled = disabled ? styles.disabled : undefined;
object2.style = [value5, styles.imageContainer, styles.specialButton, {width: size, height: size}, value6, disabled];
return ((Component) => <Component {...object2}>{children}</Component>)(binding);
}
function _fun85094({items, channel, draftType, onPressItem, onLongPressItem, rowIndex, totalNumItems, numPerRow, includedUploadIds, uploadLimit, disableWhenReachedLimit, handleCameraPress, handleAttachPress, handleViewAllPhotosPress, disabled}) { // fn#85094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:5586, offset: 0x01f63c75, size: 445 bytes, params: 2, frame: 24
const styles = useStyles();
const env0_11 = ((importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width - (24 + 4 * (numPerRow - 1))) / numPerRow;
const object5 = {};
const object6 = {};
object6.text = (require(1244) /* metro dependency 1244: indexNative */).t.uje3P9;
object6.onPress = handleCameraPress;
const CameraIcon = (require(11112) /* metro dependency 11112: CameraIcon */).CameraIcon;
object6.Icon = CameraIcon;
object5.camera = object6;
const object7 = {};
const Zmm6dN = (require(1244) /* metro dependency 1244: indexNative */).t.Zmm6dN;
object7.text = Zmm6dN;
object7.onPress = handleViewAllPhotosPress;
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
object7.Icon = ImageIcon;
object5.allphotos = object7;
const object8 = {};
object8.text = (require(1244) /* metro dependency 1244: indexNative */).t['8Hvr3+'];
object8.onPress = handleAttachPress;
const AttachmentIcon = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
object8.Icon = AttachmentIcon;
object5.attach = object8;
return (
<View style={styles.container}>
{items.map(_fun85095)}
</View>
);
}
function _fun85081() { // fn#85081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:1674, offset: 0x01f631a0, size: 306 bytes, params: 1, frame: 18
const value2 = 0;
const r5 = value2 === importDefault ? value2 : global.Math.floor((importDefault - 1) / require);
const Math = global.Math;
const floor = Math.floor;
const binding = env0_0;
const value5 = Reflect.apply(floor, Math, [binding / require]);
const value6 = 4;
return {borderTopLeftRadius: value2 !== binding ? value6 : 16,
borderTopRightRadius: (importDefault >= require ? env0_0 === require - 1 : env0_0 === importDefault - 1) ? 16 : value6,
borderBottomLeftRadius: value5 !== r5 || env0_0 % require != value2 ? value6 : 16,
borderBottomRightRadius: env0_0 === importDefault - 1 ? 16 : importDefault % require == value2 || env0_0 !== (r5 - 1) * require + require - 1 ? value6 : 16,
marginLeft: env0_0 % require != value2 ? value6 : value2};
}
function _fun85084() { // fn#85084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2486, offset: 0x01f6382a, size: 106 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
return {upload: UploadAttachmentStore.findUpload(channelId, draftType, _fun85085),
uploadCount: includedUploadIds?.length ?? UploadAttachmentStore.getUploadCount(channelId, draftType)};
}
function _fun85086() { // fn#85086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2732, offset: 0x01f638eb, size: 29 bytes, params: 1, frame: 3
return {onPress: onPress_85087, onLongPress: onLongPress_85088};
}
function MediaKeyboardSpecialButtonH() { // fn#85091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:4947, owner: MediaKeyboardSpecialButton.h, offset: 0x01f63bc5, size: 176 bytes, params: 1, frame: 23
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value4 = reanimatedRexportModule.interpolateColor(env0_0.get(), [0, 1], [backgroundColor,
pressedBackgroundColor]);
const Easing = reanimatedRexportModule.Easing;
const out = Easing.out;
const Easing2 = reanimatedRexportModule.Easing;
return {backgroundColor: Reflect.apply(withTiming, value, [value4, {duration: 200, easing: Reflect.apply(out,
Easing, [Easing2.quad])}])};
}
function _fun85095(a0, a1) { // fn#85095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:6107, offset: 0x01f63e32, size: 415 bytes, params: 3, frame: 22
var value;
var rowIndexBinding;
var numPerRowBinding;
var property;
var intl;
if (a0 == null) {
value = environment.__proto__;
function MediaKeyboardDummy({size, isFirstInRow}) { // fn#85089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:4051, offset: 0x01f639aa, size: 138 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<MediaKeyboardDummy
size={env0_11}
isFirstInRow={a1 === 0}
key={a1}
/>
<View style={[styles.imageContainer, !isFirstInRow && ({marginLeft: 4})]}>
<View style={[styles.image, {height: size, width: size}]} />
</View>
);
}
if (isSpecialMediaGridNode(a0)) {
property = env0_12[a0.type];
var mediaKeyboardSpecialButtonBindingProps = {size: env0_11, onPress: property.onPress, disabled: disabled};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
mediaKeyboardSpecialButtonBindingProps.accessibilityLabel = intl.string(property.text);
rowIndexBinding = rowIndex;
numPerRowBinding = numPerRow;
mediaKeyboardSpecialButtonBindingProps.index = rowIndexBinding * numPerRowBinding + a1;
mediaKeyboardSpecialButtonBindingProps.totalNumItems = totalNumItems;
mediaKeyboardSpecialButtonBindingProps.numItemsPerRow = numPerRowBinding;
function MediaKeyboardSpecialButton({size, onPress, disabled, accessibilityLabel, children, index, totalNumItems, numItemsPerRow}) { // fn#85090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:4716, offset: 0x01f63a34, size: 401 bytes, params: 2, frame: 33
const styles = useStyles();
const value3 = (ReanimatedRexportModule).useSharedValue(0);
const {backgroundColor, pressedBackgroundColor} = env0_16();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const MediaKeyboardSpecialButtonH2 = MediaKeyboardSpecialButtonH;
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.interpolateColor = ReanimatedRexportModule.interpolateColor;
object.pressed = value3;
object.backgroundColor = backgroundColor;
object.pressedBackgroundColor = pressedBackgroundColor;
const Easing = ReanimatedRexportModule.Easing;
object.Easing = Easing;
MediaKeyboardSpecialButtonH2.__closure = object;
MediaKeyboardSpecialButtonH2.__workletHash = 15924448581794;
MediaKeyboardSpecialButtonH2.__initData = env0_17;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [MediaKeyboardSpecialButtonH2]);
const value6 = useLayoutStyle(index, numItemsPerRow, totalNumItems);
const binding = env0_11;
object = {disabled: disabled, accessibilityRole: 'button', accessibilityLabel: accessibilityLabel,
onPressIn: onPressIn_85092, onPressOut: onPressOut_85093, onPress: onPress};
disabled = disabled ? styles.disabled : undefined;
object.style = [value5, styles.imageContainer, styles.specialButton, {width: size, height: size}, value6, disabled];
return ((Component) => <Component {...object}>{children}</Component>)(binding);
function MediaKeyboardSpecialButtonH() { // fn#85091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:4947, owner: MediaKeyboardSpecialButton.h, offset: 0x01f63bc5, size: 176 bytes, params: 1, frame: 23
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const value4 = ReanimatedRexportModule.interpolateColor(env0_0.get(), [0, 1], [backgroundColor,
pressedBackgroundColor]);
const Easing = ReanimatedRexportModule.Easing;
const out = Easing.out;
const Easing2 = ReanimatedRexportModule.Easing;
return {backgroundColor: Reflect.apply(withTiming, value, [value4, {duration: 200, easing: Reflect.apply(out,
Easing, [Easing2.quad])}])};
}
function MediaKeyboardSpecialButtonOnPressIn() { // fn#85092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:5427, owner: MediaKeyboardSpecialButton.onPressIn, offset: 0x01c2f741, size: 24 bytes, params: 1, frame: 11
env0_0.set(1);
}
function MediaKeyboardSpecialButtonOnPressOut() { // fn#85093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:5453, owner: MediaKeyboardSpecialButton.onPressOut, offset: 0x01c2f759, size: 23 bytes, params: 1, frame: 11
env0_0.set(0);
}
}
function _fun85094({items, channel, draftType, onPressItem, onLongPressItem, rowIndex, totalNumItems, numPerRow, includedUploadIds, uploadLimit, disableWhenReachedLimit, handleCameraPress, handleAttachPress, handleViewAllPhotosPress, disabled}) { // fn#85094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:5586, offset: 0x01f63c75, size: 445 bytes, params: 2, frame: 24
const styles = useStyles();
const env0_11 = ((UseWindowDimensionsNative)().width - (24 + 4 * (numPerRow - 1))) / numPerRow;
const object = {};
const object2 = {};
object2.text = (require(1244) /* metro dependency 1244: indexNative */).t.uje3P9;
object2.onPress = handleCameraPress;
const CameraIcon = (CameraIconModule).CameraIcon;
object2.Icon = CameraIcon;
object.camera = object2;
const object3 = {};
const Zmm6dN = (require(1244) /* metro dependency 1244: indexNative */).t.Zmm6dN;
object3.text = Zmm6dN;
object3.onPress = handleViewAllPhotosPress;
const ImageIcon = (ImageIconModule).ImageIcon;
object3.Icon = ImageIcon;
object.allphotos = object3;
const object4 = {};
object4.text = (require(1244) /* metro dependency 1244: indexNative */).t['8Hvr3+'];
object4.onPress = handleAttachPress;
const AttachmentIcon = (AttachmentIconModule).AttachmentIcon;
object4.Icon = AttachmentIcon;
object.attach = object4;
return (
<MediaKeyboardSpecialButton {...mediaKeyboardSpecialButtonBindingProps} key={a1}>
<property.Icon color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE} size="lg" />
</MediaKeyboardSpecialButton>
<View style={styles.container}>
{items.map(_fun85095)}
</View>
);
function _fun85095(a0, a1) { // fn#85095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:6107, offset: 0x01f63e32, size: 415 bytes, params: 3, frame: 22
var value;
var rowIndexBinding;
var numPerRowBinding;
var property;
var intl;
if (a0 == null) {
value = environment.__proto__;
return (
<MediaKeyboardDummy
size={env0_11}
isFirstInRow={a1 === 0}
key={a1}
/>
);
}
if (isSpecialMediaGridNode(a0)) {
property = env0_12[a0.type];
var mediaKeyboardSpecialButtonBindingProps = {size: env0_11, onPress: property.onPress, disabled: disabled};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
mediaKeyboardSpecialButtonBindingProps.accessibilityLabel = intl.string(property.text);
rowIndexBinding = rowIndex;
numPerRowBinding = numPerRow;
mediaKeyboardSpecialButtonBindingProps.index = rowIndexBinding * numPerRowBinding + a1;
mediaKeyboardSpecialButtonBindingProps.totalNumItems = totalNumItems;
mediaKeyboardSpecialButtonBindingProps.numItemsPerRow = numPerRowBinding;
return (
<MediaKeyboardSpecialButton {...mediaKeyboardSpecialButtonBindingProps} key={a1}>
<property.Icon color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE} size="lg" />
</MediaKeyboardSpecialButton>
);
}
const id = channel.id;
const draftTypeBinding = draftType;
rowIndexBinding = rowIndex;
numPerRowBinding = numPerRow;
return (
<MediaKeyboardImage
channelId={id}
draftType={draftTypeBinding}
index={rowIndexBinding * numPerRowBinding + a1}
totalNumItems={totalNumItems}
numItemsPerRow={numPerRowBinding}
item={a0}
includedUploadIds={includedUploadIds}
uploadLimit={uploadLimit}
disableWhenReachedLimit={disableWhenReachedLimit}
size={env0_11}
onPressItem={onPressItem}
onLongPressItem={onLongPressItem}
disabled={disabled}
key={a1}
/>
);
}
}
const id = channel.id;
const draftTypeBinding = draftType;
rowIndexBinding = rowIndex;
numPerRowBinding = numPerRow;
return (
<MediaKeyboardImage
channelId={id}
draftType={draftTypeBinding}
index={rowIndexBinding * numPerRowBinding + a1}
totalNumItems={totalNumItems}
numItemsPerRow={numPerRowBinding}
item={a0}
includedUploadIds={includedUploadIds}
uploadLimit={uploadLimit}
disableWhenReachedLimit={disableWhenReachedLimit}
size={env0_11}
onPressItem={onPressItem}
onLongPressItem={onLongPressItem}
disabled={disabled}
key={a1}
/>
);
}
function _fun85085(a0) { // fn#85085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2529, offset: 0x01f63894, size: 87 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = Reflect.apply((require(4658) /* metro dependency 4658: UploadUtils */).doesImageMatchUpload, value, [image,
a0]);
return value && (includedUploadIds == null || includedUploadIds.includes(a0.id));
}
function onPress_85087() { // fn#85087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2746, offset: 0x01f63908, size: 76 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
(importDefault(11110) /* metro dependency 11110: NativeMenuActionCreators */).hideNativeMenu();
value = environment.__proto__;
onPressItem({channelId: channelId, item: item, isIncluded: result});
}
function onLongPress_85088() { // fn#85088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11294:2828, offset: 0x01f63954, size: 86 bytes, params: 1, frame: 13
let value = environment.__proto__.__proto__;
(importDefault(11110) /* metro dependency 11110: NativeMenuActionCreators */).hideNativeMenu();
value = environment.__proto__;
if (onLongPressItem != null) {
onLongPressItem({channelId: channelId, item: item, isIncluded: result});
}
}
global.__d(_fun85078, 11108, [31, 27, 4644, 11109, 33, 4017, 4501, 697, 4000, 1305, 11059, 4573, 566, 4658, 11110,
1244, 4690, 4660, 8509, 11111, 4504, 1478, 11112, 6697, 9786,
2]) /* metro module 11108, dependencies: [31, 27, 4644, 11109, 33, 4017, 4501, 697, 4000, 1305, 11059, 4573, 566, 4658, 11110, 1244, 4690, 4660, 8509, 11111, 4504, 1478, 11112, 6697, 9786, 2] */;
@@ -1,49 +1,58 @@
/* Metro module 11116; source: modules/media_keyboard/native/components/MediaKeyboardLimitedPickerNotice.tsx; dependencies: [31, 27, 33, 4501, 4573, 1244, 4578, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun85111(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11302:6, offset: 0x01f646b3, size: 251 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexDirection': 'row',
const env0_6 = (CreateStylesModule).createStyles({container: {'flexDirection': 'row',
'paddingHorizontal': 16, 'paddingVertical': 16, 'alignItems': 'center'},
absoluteContainer: {position: 'absolute'}, text: {flex: 1}, button: {marginLeft: 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardLimitedPickerNotice.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardLimitedPickerNotice.tsx');
exports.default = MediaKeyboardLimitedPickerNotice;
}
function MediaKeyboardLimitedPickerNotice({onPress, onHeightChange}) { // fn#85112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11302:467, offset: 0x01f647ae, size: 362 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_2.useCallback(function(a0) {
if (onHeightChange != null) {
onHeightChange(a0.nativeEvent.layout.height);
}
}, [onHeightChange]);
const items2 = [styles.container];
items2[1] = onHeightChange != null ? styles.absoluteContainer : undefined;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text = <Text style={styles.text} variant="text-sm/normal">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['5g7NcN']])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const JuXTi6 = (require(1244) /* metro dependency 1244: indexNative */).t.JuXTi6;
return (
<View style={items2} onLayout={value3}>
{text}
<View style={styles.button}>
<Button
size="sm"
variant="tertiary"
text={Reflect.apply(string, intl, [JuXTi6])}
onPress={onPress}
/>
function MediaKeyboardLimitedPickerNotice({onPress, onHeightChange}) { // fn#85112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11302:467, offset: 0x01f647ae, size: 362 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = ReactModule.useCallback(function(a0) {
if (onHeightChange != null) {
onHeightChange(a0.nativeEvent.layout.height);
}
}, [onHeightChange]);
const items2 = [styles.container];
items2[1] = onHeightChange != null ? styles.absoluteContainer : undefined;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const text = (
<Text style={styles.text} variant="text-sm/normal">
{Reflect.apply(string, intl, [(IndexNativeModule).t['5g7NcN']])}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const JuXTi6 = (IndexNativeModule).t.JuXTi6;
return (
<View style={items2} onLayout={value3}>
{text}
<View style={styles.button}>
<Button
size="sm"
variant="tertiary"
text={Reflect.apply(string, intl, [JuXTi6])}
onPress={onPress}
/>
</View>
</View>
</View>
);
);
}
}
global.__d(_fun85111, 11116, [31, 27, 33, 4501, 4573, 1244, 4578,
2]) /* metro module 11116, dependencies: [31, 27, 33, 4501, 4573, 1244, 4578, 2] */;
@@ -1,336 +1,367 @@
/* Metro module 11103; source: modules/media_keyboard/native/components/MediaKeyboardList.tsx; dependencies: [57, 31, 27, 1479, 1580, 6276, 4661, 33, 4501, 697, 4017, 11104, 11107, 1481, 1585, 1478, 5314, 6277, 7739, 4674, 22, 11108, 11114, 11116, 11117, 4670, 8140, 1244, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import DimensionsStoreAndroid from '../../../screen/native/DimensionsStore.android.tsx'; /* Metro dependency 1479 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import DeviceMedia from '../../../device/native/DeviceMedia.tsx'; /* Metro dependency 11104 */
import MediaKeyboardFooter from './MediaKeyboardFooter.tsx'; /* Metro dependency 11114 */
import MediaKeyboardLimitedPickerNotice from './MediaKeyboardLimitedPickerNotice.tsx'; /* Metro dependency 11116 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AppEntryKeyContextModule from '../../../window/native/AppEntryKeyContext.tsx'; /* Metro dependency 1481 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NativePermissionConstantsModule from '../../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ActionSheetConstantsModule from '../../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as UseMediaKeyboardItemsPerRowModule from '../useMediaKeyboardItemsPerRow.tsx'; /* Metro dependency 11107 */
import * as MediaKeyboardItemModule from './MediaKeyboardItem.tsx'; /* Metro dependency 11108 */
import * as MediaKeyboardEmptyStateModule from './MediaKeyboardEmptyState.tsx'; /* Metro dependency 11117 */
function _fun85031(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:6, offset: 0x01f611a5, size: 450 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const {NativeEventEmitter, NativeModules} = require(27) /* metro dependency 27 */;
const dimensionsStoreAndroid = importDefault(1479) /* metro dependency 1479: DimensionsStoreAndroid */;
const env0_7 = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).InAppCameraUsedCameraPreviewTypes;
const env0_8 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_START_HEIGHT_RATIO;
const env0_9 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionStatus;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const {NativeEventEmitter, NativeModules} = ReactNativeModule;
const PhotoLibraryHelper = NativeModules.PhotoLibraryHelper;
const nativeEventEmitter = new NativeEventEmitter(PhotoLibraryHelper);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{listContainer: {'backgroundColor': null,
const createStyles = CreateStylesModule.createStyles;
const MOBILE_KEYBOARD_PANEL_BACKGROUND = (Native).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [{listContainer: {'backgroundColor': null,
'marginTop': 8, 'paddingTop': 8, backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND}}]);
object = {code: 'function MediaKeyboardListTsx1(){const{animatedIndex}=this.__closure;return animatedIndex.get();}'};
object = {code: 'function MediaKeyboardListTsx2(currentIndex){const{latch,runOnJS,setIsExpanded}=this.__closure;if(currentIndex>0.1&&!latch.get()){latch.set(true);runOnJS(setIsExpanded)(true);}}'};
object = {code: 'function MediaKeyboardListTsx3(){const{animatedSnapPoints}=this.__closure;return animatedSnapPoints.get();}'};
object = {code: 'function MediaKeyboardListTsx4(snapPoints,previous){const{cheapWorkletArrayShallowEqual,runOnJS,setBottomSheetState,windowHeight,computedStartHeight,maxDynamicContentSize}=this.__closure;var _snapPoints$,_snapPoints;if(cheapWorkletArrayShallowEqual(snapPoints,previous!==null&&previous!==void 0?previous:undefined))return;runOnJS(setBottomSheetState)({minimum:windowHeight-((_snapPoints$=snapPoints[0])!==null&&_snapPoints$!==void 0?_snapPoints$:computedStartHeight),maximum:windowHeight-((_snapPoints=snapPoints[snapPoints.length-1])!==null&&_snapPoints!==void 0?_snapPoints:maxDynamicContentSize)});}'};
value = value.memo(MediaKeyboardList);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/MediaKeyboardList.tsx');
exports.default = value;
}
function MediaKeyboardList({channel, draftType, onPressCamera, onAttachPress, onPressItem, onLongPressItem, onViewAll, onManageLimited, includedUploadIds, extensions, allowCamera, uploadDisabled, uploadLimit, disableWhenReachedLimit}) { // fn#85032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:1526, offset: 0x01f61367, size: 1757 bytes, params: 2, frame: 53
var object2;
var r0;
var FastList;
var intl;
const env0_3 = onAttachPress;
const env0_4 = onPressItem;
let value = undefined;
allowCamera = allowCamera === value || allowCamera;
uploadDisabled = !(uploadDisabled === value) && uploadDisabled;
let binding = env0_4;
const value6 = binding.useCallback(_fun85033, [binding.useRef(true)]);
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
const value8 = binding2(value7, 2);
const property = value8[0];
const env0_15 = value8[1];
const value11 = (importDefault(11104) /* metro dependency 11104: DeviceMedia */).useAssets();
const env0_16 = value11;
const {itemsPerRow,
itemsPageSizeRef} = (require(11107) /* metro dependency 11107: useMediaKeyboardItemsPerRow */).useMediaKeyboardItemsPerRow();
let closure = _fun85034;
binding.useEffect(closure, []);
binding.useEffect(_fun85036, [property, itemsPageSizeRef, extensions]);
const env0_19 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true}).height;
const value13 = height * ACTION_SHEET_START_HEIGHT_RATIO;
const NAV_BAR_HEIGHT_MULTILINE = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE;
const value14 = height - NAV_BAR_HEIGHT_MULTILINE - top;
const {animatedSnapPoints, animatedIndex} = (require(6277) /* metro dependency 6277 */).useBottomSheetInternal();
useState = binding.useState;
const value16 = binding2(Reflect.apply(useState, binding, [{minimum: value13, maximum: value14}]), 2);
const {minimum, maximum} = value16[0];
const property3 = value16[1];
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = function() {
return animatedSnapPoints.get();
};
closure.__closure = {animatedSnapPoints: animatedSnapPoints};
closure.__workletHash = 7279123713809;
closure.__initData = env0_15;
const closure2 = MediaKeyboardListG;
closure2.__closure = {cheapWorkletArrayShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual,
runOnJS: reanimatedRexportModule.runOnJS, setBottomSheetState: property3, windowHeight: height,
computedStartHeight: value13, maxDynamicContentSize: value14};
closure2.__workletHash = 4619753074319;
closure2.__initData = env0_16;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value17 = useHasMediaKeyboardBottomSheetExpanded(animatedIndex);
const styles = useStyles();
const r23 = allowCamera && (require(4674) /* metro dependency 4674: ImagePickerUtils */).isImageCaptureIntentSupported();
const value18 = ((value11 == null ? value : value11.edges.length) ?? 0) + (r23 ? 1 : 0);
binding = env0_4;
const value19 = binding.useMemo(_fun85044, [value11, itemsPerRow, r23]);
const value20 = binding.useCallback(function() {
onPressCamera(InAppCameraUsedCameraPreviewTypes.CAMERA_BUTTON);
}, [onPressCamera]);
const value21 = binding.useCallback(_fun85046, [itemsPageSizeRef, extensions]);
const value22 = binding.useCallback(_fun85047, [channel, draftType, value20, onViewAll, onAttachPress, itemsPerRow,
onPressItem, onLongPressItem, value19, includedUploadIds, uploadDisabled, uploadLimit, disableWhenReachedLimit,
value18]);
const value23 = binding.useMemo(_fun85049,
[(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width, itemsPerRow]);
const value24 = binding.useCallback(_fun85050, [onViewAll, uploadDisabled]);
const r5 = value17 ? maximum : minimum;
binding = env0_4;
const value25 = binding.useMemo(_fun85051, [r5]);
const LIMITED = NativePermissionStatus.LIMITED;
const value26 = property === LIMITED;
const [property4, env0_31] = env0_3(binding.useState(_fun85052), 2);
const value29 = binding.useCallback(_fun85053, [onManageLimited]);
const mediaKeyboardEmptyStateModule = require(11117) /* metro dependency 11117: MediaKeyboardEmptyState */;
const getMediaEmptyStateComponentOrNull = mediaKeyboardEmptyStateModule.getMediaEmptyStateComponentOrNull;
object2 = {photoPermissionStatus: property};
object2.photosEmpty = value11 != null && value11.edges.length === 0;
object2.showCameraButton = r23;
object2.onPressCamera = function() {
return onPressCamera(InAppCameraUsedCameraPreviewTypes.TAKE_A_PHOTO_BUTTON);
};
object2.onManageLimited = onManageLimited;
object2.onPressPrivacySettings = importDefault(4670) /* metro dependency 4670: openPrivacySettingsNative */;
const value32 = Reflect.apply(getMediaEmptyStateComponentOrNull, mediaKeyboardEmptyStateModule, [object2]);
if (value32 != null) {
r0 = value32;
} else {
FastList = importDefault(8140) /* metro dependency 8140: FastList */;
var fastListProps = {renderHeader: value26 ? value29 : value, headerSize: value26 ? property4 : 0,
style: [value25,
styles.listContainer], renderItem: value22, sections: [value19.length], itemSize: value23,
inActionSheet: true,
preserveScrollMomentum: true, automaticallyAdjustsScrollIndicatorInsets: false, keyboardDismissMode: 'none',
onEndReached: value21, onScroll: value6, endReachedThreshold: 400, accessibilityRole: 'list'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
fastListProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XONG6A);
fastListProps.showsVerticalScrollIndicator = false;
fastListProps.footerSize = (require(11114) /* metro dependency 11114: MediaKeyboardFooter */).FOOTER_HEIGHT;
fastListProps.renderFooter = value24;
fastListProps.chunkBase = r5;
fastListProps.batchesToRender = value17 ? value : (require(8140) /* metro dependency 8140: FastList */).MINIMUM_BATCHES_TO_RENDER;
value = <FastList {...fastListProps} />;
r0 = value;
}
return r0;
}
function _fun85033({nativeEvent}) { // fn#85033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:1820, offset: 0x01f61a44, size: 44 bytes, params: 2, frame: 3
env0_13.current = nativeEvent.contentOffset.y < 100;
}
function _fun85034() { // fn#85034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2032, offset: 0x01f61a70, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const NativePermissionManager = NativeModules.NativePermissionManager;
NativePermissionManager.requestPhotoAuthorization().then(_fun85035);
}
function _fun85036() { // fn#85036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2128, offset: 0x01f61a9e, size: 161 bytes, params: 1, frame: 17
var value;
let binding = env0_14;
const AUTHORIZED = NativePermissionStatus.AUTHORIZED;
if (binding === AUTHORIZED) {
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).refreshAssets({batchSize: itemsPageSizeRef.current,
extensions: extensions});
if (env1_11 != null) {
value = env1_11.addListener('photoLibraryChanged', _fun85037);
}
return _fun85038;
}
binding = env0_14;
const LIMITED = NativePermissionStatus.LIMITED;
if (binding === LIMITED) {
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).refreshAssets({batchSize: itemsPageSizeRef.current,
extensions: extensions});
if (env1_11 != null) {
value = env1_11.addListener('photoLibraryChanged', _fun85037);
}
return _fun85038;
}
}
function MediaKeyboardListG(a0, a1) { // fn#85040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2852, owner: MediaKeyboardList.G, offset: 0x01f61ba1, size: 170 bytes, params: 3, frame: 18
var r3;
var object2;
var heightBinding;
var property;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_24);
object2 = {};
heightBinding = height;
property = a0[0];
r3 = property ?? env0_21;
object2.minimum = heightBinding - r3;
heightBinding = height;
property = a0[a0.length - 1];
r3 = property ?? env0_22;
object2.maximum = heightBinding - r3;
value(object2);
}
return value3;
}
function useHasMediaKeyboardBottomSheetExpanded(a0) { // fn#85041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3277, owner: MediaKeyboardList.useHasMediaKeyboardBottomSheetExpanded, offset: 0x01f61c4b, size: 237 bytes, params: 2, frame: 23
var object2;
const env0_0 = a0;
const [property, property2] = env1_3(env1_4.useState(false), 2);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useHasMediaKeyboardBottomSheetExpandedS;
closure.__closure = {animatedIndex: a0};
closure.__workletHash = 8982138292467;
closure.__initData = env1_13;
const closure2 = useHasMediaKeyboardBottomSheetExpandedI;
object2 = {latch: value4};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setIsExpanded = property2;
closure2.__closure = object2;
closure2.__workletHash = 7990574449734;
closure2.__initData = env1_14;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return property;
}
function _fun85044() { // fn#85044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3847, offset: 0x01f61da5, size: 257 bytes, params: 1, frame: 18
var items;
var itemsPerRowBinding;
var value4;
var Array;
var value6;
var value7;
var defaultImport2;
const r1 = env0_25 ? [{type: 'camera'}] : [];
if (env0_16 == null) {
items = [];
value4 = arraySpread(items, r1, 0, undefined);
Array = global.Array;
itemsPerRowBinding = itemsPerRow;
value6 = Array(3 * itemsPerRowBinding - r1.length);
arraySpread(items, value6.fill(null), value4, itemsPerRowBinding);
value7 = environment.__proto__;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
return defaultImport2.chunk(items, itemsPerRow);
}
const r3 = env0_16?.edges ?? [];
items = [];
arraySpread(items, r3, arraySpread(items, r1, 0, undefined), undefined);
const defaultImport = importDefault(22) /* metro dependency 22 */;
return defaultImport.chunk(items, itemsPerRow);
}
function _fun85046() { // fn#85046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4136, offset: 0x01f61ec3, size: 66 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).getNextAssetPage({batchSize: itemsPageSizeRef.current,
extensions: extensions});
}
function _fun85047(a0, a1) { // fn#85047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4231, offset: 0x01f61f05, size: 217 bytes, params: 3, frame: 18
var environment;
let value = environment.__proto__;
value = importDefault(11108) /* metro dependency 11108: MediaKeyboardItem */;
const property = env0_27[a1];
return ((Component) => <Component draftType={draftType} rowIndex={a1} totalNumItems={env0_26} channel={channel} numPerRow={itemsPerRow} items={env0_27[a1]} onPressItem={onPressItem} onLongPressItem={onLongPressItem} includedUploadIds={includedUploadIds} uploadLimit={uploadLimit} disableWhenReachedLimit={disableWhenReachedLimit} handleCameraPress={env0_28} handleAttachPress={onAttachPress} handleViewAllPhotosPress={onViewAll} disabled={uploadDisabled} key={property.reduce(_fun85048,
a1.toString())} />)(value);
}
function _fun85049() { // fn#85049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4804, offset: 0x01f620e5, size: 105 bytes, params: 1, frame: 18
const widthBinding = width;
const PARENT_PADDING = (require(11108) /* metro dependency 11108: MediaKeyboardItem */).PARENT_PADDING;
const CHILD_PADDING = (require(11108) /* metro dependency 11108: MediaKeyboardItem */).CHILD_PADDING;
const value = (widthBinding - (PARENT_PADDING + CHILD_PADDING * (itemsPerRow - 1))) / itemsPerRow;
const SEPARATOR_SIZE = (require(11108) /* metro dependency 11108: MediaKeyboardItem */).SEPARATOR_SIZE;
return value + SEPARATOR_SIZE;
}
function _fun85050() { // fn#85050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4921, offset: 0x01f6214e, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component disabled={uploadDisabled} onViewAll={onViewAll} />)(importDefault(11114) /* metro dependency 11114: MediaKeyboardFooter */);
}
function _fun85051() { // fn#85051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4997, offset: 0x01f62189, size: 15 bytes, params: 1, frame: 2
return {height: env0_30};
}
function _fun85052() { // fn#85052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:5054, offset: 0x01f62198, size: 56 bytes, params: 1, frame: 9
const getState = DimensionsStoreAndroid.getState;
return 32 + 36 * Reflect.apply(getState, DimensionsStoreAndroid, []).byAppEntry[env0_19].fontScale;
}
function _fun85053() { // fn#85053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:5168, offset: 0x01f621d0, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component onPress={onManageLimited} onHeightChange={env0_31} />)(importDefault(11116) /* metro dependency 11116: MediaKeyboardLimitedPickerNotice */);
}
function _fun85037() { // fn#85037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2287, offset: 0x01f61b3f, size: 80 bytes, params: 1, frame: 13
var value2;
if (env1_13.current) {
value2 = environment.__proto__.__proto__;
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).refreshAssets({batchSize: itemsPageSizeRef.current,
extensions: extensions});
}
}
function useHasMediaKeyboardBottomSheetExpandedI(a0) { // fn#85043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3539, owner: MediaKeyboardList.useHasMediaKeyboardBottomSheetExpanded.i, offset: 0x01f61d38, size: 109 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (a0 > 0.1 && !env0_2.get()) {
env0_2.set(true);
value2 = environment.__proto__.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(env0_1)(true);
}
}
function _fun85048(a0, a1) { // fn#85048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4528, offset: 0x01f61fde, size: 263 bytes, params: 3, frame: 18
var r1;
var r0;
var value2;
var moduleValue;
var moduleValue2;
let value = a0;
if (a1 == null) {
r0 = value;
} else {
value2 = environment.__proto__.__proto__;
moduleValue = require(11108) /* metro dependency 11108: MediaKeyboardItem */;
if (moduleValue.isMediaCameraNode(a1)) {
value = '' + value + '-camera';
r1 = value;
function MediaKeyboardList({channel, draftType, onPressCamera, onAttachPress, onPressItem, onLongPressItem, onViewAll, onManageLimited, includedUploadIds, extensions, allowCamera, uploadDisabled, uploadLimit, disableWhenReachedLimit}) { // fn#85032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:1526, offset: 0x01f61367, size: 1757 bytes, params: 2, frame: 53
var r0;
var FastList;
var intl;
const onAttachPress2 = onAttachPress;
const onPressItem2 = onPressItem;
let value = undefined;
allowCamera = allowCamera === value || allowCamera;
uploadDisabled = !(uploadDisabled === value) && uploadDisabled;
let binding = onPressItem2;
const value6 = binding.useCallback(_fun85033, [binding.useRef(true)]);
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [null]);
const binding2 = onAttachPress2;
const value8 = binding2(value7, 2);
const property = value8[0];
const env0_15 = value8[1];
const value11 = (DeviceMedia).useAssets();
const env0_16 = value11;
const {itemsPerRow,
itemsPageSizeRef} = (UseMediaKeyboardItemsPerRowModule).useMediaKeyboardItemsPerRow();
let closure = _fun85034;
binding.useEffect(closure, []);
binding.useEffect(_fun85036, [property, itemsPageSizeRef, extensions]);
const env0_19 = (AppEntryKeyContextModule).useAppEntryKey();
const top = (UseSafeAreaInsetsNative)().top;
const height = (UseWindowDimensionsNative)({ignoreKeyboard: true}).height;
const value13 = height * ACTION_SHEET_START_HEIGHT_RATIO;
const NAV_BAR_HEIGHT_MULTILINE = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT_MULTILINE;
const value14 = height - NAV_BAR_HEIGHT_MULTILINE - top;
const {animatedSnapPoints, animatedIndex} = (Module06277Module).useBottomSheetInternal();
useState = binding.useState;
const value16 = binding2(Reflect.apply(useState, binding, [{minimum: value13, maximum: value14}]), 2);
const {minimum, maximum} = value16[0];
const property3 = value16[1];
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = function() {
return animatedSnapPoints.get();
};
closure.__closure = {animatedSnapPoints: animatedSnapPoints};
closure.__workletHash = 7279123713809;
closure.__initData = env0_15;
const MediaKeyboardListG2 = MediaKeyboardListG;
MediaKeyboardListG2.__closure = {cheapWorkletArrayShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual,
runOnJS: ReanimatedRexportModule.runOnJS, setBottomSheetState: property3, windowHeight: height,
computedStartHeight: value13, maxDynamicContentSize: value14};
MediaKeyboardListG2.__workletHash = 4619753074319;
MediaKeyboardListG2.__initData = env0_16;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, MediaKeyboardListG2]);
const value17 = useHasMediaKeyboardBottomSheetExpanded(animatedIndex);
const styles = useStyles();
const r23 = allowCamera && (require(4674) /* metro dependency 4674: ImagePickerUtils */).isImageCaptureIntentSupported();
const value18 = ((value11 == null ? value : value11.edges.length) ?? 0) + (r23 ? 1 : 0);
binding = onPressItem2;
const value19 = binding.useMemo(_fun85044, [value11, itemsPerRow, r23]);
const value20 = binding.useCallback(function() {
onPressCamera(InAppCameraUsedCameraPreviewTypes.CAMERA_BUTTON);
}, [onPressCamera]);
const value21 = binding.useCallback(_fun85046, [itemsPageSizeRef, extensions]);
const value22 = binding.useCallback(_fun85047, [channel, draftType, value20, onViewAll, onAttachPress, itemsPerRow,
onPressItem, onLongPressItem, value19, includedUploadIds, uploadDisabled, uploadLimit, disableWhenReachedLimit,
value18]);
const value23 = binding.useMemo(_fun85049,
[(UseWindowDimensionsNative)().width, itemsPerRow]);
const value24 = binding.useCallback(_fun85050, [onViewAll, uploadDisabled]);
const r5 = value17 ? maximum : minimum;
binding = onPressItem2;
const value25 = binding.useMemo(_fun85051, [r5]);
const LIMITED = NativePermissionStatus.LIMITED;
const value26 = property === LIMITED;
const [property4, env0_31] = onAttachPress2(binding.useState(_fun85052), 2);
const value29 = binding.useCallback(_fun85053, [onManageLimited]);
const getMediaEmptyStateComponentOrNull = MediaKeyboardEmptyStateModule.getMediaEmptyStateComponentOrNull;
object = {photoPermissionStatus: property};
object.photosEmpty = value11 != null && value11.edges.length === 0;
object.showCameraButton = r23;
object.onPressCamera = function() {
return onPressCamera(InAppCameraUsedCameraPreviewTypes.TAKE_A_PHOTO_BUTTON);
};
object.onManageLimited = onManageLimited;
object.onPressPrivacySettings = importDefault(4670) /* metro dependency 4670: openPrivacySettingsNative */;
const value32 = Reflect.apply(getMediaEmptyStateComponentOrNull, MediaKeyboardEmptyStateModule, [object]);
if (value32 != null) {
r0 = value32;
} else {
moduleValue2 = require(11108) /* metro dependency 11108: MediaKeyboardItem */;
r1 = moduleValue2.isAttachFilesNode(a1) ? '' + value + '-attach' : (require(11108) /* metro dependency 11108: MediaKeyboardItem */).isViewAllPhotosNode(a1) ? '' + value + '-view-all' : '' + value + '-' + a1.node.image.uri;
FastList = importDefault(8140) /* metro dependency 8140: FastList */;
var fastListProps = {renderHeader: value26 ? value29 : value, headerSize: value26 ? property4 : 0,
style: [value25,
styles.listContainer], renderItem: value22, sections: [value19.length], itemSize: value23,
inActionSheet: true,
preserveScrollMomentum: true, automaticallyAdjustsScrollIndicatorInsets: false, keyboardDismissMode: 'none',
onEndReached: value21, onScroll: value6, endReachedThreshold: 400, accessibilityRole: 'list'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
fastListProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XONG6A);
fastListProps.showsVerticalScrollIndicator = false;
fastListProps.footerSize = (require(11114) /* metro dependency 11114: MediaKeyboardFooter */).FOOTER_HEIGHT;
fastListProps.renderFooter = value24;
fastListProps.chunkBase = r5;
fastListProps.batchesToRender = value17 ? value : (require(8140) /* metro dependency 8140: FastList */).MINIMUM_BATCHES_TO_RENDER;
value = <FastList {...fastListProps} />;
r0 = value;
}
r0 = r1;
return r0;
function _fun85033({nativeEvent}) { // fn#85033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:1820, offset: 0x01f61a44, size: 44 bytes, params: 2, frame: 3
env0_13.current = nativeEvent.contentOffset.y < 100;
}
function _fun85034() { // fn#85034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2032, offset: 0x01f61a70, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const NativePermissionManager = NativeModules.NativePermissionManager;
NativePermissionManager.requestPhotoAuthorization().then(_fun85035);
function _fun85035(a0) { // fn#85035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2097, offset: 0x00f824cb, size: 19 bytes, params: 2, frame: 11
env1_15(a0);
}
}
function _fun85036() { // fn#85036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2128, offset: 0x01f61a9e, size: 161 bytes, params: 1, frame: 17
var value;
let binding = env0_14;
const AUTHORIZED = NativePermissionStatus.AUTHORIZED;
if (binding === AUTHORIZED) {
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).refreshAssets({batchSize: itemsPageSizeRef.current,
extensions: extensions});
if (env1_11 != null) {
value = env1_11.addListener('photoLibraryChanged', _fun85037);
}
return _fun85038;
}
binding = env0_14;
const LIMITED = NativePermissionStatus.LIMITED;
if (binding === LIMITED) {
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).refreshAssets({batchSize: itemsPageSizeRef.current,
extensions: extensions});
if (env1_11 != null) {
value = env1_11.addListener('photoLibraryChanged', _fun85037);
}
return _fun85038;
}
function _fun85037() { // fn#85037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2287, offset: 0x01f61b3f, size: 80 bytes, params: 1, frame: 13
var value2;
if (env1_13.current) {
value2 = environment.__proto__.__proto__;
(importDefault(11104) /* metro dependency 11104: DeviceMedia */).refreshAssets({batchSize: itemsPageSizeRef.current,
extensions: extensions});
}
}
function _fun85038() { // fn#85038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2372, offset: 0x01ef8366, size: 31 bytes, params: 1, frame: 10
if (env0_0 != null) {
env0_0.remove();
}
}
}
function MediaKeyboardListG(a0, a1) { // fn#85040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:2852, owner: MediaKeyboardList.G, offset: 0x01f61ba1, size: 170 bytes, params: 3, frame: 18
var r3;
var object;
var heightBinding;
var property;
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_24);
object = {};
heightBinding = height;
property = a0[0];
r3 = property ?? env0_21;
object.minimum = heightBinding - r3;
heightBinding = height;
property = a0[a0.length - 1];
r3 = property ?? env0_22;
object.maximum = heightBinding - r3;
value(object);
}
return value3;
}
function useHasMediaKeyboardBottomSheetExpanded(a0) { // fn#85041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3277, owner: MediaKeyboardList.useHasMediaKeyboardBottomSheetExpanded, offset: 0x01f61c4b, size: 237 bytes, params: 2, frame: 23
const env0_0 = a0;
const [property, property2] = env1_3(env1_4.useState(false), 2);
const value4 = (ReanimatedRexportModule).useSharedValue(false);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const useHasMediaKeyboardBottomSheetExpandedS2 = useHasMediaKeyboardBottomSheetExpandedS;
useHasMediaKeyboardBottomSheetExpandedS2.__closure = {animatedIndex: a0};
useHasMediaKeyboardBottomSheetExpandedS2.__workletHash = 8982138292467;
useHasMediaKeyboardBottomSheetExpandedS2.__initData = env1_13;
const useHasMediaKeyboardBottomSheetExpandedI2 = useHasMediaKeyboardBottomSheetExpandedI;
object = {latch: value4};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.setIsExpanded = property2;
useHasMediaKeyboardBottomSheetExpandedI2.__closure = object;
useHasMediaKeyboardBottomSheetExpandedI2.__workletHash = 7990574449734;
useHasMediaKeyboardBottomSheetExpandedI2.__initData = env1_14;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [useHasMediaKeyboardBottomSheetExpandedS2,
useHasMediaKeyboardBottomSheetExpandedI2]);
return property;
function useHasMediaKeyboardBottomSheetExpandedS() { // fn#85042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3446, owner: MediaKeyboardList.useHasMediaKeyboardBottomSheetExpanded.s, offset: 0x01c3cd06, size: 18 bytes, params: 1, frame: 9
return env0_0.get();
}
function useHasMediaKeyboardBottomSheetExpandedI(a0) { // fn#85043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3539, owner: MediaKeyboardList.useHasMediaKeyboardBottomSheetExpanded.i, offset: 0x01f61d38, size: 109 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (a0 > 0.1 && !env0_2.get()) {
env0_2.set(true);
value2 = environment.__proto__.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(env0_1)(true);
}
}
}
function _fun85044() { // fn#85044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:3847, offset: 0x01f61da5, size: 257 bytes, params: 1, frame: 18
var items2;
var itemsPerRowBinding;
var value4;
var Array;
var value6;
var value7;
var defaultImport2;
const r1 = env0_25 ? [{type: 'camera'}] : [];
if (env0_16 == null) {
items2 = [];
value4 = arraySpread(items2, r1, 0, undefined);
Array = global.Array;
itemsPerRowBinding = itemsPerRow;
value6 = Array(3 * itemsPerRowBinding - r1.length);
arraySpread(items2, value6.fill(null), value4, itemsPerRowBinding);
value7 = environment.__proto__;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
return defaultImport2.chunk(items2, itemsPerRow);
}
const r3 = env0_16?.edges ?? [];
items2 = [];
arraySpread(items2, r3, arraySpread(items2, r1, 0, undefined), undefined);
const defaultImport = importDefault(22) /* metro dependency 22 */;
return defaultImport.chunk(items2, itemsPerRow);
}
function _fun85046() { // fn#85046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4136, offset: 0x01f61ec3, size: 66 bytes, params: 1, frame: 14
const value = environment.__proto__;
(DeviceMedia).getNextAssetPage({batchSize: itemsPageSizeRef.current,
extensions: extensions});
}
function _fun85047(a0, a1) { // fn#85047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4231, offset: 0x01f61f05, size: 217 bytes, params: 3, frame: 18
var environment;
let value = environment.__proto__;
value = importDefault(11108) /* metro dependency 11108: MediaKeyboardItem */;
const property = env0_27[a1];
return ((Component) => <Component draftType={draftType} rowIndex={a1} totalNumItems={env0_26} channel={channel} numPerRow={itemsPerRow} items={env0_27[a1]} onPressItem={onPressItem} onLongPressItem={onLongPressItem} includedUploadIds={includedUploadIds} uploadLimit={uploadLimit} disableWhenReachedLimit={disableWhenReachedLimit} handleCameraPress={env0_28} handleAttachPress={onAttachPress} handleViewAllPhotosPress={onViewAll} disabled={uploadDisabled} key={property.reduce(_fun85048,
a1.toString())} />)(value);
function _fun85048(a0, a1) { // fn#85048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4528, offset: 0x01f61fde, size: 263 bytes, params: 3, frame: 18
var r1;
var r0;
var value2;
var moduleValue;
var moduleValue2;
let value = a0;
if (a1 == null) {
r0 = value;
} else {
value2 = environment.__proto__.__proto__;
moduleValue = require(11108) /* metro dependency 11108: MediaKeyboardItem */;
if (moduleValue.isMediaCameraNode(a1)) {
value = '' + value + '-camera';
r1 = value;
} else {
moduleValue2 = require(11108) /* metro dependency 11108: MediaKeyboardItem */;
r1 = moduleValue2.isAttachFilesNode(a1) ? '' + value + '-attach' : (require(11108) /* metro dependency 11108: MediaKeyboardItem */).isViewAllPhotosNode(a1) ? '' + value + '-view-all' : '' + value + '-' + a1.node.image.uri;
}
r0 = r1;
}
return r0;
}
}
function _fun85049() { // fn#85049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4804, offset: 0x01f620e5, size: 105 bytes, params: 1, frame: 18
const widthBinding = width;
const PARENT_PADDING = (MediaKeyboardItemModule).PARENT_PADDING;
const CHILD_PADDING = (MediaKeyboardItemModule).CHILD_PADDING;
const value = (widthBinding - (PARENT_PADDING + CHILD_PADDING * (itemsPerRow - 1))) / itemsPerRow;
const SEPARATOR_SIZE = (MediaKeyboardItemModule).SEPARATOR_SIZE;
return value + SEPARATOR_SIZE;
}
function _fun85050() { // fn#85050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4921, offset: 0x01f6214e, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component disabled={uploadDisabled} onViewAll={onViewAll} />)(MediaKeyboardFooter);
}
function _fun85051() { // fn#85051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:4997, offset: 0x01f62189, size: 15 bytes, params: 1, frame: 2
return {height: env0_30};
}
function _fun85052() { // fn#85052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:5054, offset: 0x01f62198, size: 56 bytes, params: 1, frame: 9
const dimensionsStoreAndroidBinding = DimensionsStoreAndroid;
const getState = dimensionsStoreAndroidBinding.getState;
return 32 + 36 * Reflect.apply(getState, dimensionsStoreAndroidBinding, []).byAppEntry[env0_19].fontScale;
}
function _fun85053() { // fn#85053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11289:5168, offset: 0x01f621d0, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component onPress={onManageLimited} onHeightChange={env0_31} />)(MediaKeyboardLimitedPickerNotice);
}
}
return r0;
}
global.__d(_fun85031, 11103, [57, 31, 27, 1479, 1580, 6276, 4661, 33, 4501, 697, 4017, 11104, 11107, 1481, 1585,
1478, 5314, 6277, 7739, 4674, 22, 11108, 11114, 11116, 11117, 4670, 8140, 1244,
2]) /* metro module 11103, dependencies: [57, 31, 27, 1479, 1580, 6276, 4661, 33, 4501, 697, 4017, 11104, 11107, 1481, 1585, 1478, 5314, 6277, 7739, 4674, 22, 11108, 11114, 11116, 11117, 4670, 8140, 1244, 2] */;
@@ -1,70 +1,73 @@
/* Metro module 15147; source: modules/media_keyboard/native/components/useMediaKeyboardConfig.tsx; dependencies: [31, 1580, 661, 7149, 15148, 6860, 8448, 11095, 2] */
import UseUploadDisabled from '../useUploadDisabled.tsx'; /* Metro dependency 15148 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MediaKeyboardConstantsModule from '../MediaKeyboardConstants.tsx'; /* Metro dependency 1580 */
function _fun115517(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15344:6, offset: 0x0246348b, size: 175 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(1580) /* metro dependency 1580: MediaKeyboardConstants */).MediaKeyboardTarget;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.ChannelTypesSets;
const env0_6 = constantsModule.MAX_UPLOAD_COUNT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_keyboard/native/components/useMediaKeyboardConfig.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/components/useMediaKeyboardConfig.tsx');
exports.default = useMediaKeyboardConfig;
}
function useMediaKeyboardConfig({channel, context}) { // fn#115518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15344:299, offset: 0x0246353a, size: 357 bytes, params: 2, frame: 21
const target = context.target;
const COMMAND = MediaKeyboardTarget.COMMAND;
const value2 = target === COMMAND;
const r8 = (require(7149) /* metro dependency 7149: PollsUtils */).useCanPostPollsInChannel(channel) && !value2;
const value5 = (importDefault(15148) /* metro dependency 15148: useUploadDisabled */)(channel);
const r5 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanStartThread(channel) && !ChannelTypesSets.GUILD_THREADS_ONLY.has(channel.type) && !channel.isThread() && !value2;
return r5.useMemo(_fun115519, [context, r8, value5,
(require(11095) /* metro dependency 11095: MediaKeyboardUtils */).getMediaKeyboardDraftType(context.target), r5,
(require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).useIsAppLauncherEnabled(channel.id) && !value2]);
}
function _fun115519() { // fn#115519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15344:629, offset: 0x0246369f, size: 308 bytes, params: 1, frame: 15
var object2;
var value3;
var Error;
var value;
const target = context.target;
let CHAT = MediaKeyboardTarget.CHAT;
if (target === CHAT) {
object2 = {};
CHAT = MediaKeyboardTarget.CHAT;
value3 = undefined;
object2.title = target === CHAT ? value3 : context.option.displayName;
CHAT = MediaKeyboardTarget.CHAT;
object2.subtitle = target === CHAT ? value3 : context.option.displayDescription;
CHAT = MediaKeyboardTarget.CHAT;
object2.uploadLimit = target !== CHAT ? 1 : MAX_UPLOAD_COUNT;
} else {
var COMMAND = MediaKeyboardTarget.COMMAND;
if (target !== COMMAND) {
Error = global.Error;
value = 'MediaKeyboard does not support context target ' + target;
throw new Error();
function useMediaKeyboardConfig({channel, context}) { // fn#115518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15344:299, offset: 0x0246353a, size: 357 bytes, params: 2, frame: 21
const target = context.target;
const COMMAND = MediaKeyboardTarget.COMMAND;
const value2 = target === COMMAND;
const r8 = (require(7149) /* metro dependency 7149: PollsUtils */).useCanPostPollsInChannel(channel) && !value2;
const value5 = (UseUploadDisabled)(channel);
const r5 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanStartThread(channel) && !ChannelTypesSets.GUILD_THREADS_ONLY.has(channel.type) && !channel.isThread() && !value2;
return r5.useMemo(_fun115519, [context, r8, value5,
(require(11095) /* metro dependency 11095: MediaKeyboardUtils */).getMediaKeyboardDraftType(context.target), r5,
(require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).useIsAppLauncherEnabled(channel.id) && !value2]);
function _fun115519() { // fn#115519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15344:629, offset: 0x0246369f, size: 308 bytes, params: 1, frame: 15
var object;
var value3;
var Error;
var value;
const target = context.target;
let CHAT = MediaKeyboardTarget.CHAT;
if (target === CHAT) {
object = {};
CHAT = MediaKeyboardTarget.CHAT;
value3 = undefined;
object.title = target === CHAT ? value3 : context.option.displayName;
CHAT = MediaKeyboardTarget.CHAT;
object.subtitle = target === CHAT ? value3 : context.option.displayDescription;
CHAT = MediaKeyboardTarget.CHAT;
object.uploadLimit = target !== CHAT ? 1 : MAX_UPLOAD_COUNT;
} else {
var COMMAND = MediaKeyboardTarget.COMMAND;
if (target !== COMMAND) {
Error = global.Error;
value = 'MediaKeyboard does not support context target ' + target;
throw new Error();
}
object = {};
CHAT = MediaKeyboardTarget.CHAT;
value3 = undefined;
object.title = target === CHAT ? value3 : context.option.displayName;
CHAT = MediaKeyboardTarget.CHAT;
object.subtitle = target === CHAT ? value3 : context.option.displayDescription;
CHAT = MediaKeyboardTarget.CHAT;
object.uploadLimit = target !== CHAT ? 1 : MAX_UPLOAD_COUNT;
}
CHAT = MediaKeyboardTarget.CHAT;
object.disableWhenReachedLimit = target === CHAT;
CHAT = MediaKeyboardTarget.CHAT;
object.includedUploadIds = target === CHAT ? value3 : [context.option.name];
object.canPostPolls = env0_1;
object.canStartThreads = ReactModule;
object.isAppLauncherEnabled = MediaKeyboardConstantsModule.MediaKeyboardTarget;
object.uploadDisabled = env0_2;
object.draftType = ConstantsModule.ChannelTypesSets;
return object;
}
object2 = {};
CHAT = MediaKeyboardTarget.CHAT;
value3 = undefined;
object2.title = target === CHAT ? value3 : context.option.displayName;
CHAT = MediaKeyboardTarget.CHAT;
object2.subtitle = target === CHAT ? value3 : context.option.displayDescription;
CHAT = MediaKeyboardTarget.CHAT;
object2.uploadLimit = target !== CHAT ? 1 : MAX_UPLOAD_COUNT;
}
CHAT = MediaKeyboardTarget.CHAT;
object2.disableWhenReachedLimit = target === CHAT;
CHAT = MediaKeyboardTarget.CHAT;
object2.includedUploadIds = target === CHAT ? value3 : [context.option.name];
object2.canPostPolls = env0_1;
object2.canStartThreads = env0_3;
object2.isAppLauncherEnabled = env0_4;
object2.uploadDisabled = env0_2;
object2.draftType = env0_5;
return object2;
}
global.__d(_fun115517, 15147, [31, 1580, 661, 7149, 15148, 6860, 8448, 11095,
2]) /* metro module 15147, dependencies: [31, 1580, 661, 7149, 15148, 6860, 8448, 11095, 2] */;