499 lines
32 KiB
TypeScript
499 lines
32 KiB
TypeScript
/* Metro module 13591; source: modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx; dependencies: [57, 31, 27, 7093, 6528, 33, 4501, 697, 7099, 9484, 3857, 1244, 8947, 9483, 9520, 6531, 13568, 566, 10183, 7116, 6275, 13592, 13593, 9949, 9513, 7120, 9519, 9517, 9518, 7121, 13630, 13632, 13633, 7114, 8129, 4573, 2] */
|
|
import React from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import ToastActionCreators from '../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
|
|
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
|
|
import QuestBottomSheetHeader from './QuestBottomSheetHeader.tsx'; /* Metro dependency 13592 */
|
|
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
|
|
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
|
|
import * as GetQuestLoggerModule from '../../lib/getQuestLogger.tsx'; /* Metro dependency 7099 */
|
|
import * as QuestTaskUtilsModule from '../../utils/QuestTaskUtils.tsx'; /* Metro dependency 7116 */
|
|
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
|
|
import * as WarningIconModule from '../../../../design/components/Icon/native/redesign/generated/WarningIcon.tsx'; /* Metro dependency 8129 */
|
|
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
|
|
import * as QuestActionCreatorsModule from '../../QuestActionCreators.tsx'; /* Metro dependency 9484 */
|
|
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
|
|
import * as AdAnalyticsInterfaceExperimentModule from '../../experiments/AdAnalyticsInterfaceExperiment.tsx'; /* Metro dependency 9519 */
|
|
import * as AnalyticsHooksModule from '../../lib/analytics/AnalyticsHooks.tsx'; /* Metro dependency 9949 */
|
|
import * as QuestHooksNativeModule from '../QuestHooks.native.tsx'; /* Metro dependency 13568 */
|
|
|
|
function _fun103256(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6, offset: 0x0225e8d9, size: 687 bytes, params: 8, frame: 28
|
|
const env0_0 = require;
|
|
const useEnrolledQuestContentProps2 = useEnrolledQuestContentProps;
|
|
const QuestBottomSheetContent2 = QuestBottomSheetContent;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = React;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const object2 = {};
|
|
const object3 = {display: 'flex'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingHorizontal = PX_16;
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object3.gap = PX_24;
|
|
object2.contentContainer = object3;
|
|
const object4 = {display: 'flex'};
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.gap = PX_8;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginHorizontal = -PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginTop = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.paddingTop = PX_16;
|
|
object4.borderTopWidth = 1;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object4.borderTopColor = BORDER_SUBTLE;
|
|
object2.microphoneUnit = object4;
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object2.microphoneUnitHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
|
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object2]);
|
|
value = value.createContext({isInQuestBottomSheet: false});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx');
|
|
exports.default = QuestBottomSheetConnected;
|
|
exports.QuestBottomSheetStep = {TASK_SELECT: 'TASK_SELECT', CONSOLE_CONNECT: 'CONSOLE_CONNECT',
|
|
TASK_STATUS: 'TASK_STATUS'};
|
|
exports.useEnrolledQuestContentProps = useEnrolledQuestContentProps2;
|
|
exports.QuestBottomSheetContent = QuestBottomSheetContent2;
|
|
exports.QuestBottomSheetContext = value;
|
|
function QuestBottomSheet({quest, initialStep, sourceQuestContent}) { // fn#103257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:861, offset: 0x0225eb88, size: 628 bytes, params: 2, frame: 35
|
|
const styles = useStyles();
|
|
let QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
const {step, defibrillator, stepActions, handleTaskSelect,
|
|
showMicrophone} = useEnrolledQuestContentProps({quest: quest, initialStep: initialStep,
|
|
location: QUEST_HOME_MOBILE, sourceQuestContent: sourceQuestContent});
|
|
const value3 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const hasWatchVideoTasks2 = (QuestTaskUtilsModule).hasWatchVideoTasks(quest);
|
|
const isInGameQuest2 = (QuestTaskUtilsModule).isInGameQuest(quest);
|
|
const [property, env0_0] = Module00057(useState(0), 2);
|
|
const value7 = env0_4.useMemo(function() {
|
|
return {isInQuestBottomSheet: true};
|
|
}, []);
|
|
const Provider = env0_15.Provider;
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const object2 = {};
|
|
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
object2.header = (
|
|
<QuestBottomSheetHeader
|
|
quest={quest}
|
|
step={step}
|
|
location={QUEST_HOME_MOBILE}
|
|
/>
|
|
);
|
|
object2.footer = (
|
|
isInGameQuest2
|
|
? null
|
|
: (
|
|
hasWatchVideoTasks2
|
|
? (
|
|
value3
|
|
? ((Component) => <Component quest={quest} sourceQuestContent={sourceQuestContent} step={step} isDefibrilating={defibrillator.isActive} onLayout={onLayout_103259} onBack={stepActions.onBack} onDefib={defibrillator.start} onConnectConsoleNext={stepActions.onNext} />)(importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */)
|
|
: null
|
|
)
|
|
: ((Component) => <Component quest={quest} sourceQuestContent={sourceQuestContent} step={step} isDefibrilating={defibrillator.isActive} onLayout={onLayout_103259} onBack={stepActions.onBack} onDefib={defibrillator.start} onConnectConsoleNext={stepActions.onNext} />)(importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */)
|
|
)
|
|
);
|
|
object2.startExpanded = true;
|
|
const TASK_SELECT = env0_13.TASK_SELECT;
|
|
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
return (
|
|
<Provider value={value7}>
|
|
<BottomSheet {...object2}>
|
|
<View style={[styles.contentContainer, {paddingBottom: step === TASK_SELECT ? 0 : property}]}>
|
|
<QuestBottomSheetContent
|
|
defibrillator={defibrillator}
|
|
quest={quest}
|
|
handleTaskSelect={handleTaskSelect}
|
|
location={QUEST_HOME_MOBILE}
|
|
showMicrophone={showMicrophone}
|
|
sourceQuestContent={sourceQuestContent}
|
|
step={step}
|
|
/>
|
|
</View>
|
|
</BottomSheet>
|
|
</Provider>
|
|
);
|
|
function QuestBottomSheetOnLayout({nativeEvent}) { // fn#103259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:1556, owner: QuestBottomSheet.onLayout, offset: 0x01dff69d, size: 36 bytes, params: 2, frame: 11
|
|
env0_0(nativeEvent.layout.height);
|
|
}
|
|
|
|
}
|
|
|
|
function useEnrolledQuestContentProps({quest, initialStep, location, sourceQuestContent}) { // fn#103260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:1913, offset: 0x0225ee07, size: 407 bytes, params: 2, frame: 23
|
|
const env0_2 = (AnalyticsHooksModule).useTrackQuestContentClickedWithImpression();
|
|
const env0_3 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
|
|
const value3 = (QuestHooksModule).useQuestTaskDetails(quest);
|
|
const value4 = (QuestHooksModule).useIsQuestProgressing(quest);
|
|
const value6 = env0_3((QuestHooksModule).useTaskPlatformScreen(quest, value3),
|
|
3);
|
|
const property = value6[0];
|
|
const env0_4 = value6[2];
|
|
const value7 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const value9 = env0_3(useSteps({quest: quest, initialStep: initialStep, location: location}), 2);
|
|
const property2 = value9[0];
|
|
const property3 = value9[1];
|
|
const value10 = useDefibrillator(quest);
|
|
const userStatus = quest.userStatus;
|
|
return {quest: quest, defibrillator: value10, step: property2, stepActions: property3,
|
|
showMicrophone: !(userStatus?.completedAt != null) && !value4 && property === (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.CONSOLE && !value7,
|
|
handleTaskSelect: handleTaskSelect};
|
|
function useSteps({quest, initialStep}) { // fn#103261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2287, owner: useEnrolledQuestContentProps.useSteps, offset: 0x0225ef9e, size: 843 bytes, params: 2, frame: 31
|
|
const TaskPlatformScreen = (QuestTypesModule).TaskPlatformScreen;
|
|
const userStatus = quest.userStatus;
|
|
const value2 = userStatus?.completedAt != null;
|
|
const useConnectedAccounts = QuestHooksModule.useConnectedAccounts;
|
|
const xboxAndPlaystationAccounts = Reflect.apply(useConnectedAccounts, QuestHooksModule,
|
|
[]).xboxAndPlaystationAccounts;
|
|
let binding = env1_4;
|
|
const value4 = binding.useMemo(_fun103262, [quest, xboxAndPlaystationAccounts]);
|
|
const value5 = QuestHooksModule.useQuestTaskDetails(quest);
|
|
const value6 = QuestHooksModule.useIsQuestProgressing(quest);
|
|
const value8 = env1_3(QuestHooksModule.useTaskPlatformScreen(quest, value5), 3);
|
|
const property = value8[0];
|
|
const property2 = value8[1];
|
|
const property3 = value8[2];
|
|
binding = env1_4;
|
|
const useState = binding.useState;
|
|
let r7 = value4.length === 0 && !value2 && property === TaskPlatformScreen.CONSOLE;
|
|
r7 = !r7 ? initialStep === env1_13.CONSOLE_CONNECT : r7;
|
|
const value14 = env1_3(Reflect.apply(useState, binding, [r7]), 2);
|
|
const property4 = value14[0];
|
|
const property5 = value14[1];
|
|
const r12 = value6 || value5.progressSeconds > 0;
|
|
let r5 = value4.length !== 0 || value2;
|
|
r5 = !r5 ? property !== TaskPlatformScreen.CONSOLE : r5;
|
|
r5 = !r5 ? property4 : r5;
|
|
if (!r5) {
|
|
property5(true);
|
|
}
|
|
const value18 = env1_4.useCallback(_fun103265, [property3]);
|
|
const value19 = env1_4.useMemo(_fun103268, []);
|
|
const value20 = env1_4.useMemo(_fun103269, [property4, r12]);
|
|
const value21 = env1_4.useMemo(_fun103270, [property, property4, r12, value18]);
|
|
const value22 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const useMobileActivityQuest = QuestHooksNativeModule.useMobileActivityQuest;
|
|
const value23 = env1_4.useMemo(_fun103271, [property2, value21, value19, value20, value22,
|
|
Reflect.apply(useMobileActivityQuest, QuestHooksNativeModule, [quest]).isMobileActivityQuest]);
|
|
return [value23.type, {onBack: value23?.onBack, onNext: value23?.onNext}];
|
|
function _fun103262() { // fn#103262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2464, offset: 0x0225f2e9, size: 64 bytes, params: 1, frame: 11
|
|
var environment;
|
|
let value = environment.__proto__.__proto__;
|
|
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
|
|
[quest]);
|
|
return value.filter(function(a0) {
|
|
var env0_0 = a0;
|
|
return xboxAndPlaystationAccounts.find(_fun103264);
|
|
});
|
|
function _fun103263(a0) { // fn#103263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2506, offset: 0x0225f329, size: 36 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return xboxAndPlaystationAccounts.find(_fun103264);
|
|
function _fun103264({type}) { // fn#103264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2517, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
|
|
return type === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun103265() { // fn#103265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2912, offset: 0x0225f34d, size: 29 bytes, params: 1, frame: 12
|
|
(0, ReactNativeModule.View)(false);
|
|
env0_4(null);
|
|
}
|
|
|
|
function showConsoleSelect() { // fn#103266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2956, owner: useEnrolledQuestContentProps.useSteps.showConsoleSelect, offset: 0x0225f36a, size: 18 bytes, params: 1, frame: 11
|
|
return (0, ReactNativeModule.View)(true);
|
|
}
|
|
|
|
function hideConsoleSelect() { // fn#103267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2984, owner: useEnrolledQuestContentProps.useSteps.hideConsoleSelect, offset: 0x0225f37c, size: 18 bytes, params: 1, frame: 11
|
|
return (0, ReactNativeModule.View)(false);
|
|
}
|
|
|
|
function _fun103268() { // fn#103268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3007, offset: 0x0225f38e, size: 36 bytes, params: 1, frame: 2
|
|
const TASK_STATUS = env2_13.TASK_STATUS;
|
|
return [{type: TASK_STATUS, shouldShow: true}];
|
|
}
|
|
|
|
function _fun103269() { // fn#103269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3066, offset: 0x0225f3b2, size: 95 bytes, params: 1, frame: 5
|
|
const value = environment.__proto__.__proto__;
|
|
const CONSOLE_CONNECT = env2_13.CONSOLE_CONNECT;
|
|
const TASK_STATUS = env2_13.TASK_STATUS;
|
|
return [{type: CONSOLE_CONNECT, shouldShow: ReactModule.useState, onNext: hideConsoleSelect}, {type: TASK_STATUS,
|
|
shouldShow: true, onBack: env0_7 ? undefined : showConsoleSelect}];
|
|
}
|
|
|
|
function _fun103270() { // fn#103270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3225, offset: 0x0225f411, size: 249 bytes, params: 1, frame: 17
|
|
const object = {};
|
|
const TASK_SELECT = env2_13.TASK_SELECT;
|
|
object.type = TASK_SELECT;
|
|
let binding = env0_2;
|
|
const value3 = undefined;
|
|
const TaskPlatformScreen = (QuestTypesModule).TaskPlatformScreen;
|
|
const SELECT = TaskPlatformScreen.SELECT;
|
|
object.shouldShow = binding === SELECT;
|
|
const CONSOLE_CONNECT = env2_13.CONSOLE_CONNECT;
|
|
binding = env0_2;
|
|
const CONSOLE = TaskPlatformScreen.CONSOLE;
|
|
const TASK_STATUS = env2_13.TASK_STATUS;
|
|
return [object, {type: CONSOLE_CONNECT, shouldShow: binding === CONSOLE && ReactModule.useState, onBack: QuestConstantsModule.QuestsExperimentLocations,
|
|
onNext: hideConsoleSelect}, {type: TASK_STATUS, shouldShow: true,
|
|
onBack: env0_7 ? value3 : env0_2 === TaskPlatformScreen.CONSOLE ? showConsoleSelect : QuestConstantsModule.QuestsExperimentLocations}];
|
|
}
|
|
|
|
function _fun103271() { // fn#103271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3661, offset: 0x0225f50a, size: 174 bytes, params: 1, frame: 14
|
|
const r2 = env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.DESKTOP) || env0_14 || isMobileActivityQuest ? JsxRuntimeModule.jsxs : env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.CONSOLE) ? JsxRuntimeModule.Fragment : env0_13;
|
|
return r2.find(function(a0) {
|
|
return a0.shouldShow;
|
|
}) ?? r2.at(-1);
|
|
}
|
|
|
|
}
|
|
|
|
function useDefibrillator(a0) { // fn#103273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3985, owner: useEnrolledQuestContentProps.useDefibrillator, offset: 0x0225f5c3, size: 206 bytes, params: 2, frame: 21
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
const getQuestLogger = GetQuestLoggerModule.getQuestLogger;
|
|
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
|
const value2 = Reflect.apply(getQuestLogger, GetQuestLoggerModule, [{quest: a0, location: QUEST_HOME_MOBILE}]);
|
|
const [property, property2] = env1_3(useState([]), 2);
|
|
const [property3, property4] = env1_3(useState(false), 2);
|
|
const binding = env1_4;
|
|
const useCallback = binding.useCallback;
|
|
return {errorHints: property, isActive: property3, start: Reflect.apply(useCallback, binding, [_fun103274, [a0,
|
|
value2, property4, property2]])};
|
|
function _fun103274() { // fn#103274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4162, offset: 0x0225f691, size: 116 bytes, params: 1, frame: 14
|
|
env0_3(true);
|
|
let value = QuestActionCreatorsModule.manuallyStartConsoleQuest(env0_0.id);
|
|
value = value.then(_fun103275);
|
|
value = value.catch(_fun103276);
|
|
value.finally(_fun103277);
|
|
function _fun103275({errorHints}) { // fn#103275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4219, offset: 0x0225f705, size: 25 bytes, params: 2, frame: 11
|
|
return env1_2(errorHints);
|
|
}
|
|
|
|
function _fun103276(a0) { // fn#103276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4251, offset: 0x0225f71e, size: 161 bytes, params: 2, frame: 19
|
|
env1_2([]);
|
|
env1_1.error('Failed to start console quest', a0);
|
|
const defaultImport = ToastActionCreators;
|
|
const open = defaultImport.open;
|
|
const object = {key: 'START_DEFIBRILLATOR_ERROR'};
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const CKsXk3 = (IndexNativeModule).t.CKsXk3;
|
|
object.content = Reflect.apply(string, intl, [CKsXk3]);
|
|
object.icon = importDefault(8947) /* metro dependency 8947 */;
|
|
Reflect.apply(open, defaultImport, [object]);
|
|
}
|
|
|
|
function _fun103277() { // fn#103277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4427, offset: 0x01ef13d1, size: 18 bytes, params: 1, frame: 11
|
|
return env1_3(false);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleTaskSelect(a0) { // fn#103278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4688, owner: useEnrolledQuestContentProps.handleTaskSelect, offset: 0x0225f7bf, size: 461 bytes, params: 2, frame: 19
|
|
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
|
|
var object;
|
|
const QuestContent = (QuestTypesModule).QuestContent;
|
|
var captureAdUserAction;
|
|
let value = environment.__proto__;
|
|
const CONSOLE = QuestTaskPlatform.CONSOLE;
|
|
const r6 = a0 === CONSOLE ? QuestContentCTA.SELECT_CONSOLE_PLATFORM : a0 === QuestTaskPlatform.DESKTOP ? QuestContentCTA.SELECT_DESKTOP_PLATFORM : QuestContentCTA.DESELECT_PLATFORM;
|
|
const shouldMigrateToAdAnalyticsInterface = AdAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
|
const AdAnalyticsInterfaceExperimentStep = AdAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
|
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
|
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, AdAnalyticsInterfaceExperimentModule,
|
|
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet'])) {
|
|
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
|
captureAdUserAction = value.captureAdUserAction;
|
|
object = {};
|
|
object.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
|
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
|
object.adCreativeId = quest.id;
|
|
object.questContentCTA = r6;
|
|
object.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
|
|
object.sourceQuestContent = sourceQuestContent;
|
|
object.impressionId = env0_3;
|
|
Reflect.apply(captureAdUserAction, value, [object]);
|
|
} else {
|
|
env0_2({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: r6,
|
|
sourceQuestContent: sourceQuestContent});
|
|
}
|
|
env0_4(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function QuestBottomSheetContent({defibrillator, quest, handleTaskSelect, showMicrophone, sourceQuestContent, step}) { // fn#103279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:5366, offset: 0x0225f98c, size: 400 bytes, params: 2, frame: 27
|
|
var r5;
|
|
var r10;
|
|
var items2;
|
|
showMicrophone = !(showMicrophone === undefined) && showMicrophone;
|
|
const value4 = (QuestHooksNativeModule).useHasWatchVideoOnMobileTasks(quest.config);
|
|
const value5 = env0_4.useMemo(_fun103280, [quest, value4, sourceQuestContent]);
|
|
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
|
const TASK_SELECT = env0_13.TASK_SELECT;
|
|
const items3 = [
|
|
step === TASK_SELECT && ((Component) => <Component onTaskSelect={handleTaskSelect} />)(importDefault(13632) /* metro dependency 13632: QuestBottomSheetTaskSelect */),
|
|
|
|
];
|
|
const CONSOLE_CONNECT = env0_13.CONSOLE_CONNECT;
|
|
items3[1] = step === CONSOLE_CONNECT && ((Component) => <Component quest={quest} step={step} sourceQuestContent={sourceQuestContent} />)(importDefault(13633) /* metro dependency 13633: QuestBottomSheetConsoleConnect */);
|
|
const TASK_STATUS = env0_13.TASK_STATUS;
|
|
const value10 = step === TASK_STATUS;
|
|
if (value10) {
|
|
items2 = [value5];
|
|
r10 = showMicrophone && !value4;
|
|
r10 = r10 && <MicrophoneUnit quest={quest} errorHints={defibrillator?.errorHints} />;
|
|
items2[1] = r10;
|
|
r5 = (
|
|
<View>
|
|
{items2}
|
|
</View>
|
|
);
|
|
} else {
|
|
r5 = value10;
|
|
}
|
|
items3[2] = r5;
|
|
return (
|
|
<>
|
|
{items3}
|
|
</>
|
|
);
|
|
function _fun103280() { // fn#103280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:5561, offset: 0x0225fb1c, size: 208 bytes, params: 1, frame: 17
|
|
var r0;
|
|
var moduleValue;
|
|
var isInGameQuest2;
|
|
var moduleValue2;
|
|
if (env0_2) {
|
|
const QuestBottomSheetProgressCardWatchTask = (require(13630) /* metro dependency 13630: QuestBottomSheetProgressCard */).QuestBottomSheetProgressCardWatchTask;
|
|
r0 = <QuestBottomSheetProgressCardWatchTask quest={quest} sourceQuestContent={sourceQuestContent} />;
|
|
} else {
|
|
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
isInGameQuest2 = moduleValue.isInGameQuest(quest);
|
|
moduleValue2 = require(13630) /* metro dependency 13630: QuestBottomSheetProgressCard */;
|
|
r0 = (
|
|
isInGameQuest2
|
|
? (
|
|
<moduleValue2.QuestBottomSheetProgressCardInGameTask quest={quest} sourceQuestContent={sourceQuestContent} />
|
|
)
|
|
: (
|
|
<moduleValue2.QuestBottomSheetProgressCardPlayStreamTask
|
|
quest={quest}
|
|
sourceQuestContent={sourceQuestContent}
|
|
/>
|
|
)
|
|
);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
function MicrophoneUnit({quest, errorHints}) { // fn#103281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6111, offset: 0x0225fbec, size: 648 bytes, params: 2, frame: 30
|
|
var r7;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var items3;
|
|
var value7;
|
|
var value8;
|
|
const styles = useStyles();
|
|
const useQuestHowToHelpArticle = QuestHooksModule.useQuestHowToHelpArticle;
|
|
const message = Reflect.apply(useQuestHowToHelpArticle, QuestHooksModule, []).message;
|
|
const value4 = (errorHints?.length ?? 0) > 0;
|
|
if (value4) {
|
|
if (errorHints != null) {
|
|
value7 = errorHints.map(function(a0) {
|
|
return a0.message;
|
|
});
|
|
items3 = [];
|
|
value8 = arraySpread(items3, value7, 0, undefined);
|
|
items3[value8] = message;
|
|
value8 + 1;
|
|
r7 = items3;
|
|
} else {
|
|
r7 = [(require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest) ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUyEZZ) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.GXqvC1,
|
|
|
|
|
|
{gameTitle: quest.config.messages.gameTitle})];
|
|
}
|
|
} else {
|
|
r7 = [(require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest) ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUyEZZ) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.GXqvC1,
|
|
|
|
{gameTitle: quest.config.messages.gameTitle})];
|
|
}
|
|
const WarningIcon = (WarningIconModule).WarningIcon;
|
|
const warningIcon = <WarningIcon color={value4 ? 'text-feedback-critical' : 'text-feedback-warning'} />;
|
|
const Text = (TextModule).Text;
|
|
const items2 = [
|
|
<View style={styles.microphoneUnitHeader}>
|
|
{warningIcon}
|
|
<Text variant="text-md/medium" color="mobile-text-heading-primary">
|
|
{value4 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['28Ql27'],
|
|
{gameTitle: quest.config.messages.gameTitle}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YstzGO)}
|
|
</Text>
|
|
</View>,
|
|
];
|
|
items2[1] = r7.map(_fun103283);
|
|
return (
|
|
<View style={styles.microphoneUnit}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
function _fun103283(a0, a1) { // fn#103283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6880, offset: 0x0225fe74, size: 65 bytes, params: 3, frame: 15
|
|
const Text = (TextModule).Text;
|
|
return <Text {...{variant: 'text-sm/normal', children: a0}} key={a1} />;
|
|
}
|
|
|
|
}
|
|
|
|
function QuestBottomSheetConnected({questId, initialStep, sourceQuestContent, questContentPosition}) { // fn#103284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:7103, offset: 0x0225feb5, size: 211 bytes, params: 2, frame: 21
|
|
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
|
return QuestStore.getQuest(questId);
|
|
});
|
|
if (quest == null) {
|
|
return null;
|
|
} else {
|
|
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
|
return (
|
|
<QuestContentImpressionTrackerNative
|
|
overrideVisibility
|
|
questOrQuests={quest}
|
|
questContent={(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET}
|
|
questContentPosition={questContentPosition}
|
|
sourceQuestContent={sourceQuestContent}
|
|
>
|
|
{children_103286}
|
|
</QuestContentImpressionTrackerNative>
|
|
);
|
|
}
|
|
function QuestBottomSheetConnectedChildren() { // fn#103286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:7481, owner: QuestBottomSheetConnected.children, offset: 0x0225ffa3, size: 53 bytes, params: 1, frame: 14
|
|
return (
|
|
<QuestBottomSheet
|
|
quest={quest}
|
|
initialStep={initialStep}
|
|
sourceQuestContent={sourceQuestContent}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun103256, 13591, [57, 31, 27, 7093, 6528, 33, 4501, 697, 7099, 9484, 3857, 1244, 8947, 9483, 9520,
|
|
6531, 13568, 566, 10183, 7116, 6275, 13592, 13593, 9949, 9513, 7120, 9519, 9517, 9518, 7121, 13630, 13632,
|
|
13633, 7114, 8129, 4573,
|
|
2]) /* metro module 13591, dependencies: [57, 31, 27, 7093, 6528, 33, 4501, 697, 7099, 9484, 3857, 1244, 8947, 9483, 9520, 6531, 13568, 566, 10183, 7116, 6275, 13592, 13593, 9949, 9513, 7120, 9519, 9517, 9518, 7121, 13630, 13632, 13633, 7114, 8129, 4573, 2] */;
|