decord/source/modules/autocompleter/native/AutocompleteWrapper.tsx

1105 lines
45 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 11460
// Function ID: 88892
2026-07-20 16:05:17 +00:00
// Name: isSlashAutocompleteType
2026-07-28 08:39:19 +00:00
// Dependencies: [57, 31, 27, 6073, 5026, 4843, 5070, 653, 4601, 9555, 4602, 9638, 1853, 33, 4165, 477, 689, 11461, 1450, 5193, 5118, 566, 3869, 9889, 11464, 3838, 5197, 9637, 9639, 11465, 9313, 5684, 1882, 9554, 11145, 1555, 4359, 11466, 1324, 4563, 11467, 6171, 11367, 1273, 4026, 11468, 5686, 11475, 4161, 1212, 7618, 11476, 11477, 2]
2026-07-20 16:05:17 +00:00
2026-07-28 08:39:19 +00:00
// Module 11460 (isSlashAutocompleteType)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import importAllResult from "_createForOfIteratorHelperLoose";
2026-07-24 07:16:23 +00:00
import get_ActivityIndicator from "toGameResults";
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
import closure_9 from "_isNativeReflectConstruct";
import closure_10 from "_isNativeReflectConstruct";
import ME from "ME";
import { BOOLEAN_CHOICES } from "TRUE_OPTION_NAME";
import AUTOCOMPLETE_ROW_HEIGHT from "AUTOCOMPLETE_ROW_HEIGHT";
2026-07-24 07:16:23 +00:00
import regExp from "regExp";
2026-07-23 10:11:24 +00:00
import { AutocompleteTypes } from "AutocompleteTypes";
import { EmojiInteractionPoint } from "set";
2026-07-24 07:16:23 +00:00
import jsxProd from "getMentionTextWithUser";
2026-07-23 10:11:24 +00:00
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_11;
let closure_12;
let closure_13;
let closure_14;
let closure_16;
let closure_17;
let closure_18;
let closure_19;
let closure_20;
2026-07-24 07:16:23 +00:00
let closure_21;
2026-07-23 10:11:24 +00:00
let closure_24;
let closure_25;
2026-07-24 07:16:23 +00:00
let closure_26;
2026-07-23 10:11:24 +00:00
let closure_5;
let closure_6;
const require = arg1;
2026-07-20 16:05:17 +00:00
function isSlashAutocompleteType(arg0) {
let tmp = arg0 === AutocompleteTypes.SLASHES;
if (!tmp) {
tmp = arg0 === AutocompleteTypes.SLASHES_DISCOVERY;
}
return tmp;
}
function getAutocompletesHeight(arg0, arg1, arg2, arg3) {
let num = 0;
if (0 !== arg0) {
if (arg2) {
num = arg0 * arg3 + (arg0 - 1) * hairlineWidth;
}
}
return num;
}
function getStickersItemLayout(arg0, index) {
2026-07-28 08:39:19 +00:00
const obj = { length: require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_SIZE };
const result = index * (require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_SIZE + require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_MARGIN);
2026-07-20 16:05:17 +00:00
const diff = index - 1;
2026-07-28 08:39:19 +00:00
obj.offset = result + diff * require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_MARGIN;
2026-07-20 16:05:17 +00:00
obj.index = index;
return obj;
}
2026-07-23 10:11:24 +00:00
({ View: closure_5, FlatList: closure_6 } = get_ActivityIndicator);
({ AutoCompleteResultTypes: closure_11, WHITESPACE_RE: closure_12, AnalyticEvents: closure_13, UpsellTypes: closure_14 } = ME);
({ AUTOCOMPLETE_EMOJI_ROW_HEIGHT: closure_16, AUTOCOMPLETE_ROW_HEIGHT: closure_17 } = AUTOCOMPLETE_ROW_HEIGHT);
2026-07-24 07:16:23 +00:00
({ MENTION_SENTINEL: closure_18, CHANNEL_SENTINEL: closure_19, EMOJI_SENTINEL: closure_20, GAME_MENTION_INPUT_PREFIX: closure_21 } = regExp);
({ jsx: closure_24, Fragment: closure_25, jsxs: closure_26 } = jsxProd);
2026-07-23 10:11:24 +00:00
const hairlineWidth = get_ActivityIndicator.StyleSheet.hairlineWidth;
2026-07-24 07:16:23 +00:00
let closure_28 = _createForOfIteratorHelperLoose.createStyles((borderRadius, borderWidth, borderTopWidth, marginHorizontal, marginBottom) => {
2026-07-20 16:05:17 +00:00
let obj = { autocompletePositionRelative: { position: "relative" } };
obj = {};
2026-07-23 10:11:24 +00:00
let obj2 = require(477) /* set */;
2026-07-20 16:05:17 +00:00
let str = "absolute";
if (obj2.isAndroid()) {
str = "relative";
}
obj.position = str;
obj.marginHorizontal = marginHorizontal;
obj.marginBottom = marginBottom;
obj.autocompleteWrapper = obj;
2026-07-23 10:11:24 +00:00
obj.autocompleteWrapperAbsolute = { left: 0, right: 0, bottom: 0 };
obj = { backgroundColor: importDefault(689).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND, borderRadius, borderWidth, borderTopWidth, borderColor: importDefault(689).colors.MOBILE_FLOATING_ACCESSORY_BORDER, overflow: "hidden" };
2026-07-20 16:05:17 +00:00
obj.autocompleteContainer = obj;
2026-07-23 10:11:24 +00:00
const obj1 = { flexGrow: 0, flexShrink: 1, backgroundColor: importDefault(689).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND };
obj.autocomplete = obj1;
obj2 = { backgroundColor: importDefault(689).colors.MOBILE_FLOATING_ACCESSORY_BORDER, marginLeft: -16 };
2026-07-20 16:05:17 +00:00
obj.sectionDivider = obj2;
2026-07-23 10:11:24 +00:00
const obj3 = { backgroundColor: importDefault(689).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND, paddingLeft: 12, marginVertical: 12, justifyContent: "center" };
2026-07-20 16:05:17 +00:00
obj.sectionTitle = obj3;
2026-07-28 08:39:19 +00:00
obj.stickersAutocompleteList = { paddingLeft: 12 - require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_MARGIN, marginBottom: 12, height: require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_SIZE, flexShrink: 0 };
const obj4 = { paddingLeft: 12 - require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_MARGIN, marginBottom: 12, height: require(11461) /* AutocompleteLabel */.AUTOCOMPLETE_STICKER_NODE_SIZE, flexShrink: 0 };
2026-07-24 07:16:23 +00:00
obj.newTag = { backgroundColor: importDefault(689).colors.BADGE_BACKGROUND_BRAND };
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-23 10:11:24 +00:00
let obj = { resultCount: 0, stickerResults: [], nonStickerResults: [], hasStickerResults: false, hasNonStickerResults: false };
2026-07-20 16:05:17 +00:00
const forwardRefResult = importAllResult.forwardRef((analyticsLocations) => {
let canOnlyUseTextCommands;
let screenIndex;
analyticsLocations = analyticsLocations.analyticsLocations;
const channel = analyticsLocations.channel;
2026-07-23 10:11:24 +00:00
let canMentionEveryone = analyticsLocations.canMentionEveryone;
2026-07-20 16:05:17 +00:00
const keyboardType = analyticsLocations.keyboardType;
const onChangeAutoCompleteVisibility = analyticsLocations.onChangeAutoCompleteVisibility;
const commandsDisabled = analyticsLocations.commandsDisabled;
const chatInputRef = analyticsLocations.chatInputRef;
2026-07-24 07:16:23 +00:00
let c29;
let anchor;
let beginSearch;
let autocompleteType;
let query;
let queryOptions;
let autocompleteSelectionStart;
let showOptionValuesPicker;
let callback;
let callback1;
let memo2;
let closure_40;
let closure_41;
let diff1;
let memo3;
let first2;
let c45;
let chatInputFloating;
let c47;
let token5;
let c49;
2026-07-20 16:05:17 +00:00
let isScreenReaderEnabled;
let callback2;
let callback4;
let first3;
2026-07-24 07:16:23 +00:00
let closure_54;
2026-07-20 16:05:17 +00:00
({ canOnlyUseTextCommands, screenIndex } = analyticsLocations);
2026-07-23 10:11:24 +00:00
let obj = analyticsLocations(canMentionEveryone[21]);
let items = [optionStates];
2026-07-20 16:05:17 +00:00
let stateFromStoresObject = obj.useStateFromStoresObject(items, () => ({ optionStates: optionStates.getOptionStates(channel.id), activeOption: optionStates.getActiveOption(channel.id), activeCommand: optionStates.getActiveCommand(channel.id), activeSection: optionStates.getActiveCommandSection(channel.id) }));
2026-07-23 10:11:24 +00:00
optionStates = stateFromStoresObject.optionStates;
2026-07-20 16:05:17 +00:00
const activeOption = stateFromStoresObject.activeOption;
const activeCommand = stateFromStoresObject.activeCommand;
2026-07-23 10:11:24 +00:00
let obj1 = analyticsLocations(canMentionEveryone[22]);
const token = obj1.useToken(channel(canMentionEveryone[16]).modules.mobile.TABLE_ROW_HEIGHT);
let obj2 = analyticsLocations(canMentionEveryone[23]);
2026-07-21 22:01:30 +00:00
const scaledTextLineHeight = obj2.useScaledTextLineHeight("text-sm/semibold");
2026-07-24 07:16:23 +00:00
const tmp4 = channel(canMentionEveryone[24])();
let closure_12 = tmp4;
const IncludeStickersInAutocomplete = analyticsLocations(canMentionEveryone[25]).IncludeStickersInAutocomplete;
2026-07-20 16:05:17 +00:00
const setting = IncludeStickersInAutocomplete.getSetting();
2026-07-24 07:16:23 +00:00
const tmp6 = keyboardType(onChangeAutoCompleteVisibility.useState(c29), 2);
const first = tmp6[0];
2026-07-20 16:05:17 +00:00
const resultCount = first.resultCount;
const stickerResults = first.stickerResults;
2026-07-23 10:11:24 +00:00
const nonStickerResults = first.nonStickerResults;
2026-07-20 16:05:17 +00:00
let hasStickerResults = first.hasStickerResults;
let hasNonStickerResults = first.hasNonStickerResults;
2026-07-24 07:16:23 +00:00
let closure_19 = tmp6[1];
2026-07-23 10:11:24 +00:00
let obj3 = analyticsLocations(canMentionEveryone[21]);
let items1 = [activeOption];
2026-07-21 22:01:30 +00:00
const stateFromStores = obj3.useStateFromStores(items1, () => activeOption.loadState);
2026-07-23 10:11:24 +00:00
let obj4 = analyticsLocations(canMentionEveryone[21]);
const items2 = [token];
2026-07-21 22:01:30 +00:00
const stateFromStores1 = obj4.useStateFromStores(items2, () => token.loadState);
2026-07-24 07:16:23 +00:00
const context = onChangeAutoCompleteVisibility.useContext(analyticsLocations(canMentionEveryone[26]).RedesignCompatContext);
2026-07-20 16:05:17 +00:00
const items3 = [channel, setting];
2026-07-24 07:16:23 +00:00
const memo = onChangeAutoCompleteVisibility.useMemo(() => analyticsLocations(canMentionEveryone[27]).getAutocompleteOptions(channel, true, setting), items3);
let tmp12 = keyboardType(onChangeAutoCompleteVisibility.useState({ focused: false, text: "", selectionStart: 0, selectionEnd: 0 }), 2);
const first1 = tmp12[0];
2026-07-20 16:05:17 +00:00
const focused = first1.focused;
2026-07-23 10:11:24 +00:00
let text = first1.text;
2026-07-21 22:01:30 +00:00
const EmojiInteractionPoint = text;
2026-07-20 16:05:17 +00:00
const selectionStart = first1.selectionStart;
const selectionEnd = first1.selectionEnd;
2026-07-24 07:16:23 +00:00
callback = tmp12[1];
const tmp14 = keyboardType(onChangeAutoCompleteVisibility.useState(0), 2);
let closure_27 = tmp14[1];
let obj5 = analyticsLocations(canMentionEveryone[28]);
const gameMentionsAutocompleteConfig = obj5.getGameMentionsAutocompleteConfig("AutocompleteWrapper game search");
c29 = tmp16;
let tmp17 = channel(canMentionEveryone[29])(text, selectionEnd, chatInputRef, gameMentionsAutocompleteConfig.enabled && !gameMentionsAutocompleteConfig.combineMentionAutocomplete, memo);
anchor = tmp17.anchor;
beginSearch = tmp17.beginSearch;
2026-07-23 10:11:24 +00:00
const effect = onChangeAutoCompleteVisibility.useEffect(() => {
let c0 = false;
let result = activeCommand.addConditionalChangeListener(() => {
let tmp = !c0;
if (!c0) {
2026-07-20 16:05:17 +00:00
let flag;
2026-07-23 10:11:24 +00:00
if (activeCommand.isConnected()) {
2026-07-24 07:16:23 +00:00
const result = analyticsLocations(canMentionEveryone[30]).initiateEmojiInteraction(text.AutocompleteWrapperShown);
2026-07-20 16:05:17 +00:00
flag = false;
2026-07-24 07:16:23 +00:00
const obj = analyticsLocations(canMentionEveryone[30]);
2026-07-20 16:05:17 +00:00
}
tmp = flag;
}
return tmp;
});
return () => {
2026-07-23 10:11:24 +00:00
let c0 = true;
2026-07-20 16:05:17 +00:00
};
}, []);
2026-07-23 10:11:24 +00:00
const imperativeHandle = onChangeAutoCompleteVisibility.useImperativeHandle(arg1, onChangeAutoCompleteVisibility.useMemo(() => {
let c0 = -1;
2026-07-20 16:05:17 +00:00
return () => ({
2026-07-24 07:16:23 +00:00
setChatInputHeight: outer1_27,
2026-07-20 16:05:17 +00:00
setData(channelIds, combined) {
2026-07-23 10:11:24 +00:00
let closure_0;
let closure_1;
let closure_2;
let _slicedToArray;
({ focused: closure_0, text: closure_1, selectionStart: closure_2, selectionEnd: _slicedToArray } = channelIds);
if (-1 !== outer1_0) {
2026-07-20 16:05:17 +00:00
const _clearTimeout = clearTimeout;
2026-07-23 10:11:24 +00:00
clearTimeout(outer1_0);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
outer1_0 = setTimeout(() => {
2026-07-24 07:16:23 +00:00
outer3_26(() => { ... });
2026-07-20 16:05:17 +00:00
}, 16);
}
});
}, []));
2026-07-24 07:16:23 +00:00
const items4 = [selectionStart, selectionEnd, text, activeCommand, optionStates, activeOption, canMentionEveryone, commandsDisabled, memo, stateFromStores, stateFromStores1, gameMentionsAutocompleteConfig.enabled && !gameMentionsAutocompleteConfig.combineMentionAutocomplete, anchor];
2026-07-23 10:11:24 +00:00
const memo1 = onChangeAutoCompleteVisibility.useMemo(() => {
2026-07-20 16:05:17 +00:00
let text;
let tmp = selectionStart;
let canMentionEveryone = selectionStart;
if (null != text) {
if (0 !== text.trim().length) {
if (null != activeOption) {
2026-07-24 07:16:23 +00:00
let obj1 = analyticsLocations(canMentionEveryone[31]);
2026-07-20 16:05:17 +00:00
let applicationCommandOptionQueryOptions = obj1.getApplicationCommandOptionQueryOptions(activeOption);
} else {
2026-07-24 07:16:23 +00:00
applicationCommandOptionQueryOptions = { canMentionEveryone, canMentionHere: canMentionEveryone, canMentionChannels: true, canMentionUsers: true, canMentionRoles: true, canMentionAnyGuildUser: false, canMentionNonMentionableRoles: false, canMentionOtherGlobals: true, canMentionGames: true };
2026-07-20 16:05:17 +00:00
}
let tmp7;
if (null != activeOption) {
2026-07-23 10:11:24 +00:00
tmp7 = optionStates[activeOption.name];
2026-07-20 16:05:17 +00:00
}
if (null != activeCommand) {
if (null != activeOption) {
if (null != tmp7) {
const _location = tmp7.location;
let num2 = 0;
if (null != _location) {
num2 = _location;
}
let num3 = 0;
if (null != tmp7.length) {
num3 = length;
}
let substr;
if (selectionStart >= num2 + num3) {
substr = text.substring(num2 + num3, selectionStart);
}
2026-07-23 10:11:24 +00:00
let query = substr;
2026-07-20 16:05:17 +00:00
if (null == activeOption.choices) {
if (!activeOption.autocomplete) {
const type = activeOption.type;
2026-07-24 07:16:23 +00:00
if (analyticsLocations(canMentionEveryone[32]).ApplicationCommandOptionType.BOOLEAN === type) {
2026-07-23 10:11:24 +00:00
let prefix = "";
2026-07-21 22:01:30 +00:00
let CHOICES = focused.CHOICES;
2026-07-24 07:16:23 +00:00
let choices = stickerResults;
2026-07-20 16:05:17 +00:00
let flag = true;
let str = "";
2026-07-24 07:16:23 +00:00
} else if (analyticsLocations(canMentionEveryone[32]).ApplicationCommandOptionType.CHANNEL === type) {
prefix = closure_19;
2026-07-21 22:01:30 +00:00
CHOICES = focused.CHANNELS;
2026-07-20 16:05:17 +00:00
const channelTypes = activeOption.channelTypes;
flag = true;
2026-07-24 07:16:23 +00:00
str = closure_19;
2026-07-20 16:05:17 +00:00
} else {
2026-07-24 07:16:23 +00:00
if (analyticsLocations(canMentionEveryone[32]).ApplicationCommandOptionType.ROLE !== type) {
if (analyticsLocations(canMentionEveryone[32]).ApplicationCommandOptionType.USER !== type) {
2026-07-20 16:05:17 +00:00
flag = false;
}
}
2026-07-24 07:16:23 +00:00
prefix = hasNonStickerResults;
2026-07-21 22:01:30 +00:00
CHOICES = focused.MENTIONS;
2026-07-20 16:05:17 +00:00
flag = true;
2026-07-24 07:16:23 +00:00
str = hasNonStickerResults;
2026-07-20 16:05:17 +00:00
}
}
let tmp11 = CHOICES;
let tmp12 = substr;
if (flag) {
let startsWithResult = null != str;
if (startsWithResult) {
startsWithResult = "" !== str;
}
if (startsWithResult) {
startsWithResult = null != substr;
}
if (startsWithResult) {
startsWithResult = substr.startsWith(str);
}
2026-07-24 07:16:23 +00:00
let tmp78 = substr;
2026-07-20 16:05:17 +00:00
if (startsWithResult) {
2026-07-24 07:16:23 +00:00
let str7 = "";
2026-07-20 16:05:17 +00:00
if (substr.length > str.length) {
2026-07-24 07:16:23 +00:00
str7 = substr.substring(str.length);
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
query = str7;
tmp78 = str7;
2026-07-20 16:05:17 +00:00
}
let obj = {};
const _Object2 = Object;
const entries = Object.entries(optionStates);
const item = entries.forEach((arg0) => {
let tmp;
let tmp2;
[tmp, tmp2] = arg0;
if (null != tmp2.optionValue) {
obj[tmp] = tmp2.optionValue;
}
});
2026-07-24 07:16:23 +00:00
obj = { query: tmp78, autocompleteType: CHOICES, autocompleteSelectionStart: num2 + num3 };
2026-07-20 16:05:17 +00:00
obj1 = { activeCommand, optionValues: obj, isActiveApplicationCommand: flag, option: activeOption, choices, channelTypes };
const merged = Object.assign(applicationCommandOptionQueryOptions);
obj.queryOptions = obj1;
obj.showOptionValuesPicker = flag;
return obj;
}
}
2026-07-23 10:11:24 +00:00
prefix = "";
2026-07-21 22:01:30 +00:00
CHOICES = focused.CHOICES;
2026-07-20 16:05:17 +00:00
choices = activeOption.choices;
flag = true;
str = "";
}
}
}
2026-07-24 07:16:23 +00:00
if (c29) {
if (null != anchor) {
let obj2 = { query: text.slice(anchor + memo.length, selectionEnd).toLowerCase(), autocompleteType: focused.GAME_MENTIONS, autocompleteSelectionStart: anchor };
let obj3 = {};
const merged1 = Object.assign(applicationCommandOptionQueryOptions);
obj2.queryOptions = obj3;
return obj2;
}
}
2026-07-20 16:05:17 +00:00
let sum = null;
if (null != tmp7) {
const _location2 = tmp7.location;
let num5 = 0;
if (null != _location2) {
num5 = _location2;
}
let num6 = 0;
if (null != tmp7.length) {
num6 = length2;
}
sum = num5 + num6;
}
while (true) {
2026-07-24 07:16:23 +00:00
let tmp40 = analyticsLocations;
let tmp41 = canMentionEveryone;
obj2 = analyticsLocations(canMentionEveryone[33]);
let tmp42 = text;
let tmp44 = tmp;
let num8 = 0;
let result = obj2.isWhitespaceSeparatingBoundary(text, tmp);
if (tmp39) {
num8 = sum;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
if (tmp === num8) {
let tmp46 = text;
let tmp47 = selectionEnd;
2026-07-20 16:05:17 +00:00
let substr1 = text.slice(tmp, selectionEnd);
2026-07-24 07:16:23 +00:00
let tmp49 = analyticsLocations;
let tmp50 = canMentionEveryone;
obj3 = analyticsLocations(canMentionEveryone[33]);
prefix = obj3.getPrefix(substr1);
let obj4 = analyticsLocations(canMentionEveryone[33]);
query = obj4.getQuery(substr1);
2026-07-20 16:05:17 +00:00
if (null == query) {
let _Object = Object;
2026-07-24 07:16:23 +00:00
let tmp57 = memo;
2026-07-20 16:05:17 +00:00
let keys = Object.keys(memo);
let found = keys.find((arg0) => {
2026-07-23 10:11:24 +00:00
let tmp = arg0 !== focused.SLASHES;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = arg0 !== focused.SLASHES_DISCOVERY;
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
2026-07-23 10:11:24 +00:00
let tmp5 = null == outer1_9;
2026-07-20 16:05:17 +00:00
if (tmp5) {
2026-07-23 10:11:24 +00:00
tmp5 = !outer1_5;
2026-07-20 16:05:17 +00:00
}
tmp = tmp5;
}
if (tmp) {
let matchesResult = undefined !== prefix;
if (matchesResult) {
2026-07-23 10:11:24 +00:00
matchesResult = undefined !== query;
2026-07-20 16:05:17 +00:00
}
if (matchesResult) {
2026-07-23 10:11:24 +00:00
matchesResult = obj.matches(prefix, query, closure_2);
2026-07-20 16:05:17 +00:00
}
tmp = matchesResult;
}
return tmp;
});
2026-07-24 07:16:23 +00:00
let tmp58 = prefix;
2026-07-20 16:05:17 +00:00
tmp12 = query;
2026-07-24 07:16:23 +00:00
let tmp55 = query;
let tmp56 = tmp;
let tmp54 = found;
2026-07-20 16:05:17 +00:00
if (null != found) {
break;
}
} else {
2026-07-24 07:16:23 +00:00
let tmp53 = tmp4;
tmp54 = tmp11;
tmp55 = query;
tmp56 = tmp;
if (tmp4.test(query)) {
2026-07-20 16:05:17 +00:00
break;
}
}
2026-07-24 07:16:23 +00:00
let tmp61 = focused;
let tmp62 = tmp55;
if (tmp54 === focused.SLASHES) {
let tmp63 = analyticsLocations;
let tmp64 = canMentionEveryone;
let num10 = 34;
let obj5 = analyticsLocations(canMentionEveryone[34]);
2026-07-20 16:05:17 +00:00
let str4 = "";
2026-07-24 07:16:23 +00:00
if (null != tmp55) {
str4 = tmp55;
2026-07-20 16:05:17 +00:00
}
text = obj5.getTextBeforeFirstOption(str4).text;
2026-07-23 10:11:24 +00:00
query = text;
2026-07-24 07:16:23 +00:00
tmp62 = text;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
obj4 = { query: tmp62, autocompleteType: tmp54, autocompleteSelectionStart: tmp56 };
obj5 = {};
let tmp65 = obj5;
let tmp66 = applicationCommandOptionQueryOptions;
let merged2 = Object.assign(applicationCommandOptionQueryOptions);
obj4.queryOptions = obj5;
return obj4;
2026-07-20 16:05:17 +00:00
} else {
found = tmp11;
}
let diff = tmp - 1;
canMentionEveryone = diff;
2026-07-24 07:16:23 +00:00
let tmp60 = tmp12;
let num9 = 0;
if (tmp39) {
num9 = sum;
2026-07-20 16:05:17 +00:00
}
tmp11 = found;
tmp = diff;
2026-07-24 07:16:23 +00:00
tmp54 = found;
tmp55 = tmp12;
tmp56 = diff;
if (diff < num9) {
2026-07-20 16:05:17 +00:00
break;
}
}
}
}
2026-07-23 10:11:24 +00:00
return { query: null, autocompleteType: null, autocompleteSelectionStart: null };
2026-07-20 16:05:17 +00:00
}, items4);
2026-07-24 07:16:23 +00:00
autocompleteType = memo1.autocompleteType;
2026-07-23 10:11:24 +00:00
query = memo1.query;
2026-07-24 07:16:23 +00:00
queryOptions = memo1.queryOptions;
autocompleteSelectionStart = memo1.autocompleteSelectionStart;
showOptionValuesPicker = memo1.showOptionValuesPicker;
2026-07-20 16:05:17 +00:00
const items5 = [autocompleteType, query, queryOptions, memo];
2026-07-23 10:11:24 +00:00
callback = onChangeAutoCompleteVisibility.useCallback((arg0) => {
2026-07-20 16:05:17 +00:00
if (null != autocompleteType) {
if (null != query) {
2026-07-23 10:11:24 +00:00
let obj = memo[autocompleteType];
2026-07-20 16:05:17 +00:00
const queryResultsResult = obj.queryResults(query, queryOptions, arg0);
const items = [];
const items1 = [];
const item = queryResultsResult.forEach((type) => {
2026-07-23 10:11:24 +00:00
if (type.type === scaledTextLineHeight.STICKER) {
2026-07-20 16:05:17 +00:00
items.push(type);
} else {
items1.push(type);
}
});
obj = { resultCount: queryResultsResult.length, stickerResults: items, nonStickerResults: items1, hasStickerResults: items.length > 0, hasNonStickerResults: items1.length > 0 };
callback(obj);
}
}
2026-07-24 07:16:23 +00:00
callback(c29);
2026-07-20 16:05:17 +00:00
}, items5);
const items6 = [autocompleteType, callback, memo];
2026-07-23 10:11:24 +00:00
const effect1 = onChangeAutoCompleteVisibility.useEffect(() => {
2026-07-20 16:05:17 +00:00
let tmp = null;
if (null != autocompleteType) {
let stores;
if (null != memo) {
2026-07-23 10:11:24 +00:00
stores = memo[autocompleteType].stores;
2026-07-20 16:05:17 +00:00
}
tmp = stores;
}
if (null != tmp) {
const BatchedStoreListener = analyticsLocations(canMentionEveryone[21]).BatchedStoreListener;
const prototype = BatchedStoreListener.prototype;
2026-07-24 07:16:23 +00:00
const batchedStoreListener = new BatchedStoreListener(tmp, () => outer1_37(false));
2026-07-20 16:05:17 +00:00
batchedStoreListener.attach("AutocompleteWrapper");
return () => batchedStoreListener.detach();
}
}, items6);
const items7 = [callback];
2026-07-23 10:11:24 +00:00
const effect2 = onChangeAutoCompleteVisibility.useEffect(() => {
2026-07-20 16:05:17 +00:00
callback(true);
}, items7);
2026-07-23 10:11:24 +00:00
const items8 = [stickerResults, nonStickerResults];
2026-07-24 07:16:23 +00:00
callback1 = onChangeAutoCompleteVisibility.useCallback(() => ({ numStickerResults: stickerResults.length, numEmojiResults: nonStickerResults.filter((type) => type.type === scaledTextLineHeight.EMOJI).length }), items8);
2026-07-20 16:05:17 +00:00
const items9 = [autocompleteType, focused, keyboardType, resultCount];
2026-07-24 07:16:23 +00:00
memo2 = onChangeAutoCompleteVisibility.useMemo(() => {
let tmp = resultCount > 0;
2026-07-20 16:05:17 +00:00
if (!tmp) {
2026-07-24 07:16:23 +00:00
tmp = anchor(autocompleteType);
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
2026-07-24 07:16:23 +00:00
tmp = autocompleteType === focused.GAME_MENTIONS;
}
let tmp7 = focused;
if (focused) {
tmp7 = tmp;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
if (tmp7) {
tmp7 = tmp6;
}
return tmp7;
2026-07-20 16:05:17 +00:00
}, items9);
2026-07-24 07:16:23 +00:00
closure_40 = onChangeAutoCompleteVisibility.useRef(false);
2026-07-20 16:05:17 +00:00
const items10 = [autocompleteType, activeCommand];
2026-07-23 10:11:24 +00:00
const effect3 = onChangeAutoCompleteVisibility.useEffect(() => {
2026-07-24 07:16:23 +00:00
let tmp2 = anchor(autocompleteType);
2026-07-20 16:05:17 +00:00
if (ref.current) {
if (!tmp2) {
tmp2 = null != activeCommand;
}
tmp.current = tmp2;
} else {
let tmp3 = tmp2;
if (!tmp2) {
tmp3 = null != activeCommand;
}
tmp.current = tmp3;
if (ref.current) {
2026-07-24 07:16:23 +00:00
let obj = analyticsLocations(canMentionEveryone[36]);
2026-07-20 16:05:17 +00:00
obj = { location: "slash_ui" };
2026-07-24 07:16:23 +00:00
obj.trackWithMetadata(setting.APPLICATION_COMMAND_TOP_OF_FUNNEL, obj);
2026-07-20 16:05:17 +00:00
}
}
}, items10);
2026-07-24 07:16:23 +00:00
closure_41 = onChangeAutoCompleteVisibility.useRef(null);
const items11 = [onChangeAutoCompleteVisibility, activeCommand, memo2, autocompleteType, channel, callback1, gameMentionsAutocompleteConfig.enabled];
2026-07-23 10:11:24 +00:00
const effect4 = onChangeAutoCompleteVisibility.useEffect(() => {
2026-07-20 16:05:17 +00:00
let tmp = memo2;
if (!memo2) {
tmp = null != activeCommand;
}
if (null != onChangeAutoCompleteVisibility) {
onChangeAutoCompleteVisibility(tmp);
}
if (tmp) {
2026-07-24 07:16:23 +00:00
let str2 = "";
if (null != autocompleteType) {
str2 = autocompleteType;
}
const _HermesInternal = HermesInternal;
const combined = "" + channel.id + ":" + str2;
if (ref2.current !== combined) {
ref2.current = combined;
let enabled;
let obj = analyticsLocations(canMentionEveryone[37]);
obj = {};
const merged = Object.assign(callback1());
if (autocompleteType === focused.MENTIONS) {
enabled = gameMentionsAutocompleteConfig.enabled;
}
obj["gameMentionsAvailable"] = enabled;
const result = obj.iOSTrackAutocompleteOpen(autocompleteType, channel, obj);
const tmp16 = autocompleteType;
const tmp17 = channel;
}
} else {
ref2.current = null;
2026-07-20 16:05:17 +00:00
}
}, items11);
2026-07-23 10:11:24 +00:00
const insets = channel(canMentionEveryone[19])({ includeKeyboardHeight: true }).insets;
let diff = channel(canMentionEveryone[18])({ ignoreKeyboard: true }).height - insets.top - insets.bottom;
2026-07-24 07:16:23 +00:00
diff1 = diff - analyticsLocations(canMentionEveryone[20]).NAV_BAR_HEIGHT - tmp14[0];
const items12 = [autocompleteType, stickerResults.length, diff1, scaledTextLineHeight, tmp4];
memo3 = onChangeAutoCompleteVisibility.useMemo(() => {
2026-07-21 22:01:30 +00:00
const sum = scaledTextLineHeight + 24;
const sum1 = 200 + sum;
2026-07-20 16:05:17 +00:00
if (stickerResults.length > 0) {
2026-07-24 07:16:23 +00:00
let sum2 = sum1 + sum + analyticsLocations(canMentionEveryone[17]).AUTOCOMPLETE_STICKER_NODE_SIZE + 12 + closure_27;
} else {
sum2 = sum1;
if (autocompleteType !== focused.EMOJIS_AND_STICKERS) {
let num = 200;
if (autocompleteType === focused.GAME_MENTIONS) {
num = 200 + closure_12;
}
sum2 = num;
}
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
return Math.min(diff1, sum2);
2026-07-20 16:05:17 +00:00
}, items12);
2026-07-24 07:16:23 +00:00
const tmp32 = keyboardType(onChangeAutoCompleteVisibility.useState(null), 2);
first2 = tmp32[0];
c45 = tmp34;
const items13 = [resultCount, autocompleteType, memo2, hasStickerResults, hasNonStickerResults, nonStickerResults.length, memo3, first2, context, token, scaledTextLineHeight, tmp4];
2026-07-23 10:11:24 +00:00
const memo4 = onChangeAutoCompleteVisibility.useMemo(() => {
2026-07-21 22:01:30 +00:00
if (autocompleteType === focused.EMOJIS_AND_STICKERS) {
2026-07-24 07:16:23 +00:00
const tmp18 = beginSearch(nonStickerResults.length, autocompleteType, context, token);
let sum = tmp18;
2026-07-20 16:05:17 +00:00
if (hasNonStickerResults) {
2026-07-24 07:16:23 +00:00
sum = tmp18 + (scaledTextLineHeight + 24);
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
let sum2 = sum;
2026-07-20 16:05:17 +00:00
if (hasStickerResults) {
2026-07-21 22:01:30 +00:00
const sum1 = scaledTextLineHeight + 24;
sum2 = sum + (sum1 + analyticsLocations(canMentionEveryone[17]).AUTOCOMPLETE_STICKER_NODE_SIZE + 12);
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
let tmp28 = hasStickerResults;
2026-07-20 16:05:17 +00:00
if (hasStickerResults) {
2026-07-24 07:16:23 +00:00
tmp28 = hasNonStickerResults;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
let sum3 = sum2;
2026-07-24 07:16:23 +00:00
if (tmp28) {
sum3 = sum2 + closure_27;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
let num = sum3;
2026-07-24 07:16:23 +00:00
} else if (anchor(autocompleteType)) {
2026-07-20 16:05:17 +00:00
let num2 = 0;
if (null != first2) {
num2 = first2;
}
num = num2;
} else {
num = 0;
if (null != autocompleteType) {
2026-07-24 07:16:23 +00:00
const tmp8 = beginSearch(resultCount, autocompleteType, context, token);
num = tmp8;
if (autocompleteType === focused.GAME_MENTIONS) {
num = tmp8 + closure_12;
}
2026-07-20 16:05:17 +00:00
}
}
let num7 = 0;
if (memo2) {
num7 = num;
}
return Math.min(num7, memo3);
}, items13);
2026-07-24 07:16:23 +00:00
let obj6 = analyticsLocations(canMentionEveryone[38]);
chatInputFloating = obj6.useMobileVisualRefreshConfig({ location: "AutocompleteWrapper" }).chatInputFloating;
c47 = tmp36;
2026-07-23 10:11:24 +00:00
let obj7 = analyticsLocations(canMentionEveryone[22]);
2026-07-24 07:16:23 +00:00
const token1 = obj7.useToken(channel(canMentionEveryone[16]).modules.mobile.CHAT_INPUT_FLOATING_BORDER_RADIUS);
2026-07-23 10:11:24 +00:00
let obj8 = analyticsLocations(canMentionEveryone[22]);
2026-07-24 07:16:23 +00:00
const token2 = obj8.useToken(channel(canMentionEveryone[16]).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH);
2026-07-23 10:11:24 +00:00
let obj9 = analyticsLocations(canMentionEveryone[22]);
2026-07-24 07:16:23 +00:00
const token3 = obj9.useToken(channel(canMentionEveryone[16]).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_TOP_BORDER_WIDTH);
2026-07-23 10:11:24 +00:00
let obj10 = analyticsLocations(canMentionEveryone[22]);
2026-07-24 07:16:23 +00:00
const token4 = obj10.useToken(channel(canMentionEveryone[16]).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_MARGIN_HORIZONTAL);
let obj11 = analyticsLocations(canMentionEveryone[22]);
token5 = obj11.useToken(channel(canMentionEveryone[16]).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_MARGIN_BOTTOM);
2026-07-20 16:05:17 +00:00
let num = 0;
2026-07-23 10:11:24 +00:00
if (memo4 > 0) {
2026-07-20 16:05:17 +00:00
num = token2;
}
let num2 = 0;
2026-07-23 10:11:24 +00:00
if (memo4 > 0) {
2026-07-20 16:05:17 +00:00
num2 = token3;
}
2026-07-23 10:11:24 +00:00
if (memo4 > 0) {
2026-07-20 16:05:17 +00:00
let num3 = token5;
} else {
num3 = 0;
if (null != activeCommand) {
num3 = 0;
}
}
2026-07-24 07:16:23 +00:00
const tmp42Result = gameMentionsAutocompleteConfig(token1, num, num2, token4, num3);
c49 = tmp42Result;
let obj12 = analyticsLocations(canMentionEveryone[39]);
isScreenReaderEnabled = obj12.useIsScreenReaderEnabled();
let obj13 = analyticsLocations(canMentionEveryone[15]);
let isAndroidResult = obj13.isAndroid();
2026-07-20 16:05:17 +00:00
if (!isAndroidResult) {
2026-07-24 07:16:23 +00:00
let obj14 = analyticsLocations(canMentionEveryone[15]);
let isIOSResult = obj14.isIOS();
2026-07-20 16:05:17 +00:00
if (isIOSResult) {
2026-07-24 07:16:23 +00:00
let tmp49 = isScreenReaderEnabled;
2026-07-20 16:05:17 +00:00
if (!isScreenReaderEnabled) {
2026-07-24 07:16:23 +00:00
tmp49 = chatInputFloating;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
isIOSResult = tmp49;
2026-07-20 16:05:17 +00:00
}
isAndroidResult = isIOSResult;
}
2026-07-24 07:16:23 +00:00
const items14 = [isScreenReaderEnabled, chatInputFloating, tmp42Result.autocompletePositionRelative];
2026-07-23 10:11:24 +00:00
const items15 = [memo4 > 0, token5];
const memo5 = onChangeAutoCompleteVisibility.useMemo(() => {
2026-07-20 16:05:17 +00:00
let prop = null;
if (obj.isIOS()) {
if (isScreenReaderEnabled) {
2026-07-24 07:16:23 +00:00
prop = _undefined2.autocompletePositionRelative;
2026-07-20 16:05:17 +00:00
} else {
prop = null;
}
}
return prop;
}, items14);
2026-07-23 10:11:24 +00:00
const memo6 = onChangeAutoCompleteVisibility.useMemo(() => {
2026-07-20 16:05:17 +00:00
let tmp;
2026-07-24 07:16:23 +00:00
if (c47) {
2026-07-20 16:05:17 +00:00
const obj = { marginTop: token5 };
tmp = obj;
}
return tmp;
}, items15);
2026-07-24 07:16:23 +00:00
const items16 = [analyticsLocations, beginSearch, channel, chatInputRef];
let tmp28 = channel(canMentionEveryone[18])({ ignoreKeyboard: true });
let tmp42 = gameMentionsAutocompleteConfig;
2026-07-23 10:11:24 +00:00
callback2 = onChangeAutoCompleteVisibility.useCallback((type) => {
2026-07-21 22:01:30 +00:00
if (type.type !== scaledTextLineHeight.EMOJI_PREMIUM_UPSELL) {
2026-07-24 07:16:23 +00:00
if (type.type === scaledTextLineHeight.GLOBAL) {
if ("gameMentionInput" === type.inlineAutocompleteType) {
2026-07-28 08:39:19 +00:00
const current4 = chatInputRef.current;
current4.insertText(memo, arg1, false);
2026-07-24 07:16:23 +00:00
beginSearch(arg1);
}
}
const autocompleteResultText = analyticsLocations(canMentionEveryone[33]).getAutocompleteResultText(type, channel);
2026-07-28 08:39:19 +00:00
const current = chatInputRef.current;
const applicationCommandManager = current.getApplicationCommandManager();
2026-07-24 07:16:23 +00:00
if (type.type === scaledTextLineHeight.GAME_MENTION) {
if (null != applicationCommandManager) {
applicationCommandManager.addGameMention(type.game);
}
2026-07-28 08:39:19 +00:00
let gameMentionNode;
if (null != applicationCommandManager) {
gameMentionNode = applicationCommandManager.buildGameMentionNode(type.game);
}
let tmp17;
if (null != gameMentionNode) {
const items = [gameMentionNode];
tmp17 = items;
}
2026-07-24 07:16:23 +00:00
}
2026-07-20 16:05:17 +00:00
let result;
2026-07-28 08:39:19 +00:00
if (null != applicationCommandManager) {
result = applicationCommandManager.setAutoCompleteResult(channel.id, autocompleteResultText, arg2, type);
2026-07-20 16:05:17 +00:00
}
if (!result) {
2026-07-28 08:39:19 +00:00
const current2 = chatInputRef.current;
current2.insertText(autocompleteResultText, arg1, type.type !== scaledTextLineHeight.STICKER, tmp13);
2026-07-21 22:01:30 +00:00
if (type.type === scaledTextLineHeight.STICKER) {
2026-07-28 08:39:19 +00:00
const current3 = chatInputRef.current;
current3.handleSelectSticker(type.sticker, arg1);
2026-07-20 16:05:17 +00:00
}
}
2026-07-24 07:16:23 +00:00
const obj3 = analyticsLocations(canMentionEveryone[33]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-24 07:16:23 +00:00
let obj = channel(canMentionEveryone[41]);
obj = { initialUpsellKey: resultCount.EMOJI_AUTOCOMPLETE, analyticsLocations };
2026-07-20 16:05:17 +00:00
const result1 = obj.handleShowUpsellAlert(obj);
}
}, items16);
const items17 = [chatInputRef, optionStates, channel];
const items18 = [autocompleteSelectionStart, autocompleteType, callback1, channel, callback2, showOptionValuesPicker];
2026-07-23 10:11:24 +00:00
const callback3 = onChangeAutoCompleteVisibility.useCallback((type) => {
2026-07-20 16:05:17 +00:00
const current = chatInputRef.current;
const applicationCommandManager = current.getApplicationCommandManager();
2026-07-24 07:16:23 +00:00
if (type.type === analyticsLocations(canMentionEveryone[32]).ApplicationCommandOptionType.ATTACHMENT) {
2026-07-20 16:05:17 +00:00
if (null != optionStates[type.name].lastValidationResult) {
if (lastValidationResult.success) {
2026-07-24 07:16:23 +00:00
const result = analyticsLocations(canMentionEveryone[42]).openCommandAttachmentPreview(applicationCommandManager, tmp5, type.name);
const obj2 = analyticsLocations(canMentionEveryone[42]);
2026-07-20 16:05:17 +00:00
}
}
if (null != applicationCommandManager) {
const result1 = applicationCommandManager.insertOrJumpCommandOption(type);
}
} else {
if (null != applicationCommandManager) {
const length = applicationCommandManager.props.text.length;
}
if (null != applicationCommandManager) {
const result2 = applicationCommandManager.insertOrJumpCommandOption(type, length);
}
}
}, items17);
2026-07-24 07:16:23 +00:00
callback4 = onChangeAutoCompleteVisibility.useCallback((type) => {
if (type.type === scaledTextLineHeight.GLOBAL) {
if ("gameMentionInput" === type.inlineAutocompleteType) {
type = scaledTextLineHeight.GAME_MENTION;
}
let obj = analyticsLocations(canMentionEveryone[37]);
obj = { selectionType: type };
let id = null;
if (type.type === scaledTextLineHeight.STICKER) {
id = type.sticker.id;
}
obj.stickerId = id;
let id1 = null;
if (type.type === scaledTextLineHeight.GAME_MENTION) {
id1 = type.game.id;
}
obj.gameId = id1;
const merged = Object.assign(callback1());
const result = obj.iOSTrackAutocompleteSelect(autocompleteType, channel, obj);
let num2 = 0;
if (null != autocompleteSelectionStart) {
num2 = autocompleteSelectionStart;
}
callback2(type, num2, showOptionValuesPicker);
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
type = type.type;
2026-07-20 16:05:17 +00:00
}, items18);
2026-07-24 07:16:23 +00:00
let tmp56 = keyboardType(onChangeAutoCompleteVisibility.useState(null), 2);
first3 = tmp56[0];
closure_54 = tmp56[1];
const items19 = [autocompleteType, callback4, first3, channel, activeCommand, gameMentionsAutocompleteConfig.showNewTag, tmp42Result];
2026-07-23 10:11:24 +00:00
const callback5 = onChangeAutoCompleteVisibility.useCallback((item) => {
2026-07-20 16:05:17 +00:00
item = item.item;
const type = item.type;
2026-07-21 22:01:30 +00:00
if (scaledTextLineHeight.USER === type) {
2026-07-20 16:05:17 +00:00
let obj = {};
const merged = Object.assign(item);
obj["guildId"] = channel.guild_id;
obj["onPress"] = function onPress() {
2026-07-24 07:16:23 +00:00
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-21 22:01:30 +00:00
return selectionStart(channel(canMentionEveryone[17]).User, obj);
} else if (scaledTextLineHeight.GLOBAL === type) {
2026-07-20 16:05:17 +00:00
obj = {};
const merged1 = Object.assign(item);
obj["onPress"] = function onPress() {
2026-07-24 07:16:23 +00:00
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
let tmp68;
if ("gameMentionInput" === item.inlineAutocompleteType) {
if (gameMentionsAutocompleteConfig.showNewTag) {
const obj1 = { containerStyle: _undefined2.newTag, variant: "text-xs/bold", color: "badge-text-brand" };
tmp68 = selectionStart(analyticsLocations(canMentionEveryone[43]).NewTag, obj1);
}
}
obj["badge"] = tmp68;
2026-07-21 22:01:30 +00:00
return selectionStart(channel(canMentionEveryone[17]).Global, obj);
} else if (scaledTextLineHeight.ROLE === type) {
2026-07-24 07:16:23 +00:00
const obj2 = {};
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(item);
2026-07-24 07:16:23 +00:00
obj2["onPress"] = function onPress() {
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
let tmp59 = autocompleteType === focused.MENTIONS;
if (tmp59) {
tmp59 = null == activeCommand;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
obj2["showDescription"] = tmp59;
return selectionStart(channel(canMentionEveryone[17]).Role, obj2);
2026-07-21 22:01:30 +00:00
} else if (scaledTextLineHeight.CHANNEL === type) {
2026-07-24 07:16:23 +00:00
const obj3 = {};
2026-07-20 16:05:17 +00:00
const merged3 = Object.assign(item);
2026-07-24 07:16:23 +00:00
obj3["onPress"] = function onPress() {
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
return selectionStart(channel(canMentionEveryone[17]).Channel, obj3);
2026-07-21 22:01:30 +00:00
} else if (scaledTextLineHeight.EMOJI === type) {
2026-07-24 07:16:23 +00:00
const obj4 = {};
2026-07-20 16:05:17 +00:00
const merged4 = Object.assign(item);
2026-07-24 07:16:23 +00:00
obj4["onPress"] = function onPress() {
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
return selectionStart(channel(canMentionEveryone[17]).Emoji, obj4);
2026-07-21 22:01:30 +00:00
} else if (scaledTextLineHeight.EMOJI_PREMIUM_UPSELL === type) {
2026-07-24 07:16:23 +00:00
const obj5 = {};
2026-07-20 16:05:17 +00:00
const merged5 = Object.assign(item);
2026-07-24 07:16:23 +00:00
obj5["onPress"] = function onPress() {
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
return selectionStart(channel(canMentionEveryone[17]).EmojiPremiumUpsell, obj5);
2026-07-21 22:01:30 +00:00
} else if (scaledTextLineHeight.CHOICE === type) {
2026-07-24 07:16:23 +00:00
const obj6 = {};
2026-07-20 16:05:17 +00:00
const merged6 = Object.assign(item);
2026-07-24 07:16:23 +00:00
obj6["onPress"] = function onPress() {
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
return selectionStart(channel(canMentionEveryone[17]).Choice, obj6);
2026-07-21 22:01:30 +00:00
} else if (scaledTextLineHeight.CHOICE_LOADING === type) {
return selectionStart(channel(canMentionEveryone[17]).ChoiceLoading, {});
} else if (scaledTextLineHeight.STICKER === type) {
2026-07-24 07:16:23 +00:00
const obj7 = {};
2026-07-20 16:05:17 +00:00
const merged7 = Object.assign(item);
2026-07-24 07:16:23 +00:00
obj7["onPress"] = function onPress() {
return outer1_52(item);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
obj7["onLongPress"] = function onLongPress() {
return outer1_54(item.sticker.id);
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
obj7["isInteracting"] = first3 === item.sticker.id;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-24 07:16:23 +00:00
return selectionStart(channel(canMentionEveryone[17]).Sticker, obj7, "" + item.sticker.id + "-" + first3 === item.sticker.id);
} else if (scaledTextLineHeight.GAME_MENTION === type) {
const obj8 = {};
const merged8 = Object.assign(item);
obj8["onPress"] = function onPress() {
return outer1_52(item);
};
return selectionStart(channel(canMentionEveryone[17]).Game, obj8);
2026-07-21 22:01:30 +00:00
} else if (scaledTextLineHeight.LABEL === type) {
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-24 07:16:23 +00:00
const merged9 = Object.assign(item);
2026-07-21 22:01:30 +00:00
return selectionStart(channel(canMentionEveryone[17]).Label, obj);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}, items19);
2026-07-24 07:16:23 +00:00
const items20 = [tmp42Result.autocomplete, { maxHeight: memo3 }];
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-24 07:16:23 +00:00
const items21 = [tmp42Result.autocompleteWrapper, , ];
2026-07-20 16:05:17 +00:00
let autocompleteWrapperAbsolute = !isAndroidResult;
if (autocompleteWrapperAbsolute) {
2026-07-24 07:16:23 +00:00
autocompleteWrapperAbsolute = tmp42Result.autocompleteWrapperAbsolute;
2026-07-20 16:05:17 +00:00
}
items21[1] = autocompleteWrapperAbsolute;
items21[2] = memo5;
obj.style = items21;
obj = { style: items22 };
2026-07-24 07:16:23 +00:00
items22 = [tmp42Result.autocompleteContainer, channel(canMentionEveryone[40])(memo4, screenIndex)];
let tmp63Result = null != autocompleteType;
if (tmp63Result) {
2026-07-20 16:05:17 +00:00
obj1 = {};
2026-07-24 07:16:23 +00:00
let tmp66 = autocompleteType === focused.SLASHES_DISCOVERY;
if (tmp66) {
2026-07-20 16:05:17 +00:00
obj2 = {
channel,
onPressSlashItem(command, section, visualSection) {
let num = 0;
if (null != autocompleteSelectionStart) {
num = autocompleteSelectionStart;
}
2026-07-24 07:16:23 +00:00
callback2({ command, section, type: scaledTextLineHeight.SLASH, visualSection, location: analyticsLocations(canMentionEveryone[46]).ApplicationCommandTriggerLocations.DISCOVERY }, num);
2026-07-20 16:05:17 +00:00
},
2026-07-24 07:16:23 +00:00
onHeightChange: tmp34,
2026-07-20 16:05:17 +00:00
canOnlyUseTextCommands
};
2026-07-24 07:16:23 +00:00
tmp66 = selectionStart(channel(canMentionEveryone[45]), obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
const items23 = [tmp66, , , , ];
let tmp72Result = autocompleteType === focused.SLASHES;
if (tmp72Result) {
2026-07-20 16:05:17 +00:00
obj3 = { channel };
let str = "";
if (null != query) {
str = query;
}
obj3.query = str;
obj3.onPressCommandItem = function onPressCommandItem(command) {
let num = 0;
if (null != autocompleteSelectionStart) {
num = autocompleteSelectionStart;
}
2026-07-24 07:16:23 +00:00
callback2({ command, section: arg1, type: scaledTextLineHeight.SLASH, location: analyticsLocations(canMentionEveryone[46]).ApplicationCommandTriggerLocations.DISCOVERY, query }, num);
2026-07-20 16:05:17 +00:00
};
obj3.style = items20;
2026-07-24 07:16:23 +00:00
obj3.ItemSeparatorComponent = analyticsLocations(canMentionEveryone[33]).getItemSeparator;
obj3.getItemLayout = analyticsLocations(canMentionEveryone[33]).getItemLayout;
2026-07-20 16:05:17 +00:00
obj3.onCommandsChange = function onCommandsChange(arg0) {
2026-07-24 07:16:23 +00:00
_undefined(beginSearch(arg0, autocompleteType, context, token));
2026-07-20 16:05:17 +00:00
};
2026-07-24 07:16:23 +00:00
tmp72Result = selectionStart(channel(canMentionEveryone[47]), obj3);
const tmp72 = selectionStart;
const tmp75 = channel(canMentionEveryone[47]);
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
items23[1] = tmp72Result;
let tmp80Result = autocompleteType === focused.EMOJIS_AND_STICKERS;
if (tmp80Result) {
2026-07-20 16:05:17 +00:00
obj4 = {};
2026-07-24 07:16:23 +00:00
let tmp82 = hasStickerResults;
2026-07-20 16:05:17 +00:00
if (hasStickerResults) {
obj5 = {};
2026-07-21 22:01:30 +00:00
obj6 = {};
2026-07-24 07:16:23 +00:00
const items24 = [tmp42Result.sectionTitle, ];
2026-07-21 22:01:30 +00:00
obj7 = { height: scaledTextLineHeight };
items24[1] = obj7;
obj6.style = items24;
obj8 = { variant: "text-sm/semibold" };
2026-07-24 07:16:23 +00:00
const intl = analyticsLocations(canMentionEveryone[49]).intl;
2026-07-21 22:01:30 +00:00
obj9 = { prefix: query };
2026-07-24 07:16:23 +00:00
obj8.children = intl.format(analyticsLocations(canMentionEveryone[49]).t.uferGG, obj9);
obj6.children = selectionStart(analyticsLocations(canMentionEveryone[48]).Text, obj8);
2026-07-21 22:01:30 +00:00
const items25 = [selectionStart(commandsDisabled, obj6), ];
obj10 = { horizontal: true };
obj11 = {};
2026-07-23 10:11:24 +00:00
let merged = Object.assign(items20);
2026-07-24 07:16:23 +00:00
let merged1 = Object.assign(tmp42Result.stickersAutocompleteList);
2026-07-21 22:01:30 +00:00
obj10.style = obj11;
obj10.keyExtractor = function keyExtractor(sticker) {
2026-07-20 16:05:17 +00:00
return sticker.sticker.id;
};
2026-07-21 22:01:30 +00:00
obj10.data = stickerResults;
obj10.renderItem = callback5;
obj10.showsHorizontalScrollIndicator = false;
2026-07-24 07:16:23 +00:00
obj10.getItemLayout = autocompleteType;
2026-07-21 22:01:30 +00:00
obj12 = { right: 12 };
obj10.contentInset = obj12;
items25[1] = selectionStart(chatInputRef, obj10);
obj5.children = items25;
2026-07-24 07:16:23 +00:00
tmp82 = callback(selectionEnd, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
const items26 = [tmp82, , ];
2026-07-20 16:05:17 +00:00
if (hasStickerResults) {
hasStickerResults = hasNonStickerResults;
}
if (hasStickerResults) {
2026-07-24 07:16:23 +00:00
obj13 = { style: tmp42Result.sectionDivider };
hasStickerResults = selectionStart(channel(canMentionEveryone[50]), obj13);
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
items26[1] = hasStickerResults;
2026-07-20 16:05:17 +00:00
if (hasNonStickerResults) {
2026-07-24 07:16:23 +00:00
stateFromStoresObject = commandsDisabled;
obj14 = {};
const items27 = [tmp42Result.sectionTitle, ];
2026-07-21 22:01:30 +00:00
const obj15 = { height: scaledTextLineHeight };
items27[1] = obj15;
obj14.style = items27;
2026-07-24 07:16:23 +00:00
stateFromStoresObject = analyticsLocations;
stateFromStoresObject = canMentionEveryone;
2026-07-21 22:01:30 +00:00
const obj16 = { variant: "text-sm/semibold" };
2026-07-24 07:16:23 +00:00
const intl2 = analyticsLocations(canMentionEveryone[49]).intl;
2026-07-21 22:01:30 +00:00
const obj17 = {};
2026-07-24 07:16:23 +00:00
stateFromStoresObject = context;
2026-07-21 22:01:30 +00:00
stateFromStoresObject = globalThis;
2026-07-23 10:11:24 +00:00
let _HermesInternal = HermesInternal;
2026-07-24 07:16:23 +00:00
obj17.prefix = "" + context + query;
obj16.children = intl2.format(analyticsLocations(canMentionEveryone[49]).t.ksAVYt, obj17);
obj14.children = selectionStart(analyticsLocations(canMentionEveryone[48]).Text, obj16);
2026-07-21 22:01:30 +00:00
hasNonStickerResults = selectionStart(commandsDisabled, obj14);
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
items26[2] = hasNonStickerResults;
obj4.children = items26;
2026-07-24 07:16:23 +00:00
tmp80Result = callback(selectionEnd, obj4);
const tmp80 = callback;
const tmp81 = selectionEnd;
}
items23[2] = tmp80Result;
stateFromStoresObject = focused;
stateFromStoresObject = autocompleteType === focused.GAME_MENTIONS;
if (stateFromStoresObject) {
stateFromStoresObject = selectionStart;
stateFromStoresObject = channel;
stateFromStoresObject = canMentionEveryone;
stateFromStoresObject = selectionStart(channel(canMentionEveryone[51]), {});
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
items23[3] = stateFromStoresObject;
2026-07-21 22:01:30 +00:00
stateFromStoresObject = selectionStart;
2026-07-20 16:05:17 +00:00
stateFromStoresObject = chatInputRef;
2026-07-21 22:01:30 +00:00
const obj18 = {
2026-07-20 16:05:17 +00:00
style: items20,
keyExtractor(arg0, arg1) {
return String(arg1);
},
data: nonStickerResults,
renderItem: callback5
};
2026-07-23 10:11:24 +00:00
stateFromStoresObject = analyticsLocations;
stateFromStoresObject = canMentionEveryone;
2026-07-24 07:16:23 +00:00
obj18.ItemSeparatorComponent = analyticsLocations(canMentionEveryone[33]).getItemSeparator;
obj18.getItemLayout = analyticsLocations(canMentionEveryone[33]).getItemLayout;
items23[4] = selectionStart(chatInputRef, obj18);
2026-07-20 16:05:17 +00:00
obj1.children = items23;
2026-07-24 07:16:23 +00:00
tmp63Result = callback(selectionEnd, obj1);
let tmp63 = callback;
let tmp64 = selectionEnd;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
obj.children = tmp63Result;
const items28 = [selectionStart(channel(canMentionEveryone[44]).View, obj), ];
2026-07-20 16:05:17 +00:00
stateFromStoresObject = null != activeCommand && !commandsDisabled;
if (stateFromStoresObject) {
2026-07-21 22:01:30 +00:00
stateFromStoresObject = selectionStart;
2026-07-20 16:05:17 +00:00
stateFromStoresObject = commandsDisabled;
2026-07-21 22:01:30 +00:00
const obj19 = { style: memo6 };
2026-07-23 10:11:24 +00:00
stateFromStoresObject = channel;
stateFromStoresObject = canMentionEveryone;
2026-07-21 22:01:30 +00:00
const obj20 = { command: activeCommand, section: stateFromStoresObject.activeSection, guildId: channel.guild_id, onPressOption: callback3, currentOption: activeOption, optionStates };
2026-07-24 07:16:23 +00:00
obj19.children = selectionStart(channel(canMentionEveryone[52]), obj20);
2026-07-21 22:01:30 +00:00
stateFromStoresObject = selectionStart(commandsDisabled, obj19);
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
items28[1] = stateFromStoresObject;
obj.children = items28;
2026-07-24 07:16:23 +00:00
const tmp52 = channel(canMentionEveryone[40])(memo4, screenIndex);
let tmp59 = callback;
let tmp60 = commandsDisabled;
let tmp61 = selectionStart;
return selectionStart(commandsDisabled, { style: tmp42Result.autocompletePositionRelative, children: callback(commandsDisabled, obj) });
2026-07-20 16:05:17 +00:00
});
forwardRefResult.displayName = "AutocompleteWrapper";
2026-07-21 22:01:30 +00:00
const memoResult = importAllResult.memo(forwardRefResult);
2026-07-23 10:11:24 +00:00
let result = require("get ActivityIndicator").fileFinishedImporting("modules/autocompleter/native/AutocompleteWrapper.tsx");
2026-07-20 16:05:17 +00:00
2026-07-21 22:01:30 +00:00
export default memoResult;