217 lines
14 KiB
TypeScript
217 lines
14 KiB
TypeScript
/* 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});
|
|
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 = (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)}]};}'};
|
|
(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 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;
|
|
}
|
|
|
|
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 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 = (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);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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] */;
|