2026-07-25 08:10:48 +00:00
// Module ID: 9272
2026-07-27 11:26:19 +00:00
// Function ID: 72608
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 4992, 1838, 4971, 1850, 4996, 653, 1853, 1314, 1852, 491, 9273, 4325, 9274, 9276, 9277, 566, 1873, 9278, 1212, 3776, 3772, 675, 22, 664, 1331, 2]
2026-07-20 16:05:17 +00:00
// Exports: getAriaIdForEmojiCategory, getEmojiSubCategory, getSearchPlaceholder, getStringForEmojiCategory, getUnicodeEmojiCategories, initializeSearch, trackEmojiFavorited, trackEmojiFocus, trackEmojiSearchEmpty, trackEmojiSearchResultsViewed, trackEmojiSearchSelect, trackEmojiSearchStart, trackEmojiSelect, trackPremiumSettingsPaneOpened, useEmojiCategories, useEmojiInPriorityOrder, useEmojiSearchResults, useIsFavoriteEmoji
2026-07-25 08:10:48 +00:00
// Module 9272 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import result from "result" ;
2026-07-20 16:05:17 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
2026-07-23 10:11:24 +00:00
import closure_6 from "_isNativeReflectConstruct" ;
import closure_7 from "_isNativeReflectConstruct" ;
import EmojiCategoryTypes from "EmojiCategoryTypes" ;
import ME from "ME" ;
import set from "set" ;
import { ExpressionPickerViewType } from "ExpressionPickerViewType" ;
import { PremiumUpsellTypes } from "GuildFeatures" ;
import apply from "expandLocation" ;
import set from "_createForOfIteratorHelperLoose" ;
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
let closure_10 ;
let closure_11 ;
let closure_12 ;
let closure_13 ;
let closure_14 ;
let closure_15 ;
let closure_16 ;
let closure_17 ;
let closure_18 ;
let closure_8 ;
let closure_9 ;
const require = arg1 ;
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
function searchTypeForIntention ( intention ) {
if ( constants8 . REACTION === intention ) {
return constants7 . EMOJI_REACTION ;
} else if ( constants8 . AUTO_SUGGESTION === intention ) {
return constants7 . EMOJI_AUTO_SUGGESTION ;
} else {
return constants7 . EMOJI ;
}
}
function loadIdPayload ( loadId ) {
if ( null != loadId ) {
if ( "" !== loadId ) {
const obj = { load_id : loadId } ;
}
return { } ;
}
}
function useFrequentlyUsedEmojis ( guildId ) {
2026-07-23 10:11:24 +00:00
const _require = guildId ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) = > {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = guildId ( outer1_2 [ 25 ] ) . FrecencyUserSettingsActionCreators ;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators . loadIfNecessary ( ) ;
} , [ ] ) ;
const items = [ _isNativeReflectConstruct ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStoresArray ( items , ( ) = > {
const disambiguatedEmojiContext = outer1_4 . getDisambiguatedEmojiContext ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
return disambiguatedEmojiContext . getFrequentlyUsedEmojisWithoutFetchingLatest ( ) ;
} ) ;
}
function useFrequentlyUsedReactionEmojis ( guildId ) {
2026-07-23 10:11:24 +00:00
const _require = guildId ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) = > {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = guildId ( outer1_2 [ 25 ] ) . FrecencyUserSettingsActionCreators ;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators . loadIfNecessary ( ) ;
} , [ ] ) ;
const items = [ _isNativeReflectConstruct ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStoresArray ( items , ( ) = > {
const disambiguatedEmojiContext = outer1_4 . getDisambiguatedEmojiContext ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
return disambiguatedEmojiContext . getFrequentlyUsedReactionEmojisWithoutFetchingLatest ( ) ;
} ) ;
}
function useFavoriteEmojis ( guildId ) {
2026-07-23 10:11:24 +00:00
const _require = guildId ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) = > {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = guildId ( outer1_2 [ 25 ] ) . FrecencyUserSettingsActionCreators ;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators . loadIfNecessary ( ) ;
} , [ ] ) ;
const items = [ _isNativeReflectConstruct ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStoresArray ( items , ( ) = > outer1_4 . getDisambiguatedEmojiContext ( closure_0 ) . favoriteEmojisWithoutFetchingLatest ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
( { EmojiCategories : closure_8 , EmojiCategoryTypes : closure_9 , EmojiSubCategory : closure_10 } = EmojiCategoryTypes ) ;
( { AnalyticEvents : closure_11 , AnalyticsPages : closure_12 , AnalyticsSections : closure_13 , AutoCompleteResultTypes : closure_14 , SearchTypes : closure_15 } = ME ) ;
( { isExternalEmojiAllowedForIntention : closure_16 , EmojiDisabledReasons : closure_17 , EmojiIntention : closure_18 } = set ) ;
const re21 = /-/g ;
let result = set . fileFinishedImporting ( "modules/emoji_picker/EmojiPickerUtils.tsx" ) ;
2026-07-20 16:05:17 +00:00
export const initializeSearch = function initializeSearch ( arg0 ) {
let _location ;
let intention ;
( { intention , location : _location } = arg0 ) ;
2026-07-23 10:11:24 +00:00
let obj = require ( 491 ) /* v1 */ ;
2026-07-20 16:05:17 +00:00
const replaced = obj . v4 ( ) . replace ( closure_21 , "" ) ;
2026-07-25 08:10:48 +00:00
const EmojiPickerStore = require ( 9273 ) /* createStore */ . EmojiPickerStore ;
2026-07-20 16:05:17 +00:00
EmojiPickerStore . setAnalyticsId ( replaced ) ;
const str = obj . v4 ( ) ;
obj = { search_type : searchTypeForIntention ( intention ) , load_id : replaced , location : _location } ;
2026-07-25 08:10:48 +00:00
importDefault ( 4325 ) . trackWithMetadata ( constants4 . SEARCH_OPENED , obj ) ;
2026-07-20 16:05:17 +00:00
} ;
export const useEmojiCategories = function useEmojiCategories ( CHAT , channel , guildId ) {
let newlyAddedEmojis ;
let topEmojis ;
let tmp = guildId ;
let flag = arg3 ;
2026-07-23 10:11:24 +00:00
const _require = CHAT ;
2026-07-20 16:05:17 +00:00
const importDefault = channel ;
if ( guildId === undefined ) {
guildId = undefined ;
if ( null != channel ) {
guildId = channel . getGuildId ( ) ;
}
tmp = guildId ;
}
const dependencyMap = tmp ;
if ( flag === undefined ) {
flag = false ;
}
2026-07-23 10:11:24 +00:00
let c4 ;
let c5 ;
let c6 ;
let c7 ;
2026-07-20 16:05:17 +00:00
let allEmojis ;
let stateFromStores ;
let stateFromStores1 ;
2026-07-23 10:11:24 +00:00
let c11 ;
2026-07-20 16:05:17 +00:00
let soundmojiEmojiPickerSectionExperiment ;
2026-07-25 08:10:48 +00:00
const result = _require ( 9274 ) . maybeFetchTopEmojisByGuild ( tmp ) ;
2026-07-23 10:11:24 +00:00
let tmp5 = callback ( CHAT ) ;
c4 = tmp5 ;
let tmp6 = useFrequentlyUsedEmojis ( tmp ) ;
c5 = tmp6 ;
let tmp7 = useFrequentlyUsedReactionEmojis ( tmp ) ;
c6 = tmp7 ;
let tmp8 = useFavoriteEmojis ( tmp ) ;
c7 = tmp8 ;
2026-07-25 08:10:48 +00:00
let obj = _require ( 9274 ) ;
( { topEmojis , newlyAddedEmojis } = importDefault ( 9276 ) ( tmp , CHAT ) ) ;
allEmojis = importDefault ( 9277 ) ( { topEmojis , newlyAddedEmojis } ) . allEmojis ;
const tmp9 = importDefault ( 9276 ) ( tmp , CHAT ) ;
2026-07-23 10:11:24 +00:00
let items = [ c4 ] ;
let items1 = [ tmp ] ;
stateFromStores = _require ( 566 ) . useStateFromStores ( items , ( ) = > _undefined . getDisambiguatedEmojiContext ( closure_2 ) , items1 ) ;
let obj2 = _require ( 566 ) ;
const items2 = [ c5 ] ;
stateFromStores1 = _require ( 566 ) . useStateFromStores ( items2 , ( ) = > {
const guild = _undefined2 . getGuild ( closure_2 ) ;
2026-07-20 16:05:17 +00:00
let name ;
if ( null != guild ) {
name = guild . name ;
}
return name ;
} ) ;
2026-07-23 10:11:24 +00:00
const obj3 = _require ( 566 ) ;
const items3 = [ c7 ] ;
const stateFromStores2 = _require ( 566 ) . useStateFromStores ( items3 , ( ) = > _undefined4 . getCurrentUser ( ) ) ;
const obj4 = _require ( 566 ) ;
2026-07-25 08:10:48 +00:00
const isPremiumResult = _require ( 1873 ) . isPremium ( stateFromStores2 ) ;
2026-07-23 10:11:24 +00:00
c11 = isPremiumResult ;
2026-07-25 08:10:48 +00:00
const obj5 = _require ( 1873 ) ;
soundmojiEmojiPickerSectionExperiment = _require ( 9278 ) . useSoundmojiEmojiPickerSectionExperiment ( { location : "useEmojiCategories" } ) ;
2026-07-20 16:05:17 +00:00
const items4 = [ stateFromStores , channel , tmp , CHAT , isPremiumResult , allEmojis , stateFromStores1 , tmp7 , tmp6 , tmp8 , tmp5 , soundmojiEmojiPickerSectionExperiment , flag ] ;
2026-07-23 10:11:24 +00:00
return flag . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
let emojiNitroLocked ;
let emojisDisabled ;
let emojisPremiumLockedCount ;
let iter2 ;
function getEmojiUnavailableReasons ( value ) {
2026-07-25 08:10:48 +00:00
let obj = getEmojiUnavailableReasons ( 3776 ) ;
2026-07-23 10:11:24 +00:00
obj = { categoryEmojis : value , channel : getEmojiUnavailableReasons , guildId : outer1_2 , intention : items } ;
2026-07-20 16:05:17 +00:00
return obj . getEmojiUnavailableReasons ( obj ) ;
}
const groupedCustomEmoji = stateFromStores . getGroupedCustomEmoji ( ) ;
2026-07-23 10:11:24 +00:00
let items = [ ] ;
2026-07-20 16:05:17 +00:00
let obj = { type : stateFromStores . SOUNDMOJI } ;
2026-07-23 10:11:24 +00:00
const flattenedGuildIds = _undefined3 . getFlattenedGuildIds ( ) ;
let intl = CHAT ( tmp [ 19 ] ) . intl ;
obj . name = intl . string ( CHAT ( tmp [ 19 ] ) . t . f0Ezmv ) ;
2026-07-20 16:05:17 +00:00
obj . id = allEmojis . SOUNDMOJI ;
obj . isNitroLocked = false ;
const GUILD = stateFromStores . GUILD ;
2026-07-23 10:11:24 +00:00
const tmp2 = outer1_22 ( flattenedGuildIds ) ;
2026-07-20 16:05:17 +00:00
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp10 = stateFromStores ;
2026-07-20 16:05:17 +00:00
let guild ;
2026-07-23 10:11:24 +00:00
if ( GUILD === stateFromStores . GUILD ) {
let tmp12 = _undefined2 ;
guild = _undefined2 . getGuild ( tmp9 ) ;
2026-07-20 16:05:17 +00:00
}
let tmp13 = tmp4 ;
let tmp14 = tmp5 ;
let tmp15 = tmp6 ;
let tmp16 = tmp7 ;
let tmp17 = tmp8 ;
if ( null != guild ) {
let value = groupedCustomEmoji . get ( guild . id ) ;
let tmp30 = value ;
tmp13 = tmp4 ;
tmp14 = tmp5 ;
tmp15 = tmp6 ;
tmp16 = tmp7 ;
tmp17 = tmp8 ;
if ( null != value ) {
let tmp31 = value ;
tmp13 = tmp4 ;
tmp14 = tmp5 ;
tmp15 = tmp6 ;
tmp16 = tmp7 ;
tmp17 = tmp8 ;
if ( 0 !== value . length ) {
let emojiUnavailableReasons = getEmojiUnavailableReasons ( value ) ;
( { emojisDisabled , emojisPremiumLockedCount , emojiNitroLocked } = emojiUnavailableReasons ) ;
let tmp33 = value ;
tmp13 = emojisDisabled ;
tmp14 = emojisPremiumLockedCount ;
tmp15 = emojiNitroLocked ;
tmp16 = tmp7 ;
tmp17 = tmp8 ;
if ( 0 !== emojiUnavailableReasons . emojisUnfiltered . length ) {
2026-07-23 10:11:24 +00:00
let tmp34 = _undefined ;
let hiddenEmojiIds = _undefined . getHiddenEmojiIds ( guild . id ) ;
let tmp36 = stateFromStores ;
2026-07-20 16:05:17 +00:00
let tmp20 = null ;
2026-07-23 10:11:24 +00:00
if ( GUILD === stateFromStores . GUILD ) {
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-23 10:11:24 +00:00
let tmp18 = stateFromStores ;
obj . type = stateFromStores . GUILD ;
2026-07-20 16:05:17 +00:00
obj . guild = guild ;
2026-07-23 10:11:24 +00:00
let tmp19 = c11 ;
obj . isNitroLocked = ! c11 && emojiNitroLocked && emojisPremiumLockedCount === value . length ;
2026-07-20 16:05:17 +00:00
obj . emojis = value ;
obj . emojisDisabled = emojisDisabled ;
obj . emojisHidden = hiddenEmojiIds ;
tmp20 = obj ;
}
let tmp21 = value ;
tmp13 = emojisDisabled ;
tmp14 = emojisPremiumLockedCount ;
tmp15 = emojiNitroLocked ;
tmp16 = hiddenEmojiIds ;
tmp17 = tmp20 ;
if ( null != tmp20 ) {
2026-07-23 10:11:24 +00:00
let tmp22 = tmp ;
if ( guild . id === tmp ) {
2026-07-20 16:05:17 +00:00
let arr = items . unshift ( tmp20 ) ;
let tmp26 = value ;
tmp13 = emojisDisabled ;
tmp14 = emojisPremiumLockedCount ;
tmp15 = emojiNitroLocked ;
tmp16 = hiddenEmojiIds ;
tmp17 = tmp20 ;
} else {
arr = items . push ( tmp20 ) ;
let tmp24 = value ;
tmp13 = emojisDisabled ;
tmp14 = emojisPremiumLockedCount ;
tmp15 = emojiNitroLocked ;
tmp16 = hiddenEmojiIds ;
tmp17 = tmp20 ;
}
}
}
}
}
}
iter2 = tmp2 ( ) ;
2026-07-23 10:11:24 +00:00
tmp4 = tmp13 ;
tmp5 = tmp14 ;
tmp6 = tmp15 ;
2026-07-20 16:05:17 +00:00
tmp7 = tmp16 ;
2026-07-23 10:11:24 +00:00
tmp8 = tmp17 ;
2026-07-20 16:05:17 +00:00
let tmp3 = iter2 ;
} while ( ! iter2 . done ) ;
}
if ( soundmojiEmojiPickerSectionExperiment ) {
if ( flag ) {
2026-07-23 10:11:24 +00:00
let items1 = [ obj ] ;
2026-07-20 16:05:17 +00:00
}
return tmp27 ( ( arr , id ) = > {
2026-07-23 10:11:24 +00:00
if ( id === allEmojis . TOP_GUILD_EMOJI ) {
const emojisUnfiltered = getEmojiUnavailableReasons ( outer1_8 ) . emojisUnfiltered ;
2026-07-20 16:05:17 +00:00
if ( null != emojisUnfiltered ) {
if ( 0 !== emojisUnfiltered . length ) {
2026-07-23 10:11:24 +00:00
let obj = { type : stateFromStores . TOP_GUILD_EMOJI , id } ;
const intl3 = items ( 1212 ) . intl ;
obj = { guildName : outer1_10 } ;
obj . name = intl3 . formatToPlainString ( items ( 1212 ) . t . W6Wi1X , obj ) ;
2026-07-20 16:05:17 +00:00
obj . isNitroLocked = false ;
obj . emojis = emojisUnfiltered ;
obj . emojisDisabled = tmp36 ;
arr . push ( obj ) ;
}
}
return arr ;
2026-07-23 10:11:24 +00:00
} else if ( id === allEmojis . RECENT ) {
items = [ outer2_18 . REACTION , outer2_18 . DEFAULT_REACT_EMOJI ] ;
const emojisUnfiltered1 = getEmojiUnavailableReasons ( items . includes ( items ) ? outer1_6 : outer1_5 ) . emojisUnfiltered ;
2026-07-20 16:05:17 +00:00
if ( null != emojisUnfiltered1 ) {
if ( 0 !== emojisUnfiltered1 . length ) {
2026-07-23 10:11:24 +00:00
const obj1 = { type : stateFromStores . RECENT , id } ;
const intl2 = items ( 1212 ) . intl ;
obj1 . name = intl2 . string ( items ( 1212 ) . t [ "5TvaSm" ] ) ;
2026-07-20 16:05:17 +00:00
obj1 . isNitroLocked = false ;
obj1 . emojis = emojisUnfiltered1 ;
obj1 . emojisDisabled = tmp27 ;
arr . push ( obj1 ) ;
}
}
return arr ;
2026-07-23 10:11:24 +00:00
} else if ( id === allEmojis . FAVORITES ) {
const emojisUnfiltered2 = getEmojiUnavailableReasons ( outer1_7 ) . emojisUnfiltered ;
2026-07-20 16:05:17 +00:00
if ( null != emojisUnfiltered2 ) {
if ( 0 !== emojisUnfiltered2 . length ) {
2026-07-23 10:11:24 +00:00
const obj2 = { type : stateFromStores . FAVORITES , id } ;
const intl = items ( 1212 ) . intl ;
obj2 . name = intl . string ( items ( 1212 ) . t . y3LQCG ) ;
2026-07-20 16:05:17 +00:00
obj2 . isNitroLocked = false ;
obj2 . emojis = emojisUnfiltered2 ;
obj2 . emojisDisabled = tmp16 ;
arr . push ( obj2 ) ;
}
}
return arr ;
2026-07-23 10:11:24 +00:00
} else if ( id === allEmojis . CUSTOM ) {
2026-07-20 16:05:17 +00:00
let found = items ;
2026-07-23 10:11:24 +00:00
if ( ! outer1_4 ) {
2026-07-20 16:05:17 +00:00
found = items . filter ( ( type ) = > {
2026-07-23 10:11:24 +00:00
if ( type . type === stateFromStores . GUILD ) {
let flag = type . guild . id === outer2_2 ;
2026-07-20 16:05:17 +00:00
} else {
type = type . type ;
flag = false ;
}
return flag ;
} ) ;
}
const push = arr . push ;
const items1 = [ ] ;
HermesBuiltin . arraySpread ( found , 0 ) ;
HermesBuiltin . apply ( items1 , arr ) ;
} else {
2026-07-23 10:11:24 +00:00
obj = { type : stateFromStores . UNICODE , id , name : id , isNitroLocked : false } ;
2026-07-20 16:05:17 +00:00
arr . push ( obj ) ;
}
return arr ;
} , [ ] ) ;
}
} , items4 ) ;
} ;
export const getUnicodeEmojiCategories = function getUnicodeEmojiCategories() {
2026-07-25 08:10:48 +00:00
const categories = importDefault ( 3772 ) . getCategories ( ) ;
2026-07-23 10:11:24 +00:00
return categories . map ( ( id ) = > ( { type : outer1_9 . UNICODE , id , name : id , isNitroLocked : false } ) ) ;
2026-07-20 16:05:17 +00:00
} ;
export const trackPremiumSettingsPaneOpened = function trackPremiumSettingsPaneOpened ( getGuildId ) {
let guildId ;
if ( null != getGuildId ) {
guildId = getGuildId . getGuildId ( ) ;
}
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
obj = { location_page : null != guildId ? tmp3.GUILD_CHANNEL : tmp3.DM_CHANNEL } ;
if ( null != getGuildId ) {
let CUSTOM_STATUS_MODAL = constants5 . EMOJI_PICKER_POPOUT ;
} else {
CUSTOM_STATUS_MODAL = constants5 . CUSTOM_STATUS_MODAL ;
}
obj . location_section = CUSTOM_STATUS_MODAL ;
obj . track ( constants4 . PREMIUM_PROMOTION_OPENED , obj ) ;
} ;
export const trackEmojiSearchStart = function trackEmojiSearchStart ( location , intention ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { search_type : searchTypeForIntention ( intention ) , location } ;
2026-07-25 08:10:48 +00:00
const EmojiPickerStore = require ( 9273 ) /* createStore */ . EmojiPickerStore ;
2026-07-20 16:05:17 +00:00
const merged = Object . assign ( loadIdPayload ( EmojiPickerStore . getAnalyticsId ( ) ) ) ;
obj . trackWithMetadata ( constants4 . SEARCH_STARTED , obj ) ;
} ;
export const trackEmojiSearchResultsViewed = function trackEmojiSearchResultsViewed ( arg0 ) {
let _location ;
let intention ;
let loadId ;
let numEmojiLocked ;
let searchQuery ;
let totalResults ;
( { totalResults , numEmojiLocked , location : _location , searchQuery , intention , loadId } = arg0 ) ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { search_type : searchTypeForIntention ( intention ) , total_results : totalResults , num_results_locked : numEmojiLocked , query : searchQuery , location : _location } ;
const merged = Object . assign ( loadIdPayload ( loadId ) ) ;
obj . trackWithMetadata ( constants4 . SEARCH_RESULT_VIEWED , obj ) ;
} ;
export const trackEmojiSearchSelect = function trackEmojiSearchSelect ( arg0 ) {
let _location ;
let emoji ;
let emojiSuggestions ;
let index ;
let intention ;
let isLocked ;
let messageId ;
let searchQuery ;
( { emoji , emojiSuggestions } = arg0 ) ;
let name = emoji . uniqueName ;
( { searchQuery , isLocked , location : _location , intention , index , messageId } = arg0 ) ;
if ( null == name ) {
name = emoji . name ;
}
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { search_type : searchTypeForIntention ( intention ) , location : _location , expression_guild_id : emoji.guildId , emoji_id : emoji.id , emoji_name : name , is_custom : null != emoji . id , is_animated : emoji.animated , is_locked : isLocked , query : searchQuery , index_num : index } ;
let loadId ;
if ( null != emojiSuggestions ) {
loadId = emojiSuggestions . loadId ;
}
if ( null == loadId ) {
2026-07-25 08:10:48 +00:00
const EmojiPickerStore = require ( 9273 ) /* createStore */ . EmojiPickerStore ;
2026-07-20 16:05:17 +00:00
loadId = EmojiPickerStore . getAnalyticsId ( ) ;
}
const merged = Object . assign ( loadIdPayload ( loadId ) ) ;
let length ;
if ( null != emojiSuggestions ) {
const results = emojiSuggestions . results ;
if ( null != results ) {
length = results . length ;
}
}
obj [ "total_results" ] = length ;
let found ;
if ( null != emojiSuggestions ) {
const results1 = emojiSuggestions . results ;
if ( null != results1 ) {
const mapped = results1 . map ( ( emoji ) = > emoji . emoji . id ) ;
found = mapped . filter ( ( arg0 ) = > null != arg0 ) ;
}
}
obj [ "emoji_suggestion_ids" ] = found ;
obj [ "message_id" ] = messageId ;
obj . trackWithMetadata ( constants4 . SEARCH_RESULT_SELECTED , obj ) ;
} ;
export const trackEmojiSearchEmpty = function trackEmojiSearchEmpty ( arg0 ) {
let _location ;
let intention ;
let loadId ;
let searchQuery ;
( { location : _location , searchQuery , intention , loadId } = arg0 ) ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { search_type : searchTypeForIntention ( intention ) , query : searchQuery , location : _location } ;
const merged = Object . assign ( loadIdPayload ( loadId ) ) ;
obj . trackWithMetadata ( constants4 . SEARCH_RESULT_EMPTY , obj ) ;
} ;
export const trackEmojiFocus = function trackEmojiFocus ( arg0 ) {
let emoji ;
let newlyAddedHighlight ;
let position ;
let subCategory ;
( { emoji , subCategory } = arg0 ) ;
( { position , newlyAddedHighlight } = arg0 ) ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
let str ;
if ( null != subCategory ) {
str = subCategory . toString ( ) ;
}
obj . expression_section = str ;
obj . newly_added_highlight = newlyAddedHighlight ;
( { id : obj2.emoji_id , name : obj2.emoji_name , animated : obj2.emoji_animated } = emoji ) ;
obj . emoji_position = position ;
obj . trackWithMetadata ( constants4 . EXPRESSION_PICKER_EXPRESSION_FOCUS , obj ) ;
} ;
export const trackEmojiSelect = function trackEmojiSelect ( arg0 ) {
let _location ;
let category ;
let emoji ;
let isBurstReaction ;
let lockedReason ;
let pickerIntention ;
let subCategory ;
( { emoji , pickerIntention , subCategory } = arg0 ) ;
( { location : _location , category } = arg0 ) ;
if ( subCategory === undefined ) {
subCategory = constants3 . NONE ;
}
( { isBurstReaction , lockedReason } = arg0 ) ;
if ( constants8 . REACTION !== pickerIntention ) {
if ( constants8 . STATUS === pickerIntention ) {
let EMOJI_PICKER_EMOJI_CLICKED = PremiumUpsellTypes . EMOJI_PICKER_STATUS_EMOJI_CLICKED ;
} else {
EMOJI_PICKER_EMOJI_CLICKED = PremiumUpsellTypes . EMOJI_PICKER_EMOJI_CLICKED ;
}
let name = emoji . uniqueName ;
if ( null == name ) {
name = emoji . name ;
}
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
if ( null != lockedReason ) {
let EXPRESSION_PICKER_EXPRESSION_SELECTED = constants4 . EXPRESSION_PICKER_LOCKED_EXPRESSION_SELECTED ;
} else {
EXPRESSION_PICKER_EXPRESSION_SELECTED = constants4 . EXPRESSION_PICKER_EXPRESSION_SELECTED ;
}
obj = { type : EMOJI_PICKER_EMOJI_CLICKED , location : _location , expression_id : emoji.id , expression_name : name , expression_guild_id : emoji.guildId , is_custom : null != emoji . id , is_animated : emoji.animated , expression_picker_section : category } ;
let str ;
if ( null != subCategory ) {
str = subCategory . toString ( ) ;
}
obj . expression_section = str ;
obj . emoji_position = tmp2 ;
obj . newly_added_highlight = tmp3 ;
obj . is_burst = isBurstReaction ;
obj . message_id = tmp4 ;
let tmp17 = null != lockedReason ;
if ( tmp17 ) {
2026-07-23 10:11:24 +00:00
obj = { locked_reason : table [ lockedReason ] , visible_row_index : tmp5 } ;
2026-07-20 16:05:17 +00:00
tmp17 = obj ;
}
const merged = Object . assign ( tmp17 ) ;
obj . trackWithMetadata ( EXPRESSION_PICKER_EXPRESSION_SELECTED , obj ) ;
}
} ;
export const trackEmojiFavorited = function trackEmojiFavorited ( emoji ) {
emoji = emoji . emoji ;
let name = emoji . uniqueName ;
if ( null == name ) {
name = emoji . name ;
}
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { location : emoji.location , expression_type : ExpressionPickerViewType.EMOJI , expression_id : emoji.id , expression_name : name , expression_guild_id : emoji.guildId , is_custom : null != emoji . id , is_animated : emoji.animated } ;
obj . trackWithMetadata ( constants4 . EXPRESSION_FAVORITED , obj ) ;
} ;
2026-07-23 10:11:24 +00:00
export const throttledTrackEmojiAutoSuggestDisplayed = apply . throttle ( ( emojiSuggestions ) = > {
2026-07-20 16:05:17 +00:00
emojiSuggestions = emojiSuggestions . emojiSuggestions ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { suggestion_type : constants6.EMOJI , suggestion_quantity : emojiSuggestions.results.length , custom_quantity : results.filter ( ( emoji ) = > null != emoji . emoji . id ) . length , load_id : emojiSuggestions.loadId , location : emojiSuggestions.analyticsLocation } ;
2026-07-23 10:11:24 +00:00
results = emojiSuggestions . results ;
2026-07-20 16:05:17 +00:00
obj . trackWithMetadata ( constants4 . AUTO_SUGGEST_DISPLAYED , obj ) ;
2026-07-23 10:11:24 +00:00
} , require ( "set" ) . Millis . HALF_SECOND , { leading : false , trailing : true } ) ;
2026-07-20 16:05:17 +00:00
export const getAriaIdForEmojiCategory = function getAriaIdForEmojiCategory ( type , name ) {
if ( type . type === constants2 . GUILD ) {
let str = "" ;
if ( null != name ) {
str = name . name ;
}
let id = str ;
} else {
id = type . id ;
}
return id ;
} ;
export const getStringForEmojiCategory = function getStringForEmojiCategory ( PREMIUM_UPSELL ) {
let tmp = PREMIUM_UPSELL ;
if ( constants . TOP_GUILD_EMOJI === PREMIUM_UPSELL ) {
2026-07-23 10:11:24 +00:00
const intl13 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const obj = { guildName : arg1 } ;
2026-07-23 10:11:24 +00:00
return intl13 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . W6Wi1X , obj ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . RECENT === tmp ) {
2026-07-23 10:11:24 +00:00
const intl12 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl12 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "5TvaSm" ] ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . FAVORITES === tmp ) {
2026-07-23 10:11:24 +00:00
const intl11 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl11 . string ( require ( 1212 ) /* getSystemLocale */ . t . y3LQCG ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . ACTIVITY === tmp ) {
2026-07-23 10:11:24 +00:00
const intl10 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl10 . string ( require ( 1212 ) /* getSystemLocale */ . t . O783tR ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . FLAGS === tmp ) {
2026-07-23 10:11:24 +00:00
const intl9 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl9 . string ( require ( 1212 ) /* getSystemLocale */ . t . vvaizu ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . FOOD === tmp ) {
2026-07-23 10:11:24 +00:00
const intl8 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl8 . string ( require ( 1212 ) /* getSystemLocale */ . t . ldm9aY ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . NATURE === tmp ) {
2026-07-23 10:11:24 +00:00
const intl7 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl7 . string ( require ( 1212 ) /* getSystemLocale */ . t . egIBDH ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . OBJECTS === tmp ) {
2026-07-23 10:11:24 +00:00
const intl6 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl6 . string ( require ( 1212 ) /* getSystemLocale */ . t . gWm7Mk ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . PEOPLE === tmp ) {
2026-07-23 10:11:24 +00:00
const intl5 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl5 . string ( require ( 1212 ) /* getSystemLocale */ . t . GX594D ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . SYMBOLS === tmp ) {
2026-07-23 10:11:24 +00:00
const intl4 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl4 . string ( require ( 1212 ) /* getSystemLocale */ . t . QXMYAb ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . TRAVEL === tmp ) {
2026-07-23 10:11:24 +00:00
const intl3 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl3 . string ( require ( 1212 ) /* getSystemLocale */ . t . w33hIP ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . PREMIUM_UPSELL === tmp ) {
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl2 . string ( require ( 1212 ) /* getSystemLocale */ . t . pAF6xE ) ;
2026-07-20 16:05:17 +00:00
} else if ( constants . SOUNDMOJI === tmp ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . f0Ezmv ) ;
2026-07-20 16:05:17 +00:00
} else {
if ( null != arg1 ) {
tmp = arg1 ;
}
return tmp ;
}
} ;
export const useEmojiSearchResults = function useEmojiSearchResults ( arg0 , arg1 , arg2 , arg3 ) {
2026-07-23 10:11:24 +00:00
const _require = arg0 ;
let closure_1 = arg1 ;
2026-07-20 16:05:17 +00:00
const dependencyMap = arg2 ;
const React = arg3 ;
const effect = React . useEffect ( ( ) = > {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = lib ( table [ 25 ] ) . FrecencyUserSettingsActionCreators ;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators . loadIfNecessary ( ) ;
} , [ ] ) ;
const tmp2 = callback ( arg2 ) ;
let _isNativeReflectConstruct = tmp2 ;
const items = [ _isNativeReflectConstruct ] ;
const items1 = [ arg0 , arg1 , arg2 , tmp2 , arg3 ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
const replaced = lib . replace ( /^:/ , "" ) . replace ( /:$/ , "" ) ;
2026-07-20 16:05:17 +00:00
let result = null ;
if ( "" !== replaced ) {
2026-07-23 10:11:24 +00:00
const obj = { channel : closure_1 , query : replaced , count : 0 , intention : closure_2 , includeExternalGuilds : tmp2 , showOnlyUnicode : result } ;
2026-07-20 16:05:17 +00:00
result = tmp2 . searchWithoutFetchingLatest ( obj ) ;
}
return result ;
2026-07-23 10:11:24 +00:00
} , items1 , _require ( 566 ) . statesWillNeverBeEqual ) ;
2026-07-20 16:05:17 +00:00
} ;
export { useFrequentlyUsedEmojis } ;
export { useFrequentlyUsedReactionEmojis } ;
export { useFavoriteEmojis } ;
export const useIsFavoriteEmoji = function useIsFavoriteEmoji ( guildId , customEmojiFromJoinedGuild ) {
2026-07-23 10:11:24 +00:00
const _require = guildId ;
let closure_1 = customEmojiFromJoinedGuild ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) = > {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = guildId ( outer1_2 [ 25 ] ) . FrecencyUserSettingsActionCreators ;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators . loadIfNecessary ( ) ;
} , [ ] ) ;
const items = [ _isNativeReflectConstruct ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStores ( items , ( ) = > {
let result = null != closure_1 ;
2026-07-20 16:05:17 +00:00
if ( result ) {
2026-07-23 10:11:24 +00:00
const disambiguatedEmojiContext = outer1_4 . getDisambiguatedEmojiContext ( closure_0 ) ;
result = disambiguatedEmojiContext . isFavoriteEmojiWithoutFetchingLatest ( closure_1 ) ;
2026-07-20 16:05:17 +00:00
}
return result ;
} ) ;
} ;
export const useEmojiInPriorityOrder = function useEmojiInPriorityOrder ( arg0 ) {
2026-07-23 10:11:24 +00:00
const _require = arg0 ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) = > {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = callback ( outer1_2 [ 25 ] ) . FrecencyUserSettingsActionCreators ;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators . loadIfNecessary ( ) ;
} , [ ] ) ;
const items = [ _isNativeReflectConstruct ] ;
2026-07-23 10:11:24 +00:00
return _require ( 566 ) . useStateFromStoresArray ( items , ( ) = > {
const disambiguatedEmojiContext = outer1_4 . getDisambiguatedEmojiContext ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
return disambiguatedEmojiContext . getEmojiInPriorityOrderWithoutFetchingLatest ( ) ;
} ) ;
} ;
export const getEmojiSubCategory = function getEmojiSubCategory ( arr , arr2 ) {
if ( null == arg2 ) {
return constants3 . NONE ;
} else {
const mapped = arr . map ( ( id ) = > {
let name = id . id ;
if ( null == name ) {
name = id . uniqueName ;
}
if ( null == name ) {
name = id . name ;
}
return name ;
} ) ;
const mapped1 = arr2 . map ( ( id ) = > id . id ) ;
if ( mapped . includes ( arg2 ) ) {
let TOP_GUILD_EMOJI = constants3 . TOP_GUILD_EMOJI ;
} else {
TOP_GUILD_EMOJI = mapped1 . includes ( arg2 ) ? tmp.NEWLY_ADDED_EMOJI : tmp.NONE ;
}
return TOP_GUILD_EMOJI ;
}
} ;
export const getSearchPlaceholder = function getSearchPlaceholder ( arg0 , arg1 ) {
if ( arg0 === constants8 . REACTION ) {
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const string = intl2 . string ;
2026-07-23 10:11:24 +00:00
h7ES_n = require ( 1212 ) /* getSystemLocale */ . t ;
2026-07-20 16:05:17 +00:00
if ( arg1 ) {
2026-07-23 10:11:24 +00:00
h7ES_n = h7ES_n [ "h7ES+n" ] ;
2026-07-20 16:05:17 +00:00
let stringResult = string ( h7ES_n ) ;
} else {
2026-07-23 10:11:24 +00:00
stringResult = string ( h7ES_n [ "6any2A" ] ) ;
2026-07-20 16:05:17 +00:00
}
} else {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . KgK5qg ) ;
2026-07-20 16:05:17 +00:00
}
} ;