2026-07-25 08:10:48 +00:00
// Module ID: 5757
2026-07-27 11:26:19 +00:00
// Function ID: 50268
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1316, 1194, 1348, 1908, 1918, 1838, 4143, 4326, 653, 664, 5758, 686, 5070, 21, 566, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 5757 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_4 from "_isNativeReflectConstruct" ;
import SidebarType from "SidebarType" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import DISCORD_EPOCH from "DISCORD_EPOCH" ;
import closure_8 from "_isNativeReflectConstruct" ;
import closure_9 from "_isNativeReflectConstruct" ;
import closure_10 from "_isNativeReflectConstruct" ;
import closure_11 from "_isNativeReflectConstruct" ;
import { GUILD_SELECTABLE_CHANNELS_KEY as closure_12 } from "_isNativeReflectConstruct" ;
import closure_13 from "_isNativeReflectConstruct" ;
import closure_14 from "_createForOfIteratorHelperLoose" ;
import closure_15 from "_isNativeReflectConstruct" ;
import closure_16 from "_isNativeReflectConstruct" ;
import ME from "ME" ;
import set from "_possibleConstructorReturn" ;
let closure_17 ;
let closure_18 ;
let closure_19 ;
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 ;
}
function guildHasCommunity ( id ) {
const guild = store . getGuild ( id ) ;
let hasItem ;
if ( null != guild ) {
const features = guild . features ;
hasItem = features . has ( constants . COMMUNITY ) ;
}
return true === hasItem ;
}
function seedCommunityBaseline() {
let iter2 ;
set1 . clear ( ) ;
const tmp2 = _createForOfIteratorHelperLoose ( store . getGuildIds ( ) ) ;
let iter = tmp2 ( ) ;
if ( ! iter . done ) {
do {
let value = iter . value ;
2026-07-23 10:11:24 +00:00
let tmp3 = guildHasCommunity ;
if ( guildHasCommunity ( value ) ) {
let tmp4 = set1 ;
let addResult = set1 . add ( value ) ;
2026-07-20 16:05:17 +00:00
}
iter2 = tmp2 ( ) ;
iter = iter2 ;
} while ( ! iter2 . done ) ;
}
return false ;
}
function maybeAckViewedChannel ( guildId , channelId ) {
2026-07-23 10:11:24 +00:00
let closure_0 = channelId ;
2026-07-20 16:05:17 +00:00
if ( tmp ) {
let tmp3 = ! optInEnabled . isOptInEnabled ( guildId ) ;
if ( ! tmp3 ) {
2026-07-23 10:11:24 +00:00
channel = channel . getChannel ( channelId ) ;
2026-07-20 16:05:17 +00:00
tmp3 = null != channel && channel . isThread ( ) ;
const tmp5 = null != channel && channel . isThread ( ) ;
}
if ( ! tmp3 ) {
tmp3 = null != closure_15 . ackMessageId ( channelId ) ;
}
if ( ! tmp3 ) {
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . wait ( ( ) = > {
let obj = channelId ( outer1_2 [ 17 ] ) ;
obj = { object : outer1_17 . ACK_RECENT_CHANNEL_NEW_CHANNEL_VIEWED , objectType : outer1_18.ACK_AUTOMATIC } ;
return obj . ack ( channelId , obj , true , true , outer1_1 ( outer1_2 [ 18 ] ) . atPreviousMillisecond ( channelId ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
2026-07-23 10:11:24 +00:00
const obj3 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
function initializeNewChannels ( guildId ) {
2026-07-23 10:11:24 +00:00
let closure_0 = guildId ;
if ( null == dependencyMap [ guildId ] ) {
2026-07-20 16:05:17 +00:00
const mapped = channels . getChannels ( guildId ) [ closure_12 ] . map ( ( channel ) = > channel . channel . id ) ;
2026-07-23 10:11:24 +00:00
member = member . getMember ( guildId , id . getId ( ) ) ;
2026-07-20 16:05:17 +00:00
let joinedAt ;
if ( null != member ) {
joinedAt = member . joinedAt ;
}
if ( null != joinedAt ) {
const _Set2 = Set ;
const set = new Set ( ) ;
2026-07-23 10:11:24 +00:00
dependencyMap [ guildId ] = set ;
2026-07-20 16:05:17 +00:00
const _Date2 = Date ;
const date = new Date ( joinedAt ) ;
const time = date . getTime ( ) ;
if ( 0 !== mapped . length ) {
const _Set = Set ;
const set1 = new Set ( mapped . filter ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
const extractTimestampResult = callback ( outer1_2 [ 18 ] ) . extractTimestamp ( arg0 ) ;
let tmp2 = null == outer1_15 . getTrackedAckMessageId ( arg0 ) ;
2026-07-20 16:05:17 +00:00
if ( tmp2 ) {
const _Date = Date ;
const timestamp = Date . now ( ) ;
2026-07-23 10:11:24 +00:00
tmp2 = extractTimestampResult > timestamp - callback ( outer1_2 [ 14 ] ) . Millis . WEEK ;
2026-07-20 16:05:17 +00:00
}
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
tmp2 = extractTimestampResult > outer1_8 . getGuildRecentsDismissedAt ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
}
if ( tmp2 ) {
tmp2 = extractTimestampResult > callback ;
}
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
tmp2 = ! outer1_16 . isChannelOrParentOptedIn ( closure_0 , arg0 ) ;
2026-07-20 16:05:17 +00:00
}
return tmp2 ;
} ) ) ;
2026-07-23 10:11:24 +00:00
dependencyMap [ guildId ] = set1 ;
let _Date = Date ;
2026-07-20 16:05:17 +00:00
closure_22 [ guildId ] = Date . now ( ) ;
}
}
const arr = channels . getChannels ( guildId ) [ closure_12 ] ;
}
}
function pruneNewChannels() {
2026-07-23 10:11:24 +00:00
const keys = importDefault ( 21 ) . keys ( closure_21 ) ;
2026-07-20 16:05:17 +00:00
const item = keys . forEach ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
const items = [ . . . outer1_21 [ arg0 ] ] ;
outer1_21 [ arg0 ] = new Set ( items . filter ( ( arg0 ) = > ! outer2_16 . isChannelOrParentOptedIn ( closure_0 , arg0 ) ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
2026-07-23 10:11:24 +00:00
( { AnalyticsObjects : closure_17 , AnalyticsObjectTypes : closure_18 , GuildFeatures : closure_19 } = ME ) ;
let set = new Set ( ) ;
2026-07-20 16:05:17 +00:00
let closure_21 = { } ;
let closure_22 = { } ;
2026-07-23 10:11:24 +00:00
let set1 = new Set ( ) ;
let tmp5 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class NewChannelsStore {
constructor ( ) {
self = this ;
2026-07-23 10:11:24 +00:00
tmp = outer1_3 ( this , NewChannelsStore ) ;
obj = outer1_6 ( NewChannelsStore ) ;
tmp2 = outer1_5 ;
if ( outer1_24 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_6 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_6 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( NewChannelsStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_9 , outer1_10 , outer1_11 , outer1_13 , outer1_14 , outer1_15 , outer1_16 , outer1_8 ) ;
const items = [ outer1_16 ] ;
this . syncWith ( items , outer1_30 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
2026-07-23 10:11:24 +00:00
let items = [ obj , , ] ;
2026-07-20 16:05:17 +00:00
obj = {
key : "getNewChannelIds" ,
value ( arg0 ) {
let tmp = null != arg0 ;
if ( tmp ) {
2026-07-23 10:11:24 +00:00
tmp = null == outer1_21 [ arg0 ] ;
2026-07-20 16:05:17 +00:00
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
outer1_29 ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
if ( null == arg0 ) {
2026-07-23 10:11:24 +00:00
const tmp6 = outer1_20 ;
2026-07-20 16:05:17 +00:00
}
return tmp6 ;
}
} ;
items [ 1 ] = obj ;
obj = {
key : "shouldIndicateNewChannel" ,
value ( guildId ) {
if ( null == guildId ) {
return false ;
} else {
2026-07-23 10:11:24 +00:00
const guild = outer1_14 . getGuild ( guildId ) ;
2026-07-20 16:05:17 +00:00
let tmp2 = null == guild ;
if ( ! tmp2 ) {
const features = guild . features ;
2026-07-23 10:11:24 +00:00
tmp2 = ! features . has ( outer1_19 . COMMUNITY ) ;
2026-07-20 16:05:17 +00:00
}
let tmp3 = ! tmp2 ;
if ( ! tmp2 ) {
let tmp4 = null != guildId ;
if ( tmp4 ) {
2026-07-23 10:11:24 +00:00
tmp4 = null == outer1_21 [ guildId ] ;
2026-07-20 16:05:17 +00:00
}
if ( tmp4 ) {
2026-07-23 10:11:24 +00:00
outer1_29 ( guildId ) ;
2026-07-20 16:05:17 +00:00
}
let hasItem ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_21 [ guildId ] ) {
2026-07-20 16:05:17 +00:00
hasItem = obj . has ( arg1 ) ;
}
if ( hasItem ) {
2026-07-23 10:11:24 +00:00
hasItem = null == outer1_15 . getTrackedAckMessageId ( arg1 ) ;
2026-07-20 16:05:17 +00:00
}
tmp3 = hasItem ;
}
return tmp3 ;
}
}
} ;
items [ 2 ] = obj ;
return callback ( NewChannelsStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp5 . displayName = "NewChannelsStore" ;
2026-07-23 10:11:24 +00:00
tmp5 = new tmp5 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
BULK_CLEAR_RECENTS : function handleBulkClearRecents ( guildId ) {
guildId = guildId . guildId ;
const channelIds = guildId . channelIds ;
2026-07-23 10:11:24 +00:00
if ( null == dependencyMap [ guildId ] ) {
2026-07-20 16:05:17 +00:00
return false ;
} else {
2026-07-23 10:11:24 +00:00
const item = channelIds . forEach ( ( arg0 ) = > outer1_21 [ guildId ] . delete ( arg0 ) ) ;
if ( 0 === dependencyMap [ guildId ] . size ) {
delete tmp [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
}
}
} ,
CHANNEL_ACK() {
return true ;
} ,
CHANNEL_SELECT : function handleChannelSelect ( arg0 ) {
let channelId ;
let guildId ;
( { guildId , channelId } = arg0 ) ;
if ( null == guildId ) {
return tmp ;
} else {
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ guildId ] ) {
2026-07-20 16:05:17 +00:00
const _Date = Date ;
const timestamp = Date . now ( ) ;
2026-07-23 10:11:24 +00:00
if ( table [ guildId ] >= timestamp - importDefault ( 664 ) . Millis . HOUR ) {
2026-07-20 16:05:17 +00:00
let flag = false ;
if ( null != channelId ) {
maybeAckViewedChannel ( guildId , channelId ) ;
flag = false ;
}
}
}
initializeNewChannels ( guildId ) ;
flag = true ;
}
} ,
SIDEBAR_VIEW_CHANNEL : function handleSidebarViewChannel ( guildId ) {
guildId = guildId . guildId ;
let tmp2 = null == guildId ;
if ( ! tmp2 ) {
2026-07-25 08:10:48 +00:00
tmp2 = tmp !== require ( 5758 ) /* SidebarType */ . SidebarType . VIEW_CHANNEL ;
2026-07-20 16:05:17 +00:00
}
if ( ! tmp2 ) {
maybeAckViewedChannel ( guildId , guildId . channelId ) ;
}
return false ;
} ,
SIDEBAR_VIEW_GUILD : function handleSidebarViewGuild ( guildId ) {
guildId = guildId . guildId ;
if ( null != guildId ) {
maybeAckViewedChannel ( guildId , tmp ) ;
}
return false ;
} ,
CONNECTION_OPEN : seedCommunityBaseline ,
CACHE_LOADED : seedCommunityBaseline ,
GUILD_CREATE : function handleGuildCreate ( guild ) {
guild = guild . guild ;
if ( guildHasCommunity ( guild . id ) ) {
set1 . add ( guild . id ) ;
}
return false ;
} ,
GUILD_UPDATE : function handleGuildUpdate ( guild ) {
guild = guild . guild ;
2026-07-23 10:11:24 +00:00
let c0 ;
let set ;
2026-07-20 16:05:17 +00:00
const tmp = guildHasCommunity ( guild . id ) ;
if ( tmp ) {
if ( ! set1 . has ( guild . id ) ) {
set1 . add ( guild . id ) ;
2026-07-23 10:11:24 +00:00
c0 = tmp6 ;
2026-07-20 16:05:17 +00:00
guild = store . getGuild ( guild . id ) ;
const _Set = Set ;
set = new Set ( ) ;
2026-07-22 07:54:56 +00:00
if ( tmp15 ) {
const items = [ , ] ;
( { rulesChannelId : arr [ 0 ] , publicUpdatesChannelId : arr [ 1 ] } = guild ) ;
const item = items . forEach ( ( arg0 ) = > {
let hasItem = null != arg0 ;
if ( hasItem ) {
2026-07-23 10:11:24 +00:00
hasItem = _undefined . has ( arg0 ) ;
2026-07-22 07:54:56 +00:00
}
if ( hasItem ) {
set . add ( arg0 ) ;
}
} ) ;
}
2026-07-23 10:11:24 +00:00
dependencyMap [ guild . id ] = set ;
2026-07-22 07:54:56 +00:00
const _Date = Date ;
closure_22 [ guild . id ] = Date . now ( ) ;
return true ;
}
}
if ( ! tmp ) {
set1 . delete ( guild . id ) ;
}
return false ;
} ,
GUILD_DELETE : function handleGuildDelete ( guild ) {
2026-07-23 10:11:24 +00:00
delete tmp2 [ tmp ] ;
2026-07-22 07:54:56 +00:00
set1 . delete ( guild . guild . id ) ;
} ,
CHANNEL_CREATE : function handleChannelCreate ( channel ) {
channel = channel . channel ;
if ( ! channel . isVocal ( ) ) {
2026-07-23 10:11:24 +00:00
let set = dependencyMap [ channel . guild_id ] ;
2026-07-22 07:54:56 +00:00
if ( null == set ) {
const _Set = Set ;
set = new Set ( ) ;
}
2026-07-23 10:11:24 +00:00
dependencyMap [ channel . guild_id ] = set ;
dependencyMap [ channel . guild_id ] . add ( channel . id ) ;
const obj = dependencyMap [ channel . guild_id ] ;
const tmp = dependencyMap ;
2026-07-22 07:54:56 +00:00
}
}
2026-07-23 10:11:24 +00:00
} ) ;
let result = set . fileFinishedImporting ( "modules/recent_channels/NewChannelsStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp5 ;