455 lines
27 KiB
TypeScript
455 lines
27 KiB
TypeScript
/* Metro module 6620; source: modules/guild_onboarding/native/GuildOnboardingPrompt.tsx; dependencies: [57, 31, 27, 6540, 6616, 1867, 6603, 6600, 1881, 33, 4501, 5314, 697, 1484, 566, 1585, 4048, 4002, 4000, 6618, 6621, 4573, 1244, 4578, 6717, 4589, 676, 5105, 6734, 674, 3860, 6735, 6739, 1423, 4080, 6744, 1962, 5278, 6759, 2] */
|
|
function _fun52324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6, offset: 0x01326e9b, size: 1046 bytes, params: 8, frame: 23
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_5 = value.Image;
|
|
const env0_6 = value.View;
|
|
const env0_7 = value.ScrollView;
|
|
const env0_8 = value.FlatList;
|
|
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
|
const memberVerificationFormStore = importDefault(6616) /* metro dependency 6616: MemberVerificationFormStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
|
|
const env0_13 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).GuildOnboardingModalStates;
|
|
const env0_14 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_15 = value.jsx;
|
|
const env0_16 = value.jsxs;
|
|
const env0_17 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
object2.flex = {flex: 1};
|
|
const object4 = {'display': 'flex', 'flex': 1, 'flexGrow': 1, 'marginTop': null, 'marginBottom': 16};
|
|
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
|
object4.marginTop = NAV_BAR_HEIGHT;
|
|
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
|
object2.container = object4;
|
|
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object2.scrollContainer = {'display': 'flex', 'flexGrow': 1, 'justifyContent': 'center', 'paddingHorizontal': 16,
|
|
'paddingTop': 0, backgroundColor: BACKGROUND_BASE_LOWER};
|
|
object2.scrollContainerGradient = {'position': 'absolute', 'height': 48, 'width': '100%', 'left': 0, 'top': -48};
|
|
object2.promptHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 8};
|
|
const object6 = {'flexShrink': 0, 'marginHorizontal': 8, 'color': null, 'backgroundColor': null, 'width': 4,
|
|
'height': 4};
|
|
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object6.color = BORDER_SUBTLE;
|
|
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object6.backgroundColor = BORDER_SUBTLE;
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object2.requiredSeparator = object6;
|
|
object2.countText = {};
|
|
object2.title = {marginBottom: 32};
|
|
object2.helpText = {'marginTop': 8, 'marginBottom': 8, 'textAlign': 'center'};
|
|
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object2.footer = {'display': 'flex', 'flexDirection': 'column', 'justifyContent': 'flex-end',
|
|
'alignItems': 'center', 'bottom': 0, 'paddingBottom': 8, 'position': 'absolute', 'width': '100%',
|
|
backgroundColor: BACKGROUND_BASE_LOWER};
|
|
object2.footerText = {'paddingHorizontal': 16, 'paddingBottom': 8, 'paddingTop': 8};
|
|
object2.footerContent = {'width': '100%', 'paddingHorizontal': 16};
|
|
object2.optionTextEmoji = {'fontSize': 18, 'lineHeight': 22, 'marginRight': 6};
|
|
object2.optionImageEmoji = {'height': 22, 'width': 22, 'marginRight': 6};
|
|
object2.emojiContainer = {'display': 'flex', 'alignItems': 'center'};
|
|
const object7 = {'borderRadius': null, 'backgroundColor': null, 'padding': 8, 'paddingRight': 32, 'minHeight': 48,
|
|
'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'position': 'relative'};
|
|
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object7.backgroundColor = BACKGROUND_BASE_LOWEST;
|
|
object2.dropdownContainer = object7;
|
|
object2.emptyDropdownText = {marginTop: 16};
|
|
const object9 = {'borderRadius': null, 'backgroundColor': null, 'padding': 6, 'marginRight': 8, 'marginTop': 8,
|
|
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
|
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object9.backgroundColor = BACKGROUND_BASE_LOW;
|
|
object2.dropdownPill = object9;
|
|
object2.dropdownIconContainer = {'position': 'absolute', 'right': 4, 'top': 8};
|
|
object2.dropdownIcon = {'height': 32, 'width': 32};
|
|
const env0_18 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/GuildOnboardingPrompt.tsx');
|
|
exports.RulesPrompt = RulesPrompt;
|
|
exports.MultipleChoicePrompt = MultipleChoicePrompt;
|
|
exports.DropdownPrompt = DropdownPrompt;
|
|
}
|
|
|
|
function PromptHeader({currentPrompt, numberOfPrompts, currentPromptIndex}) { // fn#52325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:2141, offset: 0x013272b1, size: 492 bytes, params: 2, frame: 33
|
|
var r11;
|
|
var jsxRuntimeEnv0_17Binding2;
|
|
var items2;
|
|
const styles = useStyles();
|
|
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const text = <Text style={styles.countText} variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.isV0NW,
|
|
{currentQuestion: currentPromptIndex + 1, questionCount: numberOfPrompts})}</Text>;
|
|
if (currentPrompt != null) {
|
|
if (currentPrompt.required) {
|
|
jsxRuntimeEnv0_17Binding2 = jsxRuntimeEnv0_17;
|
|
items2 = [<View style={styles.requiredSeparator} />];
|
|
items2[1] = <Text variant="text-sm/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ur8Vrt)}</Text>;
|
|
r11 = <>{items2}</>;
|
|
} else {
|
|
r11 = null;
|
|
}
|
|
} else {
|
|
r11 = null;
|
|
}
|
|
return (
|
|
<>
|
|
<View style={styles.promptHeader}>
|
|
{text}
|
|
{r11}
|
|
</View>
|
|
<Text
|
|
style={styles.title}
|
|
accessibilityRole="header"
|
|
variant="heading-xl/semibold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{currentPrompt.title}
|
|
</Text>
|
|
</>
|
|
);
|
|
}
|
|
|
|
function PromptFooter({guildId, currentPrompt, selectedOptionIds, handleOnPress, lastPrompt}) { // fn#52326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:2794, offset: 0x0132749d, size: 1134 bytes, params: 2, frame: 36
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const styles = useStyles();
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
|
return GuildStore.getGuild(guildId);
|
|
});
|
|
const r18 = selectedOptionIds.length === 0 && !(currentPrompt != null && currentPrompt.required);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const r14 = lastPrompt ? '' + Reflect.apply(string, intl, [t['8SuVoE']]) + ' 🎉' : r18 ? Reflect.apply(string, intl,
|
|
[t['5Wxrcd']]) : Reflect.apply(string, intl, [t.PDTjLN]);
|
|
const r12 = selectedOptionIds.length === 0 && currentPrompt?.required;
|
|
let r11 = currentPrompt == null || currentPrompt.options == null ? undefined : currentPrompt.options.filter(function(a0) {
|
|
return selectedOptionIds.includes(a0.id);
|
|
});
|
|
const {helpText,
|
|
helpTextAdditional} = (importDefault(6734) /* metro dependency 6734: usePromptHelpText */)({guild: guild,
|
|
prompt: currentPrompt, selectedRoleIds: env0_4.useMemo(_fun52329, [r11]),
|
|
selectedChannelIds: env0_4.useMemo(_fun52330, [r11]), itemHook: formattedNameHighlight});
|
|
const defaultImport2 = importDefault(674) /* metro dependency 674 */;
|
|
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
|
let useToken = useTokenModule.useToken;
|
|
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
const value17 = defaultImport2(Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER])).alpha(0);
|
|
items3 = [value17.hex()];
|
|
const defaultImport3 = defaultImport2;
|
|
const moduleValue3 = useTokenModule;
|
|
useToken = moduleValue3.useToken;
|
|
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
const value20 = defaultImport3(Reflect.apply(useToken, moduleValue3, [BACKGROUND_BASE_LOWER])).alpha(1);
|
|
items3[1] = value20.hex();
|
|
const defaultImport4 = importDefault(4589) /* metro dependency 4589 */;
|
|
const items2 = [styles.scrollContainerGradient];
|
|
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
|
const defaultImport42 = ((Component) => <Component style={items2} start={START} end={END} colors={items3} pointerEvents="none" />)(defaultImport4);
|
|
r11 = r12 ? <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dA1dSf)}</Text> : null;
|
|
const r10 = helpText !== '' ? <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{helpText}{' '}{helpTextAdditional}</Text> : helpTextAdditional === '' ? null : <Text style={styles.helpText} variant="text-xs/medium" color="text-default">{helpText}{' '}{helpTextAdditional}</Text>;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
const value24 = 'primary';
|
|
return (
|
|
<View style={styles.footer}>
|
|
{defaultImport42}
|
|
<View style={styles.footerContent}>
|
|
{r11}
|
|
{r10}
|
|
<Button
|
|
variant={r18 ? lastPrompt ? value24 : 'secondary' : value24}
|
|
size="md"
|
|
grow
|
|
text={r14}
|
|
onPress={handleOnPress}
|
|
disabled={r12}
|
|
/>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function formattedNameHighlight(a0, a1) { // fn#52331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4297, offset: 0x013279d0, size: 67 bytes, params: 3, frame: 15
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<Text
|
|
variant="text-xs/medium"
|
|
color="mobile-text-heading-primary"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
function DropdownOption({option}) { // fn#52332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4434, offset: 0x01327a13, size: 369 bytes, params: 2, frame: 28
|
|
const styles = useStyles();
|
|
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun52333);
|
|
const view = <View style={styles.emojiContainer}>{((Component) => <Component textEmojiStyle={styles.optionTextEmoji} fastImageStyle={styles.optionImageEmoji} src={value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
|
|
animated: value3.animated,
|
|
size: EMOJI_URL_BASE_SIZE}) : undefined} name={option.emoji?.name ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)}</View>;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<View style={styles.dropdownPill}>
|
|
{view}
|
|
<Text variant="text-md/semibold">
|
|
{option.title}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function RulesPrompt({guildId}) { // fn#52334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5108, offset: 0x01327bd6, size: 1107 bytes, params: 2, frame: 36
|
|
var r9;
|
|
var r0;
|
|
var PRIMARY_130;
|
|
var PRIMARY_600;
|
|
var SafeAreaPaddingView;
|
|
var flex;
|
|
var object3;
|
|
var items3;
|
|
var object5;
|
|
var Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var items5;
|
|
var Button;
|
|
var items6;
|
|
const VerticalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
|
var value;
|
|
const styles = useStyles();
|
|
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const fluxModule = require(566) /* metro dependency 566: flux */;
|
|
let useStateFromStores = fluxModule.useStateFromStores;
|
|
let object = [MemberVerificationFormStore];
|
|
const rulesPrompt = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
|
return MemberVerificationFormStore.getRulesPrompt(guildId);
|
|
}]);
|
|
const env0_3 = fluxModule.useStateFromStores([GuildStore], _fun52336);
|
|
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
|
const value2 = 64 + bottom + 8;
|
|
const moduleValue4 = fluxModule;
|
|
useStateFromStores = moduleValue4.useStateFromStores;
|
|
const [property, env0_5] = env0_3(Reflect.apply(useStateFromStores, moduleValue4, [[MemberVerificationFormStore],
|
|
function() {
|
|
return MemberVerificationFormStore.get(guildId);
|
|
}]).useState(false), 2);
|
|
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
|
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
|
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
|
let unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
|
if (isThemeDark2) {
|
|
PRIMARY_600 = unsafe_rawColors.PRIMARY_600;
|
|
object = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_600, 0])];
|
|
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
|
PRIMARY_600 = unsafe_rawColors.PRIMARY_600;
|
|
object[1] = PRIMARY_600;
|
|
r9 = object;
|
|
} else {
|
|
PRIMARY_130 = unsafe_rawColors.PRIMARY_130;
|
|
object = [Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_130, 0])];
|
|
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
|
PRIMARY_130 = unsafe_rawColors.PRIMARY_130;
|
|
object[1] = PRIMARY_130;
|
|
r9 = object;
|
|
}
|
|
if (rulesPrompt == null) {
|
|
r0 = null;
|
|
} else {
|
|
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
|
object = {top: true};
|
|
flex = styles.flex;
|
|
object.style = [flex, styles.container];
|
|
object3 = {};
|
|
flex = styles.flex;
|
|
object3.style = flex;
|
|
items3 = [<FlatList contentContainerStyle={[styles.scrollContainer,
|
|
{paddingBottom: value2}]} data={[0]} renderItem={renderItem_52338} onEndReached={onEndReached} />];
|
|
var viewProps = {style: [styles.footer, styles.footerContent, {paddingBottom: bottom}]};
|
|
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
string = intl.string;
|
|
items5 = [<Text style={styles.footerText} variant="text-xs/medium">{property ? Reflect.apply(string, intl,
|
|
[t.arAe3I]) : Reflect.apply(string, intl, [t.D0CVAc])}</Text>];
|
|
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
items5[1] = <Button variant="primary" size="md" grow disabled={!property} text={intl.string(t['0KL0ot'])} onPress={onPress_52340} />;
|
|
items3[1] = <View {...viewProps}>{items5}</View>;
|
|
items6 = [<View {...object3}>{items3}</View>];
|
|
value = importDefault(4589) /* metro dependency 4589 */;
|
|
items6[1] = ((Component) => <Component style={[styles.scrollContainerGradient,
|
|
{bottom: value2}]} start={VerticalGradient.START} end={VerticalGradient.END} colors={r9} pointerEvents="none" />)(value);
|
|
value = <SafeAreaPaddingView {...object}>{items6}</SafeAreaPaddingView>;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function MultipleChoicePrompt({guildId, currentPrompt, lastPrompt, currentPromptIndex, numberOfPrompts, selectOption, handleOnPress}) { // fn#52341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6646, offset: 0x01328165, size: 391 bytes, params: 2, frame: 29
|
|
const styles = useStyles();
|
|
return (
|
|
<>
|
|
<ScrollView
|
|
contentContainerStyle={[styles.scrollContainer,
|
|
{paddingBottom: 64 + (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom + 48 + 48,
|
|
position: 'relative'}]}
|
|
>
|
|
<PromptHeader
|
|
currentPrompt={currentPrompt}
|
|
numberOfPrompts={numberOfPrompts}
|
|
currentPromptIndex={currentPromptIndex}
|
|
/>
|
|
<View>
|
|
{currentPrompt.options.map(_fun52343)}
|
|
</View>
|
|
</ScrollView>
|
|
<PromptFooter
|
|
guildId={guildId}
|
|
currentPrompt={currentPrompt}
|
|
selectedOptionIds={(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
|
_fun52342, [guildId, currentPrompt])}
|
|
handleOnPress={handleOnPress}
|
|
lastPrompt={lastPrompt}
|
|
/>
|
|
</>
|
|
);
|
|
}
|
|
|
|
function DropdownPrompt({guildId, currentPrompt, lastPrompt, currentPromptIndex, numberOfPrompts, selectOption, handleOnPress}) { // fn#52345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7403, offset: 0x013283cb, size: 694 bytes, params: 2, frame: 39
|
|
const styles = useStyles();
|
|
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
|
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildOnboardingPromptsStore],
|
|
_fun52346, [guildId, currentPrompt]);
|
|
const r22 = currentPrompt == null || currentPrompt.options == null ? undefined : currentPrompt.options.filter(_fun52347);
|
|
const value5 = env0_4.useCallback(_fun52348, [guildId, currentPrompt.id, selectOption]);
|
|
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
|
|
const items2 = [styles.scrollContainer];
|
|
items2[1] = {paddingBottom: 64 + bottom + 48 + 48, position: 'relative'};
|
|
const promptHeader = <PromptHeader currentPrompt={currentPrompt} numberOfPrompts={numberOfPrompts} currentPromptIndex={currentPromptIndex} />;
|
|
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
|
const items4 = [r22.length === 0 && ((Text) => <Text style={styles.emptyDropdownText} variant="text-sm/normal" color="text-muted">{'No answers selected.'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
|
items4[1] = r22.map(_fun52350);
|
|
items4[2] = <View style={styles.dropdownIconContainer}><Image style={styles.dropdownIcon} source={importDefault(6759) /* metro dependency 6759 */} /></View>;
|
|
return (
|
|
<>
|
|
<ScrollView contentContainerStyle={items2}>
|
|
{promptHeader}
|
|
<View>
|
|
<PressableHighlight style={styles.dropdownContainer} onPress={value5}>
|
|
{items4}
|
|
</PressableHighlight>
|
|
</View>
|
|
</ScrollView>
|
|
<PromptFooter
|
|
guildId={guildId}
|
|
currentPrompt={currentPrompt}
|
|
selectedOptionIds={value3}
|
|
handleOnPress={handleOnPress}
|
|
lastPrompt={lastPrompt}
|
|
/>
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun52329() { // fn#52329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:3269, offset: 0x01327926, size: 85 bytes, params: 1, frame: 13
|
|
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedRoleIds(env0_2) : new global.Set();
|
|
}
|
|
|
|
function _fun52330() { // fn#52330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:3339, offset: 0x0132797b, size: 85 bytes, params: 1, frame: 13
|
|
return env0_2 != null ? (require(5105) /* metro dependency 5105: GuildOnboardingUtils */).getSelectedChannelIds(env0_2) : new global.Set();
|
|
}
|
|
|
|
function _fun52333() { // fn#52333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:4519, offset: 0x01327b84, size: 82 bytes, params: 1, frame: 14
|
|
const emoji = option.emoji;
|
|
const value2 = null;
|
|
const value3 = undefined;
|
|
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
|
|
}
|
|
|
|
function _fun52336() { // fn#52336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5275, offset: 0x01328044, size: 44 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return GuildStore.getGuild(guildId)?.rulesChannelId;
|
|
}
|
|
|
|
function RulesPromptRenderItem() { // fn#52338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:5921, owner: RulesPrompt.renderItem, offset: 0x0132808a, size: 65 bytes, params: 1, frame: 15
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component rules={rulesPrompt.values} rulesChannelId={env0_3} />)(importDefault(6621) /* metro dependency 6621: TermsFieldList */);
|
|
}
|
|
|
|
function RulesPromptOnPress() { // fn#52340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6339, owner: RulesPrompt.onPress, offset: 0x013280dd, size: 136 bytes, params: 1, frame: 18
|
|
var value2;
|
|
var defaultImport;
|
|
var submitVerificationForm;
|
|
var guildIdBinding;
|
|
var object3;
|
|
var object4;
|
|
var binding;
|
|
if (env0_4 != null) {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(6717) /* metro dependency 6717: MemberVerificationActionCreators */;
|
|
submitVerificationForm = defaultImport.submitVerificationForm;
|
|
guildIdBinding = guildId;
|
|
object3 = {};
|
|
copyDataProperties(object3, env0_4, undefined);
|
|
object4 = {};
|
|
copyDataProperties(object4, rulesPrompt, undefined);
|
|
object4['response'] = true;
|
|
object3['formFields'] = [object4];
|
|
Reflect.apply(submitVerificationForm, defaultImport, [guildIdBinding, object3]);
|
|
binding = env0_1;
|
|
binding.push(GuildOnboardingModalStates.COMPLETED);
|
|
}
|
|
}
|
|
|
|
function _fun52342() { // fn#52342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:6858, offset: 0x013282ec, size: 53 bytes, params: 1, frame: 14
|
|
return currentPrompt != null ? GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId,
|
|
currentPrompt.id) : [];
|
|
}
|
|
|
|
function _fun52343(a0) { // fn#52343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7151, offset: 0x01328321, size: 116 bytes, params: 2, frame: 18
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = importDefault(6735) /* metro dependency 6735: GuildOnboardingPromptOptionButton */;
|
|
const valueProps = {option: a0, guildId: guildId, onSelect: onSelect};
|
|
const binding = env0_3;
|
|
const value3 = binding.includes(a0.id);
|
|
valueProps.selected = value3 != null && value3;
|
|
return ((Component) => <Component {...valueProps} key={a0.id} />)(value);
|
|
}
|
|
|
|
function _fun52347({id}) { // fn#52347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7724, offset: 0x01328681, size: 27 bytes, params: 2, frame: 11
|
|
return env0_3.includes(id);
|
|
}
|
|
|
|
function _fun52348() { // fn#52348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7763, offset: 0x0132869c, size: 119 bytes, params: 1, frame: 17
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[34]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[36]);
|
|
value = value(dependencyMap[35], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'DropdownOptions', {guildId: guildId, promptId: currentPrompt.id,
|
|
onSelect: function(a0, a1) {
|
|
var value = a1;
|
|
return selectOption(currentPrompt.id, a0.id, value != null && value);
|
|
}}]);
|
|
}
|
|
|
|
function _fun52350(a0) { // fn#52350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:8341, offset: 0x01328745, size: 37 bytes, params: 2, frame: 15
|
|
return <DropdownOption option={a0} key={a0.id} />;
|
|
}
|
|
|
|
function onSelect(a0) { // fn#52344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6798:7208, offset: 0x01328395, size: 54 bytes, params: 2, frame: 16
|
|
const value = a0;
|
|
return selectOption(currentPrompt.id, env0_0.id, value != null && value);
|
|
}
|
|
|