146 lines
8.9 KiB
TypeScript
146 lines
8.9 KiB
TypeScript
/* Metro module 15790; source: modules/nuf/native/RedesignNewUserManager.tsx; dependencies: [7, 6, 15, 17, 18, 11994, 4256, 9151, 15791, 5080, 15793, 1962, 15792, 477, 4007, 4860, 2] */
|
|
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import NewUserStore from '../NewUserStore.tsx'; /* Metro dependency 4256 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ContactSyncModalStoreModule from '../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
|
|
|
|
function _fun121296(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:6, offset: 0x02543e83, size: 278 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ContactSyncModalStoreModule;
|
|
const env0_8 = value.initialize;
|
|
const env0_9 = value.ContactSyncModes;
|
|
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun121300(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/RedesignNewUserManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_121297() { // fn#121297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:204, offset: 0x02543f99, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_121297_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun121300(a0) { // fn#121300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:407, offset: 0x02543ffb, size: 42 bytes, params: 2, frame: 14
|
|
const RedesignNewUserManager2 = RedesignNewUserManager;
|
|
Inherits(RedesignNewUserManager2, a0);
|
|
return CreateClass(RedesignNewUserManager2);
|
|
function RedesignNewUserManager(a0) { // fn#121301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:419, offset: 0x02544025, size: 225 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, RedesignNewUserManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(RedesignNewUserManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_121297()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value._onboardingStepIndex = -1;
|
|
value._lastShownStepIndex = -1;
|
|
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121302, ONBOARDING_START: ONBOARDING_START};
|
|
value.startOnboarding = startOnboarding_121304;
|
|
value.handleOnboardingStart = handleOnboardingStart;
|
|
value.handleConnectionOpen = handleConnectionOpen_121307;
|
|
return value;
|
|
function RedesignNewUserManagerPOST_CONNECTION_OPEN() { // fn#121302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:754, owner: RedesignNewUserManager.POST_CONNECTION_OPEN, offset: 0x00eed68e, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handleConnectionOpen();
|
|
}
|
|
|
|
function ONBOARDING_START() { // fn#121303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:800, owner: RedesignNewUserManager.ONBOARDING_START, offset: 0x02544106, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handleOnboardingStart();
|
|
}
|
|
|
|
function RedesignNewUserManagerStartOnboarding() { // fn#121304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:849, owner: RedesignNewUserManager.startOnboarding, offset: 0x02544119, size: 127 bytes, params: 1, frame: 16
|
|
var environment;
|
|
let value = environment.__proto__.__proto__;
|
|
initialize((require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite() ? ContactSyncModes.ONBOARDING_INVITE : ContactSyncModes.ONBOARDING);
|
|
value = require(15791) /* metro dependency 15791: NewUserUtils */;
|
|
value = value.getNextOnboardingStep(false, -1, -1);
|
|
value.then(_fun121305);
|
|
function _fun121305(a0) { // fn#121305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:972, offset: 0x02544198, size: 226 bytes, params: 2, frame: 21
|
|
var defaultImport;
|
|
var pushLazy;
|
|
var object;
|
|
var NEW_USER_MODAL_KEY;
|
|
var object2;
|
|
a0.lastShownStepIndex;
|
|
const onboardingStepIndex = a0.onboardingStepIndex;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const keyForOnboardingStep = require(dependencyMap[8]).getKeyForOnboardingStep(onboardingStepIndex);
|
|
if (keyForOnboardingStep != null) {
|
|
defaultImport = importDefault(dependencyMap[9]);
|
|
pushLazy = defaultImport.pushLazy;
|
|
value = require(dependencyMap[11]);
|
|
value = value(dependencyMap[10], dependencyMap.paths);
|
|
object = {initialRouteName: keyForOnboardingStep, initialOnboardingStepIndex: onboardingStepIndex};
|
|
NEW_USER_MODAL_KEY = require(dependencyMap[12]).NEW_USER_MODAL_KEY;
|
|
object2 = {'fullScreenGestureEnabled': false, 'presentation': null, 'animation': 'slide_from_bottom'};
|
|
object2.presentation = require(dependencyMap[13]).isAndroid() ? 'transparentModal' : 'card';
|
|
Reflect.apply(pushLazy, defaultImport, [value, object, NEW_USER_MODAL_KEY, object2]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function handleOnboardingStart() { // fn#121306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:1339, owner: RedesignNewUserManager.handleOnboardingStart, offset: 0x0254427a, size: 21 bytes, params: 1, frame: 9
|
|
env0_0.startOnboarding();
|
|
}
|
|
|
|
function RedesignNewUserManagerHandleConnectionOpen() { // fn#121307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:1388, owner: RedesignNewUserManager.handleConnectionOpen, offset: 0x0254428f, size: 79 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__.__proto__;
|
|
if (NewUserStore.getType() != null) {
|
|
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
|
if (!value.isModalOpen()) {
|
|
env0_0.startOnboarding();
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun121296, 15790, [7, 6, 15, 17, 18, 11994, 4256, 9151, 15791, 5080, 15793, 1962, 15792, 477, 4007,
|
|
4860,
|
|
2]) /* metro module 15790, dependencies: [7, 6, 15, 17, 18, 11994, 4256, 9151, 15791, 5080, 15793, 1962, 15792, 477, 4007, 4860, 2] */;
|