Files
2026-07-28 01:06:53 +03:00

198 lines
12 KiB
TypeScript

/* 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});
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
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}}]);
(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 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);
}
}
}
}
}
}
}
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] */;