This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,52 +1,64 @@
/* Metro module 13516; source: modules/quests/native/BountiesModal/BountiesModal.tsx; dependencies: [31, 6528, 33, 9530, 13517, 13552, 7717, 10121, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as ModalNativeModule from '../../../../design/components/Modal/native/Modal.native.tsx'; /* Metro dependency 10121 */
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;
let value = ReactModule;
value = value.memo(BountiesModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModal.tsx');
(FileImportTrackerModule).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 = (BountiesStage1ExperimentModule).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 = (ModalNativeModule).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 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]));
}
}
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__;
(DeviceOrientationModule).lockOrientation('PORTRAIT', true);
return (DeviceOrientationModule).restoreDefaultOrientation;
}
}
}
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]));
function headerLeft_102690() { // fn#102690, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
return null;
}
global.__d(_fun102687, 13516, [31, 6528, 33, 9530, 13517, 13552, 7717, 10121,
2]) /* metro module 13516, dependencies: [31, 6528, 33, 9530, 13517, 13552, 7717, 10121, 2] */;
@@ -1,25 +1,28 @@
/* Metro module 13515; source: modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx; dependencies: [5080, 13516, 1962, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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;
object = {showModal: showModal_102685, hideModal: hideModal_102686};
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx');
exports.default = object;
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
(ModalActionCreators).popWithKey('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');
}
global.__d(_fun102684, 13515, [5080, 13516, 1962, 2]) /* metro module 13515, dependencies: [5080, 13516, 1962, 2] */;
@@ -1,176 +1,216 @@
/* 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] */
import ObjectWithoutProperties from '../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonHooksNativeModule from '../../../../design/components/Button/native/ButtonHooks.native.tsx'; /* Metro dependency 4583 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as UseVisibilityTransitionModule from './useVisibilityTransition.tsx'; /* Metro dependency 13519 */
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
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 */;
let value = ReactNativeModule;
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);
const env0_10 = (ReanimatedRexport).createAnimatedComponent(Pressable);
const env0_11 = (CreateStylesModule).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');
(FileImportTrackerModule).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;
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 object = {};
const object2 = {'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;
object2.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = PX_16;
object.outerContainer = object2;
const object3 = {};
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object3, SHADOW_TOP_HIGH, undefined);
object3['alignSelf'] = 'stretch';
object3['borderWidth'] = 1;
object3['borderColor'] = 'transparent';
object3['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3['overflow'] = 'hidden';
object.ctaPressable = object3;
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingLeft = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingRight = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.gap = PX_12;
object.cta = object4;
const object5 = {'width': 40, 'height': 40, 'backgroundColor': null, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.ctaLogoContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, 'hidden');
object.ctaLogo = object6;
object.ctaInfo = {'flex': 1, 'justifyContent': 'center', 'gap': 2};
return object;
}
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 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 = (TextModule).Text;
var items4;
const env0_4 = undefined;
const styles = useStyles();
const bountyCtaInfo = (BountyCtaHelpersModule).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 useVisibilityTransition = UseVisibilityTransitionModule.useVisibilityTransition;
const object = {visible: visible};
object.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, UseVisibilityTransitionModule, [object]);
const r19 = visible ? 1 : 0;
const env0_3 = r19;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BountiesModalAdvertiserCtaB2 = BountiesModalAdvertiserCtaB;
BountiesModalAdvertiserCtaB2.__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};
BountiesModalAdvertiserCtaB2.__workletHash = 4075229418021;
BountiesModalAdvertiserCtaB2.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [BountiesModalAdvertiserCtaB2]);
const value9 = ReanimatedRexportModule.useSharedValue(0);
const value10 = (ButtonHooksNativeModule).useButtonPressAnimationProps(value9);
const style = value10.style;
let binding = env0_4;
const value11 = binding(value10, env0_3);
binding = ReactModule;
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 withTiming = TimingModule.withTiming;
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 _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 object = {};
const bountyBinding = bounty;
object.adContentId = bountyBinding.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
object.cta = bountyBinding.cta;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
Reflect.apply(openAdGameLinkDirectly, value, [object, {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 _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 = (QuestContentModule).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 = (QuestContentModule).QuestContent;
const VIDEO_MODAL_MOBILE_FOOTER = QuestContent.VIDEO_MODAL_MOBILE_FOOTER;
binding(VIDEO_MODAL_MOBILE_FOOTER);
}
}
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);
}
global.__d(_fun102904, 13541, [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121,
7120, 6533, 7976, 5475, 4573, 4578,
2]) /* metro module 13541, dependencies: [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121, 7120, 6533, 7976, 5475, 4573, 4578, 2] */;
@@ -1,45 +1,55 @@
/* Metro module 13550; source: modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx; dependencies: [31, 33, 4501, 697, 5278, 1244, 5312, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
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');
ReactModule;
const env0_4 = (CreateStylesModule).createStyles(_fun102934);
(FileImportTrackerModule).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 object2 = {'alignItems': 'center', 'justifyContent': 'center'};
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.height = PX_32;
return {closeButton: object2};
}
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 = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (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>
);
}
}
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>
);
}
global.__d(_fun102933, 13550, [31, 33, 4501, 697, 5278, 1244, 5312,
2]) /* metro module 13550, dependencies: [31, 33, 4501, 697, 5278, 1244, 5312, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 13535; source: modules/quests/native/BountiesModal/BountiesModalConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalConstants.tsx');
exports.BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS = 10000;
}
global.__d(_fun102866, 13535, [2]) /* metro module 13535, dependencies: [2] */;
@@ -1,384 +1,438 @@
/* 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] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import BountyStore from '../../BountyStore.tsx'; /* Metro dependency 7092 */
import BountiesModalActionCreators from './BountiesModalActionCreators.tsx'; /* Metro dependency 13515 */
import BountiesModalEndCard from './BountiesModalEndCard.tsx'; /* Metro dependency 13553 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as AnalyticsActionsModule from '../../lib/analytics/AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
import * as VideoQuestUtilsModule from '../../utils/VideoQuestUtils.tsx'; /* Metro dependency 9522 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as HooksModule from '../../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
import * as QuestContentImpressionTrackerNativeModule from '../QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
import * as UseBountiesModalTimingModule from './useBountiesModalTiming.tsx'; /* Metro dependency 13533 */
import * as UseBountiesModalVideoAnalyticsModule from './useBountiesModalVideoAnalytics.tsx'; /* Metro dependency 13536 */
import * as UseBountyVideoProgressPersistenceModule from './useBountyVideoProgressPersistence.tsx'; /* Metro dependency 13537 */
import * as BountyVideoModule from './BountyVideo.tsx'; /* Metro dependency 13538 */
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 value = JsxRuntimeModule;
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');
const env0_14 = (CreateStylesModule).createStyles(_fun102952);
(FileImportTrackerModule).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 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 useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).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 = (UseBountiesModalTimingModule).BountyVideoEndMode;
const r19 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD;
const r7 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
env0_4 = r7;
const {initialProgress, handleProgress,
flushProgress} = (UseBountyVideoProgressPersistenceModule).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r19});
const value12 = env0_4.useCallback(env0_3(_fun102946), [bounty.id, sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (UseBountiesModalVideoAnalyticsModule).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 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 = (BountyVideoModule).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_102950}
/>
</View>,
];
items2[1] = (
<View style={value4}>
{((Component) => <Component onPress={value17} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */)}
</View>
);
const SafeAreaPaddingView = (SafeAreaViewModule).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 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} = (UseWindowDimensionsNative)();
const value3 = (UseSafeAreaInsetsNative)();
return env1_4.useMemo(_fun102940, [width, height, value3.top, value3.bottom, value3.left, value3.right]);
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 object = {};
let Math = global.Math;
const floor = Math.floor;
binding = env0_2;
object.top = Reflect.apply(floor, Math, [binding.top + (value5 - r4) / 2]);
Math = global.Math;
object.left = Math.floor(binding.left + (value3 - r6) / 2);
Math = global.Math;
object.width = Math.floor(r6);
Math = global.Math;
object.height = Math.floor(r4);
object.isFullWidth = r1;
return object;
}
}
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 object = {};
const binding = env0_3;
const top = binding.top;
let value = environment.__proto__;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.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;
object.left = value - PX_8;
items2[1] = object;
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 trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object.event = AD_VIDEO_MODAL_CLOSED;
const object2 = {};
const getQuestContentName = AnalyticsTypesModule.getQuestContentName;
const QuestContent = (QuestContentModule).QuestContent;
let VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object2.content_name = Reflect.apply(getQuestContentName, AnalyticsTypesModule, [VIDEO_MODAL_MOBILE]);
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
object2.content_id = VIDEO_MODAL_MOBILE;
object2.video_progress = VideoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object2.threshold_met = 1000 * maxVideoProgressSeconds >= env0_4;
object2.reward_timer_seconds = env0_4 / 1000;
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
flushProgress();
(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 trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
object.event = AD_VIDEO_MODAL_CLOSED;
const object2 = {};
const getQuestContentName = AnalyticsTypesModule.getQuestContentName;
const QuestContent = (QuestContentModule).QuestContent;
let VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object2.content_name = Reflect.apply(getQuestContentName, AnalyticsTypesModule, [VIDEO_MODAL_END_CARD]);
VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object2.content_id = VIDEO_MODAL_END_CARD;
object2.video_progress = VideoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
object2.threshold_met = true;
object2.reward_timer_seconds = env0_4 / 1000;
object.properties = object2;
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
flushProgress();
(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 = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (QuestContentModule).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 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} />)(BountiesModalEndCard);
}
}
}
}
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 _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 object = {};
object.videoWrapper = {position: 'absolute'};
object.closeButton = {position: 'absolute'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.bottomContainer = {'position': 'absolute', 'bottom': null, 'justifyContent': 'flex-end', bottom: PX_24};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.left = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.right = PX_16;
object.bottomContainerFullWidth = object5;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingLeft = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingRight = PX_16;
object.bottomContainerNotFullWidth = object6;
return object;
}
}
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 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 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 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 _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 */);
}
global.__d(_fun102937, 13552, [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]) /* metro module 13552, 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] */;
File diff suppressed because it is too large. Load diff
@@ -1,120 +1,158 @@
/* 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] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
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 */;
let value = ReactNativeModule;
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);
const env0_8 = (CreateStylesModule).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');
(FileImportTrackerModule).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);
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 object = {container: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center', 'alignItems': 'center'}};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['backgroundColor'] = 'rgba(241, 251, 169, 0.15)';
object.backdropTint = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object.backdropGradient = object3;
const object4 = {'width': 92, 'height': 92, 'borderRadius': null, 'borderWidth': 1};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object4.borderColor = BORDER_MUTED;
object.image = object4;
const object5 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.gap = PX_4;
object5.alignItems = 'center';
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.marginTop = PX_12;
object.info = object5;
object.ctaContainer = {'position': 'relative', 'alignItems': 'center'};
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]);
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 = (TextModule).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (BountyCtaHelpersModule).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 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 object = {};
const bountyBinding = bounty;
object.adContentId = bountyBinding.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
object.cta = bountyBinding.cta;
const object2 = {};
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_ICON_END_CARD = QuestContent.VIDEO_MODAL_ICON_END_CARD;
object2.content = VIDEO_MODAL_ICON_END_CARD;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object2.ctaContent = OPEN_GAME_LINK;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object, object2]);
}
}
}
global.__d(_fun102956, 13553, [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475,
4573,
2]) /* metro module 13553, dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */;
@@ -1,79 +1,103 @@
/* 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] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
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');
(FileImportTrackerModule).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 = (ButtonNativeModule).Button;
var items2;
var intl;
var value;
const styles = useStyles();
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;
};
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.visible = visible;
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
closure.__closure = object;
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 object = {};
const bountyBinding = bounty;
object.adContentId = bountyBinding.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
object.cta = bountyBinding.cta;
const object2 = {};
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
object2.content = VIDEO_MODAL_END_CARD;
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
object2.ctaContent = OPEN_GAME_LINK;
object2.sourceQuestContent = sourceQuestContent;
Reflect.apply(openAdGameLinkDirectly, value, [object, object2]);
}
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]);
}
global.__d(_fun102961, 13554, [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244,
2]) /* metro module 13554, dependencies: [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244, 2] */;
@@ -1,118 +1,124 @@
/* Metro module 13539; source: modules/quests/native/BountiesModal/BountiesModalProgress.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
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 */;
let value = ReactNativeModule;
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);
const env0_9 = (CreateStylesModule).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');
(FileImportTrackerModule).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);
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 object = {};
object.progressContainer = {height: 4};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['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;
object3['backgroundColor'] = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3['opacity'] = 0.54;
object.progressTrack = object3;
const object4 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 8, 'shadowOpacity': 1, 'elevation': 4,
'shadowColor': '#30C773'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object4.backgroundColor = GREEN_300;
object4.shadowOffset = {'width': 0, 'height': 0};
object.progressBar = object4;
const object5 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 12, 'shadowOpacity': 1, 'elevation': 8};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object5.backgroundColor = GREEN_300;
object5.shadowOffset = {'width': 0, 'height': 0};
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
object5.shadowColor = GREEN_300;
object.progressBarGlowLayer = object5;
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 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();
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = ReactModule.useState;
const value4 = Module00057(Reflect.apply(useState, ReactModule, [progress]), 2);
const property3 = value4[0];
if (progress !== property3) {
value4[1](progress);
property2(progress < property3);
}
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;
};
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.visible = visible;
object.timingFast = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
closure.__closure = object;
closure.__workletHash = 5158131592262;
closure.__initData = env0_10;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.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, ReanimatedRexportModule, [closure]);
const View2 = (ReanimatedRexport).View;
const items3 = [styles.progressContainer, style, value5];
const items2 = [
<View style={styles.progressTrack} />,
];
const View3 = (ReanimatedRexport).View;
items2[1] = <View3 style={[styles.progressBarGlowLayer, value6]} />;
const View4 = (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 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'])};
}
}
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'])};
}
global.__d(_fun102892, 13539, [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507,
2]) /* metro module 13539, dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507, 2] */;
@@ -1,210 +1,229 @@
/* Metro module 13540; source: modules/quests/native/BountiesModal/BountiesModalTimer.tsx; dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import Module07744 from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as ButtonConstantsNativeModule from '../../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */
import * as Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as CheckmarkSmallBoldIconModule from '../../../../design/components/Icon/native/redesign/generated/CheckmarkSmallBoldIcon.tsx'; /* Metro dependency 8707 */
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 SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).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 Easing = (ReanimatedRexportModule).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 createAnimatedComponent = ReanimatedRexport.createAnimatedComponent;
const Circle = (Module07744Module).Circle;
const env0_12 = Reflect.apply(createAnimatedComponent, ReanimatedRexport, [Circle]);
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'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'}]};
object2.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.width = SMALL_BUTTON_HEIGHT;
object2.height = SMALL_BUTTON_HEIGHT;
object.progress = object2;
object.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 = {};
object.trackPath = {color: BACKGROUND_SURFACE_HIGHEST};
const object6 = {};
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');
object6.color = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
object6.lineHeight = PlatformUtilsModule.isAndroid() ? 14 : value;
object.countdownText = object6;
object.checkmarkLayer = {'position': 'absolute', 'inset': 6, 'alignItems': 'center', 'justifyContent': 'center'};
const object7 = {'width': 20, 'height': 20, 'backgroundColor': '#2ECC71'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.checkmarkBackground = object7;
object.checkmarkIcon = {'width': 20, 'height': 20};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function BountiesModalTimerTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE-PROGRESS_CIRCUMFERENCE*animatedProgress.get()};}'};
object = {code: 'function BountiesModalTimerTsx2(){const{checkmarkBackgroundScale}=this.__closure;return{transform:[{scale:checkmarkBackgroundScale.get()}]};}'};
object = {code: 'function BountiesModalTimerTsx3(){const{checkmarkScale}=this.__closure;return{transform:[{scale:checkmarkScale.get()}]};}'};
(FileImportTrackerModule).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;
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 = (ReanimatedRexportModule).useSharedValue(r1);
const value9 = (ReanimatedRexportModule).useSharedValue(0);
const env0_3 = value9;
const value10 = (ReanimatedRexportModule).useSharedValue(0);
let binding = env0_3;
binding.useEffect(_fun102899, [value8, r1]);
const env0_5 = binding.useRef(false);
binding.useEffect(_fun102900, [r6, value9, value10]);
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]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BountiesModalTimerX;
closure.__closure = {checkmarkBackgroundScale: value9};
closure.__workletHash = 10834015407160;
closure.__initData = env0_15;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = BountiesModalTimerG;
closure.__closure = {checkmarkScale: value10};
closure.__workletHash = 7510845920441;
closure.__initData = env0_16;
const value13 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const defaultImport = Module07744;
const object2 = {};
const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT;
object2.height = SMALL_BUTTON_HEIGHT;
object2.width = SMALL_BUTTON_HEIGHT;
object2.style = styles.ring;
const Circle = (Module07744Module).Circle;
const binding2 = env0_7;
const items2 = [
((Component) => <Component {...object2}><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 = (ReanimatedRexport).View;
items2[2] = (
<View2 style={[styles.checkmarkLayer, value12]}>
<View style={styles.checkmarkBackground} />
</View2>
);
const View3 = (ReanimatedRexport).View;
const items4 = [styles.checkmarkLayer, value13];
const CheckmarkSmallBoldIcon = (CheckmarkSmallBoldIconModule).CheckmarkSmallBoldIcon;
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (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;
Reflect.apply(set, binding, [TimingModule.withTiming(env0_1, {duration: 500}, 'animate-always')]);
}
r0 = r1;
} else {
Reflect.apply(set, binding2, [0]);
env0_4.set(0);
r0 = undefined;
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 = ReactNativeModule.View;
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]);
ReactNativeModule.View.set(1);
r1 = undefined;
}
r0 = r1;
} else {
Reflect.apply(set, binding2, [0]);
ReactNativeModule.View.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 object2 = {};
object2.scale = env0_3.get();
return {transform: [object2]};
}
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 object2 = {};
object2.scale = ReactNativeModule.View.get();
return {transform: [object2]};
}
}
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]};
}
global.__d(_fun102897, 13540, [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707,
2]) /* metro module 13540, dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */;
@@ -1,111 +1,145 @@
/* 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] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseVisibilityTransitionModule from './useVisibilityTransition.tsx'; /* Metro dependency 13519 */
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
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 */;
ReactModule;
let value = ReactNativeModule;
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);
const env0_8 = (CreateStylesModule).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');
(FileImportTrackerModule).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 object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object.container = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['backgroundColor'] = 'rgba(0, 0, 0, 0.6)';
object.backdropTint = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object.backdropGradient = object4;
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['justifyContent'] = 'center';
object5['alignItems'] = 'center';
object.pressable = object5;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.overlayContent = {alignItems: 'center', gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.textBlock = {alignItems: 'center', gap: PX_4};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.replayIcon = {margin: PX_12};
return object;
}
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 = (TextModule).Text;
var items4;
var value;
const styles = useStyles();
const bountyCtaInfo = (BountyCtaHelpersModule).getBountyCtaInfo(bounty);
const intl = (IndexNativeModule).intl;
const value4 = intl.string((IndexNativeModule).t['9UtZAY']);
const useVisibilityTransition = UseVisibilityTransitionModule.useVisibilityTransition;
let object = {visible: visible};
object.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, UseVisibilityTransitionModule, [object]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BountiesScrollEndCardH2 = BountiesScrollEndCardH;
object = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.isActive = isActive;
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
BountiesScrollEndCardH2.__closure = object;
BountiesScrollEndCardH2.__workletHash = 13628650628423;
BountiesScrollEndCardH2.__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,
[BountiesScrollEndCardH2])]};
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 object = {};
const withTiming = TimingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object.opacity = Reflect.apply(withTiming, TimingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object;
}
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;
}
global.__d(_fun102913, 13543, [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234,
2]) /* metro module 13543, dependencies: [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234, 2] */;
@@ -1,14 +1,17 @@
/* Metro module 13518; source: modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseVisibilityTransitionModule from './useVisibilityTransition.tsx'; /* Metro dependency 13519 */
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'};
@@ -19,44 +22,44 @@ function _fun102749(global, require, importDefault, importAll, module, exports,
object.gradient = object3;
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx');
(FileImportTrackerModule).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 useVisibilityTransition = UseVisibilityTransitionModule.useVisibilityTransition;
const object = {visible: visible};
object.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
object.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
const value2 = Reflect.apply(useVisibilityTransition, UseVisibilityTransitionModule, [object]);
const opacityStyle2 = value2.opacityStyle;
const shouldRender = value2.shouldRender;
let useMemo = ReactModule.useMemo;
const value3 = Reflect.apply(useMemo, ReactModule, [function() {
return zIndex != null ? {zIndex: zIndex} : undefined;
}, [zIndex]]);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value4 = (UseSafeAreaInsetsNative)();
useMemo = ReactModule.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, ReactModule, [_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 = (Native).space.PX_8;
return {paddingBottom: Reflect.apply(max, Math, [bottom, PX_8])};
}
}
}
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])};
}
global.__d(_fun102749, 13518, [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868,
2]) /* metro module 13518, dependencies: [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868, 2] */;
@@ -1,43 +1,47 @@
/* Metro module 13544; source: modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx; dependencies: [27, 33, 4501, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
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');
(FileImportTrackerModule).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 = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const H57f41 = (IndexNativeModule).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((IndexNativeModule).t.tG0zsk)}
</Text>
</View>
);
}
}
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>
);
}
global.__d(_fun102917, 13544, [27, 33, 4501, 4573, 1244,
2]) /* metro module 13544, dependencies: [27, 33, 4501, 4573, 1244, 2] */;
@@ -1,72 +1,109 @@
/* Metro module 13545; source: modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868, 2] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as OrbsIconModule from '../../../../design/components/Icon/native/redesign/generated/OrbsIcon.tsx'; /* Metro dependency 10076 */
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');
ReactModule;
const env0_7 = (CreateStylesModule).createStyles(_fun102921);
(FileImportTrackerModule).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 object = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', gap: PX_4};
object.headerLabel = {textTransform: 'uppercase'};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.orbRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object.rive = {'flex': 1, 'width': '100%'};
const object4 = {};
const value = 6;
object4.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object.orbAmount = object4;
return object;
}
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 = (IndexNativeModule).intl;
const value2 = intl.string((IndexNativeModule).t.d6Rrn6);
const Text = (TextModule).Text;
const items2 = [
<Text
variant="text-xs/bold"
color="text-brand"
style={styles.headerLabel}
accessible={false}
>
{value2}
</Text>,
];
const OrbsIcon = (OrbsIconModule).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 = (NativeModule).BountiesScrollGradientRive;
return (
<View style={styles.rive}>
<BountiesScrollGradientRive
stateMachine="State Machine 1"
fit="fill"
alignment="bottom-center"
withReducedMotion={useReducedMotion ? 'halt' : 'play'}
/>
</View>
);
}
}
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>
);
}
global.__d(_fun102920, 13545, [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868,
2]) /* metro module 13545, dependencies: [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868, 2] */;
@@ -1,112 +1,200 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import Starfield_bgMp4 from '../../../../external/discord_assets/assets/quests/bounties/starfield_bg.mp4.js'; /* Metro dependency 13549 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as VideoModule from '../../../../components_native/common/Video.tsx'; /* Metro dependency 9543 */
import * as OrbsIconModule from '../../../../design/components/Icon/native/redesign/generated/OrbsIcon.tsx'; /* Metro dependency 10076 */
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 */;
ReactModule;
let value = ReactNativeModule;
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');
const env0_9 = (CreateStylesModule).createStyles(_fun102927);
(FileImportTrackerModule).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" />;
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 object2;
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;
object2 = {};
object2.uri = importDefault(13548) /* metro dependency 13548: _3d_orbsMov */;
r0 = (
<VideoComponent
source={object2}
style={style}
resizeMode="contain"
paused={reducedMotion}
disableFocus
preventsDisplaySleepDuringVideoPlayback={false}
importantForAccessibility="no-hide-descendants"
/>
);
}
return r0;
}
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 _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 object = {};
const object2 = {overflow: 'hidden'};
object2.borderRadius = lg;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object.root = object2;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.content = {'flex': 1, 'paddingHorizontal': null, 'justifyContent': 'center', 'alignItems': 'center',
paddingHorizontal: PX_24};
object.centeredCopy = {'alignItems': 'center', 'width': '100%'};
object.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;
object.headerLabel = {paddingBottom: PX_4, textTransform: 'uppercase'};
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingBottom = PX_24;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.gap = PX_8;
object.titleRow = object5;
const object6 = {position: 'absolute'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.right = PX_24;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
object.actions = object6;
const object7 = {};
const value = 6;
object7.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
object7.lineHeight = 46;
object.orbAmount = object7;
return object;
}
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)}
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 = (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 = (VideoModule).VideoComponent;
const view = (
<View {...viewBinding2Props}>
<VideoComponent
source={{uri: 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 = (TextModule).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 = (OrbsIconModule).OrbsIcon;
items4[1] = (
<View
accessible
accessibilityRole="text"
accessibilityLabel={'+' + orbAmount}
>
<View style={styles.titleRow}>
<OrbsIcon
size="lg"
onPress={onClose}
color="icon-strong"
accessible={false}
/>
<Text
variant="display-lg"
color="text-strong"
accessible={false}
style={styles.orbAmount}
>
{'+' + orbAmount}
</Text>
</View>
</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 = (Native).space.PX_8;
items7[1] = {bottom: bottom + PX_8};
const Button = (ButtonNativeModule).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>
);
}
}
global.__d(_fun102925, 13546, [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573,
1244, 10076, 4578,
2]) /* metro module 13546, dependencies: [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573, 1244, 10076, 4578, 2] */;
@@ -1,481 +1,503 @@
/* 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] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import BountyStore from '../../BountyStore.tsx'; /* Metro dependency 7092 */
import VirtualCurrencyStore from '../../../virtual_currency/stores/VirtualCurrencyStore.tsx'; /* Metro dependency 10071 */
import BountiesScrollEndCard from './BountiesScrollEndCard.tsx'; /* Metro dependency 13543 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as QuestContentImpressionTrackerNativeModule from '../QuestContentImpressionTracker.native.tsx'; /* Metro dependency 10183 */
import * as UseBountiesModalTimingModule from './useBountiesModalTiming.tsx'; /* Metro dependency 13533 */
import * as UseBountiesModalVideoAnalyticsModule from './useBountiesModalVideoAnalytics.tsx'; /* Metro dependency 13536 */
import * as UseBountyVideoProgressPersistenceModule from './useBountyVideoProgressPersistence.tsx'; /* Metro dependency 13537 */
import * as BountyVideoModule from './BountyVideo.tsx'; /* Metro dependency 13538 */
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');
(FileImportTrackerModule).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;
});
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 height2 = height;
const isActive2 = isActive;
const isScrollingInBoundsSharedValue2 = isScrollingInBoundsSharedValue;
const value2 = isScrollingInBoundsSharedValue2.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 = (BountiesStage1ExperimentModule).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 = (UseBountiesModalTimingModule).BountyVideoEndMode;
const r26 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD_WITH_CTA;
const r25 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
const value8 = isScrollingInBoundsSharedValue2.useRef(null);
const handlePlayerStateChange = useResumeOnActive({isActive: isActive, playerRef: value8}).handlePlayerStateChange;
const [property, property2] = isActive2(isScrollingInBoundsSharedValue2.useState(isActive), 2);
const [property3, property4] = isActive2(isScrollingInBoundsSharedValue2.useState(_fun102784), 2);
const isActive22 = isActive2(isScrollingInBoundsSharedValue2.useState(0), 2);
const property5 = isActive22[0];
if (property !== isActive) {
property2(isActive);
if (isActive) {
currentBalance = VirtualCurrencyStore.getCurrentBalance();
property4(currentBalance);
if (currentBalance !== property3) {
isActive22[1](function(a0) {
return a0 + 1;
});
}
}
}
const value17 = isScrollingInBoundsSharedValue2.useCallback(height2(_fun102787), [bounty.id, isActive, orbAmount,
sourceQuestContent]);
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
handleVideoPausedAnalytics,
handleVideoResumedAnalytics} = (UseBountiesModalVideoAnalyticsModule).useBountiesModalVideoAnalytics({bountyId: bounty.id,
sourceQuestContent: sourceQuestContent, rewardDurationMs: r25});
const value19 = (UseBountyVideoProgressPersistenceModule).useBountyVideoProgressPersistence({bountyId: bounty.id,
endMode: r26});
const initialProgress = value19.initialProgress;
const handleProgress = value19.handleProgress;
isScrollingInBoundsSharedValue2.useEffect(function() {
return _fun102790;
}, [value19.flushProgress]);
const value20 = isScrollingInBoundsSharedValue2.useCallback(function(a0, a1, a2) {
handleVideoProgressAnalytics(a0, a1);
handleProgress(a0, a1, a2);
}, [handleVideoProgressAnalytics, handleProgress]);
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 = (BountyVideoModule).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 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 _fun102782(a0) { // fn#102782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:890, offset: 0x0218936d, size: 20 bytes, params: 2, frame: 2
env0_3.current = a0;
}
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 _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 _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 _fun102789() { // fn#102789, offset: 0x02248a23, size: 11 bytes, params: 1, frame: 1
return function() {
return flushProgress();
};
function _fun102790() { // fn#102790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1958, offset: 0x01e42539, size: 15 bytes, params: 1, frame: 9
return flushProgress();
}
}
function renderEndCard() { // 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 = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (QuestContentModule).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 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} />)(BountiesScrollEndCard);
}
}
}
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}
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 = (QuestContentImpressionTrackerNativeModule).QuestContentImpressionTrackerNative;
const id = bounty.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
const QuestContent = (QuestContentModule).QuestContent;
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
return (
<QuestContentImpressionTrackerNative
adContentId={id}
adCreativeType={BOUNTY}
questContent={VIDEO_MODAL_MOBILE}
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>
);
}
overrideVisibility={isActive}
>
{children_102795}
</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 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 */);
}
global.__d(_fun102777, 13522, [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536,
13537, 13538, 10183, 7121, 6533, 13543,
2]) /* metro module 13522, dependencies: [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536, 13537, 13538, 10183, 7121, 6533, 13543, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 13542; source: modules/quests/native/BountiesModal/BountyCtaHelpers.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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);
@@ -12,3 +14,4 @@ function _fun102911(global, require, importDefault, importAll, module, exports,
};
}
global.__d(_fun102911, 13542, [1244, 2]) /* metro module 13542, dependencies: [1244, 2] */;
@@ -1,104 +1,152 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import BountiesModalProgress from './BountiesModalProgress.tsx'; /* Metro dependency 13539 */
import BountiesModalTimer from './BountiesModalTimer.tsx'; /* Metro dependency 13540 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
import * as AndroidRNVHttpEngineExperimentModule from '../../../media_uploads/experiments/AndroidRNVHttpEngineExperiment.tsx'; /* Metro dependency 9564 */
import * as BalanceWidgetPillModule from '../../../virtual_currency/native/BalanceWidgetPill.tsx'; /* Metro dependency 10124 */
import * as AdVideoPlayerModule from '../AdVideoPlayer.tsx'; /* Metro dependency 13523 */
import * as BountiesModalProgressModule from './BountiesModalProgress.tsx'; /* Metro dependency 13539 */
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 */;
ReactModule;
let value = ReactNativeModule;
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);
const env0_11 = (CreateStylesModule).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');
(FileImportTrackerModule).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 object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['overflow'] = 'hidden';
const lgBinding = lg;
object2['borderRadius'] = lgBinding;
object.videoContainer = object2;
const object3 = {'position': 'absolute', 'top': null, 'left': null, 'flexDirection': 'row', 'alignItems': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.top = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.left = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gap = PX_8;
object.leftRow = object3;
const PROGRESS_BAR_HEIGHT = (BountiesModalProgressModule).PROGRESS_BAR_HEIGHT;
object.progress = {'position': 'absolute', 'bottom': 0, height: PROGRESS_BAR_HEIGHT, left: lgBinding,
right: lgBinding};
return object;
}
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
isActive = !(isActive === undefined) && isActive;
isRecapPageRevealed = !(isRecapPageRevealed === undefined) && isRecapPageRevealed;
const styles = useStyles();
const value5 = (AndroidRNVHttpEngineExperimentModule).useRnvHttpEngine();
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).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 useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BountyVideoL2 = BountyVideoL;
object = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.isActive = isActive;
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
BountyVideoL2.__closure = object;
BountyVideoL2.__workletHash = 12287714482150;
BountyVideoL2.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [BountyVideoL2]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const AdVideoPlayer = (AdVideoPlayerModule).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 = (ReanimatedRexport).View;
const items2 = [styles.leftRow, value6];
const value12 = ((Component) => <Component isCompleted={isCompleted} totalSeconds={rewardTotalSeconds} remainingSeconds={rewardRemainingSeconds} />)(BountiesModalTimer);
const BalanceWidgetPill = (BalanceWidgetPillModule).BalanceWidgetPill;
items3[2] = (
<View2 style={items2}>
{value12}
<BalanceWidgetPill balance={orbsBalance} key={balanceWidgetPillResetKey} />
</View2>
);
const View3 = (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 = (ReanimatedRexport).View;
return (
<>
{view}
<View4 style={[styles.progress, value6]}>
{((Component) => <Component progress={normalizedProgress} visible={isProgressBarVisible} />)(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 object = {};
const withTiming = TimingModule.withTiming;
const isActiveBinding = isActive;
const value = 0;
object.opacity = Reflect.apply(withTiming, TimingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
return object;
}
}
}
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;
}
global.__d(_fun102888, 13538, [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540,
10124, 13541,
2]) /* metro module 13538, dependencies: [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540, 10124, 13541, 2] */;
@@ -1,12 +1,15 @@
/* Metro module 13534; source: modules/quests/native/BountiesModal/bountyError.tsx; dependencies: [13535, 1244, 3857, 8947, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as BountiesModalConstantsModule from './BountiesModalConstants.tsx'; /* Metro dependency 13535 */
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');
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/bountyError.tsx');
exports.openBountyRewardClaimErrorToast = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var object = {key: 'QUESTS_BOUNTIES_REWARD_CLAIM_FAILED'};
@@ -15,12 +18,14 @@ function _fun102863(global, require, importDefault, importAll, module, exports,
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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);
}
}
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);
}
global.__d(_fun102863, 13534, [13535, 1244, 3857, 8947,
2]) /* metro module 13534, dependencies: [13535, 1244, 3857, 8947, 2] */;
@@ -1,163 +1,168 @@
/* Metro module 13533; source: modules/quests/native/BountiesModal/useBountiesModalTiming.tsx; dependencies: [57, 31, 6528, 9530, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
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');
(FileImportTrackerModule).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 onRewardEarned2 = onRewardEarned;
const onVideoProgress2 = onVideoProgress;
const onVideoLooped2 = onVideoLooped;
initialProgressSec = initialProgressSec === undefined ? 0 : initialProgressSec;
initialMaxVideoProgressSec = initialMaxVideoProgressSec === undefined ? 0 : initialMaxVideoProgressSec;
initialVideoDurationSec = initialVideoDurationSec === undefined ? null : initialVideoDurationSec;
let binding = onVideoProgress2;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding,
[initialVideoDurationSec != null && initialProgressSec >= initialVideoDurationSec - 1 && endMode !== onVideoLooped2.LOOP]);
binding = onRewardEarned2;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_11 = value6[1];
const binding2 = onVideoProgress2;
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 = onVideoProgress2;
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 = (BountiesStage1ExperimentModule).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 !== onVideoLooped2.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);
}
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);
}
global.__d(_fun102855, 13533, [57, 31, 6528, 9530,
2]) /* metro module 13533, dependencies: [57, 31, 6528, 9530, 2] */;
@@ -1,4 +1,13 @@
/* Metro module 13536; source: modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx; dependencies: [31, 661, 9513, 491, 7110, 7121, 9522, 13523, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Module00491Module from '../../../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AnalyticsActionsModule from '../../lib/analytics/AnalyticsActions.tsx'; /* Metro dependency 7110 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
import * as ContentImpressionTrackerHooksModule from '../../lib/analytics/ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */
import * as AdVideoPlayerModule from '../AdVideoPlayer.tsx'; /* Metro dependency 13523 */
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) {
@@ -46,272 +55,274 @@ function _fun102867(global, require, importDefault, importAll, module, exports,
};
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');
(FileImportTrackerModule).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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
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;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_102870(a0, value);
r6 = value;
} else {
r6 = value;
}
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;
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 _fun102869() { // fn#102869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:708, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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
const rewardDurationMs2 = rewardDurationMs;
const value2 = (ContentImpressionTrackerHooksModule).useQuestImpressionId();
const binding = rewardDurationMs2;
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]);
object = {};
object.handleVideoProgressAnalytics = binding.useCallback(_fun102878, [value6, value7, value9, rewardDurationMs]);
object.handleVideoEndAnalytics = binding.useCallback(_fun102879, [value6, value7, value9, value8]);
object.handleVideoLoopedAnalytics = binding.useCallback(_fun102880, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object.handleVideoPausedAnalytics = binding.useCallback(_fun102881, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
object.handleVideoResumedAnalytics = binding.useCallback(_fun102882, [bountyId, value, value2, sourceQuestContent,
rewardDurationMs]);
return object;
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 (Module00491Module).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 trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bountyId;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_PROGRESSED = AnalyticEvents.AD_VIDEO_PROGRESSED;
object.event = AD_VIDEO_PROGRESSED;
object.properties = {progress: progress, video_timestamp_seconds: videoTimestampSeconds, video_session_id: env0_4,
impression_id: ConstantsModule.AnalyticEvents, threshold_met: thresholdMet, reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
}
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 trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent;
const object = {};
object.adContentId = bountyId;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const BOUNTY = AdCreativeType.BOUNTY;
object.adCreativeType = BOUNTY;
const AD_VIDEO_LOOPED = AnalyticEvents.AD_VIDEO_LOOPED;
object.event = AD_VIDEO_LOOPED;
object.properties = {video_session_id: env0_4, impression_id: ConstantsModule.AnalyticEvents, loop_count: a0,
reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]);
}
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 object;
const PlaybackTriggerSource = (AdVideoPlayerModule).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object = {};
object.adContentId = bountyId;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object.event = AnalyticEvents.AD_VIDEO_PAUSED;
object.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: ConstantsModule.AnalyticEvents,
reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object]);
}
}
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 object;
const PlaybackTriggerSource = (AdVideoPlayerModule).PlaybackTriggerSource;
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
if (a1 === USER_INTERACTION) {
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
trackAdContentEvent = moduleValue.trackAdContentEvent;
object = {};
object.adContentId = bountyId;
object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
object.event = AnalyticEvents.AD_VIDEO_RESUMED;
object.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: ConstantsModule.AnalyticEvents,
reward_timer_seconds: rewardDurationMs / 1000};
object.sourceQuestContent = sourceQuestContent;
Reflect.apply(trackAdContentEvent, moduleValue, [object]);
}
}
}
}
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]);
}
}
global.__d(_fun102867, 13536, [31, 661, 9513, 491, 7110, 7121, 9522, 13523,
2]) /* metro module 13536, dependencies: [31, 661, 9513, 491, 7110, 7121, 9522, 13523, 2] */;
@@ -1,123 +1,128 @@
/* Metro module 13521; source: modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx; dependencies: [57, 31, 4017, 13520, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as UseBountiesRecapScrollModule from './useBountiesRecapScroll.tsx'; /* Metro dependency 13520 */
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');
(FileImportTrackerModule).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);
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 recapRevealHeight2 = recapRevealHeight;
const binding = targetOrbAmount;
const [property, env0_5] = recapRevealHeight2(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 useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useBountiesRecapOrbCountB;
let object = {enabled: enabled, recapRevealHeight: recapRevealHeight};
const getRevealProgress = (UseBountiesRecapScrollModule).getRevealProgress;
object.getRevealProgress = getRevealProgress;
object.scrollY = scrollY;
object.lastBountyScrollOffset = lastBountyScrollOffset;
object.RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS = 0.95;
object.getRecapOrbCountFromPullProgress = env0_5;
object.targetOrbAmount = targetOrbAmount;
closure.__closure = object;
closure.__workletHash = 2855285055570;
closure.__initData = env0_6;
const useBountiesRecapOrbCountP2 = useBountiesRecapOrbCountP;
object = {};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.resetDisplayCount = value5;
object.setDisplayCountMonotonic = value4;
useBountiesRecapOrbCountP2.__closure = object;
useBountiesRecapOrbCountP2.__workletHash = 12006414940221;
useBountiesRecapOrbCountP2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useBountiesRecapOrbCountP2]);
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 _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;
}
}
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 _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 _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) {
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 object;
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 {
object = {};
object.count = env1_5(value5, targetOrbAmount);
object.revealed = true;
r0 = object;
}
return r0;
}
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;
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])();
}
}
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;
}
global.__d(_fun102768, 13521, [57, 31, 4017, 13520,
2]) /* metro module 13521, dependencies: [57, 31, 4017, 13520, 2] */;
@@ -1,69 +1,72 @@
/* Metro module 13520; source: modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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');
(FileImportTrackerModule).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 _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});
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);
}
}, [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 _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);
}
}
}
}
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);
}
}
global.__d(_fun102760, 13520, [31, 2]) /* metro module 13520, dependencies: [31, 2] */;
@@ -1,79 +1,85 @@
/* Metro module 13537; source: modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx; dependencies: [57, 31, 7092, 6528, 9530, 13533, 9532, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import BountyStore from '../../BountyStore.tsx'; /* Metro dependency 7092 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
import * as BountiesStage1ExperimentModule from '../../experiments/BountiesStage1Experiment.tsx'; /* Metro dependency 9530 */
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');
(FileImportTrackerModule).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
const BountiesStage1Experiment = (BountiesStage1ExperimentModule).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 enabled2 = enabled;
const binding = env0_3;
const property = enabled2(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);
object = {initialProgress: property};
object.handleProgress = binding.useCallback(_fun102886, [enabled, bountyId]);
object.flushProgress = binding.useCallback(_fun102887, [enabled, bountyId]);
return object;
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 bountyStoreBinding;
var value3;
if (enabled) {
bountyStoreBinding = BountyStore;
value3 = bountyStoreBinding.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 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 _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 _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 _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 object;
var current;
if (enabled) {
value2 = environment.__proto__;
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
setBountyVideoProgress = moduleValue.setBountyVideoProgress;
bountyIdBinding = bountyId;
object = {};
current = env0_4.current;
object.timestampSec = current;
current = env0_5.current;
object.maxTimestampSec = current;
current = env0_6.current;
object.duration = current;
Reflect.apply(setBountyVideoProgress, moduleValue, [bountyIdBinding, object]);
}
}
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]);
}
}
global.__d(_fun102883, 13537, [57, 31, 7092, 6528, 9530, 13533, 9532,
2]) /* metro module 13537, dependencies: [57, 31, 7092, 6528, 9530, 13533, 9532, 2] */;
@@ -1,75 +1,83 @@
/* Metro module 13519; source: modules/quests/native/BountiesModal/useVisibilityTransition.tsx; dependencies: [57, 31, 4017, 4504, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
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');
(FileImportTrackerModule).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);
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 exitTiming2 = exitTiming;
let binding = property22;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = exitTiming2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
var property22 = 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 = property22;
let closure = _fun102757;
const value7 = binding.useCallback(closure, []);
const env0_4 = value7;
const r15 = visible ? 1 : 0;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = useVisibilityTransitionK;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.visibility = r15;
object2.visible = visible;
object2.entranceTiming = entranceTiming;
object2.exitTiming = exitTiming;
object2.runOnJS = ReanimatedRexportModule.runOnJS;
object2.animationCallbackJSThread = value7;
closure.__closure = object2;
closure.__workletHash = 12648900540770;
closure.__initData = env0_4;
return {opacityStyle: Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]),
shouldRender: visible || property};
function _fun102757() { // fn#102757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:912, offset: 0x01e44aa8, size: 18 bytes, params: 1, frame: 11
ReactModule(false);
}
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 withTiming = TimingModule.withTiming;
const binding = env0_5;
const r3 = visible ? entranceTiming : exitTiming;
const kN2 = kN;
const object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.animationCallbackJSThread = env0_4;
kN2.__closure = object2;
kN2.__workletHash = 11904317879470;
kN2.__initData = env1_5;
return {opacity: Reflect.apply(withTiming, TimingModule, [binding, r3, 'respect-motion-settings', kN2])};
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)();
}
}
}
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)();
}
global.__d(_fun102755, 13519, [57, 31, 4017, 4504,
2]) /* metro module 13519, dependencies: [57, 31, 4017, 4504, 2] */;