Files
discord-decomp/sources/modules/quests/native/VideoQuestModal/VideoQuestModalContentInProgress.tsx
T
2026-07-27 16:20:00 +03:00

609 lines
42 KiB
TypeScript

/* Metro module 13601; source: modules/quests/native/VideoQuestModal/VideoQuestModalContentInProgress.tsx; dependencies: [57, 31, 27, 6528, 482, 33, 674, 697, 4501, 477, 9495, 9511, 13602, 13605, 13573, 4017, 4504, 1585, 6618, 3868, 13618, 8141, 13619, 13598, 13622, 4572, 5278, 4573, 13623, 5475, 1305, 9505, 8341, 1244, 9176, 11906, 9483, 9522, 4589, 13625, 13620, 4578, 11905, 13526, 13524, 9798, 8638, 13597, 4080, 13626, 1962, 9513, 7114, 9519, 9517, 9518, 7121, 7120, 6531, 7110, 9212, 13627, 9480, 13628, 6535, 2] */
function _fun103352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:6, offset: 0x0226385e, size: 800 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.StyleSheet;
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_8 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const env0_11 = {'x': 0, 'y': 0};
const env0_12 = {'x': 0, 'y': 1};
const value4 = importDefault(674) /* metro dependency 674 */;
let PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
const value6 = value4(PLUM_23).alpha(0.4);
object = [value6.hex()];
const value8 = value4;
PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
const value10 = value8(PLUM_23).alpha(0);
object[1] = value10.hex();
const value11 = value4;
PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
object = [value11(PLUM_23).alpha(0).hex()];
const value15 = value4;
PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
const value17 = value15(PLUM_23).alpha(0.4);
object[1] = value17.hex();
const env0_15 = {'bottom': 158, 'top': 64, 'left': 16, 'right': 16};
const env0_16 = {'bottom': 16, 'left': 16, 'right': 16};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
const env0_17 = Reflect.apply(createStyles, createStylesModule, [_fun103353]);
object = {code: 'function VideoQuestModalContentInProgressTsx1(){const{withDelay,LOGO_REWARD_TRANSITION_DELAY_MS,withTiming,isComponentMounted,LOGO_REWARD_TRANSITION_DURATION_MS}=this.__closure;return withDelay(LOGO_REWARD_TRANSITION_DELAY_MS,withTiming(isComponentMounted.get(),{duration:LOGO_REWARD_TRANSITION_DURATION_MS}));}'};
object = {code: 'function VideoQuestModalContentInProgressTsx2(){const{animation}=this.__closure;return{opacity:animation.get()};}'};
object = {code: 'function VideoQuestModalContentInProgressTsx3(){const{animation}=this.__closure;return{opacity:1-animation.get()};}'};
object = {code: "function VideoQuestModalContentInProgressTsx4(){const{animation}=this.__closure;return{pointerEvents:animation.get()>0.3?'auto':'none'};}"};
const env0_22 = value.memo(_fun103354);
const env0_23 = value.memo(_fun103362);
const value19 = createStylesModule;
createStyles = value19.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_24 = Reflect.apply(createStyles, value19, [{footerButton: {padding: PX_8}}]);
const env0_25 = value.forwardRef(FooterButton);
value = value.memo(VideoQuestModalContentInProgress);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentInProgress.tsx');
exports.default = value;
}
function _fun103353(a0) { // fn#103353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:590, offset: 0x02263b7e, size: 1081 bytes, params: 2, frame: 20
const object2 = {};
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.wrapper = {backgroundColor: BACKGROUND_BASE_LOWEST, flex: 1};
const object4 = {};
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const value2 = 'center';
object4.justifyContent = a0 ? 'flex-start' : value2;
object2.wrapperPortrait = object4;
object2.videoLandscape = {'width': '100%', 'position': 'relative'};
object2.videoLandscape9by16 = {aspectRatio: 1.7777777777777777};
object2.videoLandscapeFullscreen = {'flexGrow': 1, 'flexShrink': 1};
const object8 = {'borderRadius': null, 'flexGrow': 0, 'flexShrink': 0, 'overflow': 'hidden'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.videoWrapper = object8;
const object9 = {flexGrow: 1};
object9.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object9.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object2.videoWrapperLandscape = object9;
const object12 = {};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
object2.videoWrapperFullscreen = object12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.videoContentWrapper = {'flexDirection': 'column', 'pointerEvents': 'box-none', 'flexGrow': 1,
'flexShrink': 0, 'justifyContent': 'space-between', padding: PX_16};
object2.videoContentWrapperLandscape = {padding: 0};
const object15 = {};
copyDataProperties(object15, StyleSheet.absoluteFillObject, PX_16);
object2.videoContentWrapperPortrait = object15;
object2.rewardContainer = {'justifyContent': 'center', 'flex': 1};
const object16 = {};
copyDataProperties(object16, StyleSheet.absoluteFillObject, PX_16);
object16['alignItems'] = value2;
object16['justifyContent'] = value2;
object2.rewardContentCentered = object16;
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.modalBackground = {backgroundColor: BACKGROUND_BASE_LOWEST};
const object20 = {borderTopWidth: 1};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object20.borderColor = BACKGROUND_MOD_STRONG;
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object20.paddingHorizontal = PX_162;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object20.paddingTop = PX_24;
object2.questDetailsLandscape = object20;
object2.questDetailsPrimary = {'flexGrow': 0, 'flexShrink': 1};
object2.questDetailsSecondary = {'flexGrow': 0, 'flexShrink': 0};
const object22 = {};
const PX_163 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object22.paddingHorizontal = PX_163;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object22.paddingVertical = PX_8;
object2.footer = object22;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.icon = {color: INTERACTIVE_TEXT_ACTIVE};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.iconDisabled = {color: INTERACTIVE_TEXT_DEFAULT};
const object24 = {position: 'absolute'};
const PX_164 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object24.top = PX_164;
const PX_165 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object24.left = PX_165;
object2.closeButtonLandscape = object24;
const object25 = {};
copyDataProperties(object25, StyleSheet.absoluteFillObject, PX_16);
object25['bottom'] = undefined;
object25['height'] = 70;
object2.gradientTop = object25;
const object26 = {};
copyDataProperties(object26, StyleSheet.absoluteFillObject, PX_16);
object26['top'] = undefined;
object26['height'] = 150;
object2.gradientBottom = object26;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
'textShadowRadius': 15, textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}};
const object27 = {'borderRadius': null, 'flexGrow': 1, 'flexShrink': 1};
object27.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.ctaPrimary = object27;
object2.viewRewardBtn = {marginRight: 'auto'};
const object28 = {'borderRadius': null, 'height': 96, 'width': '100%'};
object28.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.playerThumbnail = object28;
object2.cloudsBackground = {zIndex: -1};
object2.questDetailsSubheader = {opacity: 0.6};
return object2;
}
function _fun103354({quest, captionsEnabled, handleClose, handlePrimaryCtaPress, handleShareQuest, handleOpenTranscript, handleToggleCaptions, isFullscreen, onNavigateToPostWatchVideo, onEnd, setIsFullscreen, externallyPaused, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset, isShareable}) { // fn#103354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:3442, offset: 0x02263fb7, size: 2692 bytes, params: 2, frame: 53
var r8;
var object7;
var ReanimatedNativeView;
var rewardContentCentered;
var items8;
var ReanimatedNativeView2;
var object;
var items9;
var items10;
var QuestGameLogotype;
var moduleValue9;
var items11;
var Stack;
var object2;
var space;
var Stack2;
var object3;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var config;
var messages;
var items12;
var items14;
var Stack3;
var object4;
var items15;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_4 = undefined;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const styles = useStyles(platformUtilsModule.isAndroid());
let binding = env0_4;
const value3 = binding.useMemo(_fun103355, [quest]);
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
const VideoQuestPlayerRefactorExperiment = (require(9511) /* metro dependency 9511: experiments */).VideoQuestPlayerRefactorExperiment;
const useConfig = VideoQuestPlayerRefactorExperiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const VideoQuestPlayer = Reflect.apply(useConfig, VideoQuestPlayerRefactorExperiment,
[{location: VIDEO_MODAL_MOBILE}]).enabled ? (require(13602) /* metro dependency 13602: VideoQuestPlayerRefactor */).VideoQuestPlayer : (require(13605) /* metro dependency 13605: VideoQuestPlayer */).VideoQuestPlayer;
binding = env0_4;
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
binding.useEffect(_fun103356, [value5]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = F_103357;
closure.__closure = {withDelay: reanimatedRexportModule.withDelay, LOGO_REWARD_TRANSITION_DELAY_MS: 3000,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, isComponentMounted: value5,
LOGO_REWARD_TRANSITION_DURATION_MS: 1000};
closure.__workletHash = 12561024953493;
closure.__initData = env0_18;
const value6 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue4 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = G_103358;
closure.__closure = {animation: value6};
closure.__workletHash = 17463485679217;
closure.__initData = env0_19;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = j_103359;
closure.__closure = {animation: value6};
closure.__workletHash = 9103187579788;
closure.__initData = env0_20;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedProps = moduleValue6.useAnimatedProps;
closure = U_103360;
closure.__closure = {animation: value6};
closure.__workletHash = 11833431315705;
closure.__initData = env0_21;
const value9 = Reflect.apply(useAnimatedProps, moduleValue6, [closure]);
const value10 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value11 = binding.useCallback(function({orientation}) {
setIsFullscreen((isFullscreen || orientation !== 'landscape' ? 'PORTRAIT' : 'LANDSCAPE') === 'LANDSCAPE');
}, [isFullscreen, setIsFullscreen]);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items2 = [styles.videoWrapper];
items2[1] = styles.videoWrapperLandscape;
items2[2] = isFullscreen && styles.videoWrapperFullscreen;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARKER = ThemeTypes.DARKER;
const value12 = !isFullscreen;
const themeContextProvider = <ThemeContextProvider theme={DARKER}><VideoQuestPlayer captionsEnabled={captionsEnabled} orientation="landscape" style={[styles.videoLandscape,
isFullscreen ? value12 : styles.videoLandscape9by16,
isFullscreen && styles.videoLandscapeFullscreen]} contentInsets={env0_16} handleOpenTranscript={handleOpenTranscript} handleToggleCaptions={handleToggleCaptions} isFullscreen={isFullscreen} externallyPaused={externallyPaused} onEnd={onEnd} onToggleFullscreen={value11} sourceQuestContent={sourceQuestContent} hasCaptionAsset={hasCaptionAsset} hasTranscriptAsset={hasTranscriptAsset} />{((Component) => <Component onClose={handleClose} style={[styles.closeButtonLandscape,
isFullscreen && value10 != null && ({left: value10.left})]} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}</ThemeContextProvider>;
if (isFullscreen) {
r8 = value12;
} else {
var viewProps = {style: [styles.videoContentWrapper, styles.videoContentWrapperLandscape]};
var viewBinding2Props = {style: styles.rewardContainer};
ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
rewardContentCentered = styles.rewardContentCentered;
items8 = [<ReanimatedNativeView style={[rewardContentCentered,
value7]} animatedProps={value9}>{((Component) => <Component />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)}</ReanimatedNativeView>];
ReanimatedNativeView2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
object = {};
rewardContentCentered = styles.rewardContentCentered;
items9 = [rewardContentCentered];
items9[1] = platformUtilsModule.isAndroid() && styles.modalBackground;
items9[2] = value8;
object.style = items9;
object.pointerEvents = 'none';
items10 = [(require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && ((Component) => <Component align="top" style={styles.cloudsBackground} />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */)];
QuestGameLogotype = importDefault(13622) /* metro dependency 13622: QuestGameLogotype */;
moduleValue9 = require(9495) /* metro dependency 9495: AssetUtils */;
items10[1] = <QuestGameLogotype assetUrl={moduleValue9.getQuestAsset(quest,
(require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.LOGO_TYPE,
'dark').url} maxHeight={90} maxWidth={windowDimensions.get().width - 120} />;
items8[1] = <ReanimatedNativeView2 {...object}>{items10}</ReanimatedNativeView2>;
items11 = [<View {...viewBinding2Props}>{items8}</View>];
items11[1] = ((Component) => <Component align="top" style={styles.cloudsBackground} />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */);
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object2 = {direction: 'vertical'};
space = (importDefault(697) /* metro dependency 697: native */).space;
object2.spacing = space.PX_24;
object2.style = styles.questDetailsLandscape;
Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object3 = {'direction': 'horizontal', 'justify': 'space-between'};
space = (importDefault(697) /* metro dependency 697: native */).space;
object3.spacing = space.PX_8;
var pressableOpacityProps = {style: styles.questDetailsPrimary, onPress: handlePrimaryCtaPress};
config = quest.config;
messages = config.messages;
items12 = [<Text variant="heading-lg/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{messages.gameTitle}</Text>];
config = quest.config;
messages = config.messages;
items12[1] = <Text variant="heading-sm/semibold" color="text-subtle">{messages.gamePublisher}</Text>;
items14 = [<Stack2 {...object3}><PressableOpacity {...pressableOpacityProps}>{items12}</PressableOpacity><View style={styles.questDetailsSecondary}>{((Component) => <Component quest={quest} location={QuestsExperimentLocations.VIDEO_MODAL_MOBILE} sourceQuestContent={sourceQuestContent} />)(importDefault(13623) /* metro dependency 13623: QuestContextMenu */)}</View></Stack2>];
items14[1] = value3 != null && <PressableOpacity onPress={handlePrimaryCtaPress}>{((Component) => <Component source={{uri: value3.url}} style={styles.playerThumbnail} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity>;
Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
object4 = {direction: 'horizontal'};
space = (importDefault(697) /* metro dependency 697: native */).space;
object4.spacing = space.PX_16;
items15 = [((ShinyButton) => <ShinyButton onPress={handlePrimaryCtaPress} style={styles.ctaPrimary} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} />)((require(1305) /* metro dependency 1305: native */).ShinyButton)];
items15[1] = isShareable && <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} icon={importDefault(9176) /* metro dependency 9176 */} onPress={handleShareQuest} variant="secondary" />;
items15[2] = value4 && <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)} icon={importDefault(11906) /* metro dependency 11906 */} onPress={onNavigateToPostWatchVideo} variant="secondary" />;
items14[2] = <Stack3 {...object4}>{items15}</Stack3>;
items11[2] = <Stack {...object2}>{items14}</Stack>;
r8 = <View {...viewProps}>{items11}</View>;
}
return (
<SafeAreaPaddingView bottom style={styles.wrapper}>
<View style={items2}>
{themeContextProvider}
{r8}
</View>
</SafeAreaPaddingView>
);
}
function _fun103362({quest, captionsEnabled, handleClose, handlePrimaryCtaPress, handleRewardDetailsPress, handleShareQuest, handleOpenTranscript, handleToggleCaptions, isFullscreen, onNavigateToPostWatchVideo, onEnd, externallyPaused, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset, isShareable}) { // fn#103362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:7534, offset: 0x02264b82, size: 2385 bytes, params: 2, frame: 57
var r16;
var Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_3 = undefined;
var env0_4 = undefined;
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
const videoQuestProgressRemainingAccessibilityLabel = (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value3,
value4);
const VideoQuestPlayerRefactorExperiment = (require(9511) /* metro dependency 9511: experiments */).VideoQuestPlayerRefactorExperiment;
const useConfig = VideoQuestPlayerRefactorExperiment.useConfig;
let VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const VideoQuestPlayer = Reflect.apply(useConfig, VideoQuestPlayerRefactorExperiment,
[{location: VIDEO_MODAL_MOBILE}]).enabled ? (require(13602) /* metro dependency 13602: VideoQuestPlayerRefactor */).VideoQuestPlayer : (require(13605) /* metro dependency 13605: VideoQuestPlayer */).VideoQuestPlayer;
let binding = env0_4;
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
const value6 = binding.useMemo(function() {
var Math = global.Math;
return Math.floor(windowDimensions.get().width / 0.5625);
}, [windowDimensions]);
const value7 = binding.useCallback(function() {
}, []);
const value8 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
var [property, env0_4] = env0_3(binding.useState(64), 2);
const value11 = binding.useCallback(_fun103365, []);
const value12 = binding.useMemo(_fun103366, [value6, property, windowDimensions, value8]);
const get = windowDimensions.get;
const styles = useStyles(Reflect.apply(get, windowDimensions, []).height - value12 - property < 200);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items5 = [styles.wrapper];
items5[1] = styles.wrapperPortrait;
const items2 = [styles.videoWrapper];
items2[1] = value12 == null ? {flexGrow: 1} : {height: value12};
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARKER = ThemeTypes.DARKER;
const items3 = [<ThemeContextProvider theme={DARKER}><VideoQuestPlayer captionsEnabled={captionsEnabled} onLoad={value7} externallyPaused={externallyPaused} orientation="portrait" contentInsets={env0_15} handleOpenTranscript={handleOpenTranscript} handleToggleCaptions={handleToggleCaptions} isFullscreen={isFullscreen} onEnd={onEnd} sourceQuestContent={sourceQuestContent} hasCaptionAsset={hasCaptionAsset} hasTranscriptAsset={hasTranscriptAsset} /></ThemeContextProvider>];
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
binding = env0_11;
const binding2 = env0_12;
items3[1] = ((Component) => <Component start={binding} end={binding2} style={styles.gradientTop} colors={env0_13} />)(defaultImport);
items3[2] = ((Component) => <Component start={binding} end={binding2} style={styles.gradientBottom} colors={env0_14} />)(defaultImport);
const items4 = [styles.videoContentWrapper];
items4[1] = styles.videoContentWrapperPortrait;
const VideoQuestModalHeader = importDefault(13625) /* metro dependency 13625: VideoQuestModalHeader */;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const videoQuestModalHeader = <VideoQuestModalHeader closeButtonIconColor={WHITE} onClose={handleClose} showCurrentVideoTime withTextShadow />;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const stack = <Stack2 direction="horizontal" justify="space-between" spacing={PX_8}><PressableOpacity style={styles.questDetailsPrimary} onPress={handlePrimaryCtaPress}><Text variant="heading-lg/semibold" color="white" style={styles.textShadow} accessibilityRole="header">{quest.config.messages.gameTitle}</Text><Text variant="heading-sm/semibold" color="white" style={[styles.textShadow,
styles.questDetailsSubheader]}>{quest.config.messages.gamePublisher}</Text></PressableOpacity><View style={styles.questDetailsSecondary}>{((Component) => <Component quest={quest} size="x-sm" progress={value3.percentComplete} hasConfetti onPress={handleRewardDetailsPress} accessibilityLabel={videoQuestProgressRemainingAccessibilityLabel} />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}</View></Stack2>;
const ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
items3[3] = <View style={items4}>{videoQuestModalHeader}<Stack direction="vertical" spacing={PX_24}>{stack}<ShinyButton onPress={handlePrimaryCtaPress} style={styles.ctaPrimary} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} /></Stack></View>;
const view = <View style={items2}>{items3}</View>;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
if (value4) {
var viewBindingProps = {style: styles.viewRewardBtn};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r16 = <View {...viewBindingProps}><Button icon={((ArrowSmallRightIcon) => <ArrowSmallRightIcon size="sm" />)((require(11905) /* metro dependency 11905: ArrowSmallRightIcon */).ArrowSmallRightIcon)} iconPosition="end" onPress={onNavigateToPostWatchVideo} variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+'])} /></View>;
} else {
r16 = value4;
}
const r11 = hasTranscriptAsset && ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KCzjTi)} onPress={handleOpenTranscript}>{((TranscriptOutlineIcon) => <TranscriptOutlineIcon color={styles.iconDisabled.color} />)((require(13526) /* metro dependency 13526: TranscriptOutlineIcon */).TranscriptOutlineIcon)}</Component>)(env0_25);
const r10 = hasCaptionAsset && ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bDSZO1)} onPress={handleToggleCaptions}>{((ClosedCaptionsOutlineIcon) => <ClosedCaptionsOutlineIcon color={captionsEnabled ? styles.icon.color : styles.iconDisabled.color} />)((require(13524) /* metro dependency 13524: ClosedCaptionsOutlineIcon */).ClosedCaptionsOutlineIcon)}</Component>)(env0_25);
const r9 = isShareable && ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={handleShareQuest}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</Component>)(env0_25);
const QuestContextMenu = importDefault(13623) /* metro dependency 13623: QuestContextMenu */;
VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
return (
<SafeAreaPaddingView bottom style={items5}>
{view}
<Stack
direction="horizontal"
justify="flex-end"
align="center"
style={styles.footer}
spacing={PX_4}
onLayout={value11}
>
{r16}
{r11}
{r10}
{r9}
<QuestContextMenu
quest={quest}
location={VIDEO_MODAL_MOBILE}
sourceQuestContent={sourceQuestContent}
>
{children_103367}
</QuestContextMenu>
</Stack>
</SafeAreaPaddingView>
);
}
function FooterButton(a0, a1) { // fn#103368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11267, offset: 0x0226563d, size: 93 bytes, params: 3, frame: 15
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
accessibilityRole="button"
style={styles.footerButton}
{...a0}
{...{['ref']: a1}}
/>
);
}
function VideoQuestModalContentInProgress({isFullscreen, onClose, onNavigateToPostWatchVideo, onEnd, setIsFullscreen, sourceQuestContent}) { // fn#103369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11414, offset: 0x0226569a, size: 687 bytes, params: 2, frame: 35
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const binding = env0_4;
const value2 = binding.useMemo(_fun103370, [quest]);
const value3 = binding.useMemo(_fun103371, [quest]);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_2 = value5[1];
const value6 = binding.useCallback(_fun103372, []);
const value7 = binding.useCallback(_fun103374, [quest]);
const value8 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value9[0];
var env0_4 = value9[1];
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
const value10 = binding.useCallback(_fun103375, [isShareableQuest2, quest.id, value8, sourceQuestContent]);
const value11 = (require(13627) /* metro dependency 13627: useVideoQuestClickCtaAndMaybeCloseModal */).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
onClose: onClose, sourceQuestContent: sourceQuestContent, impressionId: value8});
const value12 = binding.useCallback(_fun103378, [quest.id]);
const value13 = (require(13628) /* metro dependency 13628: useVideoExternallyPaused */).useVideoExternallyPaused(quest.id,
property2);
const tasks = quest.config.taskConfigV2.tasks;
const FirstPartyQuestTaskTypes = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypes;
const WATCH_VIDEO_ON_MOBILE = FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE;
const property3 = tasks[WATCH_VIDEO_ON_MOBILE];
let r1 = property3 == null || (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoOrientation(property3) === 'portrait';
r1 = r1 ? env0_23 : env0_22;
return ((Component) => <Component quest={quest} captionsEnabled={property} handleClose={onClose} handlePrimaryCtaPress={value11} handleRewardDetailsPress={value12} handleShareQuest={value10} handleOpenTranscript={value7} handleToggleCaptions={value6} isFullscreen={isFullscreen} onNavigateToPostWatchVideo={onNavigateToPostWatchVideo} onEnd={onEnd} setIsFullscreen={setIsFullscreen} externallyPaused={value13} sourceQuestContent={sourceQuestContent} hasCaptionAsset={value2 != null} hasTranscriptAsset={value3 != null} isShareable={isShareableQuest2} />)(r1);
}
function _fun103355() { // fn#103355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:3790, offset: 0x02264a3b, size: 67 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const HERO = QuestAssetType.HERO;
return Reflect.apply(getQuestAsset, value, [questBinding, HERO]);
}
function _fun103356() { // fn#103356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4166, offset: 0x02264a7e, size: 24 bytes, params: 1, frame: 11
env0_3.set(1);
}
function F_103357() { // fn#103357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4230, offset: 0x02264a96, size: 96 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const timingModule = require(4504) /* metro dependency 4504: timing */;
return Reflect.apply(withDelay, value, [3000, timingModule.withTiming(env0_3.get(), {duration: 1000})]);
}
function j_103359() { // fn#103359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4697, offset: 0x02264af6, size: 31 bytes, params: 1, frame: 10
const object2 = {};
object2.opacity = 1 - env0_4.get();
return object2;
}
function U_103360() { // fn#103360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4829, offset: 0x02264b15, size: 50 bytes, params: 1, frame: 10
let value = env0_4.get();
value = 'none';
return {pointerEvents: value > 0.3 ? 'auto' : value};
}
function _fun103365({nativeEvent}) { // fn#103365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:8375, offset: 0x0226550b, size: 36 bytes, params: 2, frame: 11
env0_4(nativeEvent.layout.height);
}
function _fun103366() { // fn#103366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:8429, offset: 0x0226552f, size: 80 bytes, params: 1, frame: 14
const Math = global.Math;
const min = Math.min;
const windowDimensionsBinding = windowDimensions;
const get = windowDimensionsBinding.get;
return Reflect.apply(min, Math, [Reflect.apply(get, windowDimensionsBinding,
[]).height - env0_2.top - env0_2.bottom - env0_3, env0_1]);
}
function children_103367(a0) { // fn#103367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:10980, offset: 0x0226557f, size: 190 bytes, params: 2, frame: 22
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const binding = env1_25;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PdRCRg = (require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg;
object2.accessibilityLabel = Reflect.apply(string, intl, [PdRCRg]);
object2.ref = ref;
copyDataProperties(object2, value2, value);
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
return ((Component) => <Component {...object2}><MoreHorizontalIcon color={TEXT_DEFAULT} /></Component>)(binding);
}
function _fun103370() { // fn#103370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11634, offset: 0x02265949, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_CAPTION = QuestAssetType.VIDEO_PLAYER_CAPTION;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_CAPTION, undefined, true]);
}
function _fun103371() { // fn#103371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11738, offset: 0x02265994, size: 75 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = value.getQuestAsset;
const questBinding = quest;
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
const VIDEO_PLAYER_TRANSCRIPT = QuestAssetType.VIDEO_PLAYER_TRANSCRIPT;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_TRANSCRIPT, undefined, true]);
}
function _fun103372() { // fn#103372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11889, offset: 0x022659df, size: 25 bytes, params: 1, frame: 11
return env0_2(function(a0) {
return !a0;
});
}
function _fun103374() { // fn#103374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11926, offset: 0x022659f8, size: 117 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[48]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[50]);
value = value(dependencyMap[49], dependencyMap.paths);
const questBinding = quest;
Reflect.apply(openLazy, defaultImport, [value, 'transcript-' + questBinding.id, {quest: questBinding}]);
}
function _fun103375() { // fn#103375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:12141, offset: 0x02265a6d, size: 516 bytes, params: 1, frame: 22
var environment;
var value2;
var moduleValue;
var object2;
var questBinding;
var id;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
var moduleValue3;
var captureAdUserAction;
var moduleValue4;
var showShareActionSheet;
var moduleValue5;
var getQuestUrl;
if (env0_5) {
value2 = environment.__proto__;
moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
if (moduleValue.shouldMigrateToAdAnalyticsInterface((require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
'video_quest_modal_in_progress')) {
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
captureAdUserAction = moduleValue3.captureAdUserAction;
object2 = {};
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
object2.adCreativeId = quest.id;
object2.questContentCTA = QuestContentCTA.MOBILE_SHARESHEET;
object2.surfaceId = QuestContent.VIDEO_MODAL_MOBILE;
object2.sourceQuestContent = sourceQuestContent;
object2.impressionId = env0_3;
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
} else {
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: quest.id,
questContent: QuestContent.VIDEO_MODAL_MOBILE, questContentCTA: QuestContentCTA.MOBILE_SHARESHEET,
impressionId: env0_3, sourceQuestContent: sourceQuestContent});
}
env0_4(true);
moduleValue4 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue4.showShareActionSheet;
object2 = {};
moduleValue5 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
getQuestUrl = moduleValue5.getQuestUrl;
questBinding = quest;
id = questBinding.id;
object2.message = Reflect.apply(getQuestUrl, moduleValue5, [id]);
id = questBinding.id;
Reflect.apply(showShareActionSheet, moduleValue4, [object2, 'Video Quest Modal - ' + id, undefined, _fun103376,
_fun103377]);
}
}
function _fun103378() { // fn#103378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:13063, offset: 0x02265c71, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openRewardDetailsBottomSheet({questId: quest.id});
}