2026-07-27 11:26:19 +00:00
// Module ID: 11179
// Function ID: 86881
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-27 11:26:19 +00:00
// Dependencies: [57, 31, 5671, 5669, 5670, 11180, 4567, 4568, 5677, 1882, 7953, 7963, 11151, 11182, 22, 7955, 566, 5655, 11181, 11183, 2]
2026-07-20 16:05:17 +00:00
// Exports: bucketCommandSectionNameContains, bucketCommandSectionNameStartsWith, useGlobalSearchResults, useLocalSearchResults
2026-07-27 11:26:19 +00:00
// Module 11179 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
import result from "result" ;
import closure_6 from "_isNativeReflectConstruct" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_11 from "_isNativeReflectConstruct" ;
import closure_12 from "_isNativeReflectConstruct" ;
import { FetchState } from "_isNativeReflectConstruct" ;
import { BuiltInSectionId } from "TRUE_OPTION_NAME" ;
2026-07-24 07:16:23 +00:00
import { COMMAND_SENTINEL } from "regExp" ;
2026-07-23 10:11:24 +00:00
let closure_10 ;
let closure_7 ;
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 useApplicationsInContext ( allowFetch ) {
let context ;
let onlyWithCommands ;
( { context , onlyWithCommands } = allowFetch ) ;
let flag = allowFetch . allowFetch ;
if ( flag === undefined ) {
flag = true ;
}
const includeEmbeddedApps = allowFetch . includeEmbeddedApps ;
let includeBuiltIn = allowFetch . includeNonEmbeddedApps ;
let channel ;
if ( "channel" === context . type ) {
channel = context . channel ;
}
2026-07-25 08:10:48 +00:00
let obj = onlyWithCommands ( 5677 ) ;
const items = [ onlyWithCommands ( 1882 ) . ApplicationCommandType . CHAT ] ;
2026-07-20 16:05:17 +00:00
const hasBaseAccessPermissions = obj . usePermissionContext ( channel , items ) . hasBaseAccessPermissions ;
2026-07-23 10:11:24 +00:00
const tmp2 = callback2 ( context , hasBaseAccessPermissions , flag ) ;
let tmp3 = callback3 ( hasBaseAccessPermissions , flag ) ;
2026-07-20 16:05:17 +00:00
const items1 = [ includeEmbeddedApps , includeBuiltIn , onlyWithCommands ] ;
const callback = React . useCallback ( ( descriptor ) = > {
const application = descriptor . descriptor . application ;
let tmp = null != application ;
if ( tmp ) {
let tmp3 = ! includeEmbeddedApps ;
if ( ! tmp3 ) {
2026-07-23 10:11:24 +00:00
tmp3 = ! onlyWithCommands ( outer1_3 [ 10 ] ) . isEmbeddedApp ( application ) ;
const obj = onlyWithCommands ( outer1_3 [ 10 ] ) ;
2026-07-20 16:05:17 +00:00
}
let tmp6 = ! tmp3 ;
if ( tmp3 ) {
let tmp7 = null != application && includeBuiltIn ;
if ( tmp7 ) {
2026-07-23 10:11:24 +00:00
tmp7 = ! onlyWithCommands ( outer1_3 [ 10 ] ) . isEmbeddedApp ( application ) ;
const obj2 = onlyWithCommands ( outer1_3 [ 10 ] ) ;
2026-07-20 16:05:17 +00:00
}
if ( tmp7 ) {
let tmp11 = ! onlyWithCommands ;
if ( ! tmp11 ) {
const _Object = Object ;
tmp11 = Object . keys ( descriptor . commands ) . length > 0 ;
}
tmp7 = tmp11 ;
}
tmp6 = tmp7 ;
}
tmp = tmp6 ;
}
return tmp ;
} , items1 ) ;
const items2 = [ ] ;
const set = new Set ( ) ;
if ( null != tmp2 . result ) {
2026-07-23 10:11:24 +00:00
let _Object = Object ;
2026-07-20 16:05:17 +00:00
let values = Object . values ( tmp2 . result . sections ) ;
for ( let num = 0 ; num < values . length ; num = num + 1 ) {
let tmp5 = values [ num ] ;
let application = tmp5 . descriptor . application ;
let tmp6 = null != application && callback ( tmp5 ) ;
if ( tmp6 ) {
let arr = items2 . push ( application ) ;
let addResult = set . add ( application . id ) ;
}
}
}
if ( null != tmp3 . result ) {
const _Object2 = Object ;
values = Object . values ( tmp3 . result . sections ) ;
for ( let num2 = 0 ; num2 < values . length ; num2 = num2 + 1 ) {
let tmp9 = values [ num2 ] ;
let application2 = tmp9 . descriptor . application ;
let tmp10 = null != application2 && ! set . has ( application2 . id ) && callback ( tmp9 ) ;
if ( tmp10 ) {
arr = items2 . push ( application2 ) ;
}
}
}
if ( includeBuiltIn ) {
includeBuiltIn = allowFetch . includeBuiltIn ;
}
if ( includeBuiltIn ) {
2026-07-25 08:10:48 +00:00
items2 . push ( onlyWithCommands ( 7953 ) . FAKE_BUILT_IN_APP ) ;
2026-07-20 16:05:17 +00:00
}
obj = { apps : items2 } ;
let fetching ;
if ( null != tmp2 ) {
fetching = tmp2 . fetchState . fetching ;
}
let tmp16 = true === fetching ;
if ( ! tmp16 ) {
let fetching1 ;
if ( null != tmp3 ) {
fetching1 = tmp3 . fetchState . fetching ;
}
tmp16 = true === fetching1 ;
}
obj . loading = tmp16 ;
return obj ;
}
function useApplicationCommandsInContext ( context ) {
context = context . context ;
let flag = context . includeBuiltIn ;
if ( flag === undefined ) {
flag = true ;
}
let flag2 = context . allowFetch ;
if ( flag2 === undefined ) {
flag2 = true ;
}
2026-07-23 10:11:24 +00:00
let c2 ;
let c3 ;
let tmp = callback2 ( context , true , flag2 ) ;
c2 = tmp ;
const tmp2 = callback3 ( true , flag2 ) ;
c3 = tmp2 ;
let items = [ context , flag , tmp . fetchState . fetching , , , ] ;
let result = tmp . result ;
2026-07-20 16:05:17 +00:00
let sections ;
if ( null != result ) {
sections = result . sections ;
}
items [ 3 ] = sections ;
items [ 4 ] = tmp2 . fetchState . fetching ;
2026-07-23 10:11:24 +00:00
let result2 = tmp2 . result ;
2026-07-20 16:05:17 +00:00
let sections1 ;
if ( null != result2 ) {
sections1 = result2 . sections ;
}
items [ 5 ] = sections1 ;
return React . useMemo ( ( ) = > {
2026-07-23 10:11:24 +00:00
let _undefined ;
2026-07-20 16:05:17 +00:00
let length ;
2026-07-23 10:11:24 +00:00
const result = obj . result ;
2026-07-20 16:05:17 +00:00
let sections ;
if ( null != result ) {
sections = result . sections ;
}
if ( null == sections ) {
sections = { } ;
}
2026-07-23 10:11:24 +00:00
const result2 = _undefined . result ;
2026-07-20 16:05:17 +00:00
let sections1 ;
if ( null != result2 ) {
sections1 = result2 . sections ;
}
if ( null == sections1 ) {
sections1 = { } ;
}
2026-07-23 10:11:24 +00:00
let items = [ . . . Object . keys ( sections ) ] ;
2026-07-20 16:05:17 +00:00
const keys = Object . keys ( sections1 ) ;
HermesBuiltin . arraySpread ( keys . filter ( ( arg0 ) = > ! ( arg0 in sections ) ) , tmp ) ;
if ( items1 ) {
2026-07-23 10:11:24 +00:00
items . push ( outer1_14 . BUILT_IN ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
items1 = [ ] ;
obj = { } ;
2026-07-20 16:05:17 +00:00
let num = 0 ;
if ( 0 < items . length ) {
do {
2026-07-23 10:11:24 +00:00
_undefined = items [ num ] ;
2026-07-20 16:05:17 +00:00
let tmp5Result = tmp5 ( ) ;
num = num + 1 ;
length = items . length ;
} while ( num < length ) ;
}
obj = { commands : items1 , commandSectionMap : obj } ;
2026-07-23 10:11:24 +00:00
let tmp7 = true === obj . fetchState . fetching ;
2026-07-20 16:05:17 +00:00
if ( ! tmp7 ) {
2026-07-23 10:11:24 +00:00
tmp7 = true === _undefined . fetchState . fetching ;
2026-07-20 16:05:17 +00:00
}
obj . loading = tmp7 ;
return obj ;
} , items ) ;
}
function filterApplicationAllowed ( type ) {
2026-07-23 10:11:24 +00:00
const _require = type ;
2026-07-20 16:05:17 +00:00
let channel ;
if ( "channel" === type . type ) {
channel = type . channel ;
}
2026-07-25 08:10:48 +00:00
const items = [ _require ( 1882 ) . ApplicationCommandType . CHAT , _require ( 1882 ) . ApplicationCommandType . PRIMARY_ENTRY_POINT ] ;
let closure_1 = _require ( 5677 ) . buildPermissionContext ( channel , items ) ;
2026-07-20 16:05:17 +00:00
return ( id ) = > {
2026-07-23 10:11:24 +00:00
let closure_1 ;
let closure_2 ;
2026-07-20 16:05:17 +00:00
let sectionCommands ;
const context = closure_1 . context ;
const userId = closure_1 . userId ;
const roleIds = closure_1 . roleIds ;
const isImpersonating = closure_1 . isImpersonating ;
2026-07-23 10:11:24 +00:00
const tmp = outer1_8 ( descriptor , id . id ) ;
descriptor = tmp . descriptor ;
2026-07-20 16:05:17 +00:00
( { sectionCommands , isGuildInstalled : closure_1 , isUserInstalled : closure_2 } = tmp ) ;
let guild_id ;
if ( null != context ) {
guild_id = context . guild_id ;
}
let allowedForUser = null ;
if ( null != guild_id ) {
2026-07-23 10:11:24 +00:00
let obj = outer1_2 ( outer1_3 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
let permissions ;
if ( null != descriptor ) {
permissions = descriptor . permissions ;
}
allowedForUser = obj . computeAllowedForUser ( permissions , context . guild_id , userId , roleIds , isImpersonating ) ;
}
let guild_id1 ;
if ( null != context ) {
guild_id1 = context . guild_id ;
}
let allowedForChannel = null ;
if ( null != guild_id1 ) {
let permissions1 ;
if ( null != descriptor ) {
permissions1 = descriptor . permissions ;
}
2026-07-23 10:11:24 +00:00
allowedForChannel = outer1_2 ( outer1_3 [ 11 ] ) . computeAllowedForChannel ( permissions1 , context , context . guild_id ) ;
const obj2 = outer1_2 ( outer1_3 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
}
let tmp17 = null != sectionCommands ;
if ( tmp17 ) {
tmp17 = sectionCommands . length > 0 ;
}
let someResult = ! tmp17 ;
if ( tmp17 ) {
someResult = sectionCommands . some ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
let obj = outer2_2 ( outer2_3 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { applicationAllowedForUser : allowedForUser , applicationAllowedForChannel : allowedForChannel } ;
let botId ;
if ( null != descriptor ) {
botId = descriptor . botId ;
}
obj . commandBotId = botId ;
obj . isGuildInstalled = closure_1 ;
2026-07-23 10:11:24 +00:00
obj . isUserInstalled = closure_2 ;
return obj . hasAccess ( arg0 , outer1_1 , obj ) === descriptor ( outer2_3 [ 11 ] ) . HasAccessResult . ALLOWED ;
2026-07-20 16:05:17 +00:00
} ) ;
}
return someResult ;
} ;
}
function defaultApplicationBucketing ( arg0 ) {
const items = [ bucketApplicationNameStartsWith ( arg0 ) , bucketApplicationNameContains ( arg0 ) , bucketApplicationDescriptionStartsWith ( arg0 ) , bucketApplicationDescriptionContains ( arg0 ) ] ;
return items ;
}
function bucketApplicationNameStartsWith ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( FAKE_BUILT_IN_APP ) = > {
2026-07-23 10:11:24 +00:00
const sectionName = lib ( outer1_3 [ 10 ] ) . getSectionName ( FAKE_BUILT_IN_APP ) ;
const obj = lib ( outer1_3 [ 10 ] ) ;
return sectionName . toLocaleLowerCase ( ) . startsWith ( lib . toLocaleLowerCase ( ) ) ;
2026-07-20 16:05:17 +00:00
} ;
}
function bucketApplicationNameContains ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( FAKE_BUILT_IN_APP ) = > {
2026-07-23 10:11:24 +00:00
const sectionName = lib ( outer1_3 [ 10 ] ) . getSectionName ( FAKE_BUILT_IN_APP ) ;
const obj = lib ( outer1_3 [ 10 ] ) ;
return sectionName . toLocaleLowerCase ( ) . includes ( lib . toLocaleLowerCase ( ) ) ;
2026-07-20 16:05:17 +00:00
} ;
}
function bucketApplicationDescriptionStartsWith ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( FAKE_BUILT_IN_APP ) = > {
2026-07-23 10:11:24 +00:00
const sectionDescription = lib ( outer1_3 [ 10 ] ) . getSectionDescription ( FAKE_BUILT_IN_APP ) ;
2026-07-20 16:05:17 +00:00
let toLocaleLowerCaseResult ;
if ( null != sectionDescription ) {
toLocaleLowerCaseResult = sectionDescription . toLocaleLowerCase ( ) ;
}
let startsWithResult ;
if ( null != toLocaleLowerCaseResult ) {
2026-07-23 10:11:24 +00:00
startsWithResult = toLocaleLowerCaseResult . startsWith ( lib . toLocaleLowerCase ( ) ) ;
2026-07-20 16:05:17 +00:00
}
return null != startsWithResult && startsWithResult ;
} ;
}
function bucketApplicationDescriptionContains ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( FAKE_BUILT_IN_APP ) = > {
2026-07-23 10:11:24 +00:00
const sectionDescription = lib ( outer1_3 [ 10 ] ) . getSectionDescription ( FAKE_BUILT_IN_APP ) ;
2026-07-20 16:05:17 +00:00
let toLocaleLowerCaseResult ;
if ( null != sectionDescription ) {
toLocaleLowerCaseResult = sectionDescription . toLocaleLowerCase ( ) ;
}
let hasItem ;
if ( null != toLocaleLowerCaseResult ) {
2026-07-23 10:11:24 +00:00
hasItem = toLocaleLowerCaseResult . includes ( lib . toLocaleLowerCase ( ) ) ;
2026-07-20 16:05:17 +00:00
}
return null != hasItem && hasItem ;
} ;
}
function sortApplicationFreceny ( id , id2 ) {
const scoreWithoutLoadingLatest = store . getScoreWithoutLoadingLatest ( id . id ) ;
return store . getScoreWithoutLoadingLatest ( id2 . id ) - scoreWithoutLoadingLatest ;
}
function sortApplicationAlpha ( FAKE_BUILT_IN_APP , FAKE_BUILT_IN_APP ) {
2026-07-25 08:10:48 +00:00
const sectionName = require ( 7953 ) /* _createForOfIteratorHelperLoose */ . getSectionName ( FAKE_BUILT_IN_APP ) ;
const obj = require ( 7953 ) /* _createForOfIteratorHelperLoose */ ;
return callback ( sectionName , require ( 7953 ) /* _createForOfIteratorHelperLoose */ . getSectionName ( FAKE_BUILT_IN_APP ) ) ;
2026-07-20 16:05:17 +00:00
}
function filterCommandAllowed ( type ) {
2026-07-23 10:11:24 +00:00
const _require = type ;
2026-07-20 16:05:17 +00:00
let channel ;
if ( "channel" === type . type ) {
channel = type . channel ;
}
2026-07-25 08:10:48 +00:00
const items = [ _require ( 1882 ) . ApplicationCommandType . CHAT ] ;
let closure_1 = _require ( 5677 ) . buildPermissionContext ( channel , items ) ;
2026-07-20 16:05:17 +00:00
let closure_2 = { } ;
return ( applicationId ) = > {
let applicationAllowedForChannel ;
let applicationAllowedForUser ;
let isGuildInstalled ;
let isGuildInstalled2 ;
let isUserInstalled ;
let isUserInstalled2 ;
const context = closure_1 . context ;
const userId = closure_1 . userId ;
const roleIds = closure_1 . roleIds ;
const isImpersonating = closure_1 . isImpersonating ;
2026-07-23 10:11:24 +00:00
if ( ! ( applicationId . applicationId in dependencyMap ) ) {
const tmp3 = outer1_8 ( type , applicationId . applicationId ) ;
2026-07-20 16:05:17 +00:00
const descriptor = tmp3 . descriptor ;
let guild_id ;
( { isGuildInstalled , isUserInstalled } = tmp3 ) ;
if ( null != context ) {
guild_id = context . guild_id ;
}
let allowedForUser = null ;
if ( null != guild_id ) {
2026-07-23 10:11:24 +00:00
let obj = dependencyMap ( outer1_3 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
let permissions ;
if ( null != descriptor ) {
permissions = descriptor . permissions ;
}
allowedForUser = obj . computeAllowedForUser ( permissions , context . guild_id , userId , roleIds , isImpersonating ) ;
}
let guild_id1 ;
if ( null != context ) {
guild_id1 = context . guild_id ;
}
let allowedForChannel = null ;
if ( null != guild_id1 ) {
let permissions1 ;
if ( null != descriptor ) {
permissions1 = descriptor . permissions ;
}
2026-07-23 10:11:24 +00:00
allowedForChannel = dependencyMap ( outer1_3 [ 11 ] ) . computeAllowedForChannel ( permissions1 , context , context . guild_id ) ;
const obj2 = dependencyMap ( outer1_3 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
}
obj = { descriptor , applicationAllowedForUser : allowedForUser , applicationAllowedForChannel : allowedForChannel , isGuildInstalled , isUserInstalled } ;
2026-07-23 10:11:24 +00:00
dependencyMap [ applicationId . applicationId ] = obj ;
2026-07-20 16:05:17 +00:00
}
const descriptor2 = tmp21 . descriptor ;
2026-07-23 10:11:24 +00:00
( { applicationAllowedForChannel , applicationAllowedForUser , isGuildInstalled : isGuildInstalled2 , isUserInstalled : isUserInstalled2 } = dependencyMap [ applicationId . applicationId ] ) ;
2026-07-20 16:05:17 +00:00
obj = { applicationAllowedForUser , applicationAllowedForChannel } ;
let botId ;
if ( null != descriptor2 ) {
botId = descriptor2 . botId ;
}
obj . commandBotId = botId ;
obj . isGuildInstalled = isGuildInstalled2 ;
obj . isUserInstalled = isUserInstalled2 ;
2026-07-23 10:11:24 +00:00
const obj4 = dependencyMap ( outer1_3 [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
const tmp22 = closure_1 ;
2026-07-23 10:11:24 +00:00
return dependencyMap ( outer1_3 [ 11 ] ) . hasAccess ( applicationId , closure_1 , obj ) === type ( outer1_3 [ 11 ] ) . HasAccessResult . ALLOWED ;
2026-07-20 16:05:17 +00:00
} ;
}
function defaultCommandBucketing ( arg0 ) {
const items = [ bucketRootCommandNameStartsWith ( arg0 ) , bucketFullCommandNameStartsWith ( arg0 ) , bucketCommandNameContains ( arg0 ) , bucketOptionNameStartsWithOrCommandAndOptionStartsWith ( arg0 ) , bucketCommandOptionNameContains ( arg0 ) ] ;
return items ;
}
function bucketRootCommandNameStartsWith ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( arg0 ) = > {
let displayName ;
let untranslatedName ;
( { untranslatedName , displayName } = arg0 ) ;
2026-07-23 10:11:24 +00:00
let startsWithResult = untranslatedName . startsWith ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
if ( ! startsWithResult ) {
2026-07-23 10:11:24 +00:00
startsWithResult = displayName . startsWith ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return startsWithResult ;
} ;
}
function bucketFullCommandNameStartsWith ( str ) {
let parts ;
if ( null != str ) {
parts = str . split ( " " ) ;
}
let closure_0 = parts [ 0 ] ;
2026-07-23 10:11:24 +00:00
let substr = parts . slice ( 1 ) ;
2026-07-20 16:05:17 +00:00
let closure_1 = substr . join ( " " ) ;
return ( arg0 ) = > {
let displayName ;
let untranslatedName ;
( { untranslatedName , displayName } = arg0 ) ;
if ( untranslatedName . startsWith ( closure_0 ) ) {
const parts = untranslatedName . split ( " " ) ;
const substr = parts . slice ( 1 ) ;
const joined = substr . join ( " " ) ;
if ( joined . startsWith ( closure_1 ) ) {
return true ;
}
}
if ( displayName . startsWith ( closure_0 ) ) {
const parts1 = displayName . split ( " " ) ;
const substr1 = parts1 . slice ( 1 ) ;
const joined1 = substr1 . join ( " " ) ;
if ( joined1 . startsWith ( closure_1 ) ) {
return true ;
}
}
return false ;
} ;
}
function bucketCommandNameContains ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( arg0 ) = > {
let displayName ;
let untranslatedName ;
( { untranslatedName , displayName } = arg0 ) ;
2026-07-23 10:11:24 +00:00
let hasItem = untranslatedName . includes ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
if ( ! hasItem ) {
2026-07-23 10:11:24 +00:00
hasItem = displayName . includes ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
return hasItem ;
} ;
}
function bucketOptionNameStartsWithOrCommandAndOptionStartsWith ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( options ) = > {
let name ;
let serverLocalizedName ;
options = options . options ;
if ( null == options ) {
options = [ ] ;
}
2026-07-23 10:11:24 +00:00
const tmpResult = outer1_16 ( options ) ;
2026-07-20 16:05:17 +00:00
let iter = tmpResult ( ) ;
if ( ! iter . done ) {
( { name , serverLocalizedName } = iter . value ) ;
2026-07-23 10:11:24 +00:00
while ( ! name . startsWith ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
let _HermesInternal = HermesInternal ;
let combined = "" + options . untranslatedName + " " + name ;
2026-07-23 10:11:24 +00:00
let tmp4 = closure_0 ;
if ( combined . startsWith ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
break ;
} else {
if ( null == options . displayName ) {
if ( null != serverLocalizedName ) {
2026-07-23 10:11:24 +00:00
let tmp6 = closure_0 ;
if ( ! serverLocalizedName . startsWith ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
let _HermesInternal3 = HermesInternal ;
let combined1 = "" + options . untranslatedName + " " + serverLocalizedName ;
2026-07-23 10:11:24 +00:00
let tmp7 = closure_0 ;
if ( ! combined1 . startsWith ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
if ( null != options . displayName ) {
let _HermesInternal4 = HermesInternal ;
let combined2 = "" + options . displayName + " " + serverLocalizedName ;
2026-07-23 10:11:24 +00:00
let tmp8 = closure_0 ;
2026-07-20 16:05:17 +00:00
}
}
}
let flag = true ;
return true ;
}
let iter2 = tmpResult ( ) ;
iter = iter2 ;
} else {
let _HermesInternal2 = HermesInternal ;
let combined3 = "" + options . displayName + " " + name ;
2026-07-23 10:11:24 +00:00
let tmp5 = closure_0 ;
if ( combined3 . startsWith ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
break ;
}
}
let flag2 = true ;
return true ;
}
}
}
return false ;
} ;
}
function bucketCommandOptionNameContains ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( options ) = > {
let name ;
let serverLocalizedName ;
options = options . options ;
if ( null == options ) {
options = [ ] ;
}
2026-07-23 10:11:24 +00:00
const tmpResult = outer1_16 ( options ) ;
2026-07-20 16:05:17 +00:00
let iter = tmpResult ( ) ;
if ( ! iter . done ) {
( { name , serverLocalizedName } = iter . value ) ;
2026-07-23 10:11:24 +00:00
while ( ! name . includes ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
if ( null == serverLocalizedName ) {
let iter2 = tmpResult ( ) ;
iter = iter2 ;
} else {
2026-07-23 10:11:24 +00:00
let tmp4 = closure_0 ;
if ( serverLocalizedName . includes ( closure_0 ) ) {
2026-07-20 16:05:17 +00:00
break ;
}
}
let flag = true ;
return true ;
}
}
return false ;
} ;
}
function defaultCommandsSort ( arg0 ) {
const items = [ sortCommandsByFreceny ( arg0 ) , sortCommandsAlpha ] ;
return items ;
}
function sortCommandsByFreceny ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
return ( arg0 , arg1 ) = > {
2026-07-23 10:11:24 +00:00
const scoreWithoutLoadingLatest = outer1_6 . getScoreWithoutLoadingLatest ( closure_0 , arg0 ) ;
return outer1_6 . getScoreWithoutLoadingLatest ( closure_0 , arg1 ) - scoreWithoutLoadingLatest ;
2026-07-20 16:05:17 +00:00
} ;
}
function sortCommandsAlpha ( displayName , displayName2 ) {
2026-07-23 10:11:24 +00:00
return callback ( displayName . displayName , displayName2 . displayName ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
( { appLauncherOnlyCompareNames : closure_7 , getSection : closure_8 , useContextIndexState : closure_9 , useUserIndexState : closure_10 } = _isNativeReflectConstruct ) ;
let result = require ( "_isNativeReflectConstruct" ) . fileFinishedImporting ( "modules/app_launcher/utils/AppLauncherSearchUtils.tsx" ) ;
2026-07-20 16:05:17 +00:00
export { useApplicationsInContext } ;
export { useApplicationCommandsInContext } ;
export { filterApplicationAllowed } ;
export { defaultApplicationBucketing } ;
export { bucketApplicationNameStartsWith } ;
export { bucketApplicationNameContains } ;
export { bucketApplicationDescriptionStartsWith } ;
export { bucketApplicationDescriptionContains } ;
export { sortApplicationFreceny } ;
export { sortApplicationAlpha } ;
export { filterCommandAllowed } ;
export { defaultCommandBucketing } ;
export { bucketRootCommandNameStartsWith } ;
export { bucketFullCommandNameStartsWith } ;
export { bucketCommandNameContains } ;
export { bucketOptionNameStartsWithOrCommandAndOptionStartsWith } ;
export { bucketCommandOptionNameContains } ;
export function bucketCommandSectionNameStartsWith ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
let closure_1 = arg1 ;
2026-07-20 16:05:17 +00:00
let closure_2 = { } ;
return ( applicationId ) = > {
2026-07-23 10:11:24 +00:00
const lib = applicationId ;
if ( applicationId . applicationId in table ) {
return table [ applicationId . applicationId ] ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let FAKE_BUILT_IN_APP = lib . find ( ( id ) = > id . id === applicationId . applicationId ) ;
2026-07-20 16:05:17 +00:00
if ( null == FAKE_BUILT_IN_APP ) {
2026-07-23 10:11:24 +00:00
FAKE_BUILT_IN_APP = lib ( outer1_3 [ 10 ] ) . FAKE_BUILT_IN_APP ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const sectionName = lib ( outer1_3 [ 10 ] ) . getSectionName ( FAKE_BUILT_IN_APP ) ;
const obj = lib ( outer1_3 [ 10 ] ) ;
const startsWithResult = sectionName . toLocaleLowerCase ( ) . startsWith ( closure_1 . toLocaleLowerCase ( ) ) ;
table [ applicationId . applicationId ] = startsWithResult ;
2026-07-20 16:05:17 +00:00
return startsWithResult ;
}
} ;
}
export function bucketCommandSectionNameContains ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
let closure_1 = arg1 ;
2026-07-20 16:05:17 +00:00
let closure_2 = { } ;
return ( applicationId ) = > {
2026-07-23 10:11:24 +00:00
const lib = applicationId ;
if ( applicationId . applicationId in table ) {
return table [ applicationId . applicationId ] ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let FAKE_BUILT_IN_APP = lib . find ( ( id ) = > id . id === applicationId . applicationId ) ;
2026-07-20 16:05:17 +00:00
if ( null == FAKE_BUILT_IN_APP ) {
2026-07-23 10:11:24 +00:00
FAKE_BUILT_IN_APP = lib ( outer1_3 [ 10 ] ) . FAKE_BUILT_IN_APP ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const sectionName = lib ( outer1_3 [ 10 ] ) . getSectionName ( FAKE_BUILT_IN_APP ) ;
const obj = lib ( outer1_3 [ 10 ] ) ;
const hasItem = sectionName . toLocaleLowerCase ( ) . includes ( closure_1 . toLocaleLowerCase ( ) ) ;
table [ applicationId . applicationId ] = hasItem ;
2026-07-20 16:05:17 +00:00
return hasItem ;
}
} ;
}
export { defaultCommandsSort } ;
export { sortCommandsByFreceny } ;
export { sortCommandsAlpha } ;
export const useLocalSearchResults = function useLocalSearchResults ( context ) {
context = context . context ;
2026-07-23 10:11:24 +00:00
let substr = str ;
2026-07-20 16:05:17 +00:00
const commandLimit = context . commandLimit ;
const applicationLimit = context . applicationLimit ;
let flag = context . searchesCommands ;
if ( flag === undefined ) {
flag = true ;
}
let flag2 = context . searchesBots ;
if ( flag2 === undefined ) {
flag2 = true ;
}
let flag3 = context . searchesActivities ;
if ( flag3 === undefined ) {
flag3 = true ;
}
let commands ;
let commandSectionMap ;
let apps ;
2026-07-23 10:11:24 +00:00
let c10 ;
let memo ;
2026-07-20 16:05:17 +00:00
let tmp = str ;
if ( context . query . startsWith ( "" + COMMAND_SENTINEL ) ) {
2026-07-23 10:11:24 +00:00
substr = str . substring ( 1 ) ;
2026-07-20 16:05:17 +00:00
tmp = substr ;
}
2026-07-23 10:11:24 +00:00
let tmp3 = useApplicationCommandsInContext ( { context , includeBuiltIn : true } ) ;
2026-07-20 16:05:17 +00:00
commands = tmp3 . commands ;
commandSectionMap = tmp3 . commandSectionMap ;
let loading = tmp3 . loading ;
2026-07-23 10:11:24 +00:00
let obj = { context , onlyWithCommands : true , includeBuiltIn : true , includeEmbeddedApps : flag3 , includeNonEmbeddedApps : flag2 } ;
2026-07-20 16:05:17 +00:00
apps = useApplicationsInContext ( obj ) . apps ;
obj = { } ;
let guild_id = null ;
if ( "channel" === context . type ) {
guild_id = context . channel . guild_id ;
}
obj . guildId = guild_id ;
2026-07-23 10:11:24 +00:00
const tmp4Result = substr ( applicationLimit [ 12 ] ) ( obj ) ;
c10 = tmp4Result ;
let items = [ flag , commands , commandLimit , context , tmp ] ;
memo = flag2 . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( flag ) {
let obj = context ( applicationLimit [ 13 ] ) ;
obj = { limit : commandLimit } ;
2026-07-23 10:11:24 +00:00
const items = [ outer1_28 ( context ) ] ;
2026-07-20 16:05:17 +00:00
obj . filterPredicates = items ;
2026-07-23 10:11:24 +00:00
obj . bucketPredicates = outer1_29 ( substr ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
let channel ;
if ( "channel" === context . type ) {
channel = context . channel ;
}
obj . channel = channel ;
2026-07-23 10:11:24 +00:00
obj . sortComparers = outer1_35 ( obj ) ;
2026-07-20 16:05:17 +00:00
let queryDataResult = obj . queryData ( commands , obj ) ;
const tmp3 = commands ;
2026-07-23 10:11:24 +00:00
const tmp9 = outer1_35 ;
2026-07-20 16:05:17 +00:00
} else {
queryDataResult = [ ] ;
}
return queryDataResult ;
} , items ) ;
2026-07-23 10:11:24 +00:00
let items1 = [ apps , memo , commandSectionMap ] ;
const memo1 = flag2 . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( 0 === memo . length ) {
return [ ] ;
} else {
const _Map = Map ;
const map = new Map ( apps . map ( ( id ) = > {
const items = [ id . id , id ] ;
return items ;
} ) ) ;
return substr ( applicationLimit [ 14 ] ) . compact ( memo . map ( ( applicationId ) = > {
const value = map . get ( applicationId . applicationId ) ;
let tmp2 = null ;
if ( null != value ) {
const obj = { command : applicationId , application : value } ;
let tmp5 = null ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_8 [ applicationId . id ] ) {
2026-07-20 16:05:17 +00:00
tmp5 = tmp4 ;
}
obj . section = tmp5 ;
tmp2 = obj ;
}
return tmp2 ;
} ) ) ;
}
} , items1 ) ;
2026-07-23 10:11:24 +00:00
let items2 = [ flag2 , flag3 , applicationLimit , context , tmp , apps , tmp4Result ] ;
const memo2 = flag2 . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
const items = [ ] ;
if ( flag3 ) {
const _Set = Set ;
const set = new Set ( apps . map ( ( id ) = > id . id ) ) ;
const push = items . push ;
const items1 = [ ] ;
HermesBuiltin . arraySpread ( apps , 0 ) ;
HermesBuiltin . apply ( items1 , items ) ;
const push2 = items . push ;
2026-07-23 10:11:24 +00:00
const found = _undefined . filter ( ( application ) = > ! set . has ( application . application . id ) ) ;
2026-07-20 16:05:17 +00:00
const items2 = [ ] ;
HermesBuiltin . arraySpread ( found . map ( ( application ) = > application . application ) , 0 ) ;
HermesBuiltin . apply ( items2 , items ) ;
let tmp2 = items ;
} else {
tmp2 = items ;
if ( flag2 ) {
tmp2 = apps ;
}
}
let obj = context ( applicationLimit [ 13 ] ) ;
obj = { limit : applicationLimit } ;
2026-07-23 10:11:24 +00:00
const items3 = [ outer1_20 ( set ) ] ;
2026-07-20 16:05:17 +00:00
obj . filterPredicates = items3 ;
2026-07-23 10:11:24 +00:00
obj . bucketPredicates = outer1_21 ( substr ) ;
const items4 = [ outer1_26 , outer1_27 ] ;
2026-07-20 16:05:17 +00:00
obj . sortComparers = items4 ;
return obj . queryData ( tmp2 , obj ) ;
} , items2 ) ;
obj = { commandResults : memo1 , hasCommandResults : tmp8 , applicationResults : memo2 , hasApplicationResults : tmp9 } ;
let tmp10 = ! tmp8 ;
if ( memo1 . length <= 0 ) {
tmp10 = ! tmp9 ;
}
obj . isEmptyState = tmp10 ;
if ( loading ) {
loading = flag ;
}
obj . loading = loading ;
return obj ;
} ;
export const useGlobalSearchResults = function useGlobalSearchResults ( fetches ) {
let context ;
let query ;
( { context , query } = fetches ) ;
2026-07-23 10:11:24 +00:00
let substr = query ;
2026-07-20 16:05:17 +00:00
let flag = fetches . fetches ;
if ( flag === undefined ) {
flag = true ;
}
let num = fetches . pageLimit ;
if ( num === undefined ) {
num = Infinity ;
}
let dependencyMap ;
2026-07-23 10:11:24 +00:00
let guild_id ;
let first ;
2026-07-20 16:05:17 +00:00
let closure_6 ;
let ref ;
let fetchState ;
let totalPages ;
let memo ;
2026-07-23 10:11:24 +00:00
let callback1 ;
2026-07-20 16:05:17 +00:00
let tmp = query ;
if ( query . startsWith ( "" + COMMAND_SENTINEL ) ) {
2026-07-23 10:11:24 +00:00
substr = query . substring ( 1 ) ;
2026-07-20 16:05:17 +00:00
tmp = substr ;
}
2026-07-25 08:10:48 +00:00
const tmp3 = fetches . entrypoint === substr ( 7955 ) . AppLauncherEntrypoint . VOICE ;
2026-07-20 16:05:17 +00:00
dependencyMap = tmp3 ;
2026-07-23 10:11:24 +00:00
guild_id = undefined ;
2026-07-20 16:05:17 +00:00
if ( "channel" === context . type ) {
guild_id = context . channel . guild_id ;
}
2026-07-23 10:11:24 +00:00
const tmp5 = guild_id ( first . useState ( 1 ) , 2 ) ;
first = tmp5 [ 0 ] ;
2026-07-20 16:05:17 +00:00
closure_6 = tmp5 [ 1 ] ;
2026-07-23 10:11:24 +00:00
ref = first . useRef ( first ) ;
2026-07-20 16:05:17 +00:00
ref . current = first ;
2026-07-23 10:11:24 +00:00
let obj = substr ( 566 ) ;
2026-07-20 16:05:17 +00:00
const items = [ closure_12 ] ;
const items1 = [ tmp , guild_id , first , tmp3 ] ;
const stateFromStoresObject = obj . useStateFromStoresObject ( items , ( ) = > {
let obj = { } ;
2026-07-23 10:11:24 +00:00
obj = { query : substr , guildId : guild_id , page : first , integrationType : substr ( _undefined [ 17 ] ) . ApplicationIntegrationType . USER_INSTALL , minUserInstallCommandCount : 1 , excludeAppsWithCustomInstallUrl : true , excludeNonEmbeddedApps : _undefined , excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand : true , source : substr ( _undefined [ 18 ] ) . SearchAppsRequestSource . APP_LAUNCHER } ;
2026-07-20 16:05:17 +00:00
let totalPages ;
2026-07-23 10:11:24 +00:00
obj . fetchState = outer1_12 . getFetchState ( obj ) ;
obj = { query : substr , guildId : guild_id , page : first , integrationType : substr ( _undefined [ 17 ] ) . ApplicationIntegrationType . USER_INSTALL , minUserInstallCommandCount : 1 , excludeAppsWithCustomInstallUrl : true , excludeNonEmbeddedApps : _undefined , excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand : true , source : substr ( _undefined [ 18 ] ) . SearchAppsRequestSource . APP_LAUNCHER } ;
const searchResults = outer1_12 . getSearchResults ( obj ) ;
2026-07-20 16:05:17 +00:00
if ( null != searchResults ) {
totalPages = searchResults . totalPages ;
}
let num = 0 ;
if ( null != totalPages ) {
num = totalPages ;
}
obj . totalPages = num ;
return obj ;
} , items1 ) ;
fetchState = stateFromStoresObject . fetchState ;
totalPages = stateFromStoresObject . totalPages ;
const items2 = [ fetchState , guild_id , tmp , first , tmp3 ] ;
2026-07-23 10:11:24 +00:00
memo = first . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
const obj = { } ;
2026-07-23 10:11:24 +00:00
if ( fetchState !== outer1_13 . FETCHED ) {
if ( fetchState !== outer1_13 . ERROR ) {
2026-07-20 16:05:17 +00:00
let diff = first - 1 ;
}
obj . length = diff ;
return tmp2 ( obj , ( arg0 , arg1 ) = > {
let results ;
2026-07-27 11:26:19 +00:00
const searchResults = outer2_12 . getSearchResults ( { query : outer1_0 , guildId : outer1_4 , page : arg1 + 1 , integrationType : substr ( 5655 ) . ApplicationIntegrationType . USER_INSTALL , minUserInstallCommandCount : 1 , excludeAppsWithCustomInstallUrl : true , excludeNonEmbeddedApps : outer1_3 , excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand : true , source : substr ( 11181 ) . SearchAppsRequestSource . APP_LAUNCHER } ) ;
2026-07-20 16:05:17 +00:00
if ( null != searchResults ) {
results = searchResults . results ;
}
if ( null == results ) {
results = [ ] ;
}
return results ;
} ) ;
}
diff = first ;
} , items2 ) ;
const items3 = [ fetchState , num , memo , totalPages ] ;
const items4 = [ tmp3 ] ;
2026-07-23 10:11:24 +00:00
const callback = first . useCallback ( ( ) = > {
let tmp = fetchState === outer1_13 . FETCHED ;
2026-07-20 16:05:17 +00:00
if ( tmp ) {
tmp = length === ref . current ;
}
if ( tmp ) {
tmp = length > 0 ;
}
if ( tmp ) {
tmp = length < totalPages ;
}
if ( tmp ) {
tmp = length < num ;
}
if ( tmp ) {
tmp = memo [ length - 1 ] . length > 0 ;
}
if ( tmp ) {
ref . current = ref . current + 1 ;
callback ( ( arg0 ) = > arg0 + 1 ) ;
}
} , items3 ) ;
2026-07-23 10:11:24 +00:00
callback1 = first . useCallback ( ( arg0 ) = > {
2026-07-20 16:05:17 +00:00
let guildId ;
let page ;
let query ;
( { query , page , guildId } = arg0 ) ;
2026-07-23 10:11:24 +00:00
let obj = num ( _undefined [ 19 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { query , guildId } ;
2026-07-23 10:11:24 +00:00
obj = { page , integrationType : substr ( _undefined [ 17 ] ) . ApplicationIntegrationType . USER_INSTALL , minUserInstallCommandCount : 1 , excludeAppsWithCustomInstallUrl : true , excludeNonEmbeddedApps : _undefined , excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand : true , source : substr ( _undefined [ 18 ] ) . SearchAppsRequestSource . APP_LAUNCHER } ;
2026-07-20 16:05:17 +00:00
obj . options = obj ;
obj . search ( obj ) ;
} , items4 ) ;
const items5 = [ tmp , guild_id , callback1 , first , flag ] ;
2026-07-23 10:11:24 +00:00
const effect = first . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( flag ) {
const obj = { query : substr , page : first , guildId : guild_id } ;
callback1 ( obj ) ;
}
} , items5 ) ;
const items6 = [ guild_id , tmp ] ;
2026-07-23 10:11:24 +00:00
const effect1 = first . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
callback ( 1 ) ;
} , items6 ) ;
obj = { fetchState , applicationResults : memo.flat ( ) , fetchNextPage : callback } ;
return obj ;
} ;