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,52 @@
/* Metro module 13516; source: modules/quests/native/BountiesModal/BountiesModal.tsx; dependencies: [31, 6528, 33, 9530, 13517, 13552, 7717, 10121, 2] */
function _fun102687(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:6, offset: 0x02244d47, size: 174 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 env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(BountiesModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModal.tsx');
exports.default = value;
}
function BountiesModal({bountyId, sourceQuestContent}) { // fn#102688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:186, offset: 0x02244df5, size: 218 bytes, params: 2, frame: 20
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]).verticalScrollEnabled;
const binding = env0_3;
const value2 = binding.useMemo(function() {
return {['bounty_main']: {fullscreen: true, headerLeft: _fun102690, render: _fun102691}};
}, [bountyId, sourceQuestContent, verticalScrollEnabled]);
binding.useLayoutEffect(_fun102692, []);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return (
<Modal
hideTitle
initialRouteName="bounty_main"
screens={value2}
viewStyle={{backgroundColor: '#000000'}}
/>
);
}
function _fun102689() { // fn#102689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:361, offset: 0x02244ecf, size: 50 bytes, params: 1, frame: 4
return {['bounty_main']: {fullscreen: true, headerLeft: function() {
return null;
}, render: render_102691}};
}
function _fun102692() { // fn#102692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:508, offset: 0x02244f4d, 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_102691() { // fn#102691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:413, offset: 0x02244f01, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bountyId={bountyId} sourceQuestContent={sourceQuestContent} />)(importDefault(verticalScrollEnabled ? dependencyMap[4] : dependencyMap[5]));
}
@@ -0,0 +1,25 @@
/* Metro module 13515; source: modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx; dependencies: [5080, 13516, 1962, 2] */
function _fun102684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:6, offset: 0x02244c2c, size: 134 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {showModal: showModal_102685, hideModal: hideModal_102686};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx');
exports.default = object2;
exports.BOUNTIES_MODAL_KEY = 'BOUNTIES_MODAL';
}
function showModal_102685({bountyId, sourceQuestContent}) { // fn#102685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:118, offset: 0x02244cb2, size: 106 bytes, params: 2, frame: 18
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {bountyId: bountyId, sourceQuestContent: sourceQuestContent},
'BOUNTIES_MODAL']);
}
function hideModal_102686() { // fn#102686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:240, offset: 0x02244d1c, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('BOUNTIES_MODAL');
}
@@ -0,0 +1,176 @@
/* Metro module 13541; source: modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx; dependencies: [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121, 7120, 6533, 7976, 5475, 4573, 4578, 2] */
function _fun102904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:6, offset: 0x0224e35b, size: 294 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['style'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const Pressable = value.Pressable;
const env0_6 = value.StyleSheet;
const env0_7 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102905);
object = {code: 'function BountiesModalAdvertiserCtaTsx1(){const{withTiming,interpolate,visibility,visible,timingStandard,timingFast}=this.__closure;return{transform:[{translateY:withTiming(interpolate(visibility,[0,1],[8,0]),visible?timingStandard:timingFast)}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx');
exports.default = BountiesModalAdvertiserCta;
}
function _fun102905() { // fn#102905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:268, offset: 0x0224e481, size: 435 bytes, params: 1, frame: 18
const object7 = {};
const object8 = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': null,
'paddingBottom': null, 'alignItems': 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingBottom = PX_16;
object7.outerContainer = object8;
const object9 = {};
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object9, SHADOW_TOP_HIGH, undefined);
object9['alignSelf'] = 'stretch';
object9['borderWidth'] = 1;
object9['borderColor'] = 'transparent';
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9['overflow'] = 'hidden';
object7.ctaPressable = object9;
const object10 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingLeft = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object10.paddingRight = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.gap = PX_12;
object7.cta = object10;
const object11 = {'width': 40, 'height': 40, 'backgroundColor': null, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object11.backgroundColor = BACKGROUND_SURFACE_HIGH;
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object7.ctaLogoContainer = object11;
const object12 = {};
copyDataProperties(object12, StyleSheet.absoluteFillObject, 'hidden');
object7.ctaLogo = object12;
object7.ctaInfo = {'flex': 1, 'justifyContent': 'center', 'gap': 2};
return object7;
}
function BountiesModalAdvertiserCta({bounty, visible, sourceQuestContent}) { // fn#102906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1248, offset: 0x0224e634, size: 1117 bytes, params: 2, frame: 31
var r0;
var View2;
var label;
var BackgroundBlurView;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
const env0_4 = undefined;
const styles = useStyles();
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
const r20 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 40, 'height': 40, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
const object2 = {visible: visible};
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule,
[object2]);
const r19 = visible ? 1 : 0;
const env0_3 = r19;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountiesModalAdvertiserCtaB;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
interpolate: reanimatedRexportModule.interpolate, visibility: r19, visible: visible,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard,
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
closure.__workletHash = 4075229418021;
closure.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value9 = reanimatedRexportModule.useSharedValue(0);
const value10 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonPressAnimationProps(value9);
const style = value10.style;
let binding = env0_4;
const value11 = binding(value10, env0_3);
binding = env0_5;
let useCallback = binding.useCallback;
const value12 = Reflect.apply(useCallback, binding, [_fun102908, [bounty.id, bounty.cta, sourceQuestContent]]);
const value13 = binding.useCallback(_fun102909, [value12]);
useCallback = binding.useCallback;
if (shouldRender) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.outerContainer, opacityStyle, value8]};
binding = env0_10;
var bindingProps = {...value11};
bindingProps['onPress'] = value13;
bindingProps['accessibilityRole'] = 'button';
label = bountyCtaInfo.label;
bindingProps['accessibilityLabel'] = label;
bindingProps['style'] = [styles.ctaPressable, style];
BackgroundBlurView = (require(7976) /* metro dependency 7976: BackgroundBlurViewNative */).BackgroundBlurView;
var backgroundBlurViewProps = {blurTheme: 'dark', style: styles.cta, pressed: value9};
items3 = [<View style={styles.ctaLogoContainer}>{((Component) => <Component source={{uri: r20}} style={styles.ctaLogo} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>];
var viewBindingProps2 = {style: styles.ctaInfo};
label = bountyCtaInfo.label;
items4 = [<Text lineClamp={2} variant="text-sm/semibold" color="text-default">{label}</Text>];
items4[1] = <Text variant="text-xs/medium" color="text-default">{bountyCtaInfo.subtext}</Text>;
items3[1] = <View {...viewBindingProps2}>{items4}</View>;
items3[2] = <View accessible={false} importantForAccessibility="no-hide-descendants">{((Button) => <Button variant="primary-overlay" text={bountyCtaInfo.buttonLabel} size="sm" onPress={Reflect.apply(useCallback,
binding, [_fun102910,
[value12]])} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <View2 {...view2Props}>{((Component) => <Component {...bindingProps}><BackgroundBlurView {...backgroundBlurViewProps}>{items3}</BackgroundBlurView></Component>)(binding)}</View2>;
} else {
r0 = shouldRender;
}
return r0;
}
function BountiesModalAdvertiserCtaB() { // fn#102907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1661, owner: BountiesModalAdvertiserCta.b, offset: 0x0224ea91, size: 152 bytes, params: 1, frame: 22
let value = environment.__proto__;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value3 = reanimatedRexportModule.interpolate(env0_3, [0, 1], [8, 0]);
const visibleBinding = visible;
value = require(4507) /* metro dependency 4507: timingPresets */;
return {transform: [{translateY: Reflect.apply(withTiming, timingModule, [value3,
visibleBinding ? value.timingStandard : value.timingFast])}]};
}
function _fun102908(a0) { // fn#102908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2121, offset: 0x0224eb29, size: 145 bytes, params: 2, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object2 = {};
const bountyBinding = bounty;
object2.adContentId = bountyBinding.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
object2.cta = bountyBinding.cta;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
Reflect.apply(openAdGameLinkDirectly, value, [object2, {content: a0, ctaContent: OPEN_GAME_LINK,
sourceQuestContent: sourceQuestContent}]);
}
function _fun102909() { // fn#102909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2352, offset: 0x0224ebba, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
binding(VIDEO_MODAL_MOBILE);
}
function _fun102910() { // fn#102910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2425, offset: 0x0224ebed, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_MOBILE_FOOTER = QuestContent.VIDEO_MODAL_MOBILE_FOOTER;
binding(VIDEO_MODAL_MOBILE_FOOTER);
}
@@ -0,0 +1,45 @@
/* Metro module 13550; source: modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx; dependencies: [31, 33, 4501, 697, 5278, 1244, 5312, 2] */
function _fun102933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:6, offset: 0x022500f2, size: 171 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 env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102934);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx');
exports.default = BountiesModalCloseButton;
}
function _fun102934() { // fn#102934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:142, offset: 0x0225019d, size: 130 bytes, params: 1, frame: 15
const object = {'alignItems': 'center', 'justifyContent': 'center'};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.height = PX_32;
return {closeButton: object};
}
function BountiesModalCloseButton({onPress}) { // fn#102935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:480, offset: 0x0225021f, size: 209 bytes, params: 2, frame: 21
const styles = useStyles();
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 XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
accessibilityRole="button"
hitSlop={12}
onPress={onPress}
style={styles.closeButton}
>
<XSmallIcon size="sm" color={CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} />
</PressableOpacity>
);
}
@@ -0,0 +1,8 @@
/* Metro module 13535; source: modules/quests/native/BountiesModal/BountiesModalConstants.tsx; dependencies: [2] */
function _fun102866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13725:6, offset: 0x0224c002, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalConstants.tsx');
exports.BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS = 10000;
}
@@ -0,0 +1,384 @@
/* Metro module 13552; source: modules/quests/native/BountiesModal/BountiesModalContent.tsx; dependencies: [5, 31, 27, 7092, 6528, 661, 482, 33, 1478, 1585, 4501, 697, 566, 10069, 9530, 13533, 13537, 9532, 13534, 13536, 7110, 7121, 7120, 6533, 9522, 13515, 13538, 10183, 13553, 13550, 6618, 13554, 9483, 3868, 2] */
function _fun102937(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:6, offset: 0x022503b2, size: 338 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_9 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102952);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalContent.tsx');
exports.default = BountiesModalContent;
}
function BountiesModalContentInner({bounty, sourceQuestContent}) { // fn#102938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:648, offset: 0x02250504, size: 1397 bytes, params: 2, frame: 45
let env0_4 = undefined;
const styles = useStyles();
const value2 = useBountiesModalVideoLayout();
const env0_3 = value2;
const value3 = env0_4.useMemo(_fun102941, [styles.videoWrapper, value2]);
const value4 = env0_4.useMemo(_fun102942, [styles.closeButton, value2.top, value2.left, value2.width]);
const value5 = env0_4.useMemo(_fun102943, [styles.bottomContainer, styles.bottomContainerFullWidth,
styles.bottomContainerNotFullWidth, value2.isFullWidth, value2.left, value2.width]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {enabled, loopingEnabled, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const BountyVideoEndMode = (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode;
const r19 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD;
const r7 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
env0_4 = r7;
const {initialProgress, handleProgress,
flushProgress} = (require(13537) /* metro dependency 13537: useBountyVideoProgressPersistence */).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r19});
const value12 = env0_4.useCallback(env0_3(_fun102946), [bounty.id, sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (require(13536) /* metro dependency 13536: useBountiesModalVideoAnalytics */).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r7});
const value14 = env0_4.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
const useBountiesModalTimingModule = require(13533) /* metro dependency 13533: useBountiesModalTiming */;
const useBountiesModalTiming = useBountiesModalTimingModule.useBountiesModalTiming;
let duration = initialProgress.duration;
duration = duration > 0 ? initialProgress.duration : null;
const {isCtaVisible, isEndCardVisible, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed,
rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, maxVideoProgressSeconds,
videoDuration} = Reflect.apply(useBountiesModalTiming, useBountiesModalTimingModule, [{endMode: r19,
rewardDurationMs: r7, isCompleted: value6, onRewardEarned: value12, onVideoProgress: value14,
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics,
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
initialVideoDurationSec: duration}]);
const value17 = env0_4.useCallback(_fun102948, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
videoDuration, flushProgress]);
const value18 = env0_4.useCallback(_fun102949, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
videoDuration, flushProgress]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const BountyVideo = (require(13538) /* metro dependency 13538: BountyVideo */).BountyVideo;
const items2 = [<View style={value3}><BountyVideo isActive bounty={bounty} sourceQuestContent={sourceQuestContent} isCompleted={value6} isCtaVisible={isCtaVisible} isEndCardVisible={isEndCardVisible} isProgressBarVisible={!isEndCardVisible} orbsBalance={balance} handleVideoEnd={handleVideoEnd} handleVideoProgress={handleVideoProgress} handleVideoPaused={handleVideoPaused} handleVideoResumed={handleVideoResumed} rewardRemainingSeconds={rewardRemainingSeconds} rewardTotalSeconds={rewardTotalSeconds} normalizedProgress={normalizedProgress} repeat={loopingEnabled} initialProgress={initialProgress} renderEndCard={renderEndCard} /></View>];
items2[1] = <View style={value4}>{((Component) => <Component onPress={value17} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */)}</View>;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
items2[2] = <SafeAreaPaddingView left={value2.isFullWidth} right={value2.isFullWidth} bottom style={value5} pointerEvents="box-none">{((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} onClose={value18} />)(importDefault(13554) /* metro dependency 13554: BountiesModalEndedCtaButtons */)}</SafeAreaPaddingView>;
return (
<>
{items2}
</>
);
}
function _fun102952() { // fn#102952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:300, offset: 0x0225113b, size: 199 bytes, params: 1, frame: 15
const object2 = {};
object2.videoWrapper = {position: 'absolute'};
object2.closeButton = {position: 'absolute'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.bottomContainer = {'position': 'absolute', 'bottom': null, 'justifyContent': 'flex-end', bottom: PX_24};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.left = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.right = PX_16;
object2.bottomContainerFullWidth = object3;
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingLeft = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingRight = PX_16;
object2.bottomContainerNotFullWidth = object4;
return object2;
}
function BountiesModalContent({bountyId, sourceQuestContent}) { // fn#102953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5002, offset: 0x02251202, size: 280 bytes, params: 2, frame: 22
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
const useQuestHomeBounties = questHooksModule.useQuestHomeBounties;
const value2 = Reflect.apply(useQuestHomeBounties, questHooksModule, []).questHomeBounties.find(function({id}) {
return id === bountyId;
});
if (value2 == null) {
return null;
} else {
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<ThemeContextProvider theme={ThemeTypes.DARKER}>
{((QuestContentImpressionTrackerNative) => <QuestContentImpressionTrackerNative adContentId={value2.id} adCreativeType={(require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY} questContent={(require(6533) /* metro dependency 6533: QuestContent */).QuestContent.VIDEO_MODAL_MOBILE} sourceQuestContent={sourceQuestContent} overrideVisibility>{children_102955}</QuestContentImpressionTrackerNative>)((require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative)}
</ThemeContextProvider>
);
}
}
function useBountiesModalVideoLayout() { // fn#102939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:728, owner: BountiesModalContentInner.useBountiesModalVideoLayout, offset: 0x02250a79, size: 141 bytes, params: 1, frame: 17
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
return env1_4.useMemo(_fun102940, [width, height, value3.top, value3.bottom, value3.left, value3.right]);
}
function _fun102941() { // fn#102941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1099, offset: 0x02250be2, size: 69 bytes, params: 1, frame: 4
const binding = env0_3;
return [styles.videoWrapper, {top: binding.top, left: binding.left, width: binding.width, height: binding.height}];
}
function _fun102942() { // fn#102942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1208, offset: 0x02250c27, size: 146 bytes, params: 1, frame: 17
const items2 = [styles.closeButton];
const object2 = {};
const binding = env0_3;
const top = binding.top;
let value = environment.__proto__;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.top = top + PX_8;
value = binding.left + binding.width;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
value -= PX_32;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.left = value - PX_8;
items2[1] = object2;
return items2;
}
function _fun102943() { // fn#102943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1373, offset: 0x02250cb9, size: 97 bytes, params: 1, frame: 6
const isFullWidth = env0_3.isFullWidth;
const stylesBinding = styles;
const bottomContainer = stylesBinding.bottomContainer;
return isFullWidth ? [bottomContainer, stylesBinding.bottomContainerFullWidth] : [bottomContainer,
stylesBinding.bottomContainerNotFullWidth, {left: env0_3.left, width: env0_3.width}];
}
function* _fun102946() { // fn#102946, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:2133, offset: 0x02250d45, size: 121 bytes, params: 1, frame: 14
var binding;
var binding2;
var property;
var value3;
var claimBountyReward;
var id;
var value5;
var value6;
var value7;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
property = binding2[17];
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
claimBountyReward = value3.claimBountyReward;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
id = require.id;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
try {
value5 = Reflect.apply(claimBountyReward, value3, [id, importDefault]);
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_0;
value = binding(env2_2[18]);
value.openBountyRewardClaimErrorToast(error);
return undefined;
}
if (value7) {
return value6;
}
}
}
function _fun102948() { // fn#102948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3138, offset: 0x02250de3, size: 325 bytes, params: 1, frame: 22
const value = environment.__proto__;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object3 = {};
object3.adContentId = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object3.event = AD_VIDEO_MODAL_CLOSED;
const object4 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
let VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [VIDEO_MODAL_MOBILE]);
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object4.content_id = VIDEO_MODAL_MOBILE;
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object4.threshold_met = 1000 * maxVideoProgressSeconds >= env0_4;
object4.reward_timer_seconds = env0_4 / 1000;
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
flushProgress();
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
}
function _fun102949() { // fn#102949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3621, offset: 0x02250f28, size: 311 bytes, params: 1, frame: 22
const value = environment.__proto__;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object3 = {};
object3.adContentId = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object3.event = AD_VIDEO_MODAL_CLOSED;
const object4 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
let VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [VIDEO_MODAL_END_CARD]);
VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object4.content_id = VIDEO_MODAL_END_CARD;
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object4.threshold_met = true;
object4.reward_timer_seconds = env0_4 / 1000;
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
flushProgress();
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
}
function BountiesModalContentInnerRenderEndCard() { // fn#102950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4468, owner: BountiesModalContentInner.renderEndCard, offset: 0x0225105f, size: 151 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_END_CARD}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isEndCardVisible}
>
{children_102951}
</QuestContentImpressionTrackerNative>
);
}
function BountiesModalContentChildren() { // fn#102955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5437, owner: BountiesModalContent.children, offset: 0x0225131a, size: 44 bytes, params: 1, frame: 14
return <BountiesModalContentInner bounty={env0_2} sourceQuestContent={sourceQuestContent} />;
}
function _fun102940() { // fn#102940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:834, offset: 0x02250b06, size: 220 bytes, params: 1, frame: 20
var r1;
var r4;
var r6;
var value9;
const widthBinding = width;
let binding = env0_2;
const value3 = widthBinding - binding.left - binding.right;
const value5 = height - binding.top - binding.bottom;
const value7 = value3 / env2_13;
if (value7 > value5) {
value9 = value5 * env2_13;
r1 = false;
r4 = value5;
r6 = value9;
} else {
r1 = true;
r4 = value7;
r6 = value3;
}
const object2 = {};
let Math = global.Math;
const floor = Math.floor;
binding = env0_2;
object2.top = Reflect.apply(floor, Math, [binding.top + (value5 - r4) / 2]);
Math = global.Math;
object2.left = Math.floor(binding.left + (value3 - r6) / 2);
Math = global.Math;
object2.width = Math.floor(r6);
Math = global.Math;
object2.height = Math.floor(r4);
object2.isFullWidth = r1;
return object2;
}
function renderEndCardChildren_102951() { // fn#102951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4690, owner: BountiesModalContentInner.renderEndCard.children, offset: 0x022510f6, size: 69 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13553) /* metro dependency 13553: BountiesModalEndCard */);
}
@@ -0,0 +1,879 @@
/* Metro module 13517; source: modules/quests/native/BountiesModal/BountiesModalContentScroll.tsx; dependencies: [57, 31, 27, 7092, 6528, 661, 1376, 33, 478, 697, 4501, 4017, 1478, 1585, 13518, 9483, 9530, 566, 13520, 1365, 7013, 491, 7110, 7120, 13521, 9484, 7121, 6533, 9522, 13515, 13522, 13544, 13545, 10183, 13546, 8416, 13550, 3880, 13551, 2] */
function _fun102693(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6, offset: 0x02244f89, size: 790 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 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
let value = require(6528) /* metro dependency 6528: QuestConstants */;
const env0_7 = value.DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
const env0_8 = value.QuestsExperimentLocations;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid();
const env0_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object = {code: 'function isScrollEventInBounds_BountiesModalContentScrollTsx1(event){const maxOffset=Math.max(0,event.contentSize.height-event.layoutMeasurement.height);return event.contentOffset.y>=0&&event.contentOffset.y<=maxOffset;}'};
const env0_20 = _fun102745();
const env0_21 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102747);
object = {code: 'function BountiesModalContentScrollTsx2(){const{scrollY,index,slotHeight,interpolate,FADE_DEADBAND,Extrapolation}=this.__closure;const distance=Math.abs(scrollY.get()-index*slotHeight)/slotHeight;return{opacity:interpolate(distance,[0,FADE_DEADBAND,1],[1,1,0],Extrapolation.CLAMP)};}'};
object = {code: 'function BountiesModalContentScrollTsx3(event){const{scrollY,isDraggingSharedValue,isScrollingInBoundsSharedValue,isScrollEventInBounds}=this.__closure;scrollY.set(event.contentOffset.y);if(isDraggingSharedValue.get()){isScrollingInBoundsSharedValue.set(isScrollEventInBounds(event));}}'};
object = {code: 'function BountiesModalContentScrollTsx4(event){const{isDraggingSharedValue,isScrollingInBoundsSharedValue,isScrollEventInBounds}=this.__closure;isDraggingSharedValue.set(true);isScrollingInBoundsSharedValue.set(isScrollEventInBounds(event));}'};
object = {code: 'function BountiesModalContentScrollTsx5(){const{isDraggingSharedValue,IS_ANDROID,isScrollingInBoundsSharedValue}=this.__closure;isDraggingSharedValue.set(false);if(!IS_ANDROID){isScrollingInBoundsSharedValue.set(false);}}'};
object = {code: 'function BountiesModalContentScrollTsx6(event){const{showRecapPullZone,runOnJS,handleRecapMomentumEnd,isScrollingInBoundsSharedValue}=this.__closure;if(showRecapPullZone){runOnJS(handleRecapMomentumEnd)(event);}isScrollingInBoundsSharedValue.set(false);}'};
object = {code: 'function BountiesModalContentScrollTsx7(){const{scrollY,slotHeight,lastBountyIndex}=this.__closure;return Math.min(Math.max(Math.round(scrollY.get()/slotHeight),0),lastBountyIndex);}'};
object = {code: 'function BountiesModalContentScrollTsx8(next,prev){const{runOnJS,commitSwipe}=this.__closure;if(next!==prev){runOnJS(commitSwipe)(next);}}'};
object = {code: 'function BountiesModalContentScrollTsx9(){const{showRecapPullZone,scrollY,lastBountyScrollOffset,RECAP_SNAP_EPSILON}=this.__closure;return showRecapPullZone&&scrollY.get()>=lastBountyScrollOffset-RECAP_SNAP_EPSILON;}'};
object = {code: 'function BountiesModalContentScrollTsx10(show,previousShow){const{runOnJS,setShowRecapFooter}=this.__closure;if(show!==previousShow){runOnJS(setShowRecapFooter)(show);}}'};
object = {code: 'function BountiesModalContentScrollTsx11(){const{showRecapPullZone,scrollY,lastBountyScrollOffset}=this.__closure;return showRecapPullZone&&scrollY.get()>lastBountyScrollOffset;}'};
object = {code: 'function BountiesModalContentScrollTsx12(revealed,previousRevealed){const{runOnJS,setIsRecapPageRevealed}=this.__closure;if(revealed!==previousRevealed){runOnJS(setIsRecapPageRevealed)(revealed);}}'};
object = {code: 'function BountiesModalContentScrollTsx13(){const{showRecapPullZone,scrollY,fullRecapScrollOffset,RECAP_SNAP_EPSILON}=this.__closure;return showRecapPullZone&&scrollY.get()>=fullRecapScrollOffset-RECAP_SNAP_EPSILON;}'};
object = {code: 'function BountiesModalContentScrollTsx14(onTop,previousOnTop){const{runOnJS,setIsRecapPageOnTop}=this.__closure;if(onTop!==previousOnTop){runOnJS(setIsRecapPageOnTop)(onTop);}}'};
object = {code: 'function BountiesModalContentScrollTsx15(){const{getRevealProgress,scrollY,lastBountyScrollOffset,recapRevealHeight}=this.__closure;return getRevealProgress(scrollY.get(),lastBountyScrollOffset,recapRevealHeight);}'};
object = {code: 'function BountiesModalContentScrollTsx16(){const{interpolate,recapPullProgress,Extrapolation}=this.__closure;return{opacity:interpolate(recapPullProgress.get(),[0,1],[0,1],Extrapolation.CLAMP)};}'};
object = {code: 'function BountiesModalContentScrollTsx17(){const{interpolate,recapPullProgress,FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS,Extrapolation}=this.__closure;return{opacity:interpolate(recapPullProgress.get(),[FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS],[1,0],Extrapolation.CLAMP)};}'};
object = {code: 'function BountiesModalContentScrollTsx18(){const{scrollY,lastBountyScrollOffset,slotHeight,recapPullProgress,getRevealProgress,recapRevealHeight,interpolate,FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS,Extrapolation}=this.__closure;const progress=scrollY.get()>=lastBountyScrollOffset-slotHeight/2?recapPullProgress.get():getRevealProgress(scrollY.get(),0,recapRevealHeight);return{opacity:interpolate(progress,[FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS],[1,0],Extrapolation.CLAMP)};}'};
object = {code: 'function BountiesModalContentScrollTsx19(){const{recapPullProgress,FOOTER_FADE_END_PROGRESS}=this.__closure;return recapPullProgress.get()<FOOTER_FADE_END_PROGRESS;}'};
object = {code: 'function BountiesModalContentScrollTsx20(pressable,previousPressable){const{runOnJS,setIsCloseButtonPressable}=this.__closure;if(pressable!==previousPressable){runOnJS(setIsCloseButtonPressable)(pressable);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalContentScroll.tsx');
exports.default = BountiesModalContentScroll;
}
function ItemSeparator_102694({trailingItem}) { // fn#102694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:391, offset: 0x0224529f, size: 55 bytes, params: 2, frame: 15
const value = null;
return value == trailingItem ? value : <View style={{height: PX_8}} />;
}
function BountiesScrollVideoItemContainer({index, slotHeight, scrollY, style, children}) { // fn#102696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:1581, offset: 0x022452d6, size: 244 bytes, params: 2, frame: 23
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountiesScrollVideoItemContainerI;
const object2 = {scrollY: scrollY, index: index, slotHeight: slotHeight};
object2.interpolate = reanimatedRexportModule.interpolate;
object2.FADE_DEADBAND = 0.3;
const Extrapolation = reanimatedRexportModule.Extrapolation;
object2.Extrapolation = Extrapolation;
closure.__closure = object2;
closure.__workletHash = 15300322839358;
closure.__initData = env0_22;
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[style, value2]}>
{children}
</View>
);
}
function BountiesModalContentScrollInner({initialBountyId, sourceQuestContent}) { // fn#102698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6344, offset: 0x0224545b, size: 4162 bytes, params: 2, frame: 59
var object3;
const styles = useStyles();
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const env0_3 = height;
let binding = env0_4;
const value3 = binding.useRef(null);
binding = env0_4;
const useState = binding.useState;
const BOUNTIES_MODAL_BASE_FOOTER_HEIGHT = (require(13518) /* metro dependency 13518: BountiesScrollPromptFooter */).BOUNTIES_MODAL_BASE_FOOTER_HEIGHT;
const value5 = env0_3(Reflect.apply(useState, binding, [BOUNTIES_MODAL_BASE_FOOTER_HEIGHT]), 2);
let property = value5[0];
var env0_4 = value5[1];
binding = env0_4;
let closure = _fun102699;
const value6 = binding.useCallback(closure, []);
const value7 = useBountiesScrollVideoLayout({footerHeight: property});
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
const useQuestHomeBounties = questHooksModule.useQuestHomeBounties;
const env0_6 = Reflect.apply(useQuestHomeBounties, questHooksModule, []).questHomeBounties;
property = env0_3(env0_4.useState(_fun102702), 1)[0];
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {orbAmount, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], _fun102704,
[property, orbAmount]);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], _fun102705,
[property[0], rewardTimerSeconds]);
const height2 = value7.height;
const value12 = height2 + PX_8;
const value13 = property.length - 1;
const env0_13 = value13;
const value14 = value10 > 0;
const value15 = value13 * value12;
const value16 = value15 + height2;
const env0_17 = value16;
const value17 = env0_4.useMemo(_fun102706, [value16, value15, height2]);
const useBountiesRecapScrollModule = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
const useBountiesRecapScroll = useBountiesRecapScrollModule.useBountiesRecapScroll;
const handleRecapMomentumEnd = Reflect.apply(useBountiesRecapScroll, useBountiesRecapScrollModule,
[{listRef: value3, enabled: value14, offsets: value17}]).handleRecapMomentumEnd;
const env0_18 = handleRecapMomentumEnd;
const value18 = env0_4.useMemo(_fun102707, [property, value16, value14, value12]);
const [property3, property4] = env0_3(env0_4.useState(false), 2);
const env0_20 = property4;
const [property5, property6] = env0_3(env0_4.useState(false), 2);
const [property7, property8] = env0_3(env0_4.useState(true), 2);
const env0_23 = property8;
const [property9, property10] = env0_3(env0_4.useState(false), 2);
const env0_24 = property10;
const value28 = env0_3(env0_4.useState(0), 2);
const property11 = value28[0];
const env0_25 = property11;
const env0_26 = value28[1];
const value29 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_27 = value29;
const value30 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_28 = value30;
const value31 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_29 = value31;
const value33 = env0_3((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(property.length > 1 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.BOUNTIES_SWIPE_UP_NUX] : []),
2);
const property12 = value33[0];
const property13 = value33[1];
const env0_30 = property13;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const BOUNTIES_SWIPE_UP_NUX = DismissibleContent.BOUNTIES_SWIPE_UP_NUX;
const r18 = property11 === 0 && property12 === BOUNTIES_SWIPE_UP_NUX;
const env0_31 = r18;
let r13 = value11 && r18;
const value36 = env0_4.useMemo(_fun102709, []);
const env0_32 = value36;
const env0_33 = env0_4.useRef(0);
const env0_34 = env0_4.useRef(0);
env0_4.useEffect(_fun102710, []);
const value37 = env0_4.useCallback(_fun102711, [value36]);
const env0_35 = value37;
const value38 = env0_4.useCallback(_fun102712, [property13, value37, r18]);
const env0_36 = value38;
const env0_37 = (require(13521) /* metro dependency 13521: useBountiesRecapOrbCount */).useBountiesRecapOrbCount({scrollY: value31,
lastBountyScrollOffset: value15, recapRevealHeight: height2, targetOrbAmount: value10, enabled: value14});
env0_4.useEffect(_fun102713, [property, property11]);
const value39 = env0_4.useCallback(_fun102714, [property, property11, rewardTimerSeconds, sourceQuestContent]);
const env0_38 = env0_4.useCallback(_fun102715, [sourceQuestContent]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedScrollHandler = reanimatedRexportModule.useAnimatedScrollHandler;
object3 = {};
closure = onScroll_102716;
closure.__closure = {scrollY: value31, isDraggingSharedValue: value30, isScrollingInBoundsSharedValue: value29,
isScrollEventInBounds: env0_20};
closure.__workletHash = 7942598540397;
closure.__initData = env0_23;
object3.onScroll = closure;
closure = onBeginDrag;
closure.__closure = {isDraggingSharedValue: value30, isScrollingInBoundsSharedValue: value29,
isScrollEventInBounds: env0_20};
closure.__workletHash = 14039038912528;
closure.__initData = env0_24;
object3.onBeginDrag = closure;
closure = onEndDrag;
closure.__closure = {isDraggingSharedValue: value30, IS_ANDROID: env0_13, isScrollingInBoundsSharedValue: value29};
closure.__workletHash = 9975335138319;
closure.__initData = env0_25;
object3.onEndDrag = closure;
closure = onMomentumEnd;
const object2 = {showRecapPullZone: value14};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.handleRecapMomentumEnd = handleRecapMomentumEnd;
object2.isScrollingInBoundsSharedValue = value29;
closure.__closure = object2;
closure.__workletHash = 13684210320337;
closure.__initData = env0_26;
object3.onMomentumEnd = closure;
const value40 = Reflect.apply(useAnimatedScrollHandler, reanimatedRexportModule, [object3]);
const moduleValue11 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue11.useAnimatedReaction;
closure = BountiesModalContentScrollInnerRt;
closure.__closure = {scrollY: value31, slotHeight: value12, lastBountyIndex: value13};
closure.__workletHash = 14048843158960;
closure.__initData = env0_27;
const closure2 = BountiesModalContentScrollInnerSt;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, commitSwipe: value38};
closure2.__workletHash = 14015091539518;
closure2.__initData = env0_28;
Reflect.apply(useAnimatedReaction, moduleValue11, [closure, closure2]);
const moduleValue12 = reanimatedRexportModule;
useAnimatedReaction = moduleValue12.useAnimatedReaction;
closure = BountiesModalContentScrollInnerIt;
object3 = {showRecapPullZone: value14, scrollY: value31, lastBountyScrollOffset: value15};
const RECAP_SNAP_EPSILON = useBountiesRecapScrollModule.RECAP_SNAP_EPSILON;
object3.RECAP_SNAP_EPSILON = RECAP_SNAP_EPSILON;
closure.__closure = object3;
closure.__workletHash = 6584708256992;
closure.__initData = env0_29;
const closure3 = BountiesModalContentScrollInnerAt;
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setShowRecapFooter: property10};
closure3.__workletHash = 10788669301891;
closure3.__initData = env0_30;
Reflect.apply(useAnimatedReaction, moduleValue12, [closure, closure3]);
const moduleValue13 = reanimatedRexportModule;
useAnimatedReaction = moduleValue13.useAnimatedReaction;
closure = BountiesModalContentScrollInnerCt;
closure.__closure = {showRecapPullZone: value14, scrollY: value31, lastBountyScrollOffset: value15};
closure.__workletHash = 6186370630693;
closure.__initData = env0_31;
const closure4 = ut;
closure4.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsRecapPageRevealed: property4};
closure4.__workletHash = 12713474352874;
closure4.__initData = env0_32;
Reflect.apply(useAnimatedReaction, moduleValue13, [closure, closure4]);
const moduleValue14 = reanimatedRexportModule;
useAnimatedReaction = moduleValue14.useAnimatedReaction;
closure = BountiesModalContentScrollInnerDt;
closure.__closure = {showRecapPullZone: value14, scrollY: value31, fullRecapScrollOffset: value16,
RECAP_SNAP_EPSILON: RECAP_SNAP_EPSILON};
closure.__workletHash = 5669564400667;
closure.__initData = env0_33;
const closure5 = BountiesModalContentScrollInner_t;
closure5.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsRecapPageOnTop: property6};
closure5.__workletHash = 8102193741774;
closure5.__initData = env0_34;
Reflect.apply(useAnimatedReaction, moduleValue14, [closure, closure5]);
const value41 = env0_4.useMemo(_fun102728, [height2, value14]);
const value42 = env0_4.useMemo(_fun102729, [styles.listWrapper, value7]);
const value43 = env0_4.useMemo(_fun102730, [value7.top]);
const value44 = env0_4.useMemo(_fun102731, [value7.width, value7.height]);
const env0_39 = value44;
const value45 = env0_4.useMemo(_fun102732, [styles.closeButton, value7.top, value7.left, value7.width]);
const value46 = env0_4.useMemo(_fun102733, [property5, styles.recapPage, value7.top, value7.left, value7.width,
height]);
const moduleValue15 = reanimatedRexportModule;
const useDerivedValue = moduleValue15.useDerivedValue;
closure = BountiesModalContentScrollInnerGt;
const getRevealProgress = useBountiesRecapScrollModule.getRevealProgress;
closure.__closure = {getRevealProgress: getRevealProgress, scrollY: value31, lastBountyScrollOffset: value15,
recapRevealHeight: height2};
closure.__workletHash = 8427964721554;
closure.__initData = env0_35;
const value47 = Reflect.apply(useDerivedValue, moduleValue15, [closure]);
const env0_40 = value47;
const moduleValue16 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue16.useAnimatedStyle;
closure = BountiesModalContentScrollInnerEt;
object3 = {interpolate: reanimatedRexportModule.interpolate, recapPullProgress: value47};
const Extrapolation = reanimatedRexportModule.Extrapolation;
object3.Extrapolation = Extrapolation;
closure.__closure = object3;
closure.__workletHash = 1497321349449;
closure.__initData = env0_36;
const value48 = Reflect.apply(useAnimatedStyle, moduleValue16, [closure]);
const moduleValue17 = reanimatedRexportModule;
useAnimatedStyle = moduleValue17.useAnimatedStyle;
closure = Ot;
object3 = {interpolate: reanimatedRexportModule.interpolate, recapPullProgress: value47,
FOOTER_FADE_START_PROGRESS: env0_17, FOOTER_FADE_END_PROGRESS: env0_18};
object3.Extrapolation = Extrapolation;
closure.__closure = object3;
closure.__workletHash = 3685190194249;
closure.__initData = env0_37;
const value49 = Reflect.apply(useAnimatedStyle, moduleValue17, [closure]);
const moduleValue18 = reanimatedRexportModule;
useAnimatedStyle = moduleValue18.useAnimatedStyle;
closure = BountiesModalContentScrollInnerFt;
object3 = {scrollY: value31, lastBountyScrollOffset: value15, slotHeight: value12, recapPullProgress: value47};
object3.getRevealProgress = getRevealProgress;
object3.recapRevealHeight = height2;
object3.interpolate = reanimatedRexportModule.interpolate;
object3.FOOTER_FADE_START_PROGRESS = env0_17;
object3.FOOTER_FADE_END_PROGRESS = env0_18;
object3.Extrapolation = Extrapolation;
closure.__closure = object3;
closure.__workletHash = 15092194442650;
closure.__initData = env0_38;
const value50 = Reflect.apply(useAnimatedStyle, moduleValue18, [closure]);
const moduleValue19 = reanimatedRexportModule;
useAnimatedReaction = moduleValue19.useAnimatedReaction;
closure = BountiesModalContentScrollInnerPt;
closure.__closure = {recapPullProgress: value47, FOOTER_FADE_END_PROGRESS: env0_18};
closure.__workletHash = 7847901178403;
closure.__initData = env0_39;
const closure6 = BountiesModalContentScrollInnerRt_102739;
closure6.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsCloseButtonPressable: property8};
closure6.__workletHash = 13255883555182;
closure6.__initData = env0_40;
Reflect.apply(useAnimatedReaction, moduleValue19, [closure, closure6]);
const value51 = env0_4.useCallback(_fun102740, [value12, value31, value44, sourceQuestContent, value7.width,
value7.height, property11, property3, property5, value29]);
const value52 = env0_4.useMemo(_fun102741, [property11, property3, property5, value7.width, value7.height]);
const value53 = env0_4.useCallback(function(a0) {
a0.size = height;
}, [height2]);
if (property.length === 0) {
return null;
}
const r9 = r13 ? ((Component) => <Component />)(importDefault(13544) /* metro dependency 13544: BountiesScrollPromptNuxFooter */) : property9 ? ((BountiesScrollRecapFooter) => <BountiesScrollRecapFooter orbAmount={value10} />)((require(13545) /* metro dependency 13545: BountiesScrollRecapFooter */).BountiesScrollRecapFooter) : null;
const items4 = [value14 ? ((View) => <View style={[value46,
value48]} pointerEvents={property5 ? 'box-none' : 'none'}>{((QuestContentImpressionTrackerNative) => <QuestContentImpressionTrackerNative adContentId={DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID} adCreativeType={(require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY} questContent={(require(6533) /* metro dependency 6533: QuestContent */).QuestContent.BOUNTIES_END_INTERSTITIAL} overrideVisibility={property5} sourceQuestContent={sourceQuestContent}>{children_102743}</QuestContentImpressionTrackerNative>)((require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View) : null];
const AnimatedFlashList = (require(8416) /* metro dependency 8416: flashList */).AnimatedFlashList;
items4[1] = <View style={value42}><AnimatedFlashList ref={value3} data={property} keyExtractor={function(a0) {
return a0.id;
}} renderItem={value51} extraData={value52} overrideItemLayout={value53} ItemSeparatorComponent={ItemSeparator_102694} ListFooterComponent={value41} snapToOffsets={value18} snapToEnd={false} estimatedItemSize={value12} decelerationRate={0.85} showsVerticalScrollIndicator={false} drawDistance={value12} onScroll={value40} scrollEventThrottle={16} contentContainerStyle={value43} /></View>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items4[2] = <View3 style={[value45,
value49]} pointerEvents={property7 ? 'box-none' : 'none'}>{property7 ? ((Component) => <Component onPress={value39} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */) : null}</View3>;
const BountiesScrollPromptFooter = importDefault(13518) /* metro dependency 13518: BountiesScrollPromptFooter */;
r13 = !r13 ? property9 : r13;
items4[3] = <BountiesScrollPromptFooter visible={r13} onContentLayout={value6} zIndex={env0_14} opacityStyle={value50}>{r9}</BountiesScrollPromptFooter>;
return (
<View style={styles.root}>
{items4}
</View>
);
}
function _fun102745() { // fn#102745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:714, offset: 0x0224739d, size: 48 bytes, params: 1, frame: 2
const closure = function(a0) {
var Math = global.Math;
return a0.contentOffset.y >= 0 && a0.contentOffset.y <= Math.max(0,
a0.contentSize.height - a0.layoutMeasurement.height);
};
closure.__closure = {};
closure.__workletHash = 14148486927190;
closure.__initData = env0_19;
return closure;
}
function _fun102747() { // fn#102747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:1135, offset: 0x02247422, size: 83 bytes, params: 1, frame: 3
return {root: {flex: 1}, recapPage: {'position': 'absolute', 'zIndex': 0}, listWrapper: {'position': 'absolute',
'zIndex': 1}, closeButton: {position: 'absolute', zIndex: env0_14}};
}
function BountiesModalContentScroll({bountyId, sourceQuestContent}) { // fn#102748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:16725, offset: 0x02247475, size: 119 bytes, params: 2, frame: 19
const ThemeContextProvider = (require(3880) /* metro dependency 3880: ThemeContextProvider */).ThemeContextProvider;
const ThemeTypes = (require(13551) /* metro dependency 13551: ThemeTypes */).ThemeTypes;
const DARKER = ThemeTypes.DARKER;
return (
<ThemeContextProvider theme={DARKER}>
<BountiesModalContentScrollInner initialBountyId={bountyId} sourceQuestContent={sourceQuestContent} />
</ThemeContextProvider>
);
}
function BountiesScrollVideoItemContainerI() { // fn#102697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:1714, owner: BountiesScrollVideoItemContainer.i, offset: 0x022453ca, size: 145 bytes, params: 1, frame: 19
const Math = global.Math;
const abs = Math.abs;
const value2 = scrollY.get();
const indexBinding = index;
const slotHeightBinding = slotHeight;
const value = Reflect.apply(abs, Math, [value2 - indexBinding * slotHeightBinding]) / slotHeightBinding;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const Extrapolation = reanimatedRexportModule.Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return {opacity: Reflect.apply(interpolate, reanimatedRexportModule, [value, [0, 0.3, 1], [1, 1, 0], CLAMP])};
}
function _fun102699({nativeEvent}) { // fn#102699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6572, offset: 0x0224649d, size: 55 bytes, params: 2, frame: 11
const Math = global.Math;
env0_4(Math.ceil(nativeEvent.layout.height));
}
function useBountiesScrollVideoLayout({footerHeight}) { // fn#102700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6634, owner: BountiesModalContentScrollInner.useBountiesScrollVideoLayout, offset: 0x022464d4, size: 149 bytes, params: 2, frame: 18
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
return env1_4.useMemo(_fun102701, [width, height, value3.top, value3.left, value3.right, footerHeight]);
}
function _fun102702() { // fn#102702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7038, offset: 0x0224661e, size: 86 bytes, params: 1, frame: 17
var r0;
var items2;
var value;
const index = questHomeBounties.findIndex(function({id}) {
return id === initialBountyId;
});
if (index <= 0) {
r0 = questHomeBounties;
} else {
questHomeBountiesBinding = questHomeBounties;
value = questHomeBountiesBinding.slice(index);
items2 = [];
value = arraySpread(items2, value, 0, index);
arraySpread(items2, questHomeBountiesBinding.slice(0, index), value, index);
r0 = items2;
}
return r0;
}
function _fun102704() { // fn#102704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7296, offset: 0x02246674, size: 37 bytes, params: 1, frame: 12
return BountyStore.getCompletedBountyCount(env0_7) * orbAmount;
}
function _fun102705() { // fn#102705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7388, offset: 0x02246699, size: 67 bytes, params: 1, frame: 13
if (env0_10 == null) {
return false;
}
const bountyVideoProgress = BountyStore.getBountyVideoProgress(env0_10.id);
return bountyVideoProgress != null && bountyVideoProgress.maxTimestampSec >= rewardTimerSeconds;
}
function _fun102706() { // fn#102706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7582, offset: 0x022466dc, size: 34 bytes, params: 1, frame: 3
return {lastBounty: env0_16, fullRecap: env0_17, revealHeight: height};
}
function _fun102707() { // fn#102707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7753, offset: 0x022466fe, size: 49 bytes, params: 1, frame: 12
const value2 = env0_7.map(_fun102708);
if (result) {
value2.push(env0_17);
}
return value2;
}
function _fun102710() { // fn#102710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:8460, offset: 0x0224673f, size: 34 bytes, params: 1, frame: 10
const binding = env0_33;
const Date = global.Date;
binding.current = Date.now();
}
function _fun102711(a0) { // fn#102711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:8515, offset: 0x02246761, size: 231 bytes, params: 2, frame: 20
var value2;
var value3;
var value4;
var moduleValue;
var trackBountyVerticalScroll;
var object2;
const VerticalScrollingDirection = (require(7120) /* metro dependency 7120: AnalyticsTypes */).VerticalScrollingDirection;
const current = env0_34.current;
if (a0 !== current) {
env0_34.current = a0;
value2 = global.Date.now();
value3 = value2 - env0_33.current;
env0_33.current = value2;
value4 = environment.__proto__;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackBountyVerticalScroll = moduleValue.trackBountyVerticalScroll;
object2 = {};
object2.scrollingType = (require(7120) /* metro dependency 7120: AnalyticsTypes */).BountyScrollingType.MANUAL;
object2.scrollingDirection = a0 > current ? VerticalScrollingDirection.DOWN : VerticalScrollingDirection.UP;
object2.verticalScrollingPosition = a0;
object2.scrollSessionId = env0_32;
object2.timeWatchedPreScrollMs = value3;
Reflect.apply(trackBountyVerticalScroll, moduleValue, [object2]);
}
}
function _fun102712(a0) { // fn#102712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:8894, offset: 0x02246848, size: 66 bytes, params: 2, frame: 13
env0_26(a0);
env0_35(a0);
let binding = env0_31;
if (binding && a0 > 0) {
binding = env0_30;
value = environment.__proto__;
binding(ContentDismissActionType.USER_DISMISS);
}
}
function _fun102713() { // fn#102713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:9093, offset: 0x0224688a, size: 99 bytes, params: 1, frame: 16
var value;
const property = env0_7[env0_25];
if (property != null) {
value = environment.__proto__;
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
value.markAdContentSeen((require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY,
[property.id]);
}
}
function _fun102714() { // fn#102714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:9255, offset: 0x022468ed, size: 385 bytes, params: 1, frame: 25
var maxTimestampSec;
var r7;
var r10;
var value2;
var getBountyVideoProgress;
var id;
var value3;
var value4;
var value5;
var value6;
var moduleValue;
var trackAdContentEvent;
var object3;
var object4;
var moduleValue2;
var getQuestContentName;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
var VIDEO_MODAL_MOBILE;
const property = env0_7[env0_25];
if (property != null) {
value2 = environment.__proto__;
getBountyVideoProgress = BountyStore.getBountyVideoProgress;
id = property.id;
value3 = Reflect.apply(getBountyVideoProgress, BountyStore, [id]);
value4 = undefined;
maxTimestampSec = value3 == null ? value4 : value3.maxTimestampSec;
value5 = 0;
r7 = maxTimestampSec ?? value5;
r10 = (value3 == null ? value4 : value3.duration) ?? value5;
value6 = 1000 * rewardTimerSeconds;
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object3 = {};
id = property.id;
object3.adContentId = id;
object3.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object3.event = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object4 = {};
moduleValue2 = require(7120) /* metro dependency 7120: AnalyticsTypes */;
getQuestContentName = moduleValue2.getQuestContentName;
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object4.content_name = Reflect.apply(getQuestContentName, moduleValue2, [VIDEO_MODAL_MOBILE]);
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object4.content_id = VIDEO_MODAL_MOBILE;
object4.video_progress = (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(r7,
r10);
object4.threshold_met = 1000 * r7 >= value6;
object4.reward_timer_seconds = value6 / 1000;
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object3]);
}
const value = environment.__proto__;
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
}
function _fun102715() { // fn#102715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:9881, offset: 0x02246a6e, size: 216 bytes, params: 1, frame: 20
const value = environment.__proto__;
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object3 = {};
object3.adContentId = DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object3.event = AD_VIDEO_MODAL_CLOSED;
const object4 = {};
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
const getQuestContentName = analyticsTypesModule.getQuestContentName;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
let BOUNTIES_END_INTERSTITIAL = QuestContent.BOUNTIES_END_INTERSTITIAL;
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [BOUNTIES_END_INTERSTITIAL]);
BOUNTIES_END_INTERSTITIAL = QuestContent.BOUNTIES_END_INTERSTITIAL;
object4.content_id = BOUNTIES_END_INTERSTITIAL;
object3.properties = object4;
object3.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
}
function BountiesModalContentScrollInnerOnScroll(a0) { // fn#102716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10272, owner: BountiesModalContentScrollInner.onScroll, offset: 0x02246b46, size: 79 bytes, params: 2, frame: 13
let binding = env0_29;
let set = binding.set;
Reflect.apply(set, binding, [a0.contentOffset.y]);
const get = env0_28.get;
if (Reflect.apply(get, binding, [])) {
binding = env0_27;
set = binding.set;
value = environment.__proto__;
Reflect.apply(set, binding, [env1_20(a0)]);
}
}
function BountiesModalContentScrollInnerOnBeginDrag(a0) { // fn#102717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10510, owner: BountiesModalContentScrollInner.onBeginDrag, offset: 0x02246b95, size: 52 bytes, params: 2, frame: 13
env0_28.set(true);
env0_27.set(env1_20(a0));
}
function BountiesModalContentScrollInnerOnEndDrag() { // fn#102718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10710, owner: BountiesModalContentScrollInner.onEndDrag, offset: 0x02246bc9, size: 47 bytes, params: 1, frame: 12
env0_28.set(false);
if (!env1_13) {
env0_27.set(false);
}
}
function BountiesModalContentScrollInnerOnMomentumEnd(a0) { // fn#102719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10903, owner: BountiesModalContentScrollInner.onMomentumEnd, offset: 0x02246bf8, size: 77 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (result) {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(handleRecapMomentumEnd)(a0);
}
env0_27.set(false);
}
function BountiesModalContentScrollInnerRt() { // fn#102720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11163, owner: BountiesModalContentScrollInner.rt, offset: 0x02246c45, size: 84 bytes, params: 1, frame: 18
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const max = Math2.max;
const Math3 = global.Math;
return Reflect.apply(min, Math, [Reflect.apply(max, Math2, [Math3.round(env0_29.get() / env0_12), 0]), env0_13]);
}
function BountiesModalContentScrollInnerSt(a0, a1) { // fn#102721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11329, owner: BountiesModalContentScrollInner.st, offset: 0x02246c99, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_36)(a0);
}
}
function BountiesModalContentScrollInnerIt() { // fn#102722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11514, owner: BountiesModalContentScrollInner.it, offset: 0x02246cd6, size: 68 bytes, params: 1, frame: 14
var r0;
var binding;
var value2;
var value;
const resultBinding = result;
if (resultBinding) {
binding = env0_29;
value2 = binding.get();
binding = env0_16;
value = environment.__proto__;
value = value2 >= binding - (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).RECAP_SNAP_EPSILON;
r0 = value;
} else {
r0 = resultBinding;
}
return r0;
}
function BountiesModalContentScrollInnerAt(a0, a1) { // fn#102723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11737, owner: BountiesModalContentScrollInner.at, offset: 0x02246d1a, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_24)(a0);
}
}
function BountiesModalContentScrollInnerCt() { // fn#102724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11929, owner: BountiesModalContentScrollInner.ct, offset: 0x02246d57, size: 33 bytes, params: 1, frame: 11
return result && env0_29.get() > env0_16;
}
function ut(a0, a1) { // fn#102725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12076, owner: BountiesModalContentScrollInner.ut, offset: 0x02246d78, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_20)(a0);
}
}
function BountiesModalContentScrollInnerDt() { // fn#102726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12272, owner: BountiesModalContentScrollInner.dt, offset: 0x02246db5, size: 68 bytes, params: 1, frame: 14
var r0;
var binding;
var value2;
var value;
const resultBinding = result;
if (resultBinding) {
binding = env0_29;
value2 = binding.get();
binding = env0_17;
value = environment.__proto__;
value = value2 >= binding - (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).RECAP_SNAP_EPSILON;
r0 = value;
} else {
r0 = resultBinding;
}
return r0;
}
function BountiesModalContentScrollInner_t(a0, a1) { // fn#102727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12494, owner: BountiesModalContentScrollInner._t, offset: 0x02246df9, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_22)(a0);
}
}
function _fun102728() { // fn#102728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12689, offset: 0x02246e36, size: 43 bytes, params: 1, frame: 14
return result ? <BountiesRecapPullZone height={height} /> : null;
}
function _fun102729() { // fn#102729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12762, offset: 0x02246e61, size: 82 bytes, params: 1, frame: 4
const binding = env0_5;
return [styles.listWrapper, {top: 0, left: binding.left, width: binding.width,
height: binding.top + binding.height + 97}];
}
function _fun102730() { // fn#102730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12875, offset: 0x02246eb3, size: 29 bytes, params: 1, frame: 2
return {paddingTop: env0_5.top, paddingBottom: 97};
}
function _fun102731() { // fn#102731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12941, offset: 0x02246ed0, size: 29 bytes, params: 1, frame: 3
const binding = env0_5;
return {width: binding.width, height: binding.height};
}
function _fun102732() { // fn#102732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13014, offset: 0x02246eed, size: 146 bytes, params: 1, frame: 17
const items2 = [styles.closeButton];
const object2 = {};
const binding = env0_5;
const top = binding.top;
let value = environment.__proto__;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.top = top + PX_8;
value = binding.left + binding.width;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
value -= PX_32;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.left = value - PX_8;
items2[1] = object2;
return items2;
}
function _fun102733() { // fn#102733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13180, offset: 0x02246f7f, size: 113 bytes, params: 1, frame: 14
var r2;
var r4;
const items2 = [styles.recapPage];
const object2 = {};
let binding = env0_5;
object2.top = binding.top;
object2.left = binding.left;
object2.width = binding.width;
const heightBinding = height;
object2.height = heightBinding - binding.top;
let value = null;
if (env0_21) {
value = environment.__proto__;
binding = env1_14;
r2 = {zIndex: binding};
r4 = binding;
} else {
r2 = value;
r4 = heightBinding;
}
copyDataProperties(object2, r2, r4);
items2[1] = object2;
return items2;
}
function BountiesModalContentScrollInnerGt() { // fn#102734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13348, owner: BountiesModalContentScrollInner.gt, offset: 0x02246ff0, size: 64 bytes, params: 1, frame: 15
const value = environment.__proto__;
return (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).getRevealProgress(env0_29.get(),
env0_16, height);
}
function BountiesModalContentScrollInnerEt() { // fn#102735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13597, owner: BountiesModalContentScrollInner.Et, offset: 0x02247030, size: 106 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const value3 = env0_40.get();
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return {opacity: Reflect.apply(interpolate, value, [value3, [0, 1], [0, 1], CLAMP])};
}
function Ot() { // fn#102736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13875, owner: BountiesModalContentScrollInner.Ot, offset: 0x0224709a, size: 119 bytes, params: 1, frame: 22
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const value3 = env0_40.get();
const items2 = [env1_17, env1_18];
const Extrapolation = reanimatedRexportModule.Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return {opacity: Reflect.apply(interpolate, reanimatedRexportModule, [value3, items2, [1, 0], CLAMP])};
}
function BountiesModalContentScrollInnerFt() { // fn#102737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:14209, owner: BountiesModalContentScrollInner.ft, offset: 0x02247111, size: 214 bytes, params: 1, frame: 22
var r6;
var value3;
var moduleValue;
if (env0_29.get() >= env0_16 - env0_12 / 2) {
r6 = env0_40.get();
} else {
value3 = environment.__proto__;
moduleValue = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
r6 = moduleValue.getRevealProgress(env0_29.get(), 0, height);
}
const value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const items2 = [env1_17, env1_18];
const Extrapolation = reanimatedRexportModule.Extrapolation;
const CLAMP = Extrapolation.CLAMP;
return {opacity: Reflect.apply(interpolate, reanimatedRexportModule, [r6, items2, [1, 0], CLAMP])};
}
function BountiesModalContentScrollInnerPt() { // fn#102738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:14740, owner: BountiesModalContentScrollInner.Pt, offset: 0x022471e7, size: 29 bytes, params: 1, frame: 9
return env0_40.get() < env1_18;
}
function BountiesModalContentScrollInnerRt_102739(a0, a1) { // fn#102739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:14872, owner: BountiesModalContentScrollInner.Rt, offset: 0x02247204, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_23)(a0);
}
}
function _fun102740({item, index}) { // fn#102740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:15059, offset: 0x02247241, size: 193 bytes, params: 2, frame: 22
const bountiesScrollVideoItemContainerBindingProps = {index: index, slotHeight: env0_12, scrollY: env0_29,
style: env0_39};
const BountiesScrollVideoItem = (require(13522) /* metro dependency 13522: BountiesScrollVideoItem */).BountiesScrollVideoItem;
const sourceQuestContentBinding = sourceQuestContent;
const binding = env0_5;
return (
<BountiesScrollVideoItemContainer {...bountiesScrollVideoItemContainerBindingProps}>
<BountiesScrollVideoItem
bounty={item}
sourceQuestContent={sourceQuestContentBinding}
width={binding.width}
height={binding.height}
isActive={index === env0_25}
isRecapPageRevealed={env0_19}
isRecapPageOnTop={env0_21}
isScrollingInBoundsSharedValue={env0_27}
key={item.id}
/>
</BountiesScrollVideoItemContainer>
);
}
function _fun102741() { // fn#102741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:15422, offset: 0x02247302, size: 56 bytes, params: 1, frame: 3
const binding = env0_5;
return {activeIndex: env0_25, isRecapPageRevealed: env0_19, isRecapPageOnTop: env0_21, width: binding.width,
height: binding.height};
}
function BountiesModalContentScrollInnerChildren() { // fn#102743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:16048, owner: BountiesModalContentScrollInner.children, offset: 0x0224734e, size: 79 bytes, params: 1, frame: 15
const BountiesScrollRecapPage = (require(13546) /* metro dependency 13546: BountiesScrollRecapPage */).BountiesScrollRecapPage;
return (
<BountiesScrollRecapPage
orbAmount={env0_37}
onClose={env0_38}
style={{flex: 1}}
/>
);
}
function _fun102701() { // fn#102701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6761, offset: 0x02246569, size: 181 bytes, params: 1, frame: 17
var r3;
var r5;
var value8;
const widthBinding = width;
let binding = env0_3;
const value3 = widthBinding - binding.left - binding.right;
const value5 = height - binding.top - footerHeight;
const value7 = value3 / env2_15;
if (value7 > value5) {
value8 = value5 * env2_15;
r3 = value5;
r5 = value8;
} else {
r3 = value7;
r5 = value3;
}
const object2 = {};
binding = env0_3;
object2.top = binding.top;
let Math = global.Math;
object2.left = Math.floor(binding.left + (value3 - r5) / 2);
Math = global.Math;
object2.width = Math.floor(r5);
Math = global.Math;
object2.height = Math.floor(r3);
return object2;
}
function _fun102708(a0, a1) { // fn#102708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7772, offset: 0x0224672f, size: 16 bytes, params: 3, frame: 2
return a1 * env1_12;
}
@@ -0,0 +1,120 @@
/* Metro module 13553; source: modules/quests/native/BountiesModal/BountiesModalEndCard.tsx; dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */
function _fun102956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:6, offset: 0x02251346, size: 222 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Pressable;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102957);
object = {code: 'function BountiesModalEndCardTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndCard.tsx');
exports.default = BountiesModalEndCard;
}
function _fun102957() { // fn#102957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:195, offset: 0x02251424, size: 249 bytes, params: 1, frame: 17
const object6 = {container: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center', 'alignItems': 'center'}};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['backgroundColor'] = 'rgba(241, 251, 169, 0.15)';
object6.backdropTint = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object6.backdropGradient = object8;
const object9 = {'width': 92, 'height': 92, 'borderRadius': null, 'borderWidth': 1};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object9.borderColor = BORDER_MUTED;
object6.image = object9;
const object10 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.gap = PX_4;
object10.alignItems = 'center';
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.marginTop = PX_12;
object6.info = object10;
object6.ctaContainer = {'position': 'relative', 'alignItems': 'center'};
return object6;
}
function BountiesModalEndCard({bounty, visible, sourceQuestContent}) { // fn#102958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:849, offset: 0x0225151d, size: 693 bytes, params: 2, frame: 28
var r0;
var View2;
var items2;
var label;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
const r17 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
'width': 92, 'height': 92, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var moduleValue = require(dependencyMap[7]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingStandard);
return object;
};
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, visible: visible,
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
closure.__workletHash = 15062259404736;
closure.__initData = env0_9;
if (visible) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.container, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])],
pointerEvents: 'box-none'};
items2 = [<View style={styles.backdropTint} />];
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.60)', 'rgba(0, 0, 0, 1)']} locations={[0,
0.841]} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
var pressableBindingProps = {'onPress': null, 'hitSlop': 16, 'accessibilityRole': 'button',
onPress: onPress_102960};
label = bountyCtaInfo.label;
pressableBindingProps.accessibilityLabel = label;
pressableBindingProps.style = styles.ctaContainer;
items3 = [((Component) => <Component source={{uri: r17}} style={styles.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
var viewBindingProps = {style: styles.info};
label = bountyCtaInfo.label;
value = <Text variant="text-md/semibold" color="text-strong">{label}</Text>;
items4 = [value];
items4[1] = <Text variant="text-sm/medium" color="text-default">{bountyCtaInfo.subtext}</Text>;
items3[1] = <View {...viewBindingProps}>{items4}</View>;
items2[2] = <Pressable {...pressableBindingProps}>{items3}</Pressable>;
value = <View2 {...view2Props}>{items2}</View2>;
r0 = value;
} else {
r0 = visible;
}
return r0;
}
function BountiesModalEndCardOnPress() { // fn#102960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:1533, owner: BountiesModalEndCard.onPress, offset: 0x02251827, size: 166 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object3 = {};
const bountyBinding = bounty;
object3.adContentId = bountyBinding.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
object3.cta = bountyBinding.cta;
const object4 = {};
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_ICON_END_CARD = QuestContent.VIDEO_MODAL_ICON_END_CARD;
object4.content = VIDEO_MODAL_ICON_END_CARD;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object4.ctaContent = OPEN_GAME_LINK;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object3, object4]);
}
@@ -0,0 +1,79 @@
/* Metro module 13554; source: modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx; dependencies: [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244, 2] */
function _fun102961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:6, offset: 0x022518cd, size: 181 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {};
object2.gap = importDefault(dependencyMap[2]).space.PX_8;
return {container: object2};
});
object = {code: 'function BountiesModalEndedCtaButtonsTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx');
exports.default = BountiesModalEndedCtaButtons;
}
function BountiesModalEndedCtaButtons({bounty, visible, sourceQuestContent, onClose}) { // fn#102963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:366, offset: 0x022519b3, size: 436 bytes, params: 2, frame: 24
var r0;
var View;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var items2;
var intl;
var value;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var moduleValue = require(dependencyMap[4]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[5]).timingStandard);
return object;
};
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.visible = visible;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 11417131685254;
closure.__initData = env0_6;
if (visible) {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var viewProps = {style: [styles.container, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]};
value = <Button variant="primary-overlay" text={(require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty).buttonLabel} size="lg" onPress={onPress_102965} />;
items2 = [value];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Button variant="secondary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} size="lg" onPress={onClose} />;
value = <View {...viewProps}>{items2}</View>;
r0 = value;
} else {
r0 = visible;
}
return r0;
}
function BountiesModalEndedCtaButtonsOnPress() { // fn#102965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:874, owner: BountiesModalEndedCtaButtons.onPress, offset: 0x02251bbc, size: 166 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
const object3 = {};
const bountyBinding = bounty;
object3.adContentId = bountyBinding.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object3.adCreativeType = BOUNTY;
object3.cta = bountyBinding.cta;
const object4 = {};
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object4.content = VIDEO_MODAL_END_CARD;
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object4.ctaContent = OPEN_GAME_LINK;
object4.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object3, object4]);
}
@@ -0,0 +1,118 @@
/* Metro module 13539; source: modules/quests/native/BountiesModal/BountiesModalProgress.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507, 2] */
function _fun102892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:6, offset: 0x0224d3f3, size: 269 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 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.StyleSheet;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102893);
object = {code: 'function BountiesModalProgressTsx1(){const{withTiming,visible,timingFast}=this.__closure;return{opacity:withTiming(visible?1:0,timingFast)};}'};
object = {code: 'function BountiesModalProgressTsx2(){const{withTiming,progress,shouldSkipAnimation,timingNone,timingFast}=this.__closure;return{width:withTiming(progress*100+"%",shouldSkipAnimation?timingNone:timingFast,\'animate-always\')};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalProgress.tsx');
exports.default = BountiesModalProgress;
exports.PROGRESS_BAR_HEIGHT = 4;
}
function _fun102893() { // fn#102893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:201, offset: 0x0224d500, size: 331 bytes, params: 1, frame: 17
const object2 = {};
object2.progressContainer = {height: 4};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6['backgroundColor'] = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object6['opacity'] = 0.54;
object2.progressTrack = object6;
const object7 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 8, 'shadowOpacity': 1, 'elevation': 4,
'shadowColor': '#30C773'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object7.backgroundColor = GREEN_300;
object7.shadowOffset = {'width': 0, 'height': 0};
object2.progressBar = object7;
const object8 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 12, 'shadowOpacity': 1, 'elevation': 8};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object8.backgroundColor = GREEN_300;
object8.shadowOffset = {'width': 0, 'height': 0};
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object8.shadowColor = GREEN_300;
object2.progressBarGlowLayer = object8;
return object2;
}
function BountiesModalProgress({progress, visible, style}) { // fn#102894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1323, offset: 0x0224d64b, size: 575 bytes, params: 2, frame: 26
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [progress]), 2);
const property3 = value4[0];
if (progress !== property3) {
value4[1](progress);
property2(progress < property3);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = function() {
var object = {};
var moduleValue = require(dependencyMap[7]);
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingFast);
return object;
};
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.visible = visible;
object2.timingFast = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
closure.__closure = object2;
closure.__workletHash = 5158131592262;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = BountiesModalProgressB;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, progress: progress,
shouldSkipAnimation: property,
timingNone: (require(4507) /* metro dependency 4507: timingPresets */).timingNone,
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
closure.__workletHash = 15586067343237;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.progressContainer, style, value5];
const items2 = [<View style={styles.progressTrack} />];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[1] = <View3 style={[styles.progressBarGlowLayer, value6]} />;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View4 style={[styles.progressBar, value6]} />;
return (
<View2 style={items3}>
{items2}
</View2>
);
}
function BountiesModalProgressB() { // fn#102896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1759, owner: BountiesModalProgress.B, offset: 0x0224d8df, size: 114 bytes, params: 1, frame: 19
let value = environment.__proto__;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const value3 = 100 * progress;
const binding = env0_2;
value = require(4507) /* metro dependency 4507: timingPresets */;
return {width: Reflect.apply(withTiming, timingModule, [value3 + '%', binding ? value.timingNone : value.timingFast,
'animate-always'])};
}
@@ -0,0 +1,210 @@
/* Metro module 13540; source: modules/quests/native/BountiesModal/BountiesModalTimer.tsx; dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */
function _fun102897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:6, offset: 0x0224d951, size: 817 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
const value3 = (SMALL_BUTTON_HEIGHT - 4) / 2;
const Math = global.Math;
const PI = Math.PI;
const env0_8 = 2 * PI * value3;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const env0_9 = Easing.bezier(0.15, 0.21, 0.58, 1);
const env0_10 = Easing.bezier(0.61, 0, 0.58, 1);
const env0_11 = Easing.bezier(0.42, 0, 0.58, 1);
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const env0_12 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Circle]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'alignItems': 'center', 'justifyContent': 'center'};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.width = SMALL_BUTTON_HEIGHT;
object4.height = SMALL_BUTTON_HEIGHT;
object3.progress = object4;
object3.ring = {position: 'absolute', transform: [{rotate: '-90deg'}]};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object3.trackPath = {color: BACKGROUND_SURFACE_HIGHEST};
const object5 = {};
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
object5.color = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object5.lineHeight = platformUtilsModule.isAndroid() ? 14 : value;
object3.countdownText = object5;
object3.checkmarkLayer = {'position': 'absolute', 'inset': 6, 'alignItems': 'center', 'justifyContent': 'center'};
const object8 = {'width': 20, 'height': 20, 'backgroundColor': '#2ECC71'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.checkmarkBackground = object8;
object3.checkmarkIcon = {'width': 20, 'height': 20};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function BountiesModalTimerTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE-PROGRESS_CIRCUMFERENCE*animatedProgress.get()};}'};
object3 = {code: 'function BountiesModalTimerTsx2(){const{checkmarkBackgroundScale}=this.__closure;return{transform:[{scale:checkmarkBackgroundScale.get()}]};}'};
object3 = {code: 'function BountiesModalTimerTsx3(){const{checkmarkScale}=this.__closure;return{transform:[{scale:checkmarkScale.get()}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalTimer.tsx');
exports.default = BountiesModalTimer;
return value;
}
function BountiesModalTimer({isCompleted, totalSeconds, remainingSeconds}) { // fn#102898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1577, offset: 0x0224dc82, size: 1169 bytes, params: 2, frame: 34
const styles = useStyles();
let r6 = isCompleted || remainingSeconds <= 0;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value5 = Reflect.apply(max, Math, [1, Math2.ceil(remainingSeconds)]);
const r1 = isCompleted ? 1 : totalSeconds > 0 ? 1 - remainingSeconds / totalSeconds : 0;
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r1);
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value9;
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
let binding = env0_3;
binding.useEffect(_fun102899, [value8, r1]);
const env0_5 = binding.useRef(false);
binding.useEffect(_fun102900, [r6, value9, value10]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedProps = reanimatedRexportModule.useAnimatedProps;
let closure = BountiesModalTimerU;
binding = env0_8;
closure.__closure = {PROGRESS_CIRCUMFERENCE: binding, animatedProgress: value8};
closure.__workletHash = 12964700773124;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedProps, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = BountiesModalTimerX;
closure.__closure = {checkmarkBackgroundScale: value9};
closure.__workletHash = 10834015407160;
closure.__initData = env0_15;
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = BountiesModalTimerG;
closure.__closure = {checkmarkScale: value10};
closure.__workletHash = 7510845920441;
closure.__initData = env0_16;
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const object = {};
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
object.height = SMALL_BUTTON_HEIGHT;
object.width = SMALL_BUTTON_HEIGHT;
object.style = styles.ring;
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
const binding2 = env0_7;
const items2 = [((Component) => <Component {...object}><Circle cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke={styles.trackPath.color} strokeWidth={4} />{((Component) => <Component cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke="#2ECC71" strokeWidth={4} strokeDasharray={binding} strokeLinecap="round" animatedProps={value11} />)(env0_12)}</Component>)(defaultImport)];
r6 = !r6 && ((Text) => <Text variant="text-sm/semibold" style={styles.countdownText} maxFontSizeMultiplier={1}>{value5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
items2[1] = r6;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View2 style={[styles.checkmarkLayer, value12]}><View style={styles.checkmarkBackground} /></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.checkmarkLayer, value13];
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
items2[3] = <View3 style={items4}><CheckmarkSmallBoldIcon size="custom" color={CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT} style={styles.checkmarkIcon} /></View3>;
return (
<View style={styles.progress}>
{items2}
</View>
);
}
function _fun102899() { // fn#102899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1829, offset: 0x0224e113, size: 78 bytes, params: 1, frame: 18
const binding = env0_2;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(env0_1, {duration: 500}, 'animate-always')]);
}
function _fun102900() { // fn#102900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1936, offset: 0x0224e161, size: 388 bytes, params: 1, frame: 30
var r1;
var r0;
var value2;
var value3;
var moduleValue;
var withSequence;
var withTiming;
var value4;
var moduleValue3;
var withDelay;
var moduleValue4;
var moduleValue5;
var binding3;
var value5;
var moduleValue6;
var value;
const current = env0_5.current;
env0_5.current = true;
let binding = env0_0;
const binding2 = env0_3;
let set = binding2.set;
if (binding) {
if (current) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
value4 = (require(4504) /* metro dependency 4504: timing */).withTiming(1.65, {duration: 267,
easing: env1_9});
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
Reflect.apply(set, binding2, [Reflect.apply(withSequence, moduleValue, [value4, Reflect.apply(withTiming,
moduleValue3, [1, {duration: 233, easing: env1_10}])])]);
binding = env0_4;
set = binding.set;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue4.withSequence;
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue5.withTiming;
binding3 = env1_11;
value5 = Reflect.apply(withTiming, moduleValue5, [1.25, {duration: 167, easing: binding3}]);
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue6.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [167, Reflect.apply(withSequence, moduleValue4,
[value5, Reflect.apply(withTiming, moduleValue6, [1, {duration: 333, easing: binding3}])])])]);
r1 = value3;
} else {
Reflect.apply(set, binding2, [1]);
env0_4.set(1);
r1 = undefined;
}
r0 = r1;
} else {
Reflect.apply(set, binding2, [0]);
env0_4.set(0);
r0 = undefined;
}
return r0;
}
function BountiesModalTimerU() { // fn#102901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2362, owner: BountiesModalTimer.U, offset: 0x0224e2e5, size: 40 bytes, params: 1, frame: 11
const binding = env1_8;
const binding2 = env0_2;
const get = binding2.get;
return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])};
}
function BountiesModalTimerX() { // fn#102902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2536, owner: BountiesModalTimer.x, offset: 0x0224e30d, size: 39 bytes, params: 1, frame: 11
const object = {};
object.scale = env0_3.get();
return {transform: [object]};
}
function BountiesModalTimerG() { // fn#102903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2692, owner: BountiesModalTimer.G, offset: 0x0224e334, size: 39 bytes, params: 1, frame: 11
const object = {};
object.scale = env0_4.get();
return {transform: [object]};
}
@@ -0,0 +1,111 @@
/* Metro module 13543; source: modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx; dependencies: [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234, 2] */
function _fun102913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:6, offset: 0x0224eced, size: 237 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Pressable;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102914);
object = {code: 'function BountiesScrollEndCardTsx1(){const{isScrollingInBoundsSharedValue,withTiming,isActive,timingStandard}=this.__closure;var _isScrollingInBoundsS;const isScrollingInBounds=((_isScrollingInBoundsS=isScrollingInBoundsSharedValue)===null||_isScrollingInBoundsS===void 0?void 0:_isScrollingInBoundsS.get())===true;return{opacity:withTiming(isActive&&!isScrollingInBounds?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx');
exports.default = BountiesScrollEndCard;
}
function _fun102914() { // fn#102914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:203, offset: 0x0224edda, size: 242 bytes, params: 1, frame: 17
const object6 = {};
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object6.container = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['backgroundColor'] = 'rgba(0, 0, 0, 0.6)';
object6.backdropTint = object8;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object6.backdropGradient = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['justifyContent'] = 'center';
object10['alignItems'] = 'center';
object6.pressable = object10;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.overlayContent = {alignItems: 'center', gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.textBlock = {alignItems: 'center', gap: PX_4};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.replayIcon = {margin: PX_12};
return object6;
}
function BountiesScrollEndCard({bounty, visible, onReplay, isActive, isScrollingInBoundsSharedValue}) { // fn#102915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1015, offset: 0x0224eecc, size: 826 bytes, params: 2, frame: 33
var r0;
var View2;
var items2;
var View3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9UtZAY']);
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
let object2 = {visible: visible};
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule,
[object2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountiesScrollEndCardH;
object2 = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.isActive = isActive;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 13628650628423;
closure.__initData = env0_9;
if (shouldRender) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {style: [styles.container, opacityStyle], pointerEvents: 'box-none'};
items2 = [<View style={styles.backdropTint} />];
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.48)',
'rgba(0, 0, 0, 0.8)']} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
var pressableBindingProps = {onPress: isActive ? onReplay : undefined, disabled: !isActive,
accessibilityRole: 'button', accessibilityLabel: value4, style: styles.pressable};
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view3Props = {style: [styles.overlayContent, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
[closure])]};
var viewBindingProps = {style: styles.textBlock};
value = <Text variant="heading-md/semibold" color="text-strong">{bountyCtaInfo.label}</Text>;
items4 = [value];
items4[1] = <Text variant="heading-sm/medium" color="text-default">{value4}</Text>;
value = <View {...viewBindingProps}>{items4}</View>;
items2[2] = <Pressable {...pressableBindingProps}><View3 {...view3Props}>{value}{((RetryIcon) => <RetryIcon accessible={false} color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} style={styles.replayIcon} />)((require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon)}</View3></Pressable>;
value = <View2 {...view2Props}>{items2}</View2>;
r0 = value;
} else {
r0 = shouldRender;
}
return r0;
}
function BountiesScrollEndCardH() { // fn#102916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1392, owner: BountiesScrollEndCard.h, offset: 0x0224f206, size: 121 bytes, params: 1, frame: 18
const r7 = isScrollingInBoundsSharedValue?.get();
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object2.opacity = Reflect.apply(withTiming, timingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object2;
}
@@ -0,0 +1,62 @@
/* Metro module 13518; source: modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868, 2] */
function _fun102749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:6, offset: 0x022474ec, size: 231 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 */).StyleSheet;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object = {root: {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0}};
var object2 = {'flex': 1, 'minHeight': 97, 'alignItems': 'center', 'justifyContent': 'center'};
object2.paddingHorizontal = importDefault(dependencyMap[5]).space.PX_16;
object.content = object2;
var object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, importDefault);
object.gradient = object3;
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx');
exports.default = BountiesScrollPromptFooter;
exports.BOUNTIES_MODAL_BASE_FOOTER_HEIGHT = 97;
}
function BountiesScrollPromptFooter({visible, children, onContentLayout, zIndex, opacityStyle}) { // fn#102751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:507, offset: 0x0224763b, size: 547 bytes, params: 2, frame: 28
const styles = useStyles();
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
const object2 = {visible: visible};
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const value2 = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule, [object2]);
const opacityStyle2 = value2.opacityStyle;
const shouldRender = value2.shouldRender;
const binding = env0_3;
let useMemo = binding.useMemo;
const value3 = Reflect.apply(useMemo, binding, [function() {
return zIndex != null ? {zIndex: zIndex} : undefined;
}, [zIndex]]);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value4 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
useMemo = binding.useMemo;
return shouldRender && ((View) => <View style={[styles.root, opacityStyle2,
value3]} pointerEvents="none">{((View) => <View style={[styles.gradient,
opacityStyle]}>{((BountiesScrollGradientRive) => <BountiesScrollGradientRive stateMachine="State Machine 1" fit="fill" alignment="bottom-center" withReducedMotion={useReducedMotion ? 'halt' : 'play'} />)((require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}{((View) => <View style={[styles.content,
Reflect.apply(useMemo, binding, [_fun102754, [value4.bottom]]),
opacityStyle]} onLayout={onContentLayout}>{children}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
}
function _fun102754() { // fn#102754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:905, offset: 0x02247880, size: 75 bytes, params: 1, frame: 16
const Math = global.Math;
const max = Math.max;
const bottom = env0_1.bottom;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
return {paddingBottom: Reflect.apply(max, Math, [bottom, PX_8])};
}
@@ -0,0 +1,43 @@
/* Metro module 13544; source: modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx; dependencies: [27, 33, 4501, 4573, 1244, 2] */
function _fun102917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:6, offset: 0x0224f27f, size: 179 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
return {root: {'alignItems': 'center', 'gap': 2}, titleText: {textAlign: 'center'},
swipeText: {'textAlign': 'center', 'textTransform': 'uppercase'}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx');
exports.default = BountiesScrollPromptFooter_102919;
}
function BountiesScrollPromptFooter_102919() { // fn#102919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:406, offset: 0x0224f36b, size: 263 bytes, params: 1, frame: 24
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const H57f41 = (require(1244) /* metro dependency 1244: indexNative */).t.H57f41;
return (
<View style={styles.root}>
<Text
variant="text-md/semibold"
color="text-default"
style={styles.titleText}
>
{Reflect.apply(string, intl, [H57f41])}
</Text>
<Text
variant="text-xxs/semibold"
color="text-muted"
style={styles.swipeText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tG0zsk)}
</Text>
</View>
);
}
@@ -0,0 +1,72 @@
/* Metro module 13545; source: modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868, 2] */
function _fun102920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:6, offset: 0x0224f472, size: 232 bytes, params: 8, frame: 19
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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102921);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx');
exports.BountiesScrollRecapFooter = BountiesScrollRecapFooter;
exports.BountiesScrollRecapFooterGradient = BountiesScrollRecapFooterGradient;
}
function _fun102921() { // fn#102921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:180, offset: 0x0224f55a, size: 185 bytes, params: 1, frame: 16
const object2 = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', gap: PX_4};
object2.headerLabel = {textTransform: 'uppercase'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.orbRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object2.rive = {'flex': 1, 'width': '100%'};
const object3 = {};
const value = 6;
object3.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object2.orbAmount = object3;
return object2;
}
function BountiesScrollRecapFooter({orbAmount}) { // fn#102922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:585, offset: 0x0224f613, size: 381 bytes, params: 2, frame: 25
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text variant="text-xs/bold" color="text-brand" style={styles.headerLabel} accessible={false}>{value2}</Text>];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
items2[1] = <View style={styles.orbRow} accessible={false} importantForAccessibility="no-hide-descendants"><OrbsIcon size="sm" color="icon-strong" accessible={false} /><Text variant="display-sm" color="text-strong" accessible={false} style={styles.orbAmount}>{'+' + orbAmount}</Text></View>;
return (
<View
style={styles.container}
pointerEvents="none"
accessible
accessibilityRole="text"
accessibilityLabel={'' + value2 + ', +' + orbAmount}
>
{items2}
</View>
);
}
function BountiesScrollRecapFooterGradient() { // fn#102923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:1232, offset: 0x0224f790, size: 153 bytes, params: 1, frame: 18
const styles = useStyles();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const BountiesScrollGradientRive = (require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive;
return (
<View style={styles.rive}>
<BountiesScrollGradientRive
stateMachine="State Machine 1"
fit="fill"
alignment="bottom-center"
withReducedMotion={useReducedMotion ? 'halt' : 'play'}
/>
</View>
);
}
@@ -0,0 +1,112 @@
/* Metro module 13546; source: modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx; dependencies: [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573, 1244, 10076, 4578, 2] */
function _fun102925(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:6, offset: 0x0224f829, size: 265 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.StyleSheet;
const env0_4 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102927);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx');
exports.BountiesScrollRecapPage = BountiesScrollRecapPage;
}
function BountiesRecapOrbsBackground({style, reducedMotion}) { // fn#102926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:922, offset: 0x0224f932, size: 260 bytes, params: 2, frame: 22
var r0;
var VideoComponent;
var object;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
r0 = <View style={style} needsOffscreenAlphaCompositing renderToHardwareTextureAndroid pointerEvents="none">{((APNGPlayer) => <APNGPlayer url={importDefault(13547) /* metro dependency 13547: _3d_orbsPng */} style={StyleSheet.absoluteFillObject} autoplay={!reducedMotion} />)((require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer)}</View>;
} else {
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
object = {};
object.uri = importDefault(13548) /* metro dependency 13548: _3d_orbsMov */;
r0 = <VideoComponent source={object} style={style} resizeMode="contain" paused={reducedMotion} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" />;
}
return r0;
}
function _fun102927() { // fn#102927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:218, offset: 0x0224fa36, size: 398 bytes, params: 1, frame: 18
const object3 = {};
const object4 = {overflow: 'hidden'};
object4.borderRadius = lg;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object3.root = object4;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.content = {'flex': 1, 'paddingHorizontal': null, 'justifyContent': 'center', 'alignItems': 'center',
paddingHorizontal: PX_24};
object3.centeredCopy = {'alignItems': 'center', 'width': '100%'};
object3.orbsBackground = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': '40%', 'zIndex': 1};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.headerLabel = {paddingBottom: PX_4, textTransform: 'uppercase'};
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.paddingBottom = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.gap = PX_8;
object3.titleRow = object8;
const object9 = {position: 'absolute'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.right = PX_24;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.gap = PX_12;
object3.actions = object9;
const object10 = {};
const value = 6;
object10.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object10.lineHeight = 46;
object3.orbAmount = object10;
return object3;
}
function BountiesScrollRecapPage({orbAmount, onClose, style}) { // fn#102928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:1520, offset: 0x0224fbc4, size: 1017 bytes, params: 2, frame: 41
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const items2 = [styles.root, style];
const viewBinding2Props = {style: StyleSheet.absoluteFillObject, pointerEvents: 'none'};
const VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
const view = <View {...viewBinding2Props}><VideoComponent source={{uri: importDefault(13549) /* metro dependency 13549: starfield_bgMp4 */}} style={StyleSheet.absoluteFillObject} resizeMode="cover" paused={useReducedMotion} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" /><BountiesRecapOrbsBackground style={styles.orbsBackground} reducedMotion={useReducedMotion} /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items4 = [<Text variant="text-xs/bold" color="text-brand" style={styles.headerLabel}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6)}</Text>];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
items4[1] = <View accessible accessibilityRole="text" accessibilityLabel={'+' + orbAmount}><View style={styles.titleRow}><OrbsIcon size="lg" color="icon-strong" accessible={false} /><Text variant="display-lg" color="text-strong" accessible={false} style={styles.orbAmount}>{'+' + orbAmount}</Text></View></View>;
items4[2] = <Text variant="text-md/medium" color="text-muted" style={{textAlign: 'center'}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x0Ffz3)}</Text>;
const view2 = <View style={styles.centeredCopy} pointerEvents="none">{items4}</View>;
const items7 = [styles.actions];
const bottom = value2.bottom;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
items7[1] = {bottom: bottom + PX_8};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2} pointerEvents="box-none">
{view}
<View style={styles.content} pointerEvents="box-none">
{view2}
<View style={items7}>
<Button
grow
variant="primary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
size="lg"
onPress={onClose}
/>
</View>
</View>
</View>
);
}
@@ -0,0 +1,481 @@
/* Metro module 13522; source: modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx; dependencies: [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536, 13537, 13538, 10183, 7121, 6533, 13543, 2] */
function _fun102777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:6, offset: 0x0224825f, size: 260 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const virtualCurrencyStore = importDefault(10071) /* metro dependency 10071: VirtualCurrencyStore */;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const env0_9 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx');
exports.BountiesScrollVideoItem = BountiesScrollVideoItem;
}
function BountiesScrollVideoItemInner({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:211, offset: 0x02248363, size: 1184 bytes, params: 2, frame: 44
var currentBalance;
const env0_3 = height;
const env0_4 = isActive;
const env0_5 = isScrollingInBoundsSharedValue;
const value2 = env0_5.useMemo(function() {
return {width: width, height: height};
}, [width, height]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
return BountyStore.isBountyCompleted(bounty.id);
});
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const {enabled, loopingEnabled, orbAmount, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]);
const BountyVideoEndMode = (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode;
const r26 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD_WITH_CTA;
const r25 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
const value8 = env0_5.useRef(null);
const handlePlayerStateChange = useResumeOnActive({isActive: isActive, playerRef: value8}).handlePlayerStateChange;
const [property, property2] = env0_4(env0_5.useState(isActive), 2);
const [property3, property4] = env0_4(env0_5.useState(_fun102784), 2);
const value14 = env0_4(env0_5.useState(0), 2);
const property5 = value14[0];
if (property !== isActive) {
property2(isActive);
if (isActive) {
currentBalance = VirtualCurrencyStore.getCurrentBalance();
property4(currentBalance);
if (currentBalance !== property3) {
value14[1](function(a0) {
return a0 + 1;
});
}
}
}
const value17 = env0_5.useCallback(env0_3(_fun102787), [bounty.id, isActive, orbAmount, sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (require(13536) /* metro dependency 13536: useBountiesModalVideoAnalytics */).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r25});
const value19 = (require(13537) /* metro dependency 13537: useBountyVideoProgressPersistence */).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r26});
const initialProgress = value19.initialProgress;
const handleProgress = value19.handleProgress;
env0_5.useEffect(function() {
return _fun102790;
}, [value19.flushProgress]);
const value20 = env0_5.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
const useBountiesModalTimingModule = require(13533) /* metro dependency 13533: useBountiesModalTiming */;
const useBountiesModalTiming = useBountiesModalTimingModule.useBountiesModalTiming;
let duration = initialProgress.duration;
duration = duration > 0 ? initialProgress.duration : null;
const value21 = Reflect.apply(useBountiesModalTiming, useBountiesModalTimingModule, [{endMode: r26,
rewardDurationMs: r25, isCompleted: value3, onRewardEarned: value17, onVideoProgress: value20,
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics, playerRef: value8,
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
initialVideoDurationSec: duration}]);
const isCtaVisible = value21.isCtaVisible;
const isEndCardVisible = value21.isEndCardVisible;
const handleVideoEnd = value21.handleVideoEnd;
const handleVideoProgress = value21.handleVideoProgress;
const handleVideoPaused = value21.handleVideoPaused;
const handleVideoResumed = value21.handleVideoResumed;
const env0_12 = value21.handleReplay;
const rewardRemainingSeconds = value21.rewardRemainingSeconds;
const rewardTotalSeconds = value21.rewardTotalSeconds;
const normalizedProgress = value21.normalizedProgress;
const BountyVideo = (require(13538) /* metro dependency 13538: BountyVideo */).BountyVideo;
return (
<View style={value2}>
<BountyVideo
bounty={bounty}
sourceQuestContent={sourceQuestContent}
isCompleted={value3}
isCtaVisible={isCtaVisible}
isEndCardVisible={isEndCardVisible}
isProgressBarVisible={!isRecapPageOnTop}
orbsBalance={property3}
handleVideoEnd={handleVideoEnd}
handleVideoProgress={handleVideoProgress}
handleVideoPaused={handleVideoPaused}
handleVideoResumed={handleVideoResumed}
rewardRemainingSeconds={rewardRemainingSeconds}
rewardTotalSeconds={rewardTotalSeconds}
normalizedProgress={normalizedProgress}
repeat={loopingEnabled}
initialProgress={initialProgress}
isActive={isActive}
isRecapPageRevealed={isRecapPageRevealed}
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
playerRef={value8}
onPlayerStateChange={handlePlayerStateChange}
balanceWidgetPillResetKey={property5}
renderEndCard={renderEndCard}
/>
</View>
);
}
function BountiesScrollVideoItem({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3539, offset: 0x02248b41, size: 235 bytes, params: 2, frame: 19
isActive = !(isActive === undefined) && isActive;
if (isRecapPageRevealed !== undefined) {
}
if (isRecapPageOnTop !== undefined) {
}
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_MOBILE}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isActive}
>
{children_102795}
</QuestContentImpressionTrackerNative>
);
}
function useResumeOnActive({isActive, playerRef}) { // fn#102781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:784, owner: BountiesScrollVideoItemInner.useResumeOnActive, offset: 0x0224883a, size: 137 bytes, params: 2, frame: 17
const env0_2 = env1_5.useRef(true);
const env0_3 = env1_5.useRef(null);
const value2 = env1_5.useCallback(_fun102782, []);
env1_5.useEffect(_fun102783, [isActive, playerRef]);
return {handlePlayerStateChange: value2};
}
function _fun102784() { // fn#102784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1186, offset: 0x02248939, size: 31 bytes, params: 1, frame: 10
var r0;
const isActiveBinding = isActive;
let value = null;
if (isActiveBinding) {
value = environment.__proto__;
value = VirtualCurrencyStore.getCurrentBalance();
r0 = value;
} else {
r0 = value;
}
return r0;
}
function* _fun102787() { // fn#102787, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1378, offset: 0x02248963, size: 167 bytes, params: 1, frame: 15
var environment;
var r2;
var r1;
var binding;
var binding2;
var property;
var value4;
var claimBountyReward;
var id;
var value6;
var value7;
var value8;
var error;
var value9;
if (true) {
value = false;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
property = binding2[12];
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
claimBountyReward = value4.claimBountyReward;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
id = require.id;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
try {
value6 = Reflect.apply(claimBountyReward, value4, [id, importDefault]);
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_0;
value9 = binding(env2_2[13]);
value9.openBountyRewardClaimErrorToast(error);
r2 = value;
if (r2) {
value = environment.__proto__;
binding = env1_4;
r1 = binding;
} else {
r1 = r2;
}
if (r1) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
return undefined;
}
if (value8) {
return value7;
}
r2 = true;
if (r2 && env1_4) {
value = environment.__proto__;
VirtualCurrencyStore(_fun102788);
}
}
}
function _fun102789() { // fn#102789, offset: 0x02248a23, size: 11 bytes, params: 1, frame: 1
return function() {
return flushProgress();
};
}
function BountiesScrollVideoItemInnerRenderEndCard() { // fn#102792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3092, owner: BountiesScrollVideoItemInner.renderEndCard, offset: 0x02248a53, size: 151 bytes, params: 1, frame: 17
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_END_CARD}
sourceQuestContent={sourceQuestContent}
overrideVisibility={isEndCardVisible}
>
{children_102793}
</QuestContentImpressionTrackerNative>
);
}
function BountiesScrollVideoItemChildren() { // fn#102795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3939, owner: BountiesScrollVideoItem.children, offset: 0x02248c2c, size: 96 bytes, params: 1, frame: 14
return (
<BountiesScrollVideoItemInner
bounty={bounty}
sourceQuestContent={sourceQuestContent}
width={width}
height={height}
isActive={isActive}
isRecapPageRevealed={isRecapPageRevealed}
isRecapPageOnTop={isRecapPageOnTop}
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
/>
);
}
function _fun102783() { // fn#102783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:932, offset: 0x022488c3, size: 118 bytes, params: 1, frame: 14
var r1;
var isActiveBinding;
var value2;
let current = env0_2.current;
if (current) {
env0_2.current = false;
} else {
isActiveBinding = isActive;
if (isActiveBinding) {
current = env0_3.current;
value2 = environment.__proto__.__proto__;
r1 = current === (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState.PAUSED;
} else {
r1 = isActiveBinding;
}
if (r1) {
current = playerRef.current;
if (current != null) {
current.play();
}
}
}
}
function _fun102788(a0) { // fn#102788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1511, offset: 0x02248a0a, size: 25 bytes, params: 2, frame: 3
var r0;
let value = null;
if (value == a0) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = a0 + View;
r0 = value;
}
return r0;
}
function renderEndCardChildren() { // fn#102793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3315, owner: BountiesScrollVideoItemInner.renderEndCard.children, offset: 0x02248aea, size: 87 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} onReplay={handleReplay} isActive={isActive} isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue} />)(importDefault(13543) /* metro dependency 13543: BountiesScrollEndCard */);
}
@@ -0,0 +1,14 @@
/* Metro module 13542; source: modules/quests/native/BountiesModal/BountyCtaHelpers.tsx; dependencies: [1244, 2] */
function _fun102911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13732:6, offset: 0x0224ec20, size: 96 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/BountiesModal/BountyCtaHelpers.tsx');
exports.getBountyCtaInfo = function(a0) {
var object = {label: a0.productName, subtext: a0.cta.buttonLabel};
object.buttonLabel = require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.LLLLPD);
object.iconImageUri = a0.productIcon;
return object;
};
}
@@ -0,0 +1,104 @@
/* Metro module 13538; source: modules/quests/native/BountiesModal/BountyVideo.tsx; dependencies: [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540, 10124, 13541, 2] */
function _fun102888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:6, offset: 0x0224cda1, size: 304 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
const env0_9 = {'top': 48, 'bottom': 16, 'left': 16, 'right': 16};
const env0_10 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102889);
object = {code: 'function BountyVideoTsx1(){const{isScrollingInBoundsSharedValue,withTiming,isActive,timingStandard}=this.__closure;var _isScrollingInBoundsS;const isScrollingInBounds=((_isScrollingInBoundsS=isScrollingInBoundsSharedValue)===null||_isScrollingInBoundsS===void 0?void 0:_isScrollingInBoundsS.get())===true;return{opacity:withTiming(isActive&&!isScrollingInBounds?1:0,timingStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountyVideo.tsx');
exports.BountyVideo = BountyVideo;
}
function _fun102889() { // fn#102889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:295, offset: 0x0224ced1, size: 215 bytes, params: 1, frame: 18
const object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['overflow'] = 'hidden';
const lgBinding = lg;
object5['borderRadius'] = lgBinding;
object4.videoContainer = object5;
const object6 = {'position': 'absolute', 'top': null, 'left': null, 'flexDirection': 'row', 'alignItems': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.top = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.left = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.gap = PX_8;
object4.leftRow = object6;
const PROGRESS_BAR_HEIGHT = (require(13539) /* metro dependency 13539: BountiesModalProgress */).PROGRESS_BAR_HEIGHT;
object4.progress = {'position': 'absolute', 'bottom': 0, height: PROGRESS_BAR_HEIGHT, left: lgBinding,
right: lgBinding};
return object4;
}
function BountyVideo({bounty, sourceQuestContent, isCompleted, isCtaVisible, isEndCardVisible, isProgressBarVisible, orbsBalance, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed, rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, initialProgress, repeat, isActive, isRecapPageRevealed, isScrollingInBoundsSharedValue, renderEndCard, playerRef, onPlayerStateChange, balanceWidgetPillResetKey}) { // fn#102890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1105, offset: 0x0224cfa8, size: 978 bytes, params: 2, frame: 51
var object2;
isActive = !(isActive === undefined) && isActive;
isRecapPageRevealed = !(isRecapPageRevealed === undefined) && isRecapPageRevealed;
const styles = useStyles();
const value5 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = BountyVideoL;
object2 = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.isActive = isActive;
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object2;
closure.__workletHash = 12287714482150;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
const r35 = !enabled && undefined;
let r33 = isActive ? isEndCardVisible : !isActive;
r33 = !r33 ? isRecapPageRevealed : r33;
const items3 = [<AdVideoPlayer ref={playerRef} source={{uri: bounty.videoHls ?? ''}} httpEngine={value5} automaticallyWaitsToMinimizeStalling={r35} initialProgress={initialProgress} isFullscreen={false} externallyPaused={r33} style={StyleSheet.absoluteFillObject} contentInsets={env0_9} onProgress={handleVideoProgress} onEnd={handleVideoEnd} onPausePlayback={handleVideoPaused} onResumePlayback={handleVideoResumed} hideControls={isEndCardVisible} showSkipButtons={false} repeat={repeat} bufferingSpinnerPlacement="center" onPlayerStateChange={onPlayerStateChange} />];
items3[1] = renderEndCard?.();
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.leftRow, value6];
const value12 = ((Component) => <Component isCompleted={isCompleted} totalSeconds={rewardTotalSeconds} remainingSeconds={rewardRemainingSeconds} />)(importDefault(13540) /* metro dependency 13540: BountiesModalTimer */);
const BalanceWidgetPill = (require(10124) /* metro dependency 10124: BalanceWidgetPill */).BalanceWidgetPill;
items3[2] = <View2 style={items2}>{value12}<BalanceWidgetPill balance={orbsBalance} key={balanceWidgetPillResetKey} /></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items3[3] = <View3 style={[StyleSheet.absoluteFillObject,
value6]} pointerEvents="box-none">{((Component) => <Component bounty={bounty} visible={isCtaVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13541) /* metro dependency 13541: BountiesModalAdvertiserCta */)}</View3>;
const view = <View style={styles.videoContainer}>{items3}</View>;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<>
{view}
<View4 style={[styles.progress, value6]}>
{((Component) => <Component progress={normalizedProgress} visible={isProgressBarVisible} />)(importDefault(13539) /* metro dependency 13539: BountiesModalProgress */)}
</View4>
</>
);
}
function BountyVideoL() { // fn#102891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1728, owner: BountyVideo.L, offset: 0x0224d37a, size: 121 bytes, params: 1, frame: 18
const r7 = isScrollingInBoundsSharedValue?.get();
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object2.opacity = Reflect.apply(withTiming, timingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object2;
}
@@ -0,0 +1,26 @@
/* Metro module 13534; source: modules/quests/native/BountiesModal/bountyError.tsx; dependencies: [13535, 1244, 3857, 8947, 2] */
function _fun102863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:6, offset: 0x0224be6f, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(13535) /* metro dependency 13535: BountiesModalConstants */).BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS;
const Set = global.Set;
const set = new Set([260021]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/bountyError.tsx');
exports.openBountyRewardClaimErrorToast = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var object = {key: 'QUESTS_BOUNTIES_REWARD_CLAIM_FAILED'};
object.content = resolveBountyRewardClaimErrorMessage(a0);
object.icon = importDefault(dependencyMap[3]);
object.toastDurationMs = BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS;
defaultImport.open(object);
};
}
function resolveBountyRewardClaimErrorMessage(a0) { // fn#102864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:171, offset: 0x0224bf1e, size: 137 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = undefined;
return (a0 == null ? value : a0.code) == null ? intl.string(t.uLjCfn) : env0_4.has(a0.code) && (a0 == null ? value : a0.message) != null ? a0.message : intl.string(t.uLjCfn);
}
@@ -0,0 +1,163 @@
/* Metro module 13533; source: modules/quests/native/BountiesModal/useBountiesModalTiming.tsx; dependencies: [57, 31, 6528, 9530, 2] */
function _fun102855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:6, offset: 0x0224b836, size: 197 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 */;
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalTiming.tsx');
exports.BountyVideoEndMode = {END_CARD: 'END_CARD', END_CARD_WITH_CTA: 'END_CARD_WITH_CTA', LOOP: 'LOOP'};
exports.useBountiesModalTiming = useBountiesModalTiming;
}
function useBountiesModalTiming({endMode, rewardDurationMs, isCompleted, onRewardEarned, onVideoProgress, onVideoEnd, onVideoLooped, onVideoPaused, onVideoResumed, playerRef, initialProgressSec, initialMaxVideoProgressSec, initialVideoDurationSec}) { // fn#102856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:400, offset: 0x0224b8fb, size: 901 bytes, params: 2, frame: 35
var r7;
var value20;
const env0_2 = onRewardEarned;
const env0_3 = onVideoProgress;
const env0_5 = onVideoLooped;
initialProgressSec = initialProgressSec === undefined ? 0 : initialProgressSec;
initialMaxVideoProgressSec = initialMaxVideoProgressSec === undefined ? 0 : initialMaxVideoProgressSec;
initialVideoDurationSec = initialVideoDurationSec === undefined ? null : initialVideoDurationSec;
let binding = env0_3;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialVideoDurationSec != null && initialProgressSec >= initialVideoDurationSec - 1 && endMode !== env0_5.LOOP]);
binding = env0_2;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_11 = value6[1];
const binding2 = env0_3;
useState = binding2.useState;
const value8 = binding(Reflect.apply(useState, binding2, [_fun102857]), 2);
const property2 = value8[0];
const env0_12 = value8[1];
useState = binding2.useState;
const value9 = binding(Reflect.apply(useState, binding2, [null]), 2);
const property3 = value9[0];
const env0_13 = value9[1];
useState = binding2.useState;
const value10 = binding(Reflect.apply(useState, binding2, [initialMaxVideoProgressSec]), 2);
const property4 = value10[0];
const env0_14 = value10[1];
useState = binding2.useState;
const value11 = binding(Reflect.apply(useState, binding2, [initialVideoDurationSec]), 2);
const property5 = value11[0];
const env0_15 = value11[1];
const env0_16 = binding2.useRef(isCompleted);
const env0_17 = binding2.useRef(initialMaxVideoProgressSec);
const env0_18 = binding2.useRef(initialVideoDurationSec ?? 0);
binding = env0_3;
const env0_19 = binding.useRef(0);
const env0_20 = binding.useRef(0);
const value12 = binding.useCallback(_fun102858, [onVideoProgress, onRewardEarned, rewardDurationMs]);
const value13 = binding.useCallback(_fun102859, [endMode, onVideoEnd, onVideoLooped, onRewardEarned]);
const value14 = binding.useCallback(_fun102860, [playerRef]);
const value15 = binding.useCallback(_fun102861, [onVideoPaused]);
const value16 = binding.useCallback(_fun102862, [onVideoResumed]);
const value17 = 1000 * property4;
const value18 = rewardDurationMs / 1000;
let Math = global.Math;
const value19 = Math.max(0, value18 - property4);
if (value17 >= rewardDurationMs) {
r7 = 0;
} else if (property) {
r7 = 0;
} else if (isCompleted) {
r7 = 0;
} else if (property5 == null) {
r7 = value19;
} else if (property5 > 0) {
Math = global.Math;
value20 = Math.min(value18, property5);
Math = global.Math;
r7 = Math.max(0, value20 - property4);
} else {
r7 = value19;
}
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
return {isCtaVisible: (isCompleted || value17 > Reflect.apply(useConfig, BountiesStage1Experiment,
[{location: VIDEO_MODAL_MOBILE}]).ctaTimerMilliSeconds) && !(property && endMode !== env0_5.END_CARD_WITH_CTA),
isEndCardVisible: property, handleVideoEnd: value13, handleVideoProgress: value12, handleVideoPaused: value15,
handleVideoResumed: value16, handleReplay: value14, rewardRemainingSeconds: r7, rewardTotalSeconds: value18,
normalizedProgress: property3 ?? property2, maxVideoProgressSeconds: property4, videoDuration: property5};
}
function _fun102857() { // fn#102857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:755, offset: 0x0224bc80, size: 32 bytes, params: 1, frame: 3
return initialVideoDurationSec != null ? initialProgressSec / initialVideoDurationSec : 0;
}
function _fun102858({progress, currentTime, seekableDuration}) { // fn#102858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1015, offset: 0x0224bca0, size: 191 bytes, params: 2, frame: 18
env0_13(null);
const Math = global.Math;
const value2 = Math.max(currentTime, env0_17.current);
env0_17.current = value2;
env0_18.current = seekableDuration;
env0_20.current = currentTime;
env0_12(progress);
env0_14(value2);
env0_15(seekableDuration);
onVideoProgress(value2, seekableDuration, currentTime);
if (!env0_16.current && 1000 * value2 >= rewardDurationMs) {
env0_16.current = true;
onRewardEarned();
}
}
function _fun102859() { // fn#102859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1230, offset: 0x0224bd5f, size: 141 bytes, params: 1, frame: 14
var binding;
var onVideoLoopedBinding;
const onVideoEndBinding = onVideoEnd;
let current = env0_17.current;
onVideoEndBinding(current, env0_18.current);
const endModeBinding = endMode;
const LOOP = env1_5.LOOP;
if (endModeBinding === LOOP) {
binding = env0_19;
current = binding.current;
binding.current = current + 1;
onVideoLoopedBinding = onVideoLooped;
current = env0_19.current;
onVideoLoopedBinding(current);
} else {
env0_11(true);
}
if (!env0_16.current) {
env0_16.current = true;
onRewardEarned();
}
}
function _fun102860() { // fn#102860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1363, offset: 0x0224bdec, size: 73 bytes, params: 1, frame: 14
var r2;
var r3;
var current;
const value2 = playerRef == null;
const value3 = undefined;
if (value2) {
r2 = value2;
r3 = value3;
} else {
current = playerRef.current;
r2 = current == null;
r3 = current;
}
if (!r2) {
r3.seekToStart();
}
env0_13(0);
env0_11(false);
return value3;
}
function _fun102861(a0) { // fn#102861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1455, offset: 0x0224be35, size: 29 bytes, params: 2, frame: 13
onVideoPaused(env0_20.current, a0);
}
function _fun102862(a0) { // fn#102862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1498, offset: 0x0224be52, size: 29 bytes, params: 2, frame: 13
onVideoResumed(env0_20.current, a0);
}
@@ -0,0 +1,317 @@
/* Metro module 13536; source: modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx; dependencies: [31, 661, 9513, 491, 7110, 7121, 9522, 13523, 2] */
function _fun102867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:6, offset: 0x0224c056, size: 172 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_102870 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_4 = [25, 50, 75];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx');
exports.useBountiesModalVideoAnalytics = useBountiesModalVideoAnalytics;
}
function _createForOfIteratorHelperLoose_102868(a0, a1) { // fn#102868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:137, offset: 0x0224c102, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun102869;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_102870(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_102870(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_102870(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun102869;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useBountiesModalVideoAnalytics({bountyId, sourceQuestContent, rewardDurationMs}) { // fn#102871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1203, offset: 0x0224c276, size: 551 bytes, params: 2, frame: 24
var object2;
const env0_2 = rewardDurationMs;
const value2 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
const binding = env0_2;
const value = binding.useMemo(_fun102872, []);
const useRef = binding.useRef;
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
const env0_5 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value3]);
const value5 = binding.useCallback(_fun102873, [bountyId, value, value2, sourceQuestContent, rewardDurationMs]);
const value6 = binding.useCallback(_fun102874, [value5]);
const value7 = binding.useCallback(_fun102875, [value5, rewardDurationMs]);
const value8 = binding.useCallback(_fun102876, [value5]);
const value9 = binding.useCallback(_fun102877, [value5, rewardDurationMs]);
object2 = {};
object2.handleVideoProgressAnalytics = binding.useCallback(_fun102878, [value6, value7, value9, rewardDurationMs]);
object2.handleVideoEndAnalytics = binding.useCallback(_fun102879, [value6, value7, value9, value8]);
object2.handleVideoLoopedAnalytics = binding.useCallback(_fun102880, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object2.handleVideoPausedAnalytics = binding.useCallback(_fun102881, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object2.handleVideoResumedAnalytics = binding.useCallback(_fun102882, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
return object2;
}
function _fun102872() { // fn#102872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1348, offset: 0x0224c49d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(491) /* metro dependency 491 */).v4();
}
function _fun102873({videoTimestampSeconds, progress, thresholdMet}) { // fn#102873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1408, offset: 0x0224c4c2, size: 185 bytes, params: 2, frame: 20
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object2 = {};
object2.adContentId = bountyId;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
const AD_VIDEO_PROGRESSED = AnalyticEvents.AD_VIDEO_PROGRESSED;
object2.event = AD_VIDEO_PROGRESSED;
object2.properties = {progress: progress, video_timestamp_seconds: videoTimestampSeconds, video_session_id: env0_4,
impression_id: env0_3, threshold_met: thresholdMet, reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object2]);
}
function _fun102874() { // fn#102874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1765, offset: 0x0224c57b, size: 77 bytes, params: 1, frame: 12
const current = env0_5.current;
if (!current.has('start')) {
env0_5.current.add('start');
env0_6({'videoTimestampSeconds': 0, 'progress': 0, 'thresholdMet': false});
}
}
function _fun102875(a0, a1) { // fn#102875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1899, offset: 0x0224c5c8, size: 159 bytes, params: 3, frame: 15
var Math;
var value2;
var value3;
const current = env0_5.current;
if (!current.has('threshold')) {
env0_5.current.add('threshold');
Math = global.Math;
value2 = Math.max(rewardDurationMs / 1000, a0);
value3 = environment.__proto__;
env0_6({videoTimestampSeconds: value2,
progress: (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(value2, a1),
thresholdMet: true});
}
}
function _fun102876(a0, a1) { // fn#102876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2114, offset: 0x0224c667, size: 108 bytes, params: 3, frame: 14
const current = env0_5.current;
if (!current.has('end')) {
env0_5.current.add('end');
env0_6({'videoTimestampSeconds': null, 'progress': 1, 'thresholdMet': true,
videoTimestampSeconds: global.Math.max(a0, a1)});
}
}
function _fun102877(a0, a1) { // fn#102877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2270, offset: 0x0224c6d3, size: 225 bytes, params: 3, frame: 23
var r1;
var value;
var value2;
var value3;
var done;
var value5;
var value6;
var current;
var has;
var binding;
var value7;
var value8;
if (!(a1 <= 0)) {
value = environment.__proto__;
value2 = (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(a0, a1);
value = _createForOfIteratorHelperLoose_102868(env1_4);
value3 = value();
done = value3.done;
if (!done) {
r1 = value3;
while (true) {
value5 = r1.value;
value6 = 'p' + value5;
current = env0_5.current;
has = current.has;
if (!Reflect.apply(has, current, [value6])) {
if (value2 < value5 / 100) {
break;
}
current = env0_5.current;
current.add(value6);
binding = env0_6;
value7 = 1000 * a0;
binding({videoTimestampSeconds: a0, progress: value2, thresholdMet: value7 >= rewardDurationMs});
break;
}
value8 = value();
done = value8.done;
if (done) {
break;
}
r1 = value8;
continue;
}
}
}
}
function _fun102878(a0, a1) { // fn#102878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2588, offset: 0x0224c7b4, size: 59 bytes, params: 3, frame: 15
env0_7();
if (1000 * a0 >= rewardDurationMs) {
env0_8(a0, a1);
}
env0_10(a0, a1);
}
function _fun102879(a0, a1) { // fn#102879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2676, offset: 0x0224c7ef, size: 51 bytes, params: 3, frame: 14
env0_7();
env0_8(a0, a1);
env0_10(a0, a1);
env0_9(a0, a1);
}
function _fun102880(a0) { // fn#102880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2764, offset: 0x0224c822, size: 159 bytes, params: 2, frame: 17
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
const object2 = {};
object2.adContentId = bountyId;
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object2.adCreativeType = BOUNTY;
const AD_VIDEO_LOOPED = AnalyticEvents.AD_VIDEO_LOOPED;
object2.event = AD_VIDEO_LOOPED;
object2.properties = {video_session_id: env0_4, impression_id: env0_3, loop_count: a0,
reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object2]);
}
function _fun102881(a0, a1) { // fn#102881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3050, offset: 0x0224c8c1, size: 199 bytes, params: 3, frame: 17
var moduleValue;
var trackAdContentEvent;
var object2;
const PlaybackTriggerSource = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object2 = {};
object2.adContentId = bountyId;
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object2.event = AnalyticEvents.AD_VIDEO_PAUSED;
object2.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: env0_3,
reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
}
}
function _fun102882(a0, a1) { // fn#102882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3407, offset: 0x0224c988, size: 199 bytes, params: 3, frame: 17
var moduleValue;
var trackAdContentEvent;
var object2;
const PlaybackTriggerSource = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object2 = {};
object2.adContentId = bountyId;
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object2.event = AnalyticEvents.AD_VIDEO_RESUMED;
object2.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: env0_3,
reward_timer_seconds: rewardDurationMs / 1000};
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
}
}
@@ -0,0 +1,123 @@
/* Metro module 13521; source: modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx; dependencies: [57, 31, 4017, 13520, 2] */
function _fun102768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:6, offset: 0x02247e54, size: 202 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 = {code: 'function getRecapOrbCountFromPullProgress_useBountiesRecapOrbCountTsx1(progress,targetOrbAmount){if(targetOrbAmount<=0||!Number.isFinite(targetOrbAmount)){return 0;}const clampedProgress=Math.min(1,Math.max(0,progress));return Math.round(clampedProgress*targetOrbAmount);}'};
const value = _fun102769();
object = {code: 'function useBountiesRecapOrbCountTsx2(){const{enabled,recapRevealHeight,getRevealProgress,scrollY,lastBountyScrollOffset,RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS,getRecapOrbCountFromPullProgress,targetOrbAmount}=this.__closure;if(!enabled||recapRevealHeight<=0){return{count:0,revealed:false};}const pullProgress=getRevealProgress(scrollY.get(),lastBountyScrollOffset,recapRevealHeight)/RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS;if(pullProgress<=0.1){return{count:0,revealed:false};}return{count:getRecapOrbCountFromPullProgress(pullProgress,targetOrbAmount),revealed:true};}'};
object = {code: 'function useBountiesRecapOrbCountTsx3({count:count,revealed:revealed}){const{runOnJS,resetDisplayCount,setDisplayCountMonotonic}=this.__closure;if(!revealed){runOnJS(resetDisplayCount)();return;}runOnJS(setDisplayCountMonotonic)(count);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx');
exports.getRecapOrbCountFromPullProgress = value;
exports.useBountiesRecapOrbCount = useBountiesRecapOrbCount;
}
function _fun102769() { // fn#102769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:402, offset: 0x02247f1e, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1) {
var value;
if (!(a1 <= 0)) {
var property = global.Number;
if (property.isFinite(a1)) {
property = global.Math;
value = global.Math.max(0, a0);
value = property.min(1, value);
property = global.Math;
return property.round(value * a1);
}
}
return 0;
};
closure.__closure = {};
closure.__workletHash = 14295638108053;
closure.__initData = env0_4;
return closure;
}
function useBountiesRecapOrbCount({scrollY, lastBountyScrollOffset, recapRevealHeight, targetOrbAmount, enabled}) { // fn#102771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1755, offset: 0x02247fad, size: 373 bytes, params: 2, frame: 27
const env0_2 = recapRevealHeight;
const binding = targetOrbAmount;
const [property, env0_5] = env0_2(binding.useState(0), 2);
let closure = _fun102772;
const value4 = binding.useCallback(closure, []);
const env0_6 = value4;
const value5 = binding.useCallback(_fun102774, []);
const env0_7 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = useBountiesRecapOrbCountB;
let object2 = {enabled: enabled, recapRevealHeight: recapRevealHeight};
const getRevealProgress = (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).getRevealProgress;
object2.getRevealProgress = getRevealProgress;
object2.scrollY = scrollY;
object2.lastBountyScrollOffset = lastBountyScrollOffset;
object2.RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS = 0.95;
object2.getRecapOrbCountFromPullProgress = env0_5;
object2.targetOrbAmount = targetOrbAmount;
closure.__closure = object2;
closure.__workletHash = 2855285055570;
closure.__initData = env0_6;
const closure2 = useBountiesRecapOrbCountP;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.resetDisplayCount = value5;
object2.setDisplayCountMonotonic = value4;
closure2.__closure = object2;
closure2.__workletHash = 12006414940221;
closure2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return property;
}
function _fun102772(a0) { // fn#102772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1939, offset: 0x02248122, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_5(_fun102773);
}
function _fun102774() { // fn#102774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1982, offset: 0x02248156, size: 18 bytes, params: 1, frame: 11
env0_5(0);
}
function useBountiesRecapOrbCountB() { // fn#102775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2037, owner: useBountiesRecapOrbCount.b, offset: 0x02248168, size: 166 bytes, params: 1, frame: 18
var r0;
var value2;
var moduleValue;
var value5;
var object2;
if (enabled) {
if (recapRevealHeight <= 0) {
return {'count': 0, 'revealed': false};
}
value2 = environment.__proto__;
moduleValue = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
value5 = moduleValue.getRevealProgress(scrollY.get(), lastBountyScrollOffset, recapRevealHeight) / 0.95;
if (value5 <= 0.1) {
r0 = {'count': 0, 'revealed': false};
} else {
object2 = {};
object2.count = env1_5(value5, targetOrbAmount);
object2.revealed = true;
r0 = object2;
}
return r0;
}
return {'count': 0, 'revealed': false};
}
function useBountiesRecapOrbCountP({count, revealed}) { // fn#102776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2474, owner: useBountiesRecapOrbCount.p, offset: 0x0224820e, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const runOnJS = value.runOnJS;
if (revealed) {
Reflect.apply(runOnJS, value, [env0_6])(count);
} else {
Reflect.apply(runOnJS, value, [env0_7])();
}
}
function _fun102773(a0) { // fn#102773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1946, offset: 0x02248142, size: 20 bytes, params: 2, frame: 3
const value = a0;
return env0_0 > value ? env0_0 : value;
}
@@ -0,0 +1,69 @@
/* Metro module 13520; source: modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx; dependencies: [31, 2] */
function _fun102760(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:6, offset: 0x02247b91, size: 152 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
object = {code: 'function getRevealProgress_useBountiesRecapScrollTsx1(scrollOffset,startOffset,revealHeight){if(revealHeight<=0){return 0;}return(scrollOffset-startOffset)/revealHeight;}'};
const value = _fun102761();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx');
exports.RECAP_SNAP_EPSILON = 2;
exports.getRevealProgress = value;
exports.useBountiesRecapScroll = useBountiesRecapScroll;
}
function _fun102761() { // fn#102761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:290, offset: 0x02247c29, size: 48 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var value = 0;
return a2 <= value ? value : (a0 - a1) / a2;
};
closure.__closure = {};
closure.__workletHash = 9769647749947;
closure.__initData = env0_1;
return closure;
}
function useBountiesRecapScroll({listRef, enabled, offsets}) { // fn#102763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:664, offset: 0x02247c75, size: 217 bytes, params: 2, frame: 18
const binding = listRef;
let useCallback = binding.useCallback;
let value = Reflect.apply(useCallback, binding, [function(a0) {
if (listRef.current != null) {
listRef.current.scrollToOffset({offset: a0, animated: true});
}
}, [listRef]]);
const value2 = binding.useCallback(_fun102765, [offsets.lastBounty, value]);
value = binding.useCallback(_fun102766, [enabled, offsets.fullRecap, offsets.lastBounty, offsets.revealHeight,
value]);
useCallback = binding.useCallback;
return {scrollToLastBounty: value2, handleRecapMomentumEnd: Reflect.apply(useCallback, binding, [_fun102767,
[enabled, value]])};
}
function _fun102765() { // fn#102765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:844, offset: 0x02247d89, size: 26 bytes, params: 1, frame: 11
env0_3(offsets.lastBounty);
}
function _fun102766(a0) { // fn#102766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:902, offset: 0x02247da3, size: 138 bytes, params: 2, frame: 16
var r1;
var offsetsBinding;
var value2;
var binding;
if (enabled) {
if (!(a0 <= offsets.lastBounty)) {
value2 = environment.__proto__;
binding = env1_2;
offsetsBinding = offsets;
r1 = binding(a0, offsetsBinding.lastBounty,
offsetsBinding.revealHeight) >= 0.25 ? offsets.fullRecap : offsets.lastBounty;
if (!(global.Math.abs(a0 - r1) < 2)) {
env0_3(r1);
}
}
}
}
function _fun102767(a0) { // fn#102767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:1139, offset: 0x02247e2d, size: 39 bytes, params: 2, frame: 11
if (enabled) {
env0_4(a0.contentOffset.y);
}
}
@@ -0,0 +1,79 @@
/* Metro module 13537; source: modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx; dependencies: [57, 31, 7092, 6528, 9530, 13533, 9532, 2] */
function _fun102883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:6, offset: 0x0224ca4f, size: 189 bytes, params: 8, frame: 19
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 */;
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
const env0_6 = {'timestampSec': 0, 'maxTimestampSec': 0, 'duration': 0};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx');
exports.useBountyVideoProgressPersistence = useBountyVideoProgressPersistence;
}
function useBountyVideoProgressPersistence({bountyId, endMode}) { // fn#102884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:353, offset: 0x0224cb0c, size: 284 bytes, params: 2, frame: 17
var object2;
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
const useConfig = BountiesStage1Experiment.useConfig;
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
const env0_2 = enabled;
const binding = env0_3;
const property = env0_2(binding.useState(_fun102885), 1)[0];
var env0_3 = binding.useRef(0);
const env0_4 = binding.useRef(property.timestampSec);
const env0_5 = binding.useRef(property.maxTimestampSec);
const env0_6 = binding.useRef(property.duration);
object2 = {initialProgress: property};
object2.handleProgress = binding.useCallback(_fun102886, [enabled, bountyId]);
object2.flushProgress = binding.useCallback(_fun102887, [enabled, bountyId]);
return object2;
}
function _fun102885() { // fn#102885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:524, offset: 0x0224cc28, size: 136 bytes, params: 1, frame: 15
var value3;
if (enabled) {
value3 = BountyStore.getBountyVideoProgress(bountyId);
return value3 == null ? env1_6 : endMode !== (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode.LOOP ? value3.timestampSec <= 5 ? env1_6 : value3 : value3.duration > 0 && value3.maxTimestampSec >= value3.duration - 1 || value3.timestampSec <= 5 ? env1_6 : value3;
}
return env1_6;
}
function _fun102886(a0, a1, a2) { // fn#102886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:902, offset: 0x0224ccb0, size: 143 bytes, params: 4, frame: 16
var value3;
var moduleValue;
env0_4.current = a2;
env0_5.current = a0;
env0_6.current = a1;
if (enabled && a2 >= env0_3.current) {
env0_3.current = a2 + 1;
value3 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
moduleValue.setBountyVideoProgress(bountyId, {timestampSec: a2, maxTimestampSec: a0, duration: a1});
}
}
function _fun102887() { // fn#102887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:1099, offset: 0x0224cd3f, size: 98 bytes, params: 1, frame: 15
var value2;
var moduleValue;
var setBountyVideoProgress;
var bountyIdBinding;
var object2;
var current;
if (enabled) {
value2 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
setBountyVideoProgress = moduleValue.setBountyVideoProgress;
bountyIdBinding = bountyId;
object2 = {};
current = env0_4.current;
object2.timestampSec = current;
current = env0_5.current;
object2.maxTimestampSec = current;
current = env0_6.current;
object2.duration = current;
Reflect.apply(setBountyVideoProgress, moduleValue, [bountyIdBinding, object2]);
}
}
@@ -0,0 +1,75 @@
/* Metro module 13519; source: modules/quests/native/BountiesModal/useVisibilityTransition.tsx; dependencies: [57, 31, 4017, 4504, 2] */
function _fun102755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:6, offset: 0x022478cb, size: 165 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 = {code: "function useVisibilityTransitionTsx1(){const{withTiming,visibility,visible,entranceTiming,exitTiming,runOnJS,animationCallbackJSThread}=this.__closure;return{opacity:withTiming(visibility,visible?entranceTiming:exitTiming,'respect-motion-settings',function(){'worklet';runOnJS(animationCallbackJSThread)();})};}"};
object = {code: 'function useVisibilityTransitionTsx2(){const{runOnJS,animationCallbackJSThread}=this.__closure;runOnJS(animationCallbackJSThread)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useVisibilityTransition.tsx');
exports.useVisibilityTransition = useVisibilityTransition;
}
function useVisibilityTransition({visible, entranceTiming, exitTiming}) { // fn#102756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:707, offset: 0x02247970, size: 332 bytes, params: 2, frame: 26
const env0_2 = exitTiming;
let binding = env0_3;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
var env0_3 = property2;
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [visible]), 2);
if (value6[0] !== visible) {
value6[1](visible);
if (!visible) {
property2(true);
}
}
binding = env0_3;
let closure = _fun102757;
const value7 = binding.useCallback(closure, []);
const env0_4 = value7;
const r15 = visible ? 1 : 0;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = useVisibilityTransitionK;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.visibility = r15;
object.visible = visible;
object.entranceTiming = entranceTiming;
object.exitTiming = exitTiming;
object.runOnJS = reanimatedRexportModule.runOnJS;
object.animationCallbackJSThread = value7;
closure.__closure = object;
closure.__workletHash = 12648900540770;
closure.__initData = env0_4;
return {opacityStyle: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]),
shouldRender: visible || property};
}
function useVisibilityTransitionK() { // fn#102758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:986, owner: useVisibilityTransition.k, offset: 0x02247abc, size: 165 bytes, params: 1, frame: 24
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding = env0_5;
const r3 = visible ? entranceTiming : exitTiming;
const closure = kN;
const object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.animationCallbackJSThread = env0_4;
closure.__closure = object;
closure.__workletHash = 11904317879470;
closure.__initData = env1_5;
return {opacity: Reflect.apply(withTiming, timingModule, [binding, r3, 'respect-motion-settings', closure])};
}
function kN() { // fn#102759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:1062, owner: useVisibilityTransition.k.n, offset: 0x02247b61, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_4)();
}