455 lines
16 KiB
TypeScript
455 lines
16 KiB
TypeScript
/* Metro module 9459; source: modules/hub/native/components/HubEmailConnectionGuildSelectSearch.tsx; dependencies: [5, 57, 31, 27, 9445, 33, 4501, 697, 9460, 4573, 1244, 1484, 6590, 1585, 9450, 4131, 5282, 6983, 1305, 9455, 2] */
|
|
function _fun73568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:6, offset: 0x01d71a5c, size: 448 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(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_6 = value.View;
|
|
const env0_7 = value.Image;
|
|
const env0_8 = value.FlatList;
|
|
const env0_9 = (require(9445) /* metro dependency 9445: HubConstants */).HubEmailConnectionSteps;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_10 = value.jsx;
|
|
const env0_11 = value.jsxs;
|
|
const env0_12 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.scrollContainer = {'flex': 1, 'width': '100%', backgroundColor: BACKGROUND_BASE_LOW};
|
|
object2.fauxHeader = {paddingHorizontal: 0};
|
|
object2.emptyWrapper = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'marginTop': 64,
|
|
'paddingHorizontal': 16};
|
|
object2.emptyStateImage = {marginBottom: 24};
|
|
object2.emptyStateTitle = {'marginBottom': 4, 'textAlign': 'center'};
|
|
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
|
object2.error = {'color': null, 'alignSelf': 'center', 'fontSize': 14, 'marginBottom': 8, color: RED_400};
|
|
const env0_13 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/hub/native/components/HubEmailConnectionGuildSelectSearch.tsx');
|
|
exports.default = HubEmailConnectionGuildSelectSearch;
|
|
}
|
|
|
|
function EmptyState_73569() { // fn#73569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:680, offset: 0x01d71c1c, size: 211 bytes, params: 1, frame: 22
|
|
const styles = useStyles();
|
|
const image = <Image style={styles.emptyStateImage} source={importDefault(9460) /* metro dependency 9460 */} />;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return (
|
|
<View style={styles.emptyWrapper}>
|
|
{image}
|
|
<Text
|
|
style={styles.emptyStateTitle}
|
|
variant="text-sm/semibold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6HXiuE'])}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function HubEmailConnectionGuildSelectSearch({guildsInfo, email, onClose}) { // fn#73570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:1059, offset: 0x01d71cef, size: 558 bytes, params: 2, frame: 30
|
|
const styles = useStyles();
|
|
const env0_3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const binding = env0_5;
|
|
let useState = binding.useState;
|
|
const value3 = Reflect.apply(useState, binding, ['']);
|
|
const binding2 = env0_4;
|
|
const value4 = binding2(value3, 2);
|
|
var env0_4 = value4[0];
|
|
const property = value4[1];
|
|
useState = binding.useState;
|
|
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
|
const property2 = value5[0];
|
|
var env0_5 = value5[1];
|
|
useState = binding.useState;
|
|
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const env0_6 = value6[0];
|
|
const env0_7 = value6[1];
|
|
const value7 = guildsInfo.filter(_fun73571);
|
|
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
|
const env0_8 = property2?.getAnyErrorMessage();
|
|
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
|
const FauxHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).FauxHeader;
|
|
const SearchBarNav = importDefault(6983) /* metro dependency 6983: SearchBarNav */;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return (
|
|
<>
|
|
<FauxHeader style={styles.fauxHeader}>
|
|
<SearchBarNav
|
|
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nL2wKD)}
|
|
onChange={property}
|
|
onClose={onClose_73572}
|
|
/>
|
|
</FauxHeader>
|
|
<FlatList
|
|
keyboardShouldPersistTaps="always"
|
|
data={value7}
|
|
ListHeaderComponent={ListHeaderComponent}
|
|
renderItem={renderItem_73574}
|
|
keyExtractor={function(a0) {
|
|
return a0.id;
|
|
}}
|
|
ListEmptyComponent={ListEmptyComponent}
|
|
ItemSeparatorComponent={ItemSeparatorComponent}
|
|
style={styles.scrollContainer}
|
|
contentContainerStyle={{paddingBottom: bottom + 16, paddingTop: 16}}
|
|
/>
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun73571({name}) { // fn#73571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:1309, offset: 0x01d71f1d, size: 68 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__;
|
|
value = importDefault(6590) /* metro dependency 6590 */;
|
|
const binding = env0_4;
|
|
return value(binding.toLowerCase(), name.toLowerCase());
|
|
}
|
|
|
|
function HubEmailConnectionGuildSelectSearchOnClose() { // fn#73572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:1577, owner: HubEmailConnectionGuildSelectSearch.onClose, offset: 0x01d71f61, size: 21 bytes, params: 1, frame: 9
|
|
env0_3.pop();
|
|
}
|
|
|
|
function HubEmailConnectionGuildSelectSearchListHeaderComponent() { // fn#73573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:1662, owner: HubEmailConnectionGuildSelectSearch.ListHeaderComponent, offset: 0x01d71f76, size: 98 bytes, params: 1, frame: 16
|
|
const value2 = null;
|
|
if (value2 != env0_8) {
|
|
if (env0_8 === '') {
|
|
return value2;
|
|
} else {
|
|
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
|
return (
|
|
<LegacyText style={styles.error}>
|
|
{env0_8}
|
|
</LegacyText>
|
|
);
|
|
}
|
|
} else {
|
|
return value2;
|
|
}
|
|
}
|
|
|
|
function HubEmailConnectionGuildSelectSearchRenderItem({item}) { // fn#73574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:1748, owner: HubEmailConnectionGuildSelectSearch.renderItem, offset: 0x01d71fd8, size: 102 bytes, params: 2, frame: 17
|
|
const HubEmailConnectionGuildSelectRow = (require(9455) /* metro dependency 9455: HubEmailConnectionGuildSelect */).HubEmailConnectionGuildSelectRow;
|
|
const env0_0 = item.id;
|
|
return (
|
|
<HubEmailConnectionGuildSelectRow
|
|
signup={env1_3(_fun73576)}
|
|
guildInfo={item}
|
|
loading={env0_6}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function HubEmailConnectionGuildSelectSearchListEmptyComponent() { // fn#73578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:2085, owner: HubEmailConnectionGuildSelectSearch.ListEmptyComponent, offset: 0x01d7214b, size: 23 bytes, params: 1, frame: 13
|
|
return <EmptyState_73569 />;
|
|
}
|
|
|
|
function HubEmailConnectionGuildSelectSearchItemSeparatorComponent() { // fn#73579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:2129, owner: HubEmailConnectionGuildSelectSearch.ItemSeparatorComponent, offset: 0x01d72162, size: 36 bytes, params: 1, frame: 14
|
|
return <View style={{height: 8}} />;
|
|
}
|
|
|
|
function* _fun73576() { // fn#73576, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9645:1831, offset: 0x01d72049, size: 258 bytes, params: 1, frame: 20
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var sendVerificationEmail;
|
|
var value5;
|
|
var emailBinding;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var push;
|
|
var binding3;
|
|
var VERIFY_PIN;
|
|
var object2;
|
|
var error;
|
|
var binding4;
|
|
var binding5;
|
|
var value9;
|
|
var APIError;
|
|
var prototype;
|
|
var aPIError;
|
|
var value11;
|
|
exceptionLanding46: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
env2_5(null);
|
|
Image(true);
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort45: while (true) {
|
|
exceptionLanding30: while (true) {
|
|
try {
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
try {
|
|
binding = env2_5;
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
binding4 = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
binding5 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
property = binding5[15];
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
value9 = binding4(property);
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
APIError = value9.APIError;
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
prototype = APIError.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
aPIError = new APIError();
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
value11 = aPIError instanceof Object ? aPIError : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
binding(value11);
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
break reduciblePort45;
|
|
}
|
|
Image(false);
|
|
return undefined;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[14];
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
sendVerificationEmail = value4.sendVerificationEmail;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
value5 = environment.__proto__;
|
|
try {
|
|
try {
|
|
emailBinding = email;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = Reflect.apply(sendVerificationEmail, value4, [require, true, emailBinding]);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
yield value6;
|
|
try {
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
if (value8) {
|
|
Image(false);
|
|
return value7;
|
|
}
|
|
try {
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
push = binding.push;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
binding3 = env3_9;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
VERIFY_PIN = binding3.VERIFY_PIN;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
object2.email = require;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
object2.onClose = importDefault;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
emailBinding = email;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
object2.guildId = emailBinding;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
try {
|
|
try {
|
|
Reflect.apply(push, binding, [VERIFY_PIN, object2]);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding46;
|
|
}
|
|
Image(false);
|
|
return undefined;
|
|
}
|
|
Image(false);
|
|
throw error;
|
|
}
|
|
|