Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,304 @@
/* Metro module 13596; source: modules/quests/native/VideoQuestModal/VideoQuestModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585, 8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121, 2] */
function _fun103329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:6, offset: 0x0226266f, size: 577 bytes, params: 8, frame: 29
var object3;
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 StyleSheet = value2.StyleSheet;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': true};
object3 = {WATCH_VIDEO: 0};
object3[0] = 'WATCH_VIDEO';
object3.POST_WATCH_VIDEO = 1;
object3[1] = 'POST_WATCH_VIDEO';
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object5 = {wrapper: {'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1, 'zIndex': 1}};
object5.contentWrapper = {flex: 1};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object7['backgroundColor'] = BACKGROUND_BASE_LOWEST;
object5.contentBackground = object7;
object5.modalContentWrapper = {zIndex: 2};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object8['flex'] = 1;
object8['overflow'] = 'hidden';
object8['pointerEvents'] = 'none';
object8['zIndex'] = 1;
object5.backgroundWrapper = object8;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object5]);
const env0_12 = {code: 'function VideoQuestModalTsx1(){const{withSpring,clamp,postWatchAnimationState,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG,interpolate,CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y}=this.__closure;return{opacity:withSpring(clamp(postWatchAnimationState.get(),0,1),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG),transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}]};}'};
const env0_13 = {code: 'function VideoQuestModalTsx2(){const{withSpring,interpolate,postWatchAnimationState,safeAreaInsets,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG}=this.__closure;return{transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[safeAreaInsets.top,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}],opacity:withSpring(postWatchAnimationState.get(),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)};}'};
const env0_14 = value.memo(_fun103330);
value = value.memo(VideoQuestModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModal.tsx');
exports.default = value;
exports.VideoQuestModalSteps = object3;
}
function _fun103330({onClose, initialStep, sourceQuestContent}) { // fn#103330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:1689, offset: 0x022628b0, size: 1314 bytes, params: 2, frame: 38
var object2;
var r12;
var value;
const {quest,
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
const env0_3 = videoSessionId;
const userStatus = quest.userStatus;
const value4 = userStatus?.completedAt != null;
let binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialStep ?? (value4 ? env0_10.POST_WATCH_VIDEO : env0_10.WATCH_VIDEO)]);
binding = env0_3;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_6 = value6[1];
const binding3 = env0_4;
useState = binding3.useState;
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property2 = value9[0];
const env0_7 = value9[1];
const value10 = binding3.useCallback(_fun103331, [quest.id, videoSessionId, sourceQuestContent]);
const useContext = binding3.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding3, [QuestDockGestureContext]).windowDimensions;
const styles = useStyles();
const height = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(windowDimensions).height;
binding3.useLayoutEffect(_fun103332, [value4, initialStep]);
let closure = _fun103333;
const value11 = binding3.useCallback(closure, []);
const value12 = binding3.useCallback(_fun103334, [value10]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
let POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value13 = Reflect.apply(useSharedValue, reanimatedRexportModule, [property !== POST_WATCH_VIDEO ? 0 : 1]);
const env0_9 = value13;
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = M_103335;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
clamp: reanimatedRexportModule.clamp, postWatchAnimationState: value13};
binding = env0_9;
object2.BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG = binding;
object2.interpolate = reanimatedRexportModule.interpolate;
object2.CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y = -100;
closure.__closure = object2;
closure.__workletHash = 11571705142399;
closure.__initData = env0_12;
const value14 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const value15 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
var env0_10 = value15;
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = U_103336;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
interpolate: reanimatedRexportModule.interpolate, postWatchAnimationState: value13, safeAreaInsets: value15,
BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG: binding};
closure.__workletHash = 9769051401109;
closure.__initData = env0_13;
const value16 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
env0_4.useEffect(_fun103337, [value13, property]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const view = <View style={[styles.backgroundWrapper,
{height: height}]}><ReanimatedNativeView style={[styles.contentBackground,
{top: value15.top}]} /><ReanimatedNativeView style={[styles.contentBackground,
value16]} /><ReanimatedNativeView style={value14}>{((Component) => <Component align="top" />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */)}</ReanimatedNativeView></View>;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items6 = [styles.wrapper];
items6[1] = {height: height};
const WATCH_VIDEO = env0_10.WATCH_VIDEO;
const items7 = [property === WATCH_VIDEO && ((Component) => <Component isFullscreen={property2} onNavigateToPostWatchVideo={value12} onClose={onClose} onEnd={value12} setIsFullscreen={value10} sourceQuestContent={sourceQuestContent} />)(importDefault(13601) /* metro dependency 13601: VideoQuestModalContentInProgress */)];
POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
const value21 = property === POST_WATCH_VIDEO;
if (value21) {
value = importDefault(13629) /* metro dependency 13629: VideoQuestModalContentCompleted */;
value = ((Component) => <Component onClose={onClose} onRestartVideo={value11} sourceQuestContent={sourceQuestContent} />)(value);
r12 = value;
} else {
r12 = value21;
}
items7[1] = r12;
return (
<View>
<ReanimatedNativeView style={styles.modalContentWrapper}>
{view}
<SafeAreaPaddingView top style={items6}>
<View style={styles.contentWrapper}>
{items7}
</View>
</SafeAreaPaddingView>
</ReanimatedNativeView>
</View>
);
}
function VideoQuestModal({questId, questContentPosition, onClose, videoSessionId, initialStep, sourceQuestContent}) { // fn#103338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4201, offset: 0x0226309a, size: 278 bytes, params: 2, frame: 22
const binding = sourceQuestContent;
const useCallback = binding.useCallback;
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useNonNullableQuest(questId,
Reflect.apply(useCallback, binding, [_fun103339, [onClose]]));
const value4 = binding.useMemo(_fun103340, [onClose, value3, videoSessionId, questContentPosition, initialStep,
sourceQuestContent]);
binding.useLayoutEffect(_fun103344, []);
if (value3 == null || value4 == null) {
return null;
} else {
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="watch_mobile_video_quest"
screens={value4}
/>
);
}
}
function _fun103331(a0) { // fn#103331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2018, offset: 0x02262dd2, size: 175 bytes, params: 2, frame: 17
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
const lockOrientation = deviceOrientationModule.lockOrientation;
if (a0) {
Reflect.apply(lockOrientation, deviceOrientationModule, ['LANDSCAPE', true]);
} else {
Reflect.apply(lockOrientation, deviceOrientationModule, ['PORTRAIT', true]);
}
env0_7(a0);
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEvent({questId: quest.id,
event: a0 ? AnalyticEvents.QUEST_VIDEO_FULLSCREEN_ENTERED : AnalyticEvents.QUEST_VIDEO_FULLSCREEN_EXITED,
properties: {video_session_id: videoSessionId}, sourceQuestContent: sourceQuestContent});
}
function _fun103332() { // fn#103332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2400, offset: 0x02262e81, size: 51 bytes, params: 1, frame: 12
var binding;
if (result && initialStep == null) {
binding = env0_6;
value = environment.__proto__;
binding(env1_10.POST_WATCH_VIDEO);
}
}
function _fun103333() { // fn#103333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2473, offset: 0x02262eb4, size: 29 bytes, params: 1, frame: 11
const binding = env0_6;
const WATCH_VIDEO = env1_10.WATCH_VIDEO;
binding(WATCH_VIDEO);
}
function _fun103334() { // fn#103334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2518, offset: 0x02262ed1, size: 40 bytes, params: 1, frame: 12
env0_8(false);
const binding = env0_6;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
binding(POST_WATCH_VIDEO);
}
function M_103335() { // fn#103335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2644, offset: 0x02262ef9, size: 196 bytes, params: 1, frame: 25
const object3 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const clamp = reanimatedRexportModule.clamp;
let binding = env0_9;
const value4 = Reflect.apply(clamp, reanimatedRexportModule, [binding.get(), 0, 1]);
binding = env1_9;
object3.opacity = Reflect.apply(withSpring, springModule, [value4, binding]);
const object4 = {};
value = springModule;
withSpring = value.withSpring;
const moduleValue3 = reanimatedRexportModule;
object4.translateY = Reflect.apply(withSpring, value, [moduleValue3.interpolate(env0_9.get(), [0, 1], [-100, 0]),
binding]);
object3.transform = [object4];
return object3;
}
function U_103336() { // fn#103336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3110, offset: 0x02262fbd, size: 174 bytes, params: 1, frame: 25
const object2 = {};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
let binding = env0_9;
let get = binding.get;
const value4 = Reflect.apply(interpolate, reanimatedRexportModule, [Reflect.apply(get, binding, []), [0, 1],
[env0_10.top, 0]]);
binding = env1_9;
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [value4, binding])}];
value = springModule;
withSpring = value.withSpring;
const binding2 = env0_9;
get = binding2.get;
object2.opacity = Reflect.apply(withSpring, value, [Reflect.apply(get, binding2, []), binding]);
return object2;
}
function _fun103337() { // fn#103337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3486, offset: 0x0226306b, size: 47 bytes, params: 1, frame: 13
const binding = env0_9;
const set = binding.set;
const binding2 = env0_5;
const value = environment.__proto__;
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
Reflect.apply(set, binding, [binding2 !== POST_WATCH_VIDEO ? 0 : 1]);
}
function _fun103339() { // fn#103339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4357, offset: 0x022631b0, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).showQuestUnavailableAlert();
onClose();
}
function _fun103340() { // fn#103340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4459, offset: 0x022631e0, size: 69 bytes, params: 1, frame: 5
const value = null;
return value == env0_5 ? value : {['watch_mobile_video_quest']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_103342}};
}
function _fun103344() { // fn#103344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4956, offset: 0x0226332a, size: 60 bytes, params: 1, frame: 17
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation;
}
function render_103342() { // fn#103342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4523, offset: 0x02263225, size: 208 bytes, params: 1, frame: 22
const Provider = (importDefault(13597) /* metro dependency 13597: VideoQuestModalContext */).Provider;
const object = {};
const binding = env1_5;
object.quest = binding;
object.videoSessionId = videoSessionId;
const QuestDockGestureContextProvider = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContextProvider;
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<Provider value={object}>
<QuestDockGestureContextProvider>
<QuestContentImpressionTrackerNative
overrideVisibility
questContent={VIDEO_MODAL_MOBILE}
questOrQuests={binding}
questContentPosition={questContentPosition}
sourceQuestContent={sourceQuestContent}
>
{children_103343}
</QuestContentImpressionTrackerNative>
</QuestDockGestureContextProvider>
</Provider>
);
}
function render_103342Children() { // fn#103343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4835, owner: render_103342.children, offset: 0x022632f5, size: 53 bytes, params: 1, frame: 14
return ((Component) => <Component initialStep={initialStep} onClose={onClose} sourceQuestContent={sourceQuestContent} />)(env3_14);
}
@@ -0,0 +1,30 @@
/* Metro module 13618; source: modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx; dependencies: [33, 697, 5278, 1244, 5312, 2] */
function _fun104018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:6, offset: 0x0227ba1b, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx');
exports.default = VideoQuestModalCloseButton;
}
function VideoQuestModalCloseButton({onClose, iconColor = importDefault(dependencyMap[1]).colors.MOBILE_TEXT_HEADING_PRIMARY, style}) { // fn#104019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:116, offset: 0x0227ba96, size: 236 bytes, params: 2, frame: 21
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const items2 = [{'flexShrink': 0, 'minWidth': 24, 'minHeight': 24}, style];
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onClose}
style={items2}
>
<XSmallIcon color={iconColor} />
</PressableOpacity>
);
}
@@ -0,0 +1,229 @@
/* Metro module 13629; source: modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx; dependencies: [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212, 9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798, 2] */
function _fun104081(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:6, offset: 0x02283a77, size: 589 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.ActivityIndicator;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const env0_8 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': false};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {wrapper: {'flexGrow': 1, 'flexShrink': 1}, headerContentCopy: {'flexGrow': 1, 'flexShrink': 1}};
object2.closeButton = {opacity: 0.5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
object2.contentRewardsAnimatedWrapper = {flex: 1};
object2.contentRewardsWrapper = {flex: 1};
object2.contentRewards = {alignItems: 'center'};
object2.contentRewardsCopy = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentEndCardHeader = {marginBottom: PX_16};
object2.contentEndCardHeaderCopy = {'flexGrow': 1, 'flexShrink': 1};
const object3 = {borderTopWidth: 1};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.borderTopColor = BORDER_STRONG;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.paddingTop = PX_24;
object2.contentEndCard = object3;
const object4 = {height: 210};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.image = object4;
const object5 = {flexGrow: 0};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.ctaPrimary = object5;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function VideoQuestModalContentCompletedTsx1(){const{withDelay,ANIMATION_DELAY,withSpring,isComponentMounted,ANIMATED_CONTENT_SPRING_CONFIG,interpolate,ANIMATED_CONTENT_OFFSET_Y}=this.__closure;return{opacity:withDelay(ANIMATION_DELAY,withSpring(isComponentMounted.get(),ANIMATED_CONTENT_SPRING_CONFIG)),transform:[{translateY:withDelay(ANIMATION_DELAY,withSpring(interpolate(isComponentMounted.get(),[0,1],[ANIMATED_CONTENT_OFFSET_Y,0]),ANIMATED_CONTENT_SPRING_CONFIG))}]};}'};
value = value.memo(VideoQuestModalContentCompleted);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx');
exports.default = value;
}
function VideoQuestModalContentCompleted({onClose, onRestartVideo, sourceQuestContent}) { // fn#104082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1402, offset: 0x02283cc4, size: 2510 bytes, params: 2, frame: 49
var object2;
var r14;
var r10;
var items5;
var string;
var ShinyButton;
var object19;
const styles = useStyles();
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
let binding = env0_3;
const value3 = binding.useMemo(_fun104083, [quest]);
const value5 = (require(13627) /* metro dependency 13627: useVideoQuestClickCtaAndMaybeCloseModal */).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
onClose: onClose, sourceQuestContent: sourceQuestContent,
impressionId: (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()});
const questBottomSheetFooterModule = require(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
const useQuestRewardClaimHandler = questBottomSheetFooterModule.useQuestRewardClaimHandler;
object2 = {quest: quest};
object2.onSuccess = (importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close;
object2.sourceQuestContent = sourceQuestContent;
const {isLoading, isClaiming, claim} = Reflect.apply(useQuestRewardClaimHandler, questBottomSheetFooterModule,
[object2]);
const userStatus = quest.userStatus;
const value7 = userStatus?.claimedAt != null;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VideoQuestModalContentCompletedT;
closure.__closure = {withDelay: reanimatedRexportModule.withDelay, ANIMATION_DELAY: 125,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isComponentMounted: value8,
ANIMATED_CONTENT_SPRING_CONFIG: env0_8, interpolate: reanimatedRexportModule.interpolate,
ANIMATED_CONTENT_OFFSET_Y: 75};
closure.__workletHash = 2704439293952;
closure.__initData = env0_10;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding = env0_3;
binding.useEffect(_fun104085, [value8]);
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
const value10 = binding.useCallback(_fun104086, [isShareableQuest2, quest.id]);
binding.useLayoutEffect(_fun104087, []);
const useContext = binding.useContext;
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
let get = windowDimensions.get;
const value11 = Reflect.apply(get, windowDimensions, []).height < 800;
get = windowDimensions.get;
const value12 = Reflect.apply(get, windowDimensions, []).height < 760;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EAYZAr = t.EAYZAr;
const items2 = [<Stack align="center" direction="horizontal" justify="space-between" style={styles.content}><Text variant="heading-sm/semibold" color="text-subtle" style={styles.headerContentCopy}>{Reflect.apply(formatToPlainString,
intl, [EAYZAr,
{questName: quest.config.messages.questName}])}</Text>{((Component) => <Component onClose={onClose} style={styles.closeButton} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}</Stack>];
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items3 = [styles.contentRewardsAnimatedWrapper, value9];
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const items4 = [styles.content];
items4[1] = styles.contentRewardsWrapper;
if (isLoading) {
if (isClaiming) {
var viewBindingProps = {style: styles.contentRewards};
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
string = intl.string;
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
r14 = <View {...viewBindingProps}>{items5}</View>;
} else {
r14 = <ActivityIndicator />;
}
} else {
var viewBindingProps = {style: styles.contentRewards};
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
string = intl.string;
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
r14 = <View {...viewBindingProps}>{items5}</View>;
}
const items6 = [r14];
if (value7) {
r14 = !value7;
} else {
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
r14 = <ShinyButton loading={isClaiming} onPress={claim} style={styles.ctaPrimary} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)} color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREY} />;
}
items6[1] = r14;
items2[1] = <ReanimatedNativeView style={items3}><Stack align="center" justify="center" spacing={PX_24} style={items4}>{items6}</Stack></ReanimatedNativeView>;
const items7 = [styles.content];
items7[1] = styles.contentEndCard;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const stack = <Stack2 spacing={PX_4} style={styles.contentEndCardHeaderCopy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{quest.config.messages.gameTitle}</Text><Text variant="text-sm/medium" color="text-subtle">{quest.config.messages.gamePublisher}</Text></Stack2>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const YsCuyF = (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF;
const RetryIcon = (require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const stack2 = <Stack direction="horizontal" justify="space-between" style={styles.contentEndCardHeader}>{stack}<PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[YsCuyF])} onPress={onRestartVideo}><RetryIcon color={INTERACTIVE_TEXT_DEFAULT} /></PressableOpacity></Stack>;
const value28 = value3 != null;
if (value28) {
r10 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.r8BzFT,
{gameTitle: quest.config.messages.gameTitle})} onPress={value5}>{((Component) => <Component style={styles.image} source={{uri: value3.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity>;
} else {
r10 = value28;
}
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={items7}>{stack2}{r10}<Stack direction="horizontal" spacing={PX_16} align="center"><Button grow onPress={value5} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} />{isShareableQuest2 && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={value10}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</PressableOpacity>}</Stack></View>;
return (
<SafeAreaPaddingView bottom style={styles.wrapper}>
{items2}
</SafeAreaPaddingView>
);
}
function _fun104083() { // fn#104083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1571, offset: 0x02284692, 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_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
}
function VideoQuestModalContentCompletedT() { // fn#104084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2048, owner: VideoQuestModalContentCompleted.T, offset: 0x022846dd, size: 206 bytes, params: 1, frame: 24
const object3 = {};
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let withDelay = reanimatedRexportModule.withDelay;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_1;
const value3 = binding.get();
binding = env1_8;
object3.opacity = Reflect.apply(withDelay, reanimatedRexportModule, [125, Reflect.apply(withSpring, springModule,
[value3, binding])]);
const object4 = {};
value = reanimatedRexportModule;
withDelay = value.withDelay;
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
const moduleValue4 = reanimatedRexportModule;
object4.translateY = Reflect.apply(withDelay, value, [125, Reflect.apply(withSpring, moduleValue3,
[moduleValue4.interpolate(env0_1.get(), [0, 1], [75, 0]), binding])]);
object3.transform = [object4];
return object3;
}
function _fun104086() { // fn#104086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2597, offset: 0x022847ab, size: 95 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var showShareActionSheet;
var moduleValue2;
if (env0_2) {
value2 = environment.__proto__;
moduleValue = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue.showShareActionSheet;
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
Reflect.apply(showShareActionSheet, moduleValue, [{message: moduleValue2.getQuestUrl(quest.id)},
'Video Quest Modal']);
}
}
function _fun104087() { // fn#104087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2724, offset: 0x0228480a, size: 45 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
}
@@ -0,0 +1,608 @@
/* 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});
}
@@ -0,0 +1,18 @@
/* Metro module 13597; source: modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx; dependencies: [31, 44, 2] */
function _fun103345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:6, offset: 0x02263366, size: 152 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
value = value.createContext({'quest': null, 'videoSessionId': ''});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx');
exports.default = value;
exports.useVideoQuestModalContext = useVideoQuestModalContext;
}
function useVideoQuestModalContext() { // fn#103346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:302, offset: 0x022633fe, size: 64 bytes, params: 1, frame: 14
const value2 = env0_2.useContext(env0_3);
(importDefault(44) /* metro dependency 44 */)(value2 != null,
'useVideoQuestModalContext must be used within a VideoQuestModalProvider');
return value2;
}
@@ -0,0 +1,91 @@
/* Metro module 13625; source: modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */
function _fun104063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:6, offset: 0x02282e41, size: 365 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(7095) /* metro dependency 7095: VideoQuestUIStore */).useVideoQuestUIStore;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'flex-start'}};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
object2.subheader = {opacity: 0.6};
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 env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
exports.default = VideoQuestModalHeader;
}
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
let r17 = withTextShadow !== undefined && withTextShadow;
const styles = useStyles();
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value6 = useVideoQuestUIStore(_fun104065, (require(3769) /* metro dependency 3769 */).shallow);
const userStatus = quest.userStatus;
const value7 = userStatus?.completedAt != null;
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
value7);
const items2 = [styles.videoContentHeaderWrapper, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const r7 = r17 && styles.textShadow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
const text = <Text variant="heading-md/semibold" color="white" style={r7}>{Reflect.apply(formatToPlainString, intl,
[EQa7os, {questName: quest.config.messages.questName}])}</Text>;
r17 = r17 && styles.textShadow;
return (
<View style={items2}>
<View style={styles.videoContentHeading}>
{text}
<Text
variant="heading-sm/semibold"
color="white"
accessibilityLabel={r12}
style={[styles.subheader, r17]}
>
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
</Text>
</View>
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
</View>
);
}
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
var r0;
var object2;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object2 = {};
progressSeconds = env0_1.progressSeconds;
object2.timestampSec = progressSeconds;
object2.duration = env0_1.targetSeconds;
progressSeconds = env0_1.progressSeconds;
object2.maxTimestampSec = progressSeconds;
r0 = object2;
}
let value = environment.__proto__;
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
value, [r0.duration - r0.timestampSec]);
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
}
@@ -0,0 +1,67 @@
/* Metro module 13619; source: modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx; dependencies: [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244, 2] */
function _fun104020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:6, offset: 0x0227bb82, size: 204 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({questName: {textAlign: 'center'}});
value = value.memo(VideoQuestModalReward);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx');
exports.default = value;
}
function VideoQuestModalReward({style, withQuestName, withRewardAvailableCopy, size, withRewardTileAnimation}) { // fn#104021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:204, offset: 0x0227bc4e, size: 651 bytes, params: 2, frame: 32
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object;
var questName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var EAYZAr;
let r10 = withQuestName === undefined || withQuestName;
let r8 = withRewardAvailableCopy === undefined || withRewardAvailableCopy;
const r21 = size === undefined ? 'lg' : size;
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const value3 = env0_3.useCallback(_fun104022, [quest.id]);
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const value4 = ((Component) => <Component hasConfetti quest={quest} size={r21} progress={value2.percentComplete} onPress={value3} withAnimation={withRewardTileAnimation} />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */);
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
if (r10) {
object = {'variant': 'heading-lg/semibold', 'color': 'text-strong'};
questName = styles.questName;
object.style = questName;
formatToPlainString = intl.formatToPlainString;
EAYZAr = (require(1244) /* metro dependency 1244: indexNative */).t.EAYZAr;
questName = quest.config.messages.questName;
r10 = <Text {...object}>{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: questName}])}</Text>;
}
r8 = r8 && <Text variant="heading-sm/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wvve2'])}</Text>;
return (
<Stack
justify="center"
align="center"
spacing={PX_24}
style={style}
>
{value4}
<Stack2 align="center" spacing={PX_4}>
{r10}
{r8}
</Stack2>
</Stack>
);
}
function _fun104022() { // fn#104022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:481, offset: 0x0227bed9, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openRewardDetailsBottomSheet({questId: quest.id});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,48 @@
/* Metro module 13528; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx; dependencies: [31, 33, 4501, 697, 674, 5278, 4564, 2] */
function _fun102846(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:6, offset: 0x0224b179, size: 330 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.disabled = {opacity: 0.5};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.overflow = 'hidden';
object2.container = object5;
const object6 = {};
const value3 = importDefault(674) /* metro dependency 674 */;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object6.backgroundColor = value3(BLACK).alpha(0.5).hex();
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.padding = PX_12;
object2.blur = object6;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(_fun102847);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx');
exports.VideoQuestPlayerControlButton = value;
}
function _fun102847(a0) { // fn#102847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:348, offset: 0x0224b2c3, size: 210 bytes, params: 2, frame: 22
const style = a0.style;
const children = a0.children;
let value = Object.create(null);
value.style = 0;
value.children = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: [styles.container, value2.disabled && styles.disabled, style], ...value2};
value = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
value = ((Component) => <Component style={styles.blur} blurAmount={0.2} blurStyle="default" blurTheme="dark">{children}</Component>)(value);
return (
<PressableOpacity {...pressableOpacityProps}>
{value}
</PressableOpacity>
);
}
@@ -0,0 +1,466 @@
/* Metro module 13602; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx; dependencies: [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606, 1582, 9522, 9484, 13614, 2] */
function _fun103379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:6, offset: 0x02265caa, size: 230 bytes, params: 8, frame: 19
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 videoQuestUIStore = importDefault(7095) /* metro dependency 7095: VideoQuestUIStore */;
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun103380);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx');
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
exports.PlayerState = PlayerState;
exports.VideoQuestPlayer = value;
}
function _fun103380({style, onLoad, onEnd, onToggleFullscreen, orientation, contentInsets, handleToggleCaptions, handleOpenTranscript, isFullscreen, externallyPaused, captionsEnabled, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset}) { // fn#103380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:186, offset: 0x02265d90, size: 1883 bytes, params: 2, frame: 57
const env0_3 = orientation;
const env0_4 = contentInsets;
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
hasCaptionAsset = hasCaptionAsset === undefined || hasCaptionAsset;
hasTranscriptAsset = hasTranscriptAsset === undefined || hasTranscriptAsset;
const {quest,
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
const value7 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
const userStatus = quest.userStatus;
const value8 = userStatus?.completedAt != null;
let binding = env0_4;
const value9 = binding.useMemo(_fun103381, [quest]);
const value10 = binding.useMemo(_fun103382, [quest]);
const r17 = value10?.url != null ? (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO_HLS : (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO;
binding = env0_4;
let useState = binding.useState;
let targetSeconds = value7.targetSeconds;
const value11 = Reflect.apply(useState, binding, [targetSeconds]);
const binding2 = env0_3;
const value12 = binding2(value11, 2);
const property = value12[0];
const env0_11 = value12[1];
targetSeconds = value7.targetSeconds;
const value13 = VideoQuestUIStore(function(a0) {
return a0.setVideoProgress;
});
const value14 = VideoQuestUIStore(_fun103384, (require(3769) /* metro dependency 3769 */).shallow);
const value15 = binding.useRef(null);
useState = binding.useState;
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
const LOADING = PlayerState.LOADING;
const value16 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
const property2 = value16[0];
const env0_15 = value16[1];
const env0_16 = binding.useRef(value7.progressSeconds);
const defaultImport = importDefault(13603) /* metro dependency 13603: useVideoQuestPlayerAnalytics */;
let id = quest.id;
const {handleBufferAnalytics, handleEndAnalytics, handleErrorAnalytics, handleLoadAnalytics,
handleLoadStartAnalytics, handlePausePlaybackAnalytics, handleProgressAnalytics, handleReadyForDisplayAnalytics,
handleResumePlaybackAnalytics, handleSeekAnalytics} = defaultImport({duration: property,
isQuestCompleted: value8, playerState: property2, questId: id, videoSessionId: videoSessionId,
videoAssetId: r17, sourceQuestContent: sourceQuestContent});
const env0_27 = binding.useRef(null);
id = quest.id;
const gameTitle = quest.config.messages.gameTitle;
const r45 = value10?.url ?? value9?.url;
const defaultWatchVideoTask = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getDefaultWatchVideoTask(quest.config);
const videoTitle = defaultWatchVideoTask == null ? undefined : defaultWatchVideoTask.messages.videoTitle;
const r18 = value10?.url != null ? 'hls' : 'mp4';
const value21 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
binding = env0_4;
binding.useEffect(_fun103385, [id, gameTitle, targetSeconds, r45, videoTitle, r18]);
const value22 = binding.useCallback(_fun103387, []);
const value23 = binding.useCallback(_fun103388, [handleReadyForDisplayAnalytics]);
const value24 = binding.useCallback(_fun103389, [handleLoadAnalytics, onLoad]);
const value25 = binding.useCallback(_fun103390, [property, handleSeekAnalytics, quest.id, value13]);
const env0_33 = binding.useRef(0);
const env0_34 = binding.useRef(0);
const value26 = binding.useCallback(_fun103391, [quest, value7.taskType, handleProgressAnalytics, value13]);
const value27 = binding.useCallback(_fun103392, [property, quest, handleEndAnalytics, onEnd]);
const value28 = binding.useCallback(_fun103393, [handleLoadStartAnalytics]);
const value29 = binding.useCallback(_fun103394, [handleErrorAnalytics]);
const value30 = binding.useCallback(_fun103395, []);
const value31 = binding.useCallback(_fun103396, []);
const value32 = binding.useCallback(_fun103397, [handleResumePlaybackAnalytics]);
const value33 = binding.useCallback(_fun103398, [handlePausePlaybackAnalytics]);
const value34 = binding.useCallback(_fun103399, [handleBufferAnalytics]);
const value35 = binding.useCallback(_fun103400, [quest, captionsEnabled, contentInsets]);
const value36 = binding.useMemo(_fun103401, [value10, value9]);
const value37 = binding.useCallback(function() {
if (onToggleFullscreen != null) {
onToggleFullscreen({orientation: orientation});
}
}, [onToggleFullscreen, orientation]);
if (value36 == null) {
return null;
}
const value38 = orientation === 'landscape';
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
return (
<AdVideoPlayer
source={value36}
httpEngine={value21}
initialProgress={value14}
contentDuration={targetSeconds}
allowUnrestrictedSeeking={value8}
disableResumeOnLoad={value8}
style={style}
isFullscreen={isFullscreen}
externallyPaused={externallyPaused}
contentInsets={contentInsets}
renderCaptions={value35}
onLoadStart={value28}
onLoad={value24}
onReadyForDisplay={value23}
onSeek={value25}
onBuffer={value34}
onError={value29}
onEnd={value27}
onPlayerStateChange={value22}
onResumePlayback={value32}
onPausePlayback={value33}
onProgress={value26}
onVideoTracks={value30}
onVideoLayout={value31}
videoRef={value15}
bufferingSpinnerPlacement={value38 ? 'center' : 'top-left'}
captionsEnabled={captionsEnabled}
showCaptionsButton={value38 && hasCaptionAsset}
showTranscriptButton={value38 && hasTranscriptAsset}
showFullscreenButton={value38}
showProgress={value38}
onToggleCaptions={handleToggleCaptions}
onOpenTranscript={handleOpenTranscript}
onToggleFullscreen={value37}
/>
);
}
function _fun103381() { // fn#103381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:616, offset: 0x022664eb, 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_VIDEO = QuestAssetType.VIDEO_PLAYER_VIDEO;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO, undefined, true]);
}
function _fun103382() { // fn#103382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:716, offset: 0x02266536, 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_VIDEO_HLS = QuestAssetType.VIDEO_PLAYER_VIDEO_HLS;
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO_HLS, undefined, true]);
}
function _fun103384({videoProgress}) { // fn#103384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1031, offset: 0x0226658c, size: 76 bytes, params: 2, frame: 4
var r0;
var object2;
var progressSeconds;
const property = videoProgress[quest.id];
if (property != null) {
r0 = property;
} else {
object2 = {};
progressSeconds = env0_7.progressSeconds;
object2.timestampSec = progressSeconds;
object2.duration = env0_10;
progressSeconds = env0_7.progressSeconds;
object2.maxTimestampSec = progressSeconds;
r0 = object2;
}
return r0;
}
function _fun103385() { // fn#103385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1993, offset: 0x022665d8, size: 336 bytes, params: 1, frame: 17
var constants;
var binding;
var MobileMuxWrapper;
var value4;
var mobileMuxWrapper;
if (env0_30 != null) {
if (env0_30.length === 0) {
return undefined;
}
var current = env0_14.current;
if (current == null) {
return undefined;
}
var moduleValue = require(13606) /* metro dependency 13606: videoQoe */;
var getVideoQoEMetricsConfig = moduleValue.getVideoQoEMetricsConfig;
var object2 = {};
var VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
object2.location = VIDEO_MODAL_MOBILE;
if (Reflect.apply(getVideoQoEMetricsConfig, moduleValue, [object2]).externalAnalyticsEnabled) {
constants = (require(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
object2 = {};
current = env0_14.current;
object2.videoRef = current;
object2.feature = 'quests';
object2.appVersion = constants.Version;
object2.releaseChannel = constants.ReleaseChannel;
object2.contentMetadata = {contentId: env0_30, videoStreamType: env0_32, contentType: 'quests',
durationMs: 1000 * targetSeconds, title: videoTitle, questId: id, gameName: gameTitle};
binding = env0_27;
MobileMuxWrapper = (require(13606) /* metro dependency 13606: videoQoe */).MobileMuxWrapper;
value4 = Object.create(MobileMuxWrapper.prototype, {constructor: {value: MobileMuxWrapper}});
mobileMuxWrapper = new MobileMuxWrapper(object2);
binding.current = mobileMuxWrapper instanceof Object ? mobileMuxWrapper : value4;
current = env0_27.current;
current.initialize();
return _fun103386;
}
}
}
function _fun103387(a0) { // fn#103387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2596, offset: 0x02266778, size: 19 bytes, params: 2, frame: 11
env0_15(a0);
}
function _fun103388() { // fn#103388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2629, offset: 0x0226678b, size: 40 bytes, params: 1, frame: 10
handleReadyForDisplayAnalytics();
const current = env0_27.current;
if (current != null) {
current.onReadyForDisplay();
}
}
function _fun103389(a0) { // fn#103389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2715, offset: 0x022667b3, size: 199 bytes, params: 2, frame: 19
const duration = a0.duration;
const videoTracks = a0.videoTracks;
const trackId = a0.trackId;
const naturalSize = a0.naturalSize;
env0_11(duration);
handleLoadAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoad(duration);
}
if (naturalSize != null) {
current = env0_27.current;
if (current != null) {
current.updateVideoSourceDimensions(naturalSize.width, naturalSize.height);
}
}
if (videoTracks != null && videoTracks.length > 0 && trackId != null && trackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(trackId, videoTracks);
}
}
if (onLoad != null) {
onLoad(a0);
}
}
function _fun103390(a0) { // fn#103390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3045, offset: 0x0226687a, size: 131 bytes, params: 2, frame: 17
env0_16.current = a0.currentTime;
if (env0_10 > 0) {
env0_13(quest.id, a0.currentTime, env0_10);
}
handleSeekAnalytics();
let current = env0_27.current;
if (current != null) {
current.updatePlayheadTime(a0.currentTime);
}
current = env0_27.current;
if (current != null) {
current.onSeek();
}
}
function _fun103391(a0) { // fn#103391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3271, offset: 0x022668fd, size: 345 bytes, params: 2, frame: 17
var value2;
var moduleValue;
var sendVideoProgress;
var questBinding;
var handleProgressAnalyticsBinding;
var progress;
var seekableDuration;
var value5;
var moduleValue2;
var updateOptimisticProgress;
var id;
var taskType;
let binding = env0_16;
let currentTime = a0.currentTime;
binding.current = currentTime;
currentTime = a0.currentTime;
let current = env0_33.current;
if (currentTime >= current) {
value2 = environment.__proto__;
moduleValue = require(9522) /* metro dependency 9522: VideoQuestUtils */;
sendVideoProgress = moduleValue.sendVideoProgress;
questBinding = quest;
currentTime = a0.currentTime;
Reflect.apply(sendVideoProgress, moduleValue, [questBinding, currentTime]);
handleProgressAnalyticsBinding = handleProgressAnalytics;
progress = a0.progress;
seekableDuration = a0.seekableDuration;
currentTime = a0.currentTime;
handleProgressAnalyticsBinding(progress, seekableDuration, currentTime);
binding = env0_33;
currentTime = a0.currentTime;
binding.current = currentTime + 6 + 2 * global.Math.random();
}
currentTime = a0.currentTime;
if (currentTime >= env0_34.current) {
value5 = environment.__proto__;
moduleValue2 = require(9484) /* metro dependency 9484: QuestActionCreators */;
updateOptimisticProgress = moduleValue2.updateOptimisticProgress;
id = quest.id;
taskType = env0_7.taskType;
currentTime = a0.currentTime;
Reflect.apply(updateOptimisticProgress, moduleValue2, [id, taskType, currentTime]);
binding = env0_34;
currentTime = a0.currentTime;
binding.current = currentTime + 1;
}
env0_13(quest.id, a0.currentTime, a0.seekableDuration);
current = env0_27.current;
if (current != null) {
current.onProgress(a0.currentTime);
}
}
function _fun103392() { // fn#103392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3722, offset: 0x02266a56, size: 127 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9522) /* metro dependency 9522: VideoQuestUtils */;
value.sendVideoProgress(quest, env0_10);
handleEndAnalytics();
let current = env0_27.current;
if (current != null) {
current.onProgress(env0_10);
}
current = env0_27.current;
if (current != null) {
current.onEnd();
}
if (onEnd != null) {
onEnd();
}
}
function _fun103393() { // fn#103393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3885, offset: 0x02266ad5, size: 63 bytes, params: 1, frame: 12
handleLoadStartAnalytics();
let current = env0_27.current;
if (current != null) {
current.onLoadStart();
}
current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103394(a0) { // fn#103394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4000, offset: 0x02266b14, size: 45 bytes, params: 2, frame: 12
handleErrorAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onError(a0);
}
}
function _fun103395({videoTracks, selectedVideoTrackId}) { // fn#103395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4075, offset: 0x02266b41, size: 91 bytes, params: 2, frame: 15
var current;
if (videoTracks != null && videoTracks.length > 0 && selectedVideoTrackId != null && selectedVideoTrackId.length > 0) {
current = env0_27.current;
if (current != null) {
current.onVideoTrackChange(selectedVideoTrackId, videoTracks);
}
}
}
function _fun103396(a0) { // fn#103396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4242, offset: 0x02266b9c, size: 103 bytes, params: 2, frame: 15
var width;
var height;
var current;
const value = undefined;
let layout = a0 == null || a0.nativeEvent == null ? value : a0.nativeEvent.layout;
if (layout != null) {
layout = a0.nativeEvent.layout;
width = layout.width;
height = layout.height;
if (width > 0) {
if (height > 0) {
current = env0_27.current;
if (current != null) {
current.updateVideoDimensions(width, height);
}
}
}
}
return value;
}
function _fun103397() { // fn#103397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4451, offset: 0x02266c03, size: 40 bytes, params: 1, frame: 10
handleResumePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPlay();
}
}
function _fun103398() { // fn#103398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4526, offset: 0x02266c2b, size: 40 bytes, params: 1, frame: 10
handlePausePlaybackAnalytics();
const current = env0_27.current;
if (current != null) {
current.onPause();
}
}
function _fun103399(a0) { // fn#103399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4602, offset: 0x02266c53, size: 45 bytes, params: 2, frame: 12
handleBufferAnalytics(a0);
const current = env0_27.current;
if (current != null) {
current.onBuffer(a0);
}
}
function _fun103400(a0) { // fn#103400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4678, offset: 0x02266c80, size: 234 bytes, params: 2, frame: 20
let value = environment.__proto__;
value = undefined;
const VideoQuestCaptions = (require(13614) /* metro dependency 13614: VideoQuestCaptions */).VideoQuestCaptions;
const questBinding = quest;
const captionsEnabledBinding = captionsEnabled;
const top = contentInsets == null ? value : contentInsets.top;
const value3 = 0;
return (
<VideoQuestCaptions
quest={questBinding}
currentTime={a0}
visible={captionsEnabledBinding}
style={{top: top ?? value3, bottom: (contentInsets == null ? value : contentInsets.bottom) ?? value3,
left: (contentInsets == null ? value : contentInsets.left) ?? value3,
right: (contentInsets == null ? value : contentInsets.right) ?? value3}}
/>
);
}
function _fun103401() { // fn#103401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4967, offset: 0x02266d6a, size: 64 bytes, params: 1, frame: 6
var url;
var r0;
const value2 = null;
if (value2 == env0_8) {
r0 = value2;
} else {
url = value2 == env0_9 ? undefined : env0_9.url;
url = value2 == url ? env0_8.url : url;
r0 = {uri: url};
}
return r0;
}
function _fun103386() { // fn#103386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2455, offset: 0x02266728, size: 80 bytes, params: 1, frame: 13
let current = env1_27.current;
if (current != null) {
current = env1_27.current;
current.onProgress(env1_16.current);
current = env1_27.current;
current.destroy();
env1_27.current = null;
}
}
@@ -0,0 +1,102 @@
/* Metro module 13626; source: modules/quests/native/VideoQuestModal/VideoQuestTranscriptActionSheet.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 1585, 9495, 9484, 6805, 6758, 1244, 6277, 4572, 4573, 2] */
function _fun104066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:6, offset: 0x022832c5, size: 280 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ActivityIndicator;
let value = require(7095) /* metro dependency 7095: VideoQuestUIStore */;
const env0_5 = value.FetchStatus;
const env0_6 = value.useVideoQuestUIStore;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_9 = Reflect.apply(createStyles, value, [{content: {paddingBottom: PX_8}, loadingSpinner: {height: 100}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestTranscriptActionSheet.tsx');
exports.default = VideoQuestTranscriptActionSheet;
}
function VideoQuestTranscriptActionSheet({quest}) { // fn#104067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:429, offset: 0x022833dd, size: 489 bytes, params: 2, frame: 27
var object3;
const styles = useStyles();
const value3 = useVideoQuestUIStore(function(a0) {
return a0.transcript;
});
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_3;
binding.useEffect(_fun104069, [quest, value3]);
const value4 = binding.useMemo(_fun104070, [value3?.text]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object3 = {scrollable: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1YS80z'])} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object2 = {paddingBottom: bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const fetchStatus = value3?.fetchStatus;
const FETCHING = FetchStatus.FETCHING;
const items2 = [fetchStatus === FETCHING && <ActivityIndicator style={styles.loadingSpinner} size="large" />];
items2[1] = value4.length > 0 && value4.map(_fun104073);
return (
<ActionSheet {...object3}>
<BottomSheetScrollView contentContainerStyle={object2}>
<Stack spacing={16} style={styles.content}>
{items2}
</Stack>
</BottomSheetScrollView>
</ActionSheet>
);
}
function _fun104069() { // fn#104069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:547, offset: 0x022835d1, size: 239 bytes, params: 1, frame: 20
let value = environment.__proto__;
const value2 = undefined;
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = assetUtilsModule.getQuestAsset;
const questBinding = quest;
const QuestAssetType = assetUtilsModule.QuestAssetType;
const VIDEO_PLAYER_TRANSCRIPT = QuestAssetType.VIDEO_PLAYER_TRANSCRIPT;
const value4 = Reflect.apply(getQuestAsset, assetUtilsModule, [questBinding, VIDEO_PLAYER_TRANSCRIPT, value2, true]);
let r3 = env0_1 == null || env0_1.questId !== quest.id;
r3 = !r3 ? env0_1.fetchStatus === FetchStatus.NONE : r3;
r3 = !r3 ? env0_1.fetchStatus === FetchStatus.SUCCESS && (value4 == null ? value2 : value4.url) !== env0_1.url : r3;
if (r3) {
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
value.fetchVideoTranscript(quest, true);
}
return value2;
}
function _fun104070() { // fn#104070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:813, offset: 0x022836c0, size: 98 bytes, params: 1, frame: 13
var r0;
var value;
if (env0_1?.text == null) {
r0 = [];
} else {
value = env0_1.text.split('\n');
value = value.map(function(a0) {
return a0.trim();
});
value = value.filter(_fun104072);
r0 = value;
}
return r0;
}
function _fun104073(a0, a1) { // fn#104073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13823:1329, offset: 0x02283722, size: 67 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="heading-md/normal"
color="text-muted"
key={a1}
>
{a0}
</Text>
);
}
@@ -0,0 +1,67 @@
/* Metro module 13614; source: modules/quests/native/VideoQuestModal/captions/VideoQuestCaptions.tsx; dependencies: [31, 27, 33, 4501, 697, 674, 13615, 13617, 4564, 4573, 2] */
function _fun103994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:6, offset: 0x0227aa56, size: 462 bytes, params: 8, frame: 25
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'position': 'absolute', 'bottom': null, 'left': null, 'right': null, 'alignItems': 'center',
'justifyContent': 'flex-end'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.bottom = PX_32;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.left = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.right = PX_16;
object4.container = object5;
const object6 = {};
const value2 = importDefault(674) /* metro dependency 674 */;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object6.backgroundColor = value2(BLACK).alpha(0.35).hex();
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.padding = PX_8;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.overflow = 'hidden';
object4.captionBox = object6;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object4.captionText = {color: WHITE, textAlign: 'center'};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/captions/VideoQuestCaptions.tsx');
exports.VideoQuestCaptions = VideoQuestCaptions;
}
function VideoQuestCaptions({quest, currentTime, style, visible}) { // fn#103995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:663, offset: 0x0227ac24, size: 341 bytes, params: 2, frame: 21
visible = visible === undefined || visible;
const styles = useStyles();
const {captions,
status} = (require(13615) /* metro dependency 13615: useVideoQuestCaptions */).useVideoQuestCaptions(quest);
const value3 = env0_3.useMemo(_fun103996, [captions, currentTime, visible]);
return status !== 'success' || value3 == null ? null : <View style={[styles.container,
style]} importantForAccessibility="no-hide-descendants" accessibilityRole="none" accessible={false}>{((Component) => <Component style={styles.captionBox} blurTheme="dark" blurStyle="default" blurAmount={0.2}>{((Text) => <Text variant="heading-sm/medium" style={styles.captionText}>{value3.text}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</Component>)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)}</View>;
}
function _fun103996() { // fn#103996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13811:794, offset: 0x0227ad79, size: 74 bytes, params: 1, frame: 14
var r0;
var value3;
var moduleValue;
const captionsBinding = captions;
const value2 = null;
if (value2 != captionsBinding) {
if (visible) {
value3 = environment.__proto__;
moduleValue = require(13617) /* metro dependency 13617: VideoQuestCaptionsUtils */;
r0 = moduleValue.findActiveCaption(captions, currentTime);
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,46 @@
/* Metro module 13617; source: modules/quests/native/VideoQuestModal/captions/VideoQuestCaptionsUtils.tsx; dependencies: [2] */
function _fun104016(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13814:6, offset: 0x0227b955, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/captions/VideoQuestCaptionsUtils.tsx');
exports.findActiveCaption = function(a0, a1) {
var r3;
var r4;
var r8;
var property;
var value = a0.length - 1;
var value2 = 0;
if (value2 <= value) {
r3 = value2;
r4 = value;
reducibleLoop1: while (true) {
property = global.Math;
value = property.floor((r3 + r4) / 2);
property = a0[value];
if (a1 >= property.start) {
reducibleJoin3: while (true) {
if (a1 <= property.end) {
return property;
}
break reducibleJoin3;
}
}
if (a1 < property.start) {
value -= 1;
r4 = value;
r8 = r3;
} else {
value += 1;
r8 = value;
}
if (!(r8 <= r4)) {
return null;
}
r3 = r8;
continue reducibleLoop1;
}
}
return null;
};
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,33 @@
/* Metro module 13628; source: modules/quests/native/VideoQuestModal/hooks/useVideoExternallyPaused.tsx; dependencies: [3849, 8812, 4007, 9522, 566, 4497, 477, 2] */
function _fun104077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13825:6, offset: 0x02283907, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/hooks/useVideoExternallyPaused.tsx');
exports.useVideoExternallyPaused = useVideoExternallyPaused;
}
function useVideoExternallyPaused(a0, a1) { // fn#104078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13825:239, offset: 0x02283979, size: 235 bytes, params: 3, frame: 20
const value = a1;
const value3 = (require(8812) /* metro dependency 8812: ContextMenuStateNative */).useActiveContextMenu();
const value4 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useOpenModalKey();
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
const getVideoQuestModalKey = videoQuestUtilsModule.getVideoQuestModalKey;
const value5 = value4 !== Reflect.apply(getVideoQuestModalKey, videoQuestUtilsModule, [a0]);
const key = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore], function() {
return ActionSheetStore.getKey();
});
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
const useAlertStore = useAlertStoreNativeModule.useAlertStore;
const value6 = Reflect.apply(useAlertStore, useAlertStoreNativeModule, [function(a0) {
return a0.alerts;
}]).length > 0;
let r0 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value;
r0 = !r0 ? key != null : r0;
r0 = !r0 ? value3 != null : r0;
r0 = !r0 ? value5 : r0;
r0 = !r0 ? value6 : r0;
return r0;
}
@@ -0,0 +1,97 @@
/* Metro module 13615; source: modules/quests/native/VideoQuestModal/hooks/useVideoQuestCaptions.tsx; dependencies: [57, 31, 9495, 507, 13616, 2] */
function _fun103997(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:6, offset: 0x0227adc3, size: 179 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {NONE: 'none', LOADING: 'loading', SUCCESS: 'success', ERROR: 'error'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/hooks/useVideoQuestCaptions.tsx');
exports.useVideoQuestCaptions = useVideoQuestCaptions;
}
function useVideoQuestCaptions(a0) { // fn#103998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:347, offset: 0x0227ae76, size: 206 bytes, params: 2, frame: 22
const value2 = undefined;
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
const getQuestAsset = assetUtilsModule.getQuestAsset;
const QuestAssetType = assetUtilsModule.QuestAssetType;
const VIDEO_PLAYER_CAPTION = QuestAssetType.VIDEO_PLAYER_CAPTION;
const value3 = Reflect.apply(getQuestAsset, assetUtilsModule, [a0, VIDEO_PLAYER_CAPTION, value2, true]);
const url = value3 == null ? value2 : value3.url;
const binding = env0_3;
let useState = binding.useState;
const NONE = env0_4.NONE;
const value4 = Reflect.apply(useState, binding, [NONE]);
const binding2 = env0_2;
let value = binding2(value4, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value[0];
var env0_2 = value[1];
binding.useEffect(_fun103999, [url]);
return {captions: property2, status: property};
}
function _fun103999() { // fn#103999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:567, offset: 0x0227af44, size: 136 bytes, params: 1, frame: 13
var environment;
var binding;
var value2;
var value;
if (url != null) {
value2 = environment.__proto__;
value = (require(507) /* metro dependency 507: HTTPUtils */).HTTP.get({url: url, rejectWithError: true});
value = value.then(_fun104000);
value.catch(_fun104001);
} else {
binding = env0_1;
value = environment.__proto__;
binding(env1_4.NONE);
}
}
function _fun104000(a0) { // fn#104000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:631, offset: 0x0227afcc, size: 116 bytes, params: 2, frame: 13
var value;
var property;
var moduleValue;
var parseVtt;
var text;
var vtt;
var value2;
var binding;
var cues;
var binding2;
var SUCCESS;
var error;
var value3;
var ERROR;
try {
value = environment.__proto__.__proto__;
property = dependencyMap[4];
moduleValue = require(property);
parseVtt = moduleValue.parseVtt;
text = a0.text;
vtt = Reflect.apply(parseVtt, moduleValue, [text]);
value2 = environment.__proto__;
binding = env1_2;
cues = vtt.cues;
binding(cues);
binding = env1_1;
binding2 = env2_4;
SUCCESS = binding2.SUCCESS;
binding(SUCCESS);
} catch (error) {
value3 = environment.__proto__;
binding = env1_1;
ERROR = env2_4.ERROR;
binding(ERROR);
}
}
function _fun104001() { // fn#104001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13812:724, offset: 0x0227b040, size: 29 bytes, params: 1, frame: 11
const binding = env1_1;
const ERROR = env2_4.ERROR;
binding(ERROR);
}
@@ -0,0 +1,403 @@
/* Metro module 13603; source: modules/quests/native/VideoQuestModal/hooks/useVideoQuestPlayerAnalytics.tsx; dependencies: [31, 27, 4401, 661, 477, 9513, 7110, 9522, 13604, 13605, 7096, 6531, 4826, 4831, 2] */
function _fun103403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:6, offset: 0x02266dd1, size: 229 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).AppState;
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object = [-1000, -1003, -1004, -1008];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/hooks/useVideoQuestPlayerAnalytics.tsx');
exports.default = useVideoQuestPlayerAnalytics;
}
function useVideoQuestPlayerAnalytics({duration, isQuestCompleted, playerState, questId, sourceQuestContent, videoAssetId, videoSessionId}) { // fn#103404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:193, offset: 0x02266eb6, size: 886 bytes, params: 2, frame: 27
var object2;
const binding = questId;
const env0_7 = binding.useRef(null);
const env0_8 = binding.useRef(null);
const value2 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression();
binding.useEffect(_fun103405, []);
binding.useEffect(function() {
var env0_0 = AppState.addEventListener('change', _fun103407);
return _fun103408;
}, [questId, videoSessionId, playerState, value2, sourceQuestContent]);
const value3 = binding.useCallback(_fun103409, [questId, videoAssetId, isQuestCompleted, videoSessionId, duration,
value2, sourceQuestContent]);
const value4 = binding.useCallback(_fun103410, []);
let value = importDefault(13604) /* metro dependency 13604: useVideoSegmentAnalytics */;
object2 = {getCurrentVideoTime: value4, onAnalytics: value3};
const SEGMENT_ANALYTICS_EMIT_INTERVAL_MS = (require(13604) /* metro dependency 13604: useVideoSegmentAnalytics */).SEGMENT_ANALYTICS_EMIT_INTERVAL_MS;
object2.emitIntervalMs = SEGMENT_ANALYTICS_EMIT_INTERVAL_MS;
const SEGMENT_ANALYTICS_MIN_DURATION_MS = (require(13604) /* metro dependency 13604: useVideoSegmentAnalytics */).SEGMENT_ANALYTICS_MIN_DURATION_MS;
object2.minSegmentDurationMs = SEGMENT_ANALYTICS_MIN_DURATION_MS;
value = value(object2);
const handlePlayerStateChange = value.handlePlayerStateChange;
const handleLoadEnd = value.handleLoadEnd;
const handleFirstFrame = value.handleFirstFrame;
const handleSeek = value.handleSeek;
binding.useEffect(_fun103411, [playerState, handlePlayerStateChange]);
const env0_13 = binding.useRef(null);
value = binding.useCallback(_fun103412, [handleLoadEnd, handleFirstFrame, questId, videoAssetId, videoSessionId,
value2, sourceQuestContent]);
const value5 = binding.useCallback(function() {
var handlePlayerStateChangeBinding = handlePlayerStateChange;
var ENDED = require(dependencyMap[10]).VideoPlayerState.ENDED;
handlePlayerStateChangeBinding(ENDED, null);
}, [handlePlayerStateChange]);
const value6 = binding.useCallback(_fun103414, [questId, videoSessionId, videoAssetId, value2, sourceQuestContent]);
const env0_14 = binding.useRef(null);
const env0_15 = binding.useRef(-1);
const value7 = binding.useCallback(_fun103415, [questId, videoAssetId, videoSessionId, value2, sourceQuestContent]);
const value8 = binding.useCallback(_fun103416, [questId, videoSessionId, videoAssetId, value2, sourceQuestContent]);
const value9 = binding.useCallback(_fun103417, [questId, videoSessionId, value2, sourceQuestContent]);
const value10 = binding.useCallback(_fun103418, [questId, videoSessionId, value2, sourceQuestContent]);
object2 = {handleBufferAnalytics: value7, handleEndAnalytics: value5};
object2.handleErrorAnalytics = binding.useCallback(_fun103419, [duration, questId, videoAssetId, videoSessionId,
value2, sourceQuestContent]);
object2.handleLoadAnalytics = value;
object2.handleLoadStartAnalytics = value6;
object2.handlePausePlaybackAnalytics = value10;
object2.handleProgressAnalytics = binding.useCallback(_fun103420, [questId, videoSessionId, value2,
sourceQuestContent]);
object2.handleReadyForDisplayAnalytics = value8;
object2.handleResumePlaybackAnalytics = value9;
object2.handleSeekAnalytics = handleSeek;
return object2;
}
function _fun103405() { // fn#103405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:437, offset: 0x0226722c, size: 34 bytes, params: 1, frame: 10
const binding = env0_8;
const Date = global.Date;
binding.current = Date.now();
}
function _fun103406() { // fn#103406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:482, offset: 0x0226724e, size: 45 bytes, params: 1, frame: 14
const env0_0 = AppState.addEventListener('change', _fun103407);
return _fun103408;
}
function _fun103409(a0) { // fn#103409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:855, offset: 0x0226733b, size: 254 bytes, params: 2, frame: 21
var value2;
var value3;
var moduleValue;
var trackQuestEvent;
var object3;
var object4;
var moduleValue2;
if (env0_7.current != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object3 = {};
object3.questId = questId;
object3.event = AnalyticEvents.QUEST_VIDEO_SEGMENT_WATCHED;
object4 = {};
copyDataProperties(object4, a0, undefined);
object4['video_asset_id'] = videoAssetId;
object4['quest_completed'] = isQuestCompleted;
object4['video_duration_sec'] = duration;
moduleValue2 = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4['video_progress'] = moduleValue2.formatVideoProgressRatio(a0.segment_end_sec, env0_7.current);
object4['video_session_id'] = videoSessionId;
object4['impression_id'] = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object3]);
}
}
function _fun103410() { // fn#103410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:1215, offset: 0x02267439, size: 14 bytes, params: 1, frame: 1
return env0_7.current;
}
function _fun103411() { // fn#103411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:1499, offset: 0x02267447, size: 343 bytes, params: 1, frame: 16
const VideoPlayerState = (require(7096) /* metro dependency 7096: DiscordVideoPlayerTypes */).VideoPlayerState;
const playerStateBinding = playerState;
const PlayerState = (require(13605) /* metro dependency 13605: VideoQuestPlayer */).PlayerState;
const PLAYING = PlayerState.PLAYING;
if (PLAYING === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.PLAYING, null);
} else if (PlayerState.PAUSED === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.PAUSED, null);
} else if (PlayerState.ENDED === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.ENDED, null);
} else if (PlayerState.ERRORED === playerStateBinding) {
handlePlayerStateChange(VideoPlayerState.PAUSED, null);
}
}
function _fun103412() { // fn#103412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:1873, offset: 0x0226759e, size: 226 bytes, params: 1, frame: 18
const current = env0_13.current;
const value2 = null;
const r6 = value2 != current ? global.Date.now() - env0_13.current : value2;
const handleLoadEndBinding = handleLoadEnd;
const value5 = undefined;
handleLoadEndBinding(r6);
handleFirstFrame(0);
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_LOADING_ENDED = AnalyticEvents.QUEST_VIDEO_LOADING_ENDED;
object3.event = QUEST_VIDEO_LOADING_ENDED;
const object4 = {};
object4.video_asset_id = videoAssetId;
object4.network_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object4.duration = r6;
object4.video_session_id = videoSessionId;
object4.impression_id = value2 == env0_9 ? value5 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value5;
}
function _fun103414() { // fn#103414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:2289, offset: 0x022676b6, size: 190 bytes, params: 1, frame: 17
const binding = env0_13;
const Date = global.Date;
binding.current = Date.now();
const value3 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_LOADING_STARTED = AnalyticEvents.QUEST_VIDEO_LOADING_STARTED;
object3.event = QUEST_VIDEO_LOADING_STARTED;
const object4 = {};
object4.video_asset_id = videoAssetId;
object4.network_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object4.video_session_id = videoSessionId;
object4.is_hls_supported = true;
object4.impression_id = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value3;
}
function _fun103415(a0) { // fn#103415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:2638, offset: 0x02267774, size: 419 bytes, params: 2, frame: 20
var r9;
var current;
var value4;
var value7;
var moduleValue;
var trackQuestEvent;
var object4;
var object5;
var value8;
var moduleValue2;
var object6;
const value = environment.__proto__;
const effectiveConnectionSpeed = NetworkStore.getEffectiveConnectionSpeed();
let binding = env0_14;
if (a0) {
binding.current = global.Date.now();
binding = env0_15;
current = binding.current;
binding.current = current + 1;
value8 = undefined;
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue2.trackQuestEvent;
object4 = {};
object4.questId = questId;
object4.event = AnalyticEvents.QUEST_VIDEO_BUFFERING_STARTED;
object6 = {};
object6.video_asset_id = videoAssetId;
object6.network_connection_speed = effectiveConnectionSpeed;
current = binding.current;
object6.buffer_index = current;
object6.video_session_id = videoSessionId;
object6.impression_id = env0_9 == null ? value8 : env0_9.getId();
object4.properties = object6;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue2, [object4]);
} else {
current = binding.current;
value4 = null;
r9 = value4 != current ? global.Date.now() - env0_14.current : value4;
value7 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object4 = {};
object4.questId = questId;
object4.event = AnalyticEvents.QUEST_VIDEO_BUFFERING_ENDED;
object5 = {};
object5.video_asset_id = videoAssetId;
object5.network_connection_speed = effectiveConnectionSpeed;
object5.duration = r9;
current = env0_15.current;
object5.buffer_index = current;
object5.video_session_id = videoSessionId;
object5.impression_id = value4 == env0_9 ? value7 : env0_9.getId();
object4.properties = object5;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object4]);
}
}
function _fun103416() { // fn#103416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:3282, offset: 0x02267917, size: 186 bytes, params: 1, frame: 17
var value2;
var value3;
var moduleValue;
var trackQuestEvent;
var object3;
var object4;
if (env0_8.current != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object3 = {};
object3.questId = questId;
object3.event = AnalyticEvents.QUEST_VIDEO_TIME_TO_FIRST_FRAME;
object4 = {};
object4.duration_ms = global.Date.now() - env0_8.current;
object4.video_session_id = videoSessionId;
object4.video_asset_id = videoAssetId;
object4.impression_id = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object3]);
}
}
function _fun103417() { // fn#103417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:3555, offset: 0x022679d1, size: 169 bytes, params: 1, frame: 17
const value = environment.__proto__;
const value2 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_RESUMED = AnalyticEvents.QUEST_VIDEO_RESUMED;
object3.event = QUEST_VIDEO_RESUMED;
const object4 = {};
object4.video_timestamp_seconds = env0_7.current;
const VideoPauseReason = (require(6531) /* metro dependency 6531: QuestTypes */).VideoPauseReason;
const PAUSE_BUTTON = VideoPauseReason.PAUSE_BUTTON;
object4.pause_reason = PAUSE_BUTTON;
object4.video_session_id = videoSessionId;
object4.impression_id = env0_9 == null ? value2 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value2;
}
function _fun103418() { // fn#103418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:3833, offset: 0x02267a7a, size: 169 bytes, params: 1, frame: 17
const value = environment.__proto__;
const value2 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_PAUSED = AnalyticEvents.QUEST_VIDEO_PAUSED;
object3.event = QUEST_VIDEO_PAUSED;
const object4 = {};
object4.video_timestamp_seconds = env0_7.current;
const VideoPauseReason = (require(6531) /* metro dependency 6531: QuestTypes */).VideoPauseReason;
const PAUSE_BUTTON = VideoPauseReason.PAUSE_BUTTON;
object4.reason = PAUSE_BUTTON;
object4.video_session_id = videoSessionId;
object4.impression_id = env0_9 == null ? value2 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value2;
}
function _fun103419(a0) { // fn#103419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:4175, offset: 0x02267b23, size: 576 bytes, params: 2, frame: 24
var r1;
var isIOS2;
var defaultImport;
var increment;
const value = environment.__proto__;
const value2 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
let object3 = {};
object3.questId = questId;
const QUEST_VIDEO_ERROR = AnalyticEvents.QUEST_VIDEO_ERROR;
object3.event = QUEST_VIDEO_ERROR;
const object4 = {};
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(duration, env0_7.current ?? 0);
object4.video_error_type = null;
object4.video_asset_id = videoAssetId;
object4.network_connection_speed = null;
object4.video_session_id = videoSessionId;
let code = a0 == null ? value2 : a0.error.code;
object4.video_error_code = code;
object4.video_error_message = (a0 == null ? value2 : a0.error.localizedDescription) ?? (a0 == null ? value2 : a0.error.errorString);
object4.video_network_state = null;
object4.impression_id = env0_9 == null ? value2 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
code = a0 == null ? value2 : a0.error.code;
const errorException = a0 == null ? value2 : a0.error.errorException;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
r1 = !(errorException == null || !errorException.includes('Source error'));
} else {
isIOS2 = platformUtilsModule.isIOS();
r1 = isIOS2 ? code != null : !!isIOS2;
r1 = r1 && env1_7.includes(code);
}
if (r1) {
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
increment = defaultImport.increment;
object3 = {};
object3.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_VIDEO_ERROR;
object3.tags = ['quest_id:' + questId, 'error_type:SOURCE_ERROR'];
Reflect.apply(increment, defaultImport, [object3]);
}
return value2;
}
function _fun103420(a0, a1, a2) { // fn#103420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:5133, offset: 0x02267d63, size: 155 bytes, params: 4, frame: 17
env0_7.current = a2;
const value3 = undefined;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackQuestEvent = analyticsActionsModule.trackQuestEvent;
const object3 = {};
object3.questId = questId;
const QUEST_VIDEO_PROGRESSED = AnalyticEvents.QUEST_VIDEO_PROGRESSED;
object3.event = QUEST_VIDEO_PROGRESSED;
const object4 = {progress: a0, video_timestamp_seconds: a1};
object4.video_session_id = videoSessionId;
object4.impression_id = env0_9 == null ? value3 : env0_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, analyticsActionsModule, [object3]);
return value3;
}
function _fun103407(a0) { // fn#103407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13793:522, offset: 0x0226727b, size: 192 bytes, params: 2, frame: 17
var value2;
var value3;
var moduleValue;
var trackQuestEvent;
var object3;
var object4;
if (env1_7.current != null) {
value2 = environment.__proto__.__proto__;
value3 = undefined;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackQuestEvent = moduleValue.trackQuestEvent;
object3 = {};
object3.questId = questId;
object3.event = a0 === 'active' ? AnalyticEvents.QUEST_VIDEO_APP_FOCUSED : AnalyticEvents.QUEST_VIDEO_APP_UNFOCUSED;
object4 = {};
object4.video_timestamp_seconds = env1_7.current;
object4.video_state = playerState;
object4.video_session_id = videoSessionId;
object4.impression_id = env1_9 == null ? value3 : env1_9.getId();
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackQuestEvent, moduleValue, [object3]);
}
}
@@ -0,0 +1,36 @@
/* Metro module 13529; source: modules/quests/native/VideoQuestModal/icons/SkipBackwardIcon.tsx; dependencies: [31, 33, 7744, 2] */
function _fun102848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13719:6, offset: 0x0224b395, size: 147 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/icons/SkipBackwardIcon.tsx');
exports.SkipBackwardIcon = SkipBackwardIcon;
}
function SkipBackwardIcon(a0) { // fn#102849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13719:248, offset: 0x0224b428, size: 325 bytes, params: 2, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
let object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const defaultImportProps = {...value};
defaultImportProps['width'] = width;
defaultImportProps['height'] = height;
defaultImportProps['viewBox'] = '0 0 32 32';
defaultImportProps['fill'] = 'none';
const Path = (require(7744) /* metro dependency 7744 */).Path;
object = [<Path d="M169.545 229.312v7.919l14.838-10.253v46.348h7.669v-55.434h-6.169l-16.338 11.42ZM225.979 274.576c13.087 0 21.34-11.003 21.34-28.842 0-17.756-8.253-29.093-21.34-29.093-13.004 0-21.173 11.254-21.173 29.009 0 17.923 8.169 28.926 21.173 28.926Zm0-7.335c-8.419 0-13.004-8.336-13.004-21.591 0-13.087 4.585-21.673 13.004-21.673 8.503 0 13.171 8.669 13.171 21.757 0 13.171-4.668 21.507-13.171 21.507Z" fill={color} fillRule="nonzero" transform="translate(-25.102 -30.774) scale(.19361)" />];
object[1] = <Path d="M137.108 31.459a160.22 160.22 0 0 0-30.316-2.894c-88.439 0-160.24 71.801-160.24 160.241 0 88.439 71.801 160.24 160.24 160.24 88.499 0 160.241-71.742 160.241-160.24h-31.365c0 71.176-57.699 128.876-128.876 128.876-71.128 0-128.876-57.748-128.876-128.876 0-71.129 57.748-128.877 128.876-128.877 8.183 0 16.347.78 24.382 2.328l5.934-30.798Z" fill={color} transform="matrix(-.0886 .03775 .03775 .0886 17.716 -4.317)" />;
object[2] = <Path d="M144.616 190.007V96.608l197.822 69.184-197.822 69.185v-44.97Z" fill={color} transform="matrix(-.0222 .01458 .04451 .06777 3.48 -8.53)" />;
return ((Component) => <Component {...defaultImportProps}>{object}</Component>)(defaultImport);
}
@@ -0,0 +1,39 @@
/* Metro module 13530; source: modules/quests/native/VideoQuestModal/icons/SkipForwardIcon.tsx; dependencies: [31, 33, 7744, 2] */
function _fun102850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13720:6, offset: 0x0224b56d, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_3 = value2.jsx;
const env0_4 = value2.jsxs;
value = value.forwardRef(_fun102851);
value.displayName = 'SkipForwardIcon';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/icons/SkipForwardIcon.tsx');
exports.SkipForwardIcon = value;
}
function _fun102851(a0, a1) { // fn#102851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13720:149, offset: 0x0224b615, size: 337 bytes, params: 3, frame: 23
let width = a0.width;
width = width === undefined ? 24 : width;
let height = a0.height;
height = height === undefined ? 24 : height;
let color = a0.color;
color = color === undefined ? 'currentColor' : color;
let object = {'width': 0, 'height': 0, 'color': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const defaultImportProps = {...value};
defaultImportProps['width'] = width;
defaultImportProps['height'] = height;
defaultImportProps['viewBox'] = '0 0 32 32';
defaultImportProps['fill'] = 'none';
defaultImportProps['ref'] = a1;
const Path = (require(7744) /* metro dependency 7744 */).Path;
object = [<Path d="M169.545 229.312v7.919l14.838-10.253v46.348h7.669v-55.434h-6.169l-16.338 11.42ZM225.979 274.576c13.087 0 21.34-11.003 21.34-28.842 0-17.756-8.253-29.093-21.34-29.093-13.004 0-21.173 11.254-21.173 29.009 0 17.923 8.169 28.926 21.173 28.926Zm0-7.335c-8.419 0-13.004-8.336-13.004-21.591 0-13.087 4.585-21.673 13.004-21.673 8.503 0 13.171 8.669 13.171 21.757 0 13.171-4.668 21.507-13.171 21.507Z" fill={color} fillRule="nonzero" transform="translate(-24.102 -30.774) scale(.19361)" />];
object[1] = <Path d="M137.108 31.459a160.22 160.22 0 0 0-30.316-2.894c-88.439 0-160.24 71.801-160.24 160.241 0 88.439 71.801 160.24 160.24 160.24 88.499 0 160.241-71.742 160.241-160.24h-31.365c0 71.176-57.699 128.876-128.876 128.876-71.128 0-128.876-57.748-128.876-128.876 0-71.129 57.748-128.877 128.876-128.877 8.183 0 16.347.78 24.382 2.328l5.934-30.798Z" fill={color} transform="matrix(.0886 .03775 -.03775 .0886 14.284 -4.317)" />;
object[2] = <Path d="M144.616 190.007V96.608l197.822 69.184-197.822 69.185v-44.97Z" fill={color} transform="matrix(.0222 .01458 -.04451 .06777 28.52 -8.53)" />;
return ((Component) => <Component {...defaultImportProps}>{object}</Component>)(defaultImport);
}
@@ -0,0 +1,29 @@
/* Metro module 13595; source: modules/quests/native/VideoQuestModal/openVideoQuestModal.tsx; dependencies: [491, 5080, 13596, 1962, 9522, 2] */
function _fun103326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:6, offset: 0x022624f1, size: 110 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/openVideoQuestModal.tsx');
exports.default = openVideoQuestModal;
}
function openVideoQuestModal({questId, sourceQuestContent, questContentPosition, initialStep}) { // fn#103327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:98, offset: 0x0226255f, size: 202 bytes, params: 2, frame: 24
const value2 = importAll(dependencyMap[0]).v4();
const defaultImport = importDefault(dependencyMap[1]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[3]);
value = value(dependencyMap[2], dependencyMap.paths);
const object2 = {questId: questId, questContentPosition: questContentPosition, videoSessionId: value2,
initialStep: initialStep, onClose: onClose_103328, sourceQuestContent: sourceQuestContent};
const moduleValue2 = require(dependencyMap[4]);
const getVideoQuestModalKey = moduleValue2.getVideoQuestModalKey;
return Reflect.apply(pushLazy, defaultImport, [value, object2, Reflect.apply(getVideoQuestModalKey, moduleValue2,
[questId])]);
}
function openVideoQuestModalOnClose() { // fn#103328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13785:344, owner: openVideoQuestModal.onClose, offset: 0x02262629, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(9522) /* metro dependency 9522: VideoQuestUtils */).handleVideoQuestModalClose({questId: questId,
sourceQuestContent: sourceQuestContent, videoSessionId: env0_2});
}
@@ -0,0 +1,48 @@
/* Metro module 13627; source: modules/quests/native/VideoQuestModal/useVideoQuestClickCtaAndMaybeCloseModal.tsx; dependencies: [31, 1471, 9505, 9520, 6531, 7120, 2] */
function _fun104074(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:6, offset: 0x02283765, size: 121 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/useVideoQuestClickCtaAndMaybeCloseModal.tsx');
exports.useVideoQuestClickCtaAndMaybeCloseModal = function(a0) {
var quest = a0.quest;
var env0_0 = quest;
var onClose = a0.onClose;
var env0_1 = onClose;
var sourceQuestContent = a0.sourceQuestContent;
var env0_2 = sourceQuestContent;
var impressionId = a0.impressionId;
return impressionId.useCallback(_fun104076, [quest, impressionId, sourceQuestContent, onClose]);
};
}
function useVideoQuestClickCtaAndMaybeCloseModal({quest, onClose, sourceQuestContent, impressionId}) { // fn#104075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:263, offset: 0x022837de, size: 92 bytes, params: 2, frame: 17
return impressionId.useCallback(_fun104076, [quest, impressionId, sourceQuestContent, onClose]);
}
function _fun104076() { // fn#104076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13824:391, offset: 0x0228383a, size: 205 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
const isDiscordUrl = defaultImport.isDiscordUrl;
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
const getCtaLink = questCopyUtilsModule.getCtaLink;
if (Reflect.apply(isDiscordUrl, defaultImport, [Reflect.apply(getCtaLink, questCopyUtilsModule, [quest.config]),
true])) {
onClose();
}
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openGameLinkDirectly = value.openGameLinkDirectly;
questBinding = quest;
const object2 = {};
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object2.content = VIDEO_MODAL_MOBILE;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object2.ctaContent = OPEN_GAME_LINK;
object2.impressionId = impressionId;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openGameLinkDirectly, value, [questBinding, object2]);
}