This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,339 +1,400 @@
/* Metro module 12042; source: modules/nuf/native/components/ChannelPrompt.tsx; dependencies: [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618, 6819, 1423, 4573, 8967, 4578, 8970, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from '../../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
function _fun92533(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:6, offset: 0x0208e36e, size: 430 bytes, params: 8, frame: 23
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 */;
let value = ReactNativeModule;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
const env0_12 = Reflect.apply(createStyles, value, [{flex: {flex: 1}, safePadding: {marginTop: NAV_BAR_HEIGHT,
flex: 1}, contentContainer: {paddingHorizontal: 16}, guildIcon: {alignSelf: 'center'},
guildName: {'marginTop': 8, 'textAlign': 'center'}, title: {'marginTop': 16, 'textAlign': 'center'},
subTitle: {'marginTop': 8, 'textAlign': 'center'}, topicInput: {marginTop: 24}, buttonWrapper: {marginTop: 8},
error: {marginTop: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/ChannelPrompt.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/ChannelPrompt.tsx');
exports.default = ChannelPrompt;
}
function ChannelPrompt({guildId, buttonText, hasBack, hasSkip, onCancel, onSuccess}) { // fn#92534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:666, offset: 0x0208e51c, size: 1286 bytes, params: 2, frame: 38
var r9;
var r0;
var SafeAreaPaddingView;
var GuildIcon;
var name;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FreeFormInputGroup;
const env0_3 = onCancel;
const env0_4 = onSuccess;
var value;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value7[0];
const env0_7 = value7[1];
binding.useLayoutEffect(_fun92536,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), hasBack, hasSkip, onCancel,
onSuccess]);
const value10 = binding.useCallback(env0_3(_fun92540), [guildId, onSuccess, property]);
if (guild == null) {
r0 = null;
} else {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {top: true, style: styles.safePadding};
var scrollViewBindingProps = {'style': null, 'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, style: styles.flex,
contentInset: {top: 0}, contentContainerStyle: styles.contentContainer};
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
name = guild.name;
items2 = [<GuildIcon style={styles.guildIcon} value={name} icon={guild.icon != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild.id,
icon: guild.icon, canAnimate: true, size: 128}) : null} selected />];
name = guild.name;
items2[1] = <Text style={styles.guildName} lineClamp={1} variant="text-sm/semibold" color="mobile-text-heading-primary">{name}</Text>;
string = intl.string;
items2[2] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t['8VRa7d']])}</Text>;
string = intl.string;
items2[3] = <Text style={styles.subTitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl,
[t['+855Pm']])}</Text>;
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items2[4] = <FreeFormInputGroup style={styles.topicInput} label={intl.string(t.bY20tU)} value={property} error={property4?.getFirstFieldErrorMessage('name')} onChangeText={property2} onSubmitEditing={value10} maxLength={100} placeholder={intl.string(t.xGOYA8)} returnKeyType="done" autoFocus />;
items2[5] = <View style={styles.buttonWrapper}>{((Button) => <Button size="md" text={buttonText} onPress={value10} loading={property3} disabled={property3} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
if (property4 != null) {
if (property4.hasFieldErrors()) {
value = importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */;
value = ((Component) => <Component style={styles.error}>{property4?.getAnyErrorMessage()}</Component>)(value);
r9 = value;
function ChannelPrompt({guildId, buttonText, hasBack, hasSkip, onCancel, onSuccess}) { // fn#92534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:666, offset: 0x0208e51c, size: 1286 bytes, params: 2, frame: 38
var r9;
var r0;
var SafeAreaPaddingView;
var GuildIcon;
var name;
var items2;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var FreeFormInputGroup;
const onCancel2 = onCancel;
const onSuccess2 = onSuccess;
var value;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let useState = ReactModule.useState;
const value3 = Reflect.apply(useState, ReactModule, ['']);
const binding2 = onSuccess2;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = ReactModule.useState;
const value5 = binding2(Reflect.apply(useState, ReactModule, [false]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
useState = ReactModule.useState;
const value7 = binding2(Reflect.apply(useState, ReactModule, [null]), 2);
const property4 = value7[0];
const env0_7 = value7[1];
ReactModule.useLayoutEffect(_fun92536,
[(UseNavigationNativeModule).useNavigation(), hasBack, hasSkip, onCancel,
onSuccess]);
const value10 = ReactModule.useCallback(onCancel2(_fun92540), [guildId, onSuccess, property]);
if (guild == null) {
r0 = null;
} else {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {top: true, style: styles.safePadding};
var scrollViewBindingProps = {'style': null, 'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, style: styles.flex,
contentInset: {top: 0}, contentContainerStyle: styles.contentContainer};
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
name = guild.name;
items2 = [
<GuildIcon
style={styles.guildIcon}
value={name}
icon={guild.icon != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild.id,
icon: guild.icon, canAnimate: true, size: 128}) : null}
selected
/>,
];
name = guild.name;
items2[1] = (
<Text
style={styles.guildName}
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
>
{name}
</Text>
);
string = intl.string;
items2[2] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t['8VRa7d']])}
</Text>
);
string = intl.string;
items2[3] = (
<Text
style={styles.subTitle}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t['+855Pm']])}
</Text>
);
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items2[4] = (
<FreeFormInputGroup
style={styles.topicInput}
label={intl.string(t.bY20tU)}
value={property}
error={property4?.getFirstFieldErrorMessage('name')}
onChangeText={property2}
onSubmitEditing={value10}
maxLength={100}
placeholder={intl.string(t.xGOYA8)}
returnKeyType="done"
autoFocus
/>
);
items2[5] = (
<View style={styles.buttonWrapper}>
{((Button) => <Button size="md" text={buttonText} onPress={value10} loading={property3} disabled={property3} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>
);
if (property4 != null) {
if (property4.hasFieldErrors()) {
value = importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */;
value = ((Component) => <Component style={styles.error}>{property4?.getAnyErrorMessage()}</Component>)(value);
r9 = value;
} else {
r9 = null;
}
} else {
r9 = null;
}
} else {
r9 = null;
items2[6] = r9;
value = (
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
<ScrollView {...scrollViewBindingProps}>
{items2}
</ScrollView>
</SafeAreaPaddingView>
);
r0 = value;
}
return r0;
function _fun92536() { // fn#92536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:990, offset: 0x0208ea22, size: 196 bytes, params: 1, frame: 22
var environment;
var r5;
var r3;
var value2;
var moduleValue;
var value4;
var moduleValue2;
var getHeaderTextButton;
var intl;
const binding = env0_8;
const setOptions = binding.setOptions;
const object = {};
if (hasBack) {
value2 = environment.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue.getHeaderBackButton(onCancel);
} else {
r5 = function() {
return null;
};
}
object.headerLeft = r5;
if (hasSkip) {
value4 = environment.__proto__;
moduleValue2 = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
getHeaderTextButton = moduleValue2.getHeaderTextButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r3 = Reflect.apply(getHeaderTextButton, moduleValue2,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']), onSuccess]);
} else {
r3 = function() {
return null;
};
}
object.headerRight = r3;
Reflect.apply(setOptions, binding, [object]);
}
items2[6] = r9;
value = <SafeAreaPaddingView {...safeAreaPaddingViewProps}><ScrollView {...scrollViewBindingProps}>{items2}</ScrollView></SafeAreaPaddingView>;
r0 = value;
}
return r0;
}
function _fun92536() { // fn#92536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:990, offset: 0x0208ea22, size: 196 bytes, params: 1, frame: 22
var environment;
var r5;
var r3;
var value2;
var moduleValue;
var value4;
var moduleValue2;
var getHeaderTextButton;
var intl;
const binding = env0_8;
const setOptions = binding.setOptions;
const object2 = {};
if (hasBack) {
value2 = environment.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue.getHeaderBackButton(onCancel);
} else {
r5 = function() {
return null;
};
}
object2.headerLeft = r5;
if (hasSkip) {
value4 = environment.__proto__;
moduleValue2 = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
getHeaderTextButton = moduleValue2.getHeaderTextButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r3 = Reflect.apply(getHeaderTextButton, moduleValue2,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']), onSuccess]);
} else {
r3 = function() {
return null;
};
}
object2.headerRight = r3;
Reflect.apply(setOptions, binding, [object2]);
}
function* _fun92540() { // fn#92540, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:1201, offset: 0x0208eaf1, size: 295 bytes, params: 1, frame: 25
var parent_id;
var binding2;
var property;
var value6;
var intl;
var formatToPlainString;
var value7;
var t;
var V4lepJ;
var object2;
var value8;
var binding3;
var value9;
var createTextChannel;
var value10;
var textChannel;
var value11;
var value12;
var error;
var APIError;
var prototype;
var value13;
var aPIError;
var value14;
let value = undefined;
if (true) {
value = undefined;
View(null);
ScrollView(true);
var binding = env2_8;
var defaultChannel = binding.getDefaultChannel(require);
reducibleJoin3: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
function* _fun92540() { // fn#92540, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:1201, offset: 0x0208eaf1, size: 295 bytes, params: 1, frame: 25
var parent_id;
var binding2;
var property;
var value6;
var intl;
var formatToPlainString;
var value7;
var t;
var V4lepJ;
var object;
var value8;
var binding3;
var value9;
var createTextChannel;
var value10;
var textChannel;
var value11;
var value12;
var error;
var APIError;
var prototype;
var value13;
var aPIError;
var value14;
let value = undefined;
if (true) {
value = undefined;
View(null);
ScrollView(true);
var binding = env2_8;
var defaultChannel = binding.getDefaultChannel(require);
reducibleJoin3: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin3;
}
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
prototype = APIError.prototype;
value13 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value14 = aPIError instanceof Object ? aPIError : value13;
View(value14);
break reduciblePort36;
}
ScrollView(false);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
intl = value6.intl;
} catch (error) {
break exceptionLanding35;
}
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
t = value7.t;
} catch (error) {
break exceptionLanding35;
}
try {
V4lepJ = t.V4lepJ;
} catch (error) {
break exceptionLanding35;
}
try {
object = {};
} catch (error) {
break exceptionLanding35;
}
try {
binding = env1_5;
} catch (error) {
break exceptionLanding35;
}
try {
object.topic = binding;
} catch (error) {
break exceptionLanding35;
}
try {
value8 = Reflect.apply(formatToPlainString, intl, [V4lepJ, object]);
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[13];
} catch (error) {
break exceptionLanding35;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding35;
}
try {
createTextChannel = value9.createTextChannel;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
value10 = defaultChannel == null;
} catch (error) {
break exceptionLanding35;
}
reducibleJoin27: while (true) {
if (value10) {
parent_id = value;
break reducibleJoin27;
}
try {
parent_id = defaultChannel.parent_id;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin3;
break reducibleJoin27;
}
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
prototype = APIError.prototype;
value13 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value14 = aPIError instanceof Object ? aPIError : value13;
View(value14);
break reduciblePort36;
try {
textChannel = Reflect.apply(createTextChannel, value9, [require, binding, parent_id, value8]);
} catch (error) {
break exceptionLanding35;
}
yield textChannel;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding35;
}
if (value12) {
return value11;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding35;
}
try {
binding();
} catch (error) {
break exceptionLanding35;
}
ScrollView(false);
}
ScrollView(false);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
intl = value6.intl;
} catch (error) {
break exceptionLanding35;
}
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
t = value7.t;
} catch (error) {
break exceptionLanding35;
}
try {
V4lepJ = t.V4lepJ;
} catch (error) {
break exceptionLanding35;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding35;
}
try {
binding = env1_5;
} catch (error) {
break exceptionLanding35;
}
try {
object2.topic = binding;
} catch (error) {
break exceptionLanding35;
}
try {
value8 = Reflect.apply(formatToPlainString, intl, [V4lepJ, object2]);
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[13];
} catch (error) {
break exceptionLanding35;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding35;
}
try {
createTextChannel = value9.createTextChannel;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
value10 = defaultChannel == null;
} catch (error) {
break exceptionLanding35;
}
reducibleJoin27: while (true) {
if (value10) {
parent_id = value;
break reducibleJoin27;
}
try {
parent_id = defaultChannel.parent_id;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin27;
}
try {
textChannel = Reflect.apply(createTextChannel, value9, [require, binding, parent_id, value8]);
} catch (error) {
break exceptionLanding35;
}
yield textChannel;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding35;
}
if (value12) {
return value11;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding35;
}
try {
binding();
} catch (error) {
break exceptionLanding35;
}
ScrollView(false);
}
return value;
}
global.__d(_fun92533, 12042, [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618,
6819, 1423, 4573, 8967, 4578, 8970,
2]) /* metro module 12042, dependencies: [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618, 6819, 1423, 4573, 8967, 4578, 8970, 2] */;
@@ -1,124 +1,171 @@
/* Metro module 15798; source: modules/nuf/native/components/ConnectGuardianModal.tsx; dependencies: [31, 27, 661, 5117, 33, 4501, 697, 1585, 15799, 683, 5461, 4573, 1244, 2224, 6766, 15800, 4578, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as FamilyCenterConstantsModule from '../../../parent_tools/FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as UseConnectGuardianGateModule from '../../../parent_tools/hooks/useConnectGuardianGate.tsx'; /* Metro dependency 15799 */
function _fun121383(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:6, offset: 0x0254679c, size: 557 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_6 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FamilyCenterAction;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.centered = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', paddingHorizontal: PX_16};
object.centered = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', paddingHorizontal: PX_16};
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object2.header = {marginBottom: PX_40};
const object3 = {};
object.header = {marginBottom: PX_40};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object5.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginBottom = PX_8;
object3.textAlign = 'center';
object2.title = object3;
object5.marginBottom = PX_8;
object5.textAlign = 'center';
object.title = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.description = {paddingHorizontal: PX_16, textAlign: 'center'};
object2.cardSection = {alignItems: 'center'};
const object4 = {};
object.description = {paddingHorizontal: PX_16, textAlign: 'center'};
object.cardSection = {alignItems: 'center'};
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object6.paddingHorizontal = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object4.textAlign = 'center';
object2.scanPrompt = object4;
object2.grow = {flexGrow: 1};
object6.marginBottom = PX_24;
object6.textAlign = 'center';
object.scanPrompt = object6;
object.grow = {flexGrow: 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.footer = {paddingHorizontal: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/ConnectGuardianModal.tsx');
object.footer = {paddingHorizontal: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/ConnectGuardianModal.tsx');
exports.default = ConnectGuardianModal;
}
function ConnectGuardianModal(a0) { // fn#121384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:909, offset: 0x025469c9, size: 925 bytes, params: 2, frame: 34
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var items3;
var items2;
var object;
var items4;
var object2;
var Button;
const onComplete = a0.route.params.onComplete;
var value;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (require(15799) /* metro dependency 15799: useConnectGuardianGate */).useConnectGuardianGate();
const binding = env0_3;
const env0_2 = binding.useRef(false);
binding.useEffect(_fun121385, [value2.state, onComplete]);
if (value2.state !== 'gate') {
r0 = <View style={[styles.container,
styles.centered]}>{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View>;
} else {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.header};
string = intl.string;
value = <Text style={styles.title} variant="heading-xl/bold" color="text-default">{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).vELYWk])}</Text>;
items3 = [value];
items3[1] = ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/medium" color="text-muted">{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pDByAB,
{link: 'https://support.discord.com/hc/articles/14155060633623'})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
value = <View {...viewBindingProps2}>{items3}</View>;
items2 = [value];
var viewBindingProps3 = {style: styles.cardSection};
string = intl.string;
value = <Text style={styles.scanPrompt} variant="text-md/semibold" color="text-default">{Reflect.apply(string,
intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Mi60fm])}</Text>;
items2[1] = <View {...viewBindingProps3}>{value}{((ConnectGuardianCard) => <ConnectGuardianCard linkCode={value2.linkCode} expiresAt={value2.expiresAt} onRefresh={value2.refresh} />)((require(15800) /* metro dependency 15800: ConnectGuardianCard */).ConnectGuardianCard)}</View>;
items2[2] = <View style={styles.grow} />;
object = {};
items4 = [styles.footer];
object2 = {};
object2.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object2;
object.style = items4;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[3] = <View {...object}><Button variant="primary" size="lg" text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3PatSz']])} onPress={onPress_121386} /></View>;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
}
return r0;
}
function _fun121385() { // fn#121385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:1071, offset: 0x02546d66, size: 142 bytes, params: 1, frame: 17
var value3;
var defaultImport;
if (!(env0_1.state !== 'error' || env0_2.current)) {
env0_2.current = true;
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FAMILY_CENTER_ACTION,
{action: FamilyCenterAction.NufConsentGateLinkCodeError,
source: 'NUF Connect Guardian'});
if (onComplete != null) {
onComplete(true);
function ConnectGuardianModal(a0) { // fn#121384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:909, offset: 0x025469c9, size: 925 bytes, params: 2, frame: 34
var r0;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var items3;
var items2;
var object3;
var items4;
var object4;
var Button;
const onComplete = a0.route.params.onComplete;
var value;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value2 = (UseConnectGuardianGateModule).useConnectGuardianGate();
const env0_2 = ReactModule.useRef(false);
ReactModule.useEffect(_fun121385, [value2.state, onComplete]);
if (value2.state !== 'gate') {
r0 = (
<View style={[styles.container, styles.centered]}>
{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
</View>
);
} else {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.header};
string = intl.string;
value = (
<Text
style={styles.title}
variant="heading-xl/bold"
color="text-default"
>
{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).vELYWk])}
</Text>
);
items3 = [value];
items3[1] = ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/medium" color="text-muted">{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pDByAB,
{link: 'https://support.discord.com/hc/articles/14155060633623'})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
value = (
<View {...viewBindingProps2}>
{items3}
</View>
);
items2 = [value];
var viewBindingProps3 = {style: styles.cardSection};
string = intl.string;
value = (
<Text
style={styles.scanPrompt}
variant="text-md/semibold"
color="text-default"
>
{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Mi60fm])}
</Text>
);
items2[1] = (
<View {...viewBindingProps3}>
{value}
{((ConnectGuardianCard) => <ConnectGuardianCard linkCode={value2.linkCode} expiresAt={value2.expiresAt} onRefresh={value2.refresh} />)((require(15800) /* metro dependency 15800: ConnectGuardianCard */).ConnectGuardianCard)}
</View>
);
items2[2] = <View style={styles.grow} />;
object3 = {};
items4 = [styles.footer];
object4 = {};
object4.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object4;
object3.style = items4;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[3] = (
<View {...object3}>
<Button
variant="primary"
size="lg"
text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3PatSz']])}
onPress={onPress_121386}
/>
</View>
);
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r0 = value;
}
return r0;
function _fun121385() { // fn#121385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:1071, offset: 0x02546d66, size: 142 bytes, params: 1, frame: 17
var value3;
var defaultImport;
if (!(env0_1.state !== 'error' || env0_2.current)) {
env0_2.current = true;
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FAMILY_CENTER_ACTION,
{action: FamilyCenterAction.NufConsentGateLinkCodeError,
source: 'NUF Connect Guardian'});
if (onComplete != null) {
onComplete(true);
}
}
}
function ConnectGuardianModalOnPress() { // fn#121386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:2222, owner: ConnectGuardianModal.onPress, offset: 0x02546df4, size: 33 bytes, params: 1, frame: 12
return onComplete?.(false);
}
}
}
function ConnectGuardianModalOnPress() { // fn#121386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:2222, owner: ConnectGuardianModal.onPress, offset: 0x02546df4, size: 33 bytes, params: 1, frame: 12
return onComplete?.(false);
}
global.__d(_fun121383, 15798, [31, 27, 661, 5117, 33, 4501, 697, 1585, 15799, 683, 5461, 4573, 1244, 2224, 6766,
15800, 4578,
2]) /* metro module 15798, dependencies: [31, 27, 661, 5117, 33, 4501, 697, 1585, 15799, 683, 5461, 4573, 1244, 2224, 6766, 15800, 4578, 2] */;
@@ -1,117 +1,172 @@
/* Metro module 12046; source: modules/nuf/native/components/DiscoverabilityActionSheet.tsx; dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as ContactSyncUtilsModule from '../../../contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun92566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:6, offset: 0x0208fa60, size: 449 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
let value = ContactSyncModalStoreModule;
const env0_4 = value.useContactSyncModalStore;
const env0_5 = value.setAllowSync;
const env0_6 = value.setAllowPhone;
const env0_7 = value.setAllowEmail;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
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.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.syncRow = {marginTop: 24};
const object3 = {};
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
object.syncRow = {marginTop: 24};
const object4 = {};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object3.fontFamily = PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object3.color = INTERACTIVE_TEXT_ACTIVE;
object2.formText = object3;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityActionSheet.tsx');
object4.fontFamily = PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
object4.color = INTERACTIVE_TEXT_ACTIVE;
object.formText = object4;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityActionSheet.tsx');
exports.default = DiscoverabilityActionSheet;
function DiscoverabilityActionSheet() { // fn#92567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:771, offset: 0x0208fc21, size: 1289 bytes, params: 1, frame: 33
const styles = useStyles();
const {allowPhone, allowEmail} = useContactSyncModalStore();
const r14 = allowPhone || allowEmail;
const binding = r14;
const value3 = binding.useCallback(_fun92568, [r14]);
const value4 = binding.useCallback(function() {
setAllowPhone(!allowPhone);
}, [allowPhone]);
const value5 = binding.useCallback(function() {
setAllowEmail(!allowEmail);
}, [allowEmail]);
const FormRow = (NativeModule).FormRow;
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
const FormRow2 = (NativeModule).FormRow;
let Label = FormRow2.Label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
formRowProps3.label = (
<Label
style={styles.formText}
text={Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv])}
/>
);
formRowProps3.onPress = value3;
const FormRow3 = (NativeModule).FormRow;
let Checkbox = FormRow3.Checkbox;
formRowProps3.trailing = <Checkbox selected={r14} />;
const items2 = [
<FormRow {...formRowProps3} />,
];
const FormText = (NativeModule).FormText;
items2[1] = (
<FormText style={styles.info}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}
</FormText>
);
items2[2] = (
<FormText style={styles.info}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}
</FormText>
);
items2[3] = (
<FormText style={styles.info}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
{learnMoreHook: learnMoreHook_92571})}
</FormText>
);
const FormTitle = (NativeModule).FormTitle;
items2[4] = (
<FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />
);
const formRowProps = {DEPRECATED_style: styles.formRow};
const FormRow4 = (NativeModule).FormRow;
Label = FormRow4.Label;
formRowProps.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])}
/>
);
const Text = (TextModule).Text;
string = intl.string;
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
formRowProps.subLabel = (
<Text variant="text-sm/medium" color="text-default">
{Reflect.apply(string, intl, [X7pIKN])}
</Text>
);
formRowProps.onPress = value4;
const FormRow5 = (NativeModule).FormRow;
Checkbox = FormRow5.Checkbox;
formRowProps.trailing = <Checkbox selected={allowPhone} />;
items2[5] = <FormRow {...formRowProps} />;
const formRowProps2 = {DEPRECATED_style: styles.formRow};
const FormRow6 = (NativeModule).FormRow;
Label = FormRow6.Label;
formRowProps2.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)}
/>
);
formRowProps2.subLabel = (
<Text variant="text-sm/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}
</Text>
);
formRowProps2.onPress = value5;
const FormRow7 = (NativeModule).FormRow;
Checkbox = FormRow7.Checkbox;
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
items2[6] = <FormRow {...formRowProps2} />;
const view = (
<View style={styles.container}>
{items2}
</View>
);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
return (
<ActionSheet startExpanded>
{view}
</ActionSheet>
);
function _fun92568() { // fn#92568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:879, offset: 0x02081e18, size: 26 bytes, params: 1, frame: 11
setAllowSync(!ReactModule);
}
function DiscoverabilityActionSheetLearnMoreHook(a0, a1) { // fn#92571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:1473, owner: DiscoverabilityActionSheet.learnMoreHook, offset: 0x0209015e, size: 91 bytes, params: 3, frame: 17
const Text = (TextModule).Text;
return (
<Text
onPress={(ContactSyncUtilsModule).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
}
function DiscoverabilityActionSheet() { // fn#92567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:771, offset: 0x0208fc21, size: 1289 bytes, params: 1, frame: 33
const styles = useStyles();
const {allowPhone, allowEmail} = useContactSyncModalStore();
const r14 = allowPhone || allowEmail;
const binding = r14;
const value3 = binding.useCallback(_fun92568, [r14]);
const value4 = binding.useCallback(function() {
setAllowPhone(!allowPhone);
}, [allowPhone]);
const value5 = binding.useCallback(function() {
setAllowEmail(!allowEmail);
}, [allowEmail]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
let Label = FormRow2.Label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
formRowProps3.label = <Label style={styles.formText} text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv])} />;
formRowProps3.onPress = value3;
const FormRow3 = (require(7972) /* metro dependency 7972: native */).FormRow;
let Checkbox = FormRow3.Checkbox;
formRowProps3.trailing = <Checkbox selected={r14} />;
const items2 = [<FormRow {...formRowProps3} />];
const FormText = (require(7972) /* metro dependency 7972: native */).FormText;
items2[1] = <FormText style={styles.info}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}</FormText>;
items2[2] = <FormText style={styles.info}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}</FormText>;
items2[3] = <FormText style={styles.info}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
{learnMoreHook: learnMoreHook})}</FormText>;
const FormTitle = (require(7972) /* metro dependency 7972: native */).FormTitle;
items2[4] = <FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />;
const formRowProps = {DEPRECATED_style: styles.formRow};
const FormRow4 = (require(7972) /* metro dependency 7972: native */).FormRow;
Label = FormRow4.Label;
formRowProps.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
formRowProps.subLabel = <Text variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[X7pIKN])}</Text>;
formRowProps.onPress = value4;
const FormRow5 = (require(7972) /* metro dependency 7972: native */).FormRow;
Checkbox = FormRow5.Checkbox;
formRowProps.trailing = <Checkbox selected={allowPhone} />;
items2[5] = <FormRow {...formRowProps} />;
const formRowProps2 = {DEPRECATED_style: styles.formRow};
const FormRow6 = (require(7972) /* metro dependency 7972: native */).FormRow;
Label = FormRow6.Label;
formRowProps2.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)} />;
formRowProps2.subLabel = <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}</Text>;
formRowProps2.onPress = value5;
const FormRow7 = (require(7972) /* metro dependency 7972: native */).FormRow;
Checkbox = FormRow7.Checkbox;
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
items2[6] = <FormRow {...formRowProps2} />;
const view = <View style={styles.container}>{items2}</View>;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
return (
<ActionSheet startExpanded>
{view}
</ActionSheet>
);
}
function DiscoverabilityActionSheetLearnMoreHook(a0, a1) { // fn#92571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:1473, owner: DiscoverabilityActionSheet.learnMoreHook, offset: 0x0209015e, size: 91 bytes, params: 3, frame: 17
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={(require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun92566, 12046, [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805,
2]) /* metro module 12046, dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */;
@@ -1,121 +1,179 @@
/* Metro module 12045; source: modules/nuf/native/components/DiscoverabilityLanding.tsx; dependencies: [31, 27, 11994, 661, 33, 4501, 697, 6597, 1585, 4080, 12046, 1962, 5314, 5475, 12047, 4573, 1244, 1305, 7972, 12021, 4578, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import Module12047 from '../../../../by-id/module-12047.js'; /* Metro dependency 12047 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as NativeModule2 from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
function _fun92561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:6, offset: 0x0208f34a, size: 600 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
const env0_6 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
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.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.headerContainer = {'flexGrow': 0, 'justifyContent': 'center', 'marginBottom': 24};
object2.header = {'paddingHorizontal': 16, 'alignItems': 'center'};
object2.image = {'width': '100%', 'marginHorizontal': 0};
object2.button = {'flexGrow': 0, 'marginHorizontal': 16, 'marginBottom': 24};
object2.title = {'textAlign': 'center', 'marginTop': 16};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.headerContainer = {'flexGrow': 0, 'justifyContent': 'center', 'marginBottom': 24};
object.header = {'paddingHorizontal': 16, 'alignItems': 'center'};
object.image = {'width': '100%', 'marginHorizontal': 0};
object.button = {'flexGrow': 0, 'marginHorizontal': 16, 'marginBottom': 24};
object.title = {'textAlign': 'center', 'marginTop': 16};
const object3 = {};
const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object4, textStyles(DISPLAY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object4['textAlign'] = 'center';
object4['marginTop'] = 8;
object2.subtitle = object4;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.formRow = {paddingVertical: 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
const object6 = {};
const value3 = textStyles;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
copyDataProperties(object3, TextStyles(DISPLAY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object3['textAlign'] = 'center';
object3['marginTop'] = 8;
object.subtitle = object3;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.formRow = {paddingVertical: 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
const object5 = {};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
copyDataProperties(object6, value3(PRIMARY_SEMIBOLD, INTERACTIVE_TEXT_ACTIVE, 16), undefined);
object2.formText = object6;
object2.footerContainer = {'flexGrow': 1, 'width': '100%'};
object2.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityLanding.tsx');
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
copyDataProperties(object5, TextStyles(PRIMARY_SEMIBOLD, INTERACTIVE_TEXT_ACTIVE, 16), undefined);
object.formText = object5;
object.footerContainer = {'flexGrow': 1, 'width': '100%'};
object.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityLanding.tsx');
exports.default = DiscoverabilityLanding;
}
function DiscoverabilityLanding({onNext}) { // fn#92562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:942, offset: 0x0208f5a2, size: 1031 bytes, params: 2, frame: 33
const styles = useStyles();
const {allowEmail, allowPhone} = useContactSyncModalStore();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const env0_3Binding = env0_3.useCallback(_fun92563, [allowPhone, allowEmail]);
const object = {};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
object.paddingBottom = bottom + 16;
const items2 = [((Component) => <Component resizeMode="contain" style={styles.image} source={importDefault(12047) /* metro dependency 12047 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}</Text>;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items2[2] = <LegacyText style={styles.subtitle}>{Reflect.apply(string, intl, [KMW0kP])}</LegacyText>;
const view = <View style={styles.headerContainer}><View style={styles.header}>{items2}</View></View>;
const FormCheckboxRow = (require(7972) /* metro dependency 7972: native */).FormCheckboxRow;
const formCheckboxRowProps = {DEPRECATED_style: styles.formRow};
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
formCheckboxRowProps.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv)} />;
formCheckboxRowProps.onPress = (require(12021) /* metro dependency 12021: NUFActionCreators */).toggleDiscoverabilityForUser;
formCheckboxRowProps.selected = allowEmail || allowPhone;
const items3 = [<FormCheckboxRow {...formCheckboxRowProps} />];
const items4 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DGZg+k']), ' '];
const format = intl.format;
const QmF5z4 = (require(1244) /* metro dependency 1244: indexNative */).t.QmF5z4;
items4[2] = Reflect.apply(format, intl, [QmF5z4, {learnMoreHook: learnMoreHook}]);
items3[1] = <Text style={styles.info} variant="heading-deprecated-12/medium" color="text-default">{items4}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items3[2] = <View style={styles.button}><Button text={Reflect.apply(string, intl, [PDTjLN])} onPress={function() {
return onNext();
}} grow /></View>;
return (
<ScrollView style={styles.container} contentContainerStyle={object}>
{view}
<View style={styles.footerContainer}>
{items3}
function DiscoverabilityLanding({onNext}) { // fn#92562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:942, offset: 0x0208f5a2, size: 1031 bytes, params: 2, frame: 33
const styles = useStyles();
const {allowEmail, allowPhone} = useContactSyncModalStore();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const env0_3Binding = ReactModule.useCallback(_fun92563, [allowPhone, allowEmail]);
const object2 = {};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
object2.paddingBottom = bottom + 16;
const items2 = [
((Component) => <Component resizeMode="contain" style={styles.image} source={Module12047} />)(FastImage),
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}
</Text>
);
const LegacyText = (NativeModule).LegacyText;
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items2[2] = (
<LegacyText style={styles.subtitle}>
{Reflect.apply(string, intl, [KMW0kP])}
</LegacyText>
);
const view = (
<View style={styles.headerContainer}>
<View style={styles.header}>
{items2}
</View>
</View>
</ScrollView>
);
}
);
const FormCheckboxRow = (NativeModule2).FormCheckboxRow;
const formCheckboxRowProps = {DEPRECATED_style: styles.formRow};
const FormRow = (NativeModule2).FormRow;
const Label = FormRow.Label;
formCheckboxRowProps.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv)}
/>
);
formCheckboxRowProps.onPress = (require(12021) /* metro dependency 12021: NUFActionCreators */).toggleDiscoverabilityForUser;
formCheckboxRowProps.selected = allowEmail || allowPhone;
const items3 = [
<FormCheckboxRow {...formCheckboxRowProps} />,
];
const items4 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DGZg+k']), ' '];
const format = intl.format;
const QmF5z4 = (require(1244) /* metro dependency 1244: indexNative */).t.QmF5z4;
items4[2] = Reflect.apply(format, intl, [QmF5z4, {learnMoreHook: learnMoreHook_92564}]);
items3[1] = (
<Text
style={styles.info}
variant="heading-deprecated-12/medium"
color="text-default"
>
{items4}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items3[2] = (
<View style={styles.button}>
<Button
text={Reflect.apply(string, intl, [PDTjLN])}
onPress={function() {
return onNext();
}}
grow
/>
</View>
);
return (
<ScrollView style={styles.container} contentContainerStyle={object2}>
{view}
<View style={styles.footerContainer}>
{items3}
</View>
</ScrollView>
);
function _fun92563() { // fn#92563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:1070, offset: 0x0208f9a9, size: 103 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'Discoverability Landing', {allowPhone: allowPhone,
allowEmail: allowEmail}]);
}
function _fun92563() { // fn#92563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:1070, offset: 0x0208f9a9, size: 103 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'Discoverability Landing', {allowPhone: allowPhone,
allowEmail: allowEmail}]);
}
function DiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#92564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:2159, owner: DiscoverabilityLanding.learnMoreHook, offset: 0x0208fa10, size: 80 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
onPress={ReactModule}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
function DiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#92564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:2159, owner: DiscoverabilityLanding.learnMoreHook, offset: 0x0208fa10, size: 80 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={env0_3}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun92561, 12045, [31, 27, 11994, 661, 33, 4501, 697, 6597, 1585, 4080, 12046, 1962, 5314, 5475, 12047,
4573, 1244, 1305, 7972, 12021, 4578,
2]) /* metro module 12045, dependencies: [31, 27, 11994, 661, 33, 4501, 697, 6597, 1585, 4080, 12046, 1962, 5314, 5475, 12047, 4573, 1244, 1305, 7972, 12021, 4578, 2] */;
@@ -1,126 +1,146 @@
/* Metro module 12044; source: modules/nuf/native/components/DiscoverabilityModal.tsx; dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 12021, 12045, 12014, 480, 5280, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ContactSyncActionCreators from '../../../contact_sync/native/ContactSyncActionCreators.tsx'; /* Metro dependency 12001 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as NUFActionCreatorsModule from '../NUFActionCreators.tsx'; /* Metro dependency 12021 */
function _fun92546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:6, offset: 0x0208ed55, size: 365 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = DiscoverabilityModal;
const DiscoverabilityModal2 = DiscoverabilityModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
const ModalAnimation = (ConstantsModule).ModalAnimation;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
closure.modalConfig = {animation: SLIDE_IN_OUT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityModal.tsx');
exports.default = closure;
}
function DiscoverabilityLandingScene() { // fn#92547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:379, offset: 0x0208eec2, size: 213 bytes, params: 1, frame: 20
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun92548);
const {allowPhone, allowEmail} = useContactSyncModalStore();
return ((Component) => <Component onNext={allowEmail.useCallback(_fun92549, [value2, value3, allowEmail, allowPhone,
allowPhone || allowEmail])} />)(importDefault(12045) /* metro dependency 12045: DiscoverabilityLanding */);
}
function DiscoverabilityNameScene() { // fn#92550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:805, offset: 0x0208f060, size: 190 bytes, params: 1, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
env0_3.useEffect(_fun92551, [allowPhone]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={env0_3.useCallback(_fun92552,
[])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
}
function DiscoverabilityModal() { // fn#92553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1165, offset: 0x0208f191, size: 159 bytes, params: 1, frame: 19
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const navigatorProps = {screens: env0_3.useMemo(function() {
return _fun92555();
}, [])};
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
navigatorProps.initialRouteName = LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
return <Navigator {...navigatorProps} />;
}
function _fun92549() { // fn#92549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:608, offset: 0x0208efba, size: 166 bytes, params: 1, frame: 15
var binding;
const value = environment.__proto__;
(importDefault(12001) /* metro dependency 12001: ContactSyncActionCreators */).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (env0_4) {
if (env0_1 == null) {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
} else if (allowPhone) {
binding = env0_0;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
DiscoverabilityModal2.modalConfig = {animation: SLIDE_IN_OUT};
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityModal.tsx');
exports.default = DiscoverabilityModal2;
function DiscoverabilityLandingScene() { // fn#92547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:379, offset: 0x0208eec2, size: 213 bytes, params: 1, frame: 20
const value2 = (UseNavigationNativeModule).useNavigation();
const value3 = (FluxModule).useStateFromStores([UserStore], _fun92548);
const {allowPhone, allowEmail} = useContactSyncModalStore();
return ((Component) => <Component onNext={allowEmail.useCallback(_fun92549, [value2, value3, allowEmail, allowPhone,
allowPhone || allowEmail])} />)(importDefault(12045) /* metro dependency 12045: DiscoverabilityLanding */);
function _fun92548() { // fn#92548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:483, offset: 0x0208ef97, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
function _fun92549() { // fn#92549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:608, offset: 0x0208efba, size: 166 bytes, params: 1, frame: 15
var binding;
const value = environment.__proto__;
(ContactSyncActionCreators).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (ReactNativeModule.View) {
if (env0_1 == null) {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
} else if (allowPhone) {
binding = env0_0;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
}
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
}
}
}
}
function _fun92551() { // fn#92551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:894, offset: 0x0208f11e, size: 52 bytes, params: 1, frame: 11
var value;
if (!allowPhone) {
value = environment.__proto__;
value = require(12021) /* metro dependency 12021: NUFActionCreators */;
value.closeDiscoverabilityModal(false);
function DiscoverabilityNameScene() { // fn#92550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:805, offset: 0x0208f060, size: 190 bytes, params: 1, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
ReactModule.useEffect(_fun92551, [allowPhone]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={ReactModule.useCallback(_fun92552,
[])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
function _fun92551() { // fn#92551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:894, offset: 0x0208f11e, size: 52 bytes, params: 1, frame: 11
var value;
if (!allowPhone) {
value = environment.__proto__;
value = require(12021) /* metro dependency 12021: NUFActionCreators */;
value.closeDiscoverabilityModal(false);
}
}
function _fun92552(a0) { // fn#92552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:969, offset: 0x0208f152, size: 63 bytes, params: 2, frame: 15
const value = environment.__proto__;
(NUFActionCreatorsModule).startContactSyncForDiscoverability(a0);
(NUFActionCreatorsModule).closeDiscoverabilityModal(false);
}
}
function DiscoverabilityModal() { // fn#92553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1165, offset: 0x0208f191, size: 159 bytes, params: 1, frame: 19
const Navigator = (NavigatorNativeModule).Navigator;
const navigatorProps = {screens: ReactModule.useMemo(function() {
return _fun92555();
}, [])};
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
navigatorProps.initialRouteName = LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
return <Navigator {...navigatorProps} />;
function _fun92554() { // fn#92554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1245, offset: 0x0208f230, size: 17 bytes, params: 1, frame: 9
return getScreens_92555();
function getScreens_92555() { // fn#92555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1249, offset: 0x0208f241, size: 219 bytes, params: 1, frame: 18
const object = {};
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, render: render_92558};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true, impressionName: DISCOVERABILITY,
headerTitle: function() {
return null;
}, render: render_92560};
return object;
function getScreens_92555Render() { // fn#92558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1456, owner: getScreens_92555.render, offset: 0x0208f31c, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene />;
}
function getScreens_92555Render_92560() { // fn#92560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1650, owner: getScreens_92555.render, offset: 0x0208f333, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene />;
}
}
}
}
}
function _fun92552(a0) { // fn#92552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:969, offset: 0x0208f152, size: 63 bytes, params: 2, frame: 15
const value = environment.__proto__;
(require(12021) /* metro dependency 12021: NUFActionCreators */).startContactSyncForDiscoverability(a0);
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
}
function _fun92554() { // fn#92554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1245, offset: 0x0208f230, size: 17 bytes, params: 1, frame: 9
return getScreens_92555();
}
function getScreens_92555() { // fn#92555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1249, offset: 0x0208f241, size: 219 bytes, params: 1, frame: 18
const object2 = {};
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, render: render_92558};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerTitle: function() {
return null;
}, render: render_92560};
return object2;
}
function getScreens_92555Render() { // fn#92558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1456, owner: getScreens_92555.render, offset: 0x0208f31c, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene />;
}
function getScreens_92555Render_92560() { // fn#92560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1650, owner: getScreens_92555.render, offset: 0x0208f333, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene />;
}
global.__d(_fun92546, 12044, [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 12021, 12045,
12014, 480, 5280, 1244,
2]) /* metro module 12044, dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 12021, 12045, 12014, 480, 5280, 1244, 2] */;
@@ -1,218 +1,229 @@
/* Metro module 12023; source: modules/nuf/native/components/NUFGuildTemplates.tsx; dependencies: [5, 31, 27, 3973, 661, 12024, 9006, 33, 6593, 11932, 8776, 12025, 12041, 683, 480, 5282, 12000, 1230, 12027, 12029, 9662, 1244, 12032, 12033, 12042, 9444, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import DefaultRouteStore from '../../../../stores/DefaultRouteStore.tsx'; /* Metro dependency 3973 */
import HubEmailConnectionModal from '../../../hub/native/components/HubEmailConnectionModal.tsx'; /* Metro dependency 9444 */
import CreateGuildContainer from '../../../create_guild/native/components/CreateGuildContainer.tsx'; /* Metro dependency 9662 */
import CreateGuildModalActionCreators from '../../../create_guild/native/CreateGuildModalActionCreators.tsx'; /* Metro dependency 12025 */
import GuildTemplates from '../../../create_guild/native/components/GuildTemplates.tsx'; /* Metro dependency 12027 */
import CreationIntent from '../../../create_guild/native/components/CreationIntent.tsx'; /* Metro dependency 12029 */
import JoinServer from '../../../create_guild/native/components/JoinServer.tsx'; /* Metro dependency 12032 */
import AcceptInviteContainer from '../../../create_guild/native/components/AcceptInviteContainer.tsx'; /* Metro dependency 12033 */
import ChannelPrompt from './ChannelPrompt.tsx'; /* Metro dependency 12042 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as Router_utilsModule from '../../../routing/router_utils.tsx'; /* Metro dependency 1230 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NewUserAnalyticsUtilsModule from '../NewUserAnalyticsUtils.tsx'; /* Metro dependency 12000 */
import * as CreateGuildConstantsModule from '../../../create_guild/CreateGuildConstants.tsx'; /* Metro dependency 12024 */
function _fun92362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:6, offset: 0x020859fa, size: 381 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const onCreateGuild = function() {
return _onCreateGuild.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).Keyboard;
const defaultRouteStore = importDefault(3973) /* metro dependency 3973: DefaultRouteStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.AnalyticsSections;
const env0_9 = value.NOOP;
const env0_10 = (require(12024) /* metro dependency 12024: CreateGuildConstants */).GuildTemplateId;
value = require(9006) /* metro dependency 9006: CreateGuildConstants */;
const env0_11 = value.CreateGuildModalStates;
const env0_12 = value.GuildTemplateTriggers;
const env0_13 = value.NUXGuildTemplatesAnalytics;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
const ImpressionGroups = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionGroups;
object = {};
const ImpressionGroups = (AnalyticsUtilsModule).ImpressionGroups;
const GUILD_ADD_FLOW = ImpressionGroups.GUILD_ADD_FLOW;
object2.impression_group = GUILD_ADD_FLOW;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NUFGuildTemplates.tsx');
object.impression_group = GUILD_ADD_FLOW;
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NUFGuildTemplates.tsx');
exports.default = NUFGuildTemplates;
}
function _onCreateGuild() { // fn#92364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:408, offset: 0x02085b77, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun92366).apply(this, arguments);
}
function _onCreateServer() { // fn#92367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:778, offset: 0x02085ca7, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun92369).apply(this, arguments);
}
function getScreens_92370() { // fn#92370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1016, offset: 0x02085d47, size: 634 bytes, params: 1, frame: 21
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
const object = {};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GUILD_ADD_LANDING = ImpressionNames.GUILD_ADD_LANDING;
object.impressionName = GUILD_ADD_LANDING;
object.impressionProperties = env0_15;
object.fullscreen = true;
object.headerTitle = function() {
return null;
};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun92372);
object.render = render_92373;
const CREATION_INTENT = CreateGuildModalStates.CREATION_INTENT;
const GUILD_ADD_INTENT_SELECTION = ImpressionNames.GUILD_ADD_INTENT_SELECTION;
const CREATE_SERVER = CreateGuildModalStates.CREATE_SERVER;
const GUILD_ADD_CUSTOMIZE = ImpressionNames.GUILD_ADD_CUSTOMIZE;
const JOIN_SERVER = CreateGuildModalStates.JOIN_SERVER;
const GUILD_ADD_JOIN = ImpressionNames.GUILD_ADD_JOIN;
const ACCEPT_INVITE = CreateGuildModalStates.ACCEPT_INVITE;
const GUILD_ADD_ACCEPT_INVITE = ImpressionNames.GUILD_ADD_ACCEPT_INVITE;
const CHANNEL_PROMPT = CreateGuildModalStates.CHANNEL_PROMPT;
const GUILD_ADD_CHANNEL_PROMPT = ImpressionNames.GUILD_ADD_CHANNEL_PROMPT;
const JOIN_STUDENT_HUB = CreateGuildModalStates.JOIN_STUDENT_HUB;
return {[GUILD_TEMPLATES]: object, [CREATION_INTENT]: {impressionName: GUILD_ADD_INTENT_SELECTION,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92375}, [CREATE_SERVER]: {impressionName: GUILD_ADD_CUSTOMIZE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92377}, [JOIN_SERVER]: {impressionName: GUILD_ADD_JOIN, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92381}, [ACCEPT_INVITE]: {impressionName: GUILD_ADD_ACCEPT_INVITE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92384}, [CHANNEL_PROMPT]: {impressionName: GUILD_ADD_CHANNEL_PROMPT,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92386}, [JOIN_STUDENT_HUB]: {impressionName: undefined, impressionProperties: env0_15,
fullscreen: true, ignoreKeyboard: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92390}};
}
function NUFGuildTemplates() { // fn#92391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:3063, offset: 0x020862e9, size: 160 bytes, params: 1, frame: 20
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const navigatorProps = {screens: env0_4.useMemo(function() {
return getScreens_92370();
}, []), onWillFocus: Keyboard.dismiss};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
navigatorProps.initialRouteName = GUILD_TEMPLATES;
return <Navigator {...navigatorProps} />;
}
function* _fun92366(a0) { // fn#92366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:459, offset: 0x02085bb4, size: 243 bytes, params: 2, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[8]);
yield value3.transitionToGuildSync(a0);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[9]).createGuildProgress(a0);
var binding3 = env2_1;
binding3(binding2[10])();
binding3(binding2[11]).closeCreateGuildOnboardingModal();
binding(binding2[12]).showInstantInviteModal(a0);
var value9 = binding3(binding2[13]);
var track = value9.track;
var USER_FLOW_TRANSITION = env2_7.USER_FLOW_TRANSITION;
var GUILD_CREATE_MODAL = env2_8.GUILD_CREATE_MODAL;
var CREATE_SERVER = env2_11.CREATE_SERVER;
Reflect.apply(track, value9, [USER_FLOW_TRANSITION, {flow_type: GUILD_CREATE_MODAL, from_step: CREATE_SERVER,
to_step: 'modal_closed'}]);
}
}
function* _fun92369(a0, a1, {id}) { // fn#92369, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:831, offset: 0x02085ce4, size: 99 bytes, params: 4, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var CREATE = env2_10.CREATE;
if (id !== CREATE) {
yield env2_16(a1);
if (false) {
return undefined;
function _onCreateGuild() { // fn#92364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:408, offset: 0x02085b77, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun92366).apply(this, arguments);
function* _fun92366(a0) { // fn#92366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:459, offset: 0x02085bb4, size: 243 bytes, params: 2, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[8]);
yield value3.transitionToGuildSync(a0);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[9]).createGuildProgress(a0);
var binding3 = env2_1;
binding3(binding2[10])();
binding3(binding2[11]).closeCreateGuildOnboardingModal();
binding(binding2[12]).showInstantInviteModal(a0);
var value9 = binding3(binding2[13]);
var track = value9.track;
var USER_FLOW_TRANSITION = env2_7.USER_FLOW_TRANSITION;
var GUILD_CREATE_MODAL = env2_8.GUILD_CREATE_MODAL;
var CREATE_SERVER = env2_11.CREATE_SERVER;
Reflect.apply(track, value9, [USER_FLOW_TRANSITION, {flow_type: GUILD_CREATE_MODAL, from_step: CREATE_SERVER,
to_step: 'modal_closed'}]);
}
} else {
var push = a0.push;
var CHANNEL_PROMPT = env2_11.CHANNEL_PROMPT;
Reflect.apply(push, a0, [CHANNEL_PROMPT, {guildId: a1}]);
}
}
function _onCreateServer() { // fn#92367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:778, offset: 0x02085ca7, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun92369).apply(this, arguments);
function* _fun92369(a0, a1, {id}) { // fn#92369, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:831, offset: 0x02085ce4, size: 99 bytes, params: 4, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var CREATE = env2_10.CREATE;
if (id !== CREATE) {
yield env2_16(a1);
if (false) {
return undefined;
}
} else {
var push = a0.push;
var CHANNEL_PROMPT = env2_11.CHANNEL_PROMPT;
Reflect.apply(push, a0, [CHANNEL_PROMPT, {guildId: a1}]);
}
}
}
}
function getScreens_92370() { // fn#92370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1016, offset: 0x02085d47, size: 634 bytes, params: 1, frame: 21
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
const object2 = {};
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GUILD_ADD_LANDING = ImpressionNames.GUILD_ADD_LANDING;
object2.impressionName = GUILD_ADD_LANDING;
object2.impressionProperties = env0_15;
object2.fullscreen = true;
object2.headerTitle = function() {
return null;
};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun92372);
object2.render = render_92373;
const CREATION_INTENT = CreateGuildModalStates.CREATION_INTENT;
const GUILD_ADD_INTENT_SELECTION = ImpressionNames.GUILD_ADD_INTENT_SELECTION;
const CREATE_SERVER = CreateGuildModalStates.CREATE_SERVER;
const GUILD_ADD_CUSTOMIZE = ImpressionNames.GUILD_ADD_CUSTOMIZE;
const JOIN_SERVER = CreateGuildModalStates.JOIN_SERVER;
const GUILD_ADD_JOIN = ImpressionNames.GUILD_ADD_JOIN;
const ACCEPT_INVITE = CreateGuildModalStates.ACCEPT_INVITE;
const GUILD_ADD_ACCEPT_INVITE = ImpressionNames.GUILD_ADD_ACCEPT_INVITE;
const CHANNEL_PROMPT = CreateGuildModalStates.CHANNEL_PROMPT;
const GUILD_ADD_CHANNEL_PROMPT = ImpressionNames.GUILD_ADD_CHANNEL_PROMPT;
const JOIN_STUDENT_HUB = CreateGuildModalStates.JOIN_STUDENT_HUB;
return {[GUILD_TEMPLATES]: object2, [CREATION_INTENT]: {impressionName: GUILD_ADD_INTENT_SELECTION,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92375}, [CREATE_SERVER]: {impressionName: GUILD_ADD_CUSTOMIZE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92377}, [JOIN_SERVER]: {impressionName: GUILD_ADD_JOIN, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92381}, [ACCEPT_INVITE]: {impressionName: GUILD_ADD_ACCEPT_INVITE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92384}, [CHANNEL_PROMPT]: {impressionName: GUILD_ADD_CHANNEL_PROMPT,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92386}, [JOIN_STUDENT_HUB]: {impressionName: undefined, impressionProperties: env0_15,
fullscreen: true, ignoreKeyboard: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92390}};
function _fun92372() { // fn#92372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1224, offset: 0x02085fc1, size: 130 bytes, params: 1, frame: 20
const value = environment.__proto__;
const trackNUFStep = NewUserAnalyticsUtilsModule.trackNUFStep;
const STEP_GUILD_TEMPLATE = NUXGuildTemplatesAnalytics.STEP_GUILD_TEMPLATE;
const STEP_FRIEND_LIST = NUXGuildTemplatesAnalytics.STEP_FRIEND_LIST;
Reflect.apply(trackNUFStep, NewUserAnalyticsUtilsModule, [STEP_GUILD_TEMPLATE, STEP_FRIEND_LIST, {skip: true}]);
Router_utilsModule.transitionTo(DefaultRouteStore.fallbackRoute);
(CreateGuildModalActionCreators).closeCreateGuildOnboardingModal();
}
function getScreens_92370Render() { // fn#92373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1395, owner: getScreens_92370.render, offset: 0x02086043, size: 54 bytes, params: 1, frame: 14
const NUF = GuildTemplateTriggers.NUF;
return <GuildTemplates trigger={NUF} />;
}
function getScreens_92370Render_92375({guildTemplate}) { // fn#92375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1581, owner: getScreens_92370.render, offset: 0x02086079, size: 68 bytes, params: 2, frame: 15
const NUF = GuildTemplateTriggers.NUF;
return <CreationIntent guildTemplate={guildTemplate} trigger={NUF} />;
}
function getScreens_92370Render_92377(a0, a1) { // fn#92377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1791, owner: getScreens_92370.render, offset: 0x020860bd, size: 143 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const defaultImportProps = {...a0};
defaultImportProps['onCreate'] = renderOnCreate;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps['customTitle'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5HZu07']);
return <CreateGuildContainer {...defaultImportProps} />;
function renderOnCreate({guild}) { // fn#92378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1824, owner: getScreens_92370.render.onCreate, offset: 0x0208614c, size: 50 bytes, params: 2, frame: 15
return (function() {
return _onCreateServer.apply(this, arguments);
})(require, guild.id, env0_0.guildTemplate);
}
}
function getScreens_92370Render_92381() { // fn#92381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2128, owner: getScreens_92370.render, offset: 0x0208617e, size: 72 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component location="Onboarding Join Guild Modal" onClose={(CreateGuildModalActionCreators).closeCreateGuildModal} />)(JoinServer);
}
function getScreens_92370Render_92384({code}) { // fn#92384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2393, owner: getScreens_92370.render, offset: 0x020861c6, size: 74 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component code={code} onPressClose={(CreateGuildModalActionCreators).closeCreateGuildModal} />)(AcceptInviteContainer);
}
function getScreens_92370Render_92386({guildId}) { // fn#92386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2621, owner: getScreens_92370.render, offset: 0x02086210, size: 148 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ChannelPrompt
hasSkip
hasBack={false}
onCancel={NOOP}
onSuccess={function() {
return onCreateGuild(guildId);
}}
guildId={guildId}
buttonText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uHXB+F'])}
/>
);
}
function getScreens_92370Render_92390() { // fn#92390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2926, owner: getScreens_92370.render, offset: 0x020862bb, size: 46 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component isNestedNavigator />)(HubEmailConnectionModal);
}
}
function NUFGuildTemplates() { // fn#92391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:3063, offset: 0x020862e9, size: 160 bytes, params: 1, frame: 20
const Navigator = (NavigatorNativeModule).Navigator;
const navigatorProps = {screens: ReactModule.useMemo(function() {
return getScreens_92370();
}, []), onWillFocus: Keyboard.dismiss};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
navigatorProps.initialRouteName = GUILD_TEMPLATES;
return <Navigator {...navigatorProps} />;
}
}
function _fun92372() { // fn#92372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1224, offset: 0x02085fc1, size: 130 bytes, params: 1, frame: 20
const value = environment.__proto__;
const newUserAnalyticsUtilsModule = require(12000) /* metro dependency 12000: NewUserAnalyticsUtils */;
const trackNUFStep = newUserAnalyticsUtilsModule.trackNUFStep;
const STEP_GUILD_TEMPLATE = NUXGuildTemplatesAnalytics.STEP_GUILD_TEMPLATE;
const STEP_FRIEND_LIST = NUXGuildTemplatesAnalytics.STEP_FRIEND_LIST;
Reflect.apply(trackNUFStep, newUserAnalyticsUtilsModule, [STEP_GUILD_TEMPLATE, STEP_FRIEND_LIST, {skip: true}]);
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
router_utilsModule.transitionTo(DefaultRouteStore.fallbackRoute);
(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).closeCreateGuildOnboardingModal();
}
function getScreens_92370Render() { // fn#92373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1395, owner: getScreens_92370.render, offset: 0x02086043, size: 54 bytes, params: 1, frame: 14
const GuildTemplates = importDefault(12027) /* metro dependency 12027: GuildTemplates */;
const NUF = GuildTemplateTriggers.NUF;
return <GuildTemplates trigger={NUF} />;
}
function getScreens_92370Render_92375({guildTemplate}) { // fn#92375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1581, owner: getScreens_92370.render, offset: 0x02086079, size: 68 bytes, params: 2, frame: 15
const CreationIntent = importDefault(12029) /* metro dependency 12029: CreationIntent */;
const NUF = GuildTemplateTriggers.NUF;
return <CreationIntent guildTemplate={guildTemplate} trigger={NUF} />;
}
function getScreens_92370Render_92377(a0, a1) { // fn#92377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1791, owner: getScreens_92370.render, offset: 0x020860bd, size: 143 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const CreateGuildContainer = importDefault(9662) /* metro dependency 9662: CreateGuildContainer */;
const defaultImportProps = {...a0};
defaultImportProps['onCreate'] = renderOnCreate;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps['customTitle'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5HZu07']);
return <CreateGuildContainer {...defaultImportProps} />;
}
function getScreens_92370Render_92381() { // fn#92381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2128, owner: getScreens_92370.render, offset: 0x0208617e, size: 72 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component location="Onboarding Join Guild Modal" onClose={(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).closeCreateGuildModal} />)(importDefault(12032) /* metro dependency 12032: JoinServer */);
}
function getScreens_92370Render_92384({code}) { // fn#92384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2393, owner: getScreens_92370.render, offset: 0x020861c6, size: 74 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component code={code} onPressClose={(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).closeCreateGuildModal} />)(importDefault(12033) /* metro dependency 12033: AcceptInviteContainer */);
}
function getScreens_92370Render_92386({guildId}) { // fn#92386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2621, owner: getScreens_92370.render, offset: 0x02086210, size: 148 bytes, params: 2, frame: 18
const ChannelPrompt = importDefault(12042) /* metro dependency 12042: ChannelPrompt */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ChannelPrompt
hasSkip
hasBack={false}
onCancel={NOOP}
onSuccess={function() {
return onCreateGuild(guildId);
}}
guildId={guildId}
buttonText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uHXB+F'])}
/>
);
}
function getScreens_92370Render_92390() { // fn#92390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2926, owner: getScreens_92370.render, offset: 0x020862bb, size: 46 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component isNestedNavigator />)(importDefault(9444) /* metro dependency 9444: HubEmailConnectionModal */);
}
function renderOnCreate({guild}) { // fn#92378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1824, owner: getScreens_92370.render.onCreate, offset: 0x0208614c, size: 50 bytes, params: 2, frame: 15
return (function() {
return _onCreateServer.apply(this, arguments);
})(require, guild.id, env0_0.guildTemplate);
}
global.__d(_fun92362, 12023, [5, 31, 27, 3973, 661, 12024, 9006, 33, 6593, 11932, 8776, 12025, 12041, 683, 480,
5282, 12000, 1230, 12027, 12029, 9662, 1244, 12032, 12033, 12042, 9444, 5280,
2]) /* metro module 12023, dependencies: [5, 31, 27, 3973, 661, 12024, 9006, 33, 6593, 11932, 8776, 12025, 12041, 683, 480, 5282, 12000, 1230, 12027, 12029, 9662, 1244, 12032, 12033, 12042, 9444, 5280, 2] */;
@@ -1,150 +1,197 @@
/* Metro module 15793; source: modules/nuf/native/components/NewUserModal.tsx; dependencies: [57, 31, 27, 33, 9884, 4501, 697, 15794, 1962, 4497, 5280, 15791, 5080, 15792, 5286, 477, 14357, 15795, 12013, 12002, 15796, 15798, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import SkipHeaderButton from './SkipHeaderButton.tsx'; /* Metro dependency 12013 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseAlertStoreNativeModule from '../../../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as Module09884Module from '../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
import * as NewUserModalTypesModule from './NewUserModalTypes.tsx'; /* Metro dependency 15792 */
function _fun121332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:6, offset: 0x02544b39, size: 290 bytes, params: 8, frame: 21
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 */;
const env0_5 = (require(27) /* metro dependency 27 */).NativeModules;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_8 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, value, [{header: {'borderBottomWidth': 0, 'backgroundColor': null,
'shadowColor': 'transparent', backgroundColor: BACKGROUND_BASE_LOW}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NewUserModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserModal.tsx');
exports.default = NewUserModal;
}
function NewUserModal({initialRouteName, initialOnboardingStepIndex}) { // fn#121333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:429, offset: 0x02544c5b, size: 593 bytes, params: 2, frame: 23
const env0_0 = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [initialOnboardingStepIndex]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value4 = Module00057(Reflect.apply(useState, binding, [initialOnboardingStepIndex]), 2);
const property2 = value4[0];
var env0_4 = value4[1];
const env0_5 = binding.useRef(null);
const env0_6 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const value5 = binding.useCallback(_fun121334, [property2, property]);
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
});
const Navigator = env0_8.Navigator;
object = {screenOptions: screenOptions_121337};
const value6 = 'choose-avatar';
object.initialRouteName = initialRouteName ?? value6;
binding = env0_8;
let Screen = binding.Screen;
const items2 = [
<Screen
name="enable-notification"
getComponent={function() {
return require(dependencyMap[16]).RedesignNotificationScreen;
}}
initialParams={{onComplete: value5}}
/>,
];
Screen = binding.Screen;
items2[1] = (
<Screen
name={value6}
getComponent={function() {
return require(dependencyMap[17]).default;
}}
options={function() {
return {headerRight: _fun121343};
}}
initialParams={{onComplete: value5}}
/>
);
Screen = binding.Screen;
items2[2] = (
<Screen
name="contact-sync"
options={{headerShown: false}}
getComponent={function() {
return require(dependencyMap[19]).ContactSyncOnboardingModal;
}}
initialParams={{onComplete: value5}}
/>
);
Screen = binding.Screen;
items2[3] = (
<Screen
name="discoverability"
options={{headerShown: false}}
getComponent={function() {
return require(dependencyMap[20]).default;
}}
initialParams={{onComplete: value5}}
/>
);
Screen = binding.Screen;
items2[4] = (
<Screen
name="connect-guardian"
getComponent={function() {
return require(dependencyMap[21]).default;
}}
initialParams={{onComplete: value5}}
/>
);
return (
<Navigator {...object}>
{items2}
</Navigator>
);
function _fun121334(a0) { // fn#121334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:672, offset: 0x02544eac, size: 85 bytes, params: 2, frame: 16
let value = a0;
value = (require(15791) /* metro dependency 15791: NewUserUtils */).getNextOnboardingStep(value != null && value,
Module00057, env0_1);
value.then(_fun121335);
function _fun121335({lastShownStepIndex, onboardingStepIndex, continueNavigation}) { // fn#121335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:729, offset: 0x02544f01, size: 166 bytes, params: 2, frame: 17
const NEW_USER_MODAL_KEY = (NewUserModalTypesModule).NEW_USER_MODAL_KEY;
var value2;
var moduleValue;
env1_2(onboardingStepIndex);
env1_4(lastShownStepIndex);
if (continueNavigation) {
if (env1_5.current != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15791) /* metro dependency 15791: NewUserUtils */;
moduleValue.continueToNextStep(onboardingStepIndex, env1_5.current);
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
}
function NewUserModal({initialRouteName, initialOnboardingStepIndex}) { // fn#121333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:429, offset: 0x02544c5b, size: 593 bytes, params: 2, frame: 23
var object2;
const env0_0 = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [initialOnboardingStepIndex]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [initialOnboardingStepIndex]), 2);
const property2 = value4[0];
var env0_4 = value4[1];
const env0_5 = binding.useRef(null);
const env0_6 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const value5 = binding.useCallback(_fun121334, [property2, property]);
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
});
const Navigator = env0_8.Navigator;
object2 = {screenOptions: screenOptions_121337};
const value6 = 'choose-avatar';
object2.initialRouteName = initialRouteName ?? value6;
binding = env0_8;
let Screen = binding.Screen;
const items2 = [<Screen name="enable-notification" getComponent={function() {
return require(dependencyMap[16]).RedesignNotificationScreen;
}} initialParams={{onComplete: value5}} />];
Screen = binding.Screen;
items2[1] = <Screen name={value6} getComponent={function() {
return require(dependencyMap[17]).default;
}} options={function() {
return {headerRight: _fun121343};
}} initialParams={{onComplete: value5}} />;
Screen = binding.Screen;
items2[2] = <Screen name="contact-sync" options={{headerShown: false}} getComponent={function() {
return require(dependencyMap[19]).ContactSyncOnboardingModal;
}} initialParams={{onComplete: value5}} />;
Screen = binding.Screen;
items2[3] = <Screen name="discoverability" options={{headerShown: false}} getComponent={function() {
return require(dependencyMap[20]).default;
}} initialParams={{onComplete: value5}} />;
Screen = binding.Screen;
items2[4] = <Screen name="connect-guardian" getComponent={function() {
return require(dependencyMap[21]).default;
}} initialParams={{onComplete: value5}} />;
return (
<Navigator {...object2}>
{items2}
</Navigator>
);
}
function _fun121334(a0) { // fn#121334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:672, offset: 0x02544eac, size: 85 bytes, params: 2, frame: 16
let value = a0;
value = (require(15791) /* metro dependency 15791: NewUserUtils */).getNextOnboardingStep(value != null && value,
env0_3, env0_1);
value.then(_fun121335);
}
function NewUserModalScreenOptions({navigation}) { // fn#121337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1044, owner: NewUserModal.screenOptions, offset: 0x02544fc2, size: 163 bytes, params: 2, frame: 15
env0_5.current = navigation;
const object2 = {'headerStyle': null, 'headerShadowVisible': false, 'title': '', 'headerLeft': null,
'headerRight': null, 'fullScreenGestureEnabled': false};
object2.headerStyle = styles.header;
object2.headerLeft = function() {
return null;
};
object2.headerRight = function() {
return null;
};
object2.presentation = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'transparentModal' : 'card';
object2.animation = 'slide_from_right';
object2.headerBackVisible = false;
copyDataProperties(object2, env0_6, require);
return object2;
}
function NewUserModalOptions() { // fn#121342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1566, owner: NewUserModal.options, offset: 0x02545086, size: 18 bytes, params: 1, frame: 2
return {headerRight: headerRight_121343};
}
function _fun121335({lastShownStepIndex, onboardingStepIndex, continueNavigation}) { // fn#121335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:729, offset: 0x02544f01, size: 166 bytes, params: 2, frame: 17
const NEW_USER_MODAL_KEY = (require(15792) /* metro dependency 15792: NewUserModalTypes */).NEW_USER_MODAL_KEY;
var value2;
var moduleValue;
env1_2(onboardingStepIndex);
env1_4(lastShownStepIndex);
if (continueNavigation) {
if (env1_5.current != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15791) /* metro dependency 15791: NewUserUtils */;
moduleValue.continueToNextStep(onboardingStepIndex, env1_5.current);
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
function NewUserModalScreenOptions({navigation}) { // fn#121337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1044, owner: NewUserModal.screenOptions, offset: 0x02544fc2, size: 163 bytes, params: 2, frame: 15
env0_5.current = navigation;
const object = {'headerStyle': null, 'headerShadowVisible': false, 'title': '', 'headerLeft': null,
'headerRight': null, 'fullScreenGestureEnabled': false};
object.headerStyle = styles.header;
object.headerLeft = function() {
return null;
};
object.headerRight = function() {
return null;
};
object.presentation = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'transparentModal' : 'card';
object.animation = 'slide_from_right';
object.headerBackVisible = false;
copyDataProperties(object, env0_6, require);
return object;
}
function NewUserModalOptions() { // fn#121342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1566, owner: NewUserModal.options, offset: 0x02545086, size: 18 bytes, params: 1, frame: 2
return {headerRight: headerRight_121343};
function optionsHeaderRight_121343(a0) { // fn#121343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1584, owner: NewUserModal.options.headerRight, offset: 0x02545098, size: 67 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['onPress']: headerRightOnPress_121344}} />)(SkipHeaderButton);
function headerRightOnPress_121344() { // fn#121344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1612, owner: NewUserModal.options.headerRight.onPress, offset: 0x025450db, size: 25 bytes, params: 1, frame: 11
handleChooseAvatarSkip(env2_7);
function handleChooseAvatarSkip(a0) { // fn#121345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1616, owner: NewUserModal.options.headerRight.onPress.handleChooseAvatarSkip, offset: 0x025450f4, size: 100 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__.__proto__.__proto__;
(UseAlertStoreNativeModule).openAlert('skip-avatar-upload',
((Component) => <Component onConfirm={onConfirm_121347} />)(env4_4.lazy(_fun121346)));
function _fun121346() { // fn#121346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1665, offset: 0x02545158, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
return require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths);
}
function handleChooseAvatarSkipOnConfirm() { // fn#121347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1747, owner: NewUserModal.options.headerRight.onPress.handleChooseAvatarSkip.onConfirm, offset: 0x01d72e0f, size: 18 bytes, params: 1, frame: 11
return env0_0(true);
}
}
}
}
}
}
}
function optionsHeaderRight_121343(a0) { // fn#121343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1584, owner: NewUserModal.options.headerRight, offset: 0x02545098, size: 67 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['onPress']: headerRightOnPress_121344}} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
}
function headerRightOnPress_121344() { // fn#121344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1612, owner: NewUserModal.options.headerRight.onPress, offset: 0x025450db, size: 25 bytes, params: 1, frame: 11
handleChooseAvatarSkip(env2_7);
}
function handleChooseAvatarSkip(a0) { // fn#121345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1616, owner: NewUserModal.options.headerRight.onPress.handleChooseAvatarSkip, offset: 0x025450f4, size: 100 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__.__proto__.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('skip-avatar-upload',
((Component) => <Component onConfirm={onConfirm_121347} />)(env4_4.lazy(_fun121346)));
}
function _fun121346() { // fn#121346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1665, offset: 0x02545158, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
return require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths);
}
global.__d(_fun121332, 15793, [57, 31, 27, 33, 9884, 4501, 697, 15794, 1962, 4497, 5280, 15791, 5080, 15792, 5286,
477, 14357, 15795, 12013, 12002, 15796, 15798,
2]) /* metro module 15793, dependencies: [57, 31, 27, 33, 9884, 4501, 697, 15794, 1962, 4497, 5280, 15791, 5080, 15792, 5286, 477, 14357, 15795, 12013, 12002, 15796, 15798, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 15792; source: modules/nuf/native/components/NewUserModalTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun121331(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16000:6, offset: 0x02544ae5, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NewUserModalTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserModalTypes.tsx');
exports.NEW_USER_MODAL_KEY = 'new-user-modal';
}
global.__d(_fun121331, 15792, [2]) /* metro module 15792, dependencies: [2] */;
@@ -1,11 +1,17 @@
/* Metro module 12005; source: modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx; dependencies: [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
function _fun92272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:6, offset: 0x02081ec1, size: 557 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -13,65 +19,94 @@ function _fun92272(global, require, importDefault, importAll, module, exports, d
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.scrollContainer = {minHeight: '100%'};
object2.container = {'flexGrow': 1, 'alignItems': 'center', 'justifyContent': 'center'};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.alertContainer = {paddingTop: 80 + NAV_BAR_HEIGHT};
const object3 = {'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null,
object = {};
object.scrollContainer = {minHeight: '100%'};
object.container = {'flexGrow': 1, 'alignItems': 'center', 'justifyContent': 'center'};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object.alertContainer = {paddingTop: 80 + NAV_BAR_HEIGHT};
const object4 = {'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null,
'alignItems': 'center', 'maxWidth': 290};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object3.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
object4.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object3, SHADOW_HIGH, undefined);
object2.alert = object3;
object2.alertContent = {'paddingVertical': 24, 'paddingHorizontal': 24, 'alignItems': 'center'};
object2.alertTitle = {'paddingBottom': 8, 'textAlign': 'center'};
copyDataProperties(object4, SHADOW_HIGH, undefined);
object.alert = object4;
object.alertContent = {'paddingVertical': 24, 'paddingHorizontal': 24, 'alignItems': 'center'};
object.alertTitle = {'paddingBottom': 8, 'textAlign': 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.alertSubtitle = {paddingBottom: PX_16, textAlign: 'center'};
object2.buttonWrapper = {flexDirection: 'row'};
object.alertSubtitle = {paddingBottom: PX_16, textAlign: 'center'};
object.buttonWrapper = {flexDirection: 'row'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.primaryButtonContainer = {marginBottom: PX_12};
object.primaryButtonContainer = {marginBottom: PX_12};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.trailing = {flexGrow: 0, padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx');
object.trailing = {flexGrow: 0, padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx');
exports.default = NewUserPermissionsOnboarding;
}
function NewUserPermissionsOnboarding({title, subtitle, header, trailing, loading, showSkip, onAllow, onDontAllow}) { // fn#92273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:1025, offset: 0x020820ee, size: 688 bytes, params: 2, frame: 39
showSkip = showSkip === undefined || showSkip;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text style={styles.alertTitle} variant="heading-lg/bold" color="text-default">{title}</Text>];
items2[1] = <Text style={styles.alertSubtitle} variant="text-sm/medium" color="text-default">{subtitle}</Text>;
const items3 = [styles.buttonWrapper];
items3[1] = showSkip && styles.primaryButtonContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[2] = <View style={items3}><Button variant="primary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2nYlT2'])} onPress={onAllow} loading={loading} grow /></View>;
items2[3] = showSkip && <View style={styles.buttonWrapper}><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])} onPress={onDontAllow} grow /></View>;
return (
<ScrollView contentContainerStyle={styles.scrollContainer}>
<View style={styles.container}>
<View style={styles.alertContainer}>
<View>
{header}
<View style={styles.alert}>
<View style={styles.alertContent}>
{items2}
function NewUserPermissionsOnboarding({title, subtitle, header, trailing, loading, showSkip, onAllow, onDontAllow}) { // fn#92273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:1025, offset: 0x020820ee, size: 688 bytes, params: 2, frame: 39
showSkip = showSkip === undefined || showSkip;
const styles = useStyles();
const Text = (TextModule).Text;
const items2 = [
<Text
style={styles.alertTitle}
variant="heading-lg/bold"
color="text-default"
>
{title}
</Text>,
];
items2[1] = (
<Text
style={styles.alertSubtitle}
variant="text-sm/medium"
color="text-default"
>
{subtitle}
</Text>
);
const items3 = [styles.buttonWrapper];
items3[1] = showSkip && styles.primaryButtonContainer;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[2] = (
<View style={items3}>
<Button
variant="primary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2nYlT2'])}
onPress={onAllow}
loading={loading}
grow
/>
</View>
);
items2[3] = showSkip && <View style={styles.buttonWrapper}><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])} onPress={onDontAllow} grow /></View>;
return (
<ScrollView contentContainerStyle={styles.scrollContainer}>
<View style={styles.container}>
<View style={styles.alertContainer}>
<View>
{header}
<View style={styles.alert}>
<View style={styles.alertContent}>
{items2}
</View>
</View>
</View>
</View>
</View>
</View>
<View style={styles.trailing}>
{trailing}
</View>
</ScrollView>
);
<View style={styles.trailing}>
{trailing}
</View>
</ScrollView>
);
}
}
global.__d(_fun92272, 12005, [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244,
2]) /* metro module 12005, dependencies: [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244, 2] */;
@@ -1,11 +1,20 @@
/* Metro module 15797; source: modules/nuf/native/components/RedesignDiscoverabilityLanding.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 5314, 4573, 1244, 5475, 12047, 11997, 4578, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncUtilsModule from '../../../contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun121380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:6, offset: 0x0254629e, size: 418 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -13,74 +22,108 @@ function _fun121380(global, require, importDefault, importAll, module, exports,
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.topContainer = {paddingTop: PX_16};
object2.growContainer = {flexGrow: 2};
object.topContainer = {paddingTop: PX_16};
object.growContainer = {flexGrow: 2};
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.image = {width: '100%', marginBottom: PX_32};
object.image = {width: '100%', marginBottom: PX_32};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.title = {textAlign: 'center', marginBottom: PX_16};
object.title = {textAlign: 'center', marginBottom: PX_16};
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.subtitle = {textAlign: 'center', marginBottom: PX_32};
object2.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24, 'textAlign': 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityLanding.tsx');
object.subtitle = {textAlign: 'center', marginBottom: PX_32};
object.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24, 'textAlign': 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityLanding.tsx');
exports.default = RedesignDiscoverabilityLanding;
function RedesignDiscoverabilityLanding({onNext}) { // fn#121381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:695, offset: 0x02546440, size: 769 bytes, params: 2, frame: 29
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const object2 = {flexGrow: 2};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
object2.paddingBottom = bottom + 16;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const items3 = [
<View style={styles.topContainer} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}
</Text>
);
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items3[2] = (
<Text
variant="text-sm/medium"
color="text-default"
style={styles.subtitle}
>
{Reflect.apply(string, intl, [KMW0kP])}
</Text>
);
items3[3] = ((Component) => <Component resizeMode="contain" style={styles.image} source={importDefault(12047) /* metro dependency 12047 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ci12MJ), ' '];
const format = intl.format;
const VcSQ4n = (require(1244) /* metro dependency 1244: indexNative */).t.VcSQ4n;
items2[2] = Reflect.apply(format, intl, [VcSQ4n, {learnMoreHook: learnMoreHook_121382}]);
items3[4] = (
<Text
style={styles.info}
variant="text-sm/medium"
color="text-default"
>
{items2}
</Text>
);
items3[5] = <View style={styles.growContainer} />;
const Button = (ButtonNativeModule).Button;
items3[6] = (
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gHPk3I)}
onPress={onNext}
/>
);
return (
<ScrollView
style={styles.container}
alwaysBounceVertical={false}
contentContainerStyle={object2}
>
{items3}
</ScrollView>
);
function RedesignDiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#121382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:1543, owner: RedesignDiscoverabilityLanding.learnMoreHook, offset: 0x02546741, size: 91 bytes, params: 3, frame: 17
const Text = (TextModule).Text;
return (
<Text
onPress={(ContactSyncUtilsModule).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
}
function RedesignDiscoverabilityLanding({onNext}) { // fn#121381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:695, offset: 0x02546440, size: 769 bytes, params: 2, frame: 29
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const object = {flexGrow: 2};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
object.paddingBottom = bottom + 16;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const items3 = [<View style={styles.topContainer} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}</Text>;
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items3[2] = <Text variant="text-sm/medium" color="text-default" style={styles.subtitle}>{Reflect.apply(string, intl,
[KMW0kP])}</Text>;
items3[3] = ((Component) => <Component resizeMode="contain" style={styles.image} source={importDefault(12047) /* metro dependency 12047 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ci12MJ), ' '];
const format = intl.format;
const VcSQ4n = (require(1244) /* metro dependency 1244: indexNative */).t.VcSQ4n;
items2[2] = Reflect.apply(format, intl, [VcSQ4n, {learnMoreHook: learnMoreHook}]);
items3[4] = <Text style={styles.info} variant="text-sm/medium" color="text-default">{items2}</Text>;
items3[5] = <View style={styles.growContainer} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[6] = <Button variant="primary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gHPk3I)} onPress={onNext} />;
return (
<ScrollView
style={styles.container}
alwaysBounceVertical={false}
contentContainerStyle={object}
>
{items3}
</ScrollView>
);
}
function RedesignDiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#121382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:1543, owner: RedesignDiscoverabilityLanding.learnMoreHook, offset: 0x02546741, size: 91 bytes, params: 3, frame: 17
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={(require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun121380, 15797, [31, 27, 33, 4501, 697, 1585, 5314, 4573, 1244, 5475, 12047, 11997, 4578,
2]) /* metro module 15797, dependencies: [31, 27, 33, 4501, 697, 1585, 5314, 4573, 1244, 5475, 12047, 11997, 4578, 2] */;
@@ -1,152 +1,177 @@
/* Metro module 15796; source: modules/nuf/native/components/RedesignDiscoverabilityModal.tsx; dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021, 12014, 480, 12013, 5280, 1244, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ContactSyncActionCreators from '../../../contact_sync/native/ContactSyncActionCreators.tsx'; /* Metro dependency 12001 */
import SkipHeaderButton from './SkipHeaderButton.tsx'; /* Metro dependency 12013 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as NUFActionCreatorsModule from '../NUFActionCreators.tsx'; /* Metro dependency 12021 */
function _fun121362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:6, offset: 0x02545be2, size: 409 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = RedesignDiscoverabilityModal;
const RedesignDiscoverabilityModal2 = RedesignDiscoverabilityModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const ModalAnimation = (ConstantsModule).ModalAnimation;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
object.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
const object3 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object4.paddingTop = NAV_BAR_HEIGHT + 32;
object2.container = object4;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
object3.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object3.paddingTop = NAV_BAR_HEIGHT + 32;
object.container = object3;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
closure.modalConfig = {animation: SLIDE_IN_OUT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityModal.tsx');
exports.default = closure;
}
function DiscoverabilityLandingScene_121363({onComplete}) { // fn#121363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:485, offset: 0x02545d7b, size: 247 bytes, params: 2, frame: 22
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun121364);
const value4 = useContactSyncModalStore();
const allowPhone = value4.allowPhone;
const env0_3 = allowPhone;
const name = value4.name;
const allowEmail = value4.allowEmail;
return ((Component) => <Component onNext={env0_3.useCallback(_fun121365, [allowPhone, allowEmail,
allowPhone || allowEmail, value3, name, value2,
onComplete])} />)(importDefault(15797) /* metro dependency 15797: RedesignDiscoverabilityLanding */);
}
function DiscoverabilityNameScene_121366({onComplete}) { // fn#121366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:912, offset: 0x02545f07, size: 211 bytes, params: 2, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
env0_3.useEffect(function() {
if (!allowPhone) {
onComplete();
RedesignDiscoverabilityModal2.modalConfig = {animation: SLIDE_IN_OUT};
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityModal.tsx');
exports.default = RedesignDiscoverabilityModal2;
function DiscoverabilityLandingScene_121363({onComplete}) { // fn#121363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:485, offset: 0x02545d7b, size: 247 bytes, params: 2, frame: 22
const value2 = (UseNavigationNativeModule).useNavigation();
const value3 = (FluxModule).useStateFromStores([UserStore], _fun121364);
const value4 = useContactSyncModalStore();
const allowPhone = value4.allowPhone;
const allowPhone2 = allowPhone;
const name = value4.name;
const allowEmail = value4.allowEmail;
return ((Component) => <Component onNext={allowPhone2.useCallback(_fun121365, [allowPhone, allowEmail,
allowPhone || allowEmail, value3, name, value2,
onComplete])} />)(importDefault(15797) /* metro dependency 15797: RedesignDiscoverabilityLanding */);
function _fun121364() { // fn#121364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:603, offset: 0x0208ef97, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
}, [allowPhone, onComplete]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={env0_3.useCallback(_fun121368,
[onComplete])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
}
function RedesignDiscoverabilityModal(a0) { // fn#121369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1219, offset: 0x02546026, size: 206 bytes, params: 2, frame: 20
const onComplete = a0.route.params.onComplete;
const styles = useStyles();
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const binding = env0_3;
const useMemo = binding.useMemo;
const items2 = [onComplete];
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
headerStyle={styles.header}
screens={Reflect.apply(useMemo, binding, [function() {
return _fun121371(onComplete ?? _fun121379);
}, items2])}
initialRouteName={LANDING}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun121365() { // fn#121365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:737, offset: 0x02545e72, size: 149 bytes, params: 1, frame: 15
var binding;
(importDefault(12001) /* metro dependency 12001: ContactSyncActionCreators */).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (env0_6) {
if (env0_2 == null) {
onComplete();
} else if (allowPhone) {
if (name == null) {
binding = env0_1;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
function _fun121365() { // fn#121365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:737, offset: 0x02545e72, size: 149 bytes, params: 1, frame: 15
var binding;
(ContactSyncActionCreators).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (env0_6) {
if (env0_2 == null) {
onComplete();
} else if (allowPhone) {
if (name == null) {
binding = env0_1;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
} else {
onComplete();
}
} else {
onComplete();
}
} else {
onComplete();
}
} else {
}
}
function DiscoverabilityNameScene_121366({onComplete}) { // fn#121366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:912, offset: 0x02545f07, size: 211 bytes, params: 2, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
ReactModule.useEffect(function() {
if (!allowPhone) {
onComplete();
}
}, [allowPhone, onComplete]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={ReactModule.useCallback(_fun121368,
[onComplete])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
function _fun121368(a0) { // fn#121368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1057, offset: 0x02545ff2, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(NUFActionCreatorsModule).startContactSyncForDiscoverability(a0);
onComplete();
}
} else {
onComplete();
}
function RedesignDiscoverabilityModal(a0) { // fn#121369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1219, offset: 0x02546026, size: 206 bytes, params: 2, frame: 20
const onComplete = a0.route.params.onComplete;
const styles = useStyles();
const Navigator = (NavigatorNativeModule).Navigator;
const useMemo = ReactModule.useMemo;
const items2 = [onComplete];
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
headerStyle={styles.header}
screens={Reflect.apply(useMemo, ReactModule, [function() {
return _fun121371(onComplete ?? _fun121379);
}, items2])}
initialRouteName={LANDING}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
function _fun121370() { // fn#121370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1369, offset: 0x025460f4, size: 44 bytes, params: 1, frame: 12
return getScreens_121371(onComplete ?? (function() {
}));
function getScreens_121371(a0) { // fn#121371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1373, offset: 0x02546120, size: 238 bytes, params: 2, frame: 18
const env0_0 = a0;
const object = {};
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, headerRight: headerRight_121374, render: render_121376};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true, impressionName: DISCOVERABILITY,
headerTitle: function() {
return null;
}, render: render_121378};
return object;
function getScreens_121371HeaderRight(a0) { // fn#121374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1586, owner: getScreens_121371.headerRight, offset: 0x0254620e, size: 74 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component insideNavigator {...a0} {...{['onPress']: headerRightOnPress_121375}} />)(SkipHeaderButton);
function headerRightOnPress_121375() { // fn#121375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1633, owner: getScreens_121371.headerRight.onPress, offset: 0x010095e8, size: 18 bytes, params: 1, frame: 11
return env1_0(true);
}
}
function getScreens_121371Render() { // fn#121376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1652, owner: getScreens_121371.render, offset: 0x02546258, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene_121363 onComplete={env0_0} />;
}
function getScreens_121371Render_121378() { // fn#121378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1858, owner: getScreens_121371.render, offset: 0x0254627b, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene_121366 onComplete={env0_0} />;
}
}
}
}
}
function _fun121368(a0) { // fn#121368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1057, offset: 0x02545ff2, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(require(12021) /* metro dependency 12021: NUFActionCreators */).startContactSyncForDiscoverability(a0);
onComplete();
}
function _fun121370() { // fn#121370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1369, offset: 0x025460f4, size: 44 bytes, params: 1, frame: 12
return getScreens_121371(onComplete ?? (function() {
}));
}
function getScreens_121371(a0) { // fn#121371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1373, offset: 0x02546120, size: 238 bytes, params: 2, frame: 18
const env0_0 = a0;
const object2 = {};
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, headerRight: headerRight_121374, render: render_121376};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerTitle: function() {
return null;
}, render: render_121378};
return object2;
}
function getScreens_121371HeaderRight(a0) { // fn#121374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1586, owner: getScreens_121371.headerRight, offset: 0x0254620e, size: 74 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component insideNavigator {...a0} {...{['onPress']: headerRightOnPress_121375}} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
}
function getScreens_121371Render() { // fn#121376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1652, owner: getScreens_121371.render, offset: 0x02546258, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene_121363 onComplete={env0_0} />;
}
function getScreens_121371Render_121378() { // fn#121378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1858, owner: getScreens_121371.render, offset: 0x0254627b, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene_121366 onComplete={env0_0} />;
function _fun121379() { // fn#121379, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun121362, 15796, [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021,
12014, 480, 12013, 5280, 1244,
2]) /* metro module 15796, dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021, 12014, 480, 12013, 5280, 1244, 2] */;
@@ -1,39 +1,46 @@
/* Metro module 12013; source: modules/nuf/native/components/SkipHeaderButton.tsx; dependencies: [31, 33, 4501, 697, 1244, 9603, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as HeaderSharedModule from '../../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
function _fun92291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12199:6, offset: 0x02082f1a, size: 211 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{button: {color: INTERACTIVE_TEXT_DEFAULT},
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_3 = Reflect.apply(createStyles, CreateStylesModule, [{button: {color: INTERACTIVE_TEXT_DEFAULT},
insideNavigatorButton: {paddingRight: 16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/SkipHeaderButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/SkipHeaderButton.tsx');
exports.default = SkipHeaderButton;
}
function SkipHeaderButton(a0) { // fn#92292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12199:333, offset: 0x02082fed, size: 194 bytes, params: 2, frame: 19
var r5;
var intl;
const value2 = undefined;
const styles = useStyles();
const label = a0.label;
if (label != null) {
r5 = label;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']);
function SkipHeaderButton(a0) { // fn#92292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12199:333, offset: 0x02082fed, size: 194 bytes, params: 2, frame: 19
var r5;
var intl;
const value2 = undefined;
const styles = useStyles();
const label = a0.label;
if (label != null) {
r5 = label;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']);
}
const HeaderTextButton = (HeaderSharedModule).HeaderTextButton;
return (
<HeaderTextButton
{...a0}
{...{['labelStyle']: [styles.button, a0.insideNavigator ? styles.insideNavigatorButton : value2]}}
{...{['label']: r5}}
{...{['accessibilityLabel']: r5}}
/>
);
}
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
return (
<HeaderTextButton
{...a0}
{...{['labelStyle']: [styles.button, a0.insideNavigator ? styles.insideNavigatorButton : value2]}}
{...{['label']: r5}}
{...{['accessibilityLabel']: r5}}
/>
);
}
global.__d(_fun92291, 12013, [31, 33, 4501, 697, 1244, 9603,
2]) /* metro module 12013, dependencies: [31, 33, 4501, 697, 1244, 9603, 2] */;
@@ -1,181 +1,194 @@
/* Metro module 14887; source: modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx; dependencies: [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889, 11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildMemberStore from '../../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import SelectedGuildStore from '../../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UserGuildSettingsStore from '../../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import PushNotificationPermissionStore from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import NotificationNudgeBottomSheet from './NotificationNudgeBottomSheet.tsx'; /* Metro dependency 14888 */
import GuildPushNotificationNudgeExperiment from '../../GuildPushNotificationNudgeExperiment.tsx'; /* Metro dependency 14889 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseSelectedDismissibleContentModule from '../../../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as PushNotificationPermissionStoreModule from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun112625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:6, offset: 0x023d4fdf, size: 369 bytes, params: 8, frame: 19
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 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const pushNotificationPermissionStore = importDefault(11872) /* metro dependency 11872: PushNotificationPermissionStore */;
const env0_10 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
let value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
let value = NotificationPermissionConstantsModule;
const env0_11 = value.EventActionLocation;
const env0_12 = value.NotificationNudgeSurface;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.UserNotificationSettings;
const env0_14 = value.ZERO_STRING_GUILD_ID;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
object = {cooldownDurationMs: 5184000000};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx');
exports.default = GuildOpenNotificationNudge;
exports.GUILD_OPEN_NOTIFICATION_NUDGE_KEY = 'guild-open-notification-nudge-key';
exports.useGuildOpenNudge = useGuildOpenNudge;
}
function GuildOpenNotificationNudge({guildId, markAsDismissed, onHide}) { // fn#112626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:524, offset: 0x023d5150, size: 262 bytes, params: 2, frame: 24
const value2 = (FluxModule).useStateFromStores([GuildStore], _fun112627);
object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tyWHMY,
{guildName: value2});
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ehJH+P']);
const GUILD_OPEN = EventActionLocation.GUILD_OPEN;
object.actionLocation = GUILD_OPEN;
const GUILD_OPEN_BOTTOM_SHEET = NotificationNudgeSurface.GUILD_OPEN_BOTTOM_SHEET;
object.surface = GUILD_OPEN_BOTTOM_SHEET;
object.markAsDismissed = markAsDismissed;
object.onHide = onHide;
return <NotificationNudgeBottomSheet {...object} />;
function _fun112627() { // fn#112627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:639, offset: 0x023d5256, size: 57 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildStore.getGuild(guildId)?.name ?? '';
}
function GuildOpenNotificationNudge({guildId, markAsDismissed, onHide}) { // fn#112626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:524, offset: 0x023d5150, size: 262 bytes, params: 2, frame: 24
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112627);
const NotificationNudgeBottomSheet = importDefault(14888) /* metro dependency 14888: NotificationNudgeBottomSheet */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tyWHMY,
{guildName: value2});
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ehJH+P']);
const GUILD_OPEN = EventActionLocation.GUILD_OPEN;
object2.actionLocation = GUILD_OPEN;
const GUILD_OPEN_BOTTOM_SHEET = NotificationNudgeSurface.GUILD_OPEN_BOTTOM_SHEET;
object2.surface = GUILD_OPEN_BOTTOM_SHEET;
object2.markAsDismissed = markAsDismissed;
object2.onHide = onHide;
return <NotificationNudgeBottomSheet {...object2} />;
}
function useGuildOpenNudge() { // fn#112628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1005, offset: 0x023d528f, size: 619 bytes, params: 1, frame: 30
var r6;
var moduleValue7;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], _fun112629);
const defaultImport = importDefault(14889) /* metro dependency 14889: GuildPushNotificationNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const showNewSheet = Reflect.apply(useConfig, defaultImport, [{location: 'useGuildOpenNudge'}]).showNewSheet;
const value3 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112630);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112631);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, GuildMemberStore],
_fun112632);
const binding = env0_4;
const env0_2 = binding.useRef(value2);
let [property, env0_3] = env0_3Binding(binding.useState(value6), 2);
binding.useEffect(_fun112633, [value2, value6]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PushNotificationPermissionStore],
_fun112634);
const value10 = null;
const value11 = value10 != value2;
if (value11) {
moduleValue7 = require(3987) /* metro dependency 3987: RouteUtils */;
r6 = !moduleValue7.isPseudoGuildId(value2);
} else {
r6 = value11;
}
r6 = r6 && showNewSheet && value3;
r6 = r6 && !property && !value4;
r6 = r6 && value5 !== UserNotificationSettings.NO_MESSAGES && value9;
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringGuildDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringGuildDismissibleContent;
const NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD = r6 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD : value10;
const value17 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringGuildDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD,
value10 != value2 ? value2 : ZERO_STRING_GUILD_ID, env0_16]), 2);
property = value17[0];
var env0_4 = property;
env0_4.useEffect(_fun112635, [value2, value17[1], property]);
}
function _fun112627() { // fn#112627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:639, offset: 0x023d5256, size: 57 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildStore.getGuild(guildId)?.name ?? '';
}
function useGuildOpenNudge() { // fn#112628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1005, offset: 0x023d528f, size: 619 bytes, params: 1, frame: 30
var r6;
var moduleValue7;
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[SelectedGuildStore], _fun112629]);
const defaultImport = GuildPushNotificationNudgeExperiment;
const useConfig = defaultImport.useConfig;
const showNewSheet = Reflect.apply(useConfig, defaultImport, [{location: 'useGuildOpenNudge'}]).showNewSheet;
const value3 = (NotificationPermissionUtilModule).useCanSeePushNotificationNudge();
useStateFromStores = FluxModule.useStateFromStores;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const value4 = Reflect.apply(useStateFromStores, FluxModule, [[userGuildSettingsStoreBinding], _fun112630]);
const value5 = FluxModule.useStateFromStores([userGuildSettingsStoreBinding], _fun112631);
const value6 = FluxModule.useStateFromStores([GuildStore, GuildMemberStore], _fun112632);
const binding = property2;
const env0_2 = binding.useRef(value2);
let [property, env0_3] = env0_3Binding(binding.useState(value6), 2);
binding.useEffect(_fun112633, [value2, value6]);
const value9 = FluxModule.useStateFromStores([PushNotificationPermissionStore], _fun112634);
const value10 = null;
const value11 = value10 != value2;
if (value11) {
moduleValue7 = require(3987) /* metro dependency 3987: RouteUtils */;
r6 = !moduleValue7.isPseudoGuildId(value2);
} else {
r6 = value11;
}
r6 = r6 && showNewSheet && value3;
r6 = r6 && !property && !value4;
r6 = r6 && value5 !== UserNotificationSettings.NO_MESSAGES && value9;
const useSelectedTimeRecurringGuildDismissibleContent = UseSelectedDismissibleContentModule.useSelectedTimeRecurringGuildDismissibleContent;
const NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD = r6 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD : value10;
const value17 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringGuildDismissibleContent,
UseSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD,
value10 != value2 ? value2 : ZERO_STRING_GUILD_ID, env0_16]), 2);
property = value17[0];
var property2 = property;
property2.useEffect(_fun112635, [value2, value17[1], property]);
function _fun112629() { // fn#112629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1073, offset: 0x023d54fa, size: 31 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = SelectedGuildStore.getGuildId();
const value2 = null;
return value2 != value ? value : value2;
}
function _fun112629() { // fn#112629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1073, offset: 0x023d54fa, size: 31 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = SelectedGuildStore.getGuildId();
const value2 = null;
return value2 != value ? value : value2;
}
function _fun112630() { // fn#112630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1271, offset: 0x023d5519, size: 40 bytes, params: 1, frame: 12
return env0_0 == null || UserGuildSettingsStore.isMuted(env0_0);
}
function _fun112630() { // fn#112630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1271, offset: 0x023d5519, size: 40 bytes, params: 1, frame: 12
return env0_0 == null || UserGuildSettingsStore.isMuted(env0_0);
}
function _fun112631() { // fn#112631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1334, offset: 0x023d5541, size: 52 bytes, params: 1, frame: 12
return env0_0 != null ? UserGuildSettingsStore.getMessageNotifications(env0_0) : UserNotificationSettings.NO_MESSAGES;
}
function _fun112631() { // fn#112631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1334, offset: 0x023d5541, size: 52 bytes, params: 1, frame: 12
return env0_0 != null ? UserGuildSettingsStore.getMessageNotifications(env0_0) : UserNotificationSettings.NO_MESSAGES;
}
function _fun112632() { // fn#112632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1428, offset: 0x023d5575, size: 89 bytes, params: 1, frame: 16
var r0;
var value3;
var moduleValue;
var isBlockedByOnboarding;
var guildStoreBinding;
var getGuild;
var binding;
var guildMemberStoreBinding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
isBlockedByOnboarding = moduleValue.isBlockedByOnboarding;
guildStoreBinding = GuildStore;
getGuild = guildStoreBinding.getGuild;
binding = env0_0;
value = Reflect.apply(getGuild, guildStoreBinding, [binding]);
guildMemberStoreBinding = GuildMemberStore;
value = Reflect.apply(isBlockedByOnboarding, moduleValue, [value,
guildMemberStoreBinding.getSelfMember(binding)]);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun112632() { // fn#112632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1428, offset: 0x023d5575, size: 89 bytes, params: 1, frame: 16
var r0;
var value3;
var moduleValue;
var isBlockedByOnboarding;
var getGuild;
var binding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
isBlockedByOnboarding = moduleValue.isBlockedByOnboarding;
getGuild = GuildStore.getGuild;
binding = env0_0;
value = Reflect.apply(getGuild, GuildStore, [binding]);
value = Reflect.apply(isBlockedByOnboarding, moduleValue, [value, GuildMemberStore.getSelfMember(binding)]);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun112633() { // fn#112633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1574, offset: 0x023d55ce, size: 67 bytes, params: 1, frame: 12
const binding = env0_2;
const current = binding.current;
const binding2 = env0_0;
binding.current = binding2;
if (current !== binding2) {
env0_3(env0_1);
} else if (env0_1) {
env0_3(true);
}
}
function _fun112633() { // fn#112633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1574, offset: 0x023d55ce, size: 67 bytes, params: 1, frame: 12
const binding = env0_2;
const current = binding.current;
const binding2 = env0_0;
binding.current = binding2;
if (current !== binding2) {
env0_3(env0_1);
} else if (env0_1) {
env0_3(true);
}
}
function _fun112634() { // fn#112634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1675, offset: 0x023d5611, size: 118 bytes, params: 1, frame: 13
var r0;
var Date;
var date;
let value = environment.__proto__;
const pushNotificationPermissionStoreBinding = PushNotificationPermissionStore;
const getState = pushNotificationPermissionStoreBinding.getState;
const promptLastSeen = Reflect.apply(getState, pushNotificationPermissionStoreBinding, []).promptLastSeen;
const GUILD_OPEN_BOTTOM_SHEET = PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET;
const property = promptLastSeen[GUILD_OPEN_BOTTOM_SHEET];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now();
Date = global.Date;
date = new Date(property);
value -= date.getTime();
value = value >= 604800000;
r0 = value;
}
return r0;
}
function _fun112634() { // fn#112634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1675, offset: 0x023d5611, size: 118 bytes, params: 1, frame: 13
var r0;
var Date;
var date;
let value = environment.__proto__;
const getState = PushNotificationPermissionStore.getState;
const promptLastSeen = Reflect.apply(getState, PushNotificationPermissionStore, []).promptLastSeen;
const GUILD_OPEN_BOTTOM_SHEET = PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET;
const property = promptLastSeen[GUILD_OPEN_BOTTOM_SHEET];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now();
Date = global.Date;
date = new Date(property);
value -= date.getTime();
value = value >= 604800000;
r0 = value;
}
return r0;
}
function _fun112635() { // fn#112635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:2062, offset: 0x023d5687, size: 164 bytes, params: 1, frame: 18
var value4;
var moduleValue;
var defaultImport;
if (env0_0 != null && ReactModule != null) {
value4 = environment.__proto__;
moduleValue = require(dependencyMap[19]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[20]);
defaultImport.openLazy(require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths),
'guild-open-notification-nudge-key', {guildId: env0_0, markAsDismissed: env0_5});
}
}
function _fun112635() { // fn#112635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:2062, offset: 0x023d5687, size: 164 bytes, params: 1, frame: 18
var value4;
var moduleValue;
var defaultImport;
if (env0_0 != null && env0_4 != null) {
value4 = environment.__proto__;
moduleValue = require(dependencyMap[19]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[20]);
defaultImport.openLazy(require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths),
'guild-open-notification-nudge-key', {guildId: env0_0, markAsDismissed: env0_5});
}
}
global.__d(_fun112625, 14887, [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889,
11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962,
2]) /* metro module 14887, dependencies: [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889, 11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962, 2] */;
@@ -1,107 +1,154 @@
/* Metro module 14888; source: modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx; dependencies: [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261, 4578, 1244, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DismissibleContentConstantsModule from '../../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as ButtonGroupNativeModule from '../../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun112636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:6, offset: 0x023d572b, size: 433 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
let value = NotificationPermissionConstantsModule;
const env0_5 = value.EventActionType;
const env0_6 = value.NotificationNudgeAnalyticsAction;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginHorizontal: PX_24, alignItems: 'center'};
object.container = {marginHorizontal: PX_24, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.illustration = {marginVertical: PX_24};
object2.title = {textAlign: 'center'};
object.illustration = {marginVertical: PX_24};
object.title = {textAlign: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.body = {textAlign: 'center', marginTop: PX_8};
object.body = {textAlign: 'center', marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonsContainer = {marginTop: PX_8, width: '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx');
object.buttonsContainer = {marginTop: PX_8, width: '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx');
exports.default = NotificationNudgeBottomSheet;
}
function NotificationNudgeBottomSheet({title, body, actionLocation, surface, markAsDismissed, onHide}) { // fn#112637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:683, offset: 0x023d58dc, size: 685 bytes, params: 2, frame: 31
const env0_3 = onHide;
const styles = useStyles();
const binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: surface});
}, [surface]);
const value2 = binding.useCallback(_fun112639, [onHide]);
const value3 = binding.useCallback(_fun112640, [surface, actionLocation, value2, markAsDismissed]);
const value4 = binding.useCallback(_fun112641, [surface, value2, markAsDismissed]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BellSpotIllustration = (require(5473) /* metro dependency 5473: native */).BellSpotIllustration;
const items2 = [<View style={styles.illustration}><BellSpotIllustration scale={0.8} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.title} variant="heading-xl/bold" accessibilityRole="header">{title}</Text>;
items2[2] = <Text style={styles.body} variant="text-sm/medium" color="text-default">{body}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const button = <Button text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['+7MDbQ']])} onPress={value3} />;
string = intl.string;
const L5eIZ2 = (require(1244) /* metro dependency 1244: indexNative */).t.L5eIZ2;
items2[3] = <View style={styles.buttonsContainer}><ButtonGroup>{button}<Button text={Reflect.apply(string, intl,
[L5eIZ2])} onPress={value4} variant="secondary" /></ButtonGroup></View>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
function NotificationNudgeBottomSheet({title, body, actionLocation, surface, markAsDismissed, onHide}) { // fn#112637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:683, offset: 0x023d58dc, size: 685 bytes, params: 2, frame: 31
const onHide2 = onHide;
const styles = useStyles();
const binding = onHide2;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: surface});
}, [surface]);
const value2 = binding.useCallback(_fun112639, [onHide]);
const value3 = binding.useCallback(_fun112640, [surface, actionLocation, value2, markAsDismissed]);
const value4 = binding.useCallback(_fun112641, [surface, value2, markAsDismissed]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BellSpotIllustration = (NativeModule).BellSpotIllustration;
const items2 = [
<View style={styles.illustration}>
<BellSpotIllustration scale={0.8} />
</View>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
style={styles.title}
variant="heading-xl/bold"
accessibilityRole="header"
>
{title}
</Text>
);
items2[2] = (
<Text
style={styles.body}
variant="text-sm/medium"
color="text-default"
>
{body}
</Text>
);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const button = (
<Button
text={Reflect.apply(string, intl, [(IndexNativeModule).t['+7MDbQ']])}
onPress={value3}
/>
);
string = intl.string;
const L5eIZ2 = (IndexNativeModule).t.L5eIZ2;
items2[3] = (
<View style={styles.buttonsContainer}>
<ButtonGroup>
{button}
<Button
text={Reflect.apply(string, intl, [L5eIZ2])}
onPress={value4}
variant="secondary"
/>
</ButtonGroup>
</View>
</BottomSheet>
);
}
);
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
function _fun112639() { // fn#112639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:929, offset: 0x023d5bd5, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
if (onHide != null) {
onHide();
}
}
function _fun112640() { // fn#112640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:997, offset: 0x023d5c0f, size: 142 bytes, params: 1, frame: 19
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
const requestPushNotificationPermission = NotificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, NotificationPermissionUtilModule, [ALLOW_TO_REQUEST,
actionLocation, ReactNativeModule.View]);
}
function _fun112641() { // fn#112641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:1193, offset: 0x023d5c9d, size: 103 bytes, params: 1, frame: 17
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const DISMISS = NotificationNudgeAnalyticsAction.DISMISS;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: DISMISS, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
(0, ReactNativeModule.View)();
}
function _fun112639() { // fn#112639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:929, offset: 0x023d5bd5, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (onHide != null) {
onHide();
}
}
function _fun112640() { // fn#112640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:997, offset: 0x023d5c0f, size: 142 bytes, params: 1, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST,
actionLocation, env0_4]);
}
function _fun112641() { // fn#112641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:1193, offset: 0x023d5c9d, size: 103 bytes, params: 1, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const DISMISS = NotificationNudgeAnalyticsAction.DISMISS;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: DISMISS, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
env0_4();
}
global.__d(_fun112636, 14888, [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261,
4578, 1244,
2]) /* metro module 14888, dependencies: [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261, 4578, 1244, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11873; source: modules/nuf/native/components/notification/NotificationPermissionConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun91053(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12059:6, offset: 0x02051aee, size: 482 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationPermissionConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/NotificationPermissionConstants.tsx');
exports.EventActionType = {SKIP_STEP: 'skip_step', ALLOW_TO_REQUEST: 'allow_to_request', REQUEST: 'request',
TO_SETTINGS: 'to_settings', REQUEST_PROVISIONAL: 'request_provisional', DISMISS: 'dismiss'};
exports.EventActionLocation = {ALERT: 'alert', AUTO_PROMPT: 'auto_prompt', NAV: 'nav', FOOTER: 'footer', CTA: 'cta',
@@ -20,3 +22,4 @@ function _fun91053(global, require, importDefault, importAll, module, exports, d
exports.NotificationNudgeAnalyticsAction = {IMPRESSION: 'impression', DISMISS: 'dismiss', ACCEPT: 'accept'};
}
global.__d(_fun91053, 11873, [2]) /* metro module 11873, dependencies: [2] */;
@@ -1,84 +1,126 @@
/* Metro module 15802; source: modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx; dependencies: [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261, 4578, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import Module15803 from '../../../../../by-id/module-15803.js'; /* Metro dependency 15803 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as ButtonGroupNativeModule from '../../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun121447(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:6, offset: 0x025483d6, size: 409 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = (require(11873) /* metro dependency 11873: NotificationPermissionConstants */).EventActionType;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginHorizontal: PX_24, alignItems: 'center'};
object.container = {marginHorizontal: PX_24, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.image = {marginVertical: PX_24, height: 120};
object2.title = {textAlign: 'center'};
object.image = {marginVertical: PX_24, height: 120};
object.title = {textAlign: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.subtitle = {textAlign: 'center', marginTop: PX_8};
object.subtitle = {textAlign: 'center', marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttons = {marginTop: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx');
object.buttons = {marginTop: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx');
exports.default = NotificationReactivationActionSheet;
function NotificationReactivationActionSheet({location}) { // fn#121448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:614, offset: 0x0254856f, size: 634 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, location, _fun121450);
}, [location]);
const value3 = ReactModule.useCallback(_fun121451, [location]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const items2 = [
<Image
style={styles.image}
source={Module15803}
resizeMode="contain"
/>,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
style={styles.title}
variant="heading-xl/bold"
accessibilityRole="header"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)}
</Text>
);
items2[2] = (
<Text
style={styles.subtitle}
variant="text-sm/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['rW5gw/'])}
</Text>
);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
items2[3] = (
<ButtonGroup style={styles.buttons}>
<Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={value2} />
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/L3kom'])}
onPress={value3}
variant="secondary"
/>
</ButtonGroup>
);
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
function _fun121449() { // fn#121449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:700, offset: 0x025487e9, size: 66 bytes, params: 1, frame: 16
const requestPushNotificationPermission = NotificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, NotificationPermissionUtilModule, [ALLOW_TO_REQUEST, location,
_fun121450]);
function _fun121450() { // fn#121450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:769, offset: 0x0254882b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun121451() { // fn#121451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:827, offset: 0x02548850, size: 104 bytes, params: 1, frame: 18
const value = environment.__proto__;
const SKIP_STEP = EventActionType.SKIP_STEP;
const locationBinding = location;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: locationBinding, permission_granted: undefined}]);
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function NotificationReactivationActionSheet({location}) { // fn#121448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:614, offset: 0x0254856f, size: 634 bytes, params: 2, frame: 30
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, location, _fun121450);
}, [location]);
const value3 = binding.useCallback(_fun121451, [location]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const items2 = [<Image style={styles.image} source={importDefault(15803) /* metro dependency 15803 */} resizeMode="contain" />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} variant="heading-xl/bold" accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)}</Text>;
items2[2] = <Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['rW5gw/'])}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <ButtonGroup style={styles.buttons}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={value2} /><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/L3kom'])} onPress={value3} variant="secondary" /></ButtonGroup>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
function _fun121449() { // fn#121449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:700, offset: 0x025487e9, size: 66 bytes, params: 1, frame: 16
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST, location,
_fun121450]);
}
function _fun121451() { // fn#121451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:827, offset: 0x02548850, size: 104 bytes, params: 1, frame: 18
const value = environment.__proto__;
const SKIP_STEP = EventActionType.SKIP_STEP;
const locationBinding = location;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: locationBinding, permission_granted: undefined}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun121450() { // fn#121450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:769, offset: 0x0254882b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun121447, 15802, [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261,
4578,
2]) /* metro module 15802, dependencies: [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261, 4578, 2] */;
@@ -1,84 +1,89 @@
/* Metro module 14890; source: modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx; dependencies: [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365, 11875, 4080, 14890, 1962, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SelectedChannelStore from '../../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import VoiceStateStore from '../../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import NotificationNudgeBottomSheet from './NotificationNudgeBottomSheet.tsx'; /* Metro dependency 14888 */
import PostCallDisconnectNudgeExperiment from '../../PostCallDisconnectNudgeExperiment.tsx'; /* Metro dependency 14891 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseSelectedDismissibleContentModule from '../../../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as PushNotificationPermissionStoreModule from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun112643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:6, offset: 0x023d5db5, size: 288 bytes, params: 8, frame: 19
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 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_7 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
const notificationPermissionConstantsModule = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_8 = notificationPermissionConstantsModule.EventActionLocation;
const env0_9 = notificationPermissionConstantsModule.NotificationNudgeSurface;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
object = {cooldownDurationMs: 604800000};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx');
exports.default = PostCallDisconnectNudge;
exports.POST_CALL_DISCONNECT_NUDGE_KEY = 'post-call-disconnect-nudge-key';
exports.usePostCallDisconnectNudge = usePostCallDisconnectNudge;
}
function PostCallDisconnectNudge({markAsDismissed, onHide}) { // fn#112644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:424, offset: 0x023d5ed5, size: 201 bytes, params: 2, frame: 22
const NotificationNudgeBottomSheet = importDefault(14888) /* metro dependency 14888: NotificationNudgeBottomSheet */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJbYq1);
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vegtFT);
const CALL_DISCONNECT = EventActionLocation.CALL_DISCONNECT;
object2.actionLocation = CALL_DISCONNECT;
const CALL_DISCONNECT_BOTTOM_SHEET = NotificationNudgeSurface.CALL_DISCONNECT_BOTTOM_SHEET;
object2.surface = CALL_DISCONNECT_BOTTOM_SHEET;
object2.markAsDismissed = markAsDismissed;
object2.onHide = onHide;
return <NotificationNudgeBottomSheet {...object2} />;
}
function usePostCallDisconnectNudge() { // fn#112645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:758, offset: 0x023d5f9e, size: 395 bytes, params: 1, frame: 25
const defaultImport = importDefault(14891) /* metro dependency 14891: PostCallDisconnectNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'usePostCallDisconnectNudge'}]).enabled;
const value2 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const currentClientVoiceChannelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return VoiceStateStore.getCurrentClientVoiceChannelId(null);
});
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const binding = env0_4;
const env0_2 = binding.useRef(currentClientVoiceChannelId);
let [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useEffect(_fun112648, [currentClientVoiceChannelId, channelId]);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const NOTIFICATION_NUDGE_POST_CALL_DISCONNECT = property && enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_CALL_DISCONNECT : null;
const value7 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_POST_CALL_DISCONNECT, env0_11]), 2);
property = value7[0];
var env0_4 = property;
env0_4.useEffect(_fun112649, [property, value7[1]]);
}
function _fun112648() { // fn#112648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1118, offset: 0x023d6152, size: 63 bytes, params: 1, frame: 14
const binding = env0_2;
const current = binding.current;
binding.current = currentClientVoiceChannelId;
env0_3(current != null && currentClientVoiceChannelId == null && current === channelId);
}
function _fun112649() { // fn#112649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1365, offset: 0x023d6191, size: 142 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var defaultImport;
if (env0_4 != null) {
value2 = environment.__proto__;
moduleValue = require(dependencyMap[14]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.CALL_DISCONNECT_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[15]);
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths),
'post-call-disconnect-nudge-key', {markAsDismissed: env0_5});
function PostCallDisconnectNudge({markAsDismissed, onHide}) { // fn#112644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:424, offset: 0x023d5ed5, size: 201 bytes, params: 2, frame: 22
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJbYq1);
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vegtFT);
const CALL_DISCONNECT = EventActionLocation.CALL_DISCONNECT;
object.actionLocation = CALL_DISCONNECT;
const CALL_DISCONNECT_BOTTOM_SHEET = NotificationNudgeSurface.CALL_DISCONNECT_BOTTOM_SHEET;
object.surface = CALL_DISCONNECT_BOTTOM_SHEET;
object.markAsDismissed = markAsDismissed;
object.onHide = onHide;
return <NotificationNudgeBottomSheet {...object} />;
}
function usePostCallDisconnectNudge() { // fn#112645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:758, offset: 0x023d5f9e, size: 395 bytes, params: 1, frame: 25
const defaultImport = PostCallDisconnectNudgeExperiment;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'usePostCallDisconnectNudge'}]).enabled;
const value2 = (NotificationPermissionUtilModule).useCanSeePushNotificationNudge();
const currentClientVoiceChannelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return VoiceStateStore.getCurrentClientVoiceChannelId(null);
});
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const binding = property2;
const env0_2 = binding.useRef(currentClientVoiceChannelId);
let [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useEffect(_fun112648, [currentClientVoiceChannelId, channelId]);
const useSelectedTimeRecurringDismissibleContent = UseSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const NOTIFICATION_NUDGE_POST_CALL_DISCONNECT = property && enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_CALL_DISCONNECT : null;
const value7 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringDismissibleContent,
UseSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_POST_CALL_DISCONNECT, env0_11]), 2);
property = value7[0];
var property2 = property;
property2.useEffect(_fun112649, [property, value7[1]]);
function _fun112648() { // fn#112648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1118, offset: 0x023d6152, size: 63 bytes, params: 1, frame: 14
const binding = env0_2;
const current = binding.current;
binding.current = currentClientVoiceChannelId;
env0_3(current != null && currentClientVoiceChannelId == null && current === channelId);
}
function _fun112649() { // fn#112649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1365, offset: 0x023d6191, size: 142 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var defaultImport;
if (ReactModule != null) {
value2 = environment.__proto__;
moduleValue = require(dependencyMap[14]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.CALL_DISCONNECT_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[15]);
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths),
'post-call-disconnect-nudge-key', {markAsDismissed: env0_5});
}
}
}
}
global.__d(_fun112643, 14890, [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365,
11875, 4080, 14890, 1962,
2]) /* metro module 14890, dependencies: [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365, 11875, 4080, 14890, 1962, 2] */;
@@ -1,93 +1,107 @@
/* Metro module 14357; source: modules/nuf/native/components/notification/RedesignNotificationModal.tsx; dependencies: [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import NewUserPermissionsOnboardingAndroid from '../NewUserPermissionsOnboarding.android.tsx'; /* Metro dependency 12005 */
import Module14358 from '../../../../../by-id/module-14358.js'; /* Metro dependency 14358 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as PushNotificationPermissionStoreModule from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
import * as PushNotificationActionCreatorsModule from '../../../../../actions/native/PushNotificationActionCreators.tsx'; /* Metro dependency 11875 */
function _fun108657(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:6, offset: 0x02328763, size: 377 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = RedesignNotificationModal;
const RedesignNotificationModal2 = RedesignNotificationModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionStateType;
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_7 = value.EventActionLocation;
const env0_8 = value.EventActionType;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object.marginTop = -PX_48;
const env0_11 = Reflect.apply(createStyles, value, [{container: object,
const object2 = {flex: 1};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_48 = (Native).space.PX_48;
object2.marginTop = -PX_48;
const env0_11 = Reflect.apply(createStyles, value, [{container: object2,
notificationHeaderImage: {'position': 'absolute', 'alignSelf': 'center', 'zIndex': 2, 'top': -140,
'height': 156, 'width': 150}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/RedesignNotificationModal.tsx');
exports.default = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/RedesignNotificationModal.tsx');
exports.default = RedesignNotificationModal2;
exports.RedesignNotificationScreen = RedesignNotificationScreen;
}
function RedesignNotificationModal({onComplete}) { // fn#108658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:489, offset: 0x023288dc, size: 323 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
var ALERT = EventActionLocation.ALERT;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, ALERT, _fun108660);
}, [onComplete]);
const value3 = ReactModule.useCallback(_fun108661, [onComplete]);
const defaultImportProps = {onAllow: value2, onDontAllow: value3,
header: <Image resizeMode="contain" style={styles.notificationHeaderImage} source={Module14358} />};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
defaultImportProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3nx0b5']]);
string = intl.string;
const Gf7U1T = (require(1244) /* metro dependency 1244: indexNative */).t.Gf7U1T;
defaultImportProps.subtitle = Reflect.apply(string, intl, [Gf7U1T]);
return (
<View style={styles.container}>
<NewUserPermissionsOnboardingAndroid {...defaultImportProps} />
</View>
);
function _fun108659() { // fn#108659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:567, offset: 0x02328a1f, size: 69 bytes, params: 1, frame: 16
const requestPushNotificationPermission = NotificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(requestPushNotificationPermission, NotificationPermissionUtilModule, [ALLOW_TO_REQUEST, ALERT,
function() {
if (onComplete != null) {
onComplete();
}
}]);
function _fun108660() { // fn#108660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:642, offset: 0x01eef8c0, size: 27 bytes, params: 1, frame: 10
if (onComplete != null) {
onComplete();
}
}
function RedesignNotificationModal({onComplete}) { // fn#108658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:489, offset: 0x023288dc, size: 323 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
var ALERT = EventActionLocation.ALERT;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, ALERT, _fun108660);
}, [onComplete]);
const value3 = env0_3.useCallback(_fun108661, [onComplete]);
const NewUserPermissionsOnboardingAndroid = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
const defaultImportProps = {onAllow: value2, onDontAllow: value3,
header: <Image resizeMode="contain" style={styles.notificationHeaderImage} source={importDefault(14358) /* metro dependency 14358 */} />};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
defaultImportProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3nx0b5']]);
string = intl.string;
const Gf7U1T = (require(1244) /* metro dependency 1244: indexNative */).t.Gf7U1T;
defaultImportProps.subtitle = Reflect.apply(string, intl, [Gf7U1T]);
return (
<View style={styles.container}>
<NewUserPermissionsOnboardingAndroid {...defaultImportProps} />
</View>
);
}
function RedesignNotificationScreen(a0) { // fn#108662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:1347, offset: 0x02328b07, size: 49 bytes, params: 2, frame: 13
return <RedesignNotificationModal onComplete={a0.route.params.onComplete} />;
}
function _fun108659() { // fn#108659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:567, offset: 0x02328a1f, size: 69 bytes, params: 1, frame: 16
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST, ALERT,
function() {
if (onComplete != null) {
onComplete();
}
}]);
}
function _fun108661() { // fn#108661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:687, offset: 0x02328a64, size: 163 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
const SKIP_STEP = EventActionType.SKIP_STEP;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: ALERT}]);
const pushNotificationActionCreatorsModule = require(11875) /* metro dependency 11875: PushNotificationActionCreators */;
const setPushPermissionState = pushNotificationActionCreatorsModule.setPushPermissionState;
const PROMPT_SKIPPED = PermissionStateType.PROMPT_SKIPPED;
Reflect.apply(setPushPermissionState, pushNotificationActionCreatorsModule, [PROMPT_SKIPPED]);
(require(11874) /* metro dependency 11874: NotificationPermissionUtil */).enableProvisionalPushNotification();
if (onComplete != null) {
onComplete(true);
function _fun108661() { // fn#108661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:687, offset: 0x02328a64, size: 163 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
const SKIP_STEP = EventActionType.SKIP_STEP;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: ALERT}]);
const setPushPermissionState = PushNotificationActionCreatorsModule.setPushPermissionState;
const PROMPT_SKIPPED = PermissionStateType.PROMPT_SKIPPED;
Reflect.apply(setPushPermissionState, PushNotificationActionCreatorsModule, [PROMPT_SKIPPED]);
(NotificationPermissionUtilModule).enableProvisionalPushNotification();
if (onComplete != null) {
onComplete(true);
}
}
}
function RedesignNotificationScreen(a0) { // fn#108662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:1347, offset: 0x02328b07, size: 49 bytes, params: 2, frame: 13
return <RedesignNotificationModal onComplete={a0.route.params.onComplete} />;
}
}
global.__d(_fun108657, 14357, [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244,
2]) /* metro module 14357, dependencies: [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244, 2] */;