2026-07-27 11:26:19 +00:00
// Module ID: 11510
// Function ID: 89653
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 27, 4019, 33, 4131, 689, 4042, 11511, 11520, 11540, 1557, 5462, 11545, 11546, 11574, 4338, 4038, 5094, 1212, 2231, 9050, 5087, 11581, 11583, 11591, 11597, 11607, 11616, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 11510 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import result from "result" ;
import get_ActivityIndicator from "GuildPowerupsBoostButton" ;
import BoostedGuildTiers from "BoostedGuildTiers" ;
import jsxProd from "jsxProd" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
let closure_4 ;
let closure_5 ;
let closure_6 ;
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 ;
}
2026-07-23 10:11:24 +00:00
( { ScrollView : closure_4 , View : closure_5 } = get_ActivityIndicator ) ;
( { BoostInfoType : closure_6 , GuildPowerupType : closure_7 } = BoostedGuildTiers ) ;
( { jsx : closure_8 , jsxs : closure_9 } = jsxProd ) ;
_createForOfIteratorHelperLoose = { } ;
_createForOfIteratorHelperLoose = { flex : 1 , backgroundColor : require ( "_createForOfIteratorHelperLoose" ) . colors . BACKGROUND_BASE_LOW } ;
_createForOfIteratorHelperLoose . container = _createForOfIteratorHelperLoose ;
_createForOfIteratorHelperLoose . headerContainer = { paddingHorizontal : require ( "_createForOfIteratorHelperLoose" ) . space . PX_16 , paddingTop : require ( "_createForOfIteratorHelperLoose" ) . space . PX_8 } ;
let obj2 = { flexDirection : "row" , justifyContent : "space-between" , borderWidth : 1 , borderStyle : "solid" , borderColor : require ( "_createForOfIteratorHelperLoose" ) . colors . BORDER_SUBTLE , marginBottom : require ( "_createForOfIteratorHelperLoose" ) . space . PX_16 } ;
_createForOfIteratorHelperLoose . boostInfoContainer = obj2 ;
let obj3 = { width : 1 , height : "100%" , backgroundColor : require ( "_createForOfIteratorHelperLoose" ) . colors . BORDER_SUBTLE } ;
_createForOfIteratorHelperLoose . boostInfoSeparator = obj3 ;
let obj1 = { paddingHorizontal : require ( "_createForOfIteratorHelperLoose" ) . space . PX_16 , paddingTop : require ( "_createForOfIteratorHelperLoose" ) . space . PX_8 } ;
_createForOfIteratorHelperLoose . scrollView = { paddingBottom : require ( "_createForOfIteratorHelperLoose" ) . space . PX_96 } ;
let obj5 = { paddingHorizontal : require ( "_createForOfIteratorHelperLoose" ) . space . PX_16 , position : "absolute" , bottom : 0 , left : 0 , right : 0 } ;
_createForOfIteratorHelperLoose . boostButtonContainer = obj5 ;
_createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose . createStyles ( _createForOfIteratorHelperLoose ) ;
let obj4 = { paddingBottom : require ( "_createForOfIteratorHelperLoose" ) . space . PX_96 } ;
const result = require ( "BoostedGuildTiers" ) . fileFinishedImporting ( "modules/premium/powerups/native/GuildPowerupsModal.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default function GuildPowerupsModal ( guildId ) {
let analyticsLocation ;
let autoOpenPerkId ;
let available ;
let spent ;
let total ;
guildId = guildId . guildId ;
( { analyticsLocation , autoOpenPerkId } = guildId ) ;
const autoOpenRequestId = guildId . autoOpenRequestId ;
2026-07-23 10:11:24 +00:00
let buildGuildPowerupsSections ;
2026-07-20 16:05:17 +00:00
let closure_4 ;
2026-07-23 10:11:24 +00:00
let obj = guildId ( autoOpenRequestId [ 6 ] ) ;
2026-07-20 16:05:17 +00:00
const gameServerEnabled = obj . useGameServerEnabled ( guildId , "GuildPowerupsModal" ) ;
2026-07-23 10:11:24 +00:00
autoOpenPerkId ( autoOpenRequestId [ 7 ] ) ( guildId ) ;
let obj1 = guildId ( autoOpenRequestId [ 8 ] ) ;
2026-07-20 16:05:17 +00:00
const autoDismissGuildPowerupsNotifications = obj1 . useAutoDismissGuildPowerupsNotifications ( guildId ) ;
2026-07-23 10:11:24 +00:00
autoOpenPerkId ( autoOpenRequestId [ 9 ] ) ( guildId , "GuildPowerupsModal" , null != autoOpenPerkId ) ;
let tmp5 = _createForOfIteratorHelperLoose ( ) ;
2026-07-20 16:05:17 +00:00
if ( null != analyticsLocation ) {
const items = [ analyticsLocation ] ;
let items1 = items ;
} else {
items1 = [ ] ;
}
2026-07-23 10:11:24 +00:00
let obj2 = guildId ( autoOpenRequestId [ 12 ] ) ;
buildGuildPowerupsSections = obj2 . useBuildGuildPowerupsSections ( guildId , gameServerEnabled ) ;
closure_4 = buildGuildPowerupsSections . useRef ( undefined ) ;
2026-07-20 16:05:17 +00:00
const items2 = [ autoOpenPerkId , autoOpenRequestId , guildId , buildGuildPowerupsSections ] ;
2026-07-23 10:11:24 +00:00
const effect = buildGuildPowerupsSections . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( null != autoOpenPerkId ) {
if ( null != autoOpenRequestId ) {
if ( ref . current !== autoOpenRequestId ) {
2026-07-23 10:11:24 +00:00
const tmp23 = outer1_11 ( buildGuildPowerupsSections ) ;
2026-07-20 16:05:17 +00:00
const iter5 = tmp23 ( ) ;
let iter4 = iter5 ;
if ( ! iter5 . done ) {
while ( true ) {
2026-07-23 10:11:24 +00:00
let tmp = outer1_11 ;
let tmp2 = outer1_11 ( iter4 . value . listings ) ;
2026-07-20 16:05:17 +00:00
let iter = tmp2 ( ) ;
if ( ! iter . done ) {
while ( true ) {
let value = iter . value ;
if ( "singlePerk" === value . type ) {
let tmp3 = autoOpenPerkId ;
if ( value . powerup . skuId === autoOpenPerkId ) {
break ;
}
}
if ( "multiPerk" === value . type ) {
let tmp4 = autoOpenPerkId ;
if ( value . group !== autoOpenPerkId ) {
let powerups = value . powerups ;
}
let tmp6 = ref ;
let tmp7 = autoOpenRequestId ;
ref . current = autoOpenRequestId ;
let tmp8 = autoOpenPerkId ;
let tmp9 = autoOpenRequestId ;
let num = 14 ;
let obj = { } ;
let tmp10 = guildId ;
obj . guildId = guildId ;
obj . listing = value ;
obj . onDismiss = function onDismiss() {
2026-07-23 10:11:24 +00:00
return autoOpenPerkId ( autoOpenRequestId [ 15 ] ) . pop ( ) ;
2026-07-20 16:05:17 +00:00
} ;
let tmp11 = autoOpenPerkId ( autoOpenRequestId [ 14 ] ) ( obj ) ;
}
let iter2 = tmp2 ( ) ;
iter = iter2 ;
let tmp5 = value ;
continue ;
}
let tmp12 = ref ;
let tmp13 = autoOpenRequestId ;
ref . current = autoOpenRequestId ;
let tmp14 = autoOpenPerkId ;
let tmp15 = autoOpenRequestId ;
let num2 = 13 ;
obj = { } ;
let tmp16 = guildId ;
obj . guildId = guildId ;
obj . powerup = value . powerup ;
let tmp17 = autoOpenPerkId ( autoOpenRequestId [ 13 ] ) ( obj ) ;
}
let iter3 = tmp23 ( ) ;
iter4 = iter3 ;
}
}
}
}
}
} , items2 ) ;
2026-07-23 10:11:24 +00:00
const callback = buildGuildPowerupsSections . useCallback ( ( ) = > {
2026-07-20 16:05:17 +00:00
let arr = autoOpenPerkId ( autoOpenRequestId [ 15 ] ) ;
arr = arr . pop ( ) ;
} , [ ] ) ;
2026-07-23 10:11:24 +00:00
let tmp6 = autoOpenPerkId ( autoOpenRequestId [ 11 ] ) ;
( { available , spent , total } = autoOpenPerkId ( autoOpenRequestId [ 16 ] ) ( guildId ) ) ;
2026-07-20 16:05:17 +00:00
obj = { value : tmp6 ( . . . items1 ) . analyticsLocations } ;
obj = { style : tmp5.container } ;
obj1 = { style : tmp5.headerContainer } ;
obj2 = { } ;
2026-07-23 10:11:24 +00:00
let intl = guildId ( autoOpenRequestId [ 18 ] ) . intl ;
obj2 . title = intl . string ( autoOpenPerkId ( autoOpenRequestId [ 19 ] ) . hjvcLO ) ;
2026-07-20 16:05:17 +00:00
obj2 . headerTitle = function headerTitle() {
const obj = { } ;
const intl = guildId ( autoOpenRequestId [ 18 ] ) . intl ;
obj . title = intl . string ( autoOpenPerkId ( autoOpenRequestId [ 19 ] ) . hjvcLO ) ;
2026-07-23 10:11:24 +00:00
return outer1_8 ( guildId ( autoOpenRequestId [ 20 ] ) . GenericHeaderTitle , obj ) ;
2026-07-20 16:05:17 +00:00
} ;
obj2 . headerTitleAlign = "center" ;
2026-07-23 10:11:24 +00:00
let obj7 = guildId ( autoOpenRequestId [ 21 ] ) ;
2026-07-20 16:05:17 +00:00
obj2 . headerLeft = obj7 . getHeaderCloseButton ( callback ) ;
2026-07-23 10:11:24 +00:00
obj1 . children = callback ( guildId ( autoOpenRequestId [ 17 ] ) . Header , obj2 ) ;
2026-07-20 16:05:17 +00:00
const items3 = [ callback ( closure_5 , obj1 ) , , ] ;
const obj3 = { contentContainerStyle : tmp5.scrollView } ;
const obj4 = { style : tmp5.boostInfoContainer } ;
2026-07-23 10:11:24 +00:00
const items4 = [ callback ( autoOpenPerkId ( autoOpenRequestId [ 22 ] ) , { count : available , type : constants . AVAILABLE } ) , callback ( closure_5 , { style : tmp5.boostInfoSeparator } ) , , , ] ;
2026-07-20 16:05:17 +00:00
obj7 = { count : spent , type : constants . SPENT } ;
2026-07-23 10:11:24 +00:00
items4 [ 2 ] = callback ( autoOpenPerkId ( autoOpenRequestId [ 22 ] ) , obj7 ) ;
2026-07-20 16:05:17 +00:00
items4 [ 3 ] = callback ( closure_5 , { style : tmp5.boostInfoSeparator } ) ;
2026-07-23 10:11:24 +00:00
items4 [ 4 ] = callback ( autoOpenPerkId ( autoOpenRequestId [ 22 ] ) , { count : total , type : constants . TOTAL } ) ;
2026-07-20 16:05:17 +00:00
obj4 . children = items4 ;
const items5 = [
callback2 ( closure_5 , obj4 ) ,
2026-07-23 10:11:24 +00:00
callback ( autoOpenPerkId ( autoOpenRequestId [ 23 ] ) , { guildId } ) ,
2026-07-20 16:05:17 +00:00
buildGuildPowerupsSections . map ( ( type ) = > {
type = type . type ;
2026-07-23 10:11:24 +00:00
if ( outer1_7 . LEVEL === type ) {
2026-07-20 16:05:17 +00:00
let obj = { guildId , listings : type.listings } ;
2026-07-23 10:11:24 +00:00
return outer1_8 ( autoOpenPerkId ( autoOpenRequestId [ 24 ] ) , obj , type . type ) ;
} else if ( outer1_7 . PERK === type ) {
2026-07-20 16:05:17 +00:00
obj = { guildId , listings : type.listings } ;
2026-07-23 10:11:24 +00:00
return outer1_8 ( autoOpenPerkId ( autoOpenRequestId [ 25 ] ) , obj , type . type ) ;
2026-07-20 16:05:17 +00:00
} else {
return null ;
}
} ) ,
2026-07-23 10:11:24 +00:00
callback ( autoOpenPerkId ( autoOpenRequestId [ 26 ] ) , { guildId } )
2026-07-20 16:05:17 +00:00
] ;
obj3 . children = items5 ;
items3 [ 1 ] = callback2 ( closure_4 , obj3 ) ;
const obj5 = { count : available , type : constants . AVAILABLE } ;
const obj6 = { style : tmp5.boostInfoSeparator } ;
const obj8 = { style : tmp5.boostInfoSeparator } ;
const obj9 = { count : total , type : constants . TOTAL } ;
2026-07-23 10:11:24 +00:00
let tmp9 = autoOpenPerkId ( autoOpenRequestId [ 16 ] ) ( guildId ) ;
const items6 = [ tmp5 . boostButtonContainer , { paddingBottom : autoOpenPerkId ( autoOpenRequestId [ 10 ] ) ( ) . bottom } ] ;
items3 [ 2 ] = callback ( closure_5 , { style : items6 , children : callback ( guildId ( autoOpenRequestId [ 27 ] ) . GuildPowerupsBoostButton , { guildId } ) } ) ;
2026-07-20 16:05:17 +00:00
obj . children = items3 ;
obj . children = callback2 ( closure_5 , obj ) ;
2026-07-23 10:11:24 +00:00
return callback ( guildId ( autoOpenRequestId [ 11 ] ) . AnalyticsLocationProvider , obj ) ;
2026-07-20 16:05:17 +00:00
} ;