2026-07-23 10:11:24 +00:00
// Module ID: 9312
// Function ID: 72755
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 5, 9313, 6830, 1348, 1917, 4946, 4349, 4222, 3758, 4142, 1849, 7622, 653, 4317, 4353, 1881, 5675, 7005, 4619, 3747, 3831, 1212, 9314, 9315, 1872, 4099, 4100, 9145, 7007, 7009, 4324, 5492, 4312, 21, 3830, 9439, 14, 22, 477, 1555, 675, 9440, 6691, 4979, 4062, 9444, 9474, 2]
2026-07-20 16:05:17 +00:00
// Exports: canAddNewReactions, clearRows, findMessageIndex, findMessageIndexInRows, getChatRef, getLongPressSelectedMedia, getVoiceChannelIdChangedAuthorIds, getVoiceStateChannelSummaryFromVoiceStates, handleAddOrRemoveReaction, handleCopyLinkForumPost, handleFirstLayout, handleLongPressSticker, handleMediaPlayFinishedAnalytics, handleMessageVisibilityChanged, handleTapNavBar, handleTapTableView, handleToggleFollowForumPost, handleVisibleMessagesChange, isLoadingAtTop, jumpToPresent, loadMoreAfter, loadMoreBefore, scrollToBottom, scrollToMessageIdWithRescroll, scrollToNewMessages, scrollToRelativeOffset, scrollToTop, scrollToTopMessage, shouldJumpToOriginalPost, startOrCancelChannelLatestMessagesLoad, syncMessageDisplay, toObscuredMedia
2026-07-23 10:11:24 +00:00
// Module 9312 (_createForOfIteratorHelperLoose)
import _slicedToArray from "_slicedToArray" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import { updateShouldShowJumpToPresentButton as closure_5 } from "getChatInputContainerHeight" ;
import closure_6 from "_isNativeReflectConstruct" ;
import closure_7 from "_isNativeReflectConstruct" ;
import closure_8 from "_isNativeReflectConstruct" ;
import closure_9 from "_isNativeReflectConstruct" ;
import closure_10 from "_isNativeReflectConstruct" ;
import closure_11 from "_isNativeReflectConstruct" ;
import closure_12 from "_isNativeReflectConstruct" ;
import closure_13 from "_isNativeReflectConstruct" ;
import closure_14 from "_isNativeReflectConstruct" ;
import Changeset from "Changeset" ;
import ME from "ME" ;
let closure_15 ;
let closure_16 ;
let closure_17 ;
let closure_18 ;
let closure_19 ;
let closure_20 ;
let closure_21 ;
let 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 getVisibleMessages ( arg0 ) {
let chatManager ;
let firstVisibleMessagePercentVisible ;
let firstVisibleMessageRowIndex ;
let lastVisibleMessagePercentVisible ;
let lastVisibleMessageRowIndex ;
( { firstVisibleMessageRowIndex , lastVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessagePercentVisible , chatManager } = arg0 ) ;
if ( null != firstVisibleMessageRowIndex ) {
if ( null != lastVisibleMessageRowIndex ) {
if ( firstVisibleMessageRowIndex >= 0 ) {
if ( lastVisibleMessageRowIndex >= 0 ) {
if ( null != chatManager . _rows ) {
if ( null != chatManager . _messages ) {
const items = [ ] ;
let diff = firstVisibleMessageRowIndex ;
if ( firstVisibleMessageRowIndex >= lastVisibleMessageRowIndex ) {
do {
let tmp2 = chatManager . _rows [ diff ] ;
let tmp3 = tmp12 ;
let tmp4 = tmp13 ;
let tmp5 = tmp14 ;
if ( null != tmp2 ) {
2026-07-23 10:11:24 +00:00
let tmp15 = constants ;
2026-07-20 16:05:17 +00:00
tmp3 = tmp12 ;
tmp4 = tmp13 ;
tmp5 = tmp14 ;
2026-07-23 10:11:24 +00:00
if ( tmp2 . type === constants . MESSAGE ) {
2026-07-20 16:05:17 +00:00
let message = tmp2 . message ;
let id ;
if ( null != message ) {
id = message . id ;
}
tmp3 = message ;
tmp4 = tmp13 ;
tmp5 = tmp14 ;
if ( null != id ) {
if ( diff !== firstVisibleMessageRowIndex ) {
let tmp7 = diff === lastVisibleMessageRowIndex && null != lastVisibleMessagePercentVisible ;
let num = 1 ;
if ( tmp7 ) {
num = lastVisibleMessagePercentVisible ;
}
} else {
num = firstVisibleMessagePercentVisible ;
}
2026-07-23 10:11:24 +00:00
let tmp8 = message ;
message = message . getMessage ( tmp , tmp2 . message . id ) ;
2026-07-20 16:05:17 +00:00
tmp3 = message ;
tmp4 = num ;
tmp5 = message ;
if ( null != message ) {
let obj = { message , percentVisible : num , state : message.state } ;
let arr = items . push ( obj ) ;
tmp3 = message ;
tmp4 = num ;
tmp5 = message ;
}
}
}
}
diff = diff - 1 ;
2026-07-23 10:11:24 +00:00
tmp12 = tmp3 ;
tmp13 = tmp4 ;
tmp14 = tmp5 ;
2026-07-20 16:05:17 +00:00
} while ( diff >= lastVisibleMessageRowIndex ) ;
}
return items ;
}
}
}
}
}
}
return [ ] ;
}
function recordTimings ( arg0 , arr ) {
const mapped = arr . map ( ( id ) = > id . id ) ;
let hasFetched = arr . hasFetched ;
if ( ! hasFetched ) {
hasFetched = arr . ready && ! arr . cached ;
const tmp2 = arr . ready && ! arr . cached ;
}
2026-07-23 10:11:24 +00:00
importDefault ( 14 ) . recordMessageRender ( arg0 , mapped , hasFetched , arr . hasMoreAfter ) ;
2026-07-20 16:05:17 +00:00
}
function getMessage ( toArray ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg1 ;
return importDefault ( 22 ) . find ( toArray . toArray ( ) , ( id ) = > {
let tmp2 = id . id === closure_0 ;
2026-07-20 16:05:17 +00:00
if ( ! tmp2 ) {
2026-07-23 10:11:24 +00:00
tmp2 = tmp === closure_0 ;
2026-07-20 16:05:17 +00:00
}
return tmp2 ;
} ) ;
}
function _handleTapNavBar() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = callback2 ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
function maybeRescrollToMessageId ( arg0 , jumpType ) {
2026-07-23 10:11:24 +00:00
let _slicedToArray ;
let dependencyMap ;
let importDefault ;
2026-07-20 16:05:17 +00:00
let updateRowsEnabled ;
2026-07-23 10:11:24 +00:00
const _require = arg0 ;
( { chatRef : importDefault , findMessageIndex : dependencyMap , updateRows : _slicedToArray , updateRowsEnabled } = jumpType ) ;
let _isNativeReflectConstruct = undefined !== updateRowsEnabled && updateRowsEnabled ;
2026-07-20 16:05:17 +00:00
let INSTANT = jumpType . jumpType ;
if ( undefined === INSTANT ) {
2026-07-23 10:11:24 +00:00
INSTANT = _require ( 4062 ) . JumpType . INSTANT ;
2026-07-20 16:05:17 +00:00
}
if ( null != arg0 ) {
const _setTimeout = setTimeout ;
const timerId = setTimeout ( ( ) = > {
2026-07-23 10:11:24 +00:00
const tmp = callback2 ( callback ) ;
2026-07-20 16:05:17 +00:00
if ( null != tmp ) {
if ( null != ref . current ) {
let flag2 = false ;
2026-07-23 10:11:24 +00:00
if ( _isNativeReflectConstruct ) {
let obj = { scrollToMessageId : callback , jumpTargetId : callback , jumpType : INSTANT , focusTargetId : callback , overrideScrollJumpType : callback ( outer1_2 [ 45 ] ) . JumpType . INSTANT , isRescrolling : true } ;
callback3 ( obj ) ;
2026-07-20 16:05:17 +00:00
flag2 = true ;
}
if ( ! flag2 ) {
2026-07-23 10:11:24 +00:00
obj = { animated : INSTANT === callback ( outer1_2 [ 45 ] ) . JumpType . ANIMATED } ;
outer1_1 ( outer1_2 [ 42 ] ) . scrollTo ( ref . current , tmp , obj ) ;
const obj2 = outer1_1 ( outer1_2 [ 42 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
}
} , 50 ) ;
}
}
function parseVoiceStateChannelIdSummary ( voiceChannelIdChangedAuthorIds ) {
let iter ;
let tmp3 ;
let tmp4 ;
const map = new Map ( ) ;
if ( null != voiceChannelIdChangedAuthorIds ) {
if ( "" !== voiceChannelIdChangedAuthorIds ) {
const tmp7 = _createForOfIteratorHelperLoose ( voiceChannelIdChangedAuthorIds . split ( "|" ) ) ;
let iter2 = tmp7 ( ) ;
if ( ! iter2 . done ) {
do {
let str = iter2 . value ;
2026-07-23 10:11:24 +00:00
let tmp = callback ;
let tmp2 = callback ( str . split ( ":" ) , 2 ) ;
2026-07-20 16:05:17 +00:00
[ tmp3 , tmp4 ] = tmp2 ;
if ( null != tmp3 ) {
let str2 = "" ;
if ( null != tmp4 ) {
str2 = tmp4 ;
}
let result = map . set ( tmp3 , str2 ) ;
}
iter = tmp7 ( ) ;
iter2 = iter ;
} while ( ! iter . done ) ;
}
return map ;
}
}
return map ;
}
2026-07-23 10:11:24 +00:00
( { RowType : closure_15 , Changeset : closure_16 } = Changeset ) ;
( { AnalyticEvents : closure_17 , MessageEmbedTypes : closure_18 , MessageTypes : closure_19 , Permissions : closure_20 , MAX_MESSAGES_PER_CHANNEL : closure_21 } = ME ) ;
let result = require ( "getChatInputContainerHeight" ) . fileFinishedImporting ( "modules/messages/native/MessagesUtils.tsx" ) ;
2026-07-20 16:05:17 +00:00
export const getLongPressSelectedMedia = function getLongPressSelectedMedia ( message , mediaIndex , mediaType , arg3 , componentMediaIndex ) {
let content_type ;
function getEmbedMedia ( image , url , contentType ) {
2026-07-23 10:11:24 +00:00
return { sourceType : "embed" , source : closure_0 , mediaType : image , mediaUrl : url , contentType } ;
2026-07-20 16:05:17 +00:00
}
let obj = message ;
2026-07-23 10:11:24 +00:00
if ( message . type === constants5 . THREAD_STARTER_MESSAGE ) {
2026-07-20 16:05:17 +00:00
obj = message ;
if ( null != message . messageReference ) {
message = messageByReference . getMessageByReference ( message . messageReference ) . message ;
obj = message ;
if ( null != message ) {
obj = message ;
}
}
}
if ( "attachment" === mediaType ) {
let tmp15 = obj . attachments [ mediaIndex ] ;
if ( null == tmp15 ) {
const contentMessage = obj . getContentMessage ( ) ;
let tmp18 ;
if ( null != contentMessage ) {
tmp18 = contentMessage . attachments [ mediaIndex ] ;
}
tmp15 = tmp18 ;
}
let tmp19 = null ;
if ( null != tmp15 ) {
obj = { sourceType : "attachment" , source : tmp15 } ;
let str7 = "video" ;
if ( ! obj5 . isVideoFile ( tmp15 . filename ) ) {
let str8 = "audio" ;
if ( ! obj6 . isAudioFile ( tmp15 . filename ) ) {
let str9 = "file" ;
if ( obj7 . isImageFile ( tmp15 . filename ) ) {
str9 = "image" ;
}
str8 = str9 ;
2026-07-23 10:11:24 +00:00
obj7 = require ( 4317 ) /* urlMatchesFileExtension */ ;
2026-07-20 16:05:17 +00:00
}
str7 = str8 ;
2026-07-23 10:11:24 +00:00
obj6 = require ( 4317 ) /* urlMatchesFileExtension */ ;
2026-07-20 16:05:17 +00:00
}
obj . mediaType = str7 ;
( { url : obj4.mediaUrl , content_type } = tmp15 ) ;
let tmp26 ;
if ( null != content_type ) {
tmp26 = content_type ;
}
obj . contentType = tmp26 ;
tmp19 = obj ;
2026-07-23 10:11:24 +00:00
obj5 = require ( 4317 ) /* urlMatchesFileExtension */ ;
2026-07-20 16:05:17 +00:00
}
return tmp19 ;
} else if ( "embed" === mediaType ) {
2026-07-23 10:11:24 +00:00
require = tmp8 ;
2026-07-20 16:05:17 +00:00
if ( null == obj . embeds [ mediaIndex ] ) {
return null ;
} else {
2026-07-23 10:11:24 +00:00
if ( tmp8 . type === constants4 . IMAGE ) {
2026-07-20 16:05:17 +00:00
if ( null != tmp8 . url ) {
return getEmbedMedia ( "image" , tmp8 . url ) ;
}
}
2026-07-23 10:11:24 +00:00
if ( tmp8 . type === constants4 . GIFV ) {
2026-07-20 16:05:17 +00:00
const video = tmp8 . video ;
let url ;
if ( null != video ) {
url = video . url ;
}
if ( null != url ) {
if ( null != tmp8 . video . proxyURL ) {
if ( "" !== tmp8 . video . proxyURL ) {
url = tmp8 . video . proxyURL ;
}
return getEmbedMedia ( "video" , url , tmp8 . video . contentType ) ;
}
url = tmp8 . video . url ;
}
}
2026-07-23 10:11:24 +00:00
if ( tmp8 . type === constants4 . RICH ) {
2026-07-20 16:05:17 +00:00
const image = tmp8 . image ;
let url1 ;
if ( null != image ) {
url1 = image . url ;
}
if ( null != url1 ) {
return getEmbedMedia ( "image" , tmp8 . image . url , tmp8 . image . contentType ) ;
} else {
const video2 = tmp8 . video ;
let url2 ;
if ( null != video2 ) {
url2 = video2 . url ;
}
if ( null != url2 ) {
return getEmbedMedia ( "video" , tmp8 . video . url , tmp8 . video . contentType ) ;
}
}
}
return null ;
}
} else if ( "component" === mediaType ) {
if ( null == arg3 ) {
return null ;
} else {
2026-07-23 10:11:24 +00:00
const obj8 = require ( 4353 ) /* _createForOfIteratorHelperLoose */ ;
const value = require ( 4353 ) /* _createForOfIteratorHelperLoose */ . flattenComponents ( obj . components ) . get ( arg3 ) ;
2026-07-20 16:05:17 +00:00
if ( null == value ) {
return null ;
2026-07-23 10:11:24 +00:00
} else if ( value . type === require ( 1881 ) /* PermissionOverwriteType */ . ComponentType . MEDIA_GALLERY ) {
2026-07-20 16:05:17 +00:00
if ( null == componentMediaIndex ) {
return null ;
} else if ( null == value . items [ componentMediaIndex ] ) {
return null ;
} else {
const media = tmp5 . media ;
obj = { sourceType : "component" , source : value } ;
let str = "image" ;
if ( obj3 . isVideoContentType ( media . contentType ) ) {
str = "video" ;
}
obj . mediaType = str ;
obj . mediaUrl = media . url ;
return obj ;
}
} else {
return null ;
}
2026-07-23 10:11:24 +00:00
const flattenComponentsResult = require ( 4353 ) /* _createForOfIteratorHelperLoose */ . flattenComponents ( obj . components ) ;
2026-07-20 16:05:17 +00:00
}
} else {
return null ;
}
} ;
export const toObscuredMedia = function toObscuredMedia ( sourceType ) {
if ( "attachment" === sourceType . sourceType ) {
2026-07-23 10:11:24 +00:00
let obj = { type : require ( 5675 ) /* ContentHarmTypeChannel */ . ObscuredMediaTypes . Attachment , media : sourceType.source } ;
2026-07-20 16:05:17 +00:00
let tmp = obj ;
} else {
tmp = null ;
if ( "embed" === sourceType . sourceType ) {
2026-07-23 10:11:24 +00:00
obj = { type : require ( 5675 ) /* ContentHarmTypeChannel */ . ObscuredMediaTypes . Embed , media : sourceType.source } ;
2026-07-20 16:05:17 +00:00
tmp = obj ;
}
}
return tmp ;
} ;
2026-07-21 06:55:02 +00:00
export const handleAddOrRemoveReaction = function handleAddOrRemoveReaction ( messageId , channel , reaction , isBurst , MESSAGE ) {
2026-07-20 16:05:17 +00:00
let flag = isBurst ;
if ( isBurst === undefined ) {
flag = false ;
}
if ( MESSAGE === undefined ) {
2026-07-23 10:11:24 +00:00
MESSAGE = require ( 7005 ) /* checkReactionResponse */ . ReactionLocations . MESSAGE ;
2026-07-20 16:05:17 +00:00
}
const guildId = channel . getGuildId ( ) ;
2026-07-23 10:11:24 +00:00
currentUser = currentUser . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
if ( null != currentUser ) {
2026-07-21 06:55:02 +00:00
const id = currentUser . id ;
2026-07-20 16:05:17 +00:00
}
let canChatInGuildResult = null != guildId ;
if ( canChatInGuildResult ) {
canChatInGuildResult = closure_9 . canChatInGuild ( guildId ) ;
}
let result = null != guildId ;
if ( result ) {
2026-07-23 10:11:24 +00:00
let openResult = require ( 4619 ) /* shouldShowMembershipVerificationGate */ ;
2026-07-20 16:05:17 +00:00
result = openResult . shouldShowMembershipVerificationGate ( guildId ) ;
}
let member = null ;
if ( null != guildId ) {
member = null ;
if ( null != id ) {
member = member . getMember ( guildId , id ) ;
}
}
2026-07-23 10:11:24 +00:00
let obj1 = require ( 3747 ) /* isCommunicationDisabled */ ;
2026-07-20 16:05:17 +00:00
const result1 = obj1 . isMemberCommunicationDisabled ( member ) ;
if ( channel . isArchivedLockedThread ( ) ) {
openResult = { key : "ARCHIVED_POST_REACTIONS_DISABLED_TOAST" } ;
2026-07-23 10:11:24 +00:00
const obj14 = importDefault ( 3831 ) ;
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
const string = intl . string ;
2026-07-23 10:11:24 +00:00
let t = require ( 1212 ) /* getSystemLocale */ . t ;
2026-07-20 16:05:17 +00:00
if ( isForumPostResult ) {
let stringResult = string ( t . EJQrFq ) ;
} else {
stringResult = string ( t . X2L3Oa ) ;
}
openResult . content = stringResult ;
t = dependencyMap ;
2026-07-23 10:11:24 +00:00
openResult . icon = importDefault ( 9314 ) ;
2026-07-20 16:05:17 +00:00
openResult = obj14 . open ( openResult ) ;
2026-07-23 10:11:24 +00:00
isForumPostResult = channel . isForumPost ( ) ;
2026-07-20 16:05:17 +00:00
} else if ( null != reaction ) {
if ( flag ) {
if ( true === ! reaction . me_burst ) {
if ( ! obj5 . isPremium ( currentUser ) ) {
2026-07-23 10:11:24 +00:00
return require ( 9315 ) /* handleOutOfSuperReactions */ . handleOutOfSuperReactions ( ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj5 = require ( 1872 ) /* isPremiumAtLeast */ ;
2026-07-20 16:05:17 +00:00
}
}
if ( true !== reaction . me ) {
if ( ! result ) {
if ( channel . isPrivate ( ) ) {
if ( ! result1 ) {
2026-07-23 10:11:24 +00:00
const obj7 = require ( 7005 ) /* checkReactionResponse */ ;
2026-07-20 16:05:17 +00:00
const obj = { burst : flag } ;
2026-07-21 06:55:02 +00:00
obj7 . addReaction ( channel . id , messageId , reaction . emoji , MESSAGE , obj ) ;
2026-07-20 16:05:17 +00:00
if ( ! flag ) {
2026-07-23 10:11:24 +00:00
const result2 = require ( 4099 ) /* getAndroidLightImpactEffect */ . triggerHapticFeedback ( importDefault ( 4100 ) . IMPACT_LIGHT ) ;
const obj9 = require ( 4099 ) /* getAndroidLightImpactEffect */ ;
2026-07-20 16:05:17 +00:00
}
}
}
}
if ( result ) {
const guildId1 = channel . getGuildId ( ) ;
if ( null != guildId1 ) {
2026-07-23 10:11:24 +00:00
return require ( 9145 ) /* openMemberVerificationModal */ . openMemberVerificationModal ( guildId1 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
const result3 = require ( 4099 ) /* getAndroidLightImpactEffect */ . triggerHapticFeedback ( importDefault ( 4100 ) . IMPACT_LIGHT ) ;
const obj10 = require ( 4099 ) /* getAndroidLightImpactEffect */ ;
2026-07-21 06:55:02 +00:00
obj1 = { channelId : channel.id , messageId , emoji : reaction.emoji , location : MESSAGE } ;
2026-07-20 16:05:17 +00:00
let obj2 = { burst : flag } ;
obj1 . options = obj2 ;
2026-07-23 10:11:24 +00:00
require ( 7005 ) /* checkReactionResponse */ . removeReaction ( obj1 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
obj2 = require ( 9315 ) /* handleOutOfSuperReactions */ ;
2026-07-20 16:05:17 +00:00
const obj3 = { burst : flag } ;
2026-07-21 06:55:02 +00:00
const result4 = obj2 . handleAddNewReactions ( channel , messageId , MESSAGE , obj3 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
2026-07-23 10:11:24 +00:00
export const handleToggleFollowForumPost = function handleToggleFollowForumPost ( channel , outer2_21 ) {
const result = require ( 4099 ) /* getAndroidLightImpactEffect */ . triggerHapticFeedback ( importDefault ( 4100 ) . IMPACT_LIGHT ) ;
const obj2 = importDefault ( 7007 ) ;
if ( outer2_21 ) {
2026-07-20 16:05:17 +00:00
obj2 . leaveThread ( channel , "iOS Forum Toolbar" ) ;
} else {
obj2 . joinThread ( channel , "iOS Forum Toolbar" ) ;
}
} ;
export const handleCopyLinkForumPost = function handleCopyLinkForumPost ( guildId , id , location ) {
const channel = store . getChannel ( id ) ;
let parent_id ;
if ( null != channel ) {
parent_id = channel . parent_id ;
}
const channel1 = store . getChannel ( parent_id ) ;
let isMediaChannelResult ;
if ( null != channel1 ) {
isMediaChannelResult = channel1 . isMediaChannel ( ) ;
}
let obj = { postId : id , location } ;
2026-07-23 10:11:24 +00:00
const result = require ( 7009 ) /* trackForumChannelSeenBatch */ . trackForumPostLinkCopied ( obj ) ;
2026-07-20 16:05:17 +00:00
if ( null != isMediaChannelResult && isMediaChannelResult ) {
obj = { media_post_id : id } ;
2026-07-23 10:11:24 +00:00
require ( 4324 ) /* _createForOfIteratorHelperLoose */ . trackWithMetadata ( constants3 . MEDIA_POST_SHARE_PROMPT_CLICKED , obj ) ;
const obj4 = require ( 4324 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj2 = require ( 7009 ) /* trackForumChannelSeenBatch */ ;
const result1 = require ( 4099 ) /* getAndroidLightImpactEffect */ . triggerHapticFeedback ( importDefault ( 4100 ) . IMPACT_LIGHT ) ;
2026-07-20 16:05:17 +00:00
if ( null == channel ) {
2026-07-23 10:11:24 +00:00
const obj9 = require ( 5492 ) /* _copy */ ;
2026-07-20 16:05:17 +00:00
let result2 ;
if ( true === tmp5 ) {
2026-07-23 10:11:24 +00:00
result2 = importDefault ( 21 ) . castChannelIdAsMessageId ( id ) ;
const obj11 = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj9 . copy ( require ( 4312 ) /* _createForOfIteratorHelperLoose */ . getChannelPermalink ( guildId , id , result2 ) ) ;
const obj10 = require ( 4312 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const obj7 = require ( 5492 ) /* _copy */ ;
obj7 . copy ( require ( 4312 ) /* _createForOfIteratorHelperLoose */ . getChannelLinkToCopy ( channel , channel1 ) ) ;
const obj8 = require ( 4312 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj6 = require ( 4099 ) /* getAndroidLightImpactEffect */ ;
require ( 3830 ) /* presentAddedFriendToast */ . presentLinkCopied ( ) ;
2026-07-20 16:05:17 +00:00
} ;
export const findMessageIndex = function findMessageIndex ( rows , focusTargetId ) {
if ( null != focusTargetId ) {
2026-07-23 10:11:24 +00:00
return require ( 9439 ) /* findMessageRowIndex */ . findMessageRowIndex ( rows , focusTargetId ) ;
2026-07-20 16:05:17 +00:00
}
} ;
export { getVisibleMessages } ;
export const shouldJumpToOriginalPost = function shouldJumpToOriginalPost ( hasJumpedToOriginalPost , id ) {
let isForumPostResult = hasJumpedToOriginalPost . isForumPost ( ) ;
if ( isForumPostResult ) {
2026-07-23 10:11:24 +00:00
isForumPostResult = importDefault ( 21 ) . castChannelIdAsMessageId ( id ) === arg2 . jumpTargetId ;
const obj = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
if ( isForumPostResult ) {
isForumPostResult = ! arg3 ;
}
return isForumPostResult ;
} ;
export const startOrCancelChannelLatestMessagesLoad = function startOrCancelChannelLatestMessagesLoad ( hasJumpedToOriginalPost ) {
if ( null == hasJumpedToOriginalPost . jumpTargetId ) {
if ( null == hasJumpedToOriginalPost . oldestUnreadMessageId ) {
if ( ! hasJumpedToOriginalPost . shouldJumpToOriginalPost ) {
const tracker = hasJumpedToOriginalPost . tracker ;
const obj = { channelId : hasJumpedToOriginalPost.channelId } ;
tracker . start ( obj ) ;
}
}
}
const tracker2 = hasJumpedToOriginalPost . tracker ;
tracker2 . cancel ( ) ;
} ;
export { recordTimings } ;
export const findMessageIndexInRows = function findMessageIndexInRows ( focusTargetId , rows ) {
if ( null != focusTargetId ) {
2026-07-23 10:11:24 +00:00
return require ( 9439 ) /* findMessageRowIndex */ . findMessageRowIndex ( rows , focusTargetId ) ;
2026-07-20 16:05:17 +00:00
}
} ;
export { getMessage } ;
export const isLoadingAtTop = function isLoadingAtTop ( arg0 , arg1 ) {
if ( arg1 ) {
const tmp3 = _createForOfIteratorHelperLoose ( arg0 ) ;
const iter = tmp3 ( ) ;
let iter2 = iter ;
if ( ! iter . done ) {
const value = iter2 . value ;
2026-07-23 10:11:24 +00:00
while ( value . changeType !== constants2 . INSERT ) {
2026-07-20 16:05:17 +00:00
let iter3 = tmp3 ( ) ;
iter2 = iter3 ;
}
return value . index <= 1 ;
}
return false ;
} else {
return false ;
}
} ;
export const handleTapTableView = function handleTapTableView ( current ) {
2026-07-23 10:11:24 +00:00
let isIOSResult = require ( 477 ) /* set */ . isIOS ( ) ;
2026-07-20 16:05:17 +00:00
if ( isIOSResult ) {
2026-07-23 10:11:24 +00:00
isIOSResult = arg1 !== require ( 1555 ) /* KeyboardTypes */ . KeyboardTypes . SYSTEM ;
2026-07-20 16:05:17 +00:00
}
if ( isIOSResult ) {
current = current . current ;
if ( null != current ) {
current . closeCustomKeyboard ( ) ;
}
}
} ;
export const handleMediaPlayFinishedAnalytics = function handleMediaPlayFinishedAnalytics ( playWallTimeMs ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 675 ) ;
2026-07-20 16:05:17 +00:00
obj = { play_time_sec : playWallTimeMs.playWallTimeMs / 1000 , play_wall_time_ms : playWallTimeMs.playWallTimeMs , first_play_waiting_ms : Math.min ( playWallTimeMs . firstPlayWaitingMs , 600000 ) , stall_count : playWallTimeMs.stallCount , stall_ms : playWallTimeMs.stallMs , seek_count : playWallTimeMs.seekCount , seek_waiting_ms : null , media_source : playWallTimeMs.mediaSource } ;
let mimeType = null ;
if ( null != playWallTimeMs . mimeType ) {
mimeType = null ;
if ( "" !== playWallTimeMs . mimeType ) {
mimeType = playWallTimeMs . mimeType ;
}
}
obj . mime_type = mimeType ;
obj . file_size = null ;
obj . file_duration_sec = playWallTimeMs . fileDurationSec ;
obj . connection_type = store2 . getType ( ) ;
obj . effective_connection_speed = store2 . getEffectiveConnectionSpeed ( ) ;
obj . service_provider = store2 . getServiceProvider ( ) ;
2026-07-23 10:11:24 +00:00
obj . track ( constants3 . MEDIA_PLAY_FINISHED , obj ) ;
2026-07-20 16:05:17 +00:00
} ;
export const scrollToBottom = function scrollToBottom ( current ) {
let flag = arg3 ;
if ( arg3 === undefined ) {
flag = true ;
}
arg2 ( { eventTimestamp : Date.now ( ) , isAtBottom : true } ) ;
const obj = { eventTimestamp : Date.now ( ) , isAtBottom : true } ;
if ( flag ) {
flag = ! arg1 ;
}
2026-07-23 10:11:24 +00:00
importDefault ( 9440 ) . scrollToBottom ( current . current , flag ) ;
2026-07-20 16:05:17 +00:00
} ;
export const scrollToTop = function scrollToTop ( current ) {
let flag = arg2 ;
if ( arg2 === undefined ) {
flag = true ;
}
if ( flag ) {
flag = ! arg1 ;
}
2026-07-23 10:11:24 +00:00
importDefault ( 9440 ) . scrollToTop ( current . current , flag ) ;
2026-07-20 16:05:17 +00:00
} ;
export const scrollToRelativeOffset = function scrollToRelativeOffset ( current ) {
let flag = arg3 ;
if ( arg3 === undefined ) {
flag = true ;
}
if ( flag ) {
flag = ! arg1 ;
}
2026-07-23 10:11:24 +00:00
const result = importDefault ( 9440 ) . scrollToRelativeOffset ( current . current , arg2 , flag ) ;
2026-07-20 16:05:17 +00:00
} ;
export const scrollToTopMessage = function scrollToTopMessage ( current , getPreviousRows ) {
const previousRows = getPreviousRows . getPreviousRows ( ) ;
if ( previousRows . length > 0 ) {
2026-07-23 10:11:24 +00:00
importDefault ( 9440 ) . scrollTo ( current . current , previousRows . length - 1 ) ;
const obj = importDefault ( 9440 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
export const canAddNewReactions = function canAddNewReactions ( isPrivate ) {
let canResult = arg1 ;
if ( arg1 ) {
2026-07-23 10:11:24 +00:00
canResult = closure_12 . can ( constants6 . ADD_REACTIONS , isPrivate ) ;
2026-07-20 16:05:17 +00:00
}
if ( ! canResult ) {
canResult = isPrivate . isPrivate ( ) ;
}
return canResult ;
} ;
export const loadMoreBefore = function loadMoreBefore ( channelId , hasMoreBefore ) {
arg2 ( true ) ;
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 6691 ) ;
2026-07-20 16:05:17 +00:00
obj = { channelId } ;
const firstResult = hasMoreBefore . first ( ) ;
let id ;
if ( null != firstResult ) {
id = firstResult . id ;
}
obj . before = id ;
obj . limit = closure_21 ;
const messages = obj . fetchMessages ( obj ) ;
}
} ;
export const loadMoreAfter = function loadMoreAfter ( channelId , hasMoreAfter ) {
arg2 ( true ) ;
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 6691 ) ;
2026-07-20 16:05:17 +00:00
obj = { channelId } ;
const lastResult = hasMoreAfter . last ( ) ;
let id ;
if ( null != lastResult ) {
id = lastResult . id ;
}
obj . after = id ;
obj . limit = closure_21 ;
const messages = obj . fetchMessages ( obj ) ;
}
} ;
export const clearRows = function clearRows ( current , clear ) {
2026-07-23 10:11:24 +00:00
const obj = { animated : false , hasHandledScroll : false , isNearBottom : false , isAtBottom : false , isNearTop : false , decelerating : false , dragging : false , hasMoreMessagesAfterForLastUpdate : false , pendingUpdatesQueue : [ ] , _loaded : false , animatingStickerMessageId : null } ;
2026-07-21 22:01:30 +00:00
arg4 ( obj ) ;
2026-07-20 16:05:17 +00:00
clear . clear ( ) ;
2026-07-23 10:11:24 +00:00
callback3 ( arg2 , arg3 , false ) ;
importDefault ( 9440 ) . clearRows ( current . current ) ;
2026-07-20 16:05:17 +00:00
} ;
export const handleFirstLayout = function handleFirstLayout ( arg0 , firstVisibleMessageRowIndex , lastVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessagePercentVisible ) {
2026-07-23 10:11:24 +00:00
arg0 ( { firstVisibleMessageRowIndex , lastVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessagePercentVisible , source : require ( 4979 ) /* QuestsVisibleMessagesChangedSource */ . QuestsVisibleMessagesChangedSource . FIRST_LAYOUT } ) ;
2026-07-20 16:05:17 +00:00
} ;
export const handleMessageVisibilityChanged = function handleMessageVisibilityChanged ( arg0 , firstVisibleMessageRowIndex , lastVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessagePercentVisible ) {
2026-07-23 10:11:24 +00:00
arg0 ( { firstVisibleMessageRowIndex , lastVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessagePercentVisible , source : require ( 4979 ) /* QuestsVisibleMessagesChangedSource */ . QuestsVisibleMessagesChangedSource . VISIBILITY_CHANGED } ) ;
2026-07-20 16:05:17 +00:00
} ;
export const handleLongPressSticker = function handleLongPressSticker ( arg0 , arg1 , arg2 ) {
const items = [ arg0 ] ;
const set = new Set ( items ) ;
if ( null != arg1 ) {
set . add ( arg1 ) ;
}
let tmp2 = null ;
if ( arg1 !== arg0 ) {
tmp2 = arg0 ;
}
arg2 ( { forceRender : true , updateMessageIds : set } ) ;
return tmp2 ;
} ;
export const handleTapNavBar = function handleTapNavBar() {
return _handleTapNavBar ( . . . arguments ) ;
} ;
export const jumpToPresent = function jumpToPresent ( jumpReturnTargetId , id ) {
if ( null == jumpReturnTargetId . jumpReturnTargetId ) {
if ( ! jumpReturnTargetId . loadingMore ) {
if ( jumpReturnTargetId . hasMoreAfter ) {
let obj = { channelId : id.id , limit : closure_21 } ;
obj = { present : true } ;
obj . jump = obj ;
2026-07-23 10:11:24 +00:00
const messages = importDefault ( 6691 ) . fetchMessages ( obj ) ;
const obj3 = importDefault ( 6691 ) ;
2026-07-20 16:05:17 +00:00
} else {
arg2 ( ) ;
}
}
} else {
2026-07-23 10:11:24 +00:00
obj = importDefault ( 6691 ) ;
2026-07-20 16:05:17 +00:00
const obj1 = { channelId : id.id , messageId : jumpReturnTargetId , flash : true } ;
obj . jumpToMessage ( obj1 ) ;
}
} ;
export const scrollToNewMessages = function scrollToNewMessages ( channel ) {
channel = channel . channel ;
let id = closure_13 . ackMessageId ( channel . id ) ;
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 6691 ) ;
2026-07-20 16:05:17 +00:00
obj = { channelId : channel.id } ;
if ( null == id ) {
id = channel . id ;
}
obj . messageId = id ;
obj . offset = 1 ;
obj . context = "Mark As Read" ;
obj . jumpToMessage ( obj ) ;
} ;
export const syncMessageDisplay = function syncMessageDisplay ( messages ) {
let scrollToMessageId ;
let updateRows ;
messages = messages . messages ;
const oldestUnreadMessageId = messages . oldestUnreadMessageId ;
( { updateRows , scrollToMessageId } = messages ) ;
if ( messages . isMessagesReady ) {
let obj = { } ;
( { jumpTargetId : obj.scrollToMessageId , jumpTargetId : obj.jumpTargetId } = messages ) ;
2026-07-23 10:11:24 +00:00
obj . jumpType = messages ( scrollToMessageId [ 45 ] ) . JumpType . INSTANT ;
2026-07-20 16:05:17 +00:00
obj . focusTargetId = messages . focusTargetId ;
updateRows ( obj ) ;
if ( null != messages . jumpTargetId ) {
obj = { } ;
( { jumpTargetId : obj2.scrollToMessageId , jumpTargetId : obj2.jumpTargetId } = messages ) ;
2026-07-23 10:11:24 +00:00
obj . jumpType = messages ( scrollToMessageId [ 45 ] ) . JumpType . INSTANT ;
2026-07-20 16:05:17 +00:00
scrollToMessageId ( obj ) ;
} else if ( null != oldestUnreadMessageId ) {
const _setTimeout = setTimeout ;
const timerId = setTimeout ( ( ) = > scrollToMessageId ( { scrollToMessageId : oldestUnreadMessageId , jumpTargetId : messages.jumpTargetId , jumpType : messages ( scrollToMessageId [ 45 ] ) . JumpType . INSTANT } ) , 50 ) ;
}
} else {
updateRows ( { } ) ;
}
recordTimings ( messages . channelId , messages ) ;
} ;
export function getChatRef ( arg0 ) {
return arg0 ;
}
export { maybeRescrollToMessageId } ;
export const scrollToMessageIdWithRescroll = function scrollToMessageIdWithRescroll ( scrollToMessageId ) {
let chatRef ;
let findMessageIndex ;
let updateRows ;
let useReducedMotion ;
scrollToMessageId = scrollToMessageId . scrollToMessageId ;
const jumpTargetId = scrollToMessageId . jumpTargetId ;
let tmp = null ;
if ( undefined !== jumpTargetId ) {
tmp = jumpTargetId ;
}
const importDefault = tmp ;
let ANIMATED = scrollToMessageId . jumpType ;
if ( undefined === ANIMATED ) {
2026-07-23 10:11:24 +00:00
ANIMATED = scrollToMessageId ( chatRef [ 45 ] ) . JumpType . ANIMATED ;
2026-07-20 16:05:17 +00:00
}
let TOP = scrollToMessageId . scrollPosition ;
if ( undefined === TOP ) {
2026-07-23 10:11:24 +00:00
TOP = scrollToMessageId ( chatRef [ 42 ] ) . ChatScrollPosition . TOP ;
2026-07-20 16:05:17 +00:00
}
const minimizeScrolling = scrollToMessageId . minimizeScrolling ;
const isRescrolling = scrollToMessageId . isRescrolling ;
( { useReducedMotion , chatRef } = scrollToMessageId ) ;
( { findMessageIndex , updateRows } = scrollToMessageId ) ;
if ( ! useReducedMotion ) {
2026-07-23 10:11:24 +00:00
useReducedMotion = ANIMATED === scrollToMessageId ( chatRef [ 45 ] ) . JumpType . INSTANT ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let _slicedToArray = tmp10 ;
let obj = scrollToMessageId ( chatRef [ 39 ] ) ;
2026-07-20 16:05:17 +00:00
if ( obj . isIOS ( ) ) {
if ( ! tmp7 ) {
obj = { chatRef , findMessageIndex , updateRows , updateRowsEnabled : true } ;
2026-07-23 10:11:24 +00:00
const JumpType = scrollToMessageId ( chatRef [ 45 ] ) . JumpType ;
2026-07-20 16:05:17 +00:00
obj . jumpType = tmp10 ? JumpType.ANIMATED : JumpType.INSTANT ;
maybeRescrollToMessageId ( scrollToMessageId , obj ) ;
const tmp11 = maybeRescrollToMessageId ;
}
}
const findMessageIndexResult = findMessageIndex ( scrollToMessageId ) ;
if ( null != findMessageIndexResult ) {
if ( tmp6 ) {
const _setTimeout = setTimeout ;
const timerId = setTimeout ( ( ) = > {
let obj = tmp ( chatRef [ 42 ] ) ;
2026-07-23 10:11:24 +00:00
obj = { animated : _slicedToArray , highlight : tmp === scrollToMessageId } ;
obj . scrollIntoView ( chatRef . current , _isNativeReflectConstruct , obj ) ;
2026-07-20 16:05:17 +00:00
} , 5 ) ;
} else {
obj = { animated : tmp10 , highlight : tmp === scrollToMessageId , position : TOP } ;
2026-07-23 10:11:24 +00:00
importDefault ( chatRef [ 42 ] ) . scrollTo ( chatRef . current , findMessageIndexResult , obj ) ;
const obj3 = importDefault ( chatRef [ 42 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
} ;
export const handleVisibleMessagesChange = function handleVisibleMessagesChange ( arg0 ) {
let channel ;
let firstVisibleMessagePercentVisible ;
let firstVisibleMessageRowIndex ;
let guildId ;
let lastVisibleMessagePercentVisible ;
let lastVisibleMessageRowIndex ;
let shouldTrackAnnouncementMessageViews ;
let shouldTrackOfficialMessageViews ;
let shouldTrackRichPresenceInviteEmbedViews ;
let shouldTrackVoiceInviteEmbedViews ;
( { firstVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessageRowIndex , lastVisibleMessagePercentVisible , shouldTrackAnnouncementMessageViews , shouldTrackOfficialMessageViews , shouldTrackRichPresenceInviteEmbedViews , shouldTrackVoiceInviteEmbedViews , guildId , channel } = arg0 ) ;
if ( null != firstVisibleMessageRowIndex ) {
if ( null != lastVisibleMessageRowIndex ) {
if ( null != firstVisibleMessagePercentVisible ) {
if ( null != lastVisibleMessagePercentVisible ) {
let obj = { firstVisibleMessageRowIndex , lastVisibleMessageRowIndex , firstVisibleMessagePercentVisible , lastVisibleMessagePercentVisible , chatManager : tmp2 , channelId : tmp3 } ;
const arr = getVisibleMessages ( obj ) ;
if ( arr . length > 0 ) {
obj = { visibleMessages : arr , source : tmp } ;
2026-07-23 10:11:24 +00:00
const result = require ( 9444 ) /* _manuallyStartConsoleQuest */ . questsVisibleMobileMessagesChanged ( obj ) ;
const obj4 = require ( 9474 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
const result1 = obj4 . handleAnnouncementMessageViewTracking ( arr , shouldTrackAnnouncementMessageViews , guildId , channel ) ;
2026-07-23 10:11:24 +00:00
const obj5 = require ( 9474 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
const result2 = obj5 . handleOfficialMessageViewTracking ( arr , shouldTrackOfficialMessageViews , guildId , channel ) ;
2026-07-23 10:11:24 +00:00
const obj6 = require ( 9474 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
const result3 = obj6 . handleRichPresenceInviteEmbedViewTracking ( arr , shouldTrackRichPresenceInviteEmbedViews , guildId , channel ) ;
2026-07-23 10:11:24 +00:00
const obj7 = require ( 9474 ) /* _createForOfIteratorHelperLoose */ ;
2026-07-20 16:05:17 +00:00
const result4 = obj7 . handleVoiceInviteEmbedViewTracking ( arr , shouldTrackVoiceInviteEmbedViews , guildId , channel ) ;
2026-07-23 10:11:24 +00:00
const obj2 = require ( 9444 ) /* _manuallyStartConsoleQuest */ ;
2026-07-20 16:05:17 +00:00
}
}
}
}
}
} ;
export const getVoiceStateChannelSummaryFromVoiceStates = function getVoiceStateChannelSummaryFromVoiceStates ( voiceStates ) {
const entries = Object . entries ( voiceStates ) ;
const found = entries . filter ( ( arg0 ) = > {
let tmp ;
[ , tmp ] = arg0 ;
return false !== tmp . discoverable ;
} ) ;
const mapped = found . map ( ( arg0 ) = > {
let tmp ;
let tmp2 ;
[ tmp , tmp2 ] = arg0 ;
const channelId = tmp2 . channelId ;
let str = "" ;
if ( null != channelId ) {
str = channelId ;
}
return "" + tmp + ":" + str ;
} ) ;
const sorted = mapped . sort ( ) ;
return sorted . join ( "|" ) ;
} ;
export const getVoiceChannelIdChangedAuthorIds = function getVoiceChannelIdChangedAuthorIds ( voiceChannelIdChangedAuthorIds , voiceChannelIdChangedAuthorIds2 ) {
let iter2 ;
const obj = parseVoiceStateChannelIdSummary ( voiceChannelIdChangedAuthorIds ) ;
const obj2 = parseVoiceStateChannelIdSummary ( voiceChannelIdChangedAuthorIds2 ) ;
const set = new Set ( ) ;
const items = [ . . . obj . keys ( ) , . . . obj2 . keys ( ) ] ;
const tmp2 = _createForOfIteratorHelperLoose ( new Set ( items ) ) ;
let iter = tmp2 ( ) ;
if ( ! iter . done ) {
do {
let value = iter . value ;
value = obj . get ( value ) ;
if ( value !== obj2 . get ( value ) ) {
let addResult = set . add ( value ) ;
}
iter2 = tmp2 ( ) ;
iter = iter2 ;
} while ( ! iter2 . done ) ;
}
return set ;
} ;