decord/source/modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx

678 lines
24 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 14078
// Function ID: 107712
2026-07-20 16:05:17 +00:00
// Name: QuestBottomSheet
2026-07-27 11:26:19 +00:00
// Dependencies: [57, 31, 27, 5932, 4977, 33, 4131, 689, 5938, 9401, 3832, 1212, 9104, 10428, 10436, 4980, 14052, 566, 10908, 5955, 5187, 14079, 14080, 10904, 10432, 5959, 9406, 9407, 9408, 5960, 14117, 14119, 14120, 5953, 7570, 4127, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 14078 (QuestBottomSheet)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import importDefaultResult from "QuestBottomSheetTaskSelect";
import { useState } from "QuestBottomSheetTaskSelect";
import { View } from "emitClickEventWithCreative";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import QuestsExperimentLocations from "QuestsExperimentLocations";
import jsxProd from "_createForOfIteratorHelperLoose";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_10;
let closure_11;
let closure_12;
let closure_8;
let closure_9;
const require = arg1;
2026-07-20 16:05:17 +00:00
function QuestBottomSheet(initialStep) {
let defibrillator;
let handleTaskSelect;
let quest;
let showMicrophone;
let sourceQuestContent;
let step;
let stepActions;
({ quest, sourceQuestContent } = initialStep);
let obj = { quest, initialStep: initialStep.initialStep, location: constants.QUEST_HOME_MOBILE, sourceQuestContent };
const tmp2 = useEnrolledQuestContentProps(obj);
({ step, defibrillator, stepActions } = tmp2);
({ handleTaskSelect, showMicrophone } = tmp2);
2026-07-27 11:26:19 +00:00
let obj1 = _require(14052);
2026-07-20 16:05:17 +00:00
const hasWatchVideoOnMobileTasks = obj1.useHasWatchVideoOnMobileTasks(quest.config);
2026-07-25 08:10:48 +00:00
let obj2 = _require(5955);
2026-07-23 10:11:24 +00:00
const tmp = callback3();
2026-07-25 08:10:48 +00:00
let obj3 = _require(5955);
2026-07-20 16:05:17 +00:00
const hasWatchVideoTasksResult = obj2.hasWatchVideoTasks(quest);
2026-07-23 10:11:24 +00:00
const tmp6 = callback(useState(0), 2);
_require = tmp6[1];
2026-07-20 16:05:17 +00:00
obj = { value: importDefaultResult.useMemo(() => ({ isInQuestBottomSheet: true }), []) };
obj = {};
obj1 = { quest, step, location: constants.QUEST_HOME_MOBILE };
2026-07-27 11:26:19 +00:00
obj.header = callback2(importDefault(14079), obj1);
2026-07-20 16:05:17 +00:00
let tmp9 = null;
if (!isInGameQuestResult) {
if (!hasWatchVideoTasksResult) {
obj2 = {
quest,
sourceQuestContent,
step,
isDefibrilating: defibrillator.isActive,
onLayout(nativeEvent) {
callback(nativeEvent.nativeEvent.layout.height);
},
onBack: stepActions.onBack,
onDefib: defibrillator.start,
onConnectConsoleNext: stepActions.onNext
};
2026-07-27 11:26:19 +00:00
tmp9 = callback2(importDefault(14080), obj2);
2026-07-20 16:05:17 +00:00
} else {
tmp9 = null;
}
}
obj.footer = tmp9;
obj.startExpanded = true;
obj3 = {};
const items = [tmp.contentContainer, ];
const obj4 = {};
let num2 = 0;
if (step !== obj.TASK_SELECT) {
num2 = tmp6[0];
}
obj4.paddingBottom = num2;
items[1] = obj4;
obj3.style = items;
2026-07-23 10:11:24 +00:00
obj3.children = callback2(QuestBottomSheetContent, { defibrillator, quest, handleTaskSelect, location: constants.QUEST_HOME_MOBILE, showMicrophone, sourceQuestContent, step });
obj.children = callback2(View, obj3);
obj.children = callback2(_require(5187).BottomSheet, obj);
return callback2(context.Provider, obj);
2026-07-20 16:05:17 +00:00
}
function useEnrolledQuestContentProps(quest) {
let _location;
let initialStep;
let tmp6;
let tmp7;
quest = quest.quest;
2026-07-23 10:11:24 +00:00
const sourceQuestContent = quest.sourceQuestContent;
2026-07-20 16:05:17 +00:00
({ initialStep, location: _location } = quest);
2026-07-27 11:26:19 +00:00
let obj = quest(10904);
2026-07-23 10:11:24 +00:00
let dependencyMap = obj.useTrackQuestContentClickedWithImpression();
2026-07-27 11:26:19 +00:00
let callback = quest(10432).useQuestImpressionId();
let obj2 = quest(10432);
let questTaskDetails = quest(10428).useQuestTaskDetails(quest);
let obj3 = quest(10428);
let isQuestProgressing = quest(10428).useIsQuestProgressing(quest);
let obj4 = quest(10428);
const tmp3 = callback(quest(10428).useTaskPlatformScreen(quest, questTaskDetails), 3);
2026-07-20 16:05:17 +00:00
let closure_4 = tmp3[2];
2026-07-27 11:26:19 +00:00
let obj5 = quest(10428);
let hasWatchVideoOnMobileTasks = quest(14052).useHasWatchVideoOnMobileTasks(quest.config);
const obj6 = quest(14052);
2026-07-23 10:11:24 +00:00
[tmp6, tmp7] = callback((function useSteps(quest) {
2026-07-20 16:05:17 +00:00
quest = quest.quest;
2026-07-23 10:11:24 +00:00
let xboxAndPlaystationAccounts;
let first;
let c3;
let c4;
2026-07-20 16:05:17 +00:00
let first1;
2026-07-23 10:11:24 +00:00
let c6;
2026-07-20 16:05:17 +00:00
let isQuestProgressing;
let callback;
let memo1;
let memo2;
let memo3;
let hasWatchVideoOnMobileTasks;
let isMobileActivityQuest;
function showConsoleSelect() {
2026-07-23 10:11:24 +00:00
return _undefined3(true);
2026-07-20 16:05:17 +00:00
}
function hideConsoleSelect() {
2026-07-23 10:11:24 +00:00
return _undefined3(false);
2026-07-20 16:05:17 +00:00
}
const userStatus = quest.userStatus;
let completedAt;
if (null != userStatus) {
completedAt = userStatus.completedAt;
}
2026-07-27 11:26:19 +00:00
let obj = quest(10428);
2026-07-23 10:11:24 +00:00
xboxAndPlaystationAccounts = obj.useConnectedAccounts().xboxAndPlaystationAccounts;
let items = [quest, xboxAndPlaystationAccounts];
2026-07-20 16:05:17 +00:00
const memo = React.useMemo(() => {
2026-07-27 11:26:19 +00:00
const obj = quest(10436);
return quest(10436).supportedConsoles(quest).filter((arg0) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
return outer1_1.find((type) => type.type === closure_0);
});
2026-07-20 16:05:17 +00:00
}, items);
2026-07-27 11:26:19 +00:00
const questTaskDetails = quest(10428).useQuestTaskDetails(quest);
const obj2 = quest(10428);
isQuestProgressing = quest(10428).useIsQuestProgressing(quest);
const obj3 = quest(10428);
const tmp5 = callback(quest(10428).useTaskPlatformScreen(quest, questTaskDetails), 3);
2026-07-23 10:11:24 +00:00
first = tmp5[0];
c3 = tmp7;
c4 = tmp8;
2026-07-20 16:05:17 +00:00
let tmp10 = 0 === memo.length;
if (tmp10) {
tmp10 = !tmp2;
}
if (tmp10) {
2026-07-25 08:10:48 +00:00
tmp10 = first === quest(4980).TaskPlatformScreen.CONSOLE;
2026-07-20 16:05:17 +00:00
}
if (!tmp10) {
2026-07-23 10:11:24 +00:00
tmp10 = quest.initialStep === outer1_13.CONSOLE_CONNECT;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const tmp14 = callback(React.useState(tmp10), 2);
2026-07-20 16:05:17 +00:00
first1 = tmp14[0];
2026-07-23 10:11:24 +00:00
c6 = tmp16;
2026-07-20 16:05:17 +00:00
if (!isQuestProgressing) {
isQuestProgressing = questTaskDetails.progressSeconds > 0;
}
let tmp17 = 0 !== memo.length || tmp2;
if (!tmp17) {
2026-07-25 08:10:48 +00:00
tmp17 = first !== quest(4980).TaskPlatformScreen.CONSOLE;
2026-07-20 16:05:17 +00:00
}
if (!tmp17) {
tmp17 = first1;
}
if (!tmp17) {
tmp16(true);
}
const items1 = [tmp5[2]];
callback = React.useCallback(() => {
2026-07-23 10:11:24 +00:00
_undefined3(false);
_undefined2(null);
2026-07-20 16:05:17 +00:00
}, items1);
memo1 = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
const items = [{ type: outer2_13.TASK_STATUS, shouldShow: true }];
2026-07-20 16:05:17 +00:00
return items;
}, []);
const items2 = [first1, isQuestProgressing];
memo2 = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
let obj = { type: outer2_13.CONSOLE_CONNECT, shouldShow: first1, onNext: hideConsoleSelect };
2026-07-20 16:05:17 +00:00
const items = [obj, ];
2026-07-23 10:11:24 +00:00
obj = { type: outer2_13.TASK_STATUS, shouldShow: true };
2026-07-20 16:05:17 +00:00
let tmp;
if (!isQuestProgressing) {
tmp = showConsoleSelect;
}
obj.onBack = tmp;
items[1] = obj;
return items;
}, items2);
const items3 = [first, first1, isQuestProgressing, callback];
memo3 = React.useMemo(() => {
2026-07-25 08:10:48 +00:00
let obj = { type: outer2_13.TASK_SELECT, shouldShow: first === quest(4980).TaskPlatformScreen.SELECT };
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-25 08:10:48 +00:00
obj = { type: outer2_13.CONSOLE_CONNECT, shouldShow: first === quest(4980).TaskPlatformScreen.CONSOLE && first1, onBack: callback, onNext: hideConsoleSelect };
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-23 10:11:24 +00:00
obj = { type: outer2_13.TASK_STATUS, shouldShow: true };
2026-07-20 16:05:17 +00:00
if (isQuestProgressing) {
obj.onBack = undefined;
items[2] = obj;
return items;
} else {
2026-07-25 08:10:48 +00:00
first === quest(4980).TaskPlatformScreen.CONSOLE ? showConsoleSelect : callback;
2026-07-20 16:05:17 +00:00
}
}, items3);
2026-07-27 11:26:19 +00:00
const obj4 = quest(10428);
hasWatchVideoOnMobileTasks = quest(14052).useHasWatchVideoOnMobileTasks(quest.config);
const obj5 = quest(14052);
isMobileActivityQuest = quest(14052).useMobileActivityQuest(quest).isMobileActivityQuest;
2026-07-20 16:05:17 +00:00
const items4 = [tmp5[1], memo3, memo1, memo2, hasWatchVideoOnMobileTasks, isMobileActivityQuest];
const memo4 = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
let hasItem = 1 === _undefined.length;
2026-07-20 16:05:17 +00:00
if (hasItem) {
2026-07-23 10:11:24 +00:00
hasItem = _undefined.includes(outer2_9.DESKTOP);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let hasItem1 = 1 === _undefined.length;
2026-07-20 16:05:17 +00:00
if (hasItem1) {
2026-07-23 10:11:24 +00:00
hasItem1 = _undefined.includes(outer2_9.CONSOLE);
2026-07-20 16:05:17 +00:00
}
let arr = memo3;
if (!hasItem) {
if (!hasWatchVideoOnMobileTasks) {
if (!isMobileActivityQuest) {
if (hasItem1) {
arr = memo2;
}
}
let found = arr.find((shouldShow) => shouldShow.shouldShow);
if (null == found) {
found = arr.at(-1);
}
return found;
}
}
arr = memo1;
}, items4);
const items5 = [memo4.type, ];
obj = {};
let onBack;
if (null != memo4) {
onBack = memo4.onBack;
}
obj.onBack = onBack;
let onNext;
if (null != memo4) {
onNext = memo4.onNext;
}
obj.onNext = onNext;
items5[1] = obj;
return items5;
2026-07-23 10:11:24 +00:00
})({ quest, initialStep, location: _location }), 2);
let userStatus = quest.userStatus;
2026-07-20 16:05:17 +00:00
let completedAt;
2026-07-23 10:11:24 +00:00
let tmp5 = callback((function useSteps(quest) {
2026-07-20 16:05:17 +00:00
quest = quest.quest;
2026-07-23 10:11:24 +00:00
let xboxAndPlaystationAccounts;
let first;
let c3;
let c4;
2026-07-20 16:05:17 +00:00
let first1;
2026-07-23 10:11:24 +00:00
let c6;
2026-07-20 16:05:17 +00:00
let isQuestProgressing;
let callback;
let memo1;
let memo2;
let memo3;
let hasWatchVideoOnMobileTasks;
let isMobileActivityQuest;
function showConsoleSelect() {
2026-07-23 10:11:24 +00:00
return _undefined3(true);
2026-07-20 16:05:17 +00:00
}
function hideConsoleSelect() {
2026-07-23 10:11:24 +00:00
return _undefined3(false);
2026-07-20 16:05:17 +00:00
}
const userStatus = quest.userStatus;
let completedAt;
if (null != userStatus) {
completedAt = userStatus.completedAt;
}
2026-07-27 11:26:19 +00:00
let obj = quest(10428);
2026-07-23 10:11:24 +00:00
xboxAndPlaystationAccounts = obj.useConnectedAccounts().xboxAndPlaystationAccounts;
let items = [quest, xboxAndPlaystationAccounts];
2026-07-20 16:05:17 +00:00
const memo = React.useMemo(() => {
2026-07-27 11:26:19 +00:00
const obj = quest(10436);
return quest(10436).supportedConsoles(quest).filter((arg0) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
return outer1_1.find((type) => type.type === closure_0);
});
2026-07-20 16:05:17 +00:00
}, items);
2026-07-27 11:26:19 +00:00
const questTaskDetails = quest(10428).useQuestTaskDetails(quest);
const obj2 = quest(10428);
isQuestProgressing = quest(10428).useIsQuestProgressing(quest);
const obj3 = quest(10428);
const tmp5 = callback(quest(10428).useTaskPlatformScreen(quest, questTaskDetails), 3);
2026-07-23 10:11:24 +00:00
first = tmp5[0];
c3 = tmp7;
c4 = tmp8;
2026-07-20 16:05:17 +00:00
let tmp10 = 0 === memo.length;
if (tmp10) {
tmp10 = !tmp2;
}
if (tmp10) {
2026-07-25 08:10:48 +00:00
tmp10 = first === quest(4980).TaskPlatformScreen.CONSOLE;
2026-07-20 16:05:17 +00:00
}
if (!tmp10) {
2026-07-23 10:11:24 +00:00
tmp10 = quest.initialStep === outer1_13.CONSOLE_CONNECT;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const tmp14 = callback(React.useState(tmp10), 2);
2026-07-20 16:05:17 +00:00
first1 = tmp14[0];
2026-07-23 10:11:24 +00:00
c6 = tmp16;
2026-07-20 16:05:17 +00:00
if (!isQuestProgressing) {
isQuestProgressing = questTaskDetails.progressSeconds > 0;
}
let tmp17 = 0 !== memo.length || tmp2;
if (!tmp17) {
2026-07-25 08:10:48 +00:00
tmp17 = first !== quest(4980).TaskPlatformScreen.CONSOLE;
2026-07-20 16:05:17 +00:00
}
if (!tmp17) {
tmp17 = first1;
}
if (!tmp17) {
tmp16(true);
}
const items1 = [tmp5[2]];
callback = React.useCallback(() => {
2026-07-23 10:11:24 +00:00
_undefined3(false);
_undefined2(null);
2026-07-20 16:05:17 +00:00
}, items1);
memo1 = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
const items = [{ type: outer2_13.TASK_STATUS, shouldShow: true }];
2026-07-20 16:05:17 +00:00
return items;
}, []);
const items2 = [first1, isQuestProgressing];
memo2 = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
let obj = { type: outer2_13.CONSOLE_CONNECT, shouldShow: first1, onNext: hideConsoleSelect };
2026-07-20 16:05:17 +00:00
const items = [obj, ];
2026-07-23 10:11:24 +00:00
obj = { type: outer2_13.TASK_STATUS, shouldShow: true };
2026-07-20 16:05:17 +00:00
let tmp;
if (!isQuestProgressing) {
tmp = showConsoleSelect;
}
obj.onBack = tmp;
items[1] = obj;
return items;
}, items2);
const items3 = [first, first1, isQuestProgressing, callback];
memo3 = React.useMemo(() => {
2026-07-25 08:10:48 +00:00
let obj = { type: outer2_13.TASK_SELECT, shouldShow: first === quest(4980).TaskPlatformScreen.SELECT };
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-25 08:10:48 +00:00
obj = { type: outer2_13.CONSOLE_CONNECT, shouldShow: first === quest(4980).TaskPlatformScreen.CONSOLE && first1, onBack: callback, onNext: hideConsoleSelect };
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-23 10:11:24 +00:00
obj = { type: outer2_13.TASK_STATUS, shouldShow: true };
2026-07-20 16:05:17 +00:00
if (isQuestProgressing) {
obj.onBack = undefined;
items[2] = obj;
return items;
} else {
2026-07-25 08:10:48 +00:00
first === quest(4980).TaskPlatformScreen.CONSOLE ? showConsoleSelect : callback;
2026-07-20 16:05:17 +00:00
}
}, items3);
2026-07-27 11:26:19 +00:00
const obj4 = quest(10428);
hasWatchVideoOnMobileTasks = quest(14052).useHasWatchVideoOnMobileTasks(quest.config);
const obj5 = quest(14052);
isMobileActivityQuest = quest(14052).useMobileActivityQuest(quest).isMobileActivityQuest;
2026-07-20 16:05:17 +00:00
const items4 = [tmp5[1], memo3, memo1, memo2, hasWatchVideoOnMobileTasks, isMobileActivityQuest];
const memo4 = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
let hasItem = 1 === _undefined.length;
2026-07-20 16:05:17 +00:00
if (hasItem) {
2026-07-23 10:11:24 +00:00
hasItem = _undefined.includes(outer2_9.DESKTOP);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let hasItem1 = 1 === _undefined.length;
2026-07-20 16:05:17 +00:00
if (hasItem1) {
2026-07-23 10:11:24 +00:00
hasItem1 = _undefined.includes(outer2_9.CONSOLE);
2026-07-20 16:05:17 +00:00
}
let arr = memo3;
if (!hasItem) {
if (!hasWatchVideoOnMobileTasks) {
if (!isMobileActivityQuest) {
if (hasItem1) {
arr = memo2;
}
}
let found = arr.find((shouldShow) => shouldShow.shouldShow);
if (null == found) {
found = arr.at(-1);
}
return found;
}
}
arr = memo1;
}, items4);
const items5 = [memo4.type, ];
obj = {};
let onBack;
if (null != memo4) {
onBack = memo4.onBack;
}
obj.onBack = onBack;
let onNext;
if (null != memo4) {
onNext = memo4.onNext;
}
obj.onNext = onNext;
items5[1] = obj;
return items5;
2026-07-23 10:11:24 +00:00
})({ quest, initialStep, location: _location }), 2);
2026-07-20 16:05:17 +00:00
if (null != userStatus) {
completedAt = userStatus.completedAt;
}
let tmp11 = !tmp10;
if (null == completedAt) {
tmp11 = !isQuestProgressing;
}
if (tmp11) {
2026-07-25 08:10:48 +00:00
tmp11 = tmp3[0] === quest(4980).TaskPlatformScreen.CONSOLE;
2026-07-20 16:05:17 +00:00
}
if (tmp11) {
tmp11 = !hasWatchVideoOnMobileTasks;
}
obj = {
quest,
2026-07-23 10:11:24 +00:00
defibrillator: (function useDefibrillator(quest) {
let closure_0 = quest;
2026-07-25 08:10:48 +00:00
let obj = quest(5938);
2026-07-23 10:11:24 +00:00
obj = { quest, location: outer1_8.QUEST_HOME_MOBILE };
2026-07-20 16:05:17 +00:00
const questLogger = obj.getQuestLogger(obj);
2026-07-23 10:11:24 +00:00
const tmp2 = callback(outer1_5([]), 2);
const dependencyMap = tmp3;
const tmp4 = callback(outer1_5(false), 2);
callback = tmp5;
2026-07-20 16:05:17 +00:00
const items = [quest, questLogger, tmp4[1], tmp2[1]];
obj = {
errorHints: tmp2[0],
isActive: tmp4[0],
start: React.useCallback(() => {
tmp5(true);
2026-07-23 10:11:24 +00:00
const result = quest(tmp3[9]).manuallyStartConsoleQuest(quest.id);
let obj = quest(tmp3[9]);
const nextPromise = result.then((errorHints) => outer1_2(errorHints.errorHints));
result.then((errorHints) => outer1_2(errorHints.errorHints)).catch((arg0) => {
outer1_2([]);
outer1_1.error("Failed to start console quest", arg0);
2026-07-25 08:10:48 +00:00
let obj = sourceQuestContent(3832);
2026-07-20 16:05:17 +00:00
obj = { key: "START_DEFIBRILLATOR_ERROR" };
2026-07-23 10:11:24 +00:00
const intl = quest(1212).intl;
obj.content = intl.string(quest(1212).t.CKsXk3);
2026-07-25 08:10:48 +00:00
obj.icon = sourceQuestContent(9104);
2026-07-20 16:05:17 +00:00
obj.open(obj);
2026-07-23 10:11:24 +00:00
}).finally(() => outer1_3(false));
2026-07-20 16:05:17 +00:00
}, items)
};
return obj;
2026-07-23 10:11:24 +00:00
})(quest),
2026-07-20 16:05:17 +00:00
step: tmp6,
stepActions: tmp7,
showMicrophone: tmp11,
handleTaskSelect(arg0) {
2026-07-23 10:11:24 +00:00
if (arg0 === outer1_9.CONSOLE) {
2026-07-25 08:10:48 +00:00
let DESELECT_PLATFORM = quest(5959).QuestContentCTA.SELECT_CONSOLE_PLATFORM;
2026-07-23 10:11:24 +00:00
} else if (arg0 === outer1_9.DESKTOP) {
2026-07-25 08:10:48 +00:00
DESELECT_PLATFORM = quest(5959).QuestContentCTA.SELECT_DESKTOP_PLATFORM;
2026-07-20 16:05:17 +00:00
} else {
2026-07-25 08:10:48 +00:00
DESELECT_PLATFORM = quest(5959).QuestContentCTA.DESELECT_PLATFORM;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
let obj = quest(9406);
if (obj.shouldMigrateToAdAnalyticsInterface(quest(9406).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_bottom_sheet")) {
obj = { type: quest(9408).AdUserActionType.CLICK_INTERNAL, adCreativeType: quest(5960).AdCreativeType.QUEST, adCreativeId: quest.id, questContentCTA: DESELECT_PLATFORM, surfaceId: quest(4980).QuestContent.QUEST_BOTTOM_SHEET, sourceQuestContent, impressionId: _slicedToArray };
quest(9407).captureAdUserAction(obj);
const obj3 = quest(9407);
2026-07-20 16:05:17 +00:00
} else {
2026-07-25 08:10:48 +00:00
obj = { questId: quest.id, questContent: quest(4980).QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: DESELECT_PLATFORM, sourceQuestContent };
2026-07-23 10:11:24 +00:00
dependencyMap(obj);
2026-07-20 16:05:17 +00:00
}
React(arg0);
}
};
return obj;
}
class QuestBottomSheetContent {
constructor(arg0) {
({ defibrillator, quest } = global);
flag = global.showMicrophone;
if (flag === undefined) {
flag = false;
}
sourceQuestContent = global.sourceQuestContent;
step = global.step;
2026-07-23 10:11:24 +00:00
c2 = undefined;
obj = require("useIsMobileQuestDockRenderedBase");
2026-07-20 16:05:17 +00:00
hasWatchVideoOnMobileTasks = obj.useHasWatchVideoOnMobileTasks(quest.config);
2026-07-23 10:11:24 +00:00
c2 = hasWatchVideoOnMobileTasks;
2026-07-20 16:05:17 +00:00
items = [, , ];
items[0] = quest;
items[1] = hasWatchVideoOnMobileTasks;
items[2] = sourceQuestContent;
obj = {};
tmp5 = step === jsxs.TASK_SELECT;
memo = closure_4.useMemo(() => {
if (hasWatchVideoOnMobileTasks) {
let obj = { quest, sourceQuestContent };
2026-07-23 10:11:24 +00:00
let tmp5Result = outer1_10(quest(hasWatchVideoOnMobileTasks[30]).QuestBottomSheetProgressCardWatchTask, obj);
2026-07-20 16:05:17 +00:00
} else {
obj = quest(hasWatchVideoOnMobileTasks[19]);
const tmp8 = quest(hasWatchVideoOnMobileTasks[30]);
if (isInGameQuestResult) {
obj = { quest, sourceQuestContent };
tmp5Result = tmp5(tmp8.QuestBottomSheetProgressCardInGameTask, obj);
} else {
const obj1 = { quest, sourceQuestContent };
tmp5Result = tmp5(tmp8.QuestBottomSheetProgressCardPlayStreamTask, obj1);
}
2026-07-23 10:11:24 +00:00
isInGameQuestResult = obj.isInGameQuest(quest);
2026-07-20 16:05:17 +00:00
}
return tmp5Result;
}, items);
tmp3 = jsxs;
tmp4 = Fragment;
if (tmp5) {
tmp6 = jsx;
2026-07-23 10:11:24 +00:00
tmp7 = sourceQuestContent;
tmp8 = c2;
2026-07-20 16:05:17 +00:00
num = 31;
obj1 = {};
obj1.onTaskSelect = global.handleTaskSelect;
2026-07-23 10:11:24 +00:00
tmp5 = jsx(require("QuestBottomSheetTaskSelect"), obj1);
2026-07-20 16:05:17 +00:00
}
items1 = [, , ];
items1[0] = tmp5;
tmp9 = step === jsxs.CONSOLE_CONNECT;
if (tmp9) {
tmp10 = jsx;
2026-07-23 10:11:24 +00:00
tmp11 = sourceQuestContent;
tmp12 = c2;
2026-07-20 16:05:17 +00:00
num2 = 32;
obj2 = {};
obj2.quest = quest;
obj2.step = step;
obj2.sourceQuestContent = sourceQuestContent;
2026-07-23 10:11:24 +00:00
tmp9 = jsx(require("NonInlineConsoleConnection"), obj2);
2026-07-20 16:05:17 +00:00
}
items1[1] = tmp9;
tmp14Result = step === jsxs.TASK_STATUS;
if (tmp14Result) {
obj3 = {};
items2 = [, ];
items2[0] = memo;
tmp14 = jsxs;
tmp15 = View;
if (flag) {
flag = !hasWatchVideoOnMobileTasks;
}
if (flag) {
obj4 = {};
obj4.quest = quest;
tmp18 = null;
errorHints = undefined;
tmp16 = jsx;
tmp17 = MicrophoneUnit;
if (null != defibrillator) {
errorHints = defibrillator.errorHints;
}
obj4.errorHints = errorHints;
flag = tmp16(tmp17, obj4);
}
items2[1] = flag;
obj3.children = items2;
tmp14Result = tmp14(tmp15, obj3);
}
items1[2] = tmp14Result;
obj.children = items1;
return tmp3(tmp4, obj);
}
}
function MicrophoneUnit(arg0) {
let errorHints;
let quest;
({ quest, errorHints } = arg0);
2026-07-23 10:11:24 +00:00
const tmp = callback3();
2026-07-27 11:26:19 +00:00
let obj = require(10428) /* _createForOfIteratorHelperLoose */;
2026-07-20 16:05:17 +00:00
let length;
if (null != errorHints) {
length = errorHints.length;
}
let num = 0;
if (null != length) {
num = length;
}
if (num > 0) {
if (null != errorHints) {
const items = [];
const arraySpreadResult = HermesBuiltin.arraySpread(errorHints.map((message) => message.message), 0);
items[arraySpreadResult] = obj.useQuestHowToHelpArticle().message;
const sum = arraySpreadResult + 1;
let items3 = items;
}
obj = { style: tmp.microphoneUnit };
obj = { style: tmp.microphoneUnitHeader };
let obj1 = {};
let str = "text-feedback-warning";
if (tmp3) {
str = "text-feedback-critical";
}
obj1.color = str;
2026-07-25 08:10:48 +00:00
const items1 = [closure_10(require(7570) /* WarningIcon */.WarningIcon, obj1), ];
2026-07-23 10:11:24 +00:00
const obj2 = { variant: "text-md/medium", color: "mobile-text-heading-primary" };
const intl2 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
if (tmp3) {
const obj3 = { gameTitle: quest.config.messages.gameTitle };
2026-07-23 10:11:24 +00:00
let formatToPlainStringResult = intl2.formatToPlainString(tmp21(1212).t["28Ql27"], obj3);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
formatToPlainStringResult = intl2.string(tmp21(1212).t.YstzGO);
2026-07-20 16:05:17 +00:00
}
obj2.children = formatToPlainStringResult;
2026-07-25 08:10:48 +00:00
items1[1] = closure_10(require(4127) /* Text */.Text, obj2);
2026-07-20 16:05:17 +00:00
obj.children = items1;
2026-07-23 10:11:24 +00:00
const items2 = [closure_11(View, obj), items3.map((children) => outer1_10(outer1_0(outer1_2[35]).Text, { variant: "text-sm/normal", children }, arg1))];
2026-07-20 16:05:17 +00:00
obj.children = items2;
return closure_11(View, obj);
}
2026-07-25 08:10:48 +00:00
obj1 = require(5953) /* _createForOfIteratorHelperLoose */;
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
if (isSponsoredPlayQuestResult) {
2026-07-23 10:11:24 +00:00
let stringResult = intl.string(tmp5(1212).t.bUyEZZ);
2026-07-20 16:05:17 +00:00
} else {
const obj4 = { gameTitle: quest.config.messages.gameTitle };
2026-07-23 10:11:24 +00:00
stringResult = intl.formatToPlainString(tmp5(1212).t.GXqvC1, obj4);
2026-07-20 16:05:17 +00:00
}
items3 = [stringResult];
}
2026-07-23 10:11:24 +00:00
({ QuestsExperimentLocations: closure_8, QuestTaskPlatform: closure_9 } = QuestsExperimentLocations);
({ jsx: closure_10, jsxs: closure_11, Fragment: closure_12 } = jsxProd);
2026-07-20 16:05:17 +00:00
let obj = { TASK_SELECT: "TASK_SELECT", CONSOLE_CONNECT: "CONSOLE_CONNECT", TASK_STATUS: "TASK_STATUS" };
2026-07-23 10:11:24 +00:00
obj = { contentContainer: { display: "flex", paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16, gap: require("_createForOfIteratorHelperLoose").space.PX_24 } };
_createForOfIteratorHelperLoose = { display: "flex", gap: require("_createForOfIteratorHelperLoose").space.PX_8, marginHorizontal: -require("_createForOfIteratorHelperLoose").space.PX_16, paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16, marginTop: require("_createForOfIteratorHelperLoose").space.PX_16, paddingTop: require("_createForOfIteratorHelperLoose").space.PX_16, borderTopWidth: 1, borderTopColor: require("_createForOfIteratorHelperLoose").colors.BORDER_SUBTLE };
obj.microphoneUnit = _createForOfIteratorHelperLoose;
let obj3 = { display: "flex", flexDirection: "row", alignItems: "center", gap: require("_createForOfIteratorHelperLoose").space.PX_8 };
2026-07-21 22:01:30 +00:00
obj.microphoneUnitHeader = obj3;
2026-07-23 10:11:24 +00:00
let closure_14 = _createForOfIteratorHelperLoose.createStyles(obj);
2026-07-20 16:05:17 +00:00
const context = importDefaultResult.createContext({ isInQuestBottomSheet: false });
2026-07-23 10:11:24 +00:00
let obj1 = { display: "flex", paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16, gap: require("_createForOfIteratorHelperLoose").space.PX_24 };
let result = require("get ActivityIndicator").fileFinishedImporting("modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function QuestBottomSheetConnected(questContentPosition) {
2026-07-23 10:11:24 +00:00
let importDefault;
let require;
2026-07-20 16:05:17 +00:00
let sourceQuestContent;
2026-07-23 10:11:24 +00:00
({ questId: require, initialStep: importDefault, sourceQuestContent } = questContentPosition);
let obj = require(sourceQuestContent[17]);
const items = [_isNativeReflectConstruct];
const stateFromStores = obj.useStateFromStores(items, () => outer1_7.getQuest(closure_0));
2026-07-20 16:05:17 +00:00
let tmp2 = null;
if (null != stateFromStores) {
obj = {
overrideVisibility: true,
questOrQuests: stateFromStores,
2026-07-23 10:11:24 +00:00
questContent: require(sourceQuestContent[15]).QuestContent.QUEST_BOTTOM_SHEET,
2026-07-20 16:05:17 +00:00
questContentPosition: questContentPosition.questContentPosition,
sourceQuestContent,
children() {
2026-07-23 10:11:24 +00:00
return outer1_10(outer1_16, { quest: stateFromStores, initialStep: closure_1, sourceQuestContent });
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
tmp2 = callback2(require(sourceQuestContent[18]).QuestContentImpressionTrackerNative, obj);
2026-07-20 16:05:17 +00:00
}
return tmp2;
};
export const QuestBottomSheetStep = obj;
export { useEnrolledQuestContentProps };
export { QuestBottomSheetContent };
export const QuestBottomSheetContext = context;