2026-07-24 07:16:23 +00:00
// Module ID: 11656
// Function ID: 90524
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-24 07:16:23 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1849, 5602, 5603, 4351, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 11656 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_3 from "_isNativeReflectConstruct" ;
import _possibleConstructorReturn from "_possibleConstructorReturn" ;
import _getPrototypeOf from "_getPrototypeOf" ;
import _inherits from "_inherits" ;
import closure_7 from "_isNativeReflectConstruct" ;
import closure_8 from "_isNativeReflectConstruct" ;
import closure_9 from "_isNativeReflectConstruct" ;
import set from "_possibleConstructorReturn" ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
} ) ) ;
function _isNativeReflectConstruct() {
return closure_0 ;
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
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 ;
}
2026-07-23 10:11:24 +00:00
function isMessagePreviewEnabledForChannel ( id ) {
let isMessageRequestResult = messageRequest . isMessageRequest ( id ) ;
2026-07-20 16:05:17 +00:00
if ( ! isMessageRequestResult ) {
2026-07-23 10:11:24 +00:00
isMessageRequestResult = spam . isSpam ( id ) ;
2026-07-20 16:05:17 +00:00
}
return isMessageRequestResult ;
}
function storeMessagePreview ( channel_id , message ) {
let flag = arg2 ;
if ( arg2 === undefined ) {
flag = false ;
}
if ( isMessagePreviewEnabledForChannel ( channel_id ) ) {
if ( null == message ) {
let messageRecord = null ;
if ( null != message ) {
2026-07-23 10:11:24 +00:00
let obj = require ( 4351 ) /* createMinimalMessageRecord */ ;
2026-07-20 16:05:17 +00:00
messageRecord = obj . createMessageRecord ( message ) ;
}
obj = { loaded : true , error : flag , message : messageRecord } ;
closure_10 [ channel_id ] = obj ;
} else {
channel_id = undefined ;
if ( null != message ) {
channel_id = message . channel_id ;
}
}
}
}
let closure_10 = { } ;
2026-07-23 10:11:24 +00:00
let set = new Set ( ) ;
let tmp3 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class MessageRequestPreviewStore {
constructor ( ) {
self = this ;
2026-07-23 10:11:24 +00:00
tmp = outer1_2 ( this , MessageRequestPreviewStore ) ;
obj = outer1_5 ( MessageRequestPreviewStore ) ;
tmp2 = outer1_4 ;
if ( outer1_12 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_5 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( MessageRequestPreviewStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_8 , outer1_9 , outer1_7 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
const items = [ obj , , ] ;
obj = {
key : "shouldLoadMessageRequestPreview" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return ! outer1_11 . has ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 1 ] = obj ;
obj = {
key : "getMessageRequestPreview" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
if ( ! ( arg0 in outer1_10 ) ) {
outer1_10 [ arg0 ] = { loaded : false , error : false , message : null } ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return outer1_10 [ arg0 ] ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 2 ] = obj ;
return callback ( MessageRequestPreviewStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp3 . displayName = "MessageRequestPreviewStore" ;
2026-07-23 10:11:24 +00:00
tmp3 = new tmp3 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN : function handleConnectionOpen() {
let closure_10 = { } ;
set . clear ( ) ;
} ,
CHANNEL_CREATE : function handleChannelCreate ( channel ) {
channel = channel . channel ;
if ( isMessagePreviewEnabledForChannel ( channel . id ) ) {
set . add ( channel . id ) ;
}
} ,
CHANNEL_UPDATES : function handleChannelUpdates ( channels ) {
let iter2 ;
2026-07-23 10:11:24 +00:00
const tmp3 = _createForOfIteratorHelperLoose ( channels . channels ) ;
let iter = tmp3 ( ) ;
2026-07-20 16:05:17 +00:00
if ( ! iter . done ) {
do {
let value = iter . value ;
2026-07-23 10:11:24 +00:00
let tmp4 = isMessagePreviewEnabledForChannel ;
if ( ! isMessagePreviewEnabledForChannel ( value . id ) ) {
let tmp5 = set ;
let deleteResult = set . delete ( value . id ) ;
let tmp7 = closure_10 ;
2026-07-20 16:05:17 +00:00
let id = value . id ;
2026-07-23 10:11:24 +00:00
delete tmp2 [ tmp ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
iter2 = tmp3 ( ) ;
2026-07-20 16:05:17 +00:00
iter = iter2 ;
} while ( ! iter2 . done ) ;
}
} ,
CHANNEL_DELETE : function handleChannelDelete ( channel ) {
set . delete ( channel . channel . id ) ;
2026-07-23 10:11:24 +00:00
delete tmp2 [ tmp ] ;
2026-07-20 16:05:17 +00:00
} ,
MESSAGE_CREATE : function handleMessageCreate ( isPushNotification ) {
if ( isPushNotification . isPushNotification ) {
return false ;
} else {
storeMessagePreview ( isPushNotification . message . channel_id , isPushNotification . message ) ;
}
} ,
MESSAGE_UPDATE : function handleMessageUpdate ( message ) {
const channel_id = message . message . channel_id ;
if ( null == channel_id ) {
return false ;
} else {
let tmp3 = null != tmp2 ;
if ( tmp3 ) {
if ( null != tmp2 . message ) {
const obj = { } ;
const merged = Object . assign ( tmp2 ) ;
2026-07-23 10:11:24 +00:00
obj [ "message" ] = require ( 4351 ) /* createMinimalMessageRecord */ . updateMessageRecord ( tmp2 . message , message . message ) ;
table [ channel_id ] = obj ;
const obj2 = require ( 4351 ) /* createMinimalMessageRecord */ ;
2026-07-20 16:05:17 +00:00
}
tmp3 = tmp4 ;
}
return tmp3 ;
}
} ,
MESSAGE_DELETE : function handleMessageDelete ( channelId ) {
if ( isMessagePreviewEnabledForChannel ( channelId . channelId ) ) {
2026-07-23 10:11:24 +00:00
closure_10 [ channelId . channelId ] = { loaded : true , error : false , message : null } ;
2026-07-20 16:05:17 +00:00
} else {
return false ;
}
} ,
LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_SUCCESS : function handleLoadMessageRequestsSupplementalDataSuccess ( supplementalData ) {
let length ;
supplementalData = supplementalData . supplementalData ;
const items = [ . . . supplementalData . requestedChannelIds ] ;
let num = 0 ;
const set = new Set ( items ) ;
const item = supplementalData . forEach ( ( channel_id ) = > {
2026-07-23 10:11:24 +00:00
outer1_16 ( channel_id . channel_id , channel_id . message_preview ) ;
2026-07-20 16:05:17 +00:00
set . delete ( channel_id . channel_id ) ;
} ) ;
const arr = Array . from ( set ) ;
if ( 0 < arr . length ) {
do {
2026-07-23 10:11:24 +00:00
let tmp3 = storeMessagePreview ;
let tmp4 = storeMessagePreview ( arr [ num ] , null ) ;
2026-07-20 16:05:17 +00:00
num = num + 1 ;
length = arr . length ;
} while ( num < length ) ;
}
} ,
LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_ERROR : function handleLoadMessageRequestsSupplementalDataError ( requestedChannelIds ) {
requestedChannelIds = requestedChannelIds . requestedChannelIds ;
const item = requestedChannelIds . forEach ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
outer1_16 ( arg0 , null , true ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
} ) ;
2026-07-23 10:11:24 +00:00
let result = set . fileFinishedImporting ( "modules/message_request/MessageRequestPreviewStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp3 ;